diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 672d6bd3bca..00000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,113 +0,0 @@ -//"Jenkins Pipeline is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. Pipeline provides an extensible set of tools for modeling delivery pipelines "as code" via the Pipeline DSL." -//More information can be found on the Jenkins Documentation page https://jenkins.io/doc/ - -@Library('github.com/connexta/cx-pipeline-library@master') _ -@Library('github.com/connexta/github-utils-shared-library@master') __ - -pipeline { - agent { - node { - label 'linux-small' - customWorkspace "/jenkins/workspace/${JOB_NAME}/${BUILD_NUMBER}" - } - } - options { - buildDiscarder(logRotator(numToKeepStr:'25')) - disableConcurrentBuilds() - timestamps() - skipDefaultCheckout() - } - triggers { - /* - Restrict nightly builds to master branch, all others will be built on change only. - Note: The BRANCH_NAME will only work with a multi-branch job using the github-branch-source - */ - cron(BRANCH_NAME == "master" ? "H H(17-19) * * *" : "") - } - environment { - LARGE_MVN_OPTS = '-Xmx4G -Xms1G -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC ' - DISABLE_DOWNLOAD_PROGRESS_OPTS = '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn ' - LINUX_MVN_RANDOM = '-Djava.security.egd=file:/dev/./urandom' - GITHUB_USERNAME = 'codice' - GITHUB_TOKEN = credentials('cxddfuibot') - GITHUB_REPONAME = 'ddf-ui' - } - stages { - stage('Setup') { - steps { - dockerd {} - slackSend color: 'good', message: "STARTED: ${JOB_NAME} ${BUILD_NUMBER} ${BUILD_URL}" - postCommentIfPR("Internal build has been started, your results will be available at build completion.", "${GITHUB_USERNAME}", "${GITHUB_REPONAME}", "${GITHUB_TOKEN}") - } - } - // Checkout the repository - stage('Checkout repo') { - steps { - retry(3) { - checkout scm - } - } - } - stage('Full Build') { - options { - timeout(time: 1, unit: 'HOURS') - } - steps { - withMaven(maven: 'maven-latest', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LARGE_MVN_OPTS} ${LINUX_MVN_RANDOM}') { - sh 'mvn clean install -B $DISABLE_DOWNLOAD_PROGRESS_OPTS' - } - } - } - - /* - Deploy stage will only be executed for deployable branches. These include master and any patch branch matching M.m.x format (i.e. 2.10.x, 2.9.x, etc...). - It will also only deploy in the presence of an environment variable JENKINS_ENV = 'prod'. This can be passed in globally from the jenkins master node settings. - */ - stage('Deploy') { - when { - allOf { - expression { env.CHANGE_ID == null } - expression { env.BRANCH_NAME ==~ /((?:\d*\.)?\d*\.x|master)/ } - environment name: 'JENKINS_ENV', value: 'prod' - } - } - steps{ - withMaven(maven: 'maven-latest', jdk: 'jdk21', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LINUX_MVN_RANDOM}') { - sh 'mvn deploy -B -DskipStatic=true -DskipTests=true -DretryFailedDeploymentCount=10 $DISABLE_DOWNLOAD_PROGRESS_OPTS' - } - } - } - } - post { - always{ - script { - postCommentIfPR("Build ${currentBuild.currentResult} See the job results in [legacy Jenkins UI](${BUILD_URL}) or in [Blue Ocean UI](${BUILD_URL}display/redirect).", "${GITHUB_USERNAME}", "${GITHUB_REPONAME}", "${GITHUB_TOKEN}") - if (currentBuild.currentResult == 'FAILURE') { - def logUrl = env.BUILD_URL + 'consoleText' - def response = sh(returnStdout: true, script: "curl -L -k ${logUrl}") - def failureMessage = getFailureMessage(response) - postCommentIfPR("${failureMessage}", "${GITHUB_USERNAME}", "${GITHUB_REPONAME}", "${GITHUB_TOKEN}") - } - } - } - success { - slackSend color: 'good', message: "SUCCESS: ${JOB_NAME} ${BUILD_NUMBER}" - } - failure { - slackSend color: '#ea0017', message: "FAILURE: ${JOB_NAME} ${BUILD_NUMBER}. See the results here: ${BUILD_URL}" - } - unstable { - slackSend color: '#ffb600', message: "UNSTABLE: ${JOB_NAME} ${BUILD_NUMBER}. See the results here: ${BUILD_URL}" - } - cleanup { - catchError(buildResult: null, stageResult: 'FAILURE') { - echo '...Cleaning up workspace' - cleanWs() - sh 'rm -rf ~/.m2/repository' - wrap([$class: 'MesosSingleUseSlave']) { - sh 'echo "...Shutting down Jenkins slave: `hostname`"' - } - } - } - } -} diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index e1c6c4d4d32..00000000000 --- a/LICENSE.md +++ /dev/null @@ -1,11 +0,0 @@ -Copyright (c) Codice Foundation - -This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser -General Public License as published by the Free Software Foundation, either version 3 of the -License, or any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. A copy of the GNU Lesser General Public License -is distributed along with this program and can be found at -. diff --git a/README.md b/README.md deleted file mode 100644 index 4c5d87a4757..00000000000 --- a/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# ddf-ui - -Welcome to ddf-ui, the home of Intrigue. - -## Installing in DDF - -Note: Change `4.1.0-SNAPSHOT` to the desired or most recent version of ddf-ui. - -1. Inside of a DDF karaf console run the following commands: - - ``` - feature:repo-add mvn:org.codice.ddf.search/intrigue-ui-app/4.1.0-SNAPSHOT/xml/features - ``` - - ``` - feature:install catalog-ui-app - ``` - - This will add the backend repo and then install the app. - - ``` - feature:repo-add mvn:org.codice.ddf.search/ui-frontend/4.1.0-SNAPSHOT/xml/features - ``` - - ``` - feature:install ui-frontend - ``` - - This will add the frontend repo and then install the app. - -2. (Optional) Add the following bundle to `bundleLocations` in `etc/application-definitions/search-ui.json`: - ``` - "mvn:org.codice.ddf.search/catalog-ui-search/4.1.0-SNAPSHOT" - ``` - This configures the Intrigue configurations to appear under the `Search UI` app in the DDF Admin Console. -3. (Optional) Add a configuration file at `etc/org.codice.ddf.ui.searchui.filter.RedirectServlet.config` with the following contents: - ``` - defaultUri="${org.codice.ddf.external.context}/search/catalog/" - ``` - This configures `/search` to redirect to `/search/catalog`, which is the URI for Intrigue. - -## Developer Notes - -There are multiple workflows setup to assist with develop in downstream projects. - -1. The first work flow is one that runs on each pull request. After each commit, the catalog-ui-search dist will be built and pushed to a branch unique to that pull request. This branch is automatically maintained and deleted once the pull request closes (merged or otherwise). An example comment that is posted to each pull request once the branch is built and pushed is below - -``` -An updated dist branch has been created and pushed to origin. -You can use: -`"catalog-ui-search": "https://github.com/codice/ddf-ui#catalog-ui-search-dist-746"`, -in your package.json to use this version in your project. - -Remember to use "yarn install --force" if you want to pick up changes each time you make a change to this branch by committing. -``` - -2. There is a similar workflow that maintains a dist for the main branch of the project. So once your changes are merged in, you can point to this branch. Or you can point to it just to verify the next version will work once released. Below is how to reference that snapshot dist. - -``` - "catalog-ui-search": "codice/ddf-ui#main-dist-snapshot" -``` - -Remember that both cases rely on using `yarn install --force` to pick up any changes to the branches. -(and also remember to wait for the rebuilt dist to be compiled and pushed) diff --git a/catalog-ui-search.tgz b/catalog-ui-search.tgz new file mode 100644 index 00000000000..82feef352e8 Binary files /dev/null and b/catalog-ui-search.tgz differ diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/antora.yml b/docs/antora.yml deleted file mode 100644 index 8777755ce69..00000000000 --- a/docs/antora.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Intrigue -version: 2.21.0-SNAPSHOT -title: Intrigue -start_page: ROOT:using-intrigue-intro.adoc -nav: -- modules/quick-start/nav.adoc -- modules/ROOT/nav.adoc -- modules/configuring/nav.adoc -- modules/data-management/nav.adoc -- modules/reference/nav.adoc - diff --git a/docs/modules/ROOT/images/add-visual-icon.png b/docs/modules/ROOT/images/add-visual-icon.png deleted file mode 100644 index 36d700482ef..00000000000 Binary files a/docs/modules/ROOT/images/add-visual-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/after-cluster.png b/docs/modules/ROOT/images/after-cluster.png deleted file mode 100644 index 5bf7cc2da1f..00000000000 Binary files a/docs/modules/ROOT/images/after-cluster.png and /dev/null differ diff --git a/docs/modules/ROOT/images/associations-menu-icon.png b/docs/modules/ROOT/images/associations-menu-icon.png deleted file mode 100644 index efcaba11dc2..00000000000 Binary files a/docs/modules/ROOT/images/associations-menu-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/before-cluster.png b/docs/modules/ROOT/images/before-cluster.png deleted file mode 100644 index 7f7de437c4e..00000000000 Binary files a/docs/modules/ROOT/images/before-cluster.png and /dev/null differ diff --git a/docs/modules/ROOT/images/convex-hull-transform-example.png b/docs/modules/ROOT/images/convex-hull-transform-example.png deleted file mode 100644 index 734c3fb8feb..00000000000 Binary files a/docs/modules/ROOT/images/convex-hull-transform-example.png and /dev/null differ diff --git a/docs/modules/ROOT/images/eye-icon.png b/docs/modules/ROOT/images/eye-icon.png deleted file mode 100644 index d93e9de5b39..00000000000 Binary files a/docs/modules/ROOT/images/eye-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/gear-icon.png b/docs/modules/ROOT/images/gear-icon.png deleted file mode 100644 index 1ac3da0ae65..00000000000 Binary files a/docs/modules/ROOT/images/gear-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/magnifying-glass.png b/docs/modules/ROOT/images/magnifying-glass.png deleted file mode 100644 index 04069437dc0..00000000000 Binary files a/docs/modules/ROOT/images/magnifying-glass.png and /dev/null differ diff --git a/docs/modules/ROOT/images/map-tools-widget.png b/docs/modules/ROOT/images/map-tools-widget.png deleted file mode 100644 index 7c80dc6ba84..00000000000 Binary files a/docs/modules/ROOT/images/map-tools-widget.png and /dev/null differ diff --git a/docs/modules/ROOT/images/navigator-icon.png b/docs/modules/ROOT/images/navigator-icon.png deleted file mode 100644 index 8b6de7a40c2..00000000000 Binary files a/docs/modules/ROOT/images/navigator-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/notifications-icon.png b/docs/modules/ROOT/images/notifications-icon.png deleted file mode 100644 index 22971932da9..00000000000 Binary files a/docs/modules/ROOT/images/notifications-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/options-icon.png b/docs/modules/ROOT/images/options-icon.png deleted file mode 100644 index f82c727c4bc..00000000000 Binary files a/docs/modules/ROOT/images/options-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/sample-dropdown-menu.png b/docs/modules/ROOT/images/sample-dropdown-menu.png deleted file mode 100644 index e9c52887921..00000000000 Binary files a/docs/modules/ROOT/images/sample-dropdown-menu.png and /dev/null differ diff --git a/docs/modules/ROOT/images/sample-result-view.png b/docs/modules/ROOT/images/sample-result-view.png deleted file mode 100644 index 25d45f91388..00000000000 Binary files a/docs/modules/ROOT/images/sample-result-view.png and /dev/null differ diff --git a/docs/modules/ROOT/images/save-icon.png b/docs/modules/ROOT/images/save-icon.png deleted file mode 100644 index 2ab9fcfd2a6..00000000000 Binary files a/docs/modules/ROOT/images/save-icon.png and /dev/null differ diff --git a/docs/modules/ROOT/images/search-pane-tabs.png b/docs/modules/ROOT/images/search-pane-tabs.png deleted file mode 100644 index ea5921f949e..00000000000 Binary files a/docs/modules/ROOT/images/search-pane-tabs.png and /dev/null differ diff --git a/docs/modules/ROOT/images/search-results-options.png b/docs/modules/ROOT/images/search-results-options.png deleted file mode 100644 index 99a29c31e56..00000000000 Binary files a/docs/modules/ROOT/images/search-results-options.png and /dev/null differ diff --git a/docs/modules/ROOT/images/searches-dropdown.png b/docs/modules/ROOT/images/searches-dropdown.png deleted file mode 100644 index 0cf3e8a0524..00000000000 Binary files a/docs/modules/ROOT/images/searches-dropdown.png and /dev/null differ diff --git a/docs/modules/ROOT/images/sources-dropdown.png b/docs/modules/ROOT/images/sources-dropdown.png deleted file mode 100644 index fce4a7f5386..00000000000 Binary files a/docs/modules/ROOT/images/sources-dropdown.png and /dev/null differ diff --git a/docs/modules/ROOT/images/start-new-workspace.png b/docs/modules/ROOT/images/start-new-workspace.png deleted file mode 100644 index 1483d5b4d04..00000000000 Binary files a/docs/modules/ROOT/images/start-new-workspace.png and /dev/null differ diff --git a/docs/modules/ROOT/images/trash.png b/docs/modules/ROOT/images/trash.png deleted file mode 100644 index 28c46669d65..00000000000 Binary files a/docs/modules/ROOT/images/trash.png and /dev/null differ diff --git a/docs/modules/ROOT/images/ui-settings-options.png b/docs/modules/ROOT/images/ui-settings-options.png deleted file mode 100644 index 3575c212ae6..00000000000 Binary files a/docs/modules/ROOT/images/ui-settings-options.png and /dev/null differ diff --git a/docs/modules/ROOT/images/unhide-blacklist.png b/docs/modules/ROOT/images/unhide-blacklist.png deleted file mode 100644 index a4755cc6797..00000000000 Binary files a/docs/modules/ROOT/images/unhide-blacklist.png and /dev/null differ diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc deleted file mode 100644 index 5f8fe11c3f2..00000000000 --- a/docs/modules/ROOT/nav.adoc +++ /dev/null @@ -1,32 +0,0 @@ - -.xref:using-intrigue-intro.adoc[Using Intrigue] -* xref:accessing-intrigue.adoc[Accessing Intrigue] -* xref:search.adoc[Searching {catalog-ui}] -** xref:create-a-search.adoc[Creating a Search] -** xref:editing-searches.adoc[Editing a Search] -** xref:viewing-results.adoc[Viewing Results] -** xref:hiding-results.adoc[Hiding Results] -** xref:lists.adoc[Using Lists] -* xref:workspaces.adoc[Workspaces] -** xref:creating-workspaces.adoc[Creating a Workspace] -** xref:configuring-workspaces.adoc[Configuring a Workspace] -** xref:sharing-workspaces.adoc[Sharing Workspaces] -** xref:filtering-workspaces.adoc[Filtering Workspaces] -* xref:ui-uploading.adoc[Uploading] -** xref:attribute-editor.adoc[Using the Attribute Editor] -* xref:sources-ui.adoc[Sources View] -* xref:search-forms.adoc[Search Forms] -** xref:creating-search-forms.adoc[Creating Search Forms] -** xref:sharing-search-forms.adoc[Sharing Search Forms] -* xref:result-forms.adoc[Result Forms] -** xref:creating-result-forms.adoc[Creating Results Forms] -** xref:sharing-result-forms.adoc[Sharing Result Forms] -* xref:map-tools.adoc[Map Tools] -** xref:gazeteer.adoc[Pan to a Location] -** xref:set-home.adoc[Set a Home Location] -** xref:cluster.adoc[Cluster Location Results] -** xref:layer-settings.adoc[Map Layer Settings] -** xref:coordinate-format.adoc[Set Coordinate Format] -* xref:notifications.adoc[Notifications] -* xref:ui-settings.adoc[Customization Options] -** xref:low-bandwidth.adoc[Low Bandwidth Mode] diff --git a/docs/modules/ROOT/pages/accessing-intrigue.adoc b/docs/modules/ROOT/pages/accessing-intrigue.adoc deleted file mode 100644 index 85a0916a40c..00000000000 --- a/docs/modules/ROOT/pages/accessing-intrigue.adoc +++ /dev/null @@ -1,29 +0,0 @@ -:title: Accessing {catalog-ui} -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Accessing {catalog-ui}. -:order: 00 - -== {title} - -The default URL for {catalog-ui} is \{secure_url}/search/catalog - -.Catalog UI Guest Users -[NOTE] -==== -If Guest access has been enabled, users not signed in to {branding} (guest users) have access to search functions, -but all workspace configuration and settings only exist locally -and are not available for sharing. -==== - -{catalog-ui} defaults to the Search view. -For other views, select the *Navigation* menu image:navigator-icon.png[navigator icon] in the upper-left corner of {catalog-ui} and select the desired view. - -.Navigation Menu -. <<{using-prefix}using_workspaces,Workspaces>> -. <<{using-prefix}uploading,Upload>> -. <<{using-prefix}sources_view,Sources>> -. <<{using-prefix}using_search_forms,Search Forms>> -. <<{using-prefix}using_result_forms,Result Forms>> - diff --git a/docs/modules/ROOT/pages/attribute-editor.adoc b/docs/modules/ROOT/pages/attribute-editor.adoc deleted file mode 100644 index 511774024f4..00000000000 --- a/docs/modules/ROOT/pages/attribute-editor.adoc +++ /dev/null @@ -1,20 +0,0 @@ -:title: Using the Attribute Editor -:type: subUsing -:status: published -:parent: Uploading -:summary: Using the Attribute Editor -:order: 00 - -== {title} - -{catalog-ui} provides an ((Attribute Editor)) form which allows users to customize the metadata of their uploads. -If enabled, it appears alongside the upload dropzone and displays a list of attributes that may be set. - -To set an attribute, simply provide a value in the corresponding form control. -All custom values in the form are applied on upload. -If a field is left blank, the attribute is ignored. -To remove all custom values entered, simply click the "Reset Attributes" button at the bottom of the -form. - -Certain attributes within the form may be marked as required (indicated by an asterisk). -These fields must be set before uploads are permitted. diff --git a/docs/modules/ROOT/pages/cluster.adoc b/docs/modules/ROOT/pages/cluster.adoc deleted file mode 100644 index 0c519c06d5e..00000000000 --- a/docs/modules/ROOT/pages/cluster.adoc +++ /dev/null @@ -1,21 +0,0 @@ -:title: Cluster location results -:type: subUsing -:status: published -:parent: Map Tools -:summary: Cluster results to declutter map view -:order: 02 - -== {title} - -Reduce visual clutter on the map when working with large data sets -of geographic data by *Clustering* results. - -Select *Cluster* on the *Map Tools Widget*. - -.Before Clustering -image::before-cluster.png[before] - -.After Clustering -image::after-cluster.png[after] - - diff --git a/docs/modules/ROOT/pages/configuring-workspaces.adoc b/docs/modules/ROOT/pages/configuring-workspaces.adoc deleted file mode 100644 index ee9bd043cd3..00000000000 --- a/docs/modules/ROOT/pages/configuring-workspaces.adoc +++ /dev/null @@ -1,30 +0,0 @@ -:title: Configuring a Workspace -:type: subUsing -:status: published -:parent: Using Workspaces -:summary: Creating workspaces -:order: 01 - -== {title} - -Configure each workspace with searches and share options. - -.Adding searches -Each workspace can have up to ten searches saved. -. From the default *Workspaces* view, select the workspace to add a search to. -. Click *Search {branding} Intrigue* in the upper left corner, enter search terms, and click *Search* to add a search. This step can be repeated to add additional searches. Each workspace can have up to ten searches. -.. Select *Basic* Search to select simple search criteria, such as *text*, *time*, and *location*. -.. Select *Advanced* Search to access a query builder for more complex queries. -. Click the save (image:save-icon.png[save icon]) icon next to the workspace title in the upper left corner. - -.Workspace Menu Options -* To view a workspace's options from the *Workspaces* view, press the *Options* button (image:options-icon.png[options icon]) for the workspace. -** *Save Workspace*: Save changes to the workspace. -** *Run All Searches*: Start all saved searches within this workspace. -** *Cancel All Searches*: Cancel all running searches. -** *Open Workspace in New Tab*: Opens this workspace in a separate tab. -** *View Sharing*: View and edit settings for sharing this workspace. Users must be signed in to share workspaces or view shared workspaces. -** *View Details*: View the current details for a cloud-based workspace. Users must be signed in to view workspace details. -** *Duplicate Workspace*: Create a copy of this workspace. -** *Subscribe*: Selecting *Subscribe* enables email notifications for search results on this workspace. Selecting *Unsubscribe* disables email notifications for search results on this workspace. -** *Delete Workspace*: Delete (archive) this workspace. diff --git a/docs/modules/ROOT/pages/coordinate-format.adoc b/docs/modules/ROOT/pages/coordinate-format.adoc deleted file mode 100644 index a6c7a456605..00000000000 --- a/docs/modules/ROOT/pages/coordinate-format.adoc +++ /dev/null @@ -1,14 +0,0 @@ -:title: Set Coordinate Format -:type: subUsing -:status: published -:parent: Map Tools -:summary: Set coordinate format -:order: 04 - -== {title} - -Set the format for displaying coordinates from the *Map Layers Widget*. - -. Select *Settings* on the *Map Layers Widget*. -. Select from the available formats on the dropdown menu. - diff --git a/docs/modules/ROOT/pages/create-a-search.adoc b/docs/modules/ROOT/pages/create-a-search.adoc deleted file mode 100644 index 621feebf6ec..00000000000 --- a/docs/modules/ROOT/pages/create-a-search.adoc +++ /dev/null @@ -1,118 +0,0 @@ -:title: Creating a Search -:type: subUsing -:status: published -:parent: Searching {catalog-ui} -:summary: Creating Searches -:order: 00 - -== {title} - -Search queries are grouped together into <<{using-prefix}using_workspaces,Workspaces>>. -These searches can be saved, edited, and duplicated as the basis of further searches. - -.Creating a New Search Within the Current Workspace -. From the main {catalog-ui} screen, select *Search {catalog-ui}*. -.. From the dialog that opens, select the *edit* icon to name the search to reuse or share it. -.. Select the <<{using-prefix}search_types,type>> of search to perform: *Text*, *Basic*, or *Advanced*. -. Results are displayed in the *Search Tab*. -. If too many or too few results are returned, edit the search parameters by selecting the *edit* icon. -. Once the search is correct, select the *Save* icon next to the workspace name in the top bar. - -.Creating a New Search Into a New Workspace -. Select the navigation menu icon. -. Select *Workspaces*. -. Enter search terms into the *Search* box. -. A new workspace, by default called *New Workspace*, is created containing only the new search. -. Rename the workspace, if desired. -. Select the *Save* icon next to the workspace name. - -.Search Types[[_search_types]] -[no-bullet] -* *Text*: Perform a minimal textual search that is treated identically to a Basic search with only <<_text_search_details,Text>> specified. -* *Basic*: [[_basic_search]](((Basic Search Tool)))Define a <<_text_search_details,Text>>, <<_temporal_search_details,Temporal>>, <<_spatial_search_details,Spatial>>, or <<_type_search_details,Type>> Search. -[no-bullet] -** [[_text_search_details]]((*Text Search)) Details*: Searches across all textual data of the targeted data source. Text search capabilities include: -[no-bullet] -*** Search for an exact word, such as `Text = apple` : Returns items containing the word `"apple"` but not `"apples"`. Matching occurs on word boundaries. -*** Search for the existence of items containing multiple words, such as `Text = apple orange` : Returns items containing both "apple" and "orange" words. Words can occur anywhere in an item's metadata. -*** Search using wildcards, such as `Text = foo*` : Returns items containing words like `"food"`, `"fool"`, etc.. -*** Wildcards should only be used for single word searches, not for phrases. -[WARNING] -When searching with wildcards, do not include the punctuation at the beginning or the end of a word. For example, search for `Text = ca*` instead of `Text = -ca*` when searching for words like `"cat"`, `"-cat"`, etc.. and search for `Text = *og` instead of `Text = *og.` when searching for words like `"dog"`, `"dog."`, etc.. -*** Text searches are by default case insensitive, but case sensitive searches are an option. -+ -** [[_temporal_search_details]]((*Temporal Search)) Details*: Search based on absolute time of the created, modified, or effective date. -[no-bullet] -*** *Any*: Search without any time restrictions (default). -*** *After*: Search records after a specified time. -*** *Before*: Search records before a specified time. -*** *Between*: Set an exclusive beginning and an exclusive end time to search between. -*** *Relative*: Search records relative to the current time. -+ -** [[_spatial_search_details]]((*Spatial Search)) Details* -[no-bullet] -*** Search by latitude/longitude (decimal degrees or degrees minutes seconds), USNG/MGRS, or UTM -*** Search by entering a *Keyword* for a region, country, or city in the *Location* section of the query builder. -*** To search using a line, polygon, point-radius, or bounding box, select the shape to draw, then select *Draw*. -+ -.Intersecting Polygon Searchs -[NOTE] -==== -If a self intersecting polygon is used to perform a geographic search, the polygon is converted into a non-intersection one via a convex hull conversion. In the following example, the blue line shows the original self intersecting search polygon and the red line shows the converted polygon that is used for the search. The blue dot shows a search result that was not within the original polygon but was returned because it was within the converted polygon. - -.Self Intersecting Polygon Conversion Example -image::convex-hull-transform-example.png[] -==== -+ -** [[_type_search_details]]*Type Search Details* -[no-bullet] -*** Search for specific content types. -+ -* *Advanced*: ((Advanced Query Builder)) can be used to create more specific searches than can be done through the other methods. -[no-bullet] -** [[_advanced_query_builder]]*Advanced Query Builder Details* -[no-bullet] -*** *Operator*: If 'AND' is used, all the filters in the branch have to be true for this branch to be true. If 'OR' is used, only one of the filters in this branch has to be true for this branch to be true. -*** *Property*: Property to compare against. -*** *Comparison*: How to compare the value for this property against the provided value. Depending on the type of property selected, various comparison values are available. See <<_advanced_query_builder_comparators,Types of Comparators>> -*** *Search Terms*: The value for the property to use during comparison. -*** *Sorting*: Sort results by relevance, distance, created time, modified time or effective time. -*** *Sources*: Perform an enterprise search (the local {ddf-catalog} and all federated sources) or search specific sources. -+ -** [[_advanced_query_builder_comparators]]*Advanced Query Builder Comparators* -[no-bullet] -*** *Textual*: -[no-bullet] -**** *CONTAINS*: Equivalent to <<_text_search_details,Basic Text Search>> with Matchcase set to No. -**** *MATCHCASE*: Equivalent to <<_text_search_details,Basic Text Search>> with Matchcase set to Yes. -**** *`=`*: Matches if an attribute is precisely equal to that search term. -**** *NEAR*: Performs a fuzzy proximity-based textual search. A NEAR query of `"car street" within 3` matches a sample text of `the blue car drove down the street with the red building` because performing three word deletions in that phrase (`drove`, `down`, `the`) causes `car` and `street` to become adjacent. -**** *EMPTY*: Search records when the attribute itself does not exist or when the attribute value is null. -+ -More generally, a NEAR query of `"A B" within N` matches a text document if you can perform at most N insertions/deletions to your document and end up with `A` followed by `B`. -+ -It is worth noting that `"street car" within 3` does not match the above sample text because it is not possible to match the phrase `"street car"` after only three insertions/deletions. `"street car" within 5` does match, though, as you can perform three word deletions to get `"car street"`, one deletion of one of the two words, and one insertion on the other side. -+ -If multiple terms are used in the phrase, then the `within` amount specifies the total number of edits that can be made to attempt to make the full phrase match. `"car down street" within 2` matches the above text because it takes two word deletions (`drove`, `the`) to turn the phrase `car drove down the street` into `car down street`. -+ -*** *Temporal*: -[no-bullet] -**** *BEFORE*: Search records before a specified time. -**** *AFTER*: Search records after a specified time. -**** *RELATIVE* Search records relative to the current time. -**** *EMPTY*: Search records when the attribute itself does not exist or when the attribute value is null. -+ -*** *Spatial*: -[no-bullet] -**** *INTERSECTS*: Gives a component with the same functionality as <<_spatial_search_details,Basic Spatial Search>>. -**** *EMPTY*: Search records when the attribute itself does not exist or when the attribute value is null. -+ -*** *Numeric*: -[no-bullet] -**** *`>`*: Search records with field entries greater than the specified value. -**** *`>=`*: Search records with field entries greater than or equal to the specified value. -**** *`=`*: Search records with field entries equal to the specified value. -**** *`\<=`*: Search records with field entries less than or equal to the specified value. -**** *RANGE*: Search records between the two specified values (inclusive). -**** *`<`*: Search records with field entries less than the specified value. -**** *EMPTY*: Search records when the attribute itself does not exist or when the attribute value is null. diff --git a/docs/modules/ROOT/pages/creating-result-forms.adoc b/docs/modules/ROOT/pages/creating-result-forms.adoc deleted file mode 100644 index a25ca2b7efc..00000000000 --- a/docs/modules/ROOT/pages/creating-result-forms.adoc +++ /dev/null @@ -1,15 +0,0 @@ -:title: Creating Result Forms -:type: subUsing -:status: published -:parent: Using Result Forms -:summary: Creating Result Forms -:order: 00 - -== {title} - -The *Result Form Editor* is found on the *Navigation Menu*. - -. Select *New Result Form*. -. Add, remove, or reorder the fields on the result form. -. Name the new form and select *Save*. -. Optionally, make the new form the *Default Form* from the options menu on the form. diff --git a/docs/modules/ROOT/pages/creating-search-forms.adoc b/docs/modules/ROOT/pages/creating-search-forms.adoc deleted file mode 100644 index 0ca9483983f..00000000000 --- a/docs/modules/ROOT/pages/creating-search-forms.adoc +++ /dev/null @@ -1,15 +0,0 @@ -:title: Creating Search Forms -:type: subUsing -:status: published -:parent: Using Search Forms -:summary: Creating Search Forms -:order: 00 - -== {title} - -The *Search Form Editor* is found on the *Navigation Menu*. - -. Select *New Search Form*. -. Add, remove, or reorder the fields on the search form. -. Name the new form and select *Save*. -. Optionally, make the new form the *Default Form* from the options menu on the form. diff --git a/docs/modules/ROOT/pages/creating-workspaces.adoc b/docs/modules/ROOT/pages/creating-workspaces.adoc deleted file mode 100644 index ba78ca09ada..00000000000 --- a/docs/modules/ROOT/pages/creating-workspaces.adoc +++ /dev/null @@ -1,15 +0,0 @@ -:title: Creating a Workspace -:type: subUsing -:status: published -:parent: Using Workspaces -:summary: Creating workspaces -:order: 00 - -== {title} - -.Start new workspace -. From the *Workspaces* view, enter search terms into the *Start new workspace* search field and click the magnifying glass (image:magnifying-glass.png[magnifying glass icon]) icon. -This creates a new workspace and perform a search based on the entered search terms. - -.Start new workspace -image::start-new-workspace.png[start new workspace icon] diff --git a/docs/modules/ROOT/pages/editing-searches.adoc b/docs/modules/ROOT/pages/editing-searches.adoc deleted file mode 100644 index a09f531c136..00000000000 --- a/docs/modules/ROOT/pages/editing-searches.adoc +++ /dev/null @@ -1,50 +0,0 @@ -:title: Editing Searches -:type: subUsing -:status: published -:parent: Searching {catalog-ui} -:summary: Viewing an editing searches -:order: 01 - -== {title} - -View and edit searches from the *Search* tab. - -The available searches for a workspace can be viewed by clicking on the drop-down on the *Search* tab. - -.Viewing available searches. -image::searches-dropdown.png[searches dropdown] - -.Search Menu Options -At the bottom of each search is a list of options for the search. - -* *Run* ▶: Trigger this search to begin immediately. -* *Edit* ✐: Edit the search criteria. -* *Settings* ⚙: Edit the search settings, such as sorting. -** *Sort*: Set the sorting criteria for this search. -** *Sources*: Limit the sources queried by this search. -** *Result Form*: Choose a format for search results. See <<{using-prefix}using_result_forms,Result Forms>> -* *Notifications* 🔕: Allows setting up search notifications. -* Additional Options -** *Stop*: Stop this search. -** *Delete*: Remove this search. -** *Duplicate*: Create a copy of this search as a starting point. -** *Search Archived*: Execute this search, but specifically for archived results. -** *Search Historical*: Execute this search, but specifically for historical results. -** *View Notes*: View or add annotations to the record. -** *Export Selected*: Select a record, or group of records, and download the metadata or resources for those records. -** *Export Selected (Compressed)*: Export selected records into a zip file. - -.Viewing Search Status -An existing search's status can be viewed by selecting the search in the *Search* tab of a workspace and by clicking the *Status* icon. -The *Status* view for a search displays information about the sources searched. - -.Repeating a Search -Schedule a standing search. - -. Select the *Notifications* icon on the search. -. Select the *Frequency* for the search to repeat. - -[NOTE] -==== -Notifications for the search persist until the user logs out or refreshes the page. -==== diff --git a/docs/modules/ROOT/pages/filtering-workspaces.adoc b/docs/modules/ROOT/pages/filtering-workspaces.adoc deleted file mode 100644 index 925c0be4d13..00000000000 --- a/docs/modules/ROOT/pages/filtering-workspaces.adoc +++ /dev/null @@ -1,13 +0,0 @@ -:title: Filtering Workspaces -:type: subUsing -:status: published -:parent: Using Workspaces -:summary: Filtering workspaces -:order: 03 - -== {title} - -To help find the appropriate workspace, workspaces can be filtered from the main workspace view page. - -* Filter by workspace owner: *Owned by Anyone*, *Owned by Me*, *Not Owned by Me*. -* Filter by *Title*. diff --git a/docs/modules/ROOT/pages/gazeteer.adoc b/docs/modules/ROOT/pages/gazeteer.adoc deleted file mode 100644 index c3dc5f4e56f..00000000000 --- a/docs/modules/ROOT/pages/gazeteer.adoc +++ /dev/null @@ -1,11 +0,0 @@ -:title: Pan to a Location -:type: subUsing -:status: published -:parent: Map Tools -:summary: Find a location -:order: 00 - -== {title} - -Use the *Map Tools Widget* "Pan to Region" box -to search for a geographic location and move the map to that location. diff --git a/docs/modules/ROOT/pages/hiding-results.adoc b/docs/modules/ROOT/pages/hiding-results.adoc deleted file mode 100644 index 3a0d39bf60e..00000000000 --- a/docs/modules/ROOT/pages/hiding-results.adoc +++ /dev/null @@ -1,22 +0,0 @@ -:title: Hiding Results -:type: subUsing -:status: published -:parent: Searching {catalog-ui} -:summary: Using Lists -:order: 03 - -== {title} - -Redundant, irrelevant, or previously reviewed search results can be hidden from future searches. - -. Perform a search. -. Select the result to be hidden from view. -. Select the *Options* menu for the result to hide. -. Select *Hide from Future Searches*. -. When you re-run the search, the selected result is not in the result set. - -=== Viewing and Restoring Hidden Results - -. Select the *Settings* (⚙) menu. -. Select *Hidden*. -. Unhide any or all of the hidden results. diff --git a/docs/modules/ROOT/pages/layer-settings.adoc b/docs/modules/ROOT/pages/layer-settings.adoc deleted file mode 100644 index fd5d2e219a6..00000000000 --- a/docs/modules/ROOT/pages/layer-settings.adoc +++ /dev/null @@ -1,15 +0,0 @@ -:title: Map Layer Settings -:type: subUsing -:status: published -:parent: Map Tools -:summary: Reorder and refine map layers -:order: 03 - -== {title} - -Customize the opacity and ordering of map layers. - -. On the *Map Layers Widget*, select *Layers*. -. Use the arrow icons to reorder map layers. -. Set the opacity of a layer with the slider control. -. Show/hide individual layers. diff --git a/docs/modules/ROOT/pages/lists.adoc b/docs/modules/ROOT/pages/lists.adoc deleted file mode 100644 index 7c6573ac151..00000000000 --- a/docs/modules/ROOT/pages/lists.adoc +++ /dev/null @@ -1,40 +0,0 @@ -:title: Using Lists -:type: subUsing -:status: published -:parent: Searching {catalog-ui} -:summary: Using Lists -:order: 04 - -== {title} - -((Lists)) organize results and enable performing actions on those sets of results. -The *Lists* tab can be found on the *Search* pane. - -The Lists tab defaults to the most recent list viewed. -Select the dropdown to see other lists available. - -. From the List tab, perform any of these actions on lists: -.. *Filter* the result set locally (does not re-execute the search), -.. *Sort* (Customize list sorting). (Default: Title in Ascending Order). -.. Toggle results view between *List* and *Gallery*. - -[NOTE] -==== -Lists are not available to guest users. -==== - -=== Creating a List - -A new list can be created by selecting the *Lists* tab and selecting the *new list* text. - -=== Adding/Removing Results to a List - -Results can be added to a list by selecting the add (*+*) icon on a result. - -image:sample-result-view.png[] - -Results can be added or removed to/from a list through the result's dropdown menu. - -image:sample-dropdown-menu.png[] - -Multiple results can be bulk-added by selecting the check box on all the desired results and selecting the add (*+*) icon. diff --git a/docs/modules/ROOT/pages/low-bandwidth.adoc b/docs/modules/ROOT/pages/low-bandwidth.adoc deleted file mode 100644 index 05391187597..00000000000 --- a/docs/modules/ROOT/pages/low-bandwidth.adoc +++ /dev/null @@ -1,12 +0,0 @@ -:title: {catalog-ui} Low Bandwidth Mode -:type: subUsing -:status: published -:parent: Customizing Options -:summary: Enabling low bandwidth mode -:order: 00 - -== {title} - -Low bandwidth mode can be enabled by passing in a `?lowBandwidth` parameter along with any URL targeting the {catalog-ui} endpoint. -Ex: `{secure_url}/search/catalog/?lowBandwidth#workspaces`. -Currently, enabling this parameter causes the system to prompt the user for confirmation before loading potentially bandwidth-intensive components like the 2D or 3D Maps. diff --git a/docs/modules/ROOT/pages/map-tools.adoc b/docs/modules/ROOT/pages/map-tools.adoc deleted file mode 100644 index 4e740790199..00000000000 --- a/docs/modules/ROOT/pages/map-tools.adoc +++ /dev/null @@ -1,12 +0,0 @@ -:title: Map Tools -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Using the Map Tools widget -:order: 07 - -== {title} - -Further customize the map view with the ((Map Tools Widget)). - -image::map-tools-widget.png[Map Tools Widget] diff --git a/docs/modules/ROOT/pages/notifications.adoc b/docs/modules/ROOT/pages/notifications.adoc deleted file mode 100644 index 2f277367ca1..00000000000 --- a/docs/modules/ROOT/pages/notifications.adoc +++ /dev/null @@ -1,11 +0,0 @@ -:title: Notifications -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Uploading from {catalog-ui} -:order: 08 - -== {title} - -Notifications can be checked/dismissed by clicking the *Notifications* icon (image:notifications-icon.png[]) on the navigation bar. - diff --git a/docs/modules/ROOT/pages/result-forms.adoc b/docs/modules/ROOT/pages/result-forms.adoc deleted file mode 100644 index 496c50cb50c..00000000000 --- a/docs/modules/ROOT/pages/result-forms.adoc +++ /dev/null @@ -1,14 +0,0 @@ -:title: Using Result Forms -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Using result forms in {catalog-ui} -:order: 06 - -== {title} - -((*Result Forms*)) are customizable templates of the attributes shown when viewing searches. -Result forms are reusable, for when certain search types are created repeatedly. - -The Result Form screen has tabs to view Result Forms you created, Result Forms shared with you, -and System Result Forms. diff --git a/docs/modules/ROOT/pages/search-forms.adoc b/docs/modules/ROOT/pages/search-forms.adoc deleted file mode 100644 index b7a58e0a332..00000000000 --- a/docs/modules/ROOT/pages/search-forms.adoc +++ /dev/null @@ -1,14 +0,0 @@ -:title: Using Search Forms -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Using search forms in {catalog-ui} -:order: 05 - -== {title} - -((*Search Forms*)) are customizable templates of the attributes used in creating searches. -Search forms are reusable, for when certain search types are created repeatedly. - -The Search Form screen has tabs to view Search Forms you created, Search Forms shared with you, -and System Search Forms. diff --git a/docs/modules/ROOT/pages/search.adoc b/docs/modules/ROOT/pages/search.adoc deleted file mode 100644 index d259ef15e95..00000000000 --- a/docs/modules/ROOT/pages/search.adoc +++ /dev/null @@ -1,14 +0,0 @@ -:title: Searching {catalog-ui} -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Searching from {catalog-ui}. -:order: 01 - -== {title} - -The Search pane has two tabs, *Search* and *Lists*. - -.Search Pane Tabs -image::search-pane-tabs.png[] - diff --git a/docs/modules/ROOT/pages/set-home.adoc b/docs/modules/ROOT/pages/set-home.adoc deleted file mode 100644 index 6c840e79c75..00000000000 --- a/docs/modules/ROOT/pages/set-home.adoc +++ /dev/null @@ -1,13 +0,0 @@ -:title: Set a home location -:type: subUsing -:status: published -:parent: Map Tools -:summary: Set a home location for the UI. -:order: 01 - -== {title} - -Customize the default location the map loads by setting a home location. - -. On the *Map Tools Widget*, select the Dropdown of the *Home* button. -. Select *Set Home*. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/sharing-result-forms.adoc b/docs/modules/ROOT/pages/sharing-result-forms.adoc deleted file mode 100644 index 6ff1d9ee844..00000000000 --- a/docs/modules/ROOT/pages/sharing-result-forms.adoc +++ /dev/null @@ -1,16 +0,0 @@ -:title: Sharing Result Forms -:type: subUsing -:status: published -:parent: Using Result Forms -:summary: Sharing result forms -:order: 01 - -== {title} - -Result forms are shareable between users, groups, and user roles. - -. Select the options menu on the Result Form to be shared. -. Select the appropriate access levels for the desired user category. -. Select *Add User* to share with a specific user or group of users. -. Select *Apply* to save changes. - diff --git a/docs/modules/ROOT/pages/sharing-search-forms.adoc b/docs/modules/ROOT/pages/sharing-search-forms.adoc deleted file mode 100644 index ee6a76e0953..00000000000 --- a/docs/modules/ROOT/pages/sharing-search-forms.adoc +++ /dev/null @@ -1,16 +0,0 @@ -:title: Sharing Search Forms -:type: subUsing -:status: published -:parent: Using Search Forms -:summary: Creating Searches -:order: 01 - -== {title} - -Search forms are shareable between users, groups, and user roles. - -. Select the options menu on the Search Form to be shared. -. Select the appropriate access levels for the desired user category. -. Select *Add User* to share with a specific user or group of users. -. Select *Apply* to save changes. - diff --git a/docs/modules/ROOT/pages/sharing-workspaces.adoc b/docs/modules/ROOT/pages/sharing-workspaces.adoc deleted file mode 100644 index 16cbc3caf27..00000000000 --- a/docs/modules/ROOT/pages/sharing-workspaces.adoc +++ /dev/null @@ -1,24 +0,0 @@ -:title: Sharing Workspaces -:type: subUsing -:status: published -:parent: Using Workspaces -:summary: Sharing workspaces -:order: 02 - -== {title} - -Workspaces can be shared between users at different levels of access as needed. - -.Share a Workspace -. From the *Workspaces* view, select the *Options* menu (image:options-icon.png[options icon]) for the workspace in which sharing is modified. -. Select *View Sharing*. -.. To share by user role, set the drop-down menu to *Read Only* or *Read and Write* for each desired role. All users with that role are able to view the workspace, but are limited based on the permission assigned. No user is granted the ability to share the workspace with additional users. -.. To share with an individual user, add his/her email to the email list and set the drop-down menu to *Read Only*, *Read and Write*, or *Read, Write, and Share*. -. Click *Apply*. - -.Remove Sharing on a Workspace -. From the *Workspaces* view, select the *Options* menu (image:options-icon.png[options icon]) for the workspace in which sharing is modified. -. Select *View Sharing*. -.. To remove the workspace from users with specific roles, set the drop-down menu to *No Access* for those roles. -.. To remove an individual user, remove the user's email address from the email list. -. Click *Apply*. diff --git a/docs/modules/ROOT/pages/sources-ui.adoc b/docs/modules/ROOT/pages/sources-ui.adoc deleted file mode 100644 index a50c6003bc5..00000000000 --- a/docs/modules/ROOT/pages/sources-ui.adoc +++ /dev/null @@ -1,19 +0,0 @@ -:title: Sources View -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Uploading from {catalog-ui} -:order: 04 - -== {title} - -(((Sources View))) -{branding} can be configured to search multiple data sources simultaneously, -or searches can be limited to specific sources as needed. - -To view the status of all configured sources, select *Sources* from the Navigation Menu. - -To limit the sources used for a Basic search, select the appropriate sources from the *Sources* menu while creating/editing the search. - -.Select Sources -image::sources-dropdown.png[Sources Dropdown] diff --git a/docs/modules/ROOT/pages/ui-settings.adoc b/docs/modules/ROOT/pages/ui-settings.adoc deleted file mode 100644 index ce25098a188..00000000000 --- a/docs/modules/ROOT/pages/ui-settings.adoc +++ /dev/null @@ -1,20 +0,0 @@ -:title: Customizing Options -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Configuring User preferences and settings -:order: 09 - -== {title} - -Customize the look and feel of {catalog-ui} using the *Settings* (image:gear-icon.png[settings]) menu on the navigation bar. - -.Settings Menu Options -image::ui-settings-options.png[] - -* *Theme*: Visual options for page layout. -* *Notifications*: Select if notifications persist across sessions. -* *Map*: Select options for map layers. -* *Query*: Customize the number of search results returned. -* *Time*: Set the time format (ISO-8601, 24 Hour or 12 Hour), as well as the timezone (UTC-12:00 through UTC+12:00). -* *Hidden*: View or edit a list of results that have been hidden from the current search results. diff --git a/docs/modules/ROOT/pages/ui-uploading.adoc b/docs/modules/ROOT/pages/ui-uploading.adoc deleted file mode 100644 index 5721a9f9096..00000000000 --- a/docs/modules/ROOT/pages/ui-uploading.adoc +++ /dev/null @@ -1,32 +0,0 @@ -:title: Uploading -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Uploading from {catalog-ui} -:order: 03 - -== {title} - -Data can be ingested via {catalog-ui}. - -[WARNING] -==== -The {catalog-ui} uploader is intended for the upload of resources (such as images or documents), not metadata files (such as Metacard XML). -A user is not able to specify which input transformer is used to ingest the document. -==== - -. Select the Menu icon (image:navigator-icon.png[]) in the upper left corner. -. Select *Upload*. -. Drag and drop files or click to open a navigation window. -. After selecting the files to be uploaded, select *Start* to begin uploading. - -Files are processed individually with a visual status indication of each upload. -If there are any failures, the user is notified with a message on that specific resource. -More information about the uploads can be found in the ingest log. -The default location of the log is `{home_directory}/data/log/ingest_error.log`. - -[NOTE] -==== -Uploaded resources may be marked with Validation Warnings or Errors. -Additional configuration may be needed to view these resources in searches. -==== diff --git a/docs/modules/ROOT/pages/using-intrigue-intro.adoc b/docs/modules/ROOT/pages/using-intrigue-intro.adoc deleted file mode 100644 index a4c98543f69..00000000000 --- a/docs/modules/ROOT/pages/using-intrigue-intro.adoc +++ /dev/null @@ -1,37 +0,0 @@ -:title: Using {catalog-ui} -:type: usingIntro -:status: published -:summary: Introduction to using Intrigue. - -== {title} - -{catalog-ui} represents the most advanced search interface available with {branding}. -It provides metadata search and discovery, resource retrieval, and workspace management with a 3D or optional 2D map visualization. - -.Contextual Help Feature -[NOTE] -==== -For more detail on any feature or button within {catalog-ui}, click the `?` icon in the upper right of the screen; then, hover over any item on the screen and a contextual tooltip is displayed to define its purpose. -To exit this mode, click the `?` again or press `escape`. -==== - -.Glossary of Terms -==== -<<{using-prefix}advanced_query_builder,((Advanced Query Builder))>>:: Search tool for building complex queries beyond basic searches. -<<{using-prefix}associations,((Associations))>>:: User-defined relationships between different data resources. -<<{using-prefix}using_the_attribute_editor,((Attribute Editor))>>:: Tool used to edit metadata attributes on uploads. -<<{using-prefix}basic_search,((Basic Search Tool))>>:: Search tool for building simple searches. -<<{using-prefix}inspector,((Inspector))>>:: Tool for viewing and editing metadata attributes. -<<{using-prefix}using_lists,((Lists))>>:: User-defined collections of related results or products. -<<{using-prefix}map_tools,((Map Tools Widget))>>:: Tool for customizing or navigating the map view. -<<{using-prefix}viewing_metadata_quality,((Metadata Quality))>>:: A measure of the completeness or correctness of the metadata of a resource. -<<{using-prefix}using_result_forms,((Result Forms))>>:: Customizable templates of the attributes shown when viewing searches. -<<{using-prefix}using_search_forms,((Search Forms))>>:: Customizable templates of the attributes used in creating searches. -<<{using-prefix}sources_view,((Sources View))>>:: View the health and status of all configured data sources -<<{using-prefix}temporal_search_details,((Temporal Search))>>:: Basic search using time-based search terms. -<<{using-prefix}spatial_search_details,((Spatial Search))>>:: Basic search using location-based search terms. -<<{using-prefix}text_search_details,((Text Search))>>:: Basic search using the text of documents and/or metadata. -<<{using-prefix}adding_visuals,((Visuals))>>:: Tools to view search results or the information about them. -<<{using-prefix}using_workspaces,((Workspaces))>>:: User-defined collections of searches and search settings. -==== - diff --git a/docs/modules/ROOT/pages/viewing-results.adoc b/docs/modules/ROOT/pages/viewing-results.adoc deleted file mode 100644 index 90d1e2bc4c9..00000000000 --- a/docs/modules/ROOT/pages/viewing-results.adoc +++ /dev/null @@ -1,165 +0,0 @@ -:title: Viewing Search Results -:type: subUsing -:status: published -:parent: Searching {catalog-ui} -:summary: Viewing search results -:order: 02 - -== {title} - -The *Search* tab displays a list of all of the search results for the selected search. - -Returned search results can be refined further, bookmarked, and/or downloaded from the *Search* tab. -Result sets are color-coded by source as a visual aid. -There is no semantic meaning to the colors assigned. - -.Search Results Options -image::search-results-options.png[search results options] - -. On the *Search* tab, select a search from the drop-down list. -. Perform any of these actions on the results list of the selected search: -.. *Filter* the result set locally. This does not re-execute the search. -.. *Sort* (Customize results sorting). The default sort is by title in ascending order. -.. Toggle results view between *List* and *Gallery*(displays a thumbnail, if applicable). - -=== Search Result Options - -.Options for each individual search result -* *Download*: Downloads the result's associated resource directly to the local machine. This option is only available for results that have resources. -* *Add to List* +: Adds/removes the results to/from a list. -* [[_hiding_a_result]]*Hide from Future Searches*: Adds to a list of results that is hidden from future searches. -* *Expand Metacard View*: Navigates to a view that only focuses on this particular result. -* *Export As*: Export the metadata, associated resource, or both. - -=== Adding Visuals - -((*Visuals*)) allow different views of search results. - -. Click the *Add Visual* (image:add-visual-icon.png[add visual icon]) icon in the bottom right corner of {catalog-ui}. -. Select a visual to add. -.. *2D Map*: A 2 dimensional map view. -.. *3D Map*: A 3 dimensional map view. -.. *Histogram*: A configurable histogram view for the results of a search. -.. *Table*: A configurable table view for the results of a search. -.. ((*Inspector*)): [[_inspector]]In depth details and actions for the results of a search. - -.Inspector View Available Options -* *Summary*: A customizable subset of the attributes of the result. -** *Filter*: Search for specific attributes. -** *Actions*: *Add*, *Remove*, *Show*, or *Rearrange* the visible attributes for this result. -* *Details*: A detailed view of all attributes available for the result. -* <<_viewing_revision_history,History>>: View revision history of this record. -* <<_editing_associations_on_a_record,Associations>>: View or edit the relationships between this record and others in the catalog. -* <<_viewing_metadata_quality,Quality>>: View the completeness and accuracy of the metadata for this record. -* <<_exporting_a_result,Actions>>: Export the metadata/resource to a specific format. -* <<_archiving_a_result,Archive>>: Remove the selected result from standard search results. -* <<_overwriting_a_resource,Overwrite>>: Overwrite a resource. - -==== Editing Records - -Results can be edited from the *Summary* or *Details* tabs in the *Inspector* visual. - -==== Viewing Text Previews - -If a preview for a result is available, an extra tab appears in the *Inspector* visual that allows you to see a preview of the resource. - -Getting a preview using the metadata can be enabled through *{admin-console} -> Catalog -> Configuration -> Catalog Preview -> Preview From Metadata* - -==== Editing Associations on a Record - -Update relationships between records through [[_associations]]((*Associations*)). - -. Select the desired result from the *Search* tab. -. Select the *Inspector* visual. -. Select the *Associations* tab. -. Select *Edit*. -. For a new association, select *Add Association*. Only items in the current result set can be added as associations. -.. Select the related result from either the *Parent* or *Child* drop-down. -.. Select the type of relationship from the *Relationship* drop-down. -.. Select *Save*. -. To edit an existing association, update the selections from the appropriate drop-downs and select *Save*. - -View a graphical representation of the associations by selecting *Graph* icon from the *Associations* menu. - -.Associations menu. -image::associations-menu-icon.png[associations menu] - -==== Viewing Revision History - -View the complete revision history of a record. - -. Select the desired result from the *Search* tab. -. Select the *Inspector* visual. -. Select the *History* tab. -.. Select a previous version from the list. -.. Select *Revert to Selected Version* to undo changes made after that revision. - -==== Viewing Metadata Quality - -(((Metadata Quality))) -View and fix issues with metadata quality in a record. - -[NOTE] -==== -Correcting metadata issues may require administrative permissions. -==== - -. Select the desired result from the *Search* tab. -. Select the *Inspector* visual. -. Select the *Quality* tab. -. A report is displayed showing any issues: -.. Metacard Validation Issues. -.. Attribute Validation Issues. - -==== Exporting a Result - -Export a result's metadata and/or resource. - -. Select the desired result from the *Search* tab. -. Select the *Inspector* visual. -. Select *Actions* tab. -. Select the desired export format. -. Export opens in a new browser tab. Save, if desired. - -==== Archiving a Result - -To remove a result from the active search results, archive it. - -. Select the desired result from the *Search* tab. -. Select the *Inspector* visual. -. Select the *Archive* tab. -. Select *Archive items*. -. Select *Archive*. - -==== Restoring Archived Results - -Restore an archived result to return it to the active search results. - -. Select the *Search Archived* option from the *Search Results Options* menu. -. Select the desired result from the *Search* tab. -. Select the *Inspector* visual. -. Select the *Archive* tab. -. Select *Restore items*. -. Select *Restore*. - -Restore hidden results to the active search results. - -. Select the *Settings* (image:gear-icon.png[settings]) icon on navigation bar. -. Select *Hidden*. -. Click on the eye (image:eye-icon.png[]) icon next to each result to be unhidden. -.. Or select *Unhide All* to clear the list. - -image::unhide-blacklist.png[unhide blacklist] - -See <<{using-prefix}hiding_a_result,Hiding a result>>. - -==== Overwriting a Resource - -Replace a resource. - -. Select the desired result from the *Search* tab. -. Select the *Inspector* visual. -. Select the *Overwrite* tab. -. Select *Overwrite content*. -. Select *Overwrite* -. Navigate to the new content via the navigation window. diff --git a/docs/modules/ROOT/pages/workspaces.adoc b/docs/modules/ROOT/pages/workspaces.adoc deleted file mode 100644 index cb63855aaa3..00000000000 --- a/docs/modules/ROOT/pages/workspaces.adoc +++ /dev/null @@ -1,11 +0,0 @@ -:title: Using Workspaces -:type: using -:status: published -:parent: Using {catalog-ui} -:summary: Using workspaces within {catalog-ui} -:order: 02 - -== {title} - -Within {catalog-ui}, ((Workspaces)) are collections of settings, searches, and lists that can be shared between users and stored for repeated access. - diff --git a/docs/modules/configuring/nav.adoc b/docs/modules/configuring/nav.adoc deleted file mode 100644 index fd3af6f02ba..00000000000 --- a/docs/modules/configuring/nav.adoc +++ /dev/null @@ -1,9 +0,0 @@ - -.xref:configuring-intrigue.adoc[Configuring Intrigue] -* xref:default-layout-intrigue.adoc[Set Default Layout] -* xref:map-layers-intrigue.adoc[Configuring Map Layers] -* xref:map-configuration-intrigue.adoc[Map Configuration] -* xref:uploading-and-editing.adoc[Configuring User Access] -* xref:upload-editor-intrigue.adoc[Configuring the Upload Editor] -* xref:search-options.adoc[Configuring Search Options] -* xref:query-feedback.adoc[Configuring Query Feedback] diff --git a/docs/modules/configuring/pages/configuring-intrigue.adoc b/docs/modules/configuring/pages/configuring-intrigue.adoc deleted file mode 100644 index b4b3ba300a6..00000000000 --- a/docs/modules/configuring/pages/configuring-intrigue.adoc +++ /dev/null @@ -1,9 +0,0 @@ -:title: Configuring {catalog-ui} -:type: configuration -:status: published -:parent: Configuring User Interfaces -:order: 00 - -== {title} - -Start here to configure {catalog-ui}. diff --git a/docs/modules/configuring/pages/default-layout-intrigue.adoc b/docs/modules/configuring/pages/default-layout-intrigue.adoc deleted file mode 100644 index ec302318069..00000000000 --- a/docs/modules/configuring/pages/default-layout-intrigue.adoc +++ /dev/null @@ -1,74 +0,0 @@ -:title: Configuring Default Layout for {catalog-ui} -:type: subConfiguration -:status: published -:parent: Configuring {catalog-ui} -:order: 00 -:summary: Configuring default layout for {catalog-ui} using Default Layout UI. - -== {title} - -{catalog-ui} includes several options for users to display search results. -By default, users start with a *3D map* and an *Inspector* to view details of results or groups of results. -Add or remove additional *visualizations* to the default view through the *Default Layout UI*. -Users can customize their individual views as well. - -.Available Visualizations -3D Map _(Default)_:: Display a fully interactive three-dimensional globe. -2D Map:: Display a less resource-intensive two-dimensional map. -Inspector _(Default)_:: Display a view of detailed information about a search result. -Histogram:: Compare attributes of items in a search result set as a histogram. -Table:: Compare attributes of items in a search result set as a table. - -.Configuring Enabled Visualizations -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Default Layout* tab. -. *Add* or *Remove* visualizations as desired. -.. To add a visualization, select the *Add* icon. -.. To remove a visualization, select the *Delete* icon on the tab for that visualization. -. Select *Save* to complete. - -.Configuring Possible Visualizations -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Configuration* tab. -. Select `org.codice.ddf.catalog.ui` -. *Edit* "Visualizations" JSON as desired. - -+ -Example JSON: -+ -[source,json] ----- -[ - { - "name": "openlayers", - "title": "2D Map", - "icon": "map" - }, - { - "name": "cesium", - "title": "3D Map", - "icon": "globe" - }, - { - "name": "inspector", - "title": "Inspector", - "icon": "info" - }, - { - "name": "histogram", - "title": "Histogram", - "icon": "bar-chart" - }, - { - "name": "table", - "title": "Table", - "icon": "table" - } -] - ----- - - -. Select *Save* to complete. diff --git a/docs/modules/configuring/pages/map-configuration-intrigue.adoc b/docs/modules/configuring/pages/map-configuration-intrigue.adoc deleted file mode 100644 index 295ba1b3470..00000000000 --- a/docs/modules/configuring/pages/map-configuration-intrigue.adoc +++ /dev/null @@ -1,41 +0,0 @@ -:title: Map Configuration for {catalog-ui} -:type: subConfiguration -:status: published -:parent: Configuring {catalog-ui} -:order: 01 -:summary: Map Configuration for {catalog-ui} - -== {title} - -Customize the look of the map displayed to users in {catalog-ui} through the *Catalog UI Search*. -Equivalent addition and deletion of a map layer can be found in <<{managing-prefix}configuring_map_layers_for_intrigue,Configuring Map Layers for {catalog-ui}>>. - -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Configuration* tab. -. Select the *Catalog UI Search* configuration. - -.Edit a Map Layer (Imagery Provider) -. Enter the properties of the map layer into the *Imagery Provider* in the proper syntax. -.. Example Imagery Provider Syntax: `{"type": "OSM", "url" "http://a.tile.openstreetmaps.org" "layers" ["layer1" "layer2"] "parameters" {"FORMAT" "image/png" "VERSION" "1.1.1"} "alpha" 0.5}`. -... "type": format of imagery provider. -... "url": location of server hosting the imagery provider. -... "layers": names of individual layers. (enclose list in square brackets `[ ]`). -... "parameters": (enclose in braces `{}`) -.... "FORMAT": image type used by imagery provider. -.... "VERSION": version of imagery provider to use. -.... "alpha": opacity of imagery provider layer. - -.Delete a Map Layer (Imagery Provider) -. Delete the properties in *Imagery Provider* text box. - -.Edit a Terrain Provider -. Enter the properties into the *Terrain Provider* in the proper syntax. -.. A default Terrain Provider is provided: `{ "type": "CT", "url": "http://assets.agi.com/stk-terrain/tilesets/world/tiles" }`. -... "type": format of terrain provider. -... "url": location of server hosting the terrain provider. - -.Edit Gazetteer Configuration -. Check/Uncheck *Show Gazetteer* to control searching place names functionality. -. Check/Uncheck *Use Online Gazetteer* to control {catalog-ui} search gazetteer. -.. Unchecked: use local gazetteer service. diff --git a/docs/modules/configuring/pages/map-layers-intrigue.adoc b/docs/modules/configuring/pages/map-layers-intrigue.adoc deleted file mode 100644 index 49af25f2733..00000000000 --- a/docs/modules/configuring/pages/map-layers-intrigue.adoc +++ /dev/null @@ -1,44 +0,0 @@ -:title: Configuring Map Layers for {catalog-ui} -:type: subConfiguration -:status: published -:parent: Configuring {catalog-ui} -:order: 00 -:summary: Configuring Map Layers for {catalog-ui} - -== {title} - -Customize the look of the map displayed to users in {catalog-ui} by adding or removing map layers through the *Map Layers UI*. -Equivalent addition and deletion of a map layer can be found in <<{managing-prefix}map_configuration_for_intrigue,Map Configuration for {catalog-ui}>>. - -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Map Layers* tab. -. *Add*, *Configure* or *Remove* map layers as desired. - -.Adding a Map Layer (Imagery Provider) -Adding a Map Layer translates to adding an Imagery Provider - -. Enter a unique alphanumeric *Name* (no special characters). -. Enter the *Provider URL* for the server hosting the map layer instance. -. Select *Proxy* _if_ security policies _or_ the tile server does not allow Cross-Origin Resource Sharing (CORS). -. Select *Allow Credential Forwarding* if map layer server prompts for credentials. -.. _If selected, requests fail if the server does not prompt for credentials._ -. Select from the list of available *Provider Types*. -. Select a value for the *Alpha* to set the overall opacity of the _map layer_. -.. Setting *Alpha* to 0 prevents the layer from loading. -. Select *Show* to make the layer visible in {catalog-ui}. (Deselect to hide.) -. Select *Transparent* if _tile_ images contain transparency. - -.Deleting a Map Layer -. Delete an unneeded map layer with the *Delete Layer*(image:trash.png[trash icon]) icon associated with that layer. - -To remove all map layers, select *RESET*. - -.Reordering Map Layers -. Move layers *Up* and *Down* in loading order with the *Arrow Icons* associated with each layer. - -.Map Layer Advanced Configuration -Select *Advanced Configuration* to edit the JSON-formatted configuration directly. -See <<{reference-prefix}org.codice.ddf.catalog.ui,Catalog UI Search Configurations>> for examples of map layer configurations. - -External links to the specific API documentation of the map layer is also available from the *Advanced Configuration* menu. diff --git a/docs/modules/configuring/pages/nav.adoc b/docs/modules/configuring/pages/nav.adoc deleted file mode 100644 index 9fe493afd95..00000000000 --- a/docs/modules/configuring/pages/nav.adoc +++ /dev/null @@ -1,9 +0,0 @@ - -.xref:configuring-intrigue.adoc[Configuring Intrigue] -* xref:default-layout-intrigue.adoc[Default Layout] -* xref:map-layers-intrigue.adoc[Map Layers] -* xref:map-configuration-intrigue.adoc[Map Configuration] -* xref:uploading-and-editing.adoc[Configuring User Access] -* xref:upload-editor-intrigue.adoc[Upload Editor] -* xref:search-options.adoc[Configuring Search Options] -* xref:query-feedback.adoc[Query Feedback] diff --git a/docs/modules/configuring/pages/query-feedback.adoc b/docs/modules/configuring/pages/query-feedback.adoc deleted file mode 100644 index 3585827d339..00000000000 --- a/docs/modules/configuring/pages/query-feedback.adoc +++ /dev/null @@ -1,70 +0,0 @@ -:title: Configuring Query Feedback for {catalog-ui} -:type: subConfiguration -:status: published -:parent: Configuring {catalog-ui} -:order: 04 -:summary: Configuring Query Feedback for {catalog-ui}. - -== {title} - -{catalog-ui} provides an option to allow users to submit Query Feedback. - -.Configuring Query Feedback -. First, configure the *Email Service* to point to a mail server. See <<{reference-prefix}org.codice.ddf.platform.email.impl.SmtpClientImpl,Email Service Configurations>>. -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Configuration* tab. -. Select *Catalog UI Search*. -. Select the *Enable Query Feedback* option to enable the query comments option for users in {catalog-ui}. -. Add a *Query Feedback Email Subject Template*. -. Add a *Query Feedback Email Body Template*. The template may include HTML formatting. -. Add the *Query Feedback Email Destination*. -. Select the *Save* button. - -.Query Feedback Template Replacements - -The following keywords in the templates are replaced with submission-specific values, or "Unknown" if unknown. - -[cols="1m,1"] -|=== -|Template keyword |Replacement value - -|`{{auth_username}}` -|Username of the security subsystem (see <<{developing-prefix}security_framework,Security Framework>>) - -|`{{username}}` -|Username of the user who submitted the Query Feedback - -|`{{email}}` -|Email of the user who submitted the Query Feedback - -|`{{workspace_id}}` -|Workspace ID of the query - -|`{{workspace_name}}` -|Workspace Name of the query - -|`{{query}}` -|Query - -|`{{query_initiated_time}}` -|Time of the query - -|`{{query_status}}` -|Status of the query - -|`{{query_results}}` -|Results of the query - -|`{{comments}}` -|Comments provided by the user about the query -|=== - -.Submitting Query Feedback from Intrigue -. Perform a search on any workspace. -. Select the 3 dots on the results tab. -. Choose the *Submit Feedback* option. -. Add comments in the input box. -. Select the *Send* button. - -See <<{reference-prefix}org.codice.ddf.catalog.ui,Catalog UI Search Configurations>> for default Query Feedback configurations. diff --git a/docs/modules/configuring/pages/search-options.adoc b/docs/modules/configuring/pages/search-options.adoc deleted file mode 100644 index 4c40c46b426..00000000000 --- a/docs/modules/configuring/pages/search-options.adoc +++ /dev/null @@ -1,22 +0,0 @@ -:title: Configuring Search Options for {catalog-ui} -:type: subConfiguration -:status: published -:parent: Configuring {catalog-ui} -:order: 03 -:summary: Configuring local, historical, and archived Search Options for {catalog-ui}. - -== {title} - -{catalog-ui} provides a few options to control what metacards may be searched. -By default, the user can perform searches that produce historical metacards, archived metacards, -and metacards from the local catalog. However, administrators can disable searching -for any of these types of metacards. - -.Configuring Search Options -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Configuration* tab. -. Select Catalog UI Search. -. Scroll down to the "Disable Local Catalog" option with the other options below it. -. To disable searching for a metacard type, check the corresponding box. -. Select *Save* to complete. diff --git a/docs/modules/configuring/pages/upload-editor-intrigue.adoc b/docs/modules/configuring/pages/upload-editor-intrigue.adoc deleted file mode 100644 index 4bb658e158d..00000000000 --- a/docs/modules/configuring/pages/upload-editor-intrigue.adoc +++ /dev/null @@ -1,30 +0,0 @@ -:title: Configuring the {catalog-ui} Upload Editor -:type: subConfiguration -:status: published -:parent: Configuring {catalog-ui} -:order: 021 -:summary: Configuring user ability to edit metadata of uploads in {catalog-ui}. - -== {title} - -The upload editor in {catalog-ui} allows users to specify attribute overrides which should be -applied on ingest. Administrators control the list of attributes that users may edit and can -mark certain attributes as required. They may also disable the editor if desired. - -.Configure attribute list -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Configuration* tab. -. Select *Catalog UI Search*. -. Use the "Upload Editor: Attribute Configuration" field to configure the attributes shown in the -editor. -. Use the "Upload Editor: Required Attributes" field to mark attributes as required. -. Select *Save* to complete. - -See <<{reference-prefix}org.codice.ddf.catalog.ui,{catalog-ui} Configurations>> for more information -regarding these configurations. - - -.Disabling -The editor only appears if it has attributes to show. If the upload editing capability is not -desired, removing all entries from the attribute configuration hides the editor. diff --git a/docs/modules/configuring/pages/uploading-and-editing.adoc b/docs/modules/configuring/pages/uploading-and-editing.adoc deleted file mode 100644 index 6134c22a94e..00000000000 --- a/docs/modules/configuring/pages/uploading-and-editing.adoc +++ /dev/null @@ -1,24 +0,0 @@ -:title: Configuring User Access to Ingest for {catalog-ui} -:type: subConfiguration -:status: published -:parent: Configuring {catalog-ui} -:order: 02 -:summary: Configuring user ability to upload resources - -== {title} - -{catalog-ui} lets the administrator control user access to ingest data -The administrator can show or hide the uploader, letting them control whether users can ingest resources. -By default, the uploader is available to users. - -.Configuring The Uploader -Choose to hide or show the uploader. -Note that hiding the uploader removes the users' ability to ingest. - -. Navigate to the *{admin-console}*. -. Select the *{ddf-ui}* application. -. Select the *Configuration* tab. -. Select *Catalog UI Search*. -. Select *Show Uploader*. -. Select *Save* to complete. - diff --git a/docs/modules/data-management/nav.adoc b/docs/modules/data-management/nav.adoc deleted file mode 100644 index e3502dd299c..00000000000 --- a/docs/modules/data-management/nav.adoc +++ /dev/null @@ -1,4 +0,0 @@ - -.Data Management -* xref:viewing-invalid.adoc[Viewing Invalid Metadata] -* xref:editing-attributes.adoc[Manually Editing Attributes] diff --git a/docs/modules/data-management/pages/editing-attributes.adoc b/docs/modules/data-management/pages/editing-attributes.adoc deleted file mode 100644 index e521ab973d4..00000000000 --- a/docs/modules/data-management/pages/editing-attributes.adoc +++ /dev/null @@ -1,27 +0,0 @@ -:title: Manually Editing Attributes -:type: dataManagement -:status: published -:parent: Validating Data -:order: 03 -:summary: Manually editing attributes. - -== {title} - -For small numbers of metacards, or for metacards ingested without overrides, attributes can be edited directly. - - -[WARNING] -==== -Metacards retrieved from connected sources or from a -fanout proxy appears to be editable but are not truly local -so changes are not be saved. -==== - -. Navigate to *{catalog-ui}*. -. Search for the metacards to be updated. -. Select the metacards to be updated from the results list. -. Select *Summary* or *Details*. -. Select *Actions* from the *Details* view. -. Select *Add*. -. Select attribute from the list of available attributes. -. Add any values desired for the attribute. diff --git a/docs/modules/data-management/pages/viewing-invalid.adoc b/docs/modules/data-management/pages/viewing-invalid.adoc deleted file mode 100644 index 8dc711cf8d2..00000000000 --- a/docs/modules/data-management/pages/viewing-invalid.adoc +++ /dev/null @@ -1,17 +0,0 @@ -:title: Viewing Invalid Metacards -:type: dataManagement -:status: published -:parent: Validating Data -:order: 02 -:summary: Viewing metacards with errors and warnings. - -== {title} - -To view invalid metacards, query for them through {catalog-ui}. -Viewing requires {branding}-administrator privileges, if <<{managing-prefix}hiding_errors_or_warnings_from_queries, Catalog Federation Strategy>> is configured to filter invalid metacards. - -. Navigate to *{catalog-ui}* (\{secure_url}/search). -. Select *Advanced Search*. -. Change the search property to *metacard-tags*. -. Change the value of the property to *invalid*. -. Select *Search*. diff --git a/docs/modules/quick-start/nav.adoc b/docs/modules/quick-start/nav.adoc deleted file mode 100644 index c60b1dad811..00000000000 --- a/docs/modules/quick-start/nav.adoc +++ /dev/null @@ -1,3 +0,0 @@ - -.Quick Start -* xref:quickstart-ingesting.adoc[Quickstart Ingesting] diff --git a/docs/modules/quick-start/pages/quickstart-ingesting.adoc b/docs/modules/quick-start/pages/quickstart-ingesting.adoc deleted file mode 100644 index 17f45a86fdb..00000000000 --- a/docs/modules/quick-start/pages/quickstart-ingesting.adoc +++ /dev/null @@ -1,39 +0,0 @@ -:title: Ingesting (Quick Start) -:type: quickStart -:level: section -:parent: Quick Start Tutorial -:section: quickStart -:status: published -:summary: Ingest sample data. -:order: 03 - -== Ingesting (Quick Start) - -Now that {branding} has been configured, ingest some sample data to demonstrate search capabilities. - -This is one way to ingest into the catalog, for a complete list of the different methods, see <<{managing-prefix}ingesting_data,Ingesting Data>>. - -=== Ingesting Sample Data - -. Download a sample valid https://codice.atlassian.net/wiki/download/attachments/1179756/geojson_valid.json?version=1&modificationDate=1368249436010&api=v2[GeoJson file here] {external-link}. -. Navigate in the browser to {catalog-ui} at \{secure_url}/search/catalog. -. Select the Menu icon (image:navigator-icon.png[navigator icon]) in the upper left corner -. Select *Upload*. -. Drag and drop the sample file or click to navigate to it. -. Select *Start* to begin upload. - -[NOTE] -==== -XML metadata for text searching is not automatically generated from GeoJson fields. -==== - -Querying from {catalog-ui} (\{secure_url}/search/catalog) returns the record for the file ingested: - -. Select the Menu icon (image:navigator-icon.png[navigator icon])and return to *Workspaces*. -. Search for the ingested data. - -[NOTE] -==== -The sample data was selected as an example of well-formed metadata. -Other data can and should be used to test other usage scenarios. -==== diff --git a/docs/modules/reference/nav.adoc b/docs/modules/reference/nav.adoc deleted file mode 100644 index 1f6b1215456..00000000000 --- a/docs/modules/reference/nav.adoc +++ /dev/null @@ -1,4 +0,0 @@ - -.Reference -* xref:map-standards.adoc[Map Formats Supported] -* xref:catalog.ui.adoc[Configuration Reference] diff --git a/docs/modules/reference/pages/catalog.ui.adoc b/docs/modules/reference/pages/catalog.ui.adoc deleted file mode 100644 index 593260f14aa..00000000000 --- a/docs/modules/reference/pages/catalog.ui.adoc +++ /dev/null @@ -1,352 +0,0 @@ -:title: Catalog UI Search -:id: org.codice.ddf.catalog.ui -:type: table -:status: published -:application: ${ddf-ui} -:summary: Catalog UI Search. - -.[[_org.codice.ddf.catalog.ui]]{title} -[cols="1,1m,1,3,1m,1" options="header"] -|=== - -|Name -|Id -|Type -|Description -|Default Value -|Required - -|Result Count -|resultCount -|Integer -|Specifies the number of results to request from each source. -|250 -|true - -|Export Result Limit -|exportResultLimit -|Integer -|Specifies the max number of results that can be exported. -|1000 -|true - -|Imagery Providers -|imageryProviders -|String -a|List of imagery providers to use. - -The valid types are: - -* *OSM* (OpenStreetMap) -* *AGM* (ArcGisMap) -* *BM* (BingMap) -* *WMS* (WebMapService) -* *WMT* (WebMapTile) -* *TMS* (TileMapService) -* *GE* (GoogleEarth) - -*OSM example*: `{"name": "Example OSM", "show": true, "type": "OSM", "url": "http://a.tile.openstreetmap.org", "fileExtension": "png", "order": 0, "alpha": 1, "proxyEnabled": false}` - -*AGM example*: `{"name": "Example AGM", "show": true, "type": "AGM", "url": "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer", "order": 0, "proxyEnabled": false, "alpha": 1}` - -*WMS example*: `{"name": "Example WMS", "show": true, "type": "WMS", "url": "http://suite.opengeo.org/geoserver/gwc/service/wms", "layers" : ["opengeo:countries"], "parameters": {"FORMAT": "image/png", "VERSION": "1.1.1"}, "order": 0, "alpha":1, "proxyEnabled": false}` - -*WMT example*: `{ "parameters": { "transparent": false, "format": "image/jpeg" }, "name": "Example WMT", "tileMatrixLabels": [ "EPSG:4326:0", "EPSG:4326:1", "EPSG:4326:2", "EPSG:4326:3", "EPSG:4326:4", "EPSG:4326:5", "EPSG:4326:6", "EPSG:4326:7", "EPSG:4326:8", "EPSG:4326:9", "EPSG:4326:10", "EPSG:4326:11", "EPSG:4326:12", "EPSG:4326:13", "EPSG:4326:14", "EPSG:4326:15", "EPSG:4326:16", "EPSG:4326:17", "EPSG:4326:18", "EPSG:4326:19", "EPSG:4326:20", "EPSG:4326:21" ], "tileMatrixSetID": "EPSG:4326", "order": 0, "url": "http://suite.opengeo.org/geoserver/gwc/service/wmts", "layer": "opengeo:countries", "style": "", "proxyEnabled": false, "type": "WMT", "show": true, "alpha": 1}` - -*TMS example* (3D map support only): `{ "name": "Example TMS", "show": true, "type": "TMS", "order": 0, "url": "https://cesiumjs.org/tilesets/imagery/blackmarble", "proxyEnabled": false, "alpha": 1}` - -*Multiple layer example*: + -_Topmost Layer_: `{ "name": "Example AGM", "show": true, "type": "AGM", "url": "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer", "order": 0, "proxyEnabled": false, "alpha": 1}` + -_Bottommost Layer_: `{ "name": "Example AGM 2", "show": true, "type": "AGM", "url": "https://server.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer", "order": 1, "proxyEnabled": false, "alpha": 1}` -| -|false - -|Terrain Provider -|terrainProvider -|String -|Terrain provider to use for height data. Valid types are: *CT* (CesiumTerrain), *AGS* (ArcGisImageServer), and *VRW* (VRTheWorld). - -Example: -`{"type": "CT", "url": "http://example.com"}` -|{ "type": "CT"\, "url": "http://assets.agi.com/stk-terrain/tilesets/world/tiles" } -|false - -|Default Layout -|defaultLayout -|String -|The default UI layout and visualization configuration used in the Catalog UI. See http://golden-layout.com/docs/Config.html {external-link} for more information. Example: `[{"type": "stack", "content": [{"type": "component", "component": "cesium", "componentName": "cesium", "title": "3D Map"}, {"type": "component", "component": "inspector", "componentName": "inspector", "title": "Inspector"}]}]`. -|[{"type": "stack", "content": [{"type": "component", "component": "cesium", "componentName": "cesium", "title": "3D Map"}, {"type": "component", "component": "inspector", "componentName": "inspector", "title": "Inspector"}]}] -|true - -|Visualizations -|visualizations -|String -|Visualizations that should be recognized by golden layout. Example `[{"name":"openlayers","title":"2D Map","icon":"map"},{"name":"cesium","title":"3D Map","icon":"globe"},{"name":"inspector","title":"Inspector","icon":"info"},{"name":"histogram","title":"Histogram","icon":"bar-chart"},{"name":"table","title":"Table","icon":"table"}]` -|[{"name":"openlayers","title":"2D Map","icon":"map"},{"name":"cesium","title":"3D Map","icon":"globe"},{"name":"inspector","title":"Inspector","icon":"info"},{"name":"histogram","title":"Histogram","icon":"bar-chart"},{"name":"table","title":"Table","icon":"table"}] -|false - -|Map Projection -|projection -|String -|Projection of imagery providers (for example, `EPSG:3857`, `EPSG:4326`). -|EPSG:4326 -|false - -|Bing Maps Key -|bingKey -|String -|Bing Maps API key. This should only be set if you are using Bing Maps Imagery or Terrain Providers. -| -|false - -|Connection Timeout -|timeout -|Integer -|Specifies the client-side connection timeout in milliseconds. -|300000 -|false - -|Source Poll Interval -|sourcePollInterval -|Integer -|Specifies the interval to poll for sources in milliseconds. -|60000 -|true - -|Show Sign In -|signInEnabled -|Boolean -|Allow Sign In to Search UI and welcome notice. Enable this if the Search UI is protected. -|true -|false - -|Show Tasks -|taskEnabled -|Boolean -|Show task menu area for long running actions. -|false -|false - -|Show Gazetteer -|gazetteerEnabled -|Boolean -|Show gazetteer for searching place names. -|true -|false - -|Use Online Gazetteer -|onlineGazetteerEnabled -|Boolean -|Should the online gazetteer be used? If unchecked, a local gazetteer service is used. This only applies to the search gazetteer in Intrigue. -|true -|false - -|Enable Cache -|cacheEnabled -|Boolean -|Locally cached results are returned in search results. -|true -|true - -|Allow Editing -|editingEnabled -|Boolean -|Allow editing capability to be visible in the UI. -|true -|true - -|Enable Web Sockets -|webSocketsEnabled -|Boolean -|Enables use of Web Sockets -|true -|false - -|Enable Local Catalog -|localCatalogEnabled -|Boolean -|Enables queries to the local catalog. -|true -|true - -|Enable Experimental Features -|experimentalEnabled -|Boolean -|WARNING: Enables experimental features in the UI. This allows users to preview upcoming features. -|false -|true - -|Show Relevance Scores -|relevanceScoresEnabled -|Boolean -|Toggle the display of relevance scores of search results. -|false -|false - -|Relevance Score Precision -|relevancePrecision -|Integer -|Set the number of digits to display in for each relevance score. The default is 5 (for example, 12.345). -|5 -|false - -|Show Logo in Title Bar -|logoEnabled -|Boolean -|Toggles the visibility of the logo in the menu bar. -|false -|false - -|Enable Unknown Error Box -|unknownErrorBoxEnabled -|Boolean -|Enable Unknown Error Box visibility. -|true -|false - -|Enable Metacard Preview -|metacardPreviewEnabled -|Boolean -|Enable Metacard Preview in the Inspector. -|true -|true - -|Enable Spellcheck -|spellcheckEnabled -|Boolean -|Enable spellcheck for searches. -|false -|false - -|Enable Similar Word Matching -|phoneticsEnabled -|Boolean -|Enable phonetic and synonym matching for searches. -|false -|false - -|Basic Search Temporal Selections -|basicSearchTemporalSelectionDefault -|String -|Enable Basic Search Temporal Selections. -a|* `created` -* `effective` -* `modified` -* `metacard.created` -* `metacard.modified` -|true - -|Basic Search Match Type Metacard Attribute -|basicSearchMatchType -|String -|Metacard attribute used for Basic Search Type Match. -|datatype -|true - -|Type Name Mapping -|typeNameMapping -|String -|Mapping of display names to content types in the form name=type. -| -|false - -|Read Only Metacard Attributes -|readOnly -|String -|List of metacard attributes that are read-only. NOTE: the provided values are evaluated as JavaScript regular expressions when matched against metacard attributes. -a|* `^checksum$` -* `^checksum-algorithm$` -* `^id$` -* `^resource-download-url$` -* `^resource-uri$` -* `^resource.derived-uri$` -* `^resource.derived-download-url$` -* `^modified$` -* `^metacard-tags$` -* `^metadata$` -* `^metacard-type$` -* `^source-id$` -* `^point-of-contact$` -* `^metacard.` -* `^version.` -* `^validation.` -|false - -|Summary Metacard Attributes -|summaryShow -|String -|List of metacard attributes to display in the summary view. -a|* `created` -* `modified` -* `thumbnail` -|false - -|Result Preview Metacard Attributes -|resultShow -|String -|List of metacard attributes to display in the result preview. -| -|false - -|Query Schedule Frequencies -|scheduleFrequencyList -|Long -|Custom list of schedule frequencies in seconds. This overrides the frequency list in the query schedule tab. Leave this empty to use the frequency list on the Catalog UI. -a|* `1800` -* `3600` -* `7200` -* `14400` -* `28800` -* `57600` -* `86400` -|true - -|Maximum Endpoint Upload Size -|maximumUploadSize -|Integer -a|The maximum size (in bytes) to allow per client when receiving a POST/PATCH/PUT. - -NOTE: this does not affect resource upload size, just the maximum size allowed for calls from Intrigue. -|1048576 -|true - -|Map Home -|mapHome -|String -|Specifies the default home view for the map by bounding box. The format is "`West, South, East, North"`, where North, East, South, and West are coordinates in degrees. An example is: `-124, 60, -100, 40`. -| -|false - -|UI Product Name -|product -|String -|Specifies a custom UI product name in the UI. -|Intrigue -|true - -|Upload Editor: Attribute Configuration -|attributeEnumMap -|String -|List of attributes to show in the upload editor. See <<{metadata-prefix}catalog_taxonomy_definitions,Catalog Taxonomy>> -for a list of supported attributes. - -Supported entry syntax: + -1. `attribute` + -2. `attribute=value1,value2,...` - -Using the first syntax, the editor attempts to determine the appropriate control to display -based on the attribute datatype. -The second syntax forces the editor to use a dropdown selector populated with the provided -values. This is intended for use with String datatypes, which by default may be assigned any value. -| -|false - -|Upload Editor: Required Attributes -|requiredAttributes -|String -|List of attributes which must be set before an upload is permitted. If an attribute is -listed as required but not shown in the editor, it is ignored. -| -|false - -|=== diff --git a/docs/modules/reference/pages/catalog.ui.attribute.aliases.adoc b/docs/modules/reference/pages/catalog.ui.attribute.aliases.adoc deleted file mode 100644 index 37f5f4a88df..00000000000 --- a/docs/modules/reference/pages/catalog.ui.attribute.aliases.adoc +++ /dev/null @@ -1,26 +0,0 @@ -:title: Catalog UI Search Attribute Aliases -:id: org.codice.ddf.catalog.ui.attribute.aliases -:type: table -:status: published -:application: ${ddf-ui} -:summary: Catalog UI Search Attribute Aliases. - -.[[_org.codice.ddf.catalog.ui.attribute.aliases]]{title} -[cols="1,1m,1,3,1m,1" options="header"] -|=== - -|Name -|Id -|Type -|Description -|Default Value -|Required - -|Attribute Aliases -|attributeAliases -|String -|List of attribute aliases. Separate the attribute name and alias with an equals (=) sign. Example: `title=Title`. -| -|false - -|=== \ No newline at end of file diff --git a/docs/modules/reference/pages/catalog.ui.attribute.descriptions.adoc b/docs/modules/reference/pages/catalog.ui.attribute.descriptions.adoc deleted file mode 100644 index 7525c1a61c8..00000000000 --- a/docs/modules/reference/pages/catalog.ui.attribute.descriptions.adoc +++ /dev/null @@ -1,26 +0,0 @@ -:title: Catalog UI Search Attribute Descriptions -:id: org.codice.ddf.catalog.ui.attribute.descriptions -:type: table -:status: published -:application: ${ddf-ui} -:summary: Catalog UI Search Attribute Descriptions. - -.[[_org.codice.ddf.catalog.ui.attribute.descriptions]]{title} -[cols="1,1m,1,3,1m,1" options="header"] -|=== - -|Name -|Id -|Type -|Description -|Default Value -|Required - -|Attribute Descriptions -|attributeDescriptions -|String -|List of friendly attribute descriptions. Separate the attribute name and description with an equals (=) sign. Example: `checksum-algorithm=Method for generating a small-sized datum from a block of digital data for the purpose of detecting errors`. -| -|false - -|=== \ No newline at end of file diff --git a/docs/modules/reference/pages/catalog.ui.attribute.hidden.adoc b/docs/modules/reference/pages/catalog.ui.attribute.hidden.adoc deleted file mode 100644 index 297d1ad0569..00000000000 --- a/docs/modules/reference/pages/catalog.ui.attribute.hidden.adoc +++ /dev/null @@ -1,30 +0,0 @@ -:title: Catalog UI Search Hidden Attributes -:id: org.codice.ddf.catalog.ui.attribute.hidden -:type: table -:status: published -:application: ${ddf-ui} -:summary: Catalog UI Search Hidden Attributes. - -.[[_org.codice.ddf.catalog.ui.attribute.hidden]]{title} -[cols="1,1m,1,3,1m,1" options="header"] -|=== - -|Name -|Id -|Type -|Description -|Default Value -|Required - -|Hidden Attributes -|hiddenAttributes -|String -a|List of attributes to be hidden. -NOTE: the provided values are evaluated as JavaScript regular expressions when matched against metacard attributes. -a|* `^sorts$` -* `^cql$` -* `^polling$` -* `^cached$` -|false - -|=== diff --git a/docs/modules/reference/pages/catalog.ui.attribute.suggestionList.adoc b/docs/modules/reference/pages/catalog.ui.attribute.suggestionList.adoc deleted file mode 100644 index aaa48e76f42..00000000000 --- a/docs/modules/reference/pages/catalog.ui.attribute.suggestionList.adoc +++ /dev/null @@ -1,18 +0,0 @@ -|=== - -|Name -|Id -|Type -|Description -|Default Value -|Required - -|Attribute Suggestion List -|attributeSuggestionList -|String -|List of attributes that should provide autocomplete suggestions. Suggestions are typically popular values for the attribute in data storage. - Note: Attributes must also be listed under the Facet Attribute Whitelist for this to work properly. -| -|false - -|=== \ No newline at end of file diff --git a/docs/modules/reference/pages/catalog.ui.theme.adoc b/docs/modules/reference/pages/catalog.ui.theme.adoc deleted file mode 100644 index 75e72019b73..00000000000 --- a/docs/modules/reference/pages/catalog.ui.theme.adoc +++ /dev/null @@ -1,31 +0,0 @@ -:title: Catalog UI Search Theme -:id: org.codice.ddf.catalog.ui.theme -:type: table -:status: published -:application: ${ddf-ui} -:summary: Catalog UI Search Theme. - -.[[_org.codice.ddf.catalog.ui.theme]]{title} -[cols="1,1m,1,3,1m,1" options="header"] -|=== - -|Name -|Id -|Type -|Description -|Default Value -|Required - -|Theme -|theme -|String -a|Specifies the default theme: - -* `Dark` -* `Light` -* `Sea` -* `Custom`, which consists of the colors below -|Dark -|true - -|=== \ No newline at end of file diff --git a/docs/modules/reference/pages/catalog.ui.whitelist.adoc b/docs/modules/reference/pages/catalog.ui.whitelist.adoc deleted file mode 100644 index ab0fac762a5..00000000000 --- a/docs/modules/reference/pages/catalog.ui.whitelist.adoc +++ /dev/null @@ -1,27 +0,0 @@ -:title: Catalog UI Search Metacard Type Whitelist -:id: org.codice.ddf.catalog.ui.whitelist -:type: table -:status: published -:application: ${ddf-ui} -:summary: Catalog UI Search Metacard Type Whitelist. - -.[[_org.codice.ddf.catalog.ui.whitelist]]Catalog UI Search Metacard Type Whitelist -[cols="1,1m,1,3,1m,1" options="header"] -|=== - -|Name -|Id -|Type -|Description -|Default Value -|Required - -|Metacard Type Whitelist -|whiteListedMetacardTypes -|String -a|List of metacard types that are whitelisted and not filtered. -NOTE: This directly filters out metacard types rendered from metacard application. An empty list whitelists everything. -| -|false - -|=== diff --git a/docs/modules/reference/pages/map-standards.adoc b/docs/modules/reference/pages/map-standards.adoc deleted file mode 100644 index 5b8a2137dcf..00000000000 --- a/docs/modules/reference/pages/map-standards.adoc +++ /dev/null @@ -1,55 +0,0 @@ -:type: subCoreConcept -:section: Core Concepts -:status: published -:title: Map Formats -:parent: Standards Supported by {branding} -:order: 02 - -== {title} - -{catalog-ui} includes capabilities to support custom map layer providers as well as support for several popular map layer providers. - -Some provider types are currently only supported by the https://openlayers.org[2D OpenLayers] {external-link} map and some only by the https://cesiumjs.org[3D Cesium] {external-link} map. - -.Map Formats Included in {ddf-branding} -[cols="1,1,1" options="header"] -|=== - -|Format -|2D Documentation -|3D Documentation - -|Open Street Map -|https://openlayers.org/en/v{openlayers.version}/apidoc/ol.source.OSM.html[OpenLayers] {external-link} -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/createOpenStreetMapImageryProvider.html[Cesium] {external-link} - -|Web Map Service -|https://openlayers.org/en/v{openlayers.version}/apidoc/ol.source.ImageWMS.html[OpenLayers] {external-link} -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/WebMapServiceImageryProvider.html[Cesium] {external-link} - -|Web Map Tile Service -|https://openlayers.org/en/v{openlayers.version}/apidoc/ol.source.WMTS.html[OpenLayers] {external-link} -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/WebMapTileServiceImageryProvider.html[Cesium] {external-link} - -|ArcGIS Map Server -|https://openlayers.org/en/v{openlayers.version}/apidoc/ol.source.XYZ.html[OpenLayers] {external-link} -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/ArcGisMapServerImageryProvider.html[Cesium] {external-link} - -|Single Tile -|https://openlayers.org/en/v{openlayers.version}/apidoc/ol.source.ImageStatic.html[OpenLayers] {external-link} -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/SingleTileImageryProvider.html[Cesium] {external-link} - -|Bing Maps -|https://openlayers.org/en/v{openlayers.version}/apidoc/ol.source.BingMaps.html[OpenLayers] {external-link} -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/BingMapsImageryProvider.html[Cesium] {external-link} - -|Tile Map Service -| -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/createTileMapServiceImageryProvider.html[Cesium] {external-link} - -|Google Earth -| -|https://cesiumjs.org/releases/{cesium.version}/Build/Documentation/GoogleEarthImageryProvider.html[Cesium] {external-link} - -|=== - diff --git a/docs/pom.xml b/docs/pom.xml deleted file mode 100644 index 68c89a63121..00000000000 --- a/docs/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - 4.0.0 - - org.codice.ddf.search - catalog-ui - 5.1.51-SNAPSHOT - - org.codice.ddf.search - docs - Intrigue DOCS - - ${project.version} - ${maven.build.timestamp} - yyyy-MM-dd - pom - docs - - - - - - - - org.owasp - dependency-check-maven - - - none - - check - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.5.3 - - - - ${project.basedir}/src/assembly/asciidocs.xml - ${project.build.directory}/adoc-files - - include-adocs - package - - single - - - - - ${project.basedir}/src/assembly/images.xml - ${project.build.directory}/images - - include-images - package - - single - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - check-artifact-size - verify - - enforce - - - - - 2.16_MB - - - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - diff --git a/docs/src/assembly/asciidocs.xml b/docs/src/assembly/asciidocs.xml deleted file mode 100644 index cf37bf09fc1..00000000000 --- a/docs/src/assembly/asciidocs.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - adoc-files - - zip - - - - 0644 - 0755 - modules - - ** - - - - - diff --git a/docs/src/assembly/images.xml b/docs/src/assembly/images.xml deleted file mode 100644 index 64def46cb44..00000000000 --- a/docs/src/assembly/images.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - images - - zip - - - - 0644 - 0755 - modules/ROOT/images - - ** - - - - - \ No newline at end of file diff --git a/exports/backbone-container.d.ts b/exports/backbone-container.d.ts new file mode 100644 index 00000000000..cb40996b9a8 --- /dev/null +++ b/exports/backbone-container.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default, WithBackboneProps, } from '../src/main/webapp/react-component/backbone-container'; diff --git a/exports/backbone-container.js b/exports/backbone-container.js new file mode 100644 index 00000000000..e98aacf9c74 --- /dev/null +++ b/exports/backbone-container.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default, } from '../src/main/webapp/react-component/backbone-container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFja2JvbmUtY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZXhwb3J0cy9iYWNrYm9uZS1jb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQ0wsT0FBTyxHQUVSLE1BQU0sdURBQXVELENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7XG4gIGRlZmF1bHQsXG4gIFdpdGhCYWNrYm9uZVByb3BzLFxufSBmcm9tICcuLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2JhY2tib25lLWNvbnRhaW5lcidcbiJdfQ== \ No newline at end of file diff --git a/exports/fetch.d.ts b/exports/fetch.d.ts new file mode 100644 index 00000000000..fac84fb2d91 --- /dev/null +++ b/exports/fetch.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from '../src/main/webapp/react-component/utils/fetch'; diff --git a/exports/fetch.js b/exports/fetch.js new file mode 100644 index 00000000000..f2ba8cc00a7 --- /dev/null +++ b/exports/fetch.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from '../src/main/webapp/react-component/utils/fetch'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9leHBvcnRzL2ZldGNoLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGdEQUFnRCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC91dGlscy9mZXRjaCdcbiJdfQ== \ No newline at end of file diff --git a/exports/menu.d.ts b/exports/menu.d.ts new file mode 100644 index 00000000000..1faf49bf87d --- /dev/null +++ b/exports/menu.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Menu, MenuItem } from '../src/main/webapp/react-component/menu'; diff --git a/exports/menu.js b/exports/menu.js new file mode 100644 index 00000000000..4bccbd5215b --- /dev/null +++ b/exports/menu.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Menu, MenuItem } from '../src/main/webapp/react-component/menu'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2V4cG9ydHMvbWVudS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLE1BQU0seUNBQXlDLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IE1lbnUsIE1lbnVJdGVtIH0gZnJvbSAnLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZW51J1xuIl19 \ No newline at end of file diff --git a/exports/metacard-interactions.d.ts b/exports/metacard-interactions.d.ts new file mode 100644 index 00000000000..bd0174eaad1 --- /dev/null +++ b/exports/metacard-interactions.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default, Divider, MetacardInteraction, } from '../src/main/webapp/react-component/metacard-interactions'; diff --git a/exports/metacard-interactions.js b/exports/metacard-interactions.js new file mode 100644 index 00000000000..a8faef58421 --- /dev/null +++ b/exports/metacard-interactions.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default, Divider, MetacardInteraction, } from '../src/main/webapp/react-component/metacard-interactions'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQtaW50ZXJhY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZXhwb3J0cy9tZXRhY2FyZC1pbnRlcmFjdGlvbnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQ0wsT0FBTyxFQUNQLE9BQU8sRUFDUCxtQkFBbUIsR0FDcEIsTUFBTSwwREFBMEQsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHtcbiAgZGVmYXVsdCxcbiAgRGl2aWRlcixcbiAgTWV0YWNhcmRJbnRlcmFjdGlvbixcbn0gZnJvbSAnLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1pbnRlcmFjdGlvbnMnXG4iXX0= \ No newline at end of file diff --git a/exports/multi-select-actions.d.ts b/exports/multi-select-actions.d.ts new file mode 100644 index 00000000000..3b9e02a07e9 --- /dev/null +++ b/exports/multi-select-actions.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { MultiSelectAction } from '../src/main/webapp/react-component/multi-select-actions/presentation'; diff --git a/exports/multi-select-actions.js b/exports/multi-select-actions.js new file mode 100644 index 00000000000..2be7a49cbc3 --- /dev/null +++ b/exports/multi-select-actions.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// @ts-nocheck ts-migrate(2307) FIXME: Cannot find module +export { MultiSelectAction } from '../src/main/webapp/react-component/multi-select-actions/presentation'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGktc2VsZWN0LWFjdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9leHBvcnRzL211bHRpLXNlbGVjdC1hY3Rpb25zLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBRUoseURBQXlEO0FBQ3pELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHNFQUFzRSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ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ode 100644 index 00000000000..70611daf52a --- /dev/null +++ b/exports/query.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from '../src/main/webapp/react-component/utils/query'; diff --git a/exports/query.js b/exports/query.js new file mode 100644 index 00000000000..ee6479bd18f --- /dev/null +++ b/exports/query.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from '../src/main/webapp/react-component/utils/query'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9leHBvcnRzL3F1ZXJ5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGdEQUFnRCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC91dGlscy9xdWVyeSdcbiJdfQ== \ No newline at end of file diff --git a/exports/security.d.ts b/exports/security.d.ts new file mode 100644 index 00000000000..c422a70eeae --- /dev/null +++ b/exports/security.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Access, Restrictions, Security, Entry, } from '../src/main/webapp/react-component/utils/security'; diff --git a/exports/security.js b/exports/security.js new file mode 100644 index 00000000000..bd6ba8b68f8 --- /dev/null +++ b/exports/security.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Access, Restrictions, Security, } from '../src/main/webapp/react-component/utils/security'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjdXJpdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9leHBvcnRzL3NlY3VyaXR5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUNMLE1BQU0sRUFDTixZQUFZLEVBQ1osUUFBUSxHQUVULE1BQU0sbURBQW1ELENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7XG4gIEFjY2VzcyxcbiAgUmVzdHJpY3Rpb25zLFxuICBTZWN1cml0eSxcbiAgRW50cnksXG59IGZyb20gJy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvdXRpbHMvc2VjdXJpdHknXG4iXX0= \ No newline at end of file diff --git a/exports/sharing.d.ts b/exports/sharing.d.ts new file mode 100644 index 00000000000..6e9192a9104 --- /dev/null +++ b/exports/sharing.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Sharing, Item, Category, } from '../src/main/webapp/react-component/sharing'; diff --git a/exports/sharing.js b/exports/sharing.js new file mode 100644 index 00000000000..0de4252362e --- /dev/null +++ b/exports/sharing.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// @ts-nocheck ts-migrate(2307) FIXME: Cannot find module +export { Sharing, Item, Category, } from '../src/main/webapp/react-component/sharing'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2V4cG9ydHMvc2hhcmluZy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLHlEQUF5RDtBQUN6RCxPQUFPLEVBQ0wsT0FBTyxFQUNQLElBQUksRUFDSixRQUFRLEdBQ1QsTUFBTSw0Q0FBNEMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAq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WNvbXBvbmVudC9zaGFyaW5nJ1xuIl19 \ No newline at end of file diff --git a/exports/theme.d.ts b/exports/theme.d.ts new file mode 100644 index 00000000000..db1424104be --- /dev/null +++ b/exports/theme.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from '../src/main/webapp/react-component/theme'; diff --git a/exports/theme.js b/exports/theme.js new file mode 100644 index 00000000000..8e3e7a4e22b --- /dev/null +++ b/exports/theme.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from '../src/main/webapp/react-component/theme'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9leHBvcnRzL3RoZW1lLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLDBDQUEwQyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC90aGVtZSdcbiJdfQ== \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000000..745c75bbd39 --- /dev/null +++ b/package.json @@ -0,0 +1,167 @@ +{ + "name": "catalog-ui-search", + "author": "Codice", + "description": "A frontend UI for DDF Catalog", + "version": "5.0.0", + "license": "LGPL-3.0", + "scripts": { + "fmt": "ace format -w", + "format": "ace format", + "prestart": "ace disable-idp", + "start": "node --max_old_space_size=8192 ./node_modules/@connexta/ace/bin.js start", + "start:transpile": "yarn start --tsTranspileOnly true", + "test": "ace bundle --env=test && ace test", + "start:test": "ace start --env=test", + "build": "node --max_old_space_size=16384 ./node_modules/@connexta/ace/bin.js bundle", + "build:transpile": "node --max_old_space_size=16384 ./node_modules/@connexta/ace/bin.js bundle --tsTranspileOnly true", + "postbuild": "yarn publish:build && npm pack ./dist && move-cli catalog-ui-search-5.0.0.tgz dist/catalog-ui-search.tgz && ace package", + "m2": "yarn install:m2", + "install:m2": "ace clean && ace bundle --tsTranspileOnly true && ace package && ace install", + "publish:cpx-package": "cpx package.json dist && json -I -f dist/package.json -e 'this.private=false'", + "publish:cpx-src": "cpx \"src/**/*.!(*tsx|*ts)\" dist/src", + "publish:cpx-current": "cpx \"*\" dist", + "publish:build": "rimraf dist && yarn publish:cpx-src && yarn publish:cpx-current && tsc && yarn publish:cpx-package", + "watch:build": "yarn publish:cpx-src && yarn publish:cpx-current && tsc && yarn publish:cpx-package", + "publish:npm": "yarn publish:build && npm publish dist -timeout=99999", + "watch": "ts-node -P ./dev/tsconfig.json ./dev/index.tsx" + }, + "repository": { + "type": "git", + "url": "https://github.com/codice/ddf.git" + }, + "engines": { + "node": "16.x.x" + }, + "peerDependencies": {}, + "devDependencies": { + "@connexta/ace": "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe", + "@types/chai": "4.2.14", + "@types/d3": "5.0.0", + "@types/enzyme": "3.10.8", + "@types/lodash.clonedeep": "4.5.7", + "@types/lodash.debounce": "4.0.6", + "@types/lodash.get": "4.4.7", + "@types/lodash.isequalwith": "4.4.7", + "@types/mocha": "8.0.3", + "@types/moment-timezone": "0.5.30", + "@types/react": "18.x.x", + "@types/react-beautiful-dnd": "^13.0.0", + "@types/react-dom": "18.x.x", + "@types/react-router-dom": "5.3.3", + "@types/react-text-mask": "5.4.11", + "@types/react-virtualized-auto-sizer": "1.0.0", + "@types/react-window": "^1.8.1", + "@types/styled-components": "5.1.26", + "@types/uuid": "8.3.3", + "@welldone-software/why-did-you-render": "4.2.2", + "chai": "4.1.1", + "chokidar": "3.5.0", + "cpx": "1.5.0", + "enzyme": "3.11.0", + "@wojtekmaj/enzyme-adapter-react-17": "0.8.0", + "jsdom": "11.12.0", + "json": "9.0.6", + "move-cli": "1.2.1", + "react-addons-test-utils": "15.4.2", + "sinon": "5.0.7", + "ts-node": "10.9.1", + "tslib": "2.5.0", + "typescript": "5.0.4", + "utility-types": "3.10.0" + }, + "dependencies": { + "@blueprintjs/core": "3.29.0", + "@blueprintjs/datetime": "3.18.3", + "@emotion/react": "11.11.1", + "@emotion/styled": "11.11.0", + "@mui/icons-material": "5.13.7", + "@mui/lab": "5.0.0-alpha.135", + "@mui/material": "5.13.7", + "@mui/system": "5.13.7", + "@mui/x-data-grid": "6.9.1", + "@turf/circle": "6.5.0", + "@turf/meta": "6.5.0", + "@turf/turf": "6.5.0", + "@types/backbone-associations": "0.6.31", + "@types/backbone.marionette": "3.3.2", + "@types/lodash": "4.14.120", + "@types/openlayers": "4.3.11", + "backbone": "1.1.2", + "backbone-associations": "0.6.2", + "backbone-poller": "1.1.3", + "backbone.wreqr": "1.4.0", + "bootstrap": "3.4.0", + "cesium": "1.44", + "content-disposition": "0.5.3", + "d3": "5.16.0", + "density-clustering": "1.3.0", + "detect-browser": "5.3.0", + "dropzone": "4.3.0", + "focus-visible": "5.1.0", + "font-awesome": "4.7", + "geo-convex-hull": "1.2.0", + "geolib": "^3.2.1", + "geospatialdraw": "0.4.8", + "golden-layout": "1.5.9", + "immer.1.5.0": "https://registry.npmjs.org/immer/-/immer-1.5.0.tgz", + "jquery": "3.4.1", + "lodash": "4.17.15", + "lodash.clonedeep": "4.5.0", + "lodash.debounce": "4.0.8", + "lodash.get": "4.4.2", + "lodash.isequalwith": "4.4.0", + "modern-normalize": "1.1.0", + "moment": "^2.27.0", + "moment-timezone": "0.5.31", + "mt-geo": "1.0.1", + "openlayers": "4.6.5", + "plotly.js": "1.45.0", + "polished": "3.6.5", + "postcss-focus-visible": "8.0.2", + "prop-types": "15.7.2", + "query-string": "6.13.1", + "react": "18.x.x", + "react-beautiful-dnd": "git+https://github.com/andrewkfiedler/react-beautiful-dnd#5703284223ee68ae8543c3f27495824389d2c82a", + "react-dom": "18.x.x", + "react-intl": "6.4.1", + "react-router-dom": "5.3.4", + "react-text-mask": "5.5.0", + "react-use": "15.1.0", + "react-virtualized-auto-sizer": "^1.0.2", + "react-window": "git+https://github.com/andrewkfiedler/react-window#8a68a2508c79044be33f6f743261b069d7fd9cc1", + "react-window-components": "0.0.7", + "re-resizable": "6.1.0", + "rpc-websockets": "7.5.1", + "scroll-into-view-if-needed": "^2.2.25", + "sortablejs": "1.4.2", + "styled-components": "5.3.10", + "tailwindcss": "3.3.1", + "urijs": "1.19.1", + "use-resize-observer": "6.1.0", + "usng.js": "0.4.5", + "uuid": "9.0.0", + "vis": "4.15.0", + "wkx": "0.4.5" + }, + "resolutions": { + "@types/react": "18.2.0", + "backbone": "1.1.2", + "jquery": "3.4.1", + "polished": "4.2.2", + "react": "18.2.0", + "react-dom": "18.2.0", + "styled-components": "5.3.10" + }, + "main": "src/main/webapp/index.tsx", + "ace": { + "files": [ + "src/main/resources", + "target/webapp" + ], + "testPath": "src/", + "testSetupPath": "src/main/webapp/test/setup/index.tsx" + }, + "context-path": "/search/catalog", + "private": false, + "sideEffects": true +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 index feccd747a4b..00000000000 --- a/pom.xml +++ /dev/null @@ -1,475 +0,0 @@ - - - - - 4.0.0 - - DDF :: UI - catalog-ui - org.codice.ddf.search - 5.1.51-SNAPSHOT - - - Codice Foundation - http://codice.org - - - - - GNU Lesser General Public v3 - http://www.gnu.org/licenses/lgpl.html - repo - - - - pom - - - ui-backend - ui-frontend - docs - - - - - UTF-8 - 21 - 21 - false - 5.1.4 - 3.8.1 - 3.0.0-M1 - 3.5.0 - 3.5.0 - 3.2.0 - 3.5.0 - 3.11.2_1 - 1.3.71 - 3.2.0 - 2.4.0 - 0.8.12 - 2.3.0 - - - - 2.29.2-SNAPSHOT - 0.7 - 2.3.16 - 4.3 - 0.9.5.5 - 3.4.0 - 3.2.2 - 2.6 - 3.11 - 3.6.1 - 2.8.5 - 29.0-jre - 4.5.12 - 4.4.13 - 2.11.0 - 3.1.0 - 2.1 - 2.3.2 - 3.0.2 - 0.11.0 - 2.6.1 - 4.2.9 - 8.14.1 - 8.3 - 20.1 - ${org.geotools.version}_2 - 5.0.0 - 20191001.1 - 1.1.0 - 4.0.1 - 7.2.18 - 2.3.2 - 3.3.0 - 2.9.2 - 0.7 - 1.24.1 - 0.4 - 1.7.29 - - - 0.3 - 0.3 - - - 2.0.0.0 - 1.3 - 4.12 - 3.6.28 - 2.6 - 1.4 - - - 1.1.0 - 3.7.2 - 2.6.2 - 2.0.0 - 2.4.5 - 2.20.1 - v16.16.0 - 1.3_1 - 1.8.3 - v1.22.4 - - project-info - - - - https://github.com/codice/ddf-ui - scm:git:https://github.com/codice/ddf-ui.git - scm:git:https://github.com/codice/ddf-ui.git - catalog-ui-3.4.0 - - - - - - com.fasterxml.jackson - jackson-bom - ${jackson.version} - import - pom - - - org.glassfish.jaxb - jaxb-bom - ${jaxb.version} - import - pom - - - - - - snapshots - ${snapshots.repository.url} - - - releases - ${releases.repository.url} - - - reports - ${reports.repository.url} - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven.deploy.plugin.version} - - - org.apache.maven.plugins - maven-resources-plugin - ${maven.resources.plugin.version} - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.plugin.version} - - ${maven.compiler.source} - ${maven.compiler.target} - 512M - ${compiler.fork} - ${project.build.sourceEncoding} - - -XDcompilePolicy=simple - - --add-exports - java.base/sun.security.x509=ALL-UNNAMED - - - - - - - - - - - - org.apache.felix - maven-bundle-plugin - ${maven.bundle.plugin.version} - true - - - NONE - - ${project.artifactId} - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven.surefire.plugin.version} - - @{argLine} -Djava.awt.headless=true -noverify - - **/*Test.java - **/*Spec.class - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - ${maven.enforcer.plugin.version} - - - ddf.support - artifact-size-enforcer - ${ddf.support.version} - - - - - check-artifact-size - verify - - enforce - - - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.maven.plugin.version} - - - org.codice.maven - jacoco - ${codice-maven.version} - - - - - default-prepare-agent - - prepare-agent - - - - default-report - prepare-package - - - ${project.build.directory}/site/${project.report.output.directory}/jacoco/ - - - - report - - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.75 - - - BRANCH - COVEREDRATIO - 0.75 - - - COMPLEXITY - COVEREDRATIO - 0.75 - - - - - - - - - - - - - - com.coveo - fmt-maven-plugin - ${fmt.maven.plugin.version} - - - - validate - - check - - - - - - org.codehaus.gmavenplus - gmavenplus-plugin - 1.13.1 - - - - compile - compileTests - - - - - - org.apache.maven.plugins - maven-release-plugin - ${maven.release.plugin.version} - - true - clean install - false - - - - - - - central - Central Repository - https://repo.maven.apache.org/maven2 - default - - false - - - - codice - Codice Repository - https://artifacts.codice.org/content/groups/public/ - - - - - central - Central Repository - https://repo.maven.apache.org/maven2 - default - - false - - - - codice - Codice Repository - https://artifacts.codice.org/content/groups/public/ - - - - - org.codice.test - spock-all - ${codice-test.version} - pom - test - - - org.hamcrest - hamcrest-all - ${hamcrest-all.version} - test - - - org.mockito - mockito-core - ${mockito.version} - test - - - org.objenesis - objenesis - ${objenesis.version} - - - junit - junit - ${junit.version} - test - - - org.hamcrest - hamcrest-core - - - - - xmlunit - xmlunit - ${xmlunit.version} - test - - - org.codice.test - junit-extensions - ${codice-test.version} - test - - - org.codice.test - spock-extensions - ${codice-test.version} - test - - - org.codice.test - hamcrest-extensions - ${codice-test.version} - test - - - org.codice.test - mockito-extensions - ${codice-test.version} - test - - - org.codice.test - failsafe-controller - ${codice-test.version} - test - - - diff --git a/ui-frontend/packages/catalog-ui-search/postcss.config.js b/postcss.config.js similarity index 100% rename from ui-frontend/packages/catalog-ui-search/postcss.config.js rename to postcss.config.js diff --git a/ui-frontend/packages/catalog-ui-search/src/main/resources/blank.html b/src/main/resources/blank.html similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/resources/blank.html rename to src/main/resources/blank.html diff --git a/ui-frontend/packages/catalog-ui-search/src/main/resources/images/natural_earth_50m.png b/src/main/resources/images/natural_earth_50m.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/resources/images/natural_earth_50m.png rename to src/main/resources/images/natural_earth_50m.png diff --git a/src/main/webapp/app.d.ts b/src/main/webapp/app.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/app.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/app.js b/src/main/webapp/app.js new file mode 100644 index 00000000000..be223fbbb23 --- /dev/null +++ b/src/main/webapp/app.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Entry from './js/Entry'; +Entry(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2Fw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3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuaW1wb3J0IEVudHJ5IGZyb20gJy4vanMvRW50cnknXG5cbkVudHJ5KClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/check-browser.d.ts b/src/main/webapp/check-browser.d.ts new file mode 100644 index 00000000000..31ca0fc447c --- /dev/null +++ b/src/main/webapp/check-browser.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import './styles/tailwind.css'; +/** + * If we can't detect browser, assume it's supported + * + * If we can, check if it's supported + */ +export declare const isSupportedBrowser: () => boolean; +export declare const handleUnsupportedBrowser: () => void; +export declare const handleSupportedBrowser: () => void; diff --git a/src/main/webapp/check-browser.js b/src/main/webapp/check-browser.js new file mode 100644 index 00000000000..f93e8e91712 --- /dev/null +++ b/src/main/webapp/check-browser.js @@ -0,0 +1,73 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import './styles/tailwind.css'; +import { detect } from 'detect-browser'; +var browser = detect(); +/** + * If we can't detect browser, assume it's supported + * + * If we can, check if it's supported + */ +export var isSupportedBrowser = function () { + if (sessionStorage.getItem('ignoreBrowserWarning')) { + return true; + } + if (browser && browser.version) { + var version = parseInt(browser.version.split('.')[0]); + switch (browser && browser.name) { + case 'chrome': + // https://chromium.cypress.io/mac/ for those devs who wish to test old chromium versions + return version >= 90; + case 'firefox': + // https://ftp.mozilla.org/pub/firefox/releases/ + return version >= 78; + case 'edge': + case 'edge-chromium': + // https://officecdnmac.microsoft.com/pr/03adf619-38c6-4249-95ff-4a01c0ffc962/MacAutoupdate/MicrosoftEdge-90.0.818.39.pkg + // change version on end to get to old versions + return version >= 91; + default: + return false; + } + } + else { + /** + * Assumption is that this would happen only in a new browser version where the user agent deprecation + * has gone through (thus it should be a relatively new version of chrome or whatever browser), + * so we let it through as supported. + */ + return true; + } +}; +export var handleUnsupportedBrowser = function () { + var _a, _b; + (_a = document.querySelector('#loading')) === null || _a === void 0 ? void 0 : _a.classList.add('hidden'); + (_b = document + .querySelector('#incompatible-browser-bg button')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', function () { + sessionStorage.setItem('ignoreBrowserWarning', 'true'); + location.reload(); + }); +}; +export var handleSupportedBrowser = function () { + var _a; + (_a = document.querySelector('#incompatible-browser-bg')) === null || _a === void 0 ? void 0 : _a.remove(); +}; +if (!isSupportedBrowser()) { + handleUnsupportedBrowser(); +} +else { + handleSupportedBrowser(); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2stYnJvd3Nlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jaGVjay1icm93c2VyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyx1QkFBdUIsQ0FBQTtBQUM5QixPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZ0JBQWdCLENBQUE7QUFFdkMsSUFBTSxPQUFPLEdBQUcsTUFBTSxFQUFFLENBQUE7QUFFeEI7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WVcbiAgfVxufVxuXG5leHBvcnQgY29uc3QgaGFuZGxlVW5zdXBwb3J0ZWRCcm93c2VyID0gKCkgPT4ge1xuICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjbG9hZGluZycpPy5jbGFzc0xpc3QuYWRkKCdoaWRkZW4nKVxuICBkb2N1bWVudFxuICAgIC5xdWVyeVNlbGVjdG9yKCcjaW5jb21wYXRpYmxlLWJyb3dzZXItYmcgYnV0dG9uJylcbiAgICA/LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgKCkgPT4ge1xuICAgICAgc2Vzc2lvblN0b3JhZ2Uuc2V0SXRlbSgnaWdub3JlQnJvd3Nlcldhcm5pbmcnLCAndHJ1ZScpXG4gICAgICBsb2NhdGlvbi5yZWxvYWQoKVxuICAgIH0pXG59XG5cbmV4cG9ydCBjb25zdCBoYW5kbGVTdXBwb3J0ZWRCcm93c2VyID0gKCkgPT4ge1xuICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjaW5jb21wYXRpYmxlLWJyb3dzZXItYmcnKT8ucmVtb3ZlKClcbn1cblxuaWYgKCFpc1N1cHBvcnRlZEJyb3dzZXIoKSkge1xuICBoYW5kbGVVbnN1cHBvcnRlZEJyb3dzZXIoKVxufSBlbHNlIHtcbiAgaGFuZGxlU3VwcG9ydGVkQnJvd3NlcigpXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/app/ajax-error-handling.d.ts b/src/main/webapp/component/app/ajax-error-handling.d.ts new file mode 100644 index 00000000000..bddea807b1f --- /dev/null +++ b/src/main/webapp/component/app/ajax-error-handling.d.ts @@ -0,0 +1,2 @@ +/// +export declare const AjaxErrorHandling: () => JSX.Element; diff --git a/src/main/webapp/component/app/ajax-error-handling.js b/src/main/webapp/component/app/ajax-error-handling.js new file mode 100644 index 00000000000..2a5ce275edc --- /dev/null +++ b/src/main/webapp/component/app/ajax-error-handling.js @@ -0,0 +1,74 @@ +// +import React from 'react'; +import useSnack from '../hooks/useSnack'; +import $ from 'jquery'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +var getShortErrorMessage = function (error) { + var extraMessage = error instanceof Error ? error.name : String(error); + if (extraMessage.length === 0) { + return extraMessage; + } + // limit to 20 characters so we do not worry about overflow + if (extraMessage.length > 20) { + extraMessage = extraMessage.substr(0, 20) + '...'; + } + return ' - ' + extraMessage; +}; +var getErrorResponse = function (_event, jqxhr, settings, throwError) { + if (jqxhr.getResponseHeader('content-type') === 'application/json' && + jqxhr.responseText.startsWith('<') && + jqxhr.responseText.indexOf('ACSURL') > -1 && + jqxhr.responseText.indexOf('SAMLRequest') > -1) { + return { title: 'Logged out', message: 'Please refresh page to log in' }; + } + else if (settings.url.indexOf('./internal/catalog/sources') > -1 && + settings.type === 'GET') { + return { + title: StartupDataStore.Configuration.getI18n()['sources.polling.error.title'], + message: StartupDataStore.Configuration.getI18n()['sources.polling.error.message'], + }; + } + else if (jqxhr.responseJSON !== undefined) { + return { title: 'Error', message: jqxhr.responseJSON.message }; + } + else { + switch (jqxhr.status) { + case 403: + return { title: 'Forbidden', message: 'Not Authorized' }; + case 405: + return { + title: 'Error', + message: 'Method not allowed. Please try refreshing your browser', + }; + default: + return { + title: 'Error', + message: 'Unknown Error' + getShortErrorMessage(throwError), + }; + } + } +}; +export var AjaxErrorHandling = function () { + var addSnack = useSnack(); + React.useEffect(function () { + $(window.document).ajaxError(function (event, jqxhr, settings, throwError) { + if (settings.customErrorHandling) { + // Do nothing if caller is handling their own error + return; + } + console.error(event, jqxhr, settings, throwError); + var response = getErrorResponse(event, jqxhr, settings, throwError); + if (StartupDataStore.Configuration.getDisableUnknownErrorBox() && + response.message.substring(0, 13) === 'Unknown Error') { + return; + } + addSnack(response.title + response.message, { + alertProps: { + severity: 'error', + }, + }); + }); + }); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWpheC1lcnJvci1oYW5kbGluZy5qcyIsInNvd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HRocm93RXJyb3IpXG4gICAgICAgIGlmIChcbiAgICAgICAgICBTdGFydHVwRGF0YVN0b3JlLkNvbmZpZ3VyYXRpb24uZ2V0RGlzYWJsZVVua25vd25FcnJvckJveCgpICYmXG4gICAgICAgICAgcmVzcG9uc2UubWVzc2FnZS5zdWJzdHJpbmcoMCwgMTMpID09PSAnVW5rbm93biBFcnJvcidcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuXG4gICAgICAgIH1cbiAgICAgICAgYWRkU25hY2socmVzcG9uc2UudGl0bGUgKyByZXNwb25zZS5tZXNzYWdlLCB7XG4gICAgICAgICAgYWxlcnRQcm9wczoge1xuICAgICAgICAgICAgc2V2ZXJpdHk6ICdlcnJvcicsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICApXG4gIH0pXG4gIHJldHVybiA8PjwvPlxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/app/app.d.ts b/src/main/webapp/component/app/app.d.ts new file mode 100644 index 00000000000..d832ecb1eaf --- /dev/null +++ b/src/main/webapp/component/app/app.d.ts @@ -0,0 +1,35 @@ +/// +import { RouteProps, LinkProps } from 'react-router-dom'; +import { SettingsComponentType } from '../../react-component/user-settings/user-settings'; +import { PermissiveComponentType } from '../../typescript'; +import { BaseProps } from '../button/expanding-button'; +export declare const handleBase64EncodedImages: (url: string) => string; +type ForNavButtonType = Omit & Required>; +export type RouteShownInNavType = { + routeProps: RouteProps; + linkProps: LinkProps; + showInNav: true; + navButtonProps: ForNavButtonType; +}; +export type RouteNotShownInNavType = { + routeProps: RouteProps; + showInNav: false; +}; +export type IndividualRouteType = RouteShownInNavType | RouteNotShownInNavType; +type AppPropsType = { + RouteInformation: IndividualRouteType[]; + NotificationsComponent: PermissiveComponentType; + SettingsComponents: SettingsComponentType; +}; +/** + * If you're not using a custom loading screen, + * this handles removing the default one for you on first render + * of the app. + */ +export declare const useDefaultWelcome: () => void; +export declare const useNavContextProvider: () => { + setNavOpen: (_navOpen: boolean) => void; + navOpen: boolean; +}; +declare const _default: ({ RouteInformation, NotificationsComponent, SettingsComponents, }: AppPropsType) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/app/app.js b/src/main/webapp/component/app/app.js new file mode 100644 index 00000000000..98357463106 --- /dev/null +++ b/src/main/webapp/component/app/app.js @@ -0,0 +1,536 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader/root'; +import { Switch, Route, useLocation, useHistory, } from 'react-router-dom'; +import CssBaseline from '@mui/material/CssBaseline'; +import Grid from '@mui/material/Grid'; +import $ from 'jquery'; +import Paper from '@mui/material/Paper'; +import Typography from '@mui/material/Typography'; +import Button from '@mui/material/Button'; +import ExpandingButton from '../button/expanding-button'; +import Divider from '@mui/material/Divider'; +import IconButton from '@mui/material/IconButton'; +import ArrowBackIcon from '@mui/icons-material/ArrowBack'; +import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; +import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; +import MenuIcon from '@mui/icons-material/Menu'; +import PersonIcon from '@mui/icons-material/Person'; +import SettingsIcon from '@mui/icons-material/Settings'; +import Drawer from '@mui/material/Drawer'; +import queryString from 'query-string'; +import { Link } from '../link/link'; +import { Memo } from '../memo/memo'; +import HelpIcon from '@mui/icons-material/Help'; +import NotificationsIcon from '@mui/icons-material/Notifications'; +import userInstance from '../singletons/user-instance'; +import notifications from '../singletons/user-notifications'; +import SystemUsageModal from '../system-usage/system-usage'; +import UserView, { RoleDisplay } from '../../react-component/user/user'; +import UserSettings from '../../react-component/user-settings/user-settings'; +import { GlobalStyles } from './global-styles'; +import scrollIntoView from 'scroll-into-view-if-needed'; +import { Elevations } from '../theme/theme'; +import { useBackbone, useListenTo, } from '../selection-checkbox/useBackbone.hook'; +import { AsyncTasks, useRenderOnAsyncTasksAddOrRemove, } from '../../js/model/AsyncTask/async-task'; +import useSnack from '../hooks/useSnack'; +import LinearProgress from '@mui/material/LinearProgress'; +import { useDialogState } from '../hooks/useDialogState'; +import SessionTimeout from '../../react-component/session-timeout'; +import { AjaxErrorHandling } from './ajax-error-handling'; +import { WreqrSnacks } from './wreqr-snacks'; +import sessionTimeoutModel from '../singletons/session-timeout'; +import Extensions from '../../extension-points'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +export var handleBase64EncodedImages = function (url) { + if (url && url.startsWith('data:')) { + return url; + } + return "data:image/png;base64,".concat(url); +}; +var matchesRoute = function (_a) { + var routeInfo = _a.routeInfo, pathname = _a.pathname; + if (routeInfo.routeProps.path && + typeof routeInfo.routeProps.path === 'string') { + return (pathname.startsWith("".concat(routeInfo.routeProps.path, "/")) || + pathname.endsWith("".concat(routeInfo.routeProps.path))); + } + else if (routeInfo.routeProps.path && + routeInfo.routeProps.path.constructor === Array) { + return routeInfo.routeProps.path.some(function (possibleRoute) { + return pathname.startsWith("".concat(possibleRoute, "/")) || + pathname.endsWith("".concat(possibleRoute)); + }); + } + return false; +}; +function sidebarDataIdTag(name) { + return "sidebar-".concat(name, "-button"); +} +/** + * If you're not using a custom loading screen, + * this handles removing the default one for you on first render + * of the app. + */ +export var useDefaultWelcome = function () { + React.useEffect(function () { + var loadingElement = document.querySelector('#loading'); + if (loadingElement) { + loadingElement.classList.remove('is-open'); + setTimeout(function () { + loadingElement.remove(); + }, 500); + } + }, []); +}; +var scrollCurrentRouteIntoView = function () { + setTimeout(function () { + var currentroute = document.querySelector('[data-currentroute]'); + if (currentroute) { + scrollIntoView(currentroute, { + behavior: 'smooth', + scrollMode: 'if-needed', + }); + } + }, 0); +}; +var AsyncTasksComponent = function () { + var _a = __read(React.useState(false), 2), showBar = _a[0], setShowBar = _a[1]; + useRenderOnAsyncTasksAddOrRemove(); + var addSnack = useSnack(); + var history = useHistory(); + React.useEffect(function () { + var timeoutid = undefined; + timeoutid = window.setTimeout(function () { + setShowBar(false); + }, 1000); + return function () { + clearTimeout(timeoutid); + }; + }, [showBar]); + React.useEffect(function () { + var timeoutid = undefined; + if (AsyncTasks.hasShowableTasks()) { + setShowBar(true); + window.onbeforeunload = function () { + setShowBar(true); + return "Are you sure you want to leave? ".concat(AsyncTasks.list.length, " tasks are still running."); + }; + } + else { + setShowBar(false); + } + timeoutid = window.setTimeout(function () { + setShowBar(false); + }, 1000); + return function () { + clearTimeout(timeoutid); + window.onbeforeunload = null; + }; + }, [AsyncTasks.list.length]); + React.useEffect(function () { + var unsubs = AsyncTasks.list.map(function (task) { + return task.subscribeTo({ + subscribableThing: 'update', + callback: function () { + AsyncTasks.remove(task); + if (AsyncTasks.isRestoreTask(task)) { + addSnack("Restore of ".concat(task.lazyResult.plain.metacard.properties.title, " complete."), { + timeout: 5000, + closeable: true, + alertProps: { + action: (React.createElement(Button, { component: Link, to: "/search/".concat(task.lazyResult.plain.metacard.properties['metacard.deleted.id']) }, "Go to")), + }, + }); + } + if (AsyncTasks.isDeleteTask(task)) { + addSnack("Delete of ".concat(task.lazyResult.plain.metacard.properties.title, " complete."), { + undo: function () { + history.push({ + pathname: "/search/".concat(task.lazyResult.plain.id), + search: '', + }); + AsyncTasks.restore({ lazyResult: task.lazyResult }); + }, + }); + } + if (AsyncTasks.isCreateSearchTask(task)) { + addSnack("Creation of ".concat(task.data.title, " complete.")); + } + }, + }); + }); + return function () { + unsubs.forEach(function (unsub) { + unsub(); + }); + }; + }); + if (AsyncTasks.list.length > 0) { + return (React.createElement("div", { className: "".concat(showBar ? 'translate-y-0' : 'translate-y-full', " absolute left-0 bottom-0 w-full bg-black bg-opacity-75 h-16 z-50 transition transform ease-in-out duration-500 hover:translate-y-0") }, + React.createElement(LinearProgress, { className: "w-full absolute h-2 left-0 top-0 -mt-2", variant: "indeterminate" }), + React.createElement("div", { className: "flex flex-col overflow-auto h-full w-full items-center justify-center text-white" }, AsyncTasks.list.map(function (asyncTask) { + if (AsyncTasks.isRestoreTask(asyncTask)) { + return (React.createElement("div", { className: "bg-black p-2" }, + "Restoring '", + asyncTask.lazyResult.plain.metacard.properties.title, + "'")); + } + if (AsyncTasks.isDeleteTask(asyncTask)) { + return (React.createElement("div", { className: "bg-black p-2" }, + "Deleting '", + asyncTask.lazyResult.plain.metacard.properties.title, + "'")); + } + if (AsyncTasks.isCreateSearchTask(asyncTask)) { + return (React.createElement("div", { className: "bg-black p-2" }, + "Creating '", + asyncTask.data.title, + "'")); + } + if (AsyncTasks.isSaveSearchTask(asyncTask)) { + return (React.createElement("div", { className: "bg-black p-2" }, + "Saving '", + asyncTask.data.title, + "'")); + } + if (AsyncTasks.isCreateTask(asyncTask)) { + return (React.createElement("div", { className: "bg-black p-2" }, + "Creating '", + asyncTask.data.title, + "'")); + } + if (AsyncTasks.isSaveTask(asyncTask)) { + return (React.createElement("div", { className: "bg-black p-2" }, + "Saving '", + asyncTask.data.title, + "'")); + } + return null; + })))); + } + return null; +}; +/** The song and dance around 'a' vs Link has to do with react router not supporting these outside links */ +var HelpButton = function () { + var getHelpUrl = useConfiguration().getHelpUrl; + var location = useLocation(); + var queryParams = queryString.parse(location.search); + var navOpen = useNavContextProvider().navOpen; + return (React.createElement(ExpandingButton, { component: getHelpUrl() ? 'a' : Link, href: getHelpUrl(), to: getHelpUrl() + ? getHelpUrl() + : { + pathname: "".concat(location.pathname), + search: "".concat(queryString.stringify(__assign(__assign({}, queryParams), { 'global-help': 'Help' }))), + }, target: getHelpUrl() ? '_blank' : undefined, className: "group-hover:opacity-100 opacity-25 hover:opacity-100 focus-visible:opacity-100 transition-opacity", Icon: HelpIcon, expandedLabel: "Help", unexpandedLabel: "", dataId: sidebarDataIdTag('help'), expanded: navOpen, focusVisibleClassName: "focus-visible" })); +}; +function DrawerWrapperComponent(_a) { + var children = _a.children; + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "w-full h-full flex flex-col flex-nowrap overflow-hidden" }, + Extensions.includeNavigationButtons ? (React.createElement("div", { className: "w-full shrink-0 grow-0 overflow-hidden" }, + React.createElement(SideBarNavigationButtons, { showText: true }), + React.createElement(Divider, null))) : null, + React.createElement("div", { className: "w-full h-full grow shrink overflow-auto" }, children)))); +} +var SettingsButton = function () { + var SettingsComponents = useTopLevelAppContext().SettingsComponents; + var location = useLocation(); + var history = useHistory(); + var queryParams = queryString.parse(location.search); + var open = Boolean(queryParams['global-settings']); + var navOpen = useNavContextProvider().navOpen; + return (React.createElement(React.Fragment, null, + React.createElement(ExpandingButton, { component: Link, to: { + pathname: "".concat(location.pathname), + search: "".concat(queryString.stringify(__assign(__assign({}, queryParams), { 'global-settings': 'Settings' }))), + }, className: "group-hover:opacity-100 opacity-25 relative hover:opacity-100 focus-visible:opacity-100 transition-opacity", Icon: SettingsIcon, expandedLabel: "Settings", unexpandedLabel: "", dataId: sidebarDataIdTag('settings'), expanded: navOpen, focusVisibleClassName: "focus-visible" }), + React.createElement(Drawer, { anchor: "left", open: open, onClose: function () { + delete queryParams['global-settings']; + history.push("".concat(location.pathname, "?").concat(queryString.stringify(queryParams))); + }, PaperProps: { + className: 'min-w-120 max-w-4/5 ', + } }, + React.createElement(DrawerWrapperComponent, null, + React.createElement(UserSettings, { SettingsComponents: SettingsComponents }))))); +}; +var NotificationsButton = function () { + var hasUnseenNotifications = useIndicateHasUnseenNotifications(); + var NotificationsComponent = useTopLevelAppContext().NotificationsComponent; + var location = useLocation(); + var history = useHistory(); + var queryParams = queryString.parse(location.search); + var open = Boolean(queryParams['global-notifications']); + var navOpen = useNavContextProvider().navOpen; + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: hasUnseenNotifications ? 'animate-wiggle Mui-text-warning' : '' }, + React.createElement(ExpandingButton, { component: Link, to: { + pathname: "".concat(location.pathname), + search: "".concat(queryString.stringify(__assign(__assign({}, queryParams), { 'global-notifications': 'Notifications' }))), + }, className: "".concat(!hasUnseenNotifications ? 'opacity-25' : '', " group-hover:opacity-100 relative hover:opacity-100 focus-visible:opacity-100 transition-opacity"), Icon: NotificationsIcon, expandedLabel: "Notifications", unexpandedLabel: "", dataId: sidebarDataIdTag('notifications'), expanded: navOpen, focusVisibleClassName: "focus-visible", orientation: "vertical" })), + React.createElement(Drawer, { anchor: "left", open: open, onClose: function () { + delete queryParams['global-notifications']; + history.push("".concat(location.pathname, "?").concat(queryString.stringify(queryParams))); + notifications.setSeen(); + userInstance.savePreferences(); + }, PaperProps: { + className: 'min-w-120 max-w-4/5 ', + } }, + React.createElement(DrawerWrapperComponent, null, + React.createElement(NotificationsComponent, null))))); +}; +var UserButton = function () { + var location = useLocation(); + var history = useHistory(); + var queryParams = queryString.parse(location.search); + var open = Boolean(queryParams['global-user']); + var navOpen = useNavContextProvider().navOpen; + var getLabel = function () { + return (React.createElement("div", { className: "w-full" }, + React.createElement("div", { className: "w-full truncate" }, userInstance.getUserName()), + React.createElement("div", { className: "text-xs truncate w-full" }, + React.createElement(RoleDisplay, null)))); + }; + return (React.createElement(React.Fragment, null, + React.createElement(ExpandingButton, { component: Link, to: { + pathname: "".concat(location.pathname), + search: "".concat(queryString.stringify(__assign(__assign({}, queryParams), { 'global-user': 'User' }))), + }, className: "group-hover:opacity-100 opacity-25 relative hover:opacity-100 focus-visible:opacity-100 transition-opacity", Icon: PersonIcon, expandedLabel: getLabel(), unexpandedLabel: getLabel(), dataId: sidebarDataIdTag('user-profile'), expanded: navOpen, focusVisibleClassName: "focus-visible" }), + React.createElement(Drawer, { anchor: "left", open: open, onClose: function () { + delete queryParams['global-user']; + history.push("".concat(location.pathname, "?").concat(queryString.stringify(queryParams))); + }, PaperProps: { + className: 'min-w-120 max-w-4/5 ', + } }, + React.createElement(DrawerWrapperComponent, null, + React.createElement(UserView, null))))); +}; +var RouteButton = function (_a) { + var _b; + var routeInfo = _a.routeInfo; + var location = useLocation(); + var navOpen = useNavContextProvider().navOpen; + var isSelected = matchesRoute({ + routeInfo: routeInfo, + pathname: location.pathname, + }); + return (React.createElement(ExpandingButton, __assign({ key: routeInfo.linkProps.to.toString(), component: Link, to: routeInfo.linkProps.to, className: "group-hover:opacity-100 ".concat(!isSelected ? 'opacity-25' : '', " focus-visible:opacity-100 hover:opacity-100 transition-opacity"), expanded: navOpen }, routeInfo.navButtonProps, { focusVisibleClassName: "focus-visible", dataId: sidebarDataIdTag(routeInfo.navButtonProps.dataId) }, (isSelected + ? (_b = {}, + _b['data-currentroute'] = true, + _b) : {})))); +}; +var SideBarRoutes = function () { + var RouteInformation = useTopLevelAppContext().RouteInformation; + return (React.createElement(Grid, { item: true, className: "overflow-auto p-0 shrink-0 scrollbars-min", style: { + maxHeight: "calc(100% - ".concat(7 * 4, "rem)"), // + } }, + RouteInformation.filter(function (routeInfo) { return routeInfo.showInNav; }).map(function (routeInfo) { + var _a; + return (React.createElement(RouteButton, { routeInfo: routeInfo, key: (_a = routeInfo.routeProps.path) === null || _a === void 0 ? void 0 : _a.toString() })); + }), + React.createElement(Extensions.extraRoutes, null))); +}; +var SideBarNavigationButtons = function (_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.showText, showText = _c === void 0 ? false : _c; + var navOpen = useNavContextProvider().navOpen; + var showExpandedText = navOpen || showText; + return (React.createElement(React.Fragment, null, + React.createElement(Grid, { item: true, className: "w-full p-2 shrink-0" }, + React.createElement(Grid, { container: true, wrap: "nowrap", alignItems: "center", className: "w-full h-full overflow-hidden" }, + React.createElement(Grid, { item: true, className: "mr-auto" }, + React.createElement(Button, { onClick: function () { return history.back(); } }, + React.createElement(ArrowBackIcon, { fontSize: "small" }), + showExpandedText && 'Back')), + React.createElement(Grid, { item: true, className: "ml-auto" }, + React.createElement(Button, { onClick: function () { return history.forward(); } }, + showExpandedText && 'Forward', + React.createElement(ArrowForwardIcon, { fontSize: "small" }))))))); +}; +var SideBarToggleButton = function () { + var _a = useNavContextProvider(), navOpen = _a.navOpen, setNavOpen = _a.setNavOpen; + var _b = useConfiguration(), getTopLeftLogoSrc = _b.getTopLeftLogoSrc, getCustomBranding = _b.getCustomBranding, getProduct = _b.getProduct, getMenuIconSrc = _b.getMenuIconSrc; + return (React.createElement(React.Fragment, null, + React.createElement(Grid, { item: true, className: "w-full h-16 shrink-0" }, navOpen ? (React.createElement(React.Fragment, null, + React.createElement(Grid, { container: true, wrap: "nowrap", alignItems: "center", className: "w-full h-full overflow-hidden" }, + React.createElement(Grid, { item: true, className: "pl-3 py-1 pr-1 w-full relative h-full" }, getTopLeftLogoSrc() ? (React.createElement("img", { className: "max-h-full max-w-full absolute left-1/2 transform -translate-x-1/2 -translate-y-1/2 top-1/2 p-4", src: handleBase64EncodedImages(getTopLeftLogoSrc()) })) : (React.createElement(Grid, { container: true, direction: "column", className: "pl-3", justifyContent: "center" }, + React.createElement(Grid, { item: true }, + React.createElement(Typography, null, getCustomBranding())), + React.createElement(Grid, { item: true }, + React.createElement(Typography, null, getProduct()))))), + React.createElement(Grid, { item: true, className: "ml-auto" }, + React.createElement(IconButton, { className: "h-auto", onClick: function () { + setNavOpen(false); + }, size: "large" }, + React.createElement(ChevronLeftIcon, null)))))) : (React.createElement(Button, { color: "inherit", "aria-label": "open drawer", onClick: function () { + setNavOpen(true); + }, className: "w-full h-full p-2" }, getMenuIconSrc() ? (React.createElement(React.Fragment, null, + React.createElement("img", { src: handleBase64EncodedImages(getMenuIconSrc()), className: "max-h-16 max-w-full" }))) : (React.createElement(MenuIcon, null))))))); +}; +var SideBar = function () { + var navOpen = useNavContextProvider().navOpen; + return (React.createElement(Grid, { item: true, className: "".concat(navOpen ? 'w-64' : 'w-20', " transition-all duration-200 ease-in-out relative z-10 mr-2 shrink-0 pb-2 pt-2 pl-2 group"), onMouseLeave: function () { + scrollCurrentRouteIntoView(); + } }, + React.createElement(Paper, { elevation: Elevations.navbar, className: "h-full" }, + React.createElement(Grid, { container: true, direction: "column", className: "h-full w-full", wrap: "nowrap" }, + Extensions.includeNavigationButtons && (React.createElement(React.Fragment, null, + React.createElement(SideBarNavigationButtons, null), + React.createElement(Divider, null))), + React.createElement(SideBarToggleButton, null), + React.createElement(Divider, null), + React.createElement(SideBarRoutes, null), + React.createElement(Divider, null), + React.createElement(SideBarBackground, null), + React.createElement(Divider, null), + React.createElement(Grid, { item: true, className: "mt-auto overflow-hidden w-full shrink-0 grow-0" }, + Extensions.extraSidebarButtons && (React.createElement(Extensions.extraSidebarButtons, null)), + React.createElement(HelpButton, null), + React.createElement(SettingsButton, null), + React.createElement(NotificationsButton, null), + React.createElement(UserButton, null)))))); +}; +var Header = function () { + var _a = useConfiguration(), getPlatformBackground = _a.getPlatformBackground, getPlatformColor = _a.getPlatformColor, getPlatformHeader = _a.getPlatformHeader; + return (React.createElement(Grid, { item: true, className: "w-full" }, getPlatformHeader() ? (React.createElement(Typography, { align: "center", style: { + background: getPlatformBackground(), + color: getPlatformColor(), + } }, getPlatformHeader())) : null)); +}; +var Footer = function () { + var _a = useConfiguration(), getPlatformBackground = _a.getPlatformBackground, getPlatformColor = _a.getPlatformColor, getPlatformFooter = _a.getPlatformFooter; + return (React.createElement(Grid, { item: true, className: "w-full" }, getPlatformFooter() ? (React.createElement(Typography, { align: "center", style: { + background: getPlatformBackground(), + color: getPlatformColor(), + } }, getPlatformFooter())) : null)); +}; +var SideBarBackground = function () { + var getBottomLeftBackgroundSrc = useConfiguration().getBottomLeftBackgroundSrc; + return (React.createElement(Grid, { item: true, className: "relative overflow-hidden shrink-1 h-full min-w-full" }, getBottomLeftBackgroundSrc() ? (React.createElement("img", { className: "group-hover:opacity-100 opacity-50 duration-200 ease-in-out transition-all w-auto h-full absolute max-w-none m-auto min-h-80", src: handleBase64EncodedImages(getBottomLeftBackgroundSrc()) })) : null)); +}; +var RouteContents = function () { + var RouteInformation = useTopLevelAppContext().RouteInformation; + /** + * So this is slightly annoying, but the grid won't properly resize without overflow hidden set. + * + * That makes handling padding / margins / spacing more complicated in our app, because with overflow hidden set + * dropshadows on elements will get cut off. So we have to let the contents instead dictate their padding, that way + * their dropshadows can be seen. + * + * Folks will probably struggle a bit with it at first, but the css utilities actually make it pretty easy. + * Just add pb-2 for the correct bottom spacing, pt-2 for correct top spacing, etc. etc. + */ + return (React.createElement(Grid, { item: true, className: "w-full h-full relative z-0 shrink-1 overflow-x-hidden" // do not remove this overflow hidden, see comment above for more + }, + React.createElement(Memo, null, + React.createElement(Switch, null, RouteInformation.map(function (routeInfo) { + return (React.createElement(Route, __assign({ key: routeInfo.routeProps.path + ? routeInfo.routeProps.path.toString() + : Math.random() }, routeInfo.routeProps))); + }))))); +}; +var NavContextProvider = React.createContext({ + setNavOpen: function (_navOpen) { }, + navOpen: false, +}); +export var useNavContextProvider = function () { + var navContext = React.useContext(NavContextProvider); + return navContext; +}; +/** + * Keep the current route visible to the user since it's useful info. + * This also ensures it's visible upon first load of the page. + */ +var useScrollCurrentRouteIntoViewOnLocationChange = function () { + var location = useLocation(); + React.useEffect(function () { + scrollCurrentRouteIntoView(); + }, [location]); +}; +var useIndicateHasUnseenNotifications = function () { + var listenTo = useBackbone().listenTo; + var _a = __read(React.useState(notifications.hasUnseen()), 2), hasUnseenNotifications = _a[0], setHasUnseenNotifications = _a[1]; + React.useEffect(function () { + listenTo(notifications, 'change add remove reset update', function () { + setHasUnseenNotifications(notifications.hasUnseen()); + }); + }, []); + return hasUnseenNotifications; +}; +var useFaviconBranding = function () { + // todo favicon branding + // $(window.document).ready(() => { + // window.document.title = properties.branding + ' ' + properties.product + // const favicon = document.querySelector('#favicon') as HTMLAnchorElement + // favicon.href = brandingInformation.topLeftLogoSrc + // favicon.remove() + // document.head.appendChild(favicon) + // }) +}; +var useNavOpen = function () { + var defaultOpen = localStorage.getItem('shell.drawer') === 'true' ? true : false; + var _a = __read(React.useState(defaultOpen), 2), navOpen = _a[0], setNavOpen = _a[1]; + React.useEffect(function () { + localStorage.setItem('shell.drawer', navOpen.toString()); + setTimeout(function () { + $(window).resize(); // needed for golden layout to resize + }, 250); + }, [navOpen]); + return { + navOpen: navOpen, + setNavOpen: setNavOpen, + }; +}; +var TopLevelAppContext = React.createContext({ + RouteInformation: [], + NotificationsComponent: function () { return null; }, + SettingsComponents: {}, +}); +var useTopLevelAppContext = function () { + var topLevelAppContext = React.useContext(TopLevelAppContext); + return topLevelAppContext; +}; +var SessionTimeoutComponent = function () { + var sessionTimeoutDialogState = useDialogState(); + useListenTo(sessionTimeoutModel, 'change:showPrompt', function () { + if (sessionTimeoutModel.get('showPrompt')) { + sessionTimeoutDialogState.handleClick(); + } + else { + sessionTimeoutDialogState.handleClose(); + } + }); + return (React.createElement(sessionTimeoutDialogState.MuiDialogComponents.Dialog, __assign({}, sessionTimeoutDialogState.MuiDialogProps, { disableEscapeKeyDown: true, onClose: function (event, reason) { + if (reason === 'backdropClick') { + return; + } + sessionTimeoutDialogState.MuiDialogProps.onClose(event, reason); + } }), + React.createElement(SessionTimeout, null))); +}; +var App = function (_a) { + var RouteInformation = _a.RouteInformation, NotificationsComponent = _a.NotificationsComponent, SettingsComponents = _a.SettingsComponents; + var _b = useNavOpen(), navOpen = _b.navOpen, setNavOpen = _b.setNavOpen; + useFaviconBranding(); + useScrollCurrentRouteIntoViewOnLocationChange(); + return (React.createElement(TopLevelAppContext.Provider, { value: { RouteInformation: RouteInformation, NotificationsComponent: NotificationsComponent, SettingsComponents: SettingsComponents } }, + React.createElement(NavContextProvider.Provider, { value: { navOpen: navOpen, setNavOpen: setNavOpen } }, + React.createElement("div", { className: "h-full w-full overflow-hidden Mui-bg-default" }, + React.createElement(CssBaseline, null), + React.createElement(GlobalStyles, null), + React.createElement(SystemUsageModal, null), + React.createElement(SessionTimeoutComponent, null), + React.createElement(AjaxErrorHandling, null), + React.createElement(WreqrSnacks, null), + React.createElement(Grid, { container: true, alignItems: "center", className: "h-full w-full overflow-hidden", direction: "column", wrap: "nowrap" }, + React.createElement(Header, null), + React.createElement(Extensions.extraHeader, null), + React.createElement(Grid, { item: true, className: "w-full h-full relative overflow-hidden" }, + React.createElement(AsyncTasksComponent, null), + React.createElement(Grid, { container: true, direction: "row", wrap: "nowrap", alignItems: "stretch", className: "w-full h-full" }, + React.createElement(SideBar, null), + React.createElement(RouteContents, null))), + React.createElement(Extensions.extraFooter, null), + React.createElement(Footer, null)))))); +}; +export default hot(App); +//# sourceMappingURL=data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zdG9yZSBvZiAke3Rhc2subGF6eVJlc3VsdC5wbGFpbi5tZXRhY2FyZC5wcm9wZXJ0aWVzLnRpdGxlfSBjb21wbGV0ZS5gLFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGltZW91dDogNTAwMCxcbiAgICAgICAgICAgICAgICBjbG9zZWFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgYWxlcnRQcm9wczoge1xuICAgICAgICAgICAgICAgICAgYWN0aW9uOiAoXG4gICAgICAgICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ9e0xpbmt9XG4gICAgICAgICAgICAgICAgICAgICAgdG89e2Avc2VhcmNoLyR7dGFzay5sYXp5UmVzdWx0LnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXNbJ21ldGFjYXJkLmRlbGV0ZWQuaWQnXX1gfVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgR28gdG9cbiAgICAgICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKEFzeW5jVGFza3MuaXNEZWxldGVUYXNrKHRhc2spKSB7XG4gICAgICAgICAgICBhZGRTbmFjayhcbiAgICAgICAgICAgICAgYERlbGV0ZSBvZiAke3Rhc2subGF6eVJlc3VsdC5wbGFpbi5tZXRhY2FyZC5wcm9wZXJ0aWVzLnRpdGxlfSBjb21wbGV0ZS5gLFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdW5kbzogKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWU6IGAvc2VhcmNoLyR7dGFzay5sYXp5UmVzdWx0LnBsYWluLmlkfWAsXG4gICAgIC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JpYW50PVwiaW5kZXRlcm1pbmF0ZVwiXG4gICAgICAgIC8+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LWNvbCBvdmVyZmxvdy1hdXRvIGgtZnVsbCB3LWZ1bGwgaXRlbXMtY2VudGVyIGp1c3RpZnktY2VudGVyIHRleHQtd2hpdGVcIj5cbiAgICAgICAgICB7QXN5bmNUYXNrcy5saXN0Lm1hcCgoYXN5bmNUYXNrKSA9PiB7XG4gICAgICAgICAgICBpZiAoQXN5bmNUYXNrcy5pc1Jlc3RvcmVUYXNrKGFzeW5jVGFzaykpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImJnLWJsYWNrIHAtMlwiPlxuICAgICAgICAgICAgICAgICAgUmVzdG9yaW5nICdcbiAgICAgICAgICAgICAgICAgIHthc3luY1Rhc2subGF6eVJlc3VsdC5wbGFpbi5tZXRhY2FyZC5wcm9wZXJ0aWVzLnRpdGxlfSdcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKEFzeW5jVGFza3MuaXNEZWxldGVUYXNrKGFzeW5jVGFzaykpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImJnLWJsYWNrIHAtMlwiPlxuICAgICAgICAgICAgICAgICAgRGVsZXRpbmcgJ1xuICAgICAgICAgICAgICAgICAge2FzeW5jVGFzay5sYXp5UmVzdWx0LnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMudGl0bGV9J1xuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoQXN5bmNUYXNrcy5pc0NyZWF0ZVNlYXJjaFRhc2soYXN5bmNUYXNrKSkge1xuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiYmctYmxhY2sgcC0yXCI+XG4gICAgICAgICAgICAgICAgICBDcmVhdGluZyAne2FzeW5jVGFzay5kYXRhLnRpdGxlfSdcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKEFzeW5jVGFza3MuaXNTYXZlU2VhcmNoVGFzayhhc3luY1Rhc2spKSB7XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJiZy1ibGFjayBwLTJcIj5cbiAgICAgICAgICAgICAgICAgIFNhdmluZyAne2FzeW5jVGFzay5kYXRhLnRpdGxlfSdcbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKEFzeW5jVGFza3MuaXNDcmVhdGVUYXNrKGFzeW5jVGFzaykpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImJnLWJsYWNrIHAtMlwiPlxuICAgICAgICAgICAgICAgICAgQ3JlYXRpbmcgJ3thc3luY1Rhc2suZGF0YS50aXRsZX0nXG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChBc3luY1Rhc2tzLmlzU2F2ZVRhc2soYXN5bmNUYXNrKSkge1xuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiYmctYmxhY2sgcC0yXCI+XG4gICAgICAgICAgICAgICAgICBTYXZpbmcgJ3thc3luY1Rhc2suZGF0YS50aXRsZX0nXG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgIClcbiAgICA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dXRlIGxlZnQtMS8yIHRyYW5zZm9ybSAtdHJhbnNsYXRlLXgtMS8yIC10cmFuc2xhdGUteS0xLzIgdG9wLTEvMiBwLTRcIlxuICAgICAgICAgICAgICAgICAgICBzcmM9e2hhbmRsZUJhc2U2NEVuY29kZWRJbWFnZXMoZ2V0VG9wTGVmdExvZ29TcmMoKSl9XG4gICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgICA8R3JpZFxuICAgICAgICAgICAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uPVwiY29sdW1uXCJcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwicGwtM1wiXG4gICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50PVwiY2VudGVyXCJcbiAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgICAgICAgICAgICA8VHlwb2dyYXBoeT57Z2V0Q3VzdG9tQnJhbmRpbmcoKX08L1R5cG9ncmFwaHk+XG4gICAgICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgICAgICAgICAgICA8VHlwb2dyYXBoeT57Z2V0UHJvZHVjdCgpfTwvVHlwb2dyYXBoeT5cbiAgICAgICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJtbC1hdXRvXCI+XG4gICAgICAgICAgICAgICAgPEljb25CdXR0b25cbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImgtYXV0b1wiXG4gICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHNldE5hdk9wZW4oZmFsc2UpXG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgc2l6ZT1cImxhcmdlXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICA8Q2hldnJvbkxlZnRJY29uIC8+XG4gICAgICAgICAgICAgICAgPC9JY29uQnV0dG9uPlxuICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgPC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJvcGVuIGRyYXdlclwiXG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgIHNldE5hdk9wZW4odHJ1ZSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1mdWxsIHAtMlwiXG4gICAgICAgICAgPlxuICAgICAgICAgICAge2dldE1lbnVJY29uU3JjKCkgPyAoXG4gICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgPGltZ1xuICAgICAgICAgICAgICAgICAgc3JjPXtoYW5kbGVCYXNlNjRFbmNvZGVkSW1hZ2VzKGdldE1lbnVJY29uU3JjKCkpfVxuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwibWF4LWgtMTYgbWF4LXctZnVsbFwiXG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICA8TWVudUljb24gLz5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICl9XG4gICAgICA8L0dyaWQ+XG4gICAgPC8+XG4gIClcbn1cbmNvbnN0IFNpZGVCYXIgPSAoKSA9PiB7XG4gIGNvbnN0IHsgbmF2T3BlbiB9ID0gdXNlTmF2Q29udGV4dFByb3ZpZGVyKClcbiAgcmV0dXJuIChcbiAgICA8R3JpZFxuICAgICAgaXRlbVxuICAgICAgY2xhc3NOYW1lPXtgJHtcbiAgICAgICAgbmF2T3BlbiA/ICd3LTY0JyA6ICd3LTIwJ1xuICAgICAgfSB0cmFuc2l0aW9uLWFsbCBkdXJhdGlvbi0yMDAgZWFzZS1pbi1vdXQgcmVsYXRpdmUgei0xMCBtci0yIHNocmluay0wIHBiLTIgcHQtMiBwbC0yIGdyb3VwYH1cbiAgICAgIG9uTW91c2VMZWF2ZT17KCkgPT4ge1xuICAgICAgICBzY3JvbGxDdXJyZW50Um91dGVJbnRvVmlldygpXG4gICAgICB9fVxuICAgID5cbiAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMubmF2YmFyfSBjbGFzc05hbWU9XCJoLWZ1bGxcIj5cbiAgICAgICAgPEdyaWRcbiAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICBkaXJlY3Rpb249XCJjb2x1bW5cIlxuICAgICAgICAgIGNsYXNzTmFtZT1cImgtZnVsbCB3LWZ1bGxcIlxuICAgICAgICAgIHdyYXA9XCJub3dyYXBcIlxuICAgICAgICA+XG4gICAgICAgICAge0V4dGVuc2lvbnMuaW5jbHVkZU5hdmlnYXRpb25CdXR0b25zICYmIChcbiAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgIDxTaWRlQmFyTmF2aWdhdGlvbkJ1dHRvbnMgLz5cbiAgICAgICAgICAgICAgPERpdmlkZXIgLz5cbiAgICAgICAgICAgIDwvPlxuICAgICAgICAgICl9XG4gICAgICAgICAgPFNpZGVCYXJUb2dnbGVCdXR0b24gLz5cbiAgICAgICAgICA8RGl2aWRlciAvPlxuICAgICAgICAgIDxTaWRlQmFyUm91dGVzIC8+XG4gICAgICAgICAgPERpdmlkZXIgLz5cbiAgICAgICAgICA8U2lkZUJhckJhY2tncm91bmQgLz5cbiAgICAg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kXG4gICAgICAgICAgICAgICAgY29udGFpbmVyXG4gICAgICAgICAgICAgICAgZGlyZWN0aW9uPVwicm93XCJcbiAgICAgICAgICAgICAgICB3cmFwPVwibm93cmFwXCJcbiAgICAgICAgICAgICAgICBhbGlnbkl0ZW1zPVwic3RyZXRjaFwiXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiXG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8U2lkZUJhciAvPlxuICAgICAgICAgICAgICAgIDxSb3V0ZUNvbnRlbnRzIC8+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDxFeHRlbnNpb25zLmV4dHJhRm9vdGVyIC8+XG4gICAgICAgICAgICA8Rm9vdGVyIC8+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvTmF2Q29udGV4dFByb3ZpZGVyLlByb3ZpZGVyPlxuICAgIDwvVG9wTGV2ZWxBcHBDb250ZXh0LlByb3ZpZGVyPlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QoQXBwKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/app/base-app.d.ts b/src/main/webapp/component/app/base-app.d.ts new file mode 100644 index 00000000000..89d55991dee --- /dev/null +++ b/src/main/webapp/component/app/base-app.d.ts @@ -0,0 +1,14 @@ +/// +import { IndividualRouteType } from './app'; +/** + * The issue with the original golden layout code for popout is that it will go to the current route and then load gl and all that. + * + * However, usually there are things on the route we don't want to run (for performance sometimes, and for other times because they reset prefs or whatnot to clear things) + * + * As a result, we have this route that is just for the popout, it doesn't show in the nav, and it doesn't run the other things on the route + * + * We have to have an instance of golden layout for the popout to attach to, which this provides, with a query that's blank (just so we can transfer results and what not to it) + */ +export declare const GoldenLayoutPopoutRoute: IndividualRouteType; +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/app/base-app.js b/src/main/webapp/component/app/base-app.js new file mode 100644 index 00000000000..87208b66f64 --- /dev/null +++ b/src/main/webapp/component/app/base-app.js @@ -0,0 +1,270 @@ +import * as React from 'react'; +import App, { useDefaultWelcome } from './app'; +import Help from '../help/help.view'; +import { hot } from 'react-hot-loader/root'; +import { IngestDetailsViewReact } from '../ingest-details/ingest-details.view'; +import { HomePage } from '../pages/search'; +import SourcesPage from '../../react-component/sources/presentation'; +import SourcesPageIcon from '@mui/icons-material/Cloud'; +import AboutPage from '../../react-component/about'; +import AboutPageIcon from '@mui/icons-material/Info'; +import FolderIcon from '@mui/icons-material/Folder'; +import TrashIcon from '@mui/icons-material/Delete'; +import SearchIcon from '@mui/icons-material/Search'; +import ImageSearch from '@mui/icons-material/ImageSearch'; +import UserNotifications from '../../react-component/user-notifications/user-notifications'; +import { BaseSettings } from '../../react-component/user-settings/user-settings'; +import ExtensionPoints from '../../extension-points/extension-points'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +import { Redirect } from 'react-router-dom'; +import Grid from '@mui/material/Grid'; +import MetacardNavRoute from '../pages/metacard-nav'; +import MetacardRoute from '../pages/metacard'; +import SavedSearches from '../pages/browse'; +import Open from '../pages/open'; +import Restore from '../pages/restore'; +import Create from '../pages/create'; +import AddIcon from '@mui/icons-material/Add'; +import ViewListIcon from '@mui/icons-material/ViewList'; +import { GoldenLayoutViewReact } from '../golden-layout/golden-layout.view'; +import selectionInterfaceModel from '../selection-interface/selection-interface.model'; +import { Query } from '../../js/model/TypedQuery'; +/** + * The issue with the original golden layout code for popout is that it will go to the current route and then load gl and all that. + * + * However, usually there are things on the route we don't want to run (for performance sometimes, and for other times because they reset prefs or whatnot to clear things) + * + * As a result, we have this route that is just for the popout, it doesn't show in the nav, and it doesn't run the other things on the route + * + * We have to have an instance of golden layout for the popout to attach to, which this provides, with a query that's blank (just so we can transfer results and what not to it) + */ +export var GoldenLayoutPopoutRoute = { + routeProps: { + path: '/_gl_popout', + children: function () { + var baseQuery = Query(); + return (React.createElement("div", { className: "w-full h-full pb-2 pt-2 pr-2" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(GoldenLayoutViewReact, { selectionInterface: new selectionInterfaceModel({ currentQuery: baseQuery }), setGoldenLayout: function () { }, configName: "goldenLayout" })))); + }, + }, + showInNav: false, +}; +var RouteInformation = [ + { + showInNav: false, + routeProps: { + exact: true, + path: '/', + children: function () { + return React.createElement(Redirect, { to: "/search" }); + }, + }, + }, + { + showInNav: false, + routeProps: { + exact: true, + path: '/uploads/:uploadId', + children: function () { + return (React.createElement(Grid, { container: true, direction: "column", className: "w-full h-full", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full h-full z-0 relative overflow-hidden" }, + React.createElement(MetacardRoute, null)))); + }, + }, + }, + { + showInNav: false, + routeProps: { + exact: true, + path: '/metacards/:metacardId', + children: function () { + return (React.createElement(Grid, { container: true, direction: "column", className: "w-full h-full", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full h-16 z-1 relative pt-2 pr-2" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full px-3" }, + React.createElement(MetacardNavRoute, null))), + React.createElement(Grid, { item: true, className: "w-full h-full z-0 relative overflow-hidden" }, + React.createElement(MetacardRoute, null)))); + }, + }, + }, + { + navButtonProps: { + expandedLabel: 'Search', + unexpandedLabel: 'Search', + Icon: SearchIcon, + dataId: 'search', + }, + routeProps: { + exact: false, + path: ['/search/:id', '/search'], + children: function () { + return React.createElement(HomePage, null); + }, + }, + linkProps: { + to: '/search', + }, + showInNav: true, + }, + { + navButtonProps: { + expandedLabel: 'Create', + unexpandedLabel: 'Create', + Icon: AddIcon, + dataId: 'create', + }, + routeProps: { + exact: true, + path: ['/create'], + children: function () { + return (React.createElement("div", { className: "py-2 pr-2 w-full h-full" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(Create, null)))); + }, + }, + linkProps: { + to: '/create', + }, + showInNav: true, + }, + { + navButtonProps: { + expandedLabel: 'Open', + unexpandedLabel: 'Open', + Icon: FolderIcon, + dataId: 'open', + }, + routeProps: { + exact: true, + path: ['/open'], + children: function () { + return (React.createElement("div", { className: "py-2 pr-2 w-full h-full" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(Open, null)))); + }, + }, + linkProps: { + to: '/open', + }, + showInNav: true, + }, + { + navButtonProps: { + expandedLabel: 'Browse', + unexpandedLabel: 'Browse', + Icon: ViewListIcon, + dataId: 'browse', + }, + routeProps: { + exact: true, + path: ['/browse'], + children: function () { + return (React.createElement("div", { className: "w-full h-full" }, + React.createElement(SavedSearches, null))); + }, + }, + linkProps: { + to: '/browse', + }, + showInNav: true, + }, + { + navButtonProps: { + expandedLabel: 'Upload', + unexpandedLabel: 'Upload', + Icon: ImageSearch, + dataId: 'upload', + }, + routeProps: { + path: '/upload', + children: function () { + return (React.createElement("div", { className: "w-full h-full pb-2 pt-2 pr-2" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(IngestDetailsViewReact, null)))); + }, + }, + linkProps: { + to: '/upload', + }, + showInNav: true, + }, + { + navButtonProps: { + expandedLabel: 'Sources', + unexpandedLabel: 'Sources', + Icon: SourcesPageIcon, + dataId: 'sources', + }, + routeProps: { + path: '/sources', + children: function () { + return (React.createElement("div", { className: "w-full h-full pb-2 pt-2 pr-2" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(SourcesPage, null)))); + }, + }, + linkProps: { + to: '/sources', + }, + showInNav: true, + }, + { + navButtonProps: { + expandedLabel: 'Restore', + unexpandedLabel: 'Restore', + Icon: TrashIcon, + dataId: 'restore', + }, + routeProps: { + exact: true, + path: ['/restore'], + children: function () { + return (React.createElement("div", { className: "py-2 pr-2 w-full h-full" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(Restore, null)))); + }, + }, + linkProps: { + to: '/restore', + }, + showInNav: true, + }, + { + navButtonProps: { + expandedLabel: 'About', + unexpandedLabel: 'About', + Icon: AboutPageIcon, + dataId: 'about', + }, + routeProps: { + path: '/about', + children: function () { + return (React.createElement("div", { className: "w-full h-full pb-2 pt-2 pr-2" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(AboutPage, null)))); + }, + }, + linkProps: { + to: '/about', + }, + showInNav: true, + }, + GoldenLayoutPopoutRoute, +]; +/** + * Shows how downstream apps utilize the shell this app provides + */ +var BaseApp = function () { + useDefaultWelcome(); + return (React.createElement(React.Fragment, null, + React.createElement(Help, null), + React.createElement(App, { RouteInformation: RouteInformation, NotificationsComponent: UserNotifications, SettingsComponents: BaseSettings }))); +}; +var WrappedWithProviders = function () { + return (React.createElement(ExtensionPoints.providers, null, + React.createElement(BaseApp, null))); +}; +export default hot(WrappedWithProviders); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1hcHAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2FwcC9iYXNlLWFwcC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxHQUFHLEVBQUUsRUFBdUIsaUJBQWlCLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDbkUsT0FBTyxJQUFJLE1BQU0sbUJBQW1CLENBQUE7QUFFcEMsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLHVCQUF1QixDQUFBO0FBQzNDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHVDQUF1QyxDQUFBO0FBQzlFLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUUxQyxPQUFPLFdBQVcsTUFBTSw0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heW91dFZpZXdSZWFjdFxuICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e1xuICAgICAgICAgICAgICAgIG5ldyBzZWxlY3Rpb25JbnRlcmZhY2VNb2RlbCh7IGN1cnJlbnRRdWVyeTogYmFzZVF1ZXJ5IH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2V0R29sZGVuTGF5b3V0PXsoKSA9PiB7fX1cbiAgICAgICAgICAgICAgY29uZmlnTmFtZT1cImdvbGRlbkxheW91dFwiXG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgIDwvZGl2PlxuICAgICAgKVxuICAgIH0sXG4gIH0sXG4gIHNob3dJbk5hdjogZmFsc2UsXG59XG5cbmNvbnN0IFJvdXRlSW5mb3JtYXRpb246IEluZGl2aWR1YWxSb3V0ZVR5cGVbXSA9IFtcbiAge1xuICAgIHNob3dJbk5hdjogZmFsc2UsXG4gICAgcm91dGVQcm9wczoge1xuICAgICAgZXhhY3Q6IHRydWUsXG4gICAgICBwYXRoOiAnLycsXG4gICAgICBjaGlsZHJlbjogKCkgPT4ge1xuICAgICAgICByZXR1cm4gPFJlZGlyZWN0IHRvPVwiL3NlYXJjaFwiIC8+XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIHtcbiAgICBzaG93SW5OYXY6IGZhbHNlLFxuICAgIHJvdXRlUHJvcHM6IHtcbiAgICAgIGV4YWN0OiB0cnVlLFxuICAgICAgcGF0aDogJy91cGxvYWRzLzp1cGxvYWRJZCcsXG4gICAgICBjaGlsZHJlbjogKCkgPT4ge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICAgIGRpcmVjdGlvbj1cImNvbHVtblwiXG4gICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1mdWxsXCJcbiAgICAgICAgICAgIHdyYXA9XCJub3dyYXBcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbCB6LTAgcmVsYXRpdmUgb3ZlcmZsb3ctaGlkZGVuXCI+XG4gICAgICAgICAgICAgIDxNZXRhY2FyZFJvdXRlIC8+XG4gICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICApXG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIHtcbiAgICBzaG93SW5OYXY6IGZhbHNlLFxuICAgIHJvdXRlUHJvcHM6IHtcbiAgICAgIGV4YWN0OiB0cnVlLFxuICAgICAgcGF0aDogJy9tZXRhY2FyZHMvOm1ldGFjYXJkSWQnLFxuICAgICAgY2hpbGRyZW46ICgpID0+IHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICA8R3JpZFxuICAgICAgICAgICAgY29udGFpbmVyXG4gICAgICAgICAgICBkaXJlY3Rpb249XCJjb2x1bW5cIlxuICAgICAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiXG4gICAgICAgICAgICB3cmFwPVwibm93cmFwXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbCBoLTE2IHotMSByZWxhdGl2ZSBwdC0yIHByLTJcIj5cbiAgICAgICAgICAgICAgPFBhcGVyXG4gICAgICAgICAgICAgICAgZWxldmF0aW9uPXtFbGV2YXRpb25zLnBhbmVsc31cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1mdWxsIHB4LTNcIlxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPE1ldGFjYXJkTmF2Um91dGUgLz5cbiAgICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbC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dWxsXCI+XG4gICAgICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLnBhbmVsc30gY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiPlxuICAgICAgICAgICAgICA8Q3JlYXRlIC8+XG4gICAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApXG4gICAgICB9LFxuICAgIH0sXG4gICAgbGlua1Byb3BzOiB7XG4gICAgICB0bzogJy9jcmVhdGUnLFxuICAgIH0sXG4gICAgc2hvd0luTmF2OiB0cnVlLFxuICB9LFxuICB7XG4gICAgbmF2QnV0dG9uUHJvcHM6IHtcbiAgICAgIGV4cGFuZGVkTGFiZWw6ICdPcGVuJyxcbiAgICAgIHVuZXhwYW5kZWRMYWJlbDogJ09wZW4nLFxuICAgICAgSWNvbjogRm9sZGVySWNvbixcbiAgICAgIGRhdGFJZDogJ29wZW4nLFxuICAgIH0sXG4gICAgcm91dGVQcm9wczoge1xuICAgICAgZXhhY3Q6IHRydWUsXG4gICAgICBwYXRoOiBbJy9vcGVuJ10sXG4gICAgICBjaGlsZHJlbjogKCkgPT4ge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHktMiBwci0yIHctZnVsbCBoLWZ1bGxcIj5cbiAgICAgICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMucGFuZWxzfSBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1mdWxsXCI+XG4gICAgICAgICAgICAgIDxPcGVuIC8+XG4gICAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApXG4gICAgICB9LFxuICAgIH0sXG4gICAgbGlua1Byb3BzOiB7XG4gICAgICB0bzogJy9vcGVuJyxcbiAgICB9LFxuICAgIHNob3dJbk5hdjogdHJ1ZSxcbiAgfSxcbiAge1xuICAgIG5hdkJ1dHRvblByb3BzOiB7XG4gICAgICBleH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AgICAgPEFib3V0UGFnZSAvPlxuICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKVxuICAgICAgfSxcbiAgICB9LFxuICAgIGxpbmtQcm9wczoge1xuICAgICAgdG86ICcvYWJvdXQnLFxuICAgIH0sXG4gICAgc2hvd0luTmF2OiB0cnVlLFxuICB9LFxuICBHb2xkZW5MYXlvdXRQb3BvdXRSb3V0ZSxcbl1cblxuLyoqXG4gKiBTaG93cyBob3cgZG93bnN0cmVhbSBhcHBzIHV0aWxpemUgdGhlIHNoZWxsIHRoaXMgYXBwIHByb3ZpZGVzXG4gKi9cbmNvbnN0IEJhc2VBcHAgPSAoKSA9PiB7XG4gIHVzZURlZmF1bHRXZWxjb21lKClcbiAgcmV0dXJuIChcbiAgICA8PlxuICAgICAgPEhlbHAgLz5cbiAgICAgIDxBcHBcbiAgICAgICAgUm91dGVJbmZvcm1hdGlvbj17Um91dGVJbmZvcm1hdGlvbn1cbiAgICAgICAgTm90aWZpY2F0aW9uc0NvbXBvbmVudD17VXNlck5vdGlmaWNhdGlvbnN9XG4gICAgICAgIFNldHRpbmdzQ29tcG9uZW50cz17QmFzZVNldHRpbmdzfVxuICAgICAgLz5cbiAgICA8Lz5cbiAgKVxufVxuXG5jb25zdCBXcmFwcGVkV2l0aFByb3ZpZGVycyA9ICgpID0+IHtcbiAgcmV0dXJuIChcbiAgICA8RXh0ZW5zaW9uUG9pbnRzLnByb3ZpZGVycz5cbiAgICAgIDxCYXNlQXBwIC8+XG4gICAgPC9FeHRlbnNpb25Qb2ludHMucHJvdmlkZXJzPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChXcmFwcGVkV2l0aFByb3ZpZGVycylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/app/blueprint.adjust.d.ts b/src/main/webapp/component/app/blueprint.adjust.d.ts new file mode 100644 index 00000000000..8f44e5ee646 --- /dev/null +++ b/src/main/webapp/component/app/blueprint.adjust.d.ts @@ -0,0 +1,4 @@ +/** + * The use of removed means this will only ever happen when it needs too. + */ +export declare const useRemoveFocusStyle: () => void; diff --git a/src/main/webapp/component/app/blueprint.adjust.js b/src/main/webapp/component/app/blueprint.adjust.js new file mode 100644 index 00000000000..9018bf71f40 --- /dev/null +++ b/src/main/webapp/component/app/blueprint.adjust.js @@ -0,0 +1,34 @@ +import React from 'react'; +var removed = false; +/** + * Attempts to find and remove a style, returning true if successful + */ +var removeStyle = function (_a) { + var ruleIdentifyingFunction = _a.ruleIdentifyingFunction; + return Boolean(Array.prototype.find.call(document.styleSheets, function (sheet) { + return Boolean(Array.prototype.find.call(sheet.cssRules || sheet.rules, function (rule, index) { + if (ruleIdentifyingFunction({ rule: rule })) { + sheet.deleteRule(index); + return true; + } + return false; + })); + })); +}; +/** + * The use of removed means this will only ever happen when it needs too. + */ +export var useRemoveFocusStyle = function () { + React.useEffect(function () { + if (!removed) { + removed = removeStyle({ + ruleIdentifyingFunction: function (_a) { + var rule = _a.rule; + return (rule.style && + rule.style.outline === 'rgba(19, 124, 189, 0.6) auto 2px'); + }, + }); + } + }, []); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmx1ZXByaW50LmFkanVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvYXBwL2JsdWVwcmludC5hZGp1c3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUV6QixJQUFJLE9BQU8sR0FBRyxLQUFLLENBQUE7QUFNbkI7O0dBRUc7QUFDSCxJQUFNLFdBQVcsR0FBRyxVQUFDLEVBRUY7UUFEakIsdUJBQXVCLDZCQUFBO0lBRXZCLE9BQU8sT0FBTyxDQUNaLEtBQUssQ0FBQyxTQUFTLENBQUM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vcnQgY29uc3QgdXNlUmVtb3ZlRm9jdXNTdHlsZSA9ICgpID0+IHtcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICBpZiAoIXJlbW92ZWQpIHtcbiAgICAgIHJlbW92ZWQgPSByZW1vdmVTdHlsZSh7XG4gICAgICAgIHJ1bGVJZGVudGlmeWluZ0Z1bmN0aW9uOiAoeyBydWxlIH0pID0+IHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgcnVsZS5zdHlsZSAmJlxuICAgICAgICAgICAgcnVsZS5zdHlsZS5vdXRsaW5lID09PSAncmdiYSgxOSwgMTI0LCAxODksIDAuNikgYXV0byAycHgnXG4gICAgICAgICAgKVxuICAgICAgICB9LFxuICAgICAgfSlcbiAgICB9XG4gIH0sIFtdKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/app/global-styles.d.ts b/src/main/webapp/component/app/global-styles.d.ts new file mode 100644 index 00000000000..094d930bbee --- /dev/null +++ b/src/main/webapp/component/app/global-styles.d.ts @@ -0,0 +1 @@ +export declare const GlobalStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>; diff --git a/src/main/webapp/component/app/global-styles.js b/src/main/webapp/component/app/global-styles.js new file mode 100644 index 00000000000..ef047a0f9e7 --- /dev/null +++ b/src/main/webapp/component/app/global-styles.js @@ -0,0 +1,5 @@ +import { __makeTemplateObject } from "tslib"; +import { createGlobalStyle } from 'styled-components'; +export var GlobalStyles = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* Only needed because we import 'bootstrap.less' in catalog-ui-search. */\n legend {\n /* Unset all properties */\n all: unset;\n\n /* Place back material-ui styling */\n padding: 0 !important;\n text-align: left !important;\n transition: width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n line-height: 11px !important;\n }\n\n /* So we match Material */\n .navigation-item + .navigation-item {\n margin-left: 10px;\n }\n .navigation-item:not(:last-of-type) {\n border-radius: 25px; \n }\n\n .inspector-content {\n transform: none;\n }\n .MuiPickersModal-dialogRootWider {\n min-width: 500px !important;\n }\n .MuiPickersBasePicker-pickerView {\n max-width: none !important;\n }\n .MuiDialog-paperWidthSm {\n max-width: none !important;\n }\n\n .no-resource {\n *[data-id='Overwrite'] {\n display: none !important;\n }\n }\n .federated {\n *[data-id='Notes'] {\n display: none !important;\n }\n }\n"], ["\n /* Only needed because we import 'bootstrap.less' in catalog-ui-search. */\n legend {\n /* Unset all properties */\n all: unset;\n\n /* Place back material-ui styling */\n padding: 0 !important;\n text-align: left !important;\n transition: width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n line-height: 11px !important;\n }\n\n /* So we match Material */\n .navigation-item + .navigation-item {\n margin-left: 10px;\n }\n .navigation-item:not(:last-of-type) {\n border-radius: 25px; \n }\n\n .inspector-content {\n transform: none;\n }\n .MuiPickersModal-dialogRootWider {\n min-width: 500px !important;\n }\n .MuiPickersBasePicker-pickerView {\n max-width: none !important;\n }\n .MuiDialog-paperWidthSm {\n max-width: none !important;\n }\n\n .no-resource {\n *[data-id='Overwrite'] {\n display: none !important;\n }\n }\n .federated {\n *[data-id='Notes'] {\n display: none !important;\n }\n }\n"]))); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsLXN0eWxlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvYXBwL2dsb2JhbC1zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUVyRCxNQUFNLENBQUMsSUFBTSxZQUFZLEdBQUcsaUJBQWlCLHVoQ0FBQSxvOUJBNEM1QyxJQUFBLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJpb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cG9ydGFudDtcbiAgfVxuICAuTXVpRGlhbG9nLXBhcGVyV2lkdGhTbSB7XG4gICAgbWF4LXdpZHRoOiBub25lICFpbXBvcnRhbnQ7XG4gIH1cblxuICAubm8tcmVzb3VyY2Uge1xuICAgICpbZGF0YS1pZD0nT3ZlcndyaXRlJ10ge1xuICAgICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50O1xuICAgIH1cbiAgfVxuICAuZmVkZXJhdGVkIHtcbiAgICAqW2RhdGEtaWQ9J05vdGVzJ10ge1xuICAgICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50O1xuICAgIH1cbiAgfVxuYFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/app/wreqr-snacks.d.ts b/src/main/webapp/component/app/wreqr-snacks.d.ts new file mode 100644 index 00000000000..bebda9fb206 --- /dev/null +++ b/src/main/webapp/component/app/wreqr-snacks.d.ts @@ -0,0 +1,5 @@ +/// +/** + * Would be nice to eventually remove, but for now this is easier than removing announcements from non view areas + */ +export declare const WreqrSnacks: () => JSX.Element; diff --git a/src/main/webapp/component/app/wreqr-snacks.js b/src/main/webapp/component/app/wreqr-snacks.js new file mode 100644 index 00000000000..7ac8454935e --- /dev/null +++ b/src/main/webapp/component/app/wreqr-snacks.js @@ -0,0 +1,16 @@ +import React from 'react'; +import useSnack from '../hooks/useSnack'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import wreqr from '../../js/wreqr'; +/** + * Would be nice to eventually remove, but for now this is easier than removing announcements from non view areas + */ +export var WreqrSnacks = function () { + var addSnack = useSnack(); + useListenTo(wreqr.vent, 'snack', function (_a) { + var message = _a.message, snackProps = _a.snackProps; + addSnack(message, snackProps); + }); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JlcXItc25hY2tzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3Jj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ZXIgdGhhbiByZW1vdmluZyBhbm5vdW5jZW1lbnRzIGZyb20gbm9uIHZpZXcgYXJlYXNcbiAqL1xuZXhwb3J0IGNvbnN0IFdyZXFyU25hY2tzID0gKCkgPT4ge1xuICBjb25zdCBhZGRTbmFjayA9IHVzZVNuYWNrKClcbiAgdXNlTGlzdGVuVG8oXG4gICAgKHdyZXFyIGFzIGFueSkudmVudCxcbiAgICAnc25hY2snLFxuICAgICh7IG1lc3NhZ2UsIHNuYWNrUHJvcHMgfTogeyBtZXNzYWdlOiBzdHJpbmc7IHNuYWNrUHJvcHM6IFNuYWNrUHJvcHMgfSkgPT4ge1xuICAgICAgYWRkU25hY2sobWVzc2FnZSwgc25hY2tQcm9wcylcbiAgICB9XG4gIClcbiAgcmV0dXJuIDw+PC8+XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/better-click-away-listener/better-click-away-listener.d.ts b/src/main/webapp/component/better-click-away-listener/better-click-away-listener.d.ts new file mode 100644 index 00000000000..83b18241e14 --- /dev/null +++ b/src/main/webapp/component/better-click-away-listener/better-click-away-listener.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { ClickAwayListenerProps } from '@mui/material/ClickAwayListener'; +type BetterClickAwayListenerProps = ClickAwayListenerProps & { + onClickAway: (event: React.MouseEvent | KeyboardEvent) => void; +}; +/** + * Same as ClickAwayListener, but doesn't trigger onClickAway if the click was in a menu. Also adds using escape to escape. + * @param props + */ +export declare const BetterClickAwayListener: (props: BetterClickAwayListenerProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/better-click-away-listener/better-click-away-listener.js b/src/main/webapp/component/better-click-away-listener/better-click-away-listener.js new file mode 100644 index 00000000000..79d2eda277f --- /dev/null +++ b/src/main/webapp/component/better-click-away-listener/better-click-away-listener.js @@ -0,0 +1,51 @@ +import { __assign } from "tslib"; +import * as React from 'react'; +import ClickAwayListener from '@mui/material/ClickAwayListener'; +import { Drawing } from '../singletons/drawing'; +/** + * Same as ClickAwayListener, but doesn't trigger onClickAway if the click was in a menu. Also adds using escape to escape. + * @param props + */ +export var BetterClickAwayListener = function (props) { + React.useEffect(function () { + var callback = function (e) { + if (e.keyCode === 27) { + props.onClickAway(e); + } + }; + document.addEventListener('keyup', callback); + return function () { + document.removeEventListener('keyup', callback); + }; + }, []); + return (React.createElement(ClickAwayListener, __assign({}, props, { onClickAway: function (e) { + /** + * Should we be doing a querySelectorAll and seeing if anything on the page contains the element? I feel like this could fail in certain instances. + */ + if (Drawing.isFuzzyDrawing()) { + return; + } + var dialog = document.querySelector('.MuiDialog-root'); + var menu = document.querySelector('#menu-'); + var probablyDropdown = document.querySelector('div[style*="transform: translateX(calc((-50%"]') || + document.querySelector('div[style*="transform: translateX(calc(-50%"]'); + // needed for regular old selects + if (document.activeElement && + document.activeElement.classList.contains('MuiListItem-root')) { + return; + } + if (dialog && dialog.contains(e.target)) { + return; + } + if (menu && menu.contains(e.target)) { + return; + } + if (probablyDropdown && + probablyDropdown.contains(e.target)) { + return; + } + if (props.onClickAway) + props.onClickAway(e); + } }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmV0dGVyLWNsaWNrLWF3YXktbGlzdGVuZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2JldHRlci1jbGljay1hd2F5LWxpc3RlbmVyL2JldHRlci1jbGljay1hd2F5LWxpc3RlbmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxpQkFFTixNQUFNLGlDQUFpQyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQTtBQU0vQzs7O0dBR0c7QUFDSCxNQUFNLENBQUMsSUFBTSx1QkF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ICAgICBjb25zdCBkaWFsb2cgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuTXVpRGlhbG9nLXJvb3QnKVxuICAgICAgICBjb25zdCBtZW51ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI21lbnUtJylcbiAgICAgICAgY29uc3QgcHJvYmFibHlEcm9wZG93biA9XG4gICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcbiAgICAgICAgICAgICdkaXZbc3R5bGUqPVwidHJhbnNmb3JtOiB0cmFuc2xhdGVYKGNhbGMoKC01MCVcIl0nXG4gICAgICAgICAgKSB8fFxuICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXG4gICAgICAgICAgICAnZGl2W3N0eWxlKj1cInRyYW5zZm9ybTogdHJhbnNsYXRlWChjYWxjKC01MCVcIl0nXG4gICAgICAgICAgKVxuICAgICAgICAvLyBuZWVkZWQgZm9yIHJlZ3VsYXIgb2xkIHNlbGVjdHNcbiAgICAgICAgaWYgKFxuICAgICAgICAgIGRvY3VtZW50LmFjdGl2ZUVsZW1lbnQgJiZcbiAgICAgICAgICBkb2N1bWVudC5hY3RpdmVFbGVtZW50LmNsYXNzTGlzdC5jb250YWlucygnTXVpTGlzdEl0ZW0tcm9vdCcpXG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG4gICAgICAgIGlmIChkaWFsb2cgJiYgZGlhbG9nLmNvbnRhaW5zKGUudGFyZ2V0IGFzIEhUTUxCYXNlRWxlbWVudCkpIHtcbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuICAgICAgICBpZiAobWVudSAmJiBtZW51LmNvbnRhaW5zKGUudGFyZ2V0IGFzIEhUTUxCYXNlRWxlbWVudCkpIHtcbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuICAgICAgICBpZiAoXG4gICAgICAgICAgcHJvYmFibHlEcm9wZG93biAmJlxuICAgICAgICAgIHByb2JhYmx5RHJvcGRvd24uY29udGFpbnMoZS50YXJnZXQgYXMgSFRNTEJhc2VFbGVtZW50KVxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuICAgICAgICBpZiAocHJvcHMub25DbGlja0F3YXkpIHByb3BzLm9uQ2xpY2tBd2F5KGUpXG4gICAgICB9fVxuICAgIC8+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/boolean-search-bar/boolean-search-bar.d.ts b/src/main/webapp/component/boolean-search-bar/boolean-search-bar.d.ts new file mode 100644 index 00000000000..5fdbcb41b11 --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/boolean-search-bar.d.ts @@ -0,0 +1,20 @@ +/// +import { FormControlProps } from '@mui/material/FormControl'; +import { TextFieldProps } from '@mui/material/TextField'; +import { AutocompleteProps } from '@mui/material/Autocomplete'; +import { BooleanTextType } from '../filter-builder/filter.structure'; +import { Option } from './boolean-search-utils'; +import { InputProps } from '@mui/material/Input'; +type Props = { + value: BooleanTextType; + onChange: (value: BooleanTextType) => void; + property?: string; + disableClearable?: boolean; + placeholder?: TextFieldProps['placeholder']; + FormControlProps?: FormControlProps; + TextFieldProps?: Partial; + AutocompleteProps?: AutocompleteProps; + InputProps?: InputProps; +}; +declare const _default: (props: Props) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/component/boolean-search-bar/boolean-search-bar.js b/src/main/webapp/component/boolean-search-bar/boolean-search-bar.js new file mode 100644 index 00000000000..44044a2f069 --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/boolean-search-bar.js @@ -0,0 +1,251 @@ +import { __assign, __read, __rest } from "tslib"; +/* Copyright (c) Connexta, LLC */ +import Typography from '@mui/material/Typography'; +import CircularProgress from '@mui/material/CircularProgress'; +import FormControl from '@mui/material/FormControl'; +import TextField from '@mui/material/TextField'; +import Autocomplete, { createFilterOptions, } from '@mui/material/Autocomplete'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useState } from 'react'; +import useBooleanSearchError from './useBooleanSearchError'; +import ValidationIndicator from './validation-indicator'; +import { fetchCql, fetchSuggestions, getRandomId, } from './boolean-search-utils'; +import IconButton from '@mui/material/IconButton'; +import ClearIcon from '@mui/icons-material/Clear'; +import SearchIcon from '@mui/icons-material/Search'; +import { useUpdateEffect } from 'react-use'; +import { dispatchEnterKeySubmitEvent } from '../custom-events/enter-key-submit'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +var defaultFilterOptions = createFilterOptions(); +var WILD_CARD = '*'; +var defaultValue = { + text: '', + cql: '', + error: false, +}; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (value.text === undefined || + value.cql === undefined || + value.error === undefined) { + onChange(defaultValue); + } +}; +var ShapeValidator = function (props) { + React.useEffect(function () { + validateShape(props); + }); + if (props.value.text !== undefined) { + return React.createElement(BooleanSearchBar, __assign({}, props)); + } + return null; +}; +/** + * We want to take in a value, and onChange update it. That would then flow a new value + * back down. + */ +var BooleanSearchBar = function (_a) { + var value = _a.value, onChange = _a.onChange, _b = _a.property, property = _b === void 0 ? 'anyText' : _b, placeholder = _a.placeholder, disableClearable = _a.disableClearable, props = __rest(_a, ["value", "onChange", "property", "placeholder", "disableClearable"]); + var config = useConfiguration().config; + if (placeholder === undefined) { + placeholder = "Search ".concat(config === null || config === void 0 ? void 0 : config.customBranding, " ").concat(config === null || config === void 0 ? void 0 : config.product); + } + var _c = __read(React.useState(false), 2), isOpen = _c[0], setIsOpen = _c[1]; + var errorMessage = useBooleanSearchError(value).errorMessage; + var _d = __read(React.useState(false), 2), loading = _d[0], setLoading = _d[1]; + var _f = __read(React.useState(''), 2), suggestion = _f[0], setSuggestion = _f[1]; + var _g = __read(React.useState(getRandomId()), 1), id = _g[0]; + var _h = __read(React.useState(0), 2), cursorLocation = _h[0], setCursorLocation = _h[1]; + var _j = __read(React.useState([]), 2), tokens = _j[0], setTokens = _j[1]; + var inputRef = React.useRef(); + var optionToValue = function (option) { return option.token; }; + var _k = __read(useState([]), 2), options = _k[0], setOptions = _k[1]; + var isValidBeginningToken = function (query) { + var trimmedToken = query.trim().toLowerCase(); + if (trimmedToken === 'not' || + trimmedToken === 'and' || + trimmedToken === 'or') { + return false; + } + return true; + }; + useUpdateEffect(function () { + var controller = new AbortController(); + setLoading(true); + // when empty, interpret as wildcard + var searchVal = value.text === '' ? WILD_CARD : value.text; + if (searchVal && isValidBeginningToken(value.text)) { + fetchCql({ + searchText: searchVal, + searchProperty: property, + callback: function (_a) { + var _b = _a.cql, cql = _b === void 0 ? '' : _b, error = _a.error, errorMessage = _a.errorMessage; + onChange(__assign(__assign({}, value), { cql: cql, error: !!error, errorMessage: errorMessage })); + setLoading(false); + }, + signal: controller.signal, + }); + } + else { + setLoading(false); + onChange(__assign(__assign({}, value), { cql: '', error: true })); + } + return function () { + controller.abort(); + }; + }, [value.text, property]); + React.useEffect(function () { + var controller = new AbortController(); + if (value.text !== null && isValidBeginningToken(value.text)) { + fetchSuggestions({ + text: value.text, + callback: function (_a) { + var options = _a.options; + setOptions(options); + }, + signal: controller.signal, + }); + } + else { + setOptions([]); + } + return function () { + controller.abort(); + }; + }, [value.text]); + React.useEffect(function () { + var rawTokens = value.text.split(/[ ())]+/); + var joinTokens = []; + for (var i = 0; i < rawTokens.length; i++) { + joinTokens.push(rawTokens.slice(i, rawTokens.length).join(' ').trim()); + } + setTokens(joinTokens); + }, [value.text]); + var getOptionLabel = function (option) { + if (!option || !option.token) + return ''; + if (option.length === 0) + return ''; + return option.token; + }; + var handleSubmit = function (e) { + if (!value.error && (!isOpen || currentOptions.length === 0)) { + dispatchEnterKeySubmitEvent(e); + } + }; + // Used to determine what we can go for next in context the the previous. + var filterOptions = React.useCallback(function (optionsToFilter) { + var lastToken = tokens[tokens.length - 1]; + if (lastToken === undefined) { + return []; + } + else if (lastToken === '') { + return optionsToFilter; + } + else { + var strippedOptions = optionsToFilter.map(function (o) { return ({ + token: o.token, + }); }); + var filteredOptions = defaultFilterOptions(strippedOptions, { + inputValue: lastToken, + getOptionLabel: getOptionLabel, + }); + var flatFilteredOptions_1 = filteredOptions.map(function (o) { return o.token; }); + var reconstructedOptions = optionsToFilter.filter(function (o) { + return flatFilteredOptions_1.includes(o.token); + }); + return reconstructedOptions; + } + }, [tokens]); + React.useEffect(function () { + var _a; + if (value.text) { + if (suggestion === 'AND' || suggestion === 'OR') { + (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.setSelectionRange(cursorLocation, cursorLocation); + setSuggestion(''); + } + } + }, [value.text]); + var handleTextChange = function (e) { + onChange(__assign(__assign({}, value), { text: e.target.value })); + }; + var handleTextClear = function () { + onChange(__assign(__assign({}, defaultValue), { text: '' })); + }; + var getLogicalOperators = function (options) { + return options.filter(function (option) { return option.type === 'logical'; }); + }; + var getTokenToRemove = function (suggestion) { + var tokenToRemove = ''; + for (var i = 0; i < tokens.length; i++) { + var match = suggestion.token + .toLowerCase() + .match(tokens[i].toLowerCase()); + if (match && match[0]) { + tokenToRemove = tokens[i]; + break; + } + } + return tokenToRemove; + }; + var currentOptions = filterOptions(getLogicalOperators(options)).sort(function (o1) { return ((o1 === null || o1 === void 0 ? void 0 : o1.type) === 'mandatory' ? -1 : 1); }); + return (React.createElement(FormControl, __assign({ fullWidth: true }, props.FormControlProps), + React.createElement(Autocomplete, __assign({ filterOptions: function (optionsToFilter) { return optionsToFilter; }, onOpen: function () { + setIsOpen(true); + }, open: isOpen, onClose: function () { + setIsOpen(false); + }, options: currentOptions, includeInputInList: true, onChange: function (_e, suggestion) { + var _a; + if (suggestion && + suggestion.token && + suggestion.token !== value.text) { + var selectedSuggestion = optionToValue(suggestion).toUpperCase(); + if (selectedSuggestion === 'NOT') { + selectedSuggestion = 'NOT ()'; + } + setSuggestion(selectedSuggestion); + var cursor = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.selectionStart; + var tokenToRemove = getTokenToRemove(suggestion); + var newInputValue = value.text; + if (tokenToRemove !== '' && cursor && cursor < value.text.length) { + var postText = value.text.substr(cursor, value.text.length); + var preText = value.text.slice(0, (tokenToRemove.length + postText.length) * -1); + onChange(__assign(__assign({}, value), { text: "".concat(preText).concat(selectedSuggestion).concat(postText) })); + var str = "".concat(preText).concat(selectedSuggestion); + setCursorLocation(str.length); + } + else if (tokenToRemove !== '') { + newInputValue = value.text.slice(0, tokenToRemove.length * -1); + } + else if (cursor && cursor < value.text.length) { + var preText = value.text.substr(0, cursor).trim(); + var postText = value.text.substr(cursor, value.text.length); + onChange(__assign(__assign({}, value), { text: "".concat(preText, " ").concat(selectedSuggestion).concat(postText) })); + var str = "".concat(preText, " ").concat(selectedSuggestion); + setCursorLocation(str.length); + } + if (cursor && cursor >= value.text.length) { + var newInput = "".concat(newInputValue).concat(selectedSuggestion, " "); + onChange(__assign(__assign({}, value), { text: newInput })); + setCursorLocation(newInput.length + 1); + } + } + }, inputValue: value.text, getOptionLabel: getOptionLabel, multiple: false, disableClearable: true, disableCloseOnSelect: true, freeSolo: true, id: id, renderOption: function (option) { return (React.createElement(Typography, { noWrap: true }, optionToValue(option))); }, renderInput: function (params) { + return (React.createElement(TextField, __assign({ "data-id": "search-input" }, params, { onKeyUp: function (e) { + if (e.key === 'Enter') { + handleSubmit(e); + setIsOpen(false); + } + }, placeholder: placeholder, inputRef: inputRef, size: 'small', variant: "outlined", onChange: handleTextChange, value: value.text, helperText: value.error ? React.createElement(React.Fragment, null, errorMessage) : '', InputProps: __assign(__assign(__assign({}, params.InputProps), { startAdornment: (React.createElement(React.Fragment, null, loading ? (React.createElement(CircularProgress, { size: 20, style: { marginRight: 13, marginLeft: 2 } })) : (React.createElement(ValidationIndicator, { helperMessage: value.error ? errorMessage : 'Valid', error: value.error })))), endAdornment: (React.createElement(React.Fragment, null, + !disableClearable && !!value.text && (React.createElement(IconButton, { onClick: handleTextClear, style: { padding: '2px' }, size: "large" }, + React.createElement(ClearIcon, { fontSize: "small" }))), + React.createElement(IconButton, { onClick: function (e) { + setIsOpen(false); + handleSubmit(e); + }, disabled: value.error, style: { padding: '2px' }, size: "large" }, + React.createElement(SearchIcon, { fontSize: "small" })))) }), props.InputProps) }, props.TextFieldProps))); + } }, props.AutocompleteProps)))); +}; +export default hot(module)(ShapeValidator); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vbGVhbi1zZWFyY2gtYmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9ib29sZWFuLXNlYXJjaC1iYXIvYm9vbGVhbi1zZWFyY2gtYmFyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsaUNBQWlDO0FBQ2pDLE9BQU8sVUFBVSxNQUFNLDBCQUEwQixDQUFBO0FBQ2pELE9BQU8sZ0JBQWdCLE1BQU0sZ0NBQWdDLENBQUE7QUFDN0QsT0FBTyxXQUFpQyxNQUFNLDJCQUEyQixDQUFBO0FBQ3pFLE9BQU8sU0FBNkIsTUFBTSx5QkFBeUIsQ0FBQTtBQUNuRSxPQUFPLFlBQVksRUFBRSxFQUVuQixtQkFBbUIsR0FDcEIsTUFBTSw0QkFBNEIsQ0FBQTtBQUNuQyxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUVoQyxPQUFPLHFCQUFxQixNQUFNLHlCQUF5QixDQUFBO0FBQzNELE9BQU8sbUJBQW1CLE1BQU0sd0JBQXdCLENBQUE7QUFDeEQsT0FBTyxFQUNMLFFBQVEsRUFDUixnQkFBZ0IsRUFDaEIsV0FBVyxHQUVaLE1BQU0sd0JBQXdCLENBQUE7QUFDL0IsT0FBTyxVQUFVLE1BQU0sMEJBQT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AgICAgZGlzYWJsZUNsb3NlT25TZWxlY3RcbiAgICAgICAgZnJlZVNvbG9cbiAgICAgICAgaWQ9e2lkfVxuICAgICAgICByZW5kZXJPcHRpb249eyhvcHRpb24pID0+IChcbiAgICAgICAgICA8VHlwb2dyYXBoeSBub1dyYXA+e29wdGlvblRvVmFsdWUob3B0aW9uKX08L1R5cG9ncmFwaHk+XG4gICAgICAgICl9XG4gICAgICAgIHJlbmRlcklucHV0PXsocGFyYW1zKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxUZXh0RmllbGRcbiAgICAgICAgICAgICAgZGF0YS1pZD1cInNlYXJjaC1pbnB1dFwiXG4gICAgICAgICAgICAgIHsuLi5wYXJhbXN9XG4gICAgICAgICAgICAgIG9uS2V5VXA9eyhlKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInKSB7XG4gICAgICAgICAgICAgICAgICBoYW5kbGVTdWJtaXQoZSlcbiAgICAgICAgICAgICAgICAgIHNldElzT3BlbihmYWxzZSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIHBsYWNlaG9sZGVyPXtwbGFjZWhvbGRlcn1cbiAgICAgICAgICAgICAgaW5wdXRSZWY9e2lucHV0UmVmfVxuICAgICAgICAgICAgICBzaXplPXsnc21hbGwnfVxuICAgICAgICAgICAgICB2YXJpYW50PVwib3V0bGluZWRcIlxuICAgICAgICAgICAgICBvbkNoYW5nZT17aGFuZGxlVGV4dENoYW5nZX1cbiAgICAgICAgICAgICAgdmFsdWU9e3ZhbHVlLnRleHR9XG4gICAgICAgICAgICAgIGhlbHBlclRleHQ9e3ZhbHVlLmVycm9yID8gPD57ZXJyb3JNZXNzYWdlfTwvPiA6ICcnfVxuICAgICAgICAgICAgICBJbnB1dFByb3BzPXt7XG4gICAgICAgICAgICAgICAgLi4ucGFyYW1zLklucHV0UHJvcHMsXG4gICAgICAgICAgICAgICAgc3RhcnRBZG9ybm1lbnQ6IChcbiAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgIHtsb2FkaW5nID8gKFxuICAgICAgICAgICAgICAgICAgICAgIDxDaXJjdWxhclByb2dyZXNzXG4gICAgICAgICAgICAgICAgICAgICAgICBzaXplPXsyMH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7IG1hcmdpblJpZ2h0OiAxMywgbWFyZ2luTGVmdDogMiB9fVxuICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgICAgICAgPFZhbGlkYXRpb25JbmRpY2F0b3JcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlbHBlck1lc3NhZ2U9e3ZhbHVlLmVycm9yID8gZXJyb3JNZXNzYWdlIDogJ1ZhbGlkJ31cbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yPXt2YWx1ZS5lcnJvcn1cbiAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICBlbmRBZG9ybm1lbnQ6IChcbiAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgIHshZGlzYWJsZUNsZWFyYWJsZSAmJiAhIXZhbHVlLnRleHQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgIDxJY29uQnV0dG9uXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVUZXh0Q2xlYXJ9XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17eyBwYWRkaW5nOiAnMnB4JyB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZT1cImxhcmdlXCJcbiAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICA8Q2xlYXJJY29uIGZvbnRTaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgICAgICAgICAgIDwvSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgPEljb25CdXR0b25cbiAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXNPcGVuKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlU3VibWl0KGUpXG4gICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZD17dmFsdWUuZXJyb3J9XG4gICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3sgcGFkZGluZzogJzJweCcgfX1cbiAgICAgICAgICAgICAgICAgICAgICBzaXplPVwibGFyZ2VcIlxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgPFNlYXJjaEljb24gZm9udFNpemU9XCJzbWFsbFwiIC8+XG4gICAgICAgICAgICAgICAgICAgIDwvSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgICAgICAuLi5wcm9wcy5JbnB1dFByb3BzLFxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICB7Li4ucHJvcHMuVGV4dEZpZWxkUHJvcHN9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIClcbiAgICAgICAgfX1cbiAgICAgICAgey4uLnByb3BzLkF1dG9jb21wbGV0ZVByb3BzfVxuICAgICAgLz5cbiAgICA8L0Zvcm1Db250cm9sPlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShTaGFwZVZhbGlkYXRvcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/boolean-search-bar/boolean-search-utils.d.ts b/src/main/webapp/component/boolean-search-bar/boolean-search-utils.d.ts new file mode 100644 index 00000000000..f241ee0fb8f --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/boolean-search-utils.d.ts @@ -0,0 +1,30 @@ +export declare const getRandomId: () => string; +export type Option = { + type: string; + token: string; +}; +type Suggestions = { + [key: string]: string[]; +}; +export declare const suggestionsToOptions: (suggestions: Suggestions) => Option[]; +type CallbackType = ({ options, error, }: { + options: Option[]; + error: any; +}) => void; +export declare const fetchSuggestions: ({ text, callback, signal, }: { + text: string; + callback: CallbackType; + signal: AbortSignal; +}) => Promise; +type BooleanEndpointReturnType = { + cql?: string; + error?: boolean; + errorMessage?: string; +}; +export declare const fetchCql: ({ searchText, searchProperty, callback, signal, }: { + callback: (result: BooleanEndpointReturnType) => void; + searchText: string | null; + searchProperty?: string | undefined; + signal?: AbortSignal | undefined; +}) => Promise; +export {}; diff --git a/src/main/webapp/component/boolean-search-bar/boolean-search-utils.js b/src/main/webapp/component/boolean-search-bar/boolean-search-utils.js new file mode 100644 index 00000000000..53d4f6c4f2e --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/boolean-search-utils.js @@ -0,0 +1,74 @@ +import { __awaiter, __generator, __read } from "tslib"; +/* Copyright (c) Connexta, LLC */ +import fetch from '../../react-component/utils/fetch'; +export var getRandomId = function () { + return "a".concat(Math.round(Math.random() * 10000000000000).toString()); +}; +export var suggestionsToOptions = function (suggestions) { + if (suggestions === undefined || Object.keys(suggestions).length === 0) { + return []; + } + else { + return Object.entries(suggestions).flatMap(function (_a) { + var _b = __read(_a, 2), category = _b[0], tokens = _b[1]; + return tokens.map(function (token) { return ({ + type: category, + token: token, + }); }); + }); + } +}; +export var fetchSuggestions = function (_a) { + var text = _a.text, callback = _a.callback, signal = _a.signal; + return __awaiter(void 0, void 0, void 0, function () { + var res, json; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, fetch("./internal/boolean-search/suggest?q=".concat(encodeURIComponent(text)), { + signal: signal, + })]; + case 1: + res = _b.sent(); + if (!res.ok) { + throw new Error(res.statusText); + } + return [4 /*yield*/, res.json()]; + case 2: + json = _b.sent(); + callback({ + options: suggestionsToOptions(json.suggestions), + error: json.error, + }); + return [2 /*return*/]; + } + }); + }); +}; +export var fetchCql = function (_a) { + var searchText = _a.searchText, searchProperty = _a.searchProperty, callback = _a.callback, signal = _a.signal; + return __awaiter(void 0, void 0, void 0, function () { + var trimmedInput, res, json; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + trimmedInput = searchText.trim(); + if (!trimmedInput) return [3 /*break*/, 3]; + return [4 /*yield*/, fetch("./internal/boolean-search/cql?q=".concat(encodeURIComponent(trimmedInput), "&e=").concat(encodeURIComponent(searchProperty)), { + signal: signal, + })]; + case 1: + res = _b.sent(); + return [4 /*yield*/, res.json()]; + case 2: + json = (_b.sent()); + callback(json); + return [3 /*break*/, 4]; + case 3: + callback({ cql: '' }); + _b.label = 4; + case 4: return [2 /*return*/]; + } + }); + }); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vbGVhbi1zZWFyY2gtdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2Jvb2xlYW4tc2VhcmNoLWJhci9ib29sZWFuLXNlYXJjaC11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsaUNBQWlDO0FBQ2pDLE9BQU8sS0FBSyxNQUFNLG1DQUFtQyxDQUFBO0FBRXJELE1BQU0sQ0FBQyxJQUFNLFdBQVcsR0FBRztJQUN6QixPQUFPLFdBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsY0FBYyxDQUFDLENBQUMsUUFBUSxFQUFFLENBQUUsQ0FBQTtBQUNwRSxDQUFDLENBQUE7QUFXRCxNQUFNLENBQUMsSUFBTSxvQkFBb0IsR0FBRyxVQ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aW1tZWRJbnB1dCFcbiAgICAgICl9JmU9JHtlbmNvZGVVUklDb21wb25lbnQoc2VhcmNoUHJvcGVydHkhKX1gLFxuICAgICAge1xuICAgICAgICBzaWduYWwsXG4gICAgICB9XG4gICAgKVxuXG4gICAgY29uc3QganNvbiA9IChhd2FpdCByZXMuanNvbigpKSBhcyBCb29sZWFuRW5kcG9pbnRSZXR1cm5UeXBlXG4gICAgY2FsbGJhY2soanNvbilcbiAgfSBlbHNlIHtcbiAgICBjYWxsYmFjayh7IGNxbDogJycgfSlcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.d.ts b/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.d.ts new file mode 100644 index 00000000000..f5ac4c216eb --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.d.ts @@ -0,0 +1,6 @@ +/// +import { BooleanTextType } from '../filter-builder/filter.structure'; +declare const useBooleanSearchError: (value: BooleanTextType) => { + errorMessage: JSX.Element; +}; +export default useBooleanSearchError; diff --git a/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.js b/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.js new file mode 100644 index 00000000000..a718eff3cf2 --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.js @@ -0,0 +1,35 @@ +import { __read } from "tslib"; +/* Copyright (c) Connexta, LLC */ +import * as React from 'react'; +import { useState, useEffect } from 'react'; +var ERROR_MESSAGES = { + punctuation: (React.createElement("div", null, + "Invalid Query:", + React.createElement("div", null, "If using characters outside the alphabet (a-z), make sure to quote them like so (\"big.doc\" or \"bill's car\")."))), + syntax: (React.createElement("div", null, + "Invalid Query:", + React.createElement("div", null, "Check that syntax of AND / OR / NOT is used correctly."))), + both: (React.createElement("div", null, + "Invalid Query:", + React.createElement("div", null, "If using characters outside the alphabet (a-z), make sure to quote them like so (\"big.doc\" or \"bill's car\")."), + React.createElement("div", null, "Check that syntax of AND / OR / NOT is used correctly."))), + custom: function (message) { return React.createElement("div", null, + "Invalid Query: ", + message); }, +}; +var useBooleanSearchError = function (value) { + var _a = __read(useState(ERROR_MESSAGES.both), 2), errorMessage = _a[0], setErrorMessage = _a[1]; + useEffect(function () { + if (value.error) { + if (value.errorMessage) { + setErrorMessage(ERROR_MESSAGES.custom(value.errorMessage)); + } + else { + setErrorMessage(ERROR_MESSAGES.syntax); + } + } + }, [value]); + return { errorMessage: errorMessage }; +}; +export default useBooleanSearchError; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQm9vbGVhblNlYXJjaEVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9ib29sZWFuLXNlYXJjaC1iYXIvdXNlQm9vbGVhblNlYXJjaEVycm9yLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsaUNBQWlDO0FBQ2pDLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBRzNDLElBQU0sY0FBYyxHQUFHO0lBQ3JCLFdBQVcsRUFBRSxDQUNYOztRQUVFLG9KQUdNLENBQ0YsQ0FDUDtJQUNELE1BQU0sRUFBRSxDQUNOOztRQUVFLDBGQUFpRSxDQUM3RCxDQUNQO0lBQ0QsSUFBSSxFQUFFLENBQ0o7O1FBRUUsb0pBR007UUFDTiwwRkFBaUUsQ0FDN0QsQ0FDUDtJQUNELE1BQU0sRUFBRSxVQUFDLE9BQWUsSUFBSyxPQUFBOztRQUFxQixPQUFPLENBQU8sRUFBbkMsQ0FBbUM7Q0FDakUsQ0FBQTtBQUVELElBQU0scUJBQXFCLEdBQUcsVUFBQyxLQUFzQjtJQUM3QyxJQUFBLE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WdlKEVSUk9SX01FU1NBR0VTLmN1c3RvbSh2YWx1ZS5lcnJvck1lc3NhZ2UpKVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgc2V0RXJyb3JNZXNzYWdlKEVSUk9SX01FU1NBR0VTLnN5bnRheClcbiAgICAgIH1cbiAgICB9XG4gIH0sIFt2YWx1ZV0pXG5cbiAgcmV0dXJuIHsgZXJyb3JNZXNzYWdlIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgdXNlQm9vbGVhblNlYXJjaEVycm9yXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/boolean-search-bar/validation-indicator.d.ts b/src/main/webapp/component/boolean-search-bar/validation-indicator.d.ts new file mode 100644 index 00000000000..c19a4f39dd1 --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/validation-indicator.d.ts @@ -0,0 +1,7 @@ +/// +type ValidationIndicatorProps = { + helperMessage?: string | JSX.Element; + error?: boolean; +}; +declare const ValidationIndicator: ({ helperMessage: helperText, error, }: ValidationIndicatorProps) => JSX.Element; +export default ValidationIndicator; diff --git a/src/main/webapp/component/boolean-search-bar/validation-indicator.js b/src/main/webapp/component/boolean-search-bar/validation-indicator.js new file mode 100644 index 00000000000..a527607ae01 --- /dev/null +++ b/src/main/webapp/component/boolean-search-bar/validation-indicator.js @@ -0,0 +1,16 @@ +/* Copyright (c) Connexta, LLC */ +import { green, red } from '@mui/material/colors'; +import InputAdornment from '@mui/material/InputAdornment'; +import Tooltip from '@mui/material/Tooltip'; +import Check from '@mui/icons-material/Check'; +import Close from '@mui/icons-material/Close'; +import * as React from 'react'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +var ValidationIndicator = function (_a) { + var helperText = _a.helperMessage, error = _a.error; + return (React.createElement(InputAdornment, { position: "start" }, + React.createElement(Tooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, helperText) }, error ? (React.createElement(Close, { style: { color: red[500] } })) : (React.createElement(Check, { style: { color: green[500] } }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ZXh0LFxuICBlcnJvcixcbn06IFZhbGlkYXRpb25JbmRpY2F0b3JQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxJbnB1dEFkb3JubWVudCBwb3NpdGlvbj1cInN0YXJ0XCI+XG4gICAgICA8VG9vbHRpcFxuICAgICAgICB0aXRsZT17XG4gICAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30gY2xhc3NOYW1lPVwicC0yXCI+XG4gICAgICAgICAgICB7aGVscGVyVGV4dH1cbiAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICB9XG4gICAgICA+XG4gICAgICAgIHtlcnJvciA/IChcbiAgICAgICAgICA8Q2xvc2Ugc3R5bGU9e3sgY29sb3I6IHJlZFs1MDBdIH19IC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPENoZWNrIHN0eWxlPXt7IGNvbG9yOiBncmVlbls1MDBdIH19IC8+XG4gICAgICAgICl9XG4gICAgICA8L1Rvb2x0aXA+XG4gICAgPC9JbnB1dEFkb3JubWVudD5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBWYWxpZGF0aW9uSW5kaWNhdG9yXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/button/expanding-button.d.ts b/src/main/webapp/component/button/expanding-button.d.ts new file mode 100644 index 00000000000..f295aebf253 --- /dev/null +++ b/src/main/webapp/component/button/expanding-button.d.ts @@ -0,0 +1,22 @@ +import * as React from 'react'; +import Button, { ButtonProps } from '@mui/material/Button'; +import { LinkProps, Link } from 'react-router-dom'; +export type BaseProps = { + Icon?: React.FC>; + expandedLabel: React.ReactNode; + unexpandedLabel: React.ReactNode; + dataId?: string; + expanded: boolean; + orientation?: 'vertical' | 'horizontal'; +}; +type ExpandingButtonProps = (ButtonProps & { + component?: undefined; +} & BaseProps) | (ButtonProps & BaseProps & { + component: typeof Link; +} & Partial) | (ButtonProps & BaseProps & { + component: 'a'; +} & Partial>) | (ButtonProps & BaseProps & { + component: typeof Button; +} & Partial); +declare const _default: ({ expanded, Icon, expandedLabel, unexpandedLabel, dataId, orientation, ...buttonProps }: ExpandingButtonProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/button/expanding-button.js b/src/main/webapp/component/button/expanding-button.js new file mode 100644 index 00000000000..b201e3903e5 --- /dev/null +++ b/src/main/webapp/component/button/expanding-button.js @@ -0,0 +1,40 @@ +import { __assign, __rest } from "tslib"; +import * as React from 'react'; +import FakeIcon from '@mui/icons-material/AcUnit'; +import Button from '@mui/material/Button'; +import { hot } from 'react-hot-loader'; +import Tooltip from '@mui/material/Tooltip'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +import { useIsTruncated } from '../overflow-tooltip/overflow-tooltip'; +var ExpandingButton = function (_a) { + var expanded = _a.expanded, Icon = _a.Icon, expandedLabel = _a.expandedLabel, unexpandedLabel = _a.unexpandedLabel, _b = _a.dataId, dataId = _b === void 0 ? (expandedLabel === null || expandedLabel === void 0 ? void 0 : expandedLabel.toString()) || 'default' : _b, _c = _a.orientation, orientation = _c === void 0 ? 'horizontal' : _c, buttonProps = __rest(_a, ["expanded", "Icon", "expandedLabel", "unexpandedLabel", "dataId", "orientation"]); + var className = buttonProps.className, otherButtonProps = __rest(buttonProps, ["className"]); + var isTruncatedState = useIsTruncated(); + var disableTooltip = (function () { + if ((orientation === 'vertical' && !expanded) || + (!unexpandedLabel && !expanded)) { + return false; + } + else { + return !isTruncatedState.isTruncated; + } + })(); + return (React.createElement(Tooltip, { title: disableTooltip ? ('') : (React.createElement(Paper, { elevation: Elevations.overlays }, + React.createElement("div", { className: "p-2" }, expandedLabel))), onOpen: function () { + isTruncatedState.compareSize.current(); + }, placement: "right" }, + React.createElement(Button, __assign({ "data-id": dataId, fullWidth: true, className: "".concat(className, " transition-all duration-200 ease-in-out whitespace-nowrap max-w-full overflow-hidden relative outline-none ").concat(expanded ? '' : 'p-0') }, otherButtonProps), + React.createElement("div", { className: "flex flex-row flex-nowrap items-center w-full h-full", ref: isTruncatedState.ref }, + React.createElement("div", { className: " ".concat(expanded ? 'hidden' : '', " w-full flex flex-col shrink-0 items-center justify-start flex-nowrap py-2") }, + Icon ? React.createElement(Icon, { className: "py-1" }) : null, + React.createElement("div", { className: "".concat(orientation === 'horizontal' + ? 'w-full' + : 'writing-mode-vertical-lr', " truncate text-center") }, unexpandedLabel)), + React.createElement("div", { className: "".concat(expanded ? '' : 'hidden', " pl-4 shrink-1 w-full truncate") }, + React.createElement("div", { className: "flex flex-row items-center flex-nowrap w-full" }, + Icon ? (React.createElement(Icon, { className: "transition duration-200 ease-in-out mr-2 shrink-0" })) : (React.createElement(FakeIcon, { className: "transition duration-200 ease-in-out mr-2 opacity-0 shrink-0" })), + React.createElement("div", { className: "flex flex-col items-start flex-nowrap text-lg w-full shrink-1 truncate" }, expandedLabel))))))); +}; +export default hot(module)(ExpandingButton); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwYW5kaW5nLWJ1dHRvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvYnV0dG9uL2V4cGFuZGluZy1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLFFBQVEsTUFBTSw0QkFBNEIsQ0FBQTtBQUNqRCxPQUFPLE1BQXVCLE1BQU0sc0JBQXNCLENBQUE7QUFFMUQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sT0FBTyxNQUFNLHVCQUF1QixDQUFBO0FBQzNDLE9BQU8sS0FBSyxNQUFNLHFCQUFxQixDQUFBO0FBQ3ZDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxnQkFB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GR1cmF0aW9uLTIwMCBlYXNlLWluLW91dCB3aGl0ZXNwYWNlLW5vd3JhcCBtYXgtdy1mdWxsIG92ZXJmbG93LWhpZGRlbiByZWxhdGl2ZSBvdXRsaW5lLW5vbmUgJHtcbiAgICAgICAgICBleHBhbmRlZCA/ICcnIDogJ3AtMCdcbiAgICAgICAgfWB9XG4gICAgICAgIHsuLi5vdGhlckJ1dHRvblByb3BzfVxuICAgICAgPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY2xhc3NOYW1lPXtgZmxleCBmbGV4LXJvdyBmbGV4LW5vd3JhcCBpdGVtcy1jZW50ZXIgdy1mdWxsIGgtZnVsbGB9XG4gICAgICAgICAgcmVmPXtpc1RydW5jYXRlZFN0YXRlLnJlZn1cbiAgICAgICAgPlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNsYXNzTmFtZT17YCAke1xuICAgICAgICAgICAgICBleHBhbmRlZCA/ICdoaWRkZW4nIDogJydcbiAgICAgICAgICAgIH0gdy1mdWxsIGZsZXggZmxleC1jb2wgc2hyaW5rLTAgaXRlbXMtY2VudGVyIGp1c3RpZnktc3RhcnQgZmxleC1ub3dyYXAgcHktMmB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge0ljb24gPyA8SWNvbiBjbGFzc05hbWU9e2BweS0xYH0gLz4gOiBudWxsfVxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICBjbGFzc05hbWU9e2Ake1xuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uID09PSAnaG9yaXpvbnRhbCdcbiAgICAgICAgICAgICAgICAgID8gJ3ctZnVsbCdcbiAgICAgICAgICAgICAgICAgIDogJ3dyaXRpbmctbW9kZS12ZXJ0aWNhbC1scidcbiAgICAgICAgICAgICAgfSB0cnVuY2F0ZSB0ZXh0LWNlbnRlcmB9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIHt1bmV4cGFuZGVkTGFiZWx9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNsYXNzTmFtZT17YCR7XG4gICAgICAgICAgICAgIGV4cGFuZGVkID8gJycgOiAnaGlkZGVuJ1xuICAgICAgICAgICAgfSBwbC00IHNocmluay0xIHctZnVsbCB0cnVuY2F0ZWB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtcm93IGl0ZW1zLWNlbnRlciBmbGV4LW5vd3JhcCB3LWZ1bGxcIj5cbiAgICAgICAgICAgICAge0ljb24gPyAoXG4gICAgICAgICAgICAgICAgPEljb24gY2xhc3NOYW1lPVwidHJhbnNpdGlvbiBkdXJhdGlvbi0yMDAgZWFzZS1pbi1vdXQgbXItMiBzaHJpbmstMFwiIC8+XG4gICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgPEZha2VJY29uIGNsYXNzTmFtZT1cInRyYW5zaXRpb24gZHVyYXRpb24tMjAwIGVhc2UtaW4tb3V0IG1yLTIgb3BhY2l0eS0wIHNocmluay0wXCIgLz5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtY29sIGl0ZW1zLXN0YXJ0IGZsZXgtbm93cmFwIHRleHQtbGcgdy1mdWxsIHNocmluay0xIHRydW5jYXRlXCI+XG4gICAgICAgICAgICAgICAge2V4cGFuZGVkTGFiZWx9XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9CdXR0b24+XG4gICAgPC9Ub29sdGlwPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKEV4cGFuZGluZ0J1dHRvbilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/button/hover.d.ts b/src/main/webapp/component/button/hover.d.ts new file mode 100644 index 00000000000..76d1009cfbe --- /dev/null +++ b/src/main/webapp/component/button/hover.d.ts @@ -0,0 +1,11 @@ +/// +import { ButtonProps } from '@mui/material/Button'; +/** + * Allows a button that displays different components when hovering. + * Otherwise everything else is the same. + */ +export declare const HoverButton: (props: Omit & { + children: ({ hover }: { + hover: boolean; + }) => JSX.Element; +}) => JSX.Element; diff --git a/src/main/webapp/component/button/hover.js b/src/main/webapp/component/button/hover.js new file mode 100644 index 00000000000..fd94a519d78 --- /dev/null +++ b/src/main/webapp/component/button/hover.js @@ -0,0 +1,22 @@ +import { __assign, __read, __rest } from "tslib"; +import * as React from 'react'; +import Button from '@mui/material/Button'; +/** + * Allows a button that displays different components when hovering. + * Otherwise everything else is the same. + */ +export var HoverButton = function (props) { + var _a = __read(React.useState(false), 2), hover = _a[0], setHover = _a[1]; + var Children = props.children, buttonProps = __rest(props, ["children"]); + return (React.createElement(Button, __assign({ "data-id": "hover-button", onMouseEnter: function () { + setHover(true); + }, onMouseOver: function () { + setHover(true); + }, onMouseOut: function () { + setHover(false); + }, onMouseLeave: function () { + setHover(false); + } }, buttonProps), + React.createElement(Children, { hover: hover }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG92ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2J1dHRvbi9ob3Zlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sTUFBdUIsTUFBTSxzQkFBc0IsQ0FBQTtBQUUxRDs7O0dBR0c7QUFDSCxNQUFNLENBQUMsSUFBTSxXQUFXLEdBQUcsVUFDekIsS0FFQztJQUVLLElBQUEsS0FBQSxPQUFvQixLQUFLLENBQUMsUUFBUSxDQUFDLE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jaGlsZHJlbjogKHsgaG92ZXIgfTogeyBob3ZlcjogYm9vbGVhbiB9KSA9PiBKU1guRWxlbWVudFxuICB9XG4pID0+IHtcbiAgY29uc3QgW2hvdmVyLCBzZXRIb3Zlcl0gPSBSZWFjdC51c2VTdGF0ZShmYWxzZSlcbiAgY29uc3QgeyBjaGlsZHJlbjogQ2hpbGRyZW4sIC4uLmJ1dHRvblByb3BzIH0gPSBwcm9wc1xuICByZXR1cm4gKFxuICAgIDxCdXR0b25cbiAgICAgIGRhdGEtaWQ9XCJob3Zlci1idXR0b25cIlxuICAgICAgb25Nb3VzZUVudGVyPXsoKSA9PiB7XG4gICAgICAgIHNldEhvdmVyKHRydWUpXG4gICAgICB9fVxuICAgICAgb25Nb3VzZU92ZXI9eygpID0+IHtcbiAgICAgICAgc2V0SG92ZXIodHJ1ZSlcbiAgICAgIH19XG4gICAgICBvbk1vdXNlT3V0PXsoKSA9PiB7XG4gICAgICAgIHNldEhvdmVyKGZhbHNlKVxuICAgICAgfX1cbiAgICAgIG9uTW91c2VMZWF2ZT17KCkgPT4ge1xuICAgICAgICBzZXRIb3ZlcihmYWxzZSlcbiAgICAgIH19XG4gICAgICB7Li4uYnV0dG9uUHJvcHN9XG4gICAgPlxuICAgICAgPENoaWxkcmVuIGhvdmVyPXtob3Zlcn0gLz5cbiAgICA8L0J1dHRvbj5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/custom-events/enter-key-submit.d.ts b/src/main/webapp/component/custom-events/enter-key-submit.d.ts new file mode 100644 index 00000000000..751031a8c97 --- /dev/null +++ b/src/main/webapp/component/custom-events/enter-key-submit.d.ts @@ -0,0 +1,11 @@ +import React from 'react'; +export declare const enterKeySubmitEventName = "enter key submit"; +export type CustomEventType = CustomEvent; +export declare const EnterKeySubmitEventHandler: (e: React.KeyboardEvent) => void; +export declare const EnterKeySubmitProps: Required, HTMLDivElement>, 'onKeyUp'>>; +export declare const dispatchEnterKeySubmitEvent: (e: React.SyntheticEvent) => void; +export declare const useListenToEnterKeySubmitEvent: ({ callback, }: { + callback: (e: CustomEventType) => void; +}) => { + setElement: React.Dispatch>; +}; diff --git a/src/main/webapp/component/custom-events/enter-key-submit.js b/src/main/webapp/component/custom-events/enter-key-submit.js new file mode 100644 index 00000000000..5476107a0d6 --- /dev/null +++ b/src/main/webapp/component/custom-events/enter-key-submit.js @@ -0,0 +1,35 @@ +import { __read } from "tslib"; +import React from 'react'; +export var enterKeySubmitEventName = 'enter key submit'; +export var EnterKeySubmitEventHandler = function (e) { + if (e.key === 'Enter') { + dispatchEnterKeySubmitEvent(e); + } +}; +export var EnterKeySubmitProps = { + onKeyUp: EnterKeySubmitEventHandler, +}; +export var dispatchEnterKeySubmitEvent = function (e) { + var customEvent = new CustomEvent(enterKeySubmitEventName, { + detail: e, + bubbles: true, + }); + e.target.dispatchEvent(customEvent); +}; +export var useListenToEnterKeySubmitEvent = function (_a) { + var callback = _a.callback; + var _b = __read(React.useState(null), 2), element = _b[0], setElement = _b[1]; + React.useEffect(function () { + if (element) { + element.addEventListener(enterKeySubmitEventName, callback); + return function () { + element.removeEventListener(enterKeySubmitEventName, callback); + }; + } + return function () { }; + }, [element, callback]); + return { + setElement: setElement, + }; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50ZXIta2V5LXN1Ym1pdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvY3VzdG9tLWV2ZW50cy9lbnRlci1rZXktc3VibWl0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLE1BQU0sQ0FBQyxJQUFNLHVCQUF1QixHQUFHLGtCQUFrQixDQUFBO0FBSXpELE1BQU0sQ0FBQyxJQUFNLDBCQUEwQixHQUFHLFVB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RhcmdldC5kaXNwYXRjaEV2ZW50KGN1c3RvbUV2ZW50KVxufVxuXG5leHBvcnQgY29uc3QgdXNlTGlzdGVuVG9FbnRlcktleVN1Ym1pdEV2ZW50ID0gKHtcbiAgY2FsbGJhY2ssXG59OiB7XG4gIGNhbGxiYWNrOiAoZTogQ3VzdG9tRXZlbnRUeXBlKSA9PiB2b2lkXG59KSA9PiB7XG4gIGNvbnN0IFtlbGVtZW50LCBzZXRFbGVtZW50XSA9IFJlYWN0LnVzZVN0YXRlPEhUTUxFbGVtZW50IHwgbnVsbD4obnVsbClcblxuICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xuICAgIGlmIChlbGVtZW50KSB7XG4gICAgICBlbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoZW50ZXJLZXlTdWJtaXRFdmVudE5hbWUsIGNhbGxiYWNrKVxuICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgZWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKGVudGVyS2V5U3VibWl0RXZlbnROYW1lLCBjYWxsYmFjaylcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuICgpID0+IHt9XG4gIH0sIFtlbGVtZW50LCBjYWxsYmFja10pXG4gIHJldHVybiB7XG4gICAgc2V0RWxlbWVudCxcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/dark-divider/dark-divider.d.ts b/src/main/webapp/component/dark-divider/dark-divider.d.ts new file mode 100644 index 00000000000..887ba8e59cb --- /dev/null +++ b/src/main/webapp/component/dark-divider/dark-divider.d.ts @@ -0,0 +1,5 @@ +/// +import { DividerProps } from '@mui/material/Divider'; +export declare const DarkDivider: (props: DividerProps) => JSX.Element; +declare const _default: (props: DividerProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/dark-divider/dark-divider.js b/src/main/webapp/component/dark-divider/dark-divider.js new file mode 100644 index 00000000000..8cc30cf21e7 --- /dev/null +++ b/src/main/webapp/component/dark-divider/dark-divider.js @@ -0,0 +1,13 @@ +import { __assign, __rest } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useTheme } from '@mui/material/styles'; +import Divider from '@mui/material/Divider'; +import { dark, light } from '../theme/theme'; +export var DarkDivider = function (props) { + var theme = useTheme(); + var style = props.style, otherProps = __rest(props, ["style"]); + return (React.createElement(Divider, __assign({}, otherProps, { style: __assign({ borderColor: theme.palette.mode === 'dark' ? dark.background : light.background }, style) }))); +}; +export default hot(module)(DarkDivider); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFyay1kaXZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9kYXJrLWRpdmlkZXIvZGFyay1kaXZpZGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtBQUMvQyxPQUFPLE9BQXlCLE1BQU0sdUJBQXVCLENBQUE7QUFDN0QsT0FBTyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUU1QyxNQUFNLENBQUMsSUFBTSxXQUFXLEdBQUcsVUFBQyxLQUFtQjtJQUM3QyxJQUFNLEtBQUssR0FBRyxRQUFRLEVBQUUsQ0FBQTtJQUNoQixJQUFBLEtBQUssR0FBb0IsS0FBSyxNQUF6QixFQUFLLFVBQVUsVUFBSyxLQUFLLEVBQWhDLFNBQXdCLENBQUYsQ0FBVTtJQUN0QyxPQUFPLENBQ0wsb0JBQUMsT0FBTyxlQUNGLFVBQVUsSUFDZCx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lZmF1bHQgaG90KG1vZHVsZSkoRGFya0RpdmlkZXIpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/datatypes/datatypes.d.ts b/src/main/webapp/component/datatypes/datatypes.d.ts new file mode 100644 index 00000000000..f79b44642c1 --- /dev/null +++ b/src/main/webapp/component/datatypes/datatypes.d.ts @@ -0,0 +1,41 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export interface FontAwesomeIconConfig { + class: string; +} +export interface ValueInformation { + attributes: { + [key: string]: string[]; + }; + iconConfig?: FontAwesomeIconConfig; +} +export interface DataTypesConfiguration { + groups: { + [key: string]: { + values: { + [key: string]: ValueInformation; + }; + iconConfig?: FontAwesomeIconConfig; + }; + }; +} +export interface ReverseDataTypesConfiguration { + [key: string]: { + group: { + name: string; + iconConfig?: FontAwesomeIconConfig; + }; + } & ValueInformation; +} diff --git a/src/main/webapp/component/datatypes/datatypes.js b/src/main/webapp/component/datatypes/datatypes.js new file mode 100644 index 00000000000..2dcd2cecf05 --- /dev/null +++ b/src/main/webapp/component/datatypes/datatypes.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; +//# sourceMappingURL=data:application/json;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lvblxuZXhwb3J0IGludGVyZmFjZSBSZXZlcnNlRGF0YVR5cGVzQ29uZmlndXJhdGlvbiB7XG4gIFtrZXk6IHN0cmluZ106IHtcbiAgICBncm91cDoge1xuICAgICAgbmFtZTogc3RyaW5nXG4gICAgICBpY29uQ29uZmlnPzogRm9udEF3ZXNvbWVJY29uQ29uZmlnXG4gICAgfVxuICB9ICYgVmFsdWVJbmZvcm1hdGlvblxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/dialog/dialog.d.ts b/src/main/webapp/component/dialog/dialog.d.ts new file mode 100644 index 00000000000..9394f833ae0 --- /dev/null +++ b/src/main/webapp/component/dialog/dialog.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { DialogProps } from '@mui/material/Dialog'; +import { setType } from '../../typescript/hooks'; +type DialogProviderProps = { + children?: React.ReactNode; + initialDialogProps?: DialogProps; +}; +export declare const useDialog: () => { + setProps: setType>; +}; +export declare const DialogProvider: (props: DialogProviderProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/dialog/dialog.js b/src/main/webapp/component/dialog/dialog.js new file mode 100644 index 00000000000..437fd16ab21 --- /dev/null +++ b/src/main/webapp/component/dialog/dialog.js @@ -0,0 +1,20 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import Dialog from '@mui/material/Dialog'; +import { createCtx } from './../../typescript/context'; +var _a = __read(createCtx(), 2), useDialogContext = _a[0], DialogContextProvider = _a[1]; +export var useDialog = useDialogContext; +export var DialogProvider = function (props) { + var _a = __read(React.useState(__assign({ children: React.createElement(React.Fragment, null), open: false, onClose: function () { + setDialogProps(__assign(__assign({}, dialogProps), { open: false })); + } }, props.initialDialogProps)), 2), dialogProps = _a[0], setDialogProps = _a[1]; + var setProps = function (newProps) { + setDialogProps(__assign(__assign({}, dialogProps), newProps)); + }; + return (React.createElement(DialogContextProvider, { value: { + setProps: setProps, + } }, + props.children, + React.createElement(Dialog, __assign({}, dialogProps)))); +}; +//# sourceMappingURL=data:application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tcbiAgICAgICAgLi4uZGlhbG9nUHJvcHMsXG4gICAgICAgIG9wZW46IGZhbHNlLFxuICAgICAgfSlcbiAgICB9LFxuICAgIC4uLnByb3BzLmluaXRpYWxEaWFsb2dQcm9wcyxcbiAgfSBhcyBEaWFsb2dQcm9wcylcblxuICBjb25zdCBzZXRQcm9wcyA9IChuZXdQcm9wczogRGlhbG9nUHJvcHMpID0+IHtcbiAgICBzZXREaWFsb2dQcm9wcyh7XG4gICAgICAuLi5kaWFsb2dQcm9wcyxcbiAgICAgIC4uLm5ld1Byb3BzLFxuICAgIH0pXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxEaWFsb2dDb250ZXh0UHJvdmlkZXJcbiAgICAgIHZhbHVlPXt7XG4gICAgICAgIHNldFByb3BzLFxuICAgICAgfX1cbiAgICA+XG4gICAgICB7cHJvcHMuY2hpbGRyZW59XG4gICAgICA8RGlhbG9nIHsuLi5kaWFsb2dQcm9wc30gLz5cbiAgICA8L0RpYWxvZ0NvbnRleHRQcm92aWRlcj5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/dialog/index.d.ts b/src/main/webapp/component/dialog/index.d.ts new file mode 100644 index 00000000000..b21ebb2edb3 --- /dev/null +++ b/src/main/webapp/component/dialog/index.d.ts @@ -0,0 +1 @@ +export { useDialog, DialogProvider } from './dialog'; diff --git a/src/main/webapp/component/dialog/index.js b/src/main/webapp/component/dialog/index.js new file mode 100644 index 00000000000..cd81dc4e742 --- /dev/null +++ b/src/main/webapp/component/dialog/index.js @@ -0,0 +1,2 @@ +export { useDialog, DialogProvider } from './dialog'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2RpYWxvZy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxjQUFjLEVBQUUsTUFBTSxVQUFVLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyB1c2VEaWFsb2csIERpYWxvZ1Byb3ZpZGVyIH0gZnJvbSAnLi9kaWFsb2cnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/download/download.d.ts b/src/main/webapp/component/download/download.d.ts new file mode 100644 index 00000000000..421f246e758 --- /dev/null +++ b/src/main/webapp/component/download/download.d.ts @@ -0,0 +1,15 @@ +/// +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +import { Overridable } from '../../js/model/Base/base-classes'; +export declare const normalDownload: ({ result }: { + result: LazyQueryResult; +}) => void; +export declare const BaseDownload: ({ lazyResults, }: { + lazyResults: LazyQueryResult[]; +}) => JSX.Element; +export declare const OverridableDownload: Overridable<({ lazyResults, }: { + lazyResults: LazyQueryResult[]; +}) => JSX.Element>; +export declare const useDownloadComponent: () => ({ lazyResults, }: { + lazyResults: LazyQueryResult[]; +}) => JSX.Element; diff --git a/src/main/webapp/component/download/download.js b/src/main/webapp/component/download/download.js new file mode 100644 index 00000000000..ca36be8f77c --- /dev/null +++ b/src/main/webapp/component/download/download.js @@ -0,0 +1,31 @@ +import * as React from 'react'; +import { useDialog } from '../dialog'; +import { Overridable } from '../../js/model/Base/base-classes'; +import { useOverridable } from '../../js/model/Base/base-classes.hooks'; +export var normalDownload = function (_a) { + var result = _a.result; + var downloadUrl = result.getDownloadUrl(); + // append new query param to prevent downloading cached resource + downloadUrl = + downloadUrl + + (downloadUrl.includes('?') ? '&t=' : '?t=') + + new Date().getTime().toString(); + downloadUrl && window.open(downloadUrl); +}; +// in ddf-ui, we just open the download url and immediately close the dialog, so it should act as before +export var BaseDownload = function (_a) { + var lazyResults = _a.lazyResults; + var setProps = useDialog().setProps; + React.useEffect(function () { + lazyResults.forEach(function (lazyResult) { + normalDownload({ result: lazyResult }); + }); + setProps({ open: false }); + }, []); + return React.createElement(React.Fragment, null); +}; +export var OverridableDownload = new Overridable(BaseDownload); +export var useDownloadComponent = function () { + return useOverridable(OverridableDownload); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG93bmxvYWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2Rvd25sb2FkL2Rvd25sb2FkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUU5QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sV0FBVyxDQUFBO0FBQ3JDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQTtBQUM5RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sd0NBQXdDLENBQUE7QUFFdkUsTUFBTSxDQUFDLElBQU0sY0FBYyxHQUFHLFVBQUMsRUFBdUM7UUFBckMsTUFBTSxZQUFBO0lBQ3JDLElBQUksV0FBVyxHQUFHLE1BQU0sQ0FBQyxjQUFjLEVBQUUsQ0FBQTtJQUN6QyxnRUFBZ0U7SUFDaEUsV0FBVztRQUNULFdBQVc7WUFDWCxDQUFDLFdBQVcsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDO1lBQzNDLElBQUksSUFBSSxFQUFFLENBQUMsT0FBTyxFQUFFLENBQUMsUUFBUSxFQUFFLENBQUE7SUFDakMsV0FBVyxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUE7QUFDekMsQ0FBQyxDQUFBO0FBRUQsd0dBQXdHO0FBQ3hHLE1BQU0sQ0FBQyxJQUFNL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ZGFibGVEb3dubG9hZCA9IG5ldyBPdmVycmlkYWJsZShCYXNlRG93bmxvYWQpXG5cbmV4cG9ydCBjb25zdCB1c2VEb3dubG9hZENvbXBvbmVudCA9ICgpID0+IHtcbiAgcmV0dXJuIHVzZU92ZXJyaWRhYmxlKE92ZXJyaWRhYmxlRG93bmxvYWQpXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/elevated-rights/elevated-rights.d.ts b/src/main/webapp/component/elevated-rights/elevated-rights.d.ts new file mode 100644 index 00000000000..0f7fcb5c4e6 --- /dev/null +++ b/src/main/webapp/component/elevated-rights/elevated-rights.d.ts @@ -0,0 +1,3 @@ +export declare const useElevatedRightsCookieName = "useElevatedRights"; +export declare function getIsUsingElevatedRights(): boolean; +export declare function setIsUsingElevatedRights(value: boolean): void; diff --git a/src/main/webapp/component/elevated-rights/elevated-rights.js b/src/main/webapp/component/elevated-rights/elevated-rights.js new file mode 100644 index 00000000000..6b092a4efdc --- /dev/null +++ b/src/main/webapp/component/elevated-rights/elevated-rights.js @@ -0,0 +1,15 @@ +// since this doesn't have any dependencies, it's better off in it's own file +export var useElevatedRightsCookieName = 'useElevatedRights'; +export function getIsUsingElevatedRights() { + var cookie = document.cookie + .split('; ') + .find(function (row) { return row.startsWith("".concat(useElevatedRightsCookieName, "=")); }); + if (cookie) { + return cookie.split('=')[1] === 'true'; + } + return false; +} +export function setIsUsingElevatedRights(value) { + document.cookie = "".concat(useElevatedRightsCookieName, "=").concat(value, "; path=/"); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxldmF0ZWQtcmlnaHRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9lbGV2YXRlZC1yaWdodHMvZWxldmF0ZWQtcmlnaHRzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQS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UmlnaHRzQ29va2llTmFtZX09YCkpXG4gIGlmIChjb29raWUpIHtcbiAgICByZXR1cm4gY29va2llLnNwbGl0KCc9JylbMV0gPT09ICd0cnVlJ1xuICB9XG4gIHJldHVybiBmYWxzZVxufVxuXG5leHBvcnQgZnVuY3Rpb24gc2V0SXNVc2luZ0VsZXZhdGVkUmlnaHRzKHZhbHVlOiBib29sZWFuKSB7XG4gIGRvY3VtZW50LmNvb2tpZSA9IGAke3VzZUVsZXZhdGVkUmlnaHRzQ29va2llTmFtZX09JHt2YWx1ZX07IHBhdGg9L2Bcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/fields/boolean.d.ts b/src/main/webapp/component/fields/boolean.d.ts new file mode 100644 index 00000000000..883bbf67f2a --- /dev/null +++ b/src/main/webapp/component/fields/boolean.d.ts @@ -0,0 +1,8 @@ +/// +import { ValueTypes } from '../filter-builder/filter.structure'; +type Props = { + value: ValueTypes['boolean']; + onChange: (val: ValueTypes['boolean']) => void; +}; +export declare const BooleanField: ({ value, onChange }: Props) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/boolean.js b/src/main/webapp/component/fields/boolean.js new file mode 100644 index 00000000000..72530477b1a --- /dev/null +++ b/src/main/webapp/component/fields/boolean.js @@ -0,0 +1,36 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +var defaultValue = false; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (typeof value !== 'boolean') { + onChange(defaultValue); + } +}; +export var BooleanField = function (_a) { + var value = _a.value, onChange = _a.onChange; + React.useEffect(function () { + validateShape({ value: value, onChange: onChange }); + }, []); + return (React.createElement(TextField, { fullWidth: true, select: true, variant: "outlined", value: value.toString() === 'true', onChange: function (e) { + onChange(e.target.value === 'true'); + }, size: "small" }, + React.createElement(MenuItem, { value: 'false' }, "false"), + React.createElement(MenuItem, { value: 'true' }, "true"))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vbGVhbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL2Jvb2xlYW4udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUU5QixPQUFPLFNBQVMsTUFBTSx5QkFBeUIsQ0FBQTtBQUUvQyxPQUFPLFFBQVEsTUFBTSx3QkFBd0IsQ0FBQTtBQU83QyxJQUFNLFlBQVksR0FBRyxLQUFLLENBQUE7QUFFMUIsSUFBTSxhQUFhLEdBQUcsVUFBQyxFQUEwQjtRQUF4QixLQUFLLFdBQUEsRUFBRSxRQUFRLGNBQUE7SUFDdEMsSUFBSSxPQUFPLEtBQUssS0FBSyxTQUFTLEVBQUU7UUFDOUIsUUFBUSxDQUFDLFlBQVksQ0FBQyxDQUFBO0tBQ3ZCO0FBQ0gsQ0FBQyxDQUFBO0FBRUQsTUFBTSxDQUFDLElBQU0sWUFBWSxHQUFHLFVBQUMsRUFBMEI7UUFBeEIsS0FBSyxXQUFBLEVBQUUsUUFBUSxjQUFBO0lBQzVDLEtBQUssQ0FBQyxTQUFTLENBQUM7UUFDZCxhQUFhLENBQUMsRUFBRSxLQUFLLE9BQUEsRUFBRSxRQUFRLFVBQUEsRUFBRSxD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Y29uc3QgQm9vbGVhbkZpZWxkID0gKHsgdmFsdWUsIG9uQ2hhbmdlIH06IFByb3BzKSA9PiB7XG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgdmFsaWRhdGVTaGFwZSh7IHZhbHVlLCBvbkNoYW5nZSB9KVxuICB9LCBbXSlcbiAgcmV0dXJuIChcbiAgICA8VGV4dEZpZWxkXG4gICAgICBmdWxsV2lkdGhcbiAgICAgIHNlbGVjdFxuICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgIHZhbHVlPXt2YWx1ZS50b1N0cmluZygpID09PSAndHJ1ZSd9XG4gICAgICBvbkNoYW5nZT17KGUpID0+IHtcbiAgICAgICAgb25DaGFuZ2UoZS50YXJnZXQudmFsdWUgPT09ICd0cnVlJylcbiAgICAgIH19XG4gICAgICBzaXplPVwic21hbGxcIlxuICAgID5cbiAgICAgIDxNZW51SXRlbSB2YWx1ZT17J2ZhbHNlJ30+ZmFsc2U8L01lbnVJdGVtPlxuICAgICAgPE1lbnVJdGVtIHZhbHVlPXsndHJ1ZSd9PnRydWU8L01lbnVJdGVtPlxuICAgIDwvVGV4dEZpZWxkPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/fields/date-around.d.ts b/src/main/webapp/component/fields/date-around.d.ts new file mode 100644 index 00000000000..5dd149df74c --- /dev/null +++ b/src/main/webapp/component/fields/date-around.d.ts @@ -0,0 +1,8 @@ +/// +import { ValueTypes } from '../filter-builder/filter.structure'; +type DateAroundProps = { + value: ValueTypes['around']; + onChange: (val: ValueTypes['around']) => void; +}; +export declare const DateAroundField: ({ value, onChange }: DateAroundProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/date-around.js b/src/main/webapp/component/fields/date-around.js new file mode 100644 index 00000000000..35c13a903cf --- /dev/null +++ b/src/main/webapp/component/fields/date-around.js @@ -0,0 +1,103 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { DateInput } from '@blueprintjs/datetime'; +import { DateHelpers, DefaultMaxDate, DefaultMinDate } from './date-helpers'; +import { MuiOutlinedInputBorderClasses } from '../theme/theme'; +import useTimePrefs from './useTimePrefs'; +import Grid from '@mui/material/Grid/Grid'; +import { NumberField } from './number'; +import TextField from '@mui/material/TextField/TextField'; +import MenuItem from '@mui/material/MenuItem/MenuItem'; +import user from '../singletons/user-instance'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +var defaultValue = function () { + return { + date: new Date().toISOString(), + buffer: { + amount: '1', + unit: 'd', + }, + direction: 'both', + }; +}; +var validateDate = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (!value.date || + !value.buffer || + !value.direction || + DateHelpers.Blueprint.commonProps.parseDate(value.date) === null) { + var newDate = DateHelpers.General.withPrecision(new Date()); + onChange(__assign(__assign({}, defaultValue()), { date: newDate.toISOString() })); + } +}; +export var DateAroundField = function (_a) { + var value = _a.value, onChange = _a.onChange; + var validValue = __assign(__assign({}, defaultValue()), value); + var blueprintDateRef = React.useRef(null); + useTimePrefs(function () { + var shiftedDate = DateHelpers.Blueprint.DateProps.generateValue(value.date); + var unshiftedDate = DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(shiftedDate); + onChange(__assign(__assign({}, validValue), { date: unshiftedDate.toISOString() })); + }); + React.useEffect(function () { + validateDate({ onChange: onChange, value: value }); + }, []); + return (React.createElement(Grid, { container: true, alignItems: "stretch", direction: "column", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full pb-2" }, + React.createElement(DateInput, { ref: blueprintDateRef, timePickerProps: { + useAmPm: user.getAmPmDisplay(), + }, className: MuiOutlinedInputBorderClasses, minDate: DefaultMinDate, maxDate: DefaultMaxDate, closeOnSelection: false, fill: true, formatDate: DateHelpers.Blueprint.commonProps.formatDate, onChange: DateHelpers.Blueprint.DateProps.generateOnChange(function (date) { + onChange(__assign(__assign({}, validValue), { date: date })); + }), parseDate: DateHelpers.Blueprint.commonProps.parseDate, placeholder: DateHelpers.General.getDateFormat(), shortcuts: true, timePrecision: DateHelpers.General.getTimePrecision(), inputProps: __assign({}, EnterKeySubmitProps), popoverProps: { + boundary: 'viewport', + position: 'bottom', + onClose: function () { + setTimeout(function () { + var _a; + (_a = blueprintDateRef.current) === null || _a === void 0 ? void 0 : _a.setState({ isOpen: false }); + }, 0); + }, + }, value: DateHelpers.Blueprint.DateProps.generateValue(validValue.date) })), + React.createElement(Grid, { item: true, className: "w-full pb-2" }, "with buffer of"), + React.createElement(Grid, { container: true, direction: "row", className: "w-full" }, + React.createElement(Grid, { item: true, xs: 4, className: "pb-2" }, + React.createElement(NumberField, { type: "float", onChange: function (val) { + if (onChange) + onChange(__assign(__assign({}, validValue), { buffer: __assign(__assign({}, validValue.buffer), { amount: val.toString() }) })); + }, validation: function (val) { return val > 0; }, validationText: "Must be greater than 0, using previous value of ", value: validValue.buffer.amount })), + React.createElement(Grid, { item: true, xs: 8, className: "pl-2" }, + React.createElement(TextField, { fullWidth: true, variant: "outlined", select: true, onChange: function (e) { + if (onChange) + onChange(__assign(__assign({}, validValue), { buffer: __assign(__assign({}, validValue.buffer), { unit: e.target + .value }) })); + }, size: "small", value: validValue.buffer.unit }, + React.createElement(MenuItem, { value: "s" }, "Seconds"), + React.createElement(MenuItem, { value: "m" }, "Minutes"), + React.createElement(MenuItem, { value: "h" }, "Hours"), + React.createElement(MenuItem, { value: "d" }, "Days"), + React.createElement(MenuItem, { value: "w" }, "Weeks"), + React.createElement(MenuItem, { value: "M" }, "Months"), + React.createElement(MenuItem, { value: "y" }, "Years")))), + React.createElement(TextField, { variant: "outlined", select: true, value: validValue.direction, onChange: function (e) { + if (onChange) + onChange(__assign(__assign({}, validValue), { direction: e.target.value })); + }, size: "small" }, + React.createElement(MenuItem, { value: "both" }, "Before and After"), + React.createElement(MenuItem, { value: "before" }, "Before"), + React.createElement(MenuItem, { value: "after" }, "After")))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1hcm91bmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2ZpZWxkcy9kYXRlLWFyb3VuZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sdUJBQXVCLENBQUE7QUFDakQsT0FBTyxFQUFFLFdBQVcsRUFBRSxjQUFjLEVBQUUsY0FBYyxFQUFFLE1BQU0sZ0JBQWdCLENBQUE7QUFDNUUsT0FBTyxFQUFFLDZCQUE2QixFQUFFLE1BQU0sZ0JBQWdCLENBQUE7QUFDOUQsT0FBTyxZQUFZLE1BQU0sZ0JBQWdCLENBQUE7QUFFekMsT0FBTyxJQUFJLE1BQU0seUJBQXlCLENBQUE7QUFDMUMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUN0QyxPQUFPLFNBQVMsTUFBTSxtQ0FBbUMsQ0FBQTtBQUN6RCxPQUFPLFFBQVEsTUFBTSxpQ0FBaUMsQ0FBQTtBQUV0RCxPQUFPLElBQUksTUFBTSw2QkFBNkIsQ0FBQTtBQUM5QyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQTtBQU92RSxJQU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biAgICAgICAgICAgIHR5cGU9XCJmbG9hdFwiXG4gICAgICAgICAgICBvbkNoYW5nZT17KHZhbCkgPT4ge1xuICAgICAgICAgICAgICBpZiAob25DaGFuZ2UpXG4gICAgICAgICAgICAgICAgb25DaGFuZ2Uoe1xuICAgICAgICAgICAgICAgICAgLi4udmFsaWRWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIGJ1ZmZlcjoge1xuICAgICAgICAgICAgICAgICAgICAuLi52YWxpZFZhbHVlLmJ1ZmZlcixcbiAgICAgICAgICAgICAgICAgICAgYW1vdW50OiB2YWwudG9TdHJpbmcoKSxcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICB2YWxpZGF0aW9uPXsodmFsKSA9PiB2YWwgPiAwfVxuICAgICAgICAgICAgdmFsaWRhdGlvblRleHQ9XCJNdXN0IGJlIGdyZWF0ZXIgdGhhbiAwLCB1c2luZyBwcmV2aW91cyB2YWx1ZSBvZiBcIlxuICAgICAgICAgICAgdmFsdWU9e3ZhbGlkVmFsdWUuYnVmZmVyLmFtb3VudH1cbiAgICAgICAgICAvPlxuICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDxHcmlkIGl0ZW0geHM9ezh9IGNsYXNzTmFtZT1cInBsLTJcIj5cbiAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICBzZWxlY3RcbiAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBpZiAob25DaGFuZ2UpXG4gICAgICAgICAgICAgICAgb25DaGFuZ2Uoe1xuICAgICAgICAgICAgICAgICAgLi4udmFsaWRWYWx1ZSxcbiAgICAgICAgICAgICAgICAgIGJ1ZmZlcjoge1xuICAgICAgICAgICAgICAgICAgICAuLi52YWxpZFZhbH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lcbiAgICAgICAgICAgIG9uQ2hhbmdlKHtcbiAgICAgICAgICAgICAgLi4udmFsaWRWYWx1ZSxcbiAgICAgICAgICAgICAgZGlyZWN0aW9uOiBlLnRhcmdldC52YWx1ZSBhcyBWYWx1ZVR5cGVzWydhcm91bmQnXVsnZGlyZWN0aW9uJ10sXG4gICAgICAgICAgICB9KVxuICAgICAgICB9fVxuICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgPlxuICAgICAgICA8TWVudUl0ZW0gdmFsdWU9XCJib3RoXCI+QmVmb3JlIGFuZCBBZnRlcjwvTWVudUl0ZW0+XG4gICAgICAgIDxNZW51SXRlbSB2YWx1ZT1cImJlZm9yZVwiPkJlZm9yZTwvTWVudUl0ZW0+XG4gICAgICAgIDxNZW51SXRlbSB2YWx1ZT1cImFmdGVyXCI+QWZ0ZXI8L01lbnVJdGVtPlxuICAgICAgPC9UZXh0RmllbGQ+XG4gICAgPC9HcmlkPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/fields/date-around.spec.d.ts b/src/main/webapp/component/fields/date-around.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/component/fields/date-around.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/component/fields/date-around.spec.js b/src/main/webapp/component/fields/date-around.spec.js new file mode 100644 index 00000000000..e1a7860b302 --- /dev/null +++ b/src/main/webapp/component/fields/date-around.spec.js @@ -0,0 +1,96 @@ +import React from 'react'; +import Enzyme, { mount } from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +Enzyme.configure({ adapter: new Adapter() }); +import { DateAroundField } from './date-around'; +import { expect } from 'chai'; +import user from '../singletons/user-instance'; +import Common from '../../js/Common'; +// rely on static data when possible, but in these we can use the DateHelpers (a must for shifted date timezone testing) +var data = { + date1: { + originalISO: '2021-01-15T06:53:54.316Z', + utcISOMinutes: '2021-01-15T06:53:00.000Z', + userFormatISO: { + millisecond: '2021-01-15T03:23:54.316-03:30', + second: '2021-01-15T03:23:54-03:30', + minute: '2021-01-15T03:23-03:30', + }, + userFormat24: { + millisecond: '15 Jan 2021 03:23:54.316 -03:30', + second: '15 Jan 2021 03:23:54 -03:30', + minute: '15 Jan 2021 03:23 -03:30', + }, + userFormat12: { + millisecond: '15 Jan 2021 03:23:54.316 am -03:30', + second: '15 Jan 2021 03:23:54 am -03:30', + minute: '15 Jan 2021 03:23 am -03:30', + }, + }, +}; +var wrapper; +describe('verify date around field works', function () { + beforeEach(function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']); + }); + afterEach(function () { + // Must unmount to stop listening to the user prefs model (the useTimePrefs() hook) + // Has to be unmounted before we set any preferences so we don't trigger any onChange + // callbacks again. + wrapper.unmount(); + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']); + }); + var verifyDateRender = function (format, precision, expected) { + return function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()[format][precision]); + wrapper = mount(React.createElement(DateAroundField, { value: { + date: data.date1.originalISO, + buffer: { + amount: '1', + unit: 'd', + }, + direction: 'both', + }, onChange: function () { } })); + expect(wrapper.render().find('input').val()).to.equal(expected); + }; + }; + it('should render with ISO format and millisecond precision', verifyDateRender('ISO', 'millisecond', data.date1.userFormatISO.millisecond)); + it('should render with ISO format and second precision', verifyDateRender('ISO', 'second', data.date1.userFormatISO.second)); + it('should render with ISO format and minute precision', verifyDateRender('ISO', 'minute', data.date1.userFormatISO.minute)); + it('should render with 24hr format and millisecond precision', verifyDateRender('24', 'millisecond', data.date1.userFormat24.millisecond)); + it('should render with 24hr format and second precision', verifyDateRender('24', 'second', data.date1.userFormat24.second)); + it('should render with 24hr format and minute precision', verifyDateRender('24', 'minute', data.date1.userFormat24.minute)); + it('should render with 12hr format and millisecond precision', verifyDateRender('12', 'millisecond', data.date1.userFormat12.millisecond)); + it('should render with 12hr format and second precision', verifyDateRender('12', 'second', data.date1.userFormat12.second)); + it('should render with 12hr format and minute precision', verifyDateRender('12', 'minute', data.date1.userFormat12.minute)); + it('calls onChange with updated value when precision changes', function () { + var updatedDate = data.date1.userFormatISO.millisecond; + wrapper = mount(React.createElement(DateAroundField, { value: { + date: updatedDate, + buffer: { + amount: '1', + unit: 'd', + }, + direction: 'both', + }, onChange: function (updatedValue) { + updatedDate = updatedValue.date; + } })); + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']); + setTimeout(function () { + expect(updatedDate).to.equal(data.date1.utcISOMinutes); + }, 100); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1hcm91bmQuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL2RhdGUtYXJvdW5kLnNwZWMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUN6QixPQUFPLE1BQU0sRUFBRSxFQUFFLEtBQUssRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUN0QyxPQUFPLE9BQU8sTUFBTSxvQ0FBb0MsQ0FBQTtBQUN4RCxNQUFNLENBQUMsU0FBUyxDQUFDLEVBQUUsT0FBTyxFQUFFLElBQUksT0FBTyxFQUFFLEVBQUUsQ0FBQyxDQUFBO0FBRTVDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFDL0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUU3QixPQUFPLElBQUksTUFBTSw2QkFBNkIsQ0FBQTtBQUM5QyxPQUFPLE1BQU0sTUFBTSxpQkFBaUIsQ0FBQTt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AgICAgIGRhdGU6IHVwZGF0ZWREYXRlLFxuICAgICAgICAgIGJ1ZmZlcjoge1xuICAgICAgICAgICAgYW1vdW50OiAnMScsXG4gICAgICAgICAgICB1bml0OiAnZCcsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkaXJlY3Rpb246ICdib3RoJyxcbiAgICAgICAgfX1cbiAgICAgICAgb25DaGFuZ2U9eyh1cGRhdGVkVmFsdWUpID0+IHtcbiAgICAgICAgICB1cGRhdGVkRGF0ZSA9IHVwZGF0ZWRWYWx1ZS5kYXRlXG4gICAgICAgIH19XG4gICAgICAvPlxuICAgIClcbiAgICB1c2VyXG4gICAgICAuZ2V0KCd1c2VyJylcbiAgICAgIC5nZXQoJ3ByZWZlcmVuY2VzJylcbiAgICAgIC5zZXQoJ2RhdGVUaW1lRm9ybWF0JywgQ29tbW9uLmdldERhdGVUaW1lRm9ybWF0cygpWydJU08nXVsnbWludXRlJ10pXG4gICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICBleHBlY3QodXBkYXRlZERhdGUpLnRvLmVxdWFsKGRhdGEuZGF0ZTEudXRjSVNPTWludXRlcylcbiAgICB9LCAxMDApXG4gIH0pXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/fields/date-helpers.d.ts b/src/main/webapp/component/fields/date-helpers.d.ts new file mode 100644 index 00000000000..87aaf0031aa --- /dev/null +++ b/src/main/webapp/component/fields/date-helpers.d.ts @@ -0,0 +1,60 @@ +import { ValueTypes } from '../filter-builder/filter.structure'; +export declare const ISO_8601_FORMAT_ZONED = "YYYY-MM-DDTHH:mm:ss.SSSZ"; +export declare const DefaultMinDate: Date; +export declare const DefaultMaxDate: Date; +export declare const DateHelpers: { + General: { + getDateFormat: () => string; + getTimeZone: () => string; + getTimePrecision: () => import("@blueprintjs/datetime").TimePrecision; + withPrecision: (date: Date) => Date; + }; + Blueprint: { + commonProps: { + /** + * Need some user feedback on how this works. I think it works appropriately at the moment, because it turns user input into the user timezone of choice. + * + * So if user enters time in another timezone by pasting, the input will fix it for them to show it in their chosen timezone. + * + * TLDR: this function is only called when the user manually types in a date + */ + parseDate: (input?: string) => Date | null; + /** + * Basically undoes the value shift to make sure the date is displayed in user's chosen timezone + */ + formatDate: (date: Date) => string; + isValid: (date: Date, minDate?: Date, maxDate?: Date) => boolean; + }; + DateProps: { + generateOnChange: (onChange: (value: string) => void) => ((selectedDate: Date, isUserChange: boolean) => void) | undefined; + generateValue: (value: string, minDate?: Date, maxDate?: Date) => Date; + }; + DateRangeProps: { + generateOnChange: (onChange: (value: ValueTypes['during']) => void) => ((selectedRange: import("@blueprintjs/datetime").DateRange) => void) | undefined; + generateValue: (value: ValueTypes['during'], minDate?: Date, maxDate?: Date) => import("@blueprintjs/datetime").DateRange | undefined; + }; + converters: { + /** + * The datepicker from blueprint doesn't handle timezones. So if we want to make it feel like the user is in their + * chosen timezone, we have to shift the date ourselves. So what we do is pretend the value is utc, then calculate the offset of the computer's local timezone and the timezone the user wants to create a total offset. This is because the datepicker internally + * uses date, so we have to pretend we're in local time. We then take that utc date and add the totaloffset, then tell the datepicker that is our value. As a result, when the datepicker internally uses Date it will shift back to the correct timezone. + * + * TLDR: Use this on a date string formatted in the manner specified by the provided format going INTO the blueprint datepicker (the value prop). Use the sibling function UntimeshiftFromDatePicker to reverse this. + */ + TimeshiftForDatePicker: (value: string, format: string, minDate?: Date, maxDate?: Date) => Date; + /** + * The form within the datepicker is Timeshifted, so we have to untimeshift things as they come out of the datepicker. + * See TimeshiftForDatePicker, since we're undoing what we do there + * + * TLDR: Use this on the Date object coming out of the Blueprint datepicker (only if you used the sibling function to format the value going in of course, since it reverses it). That means the use this in the onChange prop and the formatDate prop. + */ + UntimeshiftFromDatePicker: (value: Date) => Date; + /** + * The output from the onChange is an ISOString. This converts it to a string in the user's timezone and preferred format. + * + * TLDR: Use this on the string from the onChange when you want to display it. + */ + ISOtoFormattedString: (value: string) => string; + }; + }; +}; diff --git a/src/main/webapp/component/fields/date-helpers.js b/src/main/webapp/component/fields/date-helpers.js new file mode 100644 index 00000000000..7cbe56e2225 --- /dev/null +++ b/src/main/webapp/component/fields/date-helpers.js @@ -0,0 +1,196 @@ +import { __read } from "tslib"; +import user from '../singletons/user-instance'; +import moment from 'moment-timezone'; +import { isDateValid, isDayInRange, } from '@blueprintjs/datetime/lib/esm/common/dateUtils'; +import { getDefaultMaxDate } from '@blueprintjs/datetime/lib/esm/datePickerCore'; +import Common from '../../js/Common'; +export var ISO_8601_FORMAT_ZONED = 'YYYY-MM-DDTHH:mm:ss.SSSZ'; +export var DefaultMinDate = new Date('Jan 1, 1900'); +export var DefaultMaxDate = moment(getDefaultMaxDate()) + .add(10, 'years') + .toDate(); +export var DateHelpers = { + General: { + getDateFormat: function () { + return user.get('user').get('preferences').get('dateTimeFormat')['datetimefmt']; + }, + getTimeZone: function () { + return user.get('user').get('preferences').get('timeZone'); + }, + getTimePrecision: function () { + return Common.getDateTimeFormatsReverseMap()[DateHelpers.General.getDateFormat()].precision; + }, + withPrecision: function (date) { + switch (DateHelpers.General.getTimePrecision()) { + case 'minute': + date.setUTCSeconds(0); + // Intentional fall-through + case 'second': + date.setUTCMilliseconds(0); + } + return date; + }, + }, + Blueprint: { + commonProps: { + /** + * Need some user feedback on how this works. I think it works appropriately at the moment, because it turns user input into the user timezone of choice. + * + * So if user enters time in another timezone by pasting, the input will fix it for them to show it in their chosen timezone. + * + * TLDR: this function is only called when the user manually types in a date + */ + parseDate: function (input) { + try { + return DateHelpers.Blueprint.converters.TimeshiftForDatePicker(input || '', DateHelpers.General.getDateFormat()); + } + catch (err) { + return null; + } + }, + /** + * Basically undoes the value shift to make sure the date is displayed in user's chosen timezone + */ + formatDate: function (date) { + try { + var unshiftedDate = DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(date); + return moment(unshiftedDate) + .tz(DateHelpers.General.getTimeZone()) + .format(DateHelpers.General.getDateFormat()); + } + catch (err) { + return ''; + } + }, + isValid: function (date, minDate, maxDate) { + if (minDate === void 0) { minDate = DefaultMinDate; } + if (maxDate === void 0) { maxDate = DefaultMaxDate; } + return (date && isDateValid(date) && isDayInRange(date, [minDate, maxDate])); + }, + }, + DateProps: { + generateOnChange: function (onChange) { + return (function (selectedDate, isUserChange) { + if (selectedDate && isUserChange) { + var unshiftedDate = DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(selectedDate); + onChange(unshiftedDate.toISOString()); + } + }); + }, + generateValue: function (value, minDate, maxDate) { + return DateHelpers.Blueprint.converters.TimeshiftForDatePicker(value, ISO_8601_FORMAT_ZONED, minDate, maxDate); + }, + }, + DateRangeProps: { + generateOnChange: function (onChange) { + return (function (_a) { + var _b = __read(_a, 2), start = _b[0], end = _b[1]; + if (onChange) { + onChange({ + start: start + ? DateHelpers.Blueprint.converters + .UntimeshiftFromDatePicker(start) + .toISOString() + : '', + end: end + ? DateHelpers.Blueprint.converters + .UntimeshiftFromDatePicker(end) + .toISOString() + : '', + }); + } + }); + }, + // null is how the blueprint datepicker represents an empty or invalid date + generateValue: function (value, minDate, maxDate) { + return [ + value.start + ? DateHelpers.Blueprint.converters.TimeshiftForDatePicker(value.start, ISO_8601_FORMAT_ZONED, minDate, maxDate) + : null, + value.end + ? DateHelpers.Blueprint.converters.TimeshiftForDatePicker(value.end, ISO_8601_FORMAT_ZONED, minDate, maxDate) + : null, + ]; + }, + }, + converters: { + /** + * The datepicker from blueprint doesn't handle timezones. So if we want to make it feel like the user is in their + * chosen timezone, we have to shift the date ourselves. So what we do is pretend the value is utc, then calculate the offset of the computer's local timezone and the timezone the user wants to create a total offset. This is because the datepicker internally + * uses date, so we have to pretend we're in local time. We then take that utc date and add the totaloffset, then tell the datepicker that is our value. As a result, when the datepicker internally uses Date it will shift back to the correct timezone. + * + * TLDR: Use this on a date string formatted in the manner specified by the provided format going INTO the blueprint datepicker (the value prop). Use the sibling function UntimeshiftFromDatePicker to reverse this. + */ + TimeshiftForDatePicker: function (value, format, minDate, maxDate) { + try { + var unshiftedDate = moment(value, format); + if (!unshiftedDate.isValid()) { + return DateHelpers.Blueprint.converters.TimeshiftForDatePicker(moment.utc().toISOString(), ISO_8601_FORMAT_ZONED); + } + switch (DateHelpers.General.getTimePrecision()) { + case 'minute': + unshiftedDate.seconds(0); + // Intentional fall-through + case 'second': + unshiftedDate.milliseconds(0); + } + var utcOffsetMinutesLocal = new Date().getTimezoneOffset(); + var utcOffsetMinutesTimezone = moment + .tz(value, format, DateHelpers.General.getTimeZone()) // pass in the value, otherwise it won't account for daylight savings time! + .utcOffset(); + var totalOffset = utcOffsetMinutesLocal + utcOffsetMinutesTimezone; + var shiftedDate = unshiftedDate.add(totalOffset, 'minutes'); + if (shiftedDate.isValid() && + DateHelpers.Blueprint.commonProps.isValid(shiftedDate.toDate(), minDate, maxDate)) { + return shiftedDate.toDate(); + } + else { + return DateHelpers.Blueprint.converters.TimeshiftForDatePicker(moment.utc().toISOString(), ISO_8601_FORMAT_ZONED); + } + } + catch (err) { + console.error(err); + return DateHelpers.Blueprint.converters.TimeshiftForDatePicker(moment.utc().toISOString(), ISO_8601_FORMAT_ZONED); + } + }, + /** + * The form within the datepicker is Timeshifted, so we have to untimeshift things as they come out of the datepicker. + * See TimeshiftForDatePicker, since we're undoing what we do there + * + * TLDR: Use this on the Date object coming out of the Blueprint datepicker (only if you used the sibling function to format the value going in of course, since it reverses it). That means the use this in the onChange prop and the formatDate prop. + */ + UntimeshiftFromDatePicker: function (value) { + try { + var shiftedDate = moment(value); + switch (DateHelpers.General.getTimePrecision()) { + case 'minute': + shiftedDate.seconds(0); + // Intentional fall-through + case 'second': + shiftedDate.milliseconds(0); + } + var utcOffsetMinutesLocal = new Date().getTimezoneOffset(); + var utcOffsetMinutesTimezone = moment + .tz(value, DateHelpers.General.getTimeZone()) // pass in the value, otherwise it won't account for daylight savings time! + .utcOffset(); + var totalOffset = utcOffsetMinutesLocal + utcOffsetMinutesTimezone; + return shiftedDate.subtract(totalOffset, 'minutes').toDate(); + } + catch (err) { + console.error(err); + return DateHelpers.General.withPrecision(new Date()); + } + }, + /** + * The output from the onChange is an ISOString. This converts it to a string in the user's timezone and preferred format. + * + * TLDR: Use this on the string from the onChange when you want to display it. + */ + ISOtoFormattedString: function (value) { + var date = DateHelpers.Blueprint.DateProps.generateValue(value); + return DateHelpers.Blueprint.commonProps.formatDate(date); + }, + }, + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1oZWxwZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9maWVsZHMvZGF0ZS1oZWxwZXJzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBR0EsT0FBTyxJQUFJLE1BQU0sNkJBQTZCLENBQUE7QUFDOUMsT0FBTyxNQUFNLE1BQU0saUJBQWlCLENBQUE7QUFDcEMsT0FBTyxFQUNMLFdBQVcsRUFDWCxZQUFZLEdBQ2IsTUFBTSxnREFBZ0QsQ0FBQTtBQUN2RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQTtBQUNoRixPQUFPLE1BQU0sTUFBTSxpQkFBaUIsQ0FBQTtBQUVwQyxNQUFNLENBQUMsSUFBTSxxQkFBcUIsR0FBRywwQkFBMEIsQ0FBQTtBQUUvRCxNQUFNLENBQUMsSUFBTSxjQUFjLEdBQUcsSUFBSSxJQUFJLENBQUMsYUFBYSxDQUFDLENBQUE7QUFFckQsTUFBTSxDQUFDLElBQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxpQkFBaUIsRUFBRSxDQUFDO0tBQ3RELEdBQUcsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDO0tBQ2hCLE1BQU0sRUFBRSxDQUFBO0FBRVgsTUFBTSxDQUFDLElBQU0sV0FBVyxHQUFHO0lBQ3pCLE9BQU8sRUFBRTtRQUNQLGFB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xuICAgICAgZ2VuZXJhdGVPbkNoYW5nZTogKG9uQ2hhbmdlOiAodmFsdWU6IFZhbHVlVHlwZXNbJ2R1cmluZyddKSA9PiB2b2lkKSA9PiB7XG4gICAgICAgIHJldHVybiAoKFtzdGFydCwgZW5kXSkgPT4ge1xuICAgICAgICAgIGlmIChvbkNoYW5nZSkge1xuICAgICAgICAgICAgb25DaGFuZ2Uoe1xuICAgICAgICAgICAgICBzdGFydDogc3RhcnRcbiAgICAgICAgICAgICAgICA/IERhdGVIZWxwZXJzLkJsdWVwcmludC5jb252ZXJ0ZXJzXG4gICAgICAgICAgICAgICAgICAgIC5VbnRpbWVzaGlmdEZyb21EYXRlUGlja2VyKHN0YXJ0KVxuICAgICAgICAgICAgICAgICAgICAudG9JU09TdHJpbmcoKVxuICAgICAgICAgICAgICAgIDogJycsXG4gICAgICAgICAgICAgIGVuZDogZW5kXG4gICAgICAgICAgICAgICAgPyBEYXRlSGVscGVycy5CbHVlcHJpbnQuY29udmVydGVyc1xuICAgICAgICAgICAgICAgICAgICAuVW50aW1lc2hpZnRGcm9tRGF0ZVBpY2tlcihlbmQpXG4gICAgICAgICAgICAgICAgICAgIC50b0lTT1N0cmluZygpXG4gICAgICAgICAgICAgICAgOiAnJyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9KSBhcyBJRGF0ZVJhbmdlSW5wdXRQcm9wc1snb25DaGFuZ2UnXVxuICAgICAgfSxcbiAgICAgIC8vIG51bGwgaXMgaG93IHRoZSBibHVlcHJpbnQgZGF0ZXBpY2tlciByZXByZXNlbnRzIGFuIGVtcHR5IG9yIGludmFsaWQgZGF0ZVxuICAgICAgZ2VuZXJhdGVWYWx1ZTogKFxuICAgICAgICB2YWx1ZTogVmFsdWVUeXBlc1snZHVyaW5nJ10sXG4gICAgICAgIG1pbkRhdGU/OiBEYXRlLFxuICAgICAgICBtYXhEYXRlPzogRGF0ZVxuICAgICAgKSA9PlxuICAgICAgICBbXG4gICAgICA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uc3QgdG90YWxPZmZzZXQgPSB1dGNPZmZzZXRNaW51dGVzTG9jYWwgKyB1dGNPZmZzZXRNaW51dGVzVGltZXpvbmVcbiAgICAgICAgICBjb25zdCBzaGlmdGVkRGF0ZSA9IHVuc2hpZnRlZERhdGUuYWRkKHRvdGFsT2Zmc2V0LCAnbWludXRlcycpXG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgc2hpZnRlZERhdGUuaXNWYWxpZCgpICYmXG4gICAgICAgICAgICBEYXRlSGVscGVycy5CbHVlcHJpbnQuY29tbW9uUHJvcHMuaXNWYWxpZChcbiAgICAgICAgICAgICAgc2hpZnRlZERhdGUudG9EYXRlKCksXG4gICAgICAgICAgICAgIG1pbkRhdGUsXG4gICAgICAgICAgICAgIG1heERhdGVcbiAgICAgICAgICAgIClcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIHJldHVybiBzaGlmdGVkRGF0ZS50b0RhdGUoKVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gRGF0ZUhlbHBlcnMuQmx1ZXByaW50LmNvbnZlcnRlcnMuVGltZXNoaWZ0Rm9yRGF0ZVBpY2tlcihcbiAgICAgICAgICAgICAgbW9tZW50LnV0YygpLnRvSVNPU3RyaW5nKCksXG4gICAgICAgICAgICAgIElTT184NjAxX0ZPUk1BVF9aT05FRFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpXG4gICAgICAgICAgcmV0dXJuIERhdGVIZWxwZXJzLkJsdWVwcmludC5jb252ZXJ0ZXJzLlRpbWVzaGlmdEZvckRhdGVQaWNrZXIoXG4gICAgICAgICAgICBtb21lbnQudXRjKCkudG9JU09TdHJpbmcoKSxcbiAgICAgICAgICAgIElTT184NjAxX0ZPUk1BVF9aT05FRFxuICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIC8qK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XNwbGF5IGl0LlxuICAgICAgICovXG4gICAgICBJU090b0Zvcm1hdHRlZFN0cmluZzogKHZhbHVlOiBzdHJpbmcpID0+IHtcbiAgICAgICAgY29uc3QgZGF0ZSA9IERhdGVIZWxwZXJzLkJsdWVwcmludC5EYXRlUHJvcHMuZ2VuZXJhdGVWYWx1ZSh2YWx1ZSlcbiAgICAgICAgcmV0dXJuIERhdGVIZWxwZXJzLkJsdWVwcmludC5jb21tb25Qcm9wcy5mb3JtYXREYXRlKGRhdGUpXG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/fields/date-helpers.spec.d.ts b/src/main/webapp/component/fields/date-helpers.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/component/fields/date-helpers.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/component/fields/date-helpers.spec.js b/src/main/webapp/component/fields/date-helpers.spec.js new file mode 100644 index 00000000000..7e957815872 --- /dev/null +++ b/src/main/webapp/component/fields/date-helpers.spec.js @@ -0,0 +1,47 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import { DateHelpers, ISO_8601_FORMAT_ZONED } from './date-helpers'; +import user from '../singletons/user-instance'; +import Common from '../../js/Common'; +user.get('user').get('preferences').set('timeZone', 'America/St_Johns'); +var date = new Date(); +describe('verify that transforming to and from timezone is accurate (no loss)', function () { + it("shifts and unshifts without losing information ".concat(date.toISOString()), function () { + var timeShiftedDate = DateHelpers.Blueprint.converters.TimeshiftForDatePicker(date.toISOString(), ISO_8601_FORMAT_ZONED); + var unshiftedDate = DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(timeShiftedDate); + expect(date.toISOString(), 'Unexpected difference').to.equal(unshiftedDate.toISOString()); + }); +}); +describe('untimeshifting respects the time precision', function () { + it('milliseconds are 0 when time precision is seconds', function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['second']); + var unshiftedDate = DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(new Date('2023-04-23T22:39:46.117Z')); + expect(unshiftedDate.getUTCMilliseconds()).to.equal(0); + }); + it('seconds and milliseconds are 0 when time precision is minutes', function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']); + var unshiftedDate = DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(new Date('2023-04-23T22:39:46.117Z')); + expect(unshiftedDate.getUTCMilliseconds()).to.equal(0); + expect(unshiftedDate.getUTCSeconds()).to.equal(0); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1oZWxwZXJzLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2ZpZWxkcy9kYXRlLWhlbHBlcnMuc3BlYy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxNQUFNLENBQUE7QUFDN0IsT0FBTyxFQUFFLFdBQVcsRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBQ25FLE9BQU8sSUFBSSxNQUFNLDZCQUE2QixDQUFBO0FBQzlDLE9BQU8sTUFBTSxNQUFNLGlCQUFpQixDQUFBO0FBRXBDLElB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0pXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/fields/date-range.d.ts b/src/main/webapp/component/fields/date-range.d.ts new file mode 100644 index 00000000000..3e8c1ecc508 --- /dev/null +++ b/src/main/webapp/component/fields/date-range.d.ts @@ -0,0 +1,20 @@ +/// +import { IDateRangeInputProps } from '@blueprintjs/datetime'; +import { ValueTypes } from '../filter-builder/filter.structure'; +type Props = { + value: ValueTypes['during']; + onChange: (value: ValueTypes['during']) => void; + /** + * Override if you absolutely must + */ + BPDateRangeProps?: Partial; +}; +export declare function defaultValue(): { + start: string; + end: string; +}; +/** + * By updating invalid starting values before we go into the above component, we can make sure we always have a valid value to fall back to. + */ +export declare const DateRangeField: ({ value, onChange, BPDateRangeProps, }: Props) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/date-range.js b/src/main/webapp/component/fields/date-range.js new file mode 100644 index 00000000000..92f85add158 --- /dev/null +++ b/src/main/webapp/component/fields/date-range.js @@ -0,0 +1,144 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { DateRangeInput } from '@blueprintjs/datetime'; +import { DateHelpers, DefaultMaxDate, DefaultMinDate } from './date-helpers'; +import { MuiOutlinedInputBorderClasses } from '../theme/theme'; +import useTimePrefs from './useTimePrefs'; +import user from '../singletons/user-instance'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +import FormHelperText from '@mui/material/FormHelperText'; +import LinearProgress from '@mui/material/LinearProgress'; +export function defaultValue() { + var end = DateHelpers.General.withPrecision(new Date()); + var start = DateHelpers.General.withPrecision(new Date(end.valueOf() - 86400000)); // start and end can't be equal or the backend will throw a fit + return { + start: start.toISOString(), + end: end.toISOString(), + }; +} +/** + * Used in the below components to test values for validity and to provide a message to the user if they are invalid. + */ +function isValidValue(value) { + if (value && value.start && value.end) { + // end has to be after start too, so convert from iso and check + var startDate = new Date(value.start); + var endDate = new Date(value.end); + return { + valid: startDate < endDate, + message: 'Start date must be before end date, using previous valid values:', + }; + } + else { + return { + valid: false, + message: 'Start and end date must be set, using previous valid values:', + }; + } +} +/** + * There are two things to check before passing values upwards to parent components through the onChange. + * 1. Start and end date need to be valid dates. + * 2. Start date must be before end date. (cannot be equal either) + * + * Given those possibilities, we can construct a message to try and prod the user as to why a value is invalid. + */ +function useLocalValue(_a) { + var value = _a.value, onChange = _a.onChange; + var _b = __read(React.useState(value), 2), localValue = _b[0], setLocalValue = _b[1]; // since we don't get here with an invalid value, we can just set it to the value + var _c = __read(React.useState(false), 2), hasValidationIssues = _c[0], setHasValidationIssues = _c[1]; + var _d = __read(React.useState(null), 2), constructedValidationText = _d[0], setConstructedValidationText = _d[1]; + React.useEffect(function () { + var validity = isValidValue(localValue); + if (onChange && validity.valid) { + setHasValidationIssues(false); + setConstructedValidationText(''); + if (value !== localValue) + onChange(localValue); + } + else { + setConstructedValidationText(React.createElement(React.Fragment, null, + React.createElement("div", null, validity.message), + React.createElement("div", null, + "start: ", + value.start), + React.createElement("div", null, + "end: ", + value.end))); + setHasValidationIssues(true); + } + }, [localValue, value]); + return { + localValue: localValue, + setLocalValue: setLocalValue, + hasValidationIssues: hasValidationIssues, + constructedValidationText: constructedValidationText, + }; +} +/** + * If the initial value is invalid, we immediately call the onChange to make sure we start with a valid value. + */ +function useInitialValueValidation(_a) { + var value = _a.value, onChange = _a.onChange; + React.useEffect(function () { + if (!isValidValue(value).valid) { + onChange(defaultValue()); + } + }, []); +} +/** + * This component will always have a valid value (start and end date set and start < end), and onChange will never get an invalid value + */ +var DateRangeFieldWithoutInitialValidation = function (_a) { + var value = _a.value, onChange = _a.onChange, BPDateRangeProps = _a.BPDateRangeProps; + var _b = useLocalValue({ value: value, onChange: onChange }), localValue = _b.localValue, setLocalValue = _b.setLocalValue, hasValidationIssues = _b.hasValidationIssues, constructedValidationText = _b.constructedValidationText; + useTimePrefs(function () { + var shiftedDates = DateHelpers.Blueprint.DateRangeProps.generateValue(value); // as said above, this will always be valid, so no need to fret on converting + setLocalValue({ + start: DateHelpers.Blueprint.converters + .UntimeshiftFromDatePicker(shiftedDates[0]) + .toISOString(), + end: DateHelpers.Blueprint.converters + .UntimeshiftFromDatePicker(shiftedDates[1]) + .toISOString(), + }); + }); + return (React.createElement(React.Fragment, null, + React.createElement(DateRangeInput, __assign({ timePickerProps: { + useAmPm: user.getAmPmDisplay(), + }, allowSingleDayRange: true, minDate: DefaultMinDate, maxDate: DefaultMaxDate, endInputProps: __assign({ fill: true, className: MuiOutlinedInputBorderClasses }, EnterKeySubmitProps), startInputProps: __assign({ fill: true, className: MuiOutlinedInputBorderClasses }, EnterKeySubmitProps), className: "where", closeOnSelection: false, formatDate: DateHelpers.Blueprint.commonProps.formatDate, onChange: DateHelpers.Blueprint.DateRangeProps.generateOnChange(function (value) { + setLocalValue(value); + }), popoverProps: { + boundary: 'viewport', + position: 'bottom', + }, parseDate: DateHelpers.Blueprint.commonProps.parseDate, shortcuts: true, timePrecision: DateHelpers.General.getTimePrecision(), placeholder: DateHelpers.General.getDateFormat(), value: DateHelpers.Blueprint.DateRangeProps.generateValue(localValue) }, BPDateRangeProps)), + hasValidationIssues ? (React.createElement(React.Fragment, null, + React.createElement(FormHelperText, { className: "px-2 Mui-text-error" }, constructedValidationText))) : null)); +}; +/** + * By updating invalid starting values before we go into the above component, we can make sure we always have a valid value to fall back to. + */ +export var DateRangeField = function (_a) { + var value = _a.value, onChange = _a.onChange, BPDateRangeProps = _a.BPDateRangeProps; + useInitialValueValidation({ value: value, onChange: onChange, BPDateRangeProps: BPDateRangeProps }); + var valueValidity = isValidValue(value); + if (!valueValidity.valid) { + return React.createElement(LinearProgress, { className: "w-full h-2" }); + } + return (React.createElement(DateRangeFieldWithoutInitialValidation, { value: value, onChange: onChange, BPDateRangeProps: BPDateRangeProps })); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1yYW5nZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL2RhdGUtcmFuZ2UudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLGNBQWMsRUFBd0IsTUFBTSx1QkFBdUIsQ0FBQTtBQUM1RSxPQUFPLEVBQUUsV0FBVyxFQUFFLGNBQWMsRUFBRSxjQUFjLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUU1RSxPQUFPLEVBQUUsNkJBQTZCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUM5RCxPQUFPLFlBQVksTUFBTSxnQkFBZ0IsQ0FBQTtBQUV6QyxPQUFPLElBQUksTUFBTSw2QkFBNkIsQ0FBQTtBQUM5QyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQTtBQUN2RSxPQUFPLGNBQWMsTUFBTSw4QkFBOEIsQ0FBQTtBQUN6RCxPQUFPLGNBQWMsTUFBTSw4QkFBOEIsQ0FBQTtBQVd6RCxNQUFNLFVBQVUsWUFBWTtJQUMxQixJQUFNLEdBQUcsR0FBRyxXQUFXLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxJQUFJLElBQUksRUFBRSxDQUFDLENBQUE7SUFDekQsSUFBTSxLQUFLLEdBQUcsV0FBVyxDQUFDLE9BQU8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5cbiAgICAgICkgOiBudWxsfVxuICAgIDwvPlxuICApXG59XG5cbi8qKlxuICogIEJ5IHVwZGF0aW5nIGludmFsaWQgc3RhcnRpbmcgdmFsdWVzIGJlZm9yZSB3ZSBnbyBpbnRvIHRoZSBhYm92ZSBjb21wb25lbnQsIHdlIGNhbiBtYWtlIHN1cmUgd2UgYWx3YXlzIGhhdmUgYSB2YWxpZCB2YWx1ZSB0byBmYWxsIGJhY2sgdG8uXG4gKi9cbmV4cG9ydCBjb25zdCBEYXRlUmFuZ2VGaWVsZCA9ICh7XG4gIHZhbHVlLFxuICBvbkNoYW5nZSxcbiAgQlBEYXRlUmFuZ2VQcm9wcyxcbn06IFByb3BzKSA9PiB7XG4gIHVzZUluaXRpYWxWYWx1ZVZhbGlkYXRpb24oeyB2YWx1ZSwgb25DaGFuZ2UsIEJQRGF0ZVJhbmdlUHJvcHMgfSlcbiAgY29uc3QgdmFsdWVWYWxpZGl0eSA9IGlzVmFsaWRWYWx1ZSh2YWx1ZSlcbiAgaWYgKCF2YWx1ZVZhbGlkaXR5LnZhbGlkKSB7XG4gICAgcmV0dXJuIDxMaW5lYXJQcm9ncmVzcyBjbGFzc05hbWU9XCJ3LWZ1bGwgaC0yXCIgLz5cbiAgfVxuICByZXR1cm4gKFxuICAgIDxEYXRlUmFuZ2VGaWVsZFdpdGhvdXRJbml0aWFsVmFsaWRhdGlvblxuICAgICAgdmFsdWU9e3ZhbHVlfVxuICAgICAgb25DaGFuZ2U9e29uQ2hhbmdlfVxuICAgICAgQlBEYXRlUmFuZ2VQcm9wcz17QlBEYXRlUmFuZ2VQcm9wc31cbiAgICAvPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/fields/date-range.spec.d.ts b/src/main/webapp/component/fields/date-range.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/component/fields/date-range.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/component/fields/date-range.spec.js b/src/main/webapp/component/fields/date-range.spec.js new file mode 100644 index 00000000000..b21b59d2c47 --- /dev/null +++ b/src/main/webapp/component/fields/date-range.spec.js @@ -0,0 +1,215 @@ +import { __read } from "tslib"; +import React from 'react'; +import Enzyme, { mount } from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +Enzyme.configure({ adapter: new Adapter() }); +import { expect } from 'chai'; +import { DateRangeField, defaultValue } from './date-range'; +import moment from 'moment'; +import user from '../singletons/user-instance'; +import { DateHelpers, ISO_8601_FORMAT_ZONED } from './date-helpers'; +import Common from '../../js/Common'; +var UncontrolledDateRangeField = function (_a) { + var startingValue = _a.startingValue; + var _b = __read(React.useState(startingValue), 2), value = _b[0], setValue = _b[1]; + return (React.createElement(DateRangeField, { value: value, onChange: function (update) { + setValue(update); + } })); +}; +// rely on static data when possible, but in these we can use the DateHelpers (a must for shifted date timezone testing) +var data = { + date1: { + timezone: 'America/St_Johns', + originalISO: '2021-01-15T06:53:54.316Z', + originalDate: new Date('2021-01-15T06:53:54.316Z'), + utcISOMinutes: '2021-01-15T06:53:00.000Z', + userFormatISO: { + millisecond: '2021-01-15T03:23:54.316-03:30', + second: '2021-01-15T03:23:54-03:30', + minute: '2021-01-15T03:23-03:30', + }, + userFormat24: { + millisecond: '15 Jan 2021 03:23:54.316 -03:30', + second: '15 Jan 2021 03:23:54 -03:30', + minute: '15 Jan 2021 03:23 -03:30', + }, + userFormat12: { + millisecond: '15 Jan 2021 03:23:54.316 am -03:30', + second: '15 Jan 2021 03:23:54 am -03:30', + minute: '15 Jan 2021 03:23 am -03:30', + }, + }, + date2: { + timezone: 'America/St_Johns', + userSuppliedInput: '15 Jan 2021 03:24:54.316 -02:30', + parsedOutput: '15 Jan 2021 02:24:54.316 -03:30', + }, + date3: { + timezone: 'Etc/UTC', + maxFuture: moment().add(10, 'years').toISOString(), + disallowedFuture: moment().add(11, 'years').toISOString(), + }, + date4: { + timezone: 'America/St_Johns', + originalISO: '2021-01-14T06:53:54.316Z', + originalDate: new Date('2021-01-14T06:53:54.316Z'), + utcISOMinutes: '2021-01-14T06:53:00.000Z', + userFormatISO: { + millisecond: '2021-01-14T03:23:54.316-03:30', + second: '2021-01-14T03:23:54-03:30', + minute: '2021-01-14T03:23-03:30', + }, + userFormat24: { + millisecond: '14 Jan 2021 03:23:54.316 -03:30', + second: '14 Jan 2021 03:23:54 -03:30', + minute: '14 Jan 2021 03:23 -03:30', + }, + userFormat12: { + millisecond: '14 Jan 2021 03:23:54.316 am -03:30', + second: '14 Jan 2021 03:23:54 am -03:30', + minute: '14 Jan 2021 03:23 am -03:30', + }, + }, + // this is useful for testing daylist savings (date 1 is pre, this is post) + date5: { + timezone: 'America/St_Johns', + originalISO: '2021-04-15T05:53:54.316Z', // use the converter to find the appropriate shifted date + }, +}; +var wrapper; +describe('verify date range field works', function () { + before(function () { + user.get('user').get('preferences').set('timeZone', data.date1.timezone); + }); + after(function () { + user.get('user').get('preferences').set('timeZone', 'Etc/UTC'); + }); + beforeEach(function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']); + }); + afterEach(function () { + // Must unmount to stop listening to the user prefs model (the useTimePrefs() hook) + // Has to be unmounted before we set any preferences so we don't trigger any onChange + // callbacks again. + wrapper.unmount(); + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']); + }); + it("should not allow overlapping dates", function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']); + wrapper = mount(React.createElement(DateRangeField, { value: { + start: data.date1.originalISO, + end: data.date4.originalISO, + }, onChange: function (validValue) { + // verify these are one day apart, as should happen when fed overlapping dates or invalid values + var start = new Date(validValue.start); + var end = new Date(validValue.end); + expect(start.getDate()).to.equal(end.getDate() - 1); + } })); + }); + var verifyDateRender = function (format, precision, expectedStart, expectedEnd) { + return function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()[format][precision]); + wrapper = mount(React.createElement(DateRangeField, { value: { + start: data.date4.originalISO, + end: data.date1.originalISO, + }, onChange: function () { } })); + expect(wrapper.render().find('input').first().val()).to.equal(expectedStart); + expect(wrapper.render().find('input').last().val()).to.equal(expectedEnd); + }; + }; + it('should render with ISO format and millisecond precision', verifyDateRender('ISO', 'millisecond', data.date4.userFormatISO.millisecond, data.date1.userFormatISO.millisecond)); + it('should render with ISO format and second precision', verifyDateRender('ISO', 'second', data.date4.userFormatISO.second, data.date1.userFormatISO.second)); + it('should render with ISO format and minute precision', verifyDateRender('ISO', 'minute', data.date4.userFormatISO.minute, data.date1.userFormatISO.minute)); + it('should render with 24hr format and millisecond precision', verifyDateRender('24', 'millisecond', data.date4.userFormat24.millisecond, data.date1.userFormat24.millisecond)); + it('should render with 24hr format and second precision', verifyDateRender('24', 'second', data.date4.userFormat24.second, data.date1.userFormat24.second)); + it('should render with 24hr format and minute precision', verifyDateRender('24', 'minute', data.date4.userFormat24.minute, data.date1.userFormat24.minute)); + it('should render with 12hr format and millisecond precision', verifyDateRender('12', 'millisecond', data.date4.userFormat12.millisecond, data.date1.userFormat12.millisecond)); + it('should render with 12hr format and second precision', verifyDateRender('12', 'second', data.date4.userFormat12.second, data.date1.userFormat12.second)); + it('should render with 12hr format and minute precision', verifyDateRender('12', 'minute', data.date4.userFormat12.minute, data.date1.userFormat12.minute)); + it("should parse with user's pref timezone", function () { + // gist is user enters a time in a diff time from their pref, on blur we adjust it to their preference + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['24']['millisecond']); + wrapper = mount(React.createElement(UncontrolledDateRangeField, { startingValue: { + start: data.date2.userSuppliedInput, + end: data.date2.userSuppliedInput, + } })); + var input = wrapper.find('input'); + input.first().simulate('change', { + target: { value: data.date2.userSuppliedInput }, + }); + input.last().simulate('change', { + target: { value: data.date2.userSuppliedInput }, + }); + expect(input.first().render().val()).to.equal(data.date2.parsedOutput); + expect(input.last().render().val()).to.equal(data.date2.parsedOutput); + }); + it("should generate appropriately shifted ISO strings on change (DST)", function () { + wrapper = mount(React.createElement(DateRangeField, { value: defaultValue(), onChange: function (updatedValue) { + expect(updatedValue.start).to.equal(data.date5.originalISO); + expect(updatedValue.end).to.equal(data.date5.originalISO); + } })); + var dateFieldInstance = wrapper.children().children().get(0); + dateFieldInstance.props.onChange([ + DateHelpers.Blueprint.converters.TimeshiftForDatePicker(data.date5.originalISO, ISO_8601_FORMAT_ZONED), + DateHelpers.Blueprint.converters.TimeshiftForDatePicker(data.date5.originalISO, ISO_8601_FORMAT_ZONED), + ], true); + }); + it("should generate appropriately shifted ISO strings on change", function () { + wrapper = mount(React.createElement(DateRangeField, { value: defaultValue(), onChange: function (updatedValue) { + expect(updatedValue.start).to.equal(data.date4.originalISO); + expect(updatedValue.end).to.equal(data.date5.originalISO); + } })); + var dateFieldInstance = wrapper.children().children().get(0); + dateFieldInstance.props.onChange([ + DateHelpers.Blueprint.converters.TimeshiftForDatePicker(data.date4.originalISO, ISO_8601_FORMAT_ZONED), + DateHelpers.Blueprint.converters.TimeshiftForDatePicker(data.date5.originalISO, ISO_8601_FORMAT_ZONED), + ], true); + }); + it("should not allow dates beyond max future", function () { + wrapper = mount(React.createElement(DateRangeField, { value: defaultValue(), onChange: function (updatedValue) { + expect(updatedValue.start).to.not.equal(data.date3.maxFuture); + } })); + var input = wrapper.find('input').first(); + input.simulate('change', { + target: { value: data.date3.disallowedFuture }, + }); + }); + it("should allow dates up to max future", function () { + wrapper = mount(React.createElement(DateRangeField, { value: defaultValue(), onChange: function (updatedValue) { + expect(updatedValue.start).to.equal(data.date3.maxFuture); + } })); + var input = wrapper.find('input').first(); + input.simulate('change', { + target: { value: data.date3.maxFuture }, + }); + }); + it('calls onChange with updated value when precision changes', function () { + wrapper = mount(React.createElement(DateRangeField, { value: { + start: data.date4.originalISO, + end: data.date1.originalISO, + }, onChange: function (updatedValue) { + expect(updatedValue.start).to.equal(data.date4.utcISOMinutes); + expect(updatedValue.end).to.equal(data.date1.utcISOMinutes); + } })); + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1yYW5nZS5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9maWVsZHMvZGF0ZS1yYW5nZS5zcGVjLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sTUFBTSxFQUFFLEVBQUUsS0FBSyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3RDLE9BQU8sT0FBTyxNQUFNLG9DQUFvQyxDQUFBO0FBQ3hELE1BQU0sQ0FBQyxTQUFTLENBQUMsRUFBRSxPQUFPLEVBQUUsSUFBSSxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUE7QUFDNUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUU3QixPQUFPLEVBQUUsY0FBYyxFQUFFLFlBQVksRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUMzRCxPQUFPLE1BQU0sTUFBTSxRQUFRLENBQUE7QUFFM0IsT0FBTyxJQUFJLE1BQU0sNkJBQTZCLENBQUE7QUFFOUMsT0FBTyxFQUFFLFdBQVcsRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBQ25FLE9BQU8sTUFBTSxNQUFNLGlCQUFpQixDQUFBO0FBR3BDLElBQU0sMEJBQTBCLEdBQUcsVUFBQyxFQUluQztRQUhDLGFBQWEsbUJBQUE7SUFJUCxJQUFBLEtBQUEsT0FBb0IsS0FBSyxDQUFDLFFBQVEsQ0FBQyxhQUFhLENB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--git a/src/main/webapp/component/fields/date-relative.d.ts b/src/main/webapp/component/fields/date-relative.d.ts new file mode 100644 index 00000000000..ec9726d0e58 --- /dev/null +++ b/src/main/webapp/component/fields/date-relative.d.ts @@ -0,0 +1,8 @@ +/// +import { ValueTypes } from '../filter-builder/filter.structure'; +type Props = { + value: ValueTypes['relative']; + onChange: (val: ValueTypes['relative']) => void; +}; +export declare const DateRelativeField: ({ value, onChange }: Props) => JSX.Element | null; +export {}; diff --git a/src/main/webapp/component/fields/date-relative.js b/src/main/webapp/component/fields/date-relative.js new file mode 100644 index 00000000000..708c668140d --- /dev/null +++ b/src/main/webapp/component/fields/date-relative.js @@ -0,0 +1,50 @@ +import { __assign } from "tslib"; +import * as React from 'react'; +import Grid from '@mui/material/Grid'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import { NumberField } from './number'; +var defaultValue = { + last: '1', + unit: 'm', +}; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (isInvalid({ value: value, onChange: onChange })) { + onChange(defaultValue); + } +}; +var isInvalid = function (_a) { + var value = _a.value; + return value.last === undefined || value.unit === undefined; +}; +export var DateRelativeField = function (_a) { + var value = _a.value, onChange = _a.onChange; + var validValue = __assign(__assign({}, defaultValue), value); + React.useEffect(function () { + validateShape({ value: value, onChange: onChange }); + }, []); + if (isInvalid({ value: value, onChange: onChange })) { + // for most cases it doesn't matter if we render with invalid, but the select will immediately cause onChange which has some weird side effects + return null; + } + return (React.createElement(Grid, { container: true, direction: "row", className: "w-full" }, + React.createElement(Grid, { item: true, xs: 4 }, + React.createElement(NumberField, { type: "float", onChange: function (val) { + if (onChange) + onChange(__assign(__assign({}, validValue), { last: val.toString() })); + }, validation: function (val) { return val > 0; }, validationText: "Must be greater than 0, using previous value of ", value: validValue.last })), + React.createElement(Grid, { item: true, xs: 8, className: "pl-2" }, + React.createElement(TextField, { fullWidth: true, variant: "outlined", select: true, onChange: function (e) { + if (onChange) + onChange(__assign(__assign({}, validValue), { unit: e.target.value })); + }, size: "small", value: validValue.unit }, + React.createElement(MenuItem, { value: "s" }, "Seconds"), + React.createElement(MenuItem, { value: "m" }, "Minutes"), + React.createElement(MenuItem, { value: "h" }, "Hours"), + React.createElement(MenuItem, { value: "d" }, "Days"), + React.createElement(MenuItem, { value: "w" }, "Weeks"), + React.createElement(MenuItem, { value: "M" }, "Months"), + React.createElement(MenuItem, { value: "y" }, "Years"))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1yZWxhdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL2RhdGUtcmVsYXRpdmUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLElBQUksTUFBTSxvQkFBb0IsQ0FBQTtBQUNyQyxPQUFPLFNBQVMsTUFBTSx5QkFBeUIsQ0FBQTtBQUMvQyxPQUFPLFFBQVEsTUFBTSx3QkFBd0IsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBUXRDLElBQU0sWUFBWSxHQUFHO0lBQ25CLElBQUksRUFBRSxHQUFHO0lBQ1QsSUFBSSxFQUFFLEdBQUc7Q0FDZ0IsQ0FBQTtBQUUzQixJQUFNLGFBQWEsR0FBRyxVQUFDLEVBQTBCO1FBQXhCLEtBQUssV0FBQSxFQUFFLFFBQVEsY0FBQTtJQUN0QyxJQUFJLFNBQVMsQ0FBQyxFQUFFLEtBQUssT0FBQSxFQUFFLFFBQVEsVUFBQSxFQUFFLENBQUMsRUFBRTtRQUNsQyxRQUFRLENBQUMsWUFBWSxDQUFDLENBQUE7S0FDdkI7QUFDSCxDQUFDLENBQ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iAgICA8L0dyaWQ+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/fields/date-time-picker.d.ts b/src/main/webapp/component/fields/date-time-picker.d.ts new file mode 100644 index 00000000000..86c9aee09d6 --- /dev/null +++ b/src/main/webapp/component/fields/date-time-picker.d.ts @@ -0,0 +1,20 @@ +/// +import { IDateInputProps } from '@blueprintjs/datetime'; +import { TextFieldProps } from '@mui/material/TextField'; +type DateFieldProps = { + value: string | null; + onChange: (value: string | null) => void; + isNullable?: boolean; + TextFieldProps?: Partial; + /** + * Override if you absolutely must. + * Take extra caution when overriding minDate and maxDate. + * Overriding minDate and maxDate will work as a visual overlay which can only be used + * to restrict which dates a user can input- but can't be used to give the users a lower/higher + * min or max. The true min/max is set in dateHelpers. We should probably update this at some + * point to be passed down by this component. + */ + BPDateProps?: Partial; +}; +declare const _default: ({ value, onChange, isNullable, TextFieldProps, BPDateProps, }: DateFieldProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/fields/date-time-picker.js b/src/main/webapp/component/fields/date-time-picker.js new file mode 100644 index 00000000000..e2af5c49926 --- /dev/null +++ b/src/main/webapp/component/fields/date-time-picker.js @@ -0,0 +1,50 @@ +import { __assign } from "tslib"; +import * as React from 'react'; +import TextField from '@mui/material/TextField'; +import { DateField } from './date'; +import CalendarIcon from '@mui/icons-material/Event'; +import ClearIcon from '@mui/icons-material/Clear'; +import { hot } from 'react-hot-loader'; +import InputAdornment from '@mui/material/InputAdornment'; +/** + * DateTimePicker that combines Mui TextField with BlueprintJs DatePicker + * + * For now it's meant to work with an outlined text field, but we can add support for other styles if we want. + * + * By changing the inputComponent, we avoid weird focusing issues, while still allowing use of all the other niceties (helperText) of TextField + */ +var DateTimePicker = function (_a) { + var value = _a.value, onChange = _a.onChange, isNullable = _a.isNullable, TextFieldProps = _a.TextFieldProps, BPDateProps = _a.BPDateProps; + var inputRef = React.useRef(null); + /** + * We want to avoid causing the TextField below to percieve a change to inputComponent when possible, because that mucks with focus. + * + * We stringify the BPDateProps to make life easier for devs, since they will likely pass a plain object. If they do and their component rerenders, + * this memo would trigger even though they think they didn't change BPDateProps (the object is different though!). So we stringify to make sure we + * only pick up real changes. + */ + var inputComponent = React.useMemo(function () { + var classes = 'px-[14px] py-[8.5px]'; + return React.forwardRef(function (props, ref) { + return (React.createElement(DateField, __assign({}, props, { isNullable: true, BPDateProps: __assign(__assign({}, BPDateProps), { className: classes, inputProps: { + inputRef: ref, + } }) }))); + }); + }, [JSON.stringify(BPDateProps)]); + return (React.createElement(TextField, __assign({ fullWidth: true, variant: TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.variant, label: "Date", InputLabelProps: { shrink: true }, value: value, onChange: onChange, ref: inputRef, InputProps: { + inputComponent: inputComponent, + endAdornment: (React.createElement(InputAdornment, { component: "button", type: "button", className: "cursor-pointer", position: "end", onClick: function () { + var _a; + if (inputRef.current) { + (_a = inputRef.current.querySelector('input')) === null || _a === void 0 ? void 0 : _a.focus(); + } + } }, + isNullable && (React.createElement(ClearIcon, { className: "".concat(value ? '' : 'hidden'), onClick: function (e) { + onChange(null); + e.stopPropagation(); + } })), + React.createElement(CalendarIcon, null))), + } }, TextFieldProps))); +}; +export default hot(module)(DateTimePicker); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS10aW1lLXBpY2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL2RhdGUtdGltZS1waWNrZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUU5QixPQUFPLFNBQTZCLE1BQU0seUJBQXlCLENBQUE7QUFDbkUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLFFBQVEsQ0FBQTt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HV0UHJvcHM6IHtcbiAgICAgICAgICAgICAgaW5wdXRSZWY6IHJlZixcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfX1cbiAgICAgICAgLz5cbiAgICAgIClcbiAgICB9KVxuICB9LCBbSlNPTi5zdHJpbmdpZnkoQlBEYXRlUHJvcHMpXSlcblxuICByZXR1cm4gKFxuICAgIDxUZXh0RmllbGRcbiAgICAgIGZ1bGxXaWR0aFxuICAgICAgdmFyaWFudD17VGV4dEZpZWxkUHJvcHM/LnZhcmlhbnR9XG4gICAgICBsYWJlbD1cIkRhdGVcIlxuICAgICAgSW5wdXRMYWJlbFByb3BzPXt7IHNocmluazogdHJ1ZSB9fVxuICAgICAgdmFsdWU9e3ZhbHVlfVxuICAgICAgb25DaGFuZ2U9e29uQ2hhbmdlIGFzIGFueX1cbiAgICAgIHJlZj17aW5wdXRSZWZ9XG4gICAgICBJbnB1dFByb3BzPXt7XG4gICAgICAgIGlucHV0Q29tcG9uZW50OiBpbnB1dENvbXBvbmVudCxcbiAgICAgICAgZW5kQWRvcm5tZW50OiAoXG4gICAgICAgICAgPElucHV0QWRvcm5tZW50XG4gICAgICAgICAgICBjb21wb25lbnQ9XCJidXR0b25cIlxuICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICAgICAgICBjbGFzc05hbWU9XCJjdXJzb3ItcG9pbnRlclwiXG4gICAgICAgICAgICBwb3NpdGlvbj1cImVuZFwiXG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgIGlmIChpbnB1dFJlZi5jdXJyZW50KSB7XG4gICAgICAgICAgICAgICAgaW5wdXRSZWYuY3VycmVudC5xdWVyeVNlbGVjdG9yKCdpbnB1dCcpPy5mb2N1cygpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAge2lzTnVsbGFibGUgJiYgKFxuICAgICAgICAgICAgICA8Q2xlYXJJY29uXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgJHt2YWx1ZSA/ICcnIDogJ2hpZGRlbid9YH1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgb25DaGFuZ2UobnVsbClcbiAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKClcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDxDYWxlbmRhckljb24gLz5cbiAgICAgICAgICA8L0lucHV0QWRvcm5tZW50PlxuICAgICAgICApLFxuICAgICAgfX1cbiAgICAgIHsuLi5UZXh0RmllbGRQcm9wc31cbiAgICAvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKERhdGVUaW1lUGlja2VyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/fields/date.d.ts b/src/main/webapp/component/fields/date.d.ts new file mode 100644 index 00000000000..d7db63322c3 --- /dev/null +++ b/src/main/webapp/component/fields/date.d.ts @@ -0,0 +1,13 @@ +/// +import { IDateInputProps } from '@blueprintjs/datetime'; +type DateFieldProps = { + value: string; + onChange: (value: string) => void; + /** + * Override if you absolutely must + */ + BPDateProps?: Partial; + isNullable?: boolean; +}; +export declare const DateField: ({ value, onChange, BPDateProps, isNullable, }: DateFieldProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/date.js b/src/main/webapp/component/fields/date.js new file mode 100644 index 00000000000..6e36caaa38a --- /dev/null +++ b/src/main/webapp/component/fields/date.js @@ -0,0 +1,66 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { useRef } from 'react'; +import { DateInput } from '@blueprintjs/datetime'; +import { DateHelpers, DefaultMaxDate, DefaultMinDate, ISO_8601_FORMAT_ZONED, } from './date-helpers'; +import { MuiOutlinedInputBorderClasses } from '../theme/theme'; +import useTimePrefs from './useTimePrefs'; +import user from '../singletons/user-instance'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +import moment from 'moment-timezone'; +var validateDate = function (_a) { + var value = _a.value, onChange = _a.onChange, isNullable = _a.isNullable; + if (value === null && isNullable) + return; + var date = moment(value, ISO_8601_FORMAT_ZONED); + if (!date.isValid()) { + var newDate = DateHelpers.General.withPrecision(new Date()); + onChange(newDate.toISOString()); + } +}; +export var DateField = function (_a) { + var value = _a.value, onChange = _a.onChange, BPDateProps = _a.BPDateProps, isNullable = _a.isNullable; + var blueprintDateRef = useRef(null); + useTimePrefs(function () { + var shiftedDate = DateHelpers.Blueprint.DateProps.generateValue(value); + var unshiftedDate = DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(shiftedDate); + onChange(unshiftedDate.toISOString()); + }); + React.useEffect(function () { + validateDate({ onChange: onChange, value: value, isNullable: isNullable }); + }, []); + return (React.createElement(React.Fragment, null, + React.createElement(DateInput, __assign({ ref: blueprintDateRef, className: MuiOutlinedInputBorderClasses, minDate: DefaultMinDate, maxDate: DefaultMaxDate, closeOnSelection: false, fill: true, formatDate: DateHelpers.Blueprint.commonProps.formatDate, onChange: DateHelpers.Blueprint.DateProps.generateOnChange(function (value) { + onChange(value); + }), parseDate: DateHelpers.Blueprint.commonProps.parseDate, placeholder: DateHelpers.General.getDateFormat(), shortcuts: true, timePrecision: DateHelpers.General.getTimePrecision(), outOfRangeMessage: "Out of range", timePickerProps: { + useAmPm: user.getAmPmDisplay(), + }, inputProps: __assign({}, EnterKeySubmitProps), popoverProps: { + boundary: 'viewport', + position: 'bottom', + onClose: function () { + setTimeout(function () { + var _a; + (_a = blueprintDateRef.current) === null || _a === void 0 ? void 0 : _a.setState({ isOpen: false }); + }, 0); + }, + } }, (value + ? { + value: DateHelpers.Blueprint.DateProps.generateValue(value), + } + : {}), BPDateProps)))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL2RhdGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsU0FBUyxFQUFtQixNQUFNLHVCQUF1QixDQUFBO0FBRWxFLE9BQU8sRUFDTCxXQUFXLEVBQ1gsY0FBYyxFQUNkLGNBQWMsRUFDZCxxQkFBcUIsR0FDdEIsTUFBTSxnQkFBZ0IsQ0FBQTtBQUN2QixPQUFPLEVBQUUsNkJBQTZCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUM5RCxPQUFPLFlBQVksTUFBTSxnQkFBZ0IsQ0FBQTtBQUV6QyxPQUFPLElBQUksTUFBTSw2QkFBNkIsQ0FBQTtBQUM5QyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQTtBQUV2RSxPQUFPLE1BQU0sTUFBTSxpQkFBaUIsQ0FBQTtBQVlwQyxJQUFNLFlBQVksR0FBRyxVQUFDLEVBQStDO1FBQTdDLEtBQUssV0FBQSxFQUFFLFFBQVEsY0FBQSxFQUFFLFVBQVUsZ0JBQUE7SUFDakQsSUFBSSxLQUFLLEtBQUssSU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gpLFxuICAgICAgICB9fVxuICAgICAgICBpbnB1dFByb3BzPXt7XG4gICAgICAgICAgLi4uRW50ZXJLZXlTdWJtaXRQcm9wcyxcbiAgICAgICAgfX1cbiAgICAgICAgcG9wb3ZlclByb3BzPXt7XG4gICAgICAgICAgYm91bmRhcnk6ICd2aWV3cG9ydCcsXG4gICAgICAgICAgcG9zaXRpb246ICdib3R0b20nLFxuICAgICAgICAgIG9uQ2xvc2U6ICgpID0+IHtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICBibHVlcHJpbnREYXRlUmVmLmN1cnJlbnQ/LnNldFN0YXRlKHsgaXNPcGVuOiBmYWxzZSB9KVxuICAgICAgICAgICAgfSwgMClcbiAgICAgICAgICB9LFxuICAgICAgICB9fVxuICAgICAgICB7Li4uKHZhbHVlXG4gICAgICAgICAgPyB7XG4gICAgICAgICAgICAgIHZhbHVlOiBEYXRlSGVscGVycy5CbHVlcHJpbnQuRGF0ZVByb3BzLmdlbmVyYXRlVmFsdWUodmFsdWUpLFxuICAgICAgICAgICAgfVxuICAgICAgICAgIDoge30pfVxuICAgICAgICB7Li4uQlBEYXRlUHJvcHN9XG4gICAgICAvPlxuICAgIDwvPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/fields/date.spec.d.ts b/src/main/webapp/component/fields/date.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/component/fields/date.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/component/fields/date.spec.js b/src/main/webapp/component/fields/date.spec.js new file mode 100644 index 00000000000..4300f511c82 --- /dev/null +++ b/src/main/webapp/component/fields/date.spec.js @@ -0,0 +1,163 @@ +import { __read } from "tslib"; +import React from 'react'; +import Enzyme, { mount } from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +Enzyme.configure({ adapter: new Adapter() }); +import { DateField } from './date'; +import moment from 'moment'; +import { expect } from 'chai'; +import user from '../singletons/user-instance'; +import { DateHelpers, ISO_8601_FORMAT_ZONED } from './date-helpers'; +import Common from '../../js/Common'; +/** + * Useful for seeing if updates are called correctly. + */ +var UncontrolledDateField = function (_a) { + var startingValue = _a.startingValue; + var _b = __read(React.useState(startingValue), 2), value = _b[0], setValue = _b[1]; + return (React.createElement(DateField, { value: value, onChange: function (update) { + setValue(update); + }, BPDateProps: { + inputProps: { + name: 'test', + }, + } })); +}; +// rely on static data when possible, but in these we can use the DateHelpers (a must for shifted date timezone testing) +var data = { + date1: { + timezone: 'America/St_Johns', + originalISO: '2021-01-15T06:53:54.316Z', + originalDate: new Date('2021-01-15T06:53:54.316Z'), + utcISOMinutes: '2021-01-15T06:53:00.000Z', + userFormatISO: { + millisecond: '2021-01-15T03:23:54.316-03:30', + second: '2021-01-15T03:23:54-03:30', + minute: '2021-01-15T03:23-03:30', + }, + userFormat24: { + millisecond: '15 Jan 2021 03:23:54.316 -03:30', + second: '15 Jan 2021 03:23:54 -03:30', + minute: '15 Jan 2021 03:23 -03:30', + }, + userFormat12: { + millisecond: '15 Jan 2021 03:23:54.316 am -03:30', + second: '15 Jan 2021 03:23:54 am -03:30', + minute: '15 Jan 2021 03:23 am -03:30', + }, + }, + date2: { + timezone: 'America/St_Johns', + userSuppliedInput: '15 Jan 2021 03:24:54.316 -02:30', + parsedOutput: '15 Jan 2021 02:24:54.316 -03:30', + }, + date3: { + timezone: 'Etc/UTC', + maxFuture: moment().add(10, 'years').toISOString(), + disallowedFuture: moment().add(11, 'years').toISOString(), + }, + // this is useful for testing daylist savings (date 1 is pre, this is post) + date4: { + timezone: 'America/St_Johns', + originalISO: '2021-04-15T05:53:54.316Z', + }, +}; +var wrapper; +describe('verify date field works', function () { + before(function () { + user.get('user').get('preferences').set('timeZone', data.date1.timezone); + }); + after(function () { + user.get('user').get('preferences').set('timeZone', 'Etc/UTC'); + }); + beforeEach(function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']); + }); + afterEach(function () { + // Must unmount to stop listening to the user prefs model (the useTimePrefs() hook) + // Has to be unmounted before we set any preferences so we don't trigger any onChange + // callbacks again. + wrapper.unmount(); + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']); + }); + var verifyDateRender = function (format, precision, expected) { + return function () { + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()[format][precision]); + wrapper = mount(React.createElement(DateField, { value: data.date1.originalISO, onChange: function () { } })); + expect(wrapper.render().find('input').val()).to.equal(expected); + }; + }; + it('should render with ISO format and millisecond precision', verifyDateRender('ISO', 'millisecond', data.date1.userFormatISO.millisecond)); + it('should render with ISO format and second precision', verifyDateRender('ISO', 'second', data.date1.userFormatISO.second)); + it('should render with ISO format and minute precision', verifyDateRender('ISO', 'minute', data.date1.userFormatISO.minute)); + it('should render with 24hr format and millisecond precision', verifyDateRender('24', 'millisecond', data.date1.userFormat24.millisecond)); + it('should render with 24hr format and second precision', verifyDateRender('24', 'second', data.date1.userFormat24.second)); + it('should render with 24hr format and minute precision', verifyDateRender('24', 'minute', data.date1.userFormat24.minute)); + it('should render with 12hr format and millisecond precision', verifyDateRender('12', 'millisecond', data.date1.userFormat12.millisecond)); + it('should render with 12hr format and second precision', verifyDateRender('12', 'second', data.date1.userFormat12.second)); + it('should render with 12hr format and minute precision', verifyDateRender('12', 'minute', data.date1.userFormat12.minute)); + it("should parse with user's pref timezone", function () { + // gist is user enters a time in a diff time from their pref, on blur we adjust it to their preference + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['24']['millisecond']); + wrapper = mount(React.createElement(UncontrolledDateField, { startingValue: data.date1.originalISO })); + var input = wrapper.find('input').at(0); + input.simulate('change', { + target: { value: data.date2.userSuppliedInput }, + }); + expect(input.render().val()).to.equal(data.date2.parsedOutput); + }); + it("should generate appropriately shifted ISO strings on change (DST)", function () { + wrapper = mount(React.createElement(DateField, { value: new Date().toISOString(), onChange: function (updatedValue) { + expect(updatedValue).to.equal(data.date4.originalISO); + } })); + var dateFieldInstance = wrapper.children().get(0); + dateFieldInstance.props.onChange(DateHelpers.Blueprint.converters.TimeshiftForDatePicker(data.date4.originalISO, ISO_8601_FORMAT_ZONED), true); + }); + it("should generate appropriately shifted ISO strings on change", function () { + wrapper = mount(React.createElement(DateField, { value: new Date().toISOString(), onChange: function (updatedValue) { + expect(updatedValue).to.equal(data.date1.originalISO); + } })); + var dateFieldInstance = wrapper.children().get(0); + dateFieldInstance.props.onChange(DateHelpers.Blueprint.converters.TimeshiftForDatePicker(data.date1.originalISO, ISO_8601_FORMAT_ZONED), true); + }); + it("should not allow dates beyond max future", function () { + wrapper = mount(React.createElement(DateField, { value: new Date().toISOString(), onChange: function (updatedValue) { + expect(updatedValue).to.not.equal(data.date3.maxFuture); + } })); + var input = wrapper.find('input').at(0); + input.simulate('change', { + target: { value: data.date3.disallowedFuture }, + }); + }); + it("should allow dates up to max future", function () { + wrapper = mount(React.createElement(DateField, { value: new Date().toISOString(), onChange: function (updatedValue) { + expect(updatedValue).to.equal(data.date3.maxFuture); + } })); + var input = wrapper.find('input').at(0); + input.simulate('change', { + target: { value: data.date3.maxFuture }, + }); + }); + it('calls onChange with updated value when precision changes', function () { + wrapper = mount(React.createElement(DateField, { value: data.date1.userFormatISO.millisecond, onChange: function (updatedValue) { + expect(updatedValue).to.equal(data.date1.utcISOMinutes); + } })); + user + .get('user') + .get('preferences') + .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9maWVsZHMvZGF0ZS5zcGVjLnRzeCJdLCJuYW1lcyI6W10sIm1hcH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U6IGRhdGEuZGF0ZTMubWF4RnV0dXJlIH0sXG4gICAgfSlcbiAgfSlcbiAgaXQoJ2NhbGxzIG9uQ2hhbmdlIHdpdGggdXBkYXRlZCB2YWx1ZSB3aGVuIHByZWNpc2lvbiBjaGFuZ2VzJywgKCkgPT4ge1xuICAgIHdyYXBwZXIgPSBtb3VudChcbiAgICAgIDxEYXRlRmllbGRcbiAgICAgICAgdmFsdWU9e2RhdGEuZGF0ZTEudXNlckZvcm1hdElTTy5taWxsaXNlY29uZH1cbiAgICAgICAgb25DaGFuZ2U9eyh1cGRhdGVkVmFsdWUpID0+IHtcbiAgICAgICAgICBleHBlY3QodXBkYXRlZFZhbHVlKS50by5lcXVhbChkYXRhLmRhdGUxLnV0Y0lTT01pbnV0ZXMpXG4gICAgICAgIH19XG4gICAgICAvPlxuICAgIClcbiAgICB1c2VyXG4gICAgICAuZ2V0KCd1c2VyJylcbiAgICAgIC5nZXQoJ3ByZWZlcmVuY2VzJylcbiAgICAgIC5zZXQoJ2RhdGVUaW1lRm9ybWF0JywgQ29tbW9uLmdldERhdGVUaW1lRm9ybWF0cygpWydJU08nXVsnbWludXRlJ10pXG4gIH0pXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/fields/float.d.ts b/src/main/webapp/component/fields/float.d.ts new file mode 100644 index 00000000000..f2b118fbb37 --- /dev/null +++ b/src/main/webapp/component/fields/float.d.ts @@ -0,0 +1,8 @@ +/// +import { ValueTypes } from '../filter-builder/filter.structure'; +type FloatFieldProps = { + value: ValueTypes['float']; + onChange: (val: ValueTypes['float']) => void; +}; +export declare const FloatField: ({ value, onChange }: FloatFieldProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/float.js b/src/main/webapp/component/fields/float.js new file mode 100644 index 00000000000..0be3e82eb75 --- /dev/null +++ b/src/main/webapp/component/fields/float.js @@ -0,0 +1,35 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +import { NumberField } from './number'; +var defaultValue = 0; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (typeof value !== 'number') { + onChange(defaultValue); + } +}; +export var FloatField = function (_a) { + var value = _a.value, onChange = _a.onChange; + React.useEffect(function () { + validateShape({ value: value, onChange: onChange }); + }, []); + return (React.createElement(NumberField, __assign({ value: value.toString(), type: "float", onChange: function (e) { + onChange(e); + } }, EnterKeySubmitProps))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxvYXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2ZpZWxkcy9mbG9hdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUc5QixPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQTtBQUN2RSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBT3RDLElBQU0sWUFBWSxHQUFHLENBQUMsQ0FBQTtBQUV0QixJQUFNLGFBQWEsR0FBRyxVQUFDLEVBQW9DO1FBQWxDLEtBQUssV0FBQSxFQUFFLFFBQVEsY0FBQTtJQUN0QyxJQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBR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ZiB2YWx1ZSAhPT0gJ251bWJlcicpIHtcbiAgICBvbkNoYW5nZShkZWZhdWx0VmFsdWUpXG4gIH1cbn1cblxuZXhwb3J0IGNvbnN0IEZsb2F0RmllbGQgPSAoeyB2YWx1ZSwgb25DaGFuZ2UgfTogRmxvYXRGaWVsZFByb3BzKSA9PiB7XG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgdmFsaWRhdGVTaGFwZSh7IHZhbHVlLCBvbkNoYW5nZSB9KVxuICB9LCBbXSlcbiAgcmV0dXJuIChcbiAgICA8TnVtYmVyRmllbGRcbiAgICAgIHZhbHVlPXt2YWx1ZS50b1N0cmluZygpfVxuICAgICAgdHlwZT1cImZsb2F0XCJcbiAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICBvbkNoYW5nZShlKVxuICAgICAgfX1cbiAgICAgIHsuLi5FbnRlcktleVN1Ym1pdFByb3BzfVxuICAgIC8+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/fields/integer.d.ts b/src/main/webapp/component/fields/integer.d.ts new file mode 100644 index 00000000000..757280f86bf --- /dev/null +++ b/src/main/webapp/component/fields/integer.d.ts @@ -0,0 +1,8 @@ +/// +import { ValueTypes } from '../filter-builder/filter.structure'; +type IntegerFieldProps = { + value: ValueTypes['integer']; + onChange: (val: ValueTypes['integer']) => void; +}; +export declare const IntegerField: ({ value, onChange }: IntegerFieldProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/integer.js b/src/main/webapp/component/fields/integer.js new file mode 100644 index 00000000000..73808af05c7 --- /dev/null +++ b/src/main/webapp/component/fields/integer.js @@ -0,0 +1,35 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +import { NumberField } from './number'; +var defaultValue = 0; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (typeof value !== 'number') { + onChange(defaultValue); + } +}; +export var IntegerField = function (_a) { + var value = _a.value, onChange = _a.onChange; + React.useEffect(function () { + validateShape({ value: value, onChange: onChange }); + }, []); + return (React.createElement(NumberField, __assign({ type: "integer", value: value.toString(), onChange: function (e) { + onChange(e); + } }, EnterKeySubmitProps))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL2ludGVnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFHOUIsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sbUNBQW1DLENBQUE7QUFDdkUsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQU90QyxJQUFNLFlBQVksR0FBRyxDQUFDLENBQUE7QUFFdEIsSUFBTSxhQUFhLEdBQUcsVUFBQyxFQUFzQztRQUFwQyxLQUFLLFdBQUEsRUFBRSxRQUFRLGNBQUE7SUFDdEMsSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUU7UUFDN0IsUUFBUSxDQUFDLFlBQVksQ0FBQyxDQUFBO0tBQ3ZCO0FBQ0gsQ0FBQyxDQUFBO0FBRUQsTUFBTSxDQU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cbn1cblxuZXhwb3J0IGNvbnN0IEludGVnZXJGaWVsZCA9ICh7IHZhbHVlLCBvbkNoYW5nZSB9OiBJbnRlZ2VyRmllbGRQcm9wcykgPT4ge1xuICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xuICAgIHZhbGlkYXRlU2hhcGUoeyB2YWx1ZSwgb25DaGFuZ2UgfSlcbiAgfSwgW10pXG4gIHJldHVybiAoXG4gICAgPE51bWJlckZpZWxkXG4gICAgICB0eXBlPVwiaW50ZWdlclwiXG4gICAgICB2YWx1ZT17dmFsdWUudG9TdHJpbmcoKX1cbiAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICBvbkNoYW5nZShlKVxuICAgICAgfX1cbiAgICAgIHsuLi5FbnRlcktleVN1Ym1pdFByb3BzfVxuICAgIC8+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/fields/near.d.ts b/src/main/webapp/component/fields/near.d.ts new file mode 100644 index 00000000000..48cb18b5bca --- /dev/null +++ b/src/main/webapp/component/fields/near.d.ts @@ -0,0 +1,8 @@ +/// +import { ValueTypes } from '../filter-builder/filter.structure'; +type NearFieldProps = { + value: Partial; + onChange: (val: ValueTypes['proximity']) => void; +}; +export declare const NearField: ({ value, onChange }: NearFieldProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/near.js b/src/main/webapp/component/fields/near.js new file mode 100644 index 00000000000..e628175d85c --- /dev/null +++ b/src/main/webapp/component/fields/near.js @@ -0,0 +1,65 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import Grid from '@mui/material/Grid'; +import { CustomInputOrDefault } from '../../react-component/filter/filter-input/customInputOrDefault'; +import { NumberField } from './number'; +var defaultValue = { + first: '', + second: '', + distance: 2, +}; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (value.distance === undefined || + value.first === undefined || + value.second === undefined) { + onChange(defaultValue); + } +}; +export var NearField = function (_a) { + var value = _a.value, onChange = _a.onChange; + var validValue = __assign(__assign({}, defaultValue), value); + React.useEffect(function () { + validateShape({ value: value, onChange: onChange }); + }, []); + return (React.createElement(Grid, { container: true, className: "w-full", direction: "column", alignItems: "flex-start", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full pb-2" }, + React.createElement(CustomInputOrDefault, { value: validValue.second, onChange: function (val) { + onChange(__assign(__assign({}, validValue), { second: val })); + }, props: { + fullWidth: true, + variant: 'outlined', + type: 'text', + size: 'small', + } })), + React.createElement(Grid, { item: true, className: "w-full pb-2 pl-2" }, "within"), + React.createElement(Grid, { item: true, className: "w-full pb-2" }, + React.createElement(NumberField, { type: "integer", value: validValue.distance.toString(), onChange: function (val) { + onChange(__assign(__assign({}, validValue), { distance: val })); + }, validation: function (val) { return val > 0; }, validationText: "Must be greater than 0, using previous value of " })), + React.createElement(Grid, { item: true, className: "w-full pb-2 pl-2" }, "of"), + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(CustomInputOrDefault, { value: validValue.first, onChange: function (val) { + onChange(__assign(__assign({}, validValue), { first: val })); + }, props: { + fullWidth: true, + variant: 'outlined', + type: 'text', + size: 'small', + } })))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmVhci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL25lYXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3M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ICAgICB9fVxuICAgICAgICAgIHByb3BzPXt7XG4gICAgICAgICAgICBmdWxsV2lkdGg6IHRydWUsXG4gICAgICAgICAgICB2YXJpYW50OiAnb3V0bGluZWQnLFxuICAgICAgICAgICAgdHlwZTogJ3RleHQnLFxuICAgICAgICAgICAgc2l6ZTogJ3NtYWxsJyxcbiAgICAgICAgICB9fVxuICAgICAgICAvPlxuICAgICAgPC9HcmlkPlxuICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgcGItMiBwbC0yXCI+XG4gICAgICAgIHdpdGhpblxuICAgICAgPC9HcmlkPlxuICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgcGItMlwiPlxuICAgICAgICA8TnVtYmVyRmllbGRcbiAgICAgICAgICB0eXBlPVwiaW50ZWdlclwiXG4gICAgICAgICAgdmFsdWU9e3ZhbGlkVmFsdWUuZGlzdGFuY2UudG9TdHJpbmcoKX1cbiAgICAgICAgICBvbkNoYW5nZT17KHZhbCkgPT4ge1xuICAgICAgICAgICAgb25DaGFuZ2Uoe1xuICAgICAgICAgICAgICAuLi52YWxpZFZhbHVlLFxuICAgICAgICAgICAgICBkaXN0YW5jZTogdmFsLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9fVxuICAgICAgICAgIHZhbGlkYXRpb249eyh2YWwpID0+IHZhbCA+IDB9XG4gICAgICAgICAgdmFsaWRhdGlvblRleHQ9XCJNdXN0IGJlIGdyZWF0ZXIgdGhhbiAwLCB1c2luZyBwcmV2aW91cyB2YWx1ZSBvZiBcIlxuICAgICAgICAvPlxuICAgICAgPC9HcmlkPlxuICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgcGItMiBwbC0yXCI+XG4gICAgICAgIG9mXG4gICAgICA8L0dyaWQ+XG4gICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbFwiPlxuICAgICAgICA8Q3VzdG9tSW5wdXRPckRlZmF1bHRcbiAgICAgICAgICB2YWx1ZT17dmFsaWRWYWx1ZS5maXJzdH1cbiAgICAgICAgICBvbkNoYW5nZT17KHZhbDogYW55KSA9PiB7XG4gICAgICAgICAgICBvbkNoYW5nZSh7XG4gICAgICAgICAgICAgIC4uLnZhbGlkVmFsdWUsXG4gICAgICAgICAgICAgIGZpcnN0OiB2YWwsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH19XG4gICAgICAgICAgcHJvcHM9e3tcbiAgICAgICAgICAgIGZ1bGxXaWR0aDogdHJ1ZSxcbiAgICAgICAgICAgIHZhcmlhbnQ6ICdvdXRsaW5lZCcsXG4gICAgICAgICAgICB0eXBlOiAndGV4dCcsXG4gICAgICAgICAgICBzaXplOiAnc21hbGwnLFxuICAgICAgICAgIH19XG4gICAgICAgIC8+XG4gICAgICA8L0dyaWQ+XG4gICAgPC9HcmlkPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/fields/number-range.d.ts b/src/main/webapp/component/fields/number-range.d.ts new file mode 100644 index 00000000000..a2954934bbc --- /dev/null +++ b/src/main/webapp/component/fields/number-range.d.ts @@ -0,0 +1,9 @@ +/// +import { ValueTypes } from '../filter-builder/filter.structure'; +type NumberRangeFieldProps = { + value: Partial; + onChange: (val: ValueTypes['between']) => void; + type: 'integer' | 'float'; +}; +export declare const NumberRangeField: ({ value, onChange, type, }: NumberRangeFieldProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/number-range.js b/src/main/webapp/component/fields/number-range.js new file mode 100644 index 00000000000..d9f888d9eca --- /dev/null +++ b/src/main/webapp/component/fields/number-range.js @@ -0,0 +1,54 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import Grid from '@mui/material/Grid'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +import { NumberField } from './number'; +var defaultValue = { + start: 0, + end: 1, +}; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (value.start === undefined || value.end === undefined) { + onChange(defaultValue); + } +}; +export var NumberRangeField = function (_a) { + var value = _a.value, onChange = _a.onChange, type = _a.type; + var validValue = __assign(__assign({}, defaultValue), value); + React.useEffect(function () { + validateShape({ value: value, onChange: onChange, type: type }); + }, []); + return (React.createElement(Grid, { container: true, direction: "column" }, + React.createElement(Grid, { item: true, className: "w-full py-1" }, + React.createElement("div", null, "from")), + React.createElement(Grid, { item: true }, + React.createElement(NumberField, __assign({ value: validValue.start.toString(), TextFieldProps: { + placeholder: 'lower bound', + }, type: type, onChange: function (val) { + onChange(__assign(__assign({}, validValue), { start: val })); + } }, EnterKeySubmitProps))), + React.createElement(Grid, { item: true, className: "w-full py-1" }, + React.createElement("div", null, "to")), + React.createElement(Grid, { item: true }, + React.createElement(NumberField, __assign({ TextFieldProps: { + placeholder: 'upper bound', + }, value: validValue.end.toString(), type: type, onChange: function (val) { + onChange(__assign(__assign({}, validValue), { end: val })); + } }, EnterKeySubmitProps))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLXJhbmdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9maWVsZHMvbnVtYmVyLXJhbmdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFB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AgPC9HcmlkPlxuICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgPE51bWJlckZpZWxkXG4gICAgICAgICAgdmFsdWU9e3ZhbGlkVmFsdWUuc3RhcnQudG9TdHJpbmcoKX1cbiAgICAgICAgICBUZXh0RmllbGRQcm9wcz17e1xuICAgICAgICAgICAgcGxhY2Vob2xkZXI6ICdsb3dlciBib3VuZCcsXG4gICAgICAgICAgfX1cbiAgICAgICAgICB0eXBlPXt0eXBlfVxuICAgICAgICAgIG9uQ2hhbmdlPXsodmFsKSA9PiB7XG4gICAgICAgICAgICBvbkNoYW5nZSh7XG4gICAgICAgICAgICAgIC4uLnZhbGlkVmFsdWUsXG4gICAgICAgICAgICAgIHN0YXJ0OiB2YWwsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH19XG4gICAgICAgICAgey4uLkVudGVyS2V5U3VibWl0UHJvcHN9XG4gICAgICAgIC8+XG4gICAgICA8L0dyaWQ+XG4gICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbCBweS0xXCI+XG4gICAgICAgIDxkaXY+dG88L2Rpdj5cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgIDxOdW1iZXJGaWVsZFxuICAgICAgICAgIFRleHRGaWVsZFByb3BzPXt7XG4gICAgICAgICAgICBwbGFjZWhvbGRlcjogJ3VwcGVyIGJvdW5kJyxcbiAgICAgICAgICB9fVxuICAgICAgICAgIHZhbHVlPXt2YWxpZFZhbHVlLmVuZC50b1N0cmluZygpfVxuICAgICAgICAgIHR5cGU9e3R5cGV9XG4gICAgICAgICAgb25DaGFuZ2U9eyh2YWwpID0+IHtcbiAgICAgICAgICAgIG9uQ2hhbmdlKHtcbiAgICAgICAgICAgICAgLi4udmFsaWRWYWx1ZSxcbiAgICAgICAgICAgICAgZW5kOiB2YWwsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH19XG4gICAgICAgICAgey4uLkVudGVyS2V5U3VibWl0UHJvcHN9XG4gICAgICAgIC8+XG4gICAgICA8L0dyaWQ+XG4gICAgPC9HcmlkPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/fields/number.d.ts b/src/main/webapp/component/fields/number.d.ts new file mode 100644 index 00000000000..69552854aeb --- /dev/null +++ b/src/main/webapp/component/fields/number.d.ts @@ -0,0 +1,12 @@ +/// +import { TextFieldProps } from '@mui/material/TextField'; +type Props = { + value?: string; + onChange?: (val: number) => void; + type: 'integer' | 'float'; + TextFieldProps?: TextFieldProps; + validation?: (val: number) => boolean; + validationText?: string; +}; +export declare const NumberField: ({ value, onChange, type, validation, validationText, TextFieldProps, }: Props) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/fields/number.js b/src/main/webapp/component/fields/number.js new file mode 100644 index 00000000000..f3cb9b846c4 --- /dev/null +++ b/src/main/webapp/component/fields/number.js @@ -0,0 +1,66 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import TextField from '@mui/material/TextField'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +var defaultValue = 1; +function parseValue(value, type) { + var parsedValue = defaultValue; + if (type === 'integer') { + parsedValue = parseInt(value); + } + else { + parsedValue = parseFloat(value); + } + if (isNaN(parsedValue)) { + return defaultValue; + } + else { + return parsedValue; + } +} +function useLocalValue(_a) { + var value = _a.value, onChange = _a.onChange, type = _a.type, _b = _a.validation, validation = _b === void 0 ? function () { return true; } : _b, _c = _a.validationText, validationText = _c === void 0 ? 'Must be a valid number, using previous value of ' : _c; + var _d = __read(React.useState(parseValue(value || '1', type)), 2), localValue = _d[0], setLocalValue = _d[1]; + var _e = __read(React.useState(false), 2), hasValidationIssues = _e[0], setHasValidationIssues = _e[1]; + var _f = __read(React.useState(''), 2), constructedValidationText = _f[0], setConstructedValidationText = _f[1]; + React.useEffect(function () { + if (onChange && + typeof localValue === 'number' && + !isNaN(localValue) && + validation(localValue)) { + setHasValidationIssues(false); + onChange(localValue); + } + else { + setConstructedValidationText(validationText + value); + setHasValidationIssues(true); + } + }, [localValue, value]); + return { + localValue: localValue, + setLocalValue: setLocalValue, + hasValidationIssues: hasValidationIssues, + constructedValidationText: constructedValidationText, + }; +} +export var NumberField = function (_a) { + var value = _a.value, onChange = _a.onChange, type = _a.type, validation = _a.validation, validationText = _a.validationText, TextFieldProps = _a.TextFieldProps; + var _b = useLocalValue({ value: value, onChange: onChange, type: type, validation: validation, validationText: validationText }), localValue = _b.localValue, setLocalValue = _b.setLocalValue, hasValidationIssues = _b.hasValidationIssues, constructedValidationText = _b.constructedValidationText; + return (React.createElement(TextField, __assign({ fullWidth: true, size: "small", variant: "outlined", value: localValue, type: "number", onChange: function (e) { + if (onChange) { + var inputValue = e.target.value; + if (inputValue === '' || inputValue === '-') { + setLocalValue(inputValue); + } + else if (type === 'integer') { + setLocalValue(parseInt(inputValue)); + } + else { + setLocalValue(parseFloat(inputValue)); + } + } + }, helperText: hasValidationIssues ? constructedValidationText : '', FormHelperTextProps: { + error: true, + } }, TextFieldProps, EnterKeySubmitProps))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9maWVsZHMvbnVtYmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxTQUE2QixNQUFNLHlCQUF5QixDQUFBO0FBQ25FLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLG1DQUFtQyxDQUFBO0FBYXZFLElBQU0sWUFBWSxHQUFHLENBQUMsQ0FBQTtBQUV0QixTQUFTLFVBQVUsQ0FBQyxLQUFhLEVBQUUsSUFBbUI7SUFDcEQsSUFBSSxXQUFXLEdBQUcsWUFBWSx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ogJyd9XG4gICAgICBGb3JtSGVscGVyVGV4dFByb3BzPXt7XG4gICAgICAgIGVycm9yOiB0cnVlLFxuICAgICAgfX1cbiAgICAgIHsuLi5UZXh0RmllbGRQcm9wc31cbiAgICAgIHsuLi5FbnRlcktleVN1Ym1pdFByb3BzfVxuICAgIC8+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/fields/resource-size-range.d.ts b/src/main/webapp/component/fields/resource-size-range.d.ts new file mode 100644 index 00000000000..699adcafb09 --- /dev/null +++ b/src/main/webapp/component/fields/resource-size-range.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { FilterClass } from '../filter-builder/filter.structure'; +type GenericFilterType = { + filter: FilterClass; + setFilter: (filter: FilterClass) => void; +}; +export declare function castAndParseValue(value: unknown, defaultValue: number): number; +export declare function castAndParseUnit(unit: unknown, defaultValue: string): string; +declare const ResourceSizeRangeFieldWrapper: React.FC; +export { ResourceSizeRangeFieldWrapper as ResourceSizeRangeField }; diff --git a/src/main/webapp/component/fields/resource-size-range.js b/src/main/webapp/component/fields/resource-size-range.js new file mode 100644 index 00000000000..a04732bfa48 --- /dev/null +++ b/src/main/webapp/component/fields/resource-size-range.js @@ -0,0 +1,137 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign } from "tslib"; +import * as React from 'react'; +import { ResourceSizeRangeFilterClass, sizeUnits, isResourceSizeRangeFilterClass, } from '../filter-builder/filter.structure'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +import { NumberField } from './number'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import LinearProgress from '@mui/material/LinearProgress'; +var defaultValue = { + start: 0, + end: 1, + startUnits: 'B', + endUnits: 'B', +}; +function castAndParseFilterValue(value) { + var castedValue = value; + try { + return { + start: castAndParseValue(castedValue.start, defaultValue.start), + end: castAndParseValue(castedValue.end, defaultValue.end), + }; + } + catch (e) { + return { + start: defaultValue.start, + end: defaultValue.end, + }; + } +} +function parseFilterContext(context) { + var castedContext = context; + try { + return { + startUnits: castAndParseUnit(castedContext.startUnits, defaultValue.startUnits), + endUnits: castAndParseUnit(castedContext.endUnits, defaultValue.endUnits), + }; + } + catch (e) { + return { + startUnits: defaultValue.startUnits, + endUnits: defaultValue.endUnits, + }; + } +} +export function castAndParseValue(value, defaultValue) { + try { + var castedValue = value; + if (typeof castedValue === 'number' && !isNaN(castedValue)) { + return castedValue; + } + } + catch (e) { + // If casting fails, fall through to default + } + return defaultValue; +} +export function castAndParseUnit(unit, defaultValue) { + try { + var castedUnit = unit; + if (sizeUnits.includes(castedUnit)) { + return castedUnit; + } + } + catch (e) { + // If casting fails, fall through to default + } + return defaultValue; +} +function parseFilter(props) { + var filter = props.filter; + var newValue = castAndParseFilterValue(filter.value); + var newContext = parseFilterContext(filter.context); + return new ResourceSizeRangeFilterClass(__assign(__assign({}, filter), { value: { + start: newValue.start, + end: newValue.end, + }, context: { + startUnits: newContext.startUnits, + endUnits: newContext.endUnits, + } })); +} +var ResourceSizeRangeFieldWrapper = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter; + React.useEffect(function () { + var timeoutId = window.setTimeout(function () { + if (!isResourceSizeRangeFilterClass(filter)) { + setFilter(parseFilter({ filter: filter, setFilter: setFilter })); + } + }, 250); + return function () { + window.clearTimeout(timeoutId); + }; + }, [filter]); + if (!isResourceSizeRangeFilterClass(filter)) { + return React.createElement(LinearProgress, null); + } + return React.createElement(ResourceSizeRangeField, { filter: filter, setFilter: setFilter }); +}; +var ResourceSizeRangeField = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter; + return (React.createElement("div", { className: "flex flex-col space-y-4" }, + React.createElement("div", { className: "flex flex-row items-start" }, + React.createElement(NumberField, __assign({ value: filter.value.start.toString(), TextFieldProps: { label: 'From' }, type: "float", onChange: function (val) { + setFilter(new ResourceSizeRangeFilterClass(__assign(__assign({}, filter), { value: { start: val, end: filter.value.end } }))); + } }, EnterKeySubmitProps)), + React.createElement(Autocomplete, { value: filter.context.startUnits, onChange: function (_, newValue) { + return setFilter(new ResourceSizeRangeFilterClass(__assign(__assign({}, filter), { context: { + startUnits: newValue || 'B', + endUnits: filter.context.endUnits, + } }))); + }, className: "min-w-24 ml-2", options: sizeUnits, renderInput: function (params) { return React.createElement(TextField, __assign({}, params, { size: "small" })); }, fullWidth: true })), + React.createElement("div", { className: "flex flex-row items-start" }, + React.createElement(NumberField, __assign({ value: filter.value.end.toString(), TextFieldProps: { label: 'To' }, type: "float", onChange: function (val) { + setFilter(new ResourceSizeRangeFilterClass(__assign(__assign({}, filter), { value: { start: filter.value.start, end: val } }))); + } }, EnterKeySubmitProps)), + React.createElement(Autocomplete, { value: filter.context.endUnits, className: "min-w-24 ml-2", onChange: function (_, newValue) { + setFilter(new ResourceSizeRangeFilterClass(__assign(__assign({}, filter), { context: { + startUnits: filter.context.startUnits, + endUnits: newValue || 'B', + } }))); + }, options: sizeUnits, renderInput: function (params) { return React.createElement(TextField, __assign({}, params, { size: "small" })); }, fullWidth: true })))); +}; +export { ResourceSizeRangeFieldWrapper as ResourceSizeRangeField }; +//# sourceMappingURL=data:application/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KHtcbiAgZmlsdGVyLFxuICBzZXRGaWx0ZXIsXG59KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtY29sIHNwYWNlLXktNFwiPlxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtcm93IGl0ZW1zLXN0YXJ0XCI+XG4gICAgICAgIDxOdW1iZXJGaWVsZFxuICAgICAgICAgIHZhbHVlPXtmaWx0ZXIudmFsdWUuc3RhcnQudG9TdHJpbmcoKX1cbiAgICAgICAgICBUZXh0RmllbGRQcm9wcz17eyBsYWJlbDogJ0Zyb20nIH19XG4gICAgICAgICAgdHlwZT1cImZsb2F0XCJcbiAgICAgICAgICBvbkNoYW5nZT17KHZhbCkgPT4ge1xuICAgICAgICAgICAgc2V0RmlsdGVyKFxuICAgICAgICAgICAgICBuZXcgUmVzb3VyY2VTaXplUmFuZ2VGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgLi4uZmlsdGVyLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB7IHN0YXJ0OiB2YWwsIGVuZDogZmlsdGVyLnZhbHVlLmVuZCB9LFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKVxuICAgICAgICAgIH19XG4gICAgICAgICAgey4uLkVudGVyS2V5U3VibWl0UHJvcHN9XG4gICAgICAgIC8+XG4gICAgICAgIDxBdXRvY29tcGxldGVcbiAgICAgICAgICB2YWx1ZT17ZmlsdGVyLmNvbnRleHQuc3RhcnRVbml0c31cbiAgICAgICAgICBvbkNoYW5nZT17KF8sIG5ld1ZhbHVlKSA9PlxuICAgICAgICAgICAgc2V0RmlsdGVyKFxuICAgICAgICAgICAgICBuZXcgUmVzb3VyY2VTaXplUmFuZ2VGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgLi4uZmlsdGVyLFxuICAgICAgICAgICAgICAgIGNvbnRleHQ6IHtcbiAgICAgICAgICAgICAgICAgIHN0YXJ0VW5pdHM6IG5ld1ZhbHVlIHx8ICdCJyxcbiAgICAgICAgICAgICAgICAgIGVuZFVuaXRzOiBmaWx0ZXIuY29udGV4dC5lbmRVbml0cyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgICBjbGFzc05hbWU9XCJtaW4tdy0yNCBtbC0yXCJcbiAgICAgICAgICBvcHRpb25zPXtzaXplVW5pdHN9XG4gICAgICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IDxUZXh0RmllbGQgey4uLnBhcmFtc30gc2l6ZT1cInNtYWxsXCIgLz59XG4gICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgIC8+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LXJvdyBpdGVtcy1zdGFydFwiPlxuICAgICAgICA8TnVtYmVyRmllbGRcbiAgICAgICAgICB2YWx1ZT17ZmlsdGVyLnZhbHVlLmVuZC50b1N0cmluZygpfVxuICAgICAgICAgIFRleHRGaWVsZFByb3BzPXt7IGxhYmVsOiAnVG8nIH19XG4gICAgICAgICAgdHlwZT1cImZsb2F0XCJcbiAgICAgICAgICBvbkNoYW5nZT17KHZhbCkgPT4ge1xuICAgICAgICAgICAgc2V0RmlsdGVyKFxuICAgICAgICAgICAgICBuZXcgUmVzb3VyY2VTaXplUmFuZ2VGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgLi4uZmlsdGVyLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB7IHN0YXJ0OiBmaWx0ZXIudmFsdWUuc3RhcnQsIGVuZDogdmFsIH0sXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApXG4gICAgICAgICAgfX1cbiAgICAgICAgICB7Li4uRW50ZXJLZXlTdWJtaXRQcm9wc31cbiAgICAgICAgLz5cbiAgICAgICAgPEF1dG9jb21wbGV0ZVxuICAgICAgICAgIHZhbHVlPXtmaWx0ZXIuY29udGV4dC5lbmRVbml0c31cbiAgICAgICAgICBjbGFzc05hbWU9XCJtaW4tdy0yNCBtbC0yXCJcbiAgICAgICAgICBvbkNoYW5nZT17KF8sIG5ld1ZhbHVlKSA9PiB7XG4gICAgICAgICAgICBzZXRGaWx0ZXIoXG4gICAgICAgICAgICAgIG5ldyBSZXNvdXJjZVNpemVSYW5nZUZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAuLi5maWx0ZXIsXG4gICAgICAgICAgICAgICAgY29udGV4dDoge1xuICAgICAgICAgICAgICAgICAgc3RhcnRVbml0czogZmlsdGVyLmNvbnRleHQuc3RhcnRVbml0cyxcbiAgICAgICAgICAgICAgICAgIGVuZFVuaXRzOiBuZXdWYWx1ZSB8fCAnQicsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9fVxuICAgICAgICAgIG9wdGlvbnM9e3NpemVVbml0c31cbiAgICAgICAgICByZW5kZXJJbnB1dD17KHBhcmFtcykgPT4gPFRleHRGaWVsZCB7Li4ucGFyYW1zfSBzaXplPVwic21hbGxcIiAvPn1cbiAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgLz5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCB7IFJlc291cmNlU2l6ZVJhbmdlRmllbGRXcmFwcGVyIGFzIFJlc291cmNlU2l6ZVJhbmdlRmllbGQgfVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/fields/resource-size.d.ts b/src/main/webapp/component/fields/resource-size.d.ts new file mode 100644 index 00000000000..fd0adf7db73 --- /dev/null +++ b/src/main/webapp/component/fields/resource-size.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { FilterClass } from '../filter-builder/filter.structure'; +type GenericFilterType = { + filter: FilterClass; + setFilter: (filter: FilterClass) => void; +}; +type UnitSelectorProps = { + value: string; + onChange: (newValue: string) => void; +}; +export declare const UnitSelector: React.FC; +declare const ValidatedResourceSizeField: React.FC; +export { ValidatedResourceSizeField as ResourceSizeField }; diff --git a/src/main/webapp/component/fields/resource-size.js b/src/main/webapp/component/fields/resource-size.js new file mode 100644 index 00000000000..929d011fde6 --- /dev/null +++ b/src/main/webapp/component/fields/resource-size.js @@ -0,0 +1,68 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign } from "tslib"; +import * as React from 'react'; +import { isResourceSizeFilterClass, ResourceSizeFilterClass, sizeUnits, } from '../filter-builder/filter.structure'; +import { EnterKeySubmitProps } from '../custom-events/enter-key-submit'; +import { NumberField } from './number'; +import Autocomplete from '@mui/material/Autocomplete'; +import LinearProgress from '@mui/material/LinearProgress'; +import TextField from '@mui/material/TextField'; +import { castAndParseUnit, castAndParseValue } from './resource-size-range'; +var defaultValue = 0; +var defaultUnit = 'B'; +var parseFilter = function (props) { + var _a; + var filter = props.filter; + var newValue = castAndParseValue(filter.value, defaultValue); + var newUnit = castAndParseUnit((_a = filter.context) === null || _a === void 0 ? void 0 : _a.units, defaultUnit); + return new ResourceSizeFilterClass(__assign(__assign({}, filter), { value: newValue, context: __assign(__assign({}, filter.context), { units: newUnit }) })); +}; +export var UnitSelector = function (_a) { + var value = _a.value, onChange = _a.onChange; + return (React.createElement(Autocomplete, { value: value, onChange: function (_event, newValue) { + onChange(newValue || defaultUnit); + }, options: sizeUnits, className: "min-w-24 ml-2", renderInput: function (params) { return React.createElement(TextField, __assign({}, params, { size: "small" })); }, disableClearable: true })); +}; +var ValidatedResourceSizeField = function (props) { + React.useEffect(function () { + var timeoutId = window.setTimeout(function () { + if (!isResourceSizeFilterClass(props.filter)) { + props.setFilter(parseFilter(props)); + } + }, 250); + return function () { + window.clearTimeout(timeoutId); + }; + }, [props]); + if (!isResourceSizeFilterClass(props.filter)) { + return React.createElement(LinearProgress, null); + } + return React.createElement(ResourceSizeField, { filter: props.filter, setFilter: props.setFilter }); +}; +var ResourceSizeField = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter; + var handleValueChange = function (newValue) { + setFilter(new ResourceSizeFilterClass(__assign(__assign({}, filter), { value: newValue }))); + }; + var handleUnitChange = function (newUnit) { + setFilter(new ResourceSizeFilterClass(__assign(__assign({}, filter), { context: { units: newUnit } }))); + }; + return (React.createElement("div", { className: "flex flex-row items-start" }, + React.createElement(NumberField, __assign({ type: "float", value: filter.value.toString(), onChange: handleValueChange }, EnterKeySubmitProps)), + React.createElement(UnitSelector, { value: filter.context.units, onChange: handleUnitChange }))); +}; +export { ValidatedResourceSizeField as ResourceSizeField }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb3VyY2Utc2l6ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmllbGRzL3Jlc291cmNlLXNpemUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7O0F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ZSxcbiAgICAgIH0pXG4gICAgKVxuICB9XG5cbiAgY29uc3QgaGFuZGxlVW5pdENoYW5nZSA9IChuZXdVbml0OiBzdHJpbmcpID0+IHtcbiAgICBzZXRGaWx0ZXIoXG4gICAgICBuZXcgUmVzb3VyY2VTaXplRmlsdGVyQ2xhc3Moe1xuICAgICAgICAuLi5maWx0ZXIsXG4gICAgICAgIGNvbnRleHQ6IHsgdW5pdHM6IG5ld1VuaXQgfSxcbiAgICAgIH0pXG4gICAgKVxuICB9XG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2IGNsYXNzTmFtZT1cImZsZXggZmxleC1yb3cgaXRlbXMtc3RhcnRcIj5cbiAgICAgIDxOdW1iZXJGaWVsZFxuICAgICAgICB0eXBlPVwiZmxvYXRcIlxuICAgICAgICB2YWx1ZT17ZmlsdGVyLnZhbHVlLnRvU3RyaW5nKCl9XG4gICAgICAgIG9uQ2hhbmdlPXtoYW5kbGVWYWx1ZUNoYW5nZX1cbiAgICAgICAgey4uLkVudGVyS2V5U3VibWl0UHJvcHN9XG4gICAgICAvPlxuICAgICAgPFVuaXRTZWxlY3RvciB2YWx1ZT17ZmlsdGVyLmNvbnRleHQudW5pdHN9IG9uQ2hhbmdlPXtoYW5kbGVVbml0Q2hhbmdlfSAvPlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCB7IFZhbGlkYXRlZFJlc291cmNlU2l6ZUZpZWxkIGFzIFJlc291cmNlU2l6ZUZpZWxkIH1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/fields/useTimePrefs.d.ts b/src/main/webapp/component/fields/useTimePrefs.d.ts new file mode 100644 index 00000000000..7f4c6e21d68 --- /dev/null +++ b/src/main/webapp/component/fields/useTimePrefs.d.ts @@ -0,0 +1,2 @@ +declare const useTimePrefs: (action?: () => void) => void; +export default useTimePrefs; diff --git a/src/main/webapp/component/fields/useTimePrefs.js b/src/main/webapp/component/fields/useTimePrefs.js new file mode 100644 index 00000000000..e6e3f12eaa1 --- /dev/null +++ b/src/main/webapp/component/fields/useTimePrefs.js @@ -0,0 +1,20 @@ +import { __read } from "tslib"; +import { useState, useEffect } from 'react'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import user from '../singletons/user-instance'; +var useTimePrefs = function (action) { + var _a = useBackbone(), listenTo = _a.listenTo, stopListening = _a.stopListening; + var _b = __read(useState(Math.random()), 2), setForceRender = _b[1]; + useEffect(function () { + var callback = function () { + setForceRender(Math.random()); + action && action(); + }; + listenTo(user.getPreferences(), 'change:dateTimeFormat change:timeZone', callback); + return function () { + return stopListening(user.getPreferences(), 'change:dateTimeFormat change:timeZone', callback); + }; + }, [action]); +}; +export default useTimePrefs; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlVGltZVByZWZzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9maWVsZHMvdXNlVGltZVByZWZzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDM0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdDQUF3QyxDQUFBO0FBQ3BFLE9BQU8sSUFBSSxNQUFNLDZCQUE2QixDQUFBO0FBRTlDLElBQU0sWUFBWSxHQUFHLFVBQUMsTUFBbUI7SUFDakMsSUFBQSxLQUE4QixXQUFXLEVBQUUsRUFBekMsUUFBUSxjQUFBLEVBQUUsYUFBYSxtQkFBa0IsQ0FBQTtJQUMzQyxJQUFBLEtBQUEsT0FBcUIsUUFBUSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxJQUFBLEVBQXpDLGNBQWMsUUFBMkIsQ0FBQTtJQUVsRCxTQUFTLENBQUM7UUFDUixJQUFNLFFBQV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ICAgIH1cbiAgICBsaXN0ZW5UbyhcbiAgICAgIHVzZXIuZ2V0UHJlZmVyZW5jZXMoKSxcbiAgICAgICdjaGFuZ2U6ZGF0ZVRpbWVGb3JtYXQgY2hhbmdlOnRpbWVab25lJyxcbiAgICAgIGNhbGxiYWNrXG4gICAgKVxuICAgIHJldHVybiAoKSA9PlxuICAgICAgc3RvcExpc3RlbmluZyhcbiAgICAgICAgdXNlci5nZXRQcmVmZXJlbmNlcygpLFxuICAgICAgICAnY2hhbmdlOmRhdGVUaW1lRm9ybWF0IGNoYW5nZTp0aW1lWm9uZScsXG4gICAgICAgIGNhbGxiYWNrXG4gICAgICApXG4gIH0sIFthY3Rpb25dKVxufVxuXG5leHBvcnQgZGVmYXVsdCB1c2VUaW1lUHJlZnNcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/examples.d.ts b/src/main/webapp/component/filter-builder/examples.d.ts new file mode 100644 index 00000000000..17c82ea1a43 --- /dev/null +++ b/src/main/webapp/component/filter-builder/examples.d.ts @@ -0,0 +1,139 @@ +/** + * Examples pulled from the existing filter tree of filter json + * + * I noticed we don't keep the coordinate system stored anywhere in the location + * json at the moment. Need to add whatever keyword looks like. + */ +declare const examples: ({ + type: string; + filters: { + type: string; + property: string; + value: string; + }[]; +} | { + type: string; + filters: { + type: string; + value: boolean; + property: { + type: string; + filterFunctionName: string; + params: (string | number)[]; + }; + }[]; +} | { + type: string; + filters: { + type: string; + property: string; + value: null; + }[]; +} | { + type: string; + filters: { + type: string; + property: string; + value: string; + from: string; + to: string; + }[]; +} | { + type: string; + filters: { + type: string; + property: string; + value: { + lower: number; + upper: number; + }; + }[]; +} | { + type: string; + filters: { + type: string; + property: string; + value: string; + distance: number; + geojson: { + type: string; + geometry: { + type: string; + coordinates: number[][]; + }; + properties: { + type: string; + buffer: { + width: string; + unit: string; + }; + }; + }; + }[]; +} | { + type: string; + filters: { + type: string; + property: string; + value: string; + distance: number; + geojson: { + type: string; + geometry: { + type: string; + coordinates: number[][][]; + }; + properties: { + type: string; + buffer: { + width: string; + unit: string; + }; + }; + }; + }[]; +} | { + type: string; + filters: { + type: string; + property: string; + value: string; + distance: number; + geojson: { + type: string; + geometry: { + type: string; + coordinates: number[]; + }; + properties: { + type: string; + buffer: { + width: number; + unit: string; + }; + }; + }; + }[]; +} | { + type: string; + filters: { + type: string; + property: string; + value: string; + geojson: { + type: string; + bbox: number[]; + geometry: { + type: string; + coordinates: number[][][]; + }; + properties: { + type: string; + north: number; + east: number; + south: number; + west: number; + }; + }; + }[]; +})[]; diff --git a/src/main/webapp/component/filter-builder/examples.js b/src/main/webapp/component/filter-builder/examples.js new file mode 100644 index 00000000000..191818a319f --- /dev/null +++ b/src/main/webapp/component/filter-builder/examples.js @@ -0,0 +1,352 @@ +/** + * Examples pulled from the existing filter tree of filter json + * + * I noticed we don't keep the coordinate system stored anywhere in the location + * json at the moment. Need to add whatever keyword looks like. + */ +//@ts-ignore +var examples = [ + { + type: 'AND', + filters: [ + { + type: 'ILIKE', + property: 'anyText', + value: '123213', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'LIKE', + property: 'anyText', + value: '123213', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '=', + property: 'anyText', + value: '123213', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '=', + value: true, + property: { + type: 'FILTER_FUNCTION', + filterFunctionName: 'proximity', + params: ['anyText', 22, '12'], + }, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'IS NULL', + property: 'checksum', + value: null, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'BEFORE', + property: 'datetime.end', + value: '2020-07-01T07:00:00.000Z', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'AFTER', + property: 'datetime.end', + value: '2020-07-01T07:00:00.000Z', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '=', + property: 'datetime.end', + value: 'RELATIVE(PT11M)', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'DURING', + property: 'datetime.end', + value: '2020-07-01T07:00:00.000Z/2020-07-10T07:00:00.000Z', + from: '2020-07-01T07:00:00.000Z', + to: '2020-07-10T07:00:00.000Z', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'IS NULL', + property: 'datetime.end', + value: null, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '>', + property: 'location.altitude-meters', + value: '1', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '<', + property: 'location.altitude-meters', + value: '1', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '=', + property: 'location.altitude-meters', + value: '1', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '>=', + property: 'location.altitude-meters', + value: '1', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: '<=', + property: 'location.altitude-meters', + value: '1', + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'BETWEEN', + property: 'location.altitude-meters', + value: { + lower: 1, + upper: 2, + }, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'INTERSECTS', + property: 'location', + value: 'LINESTRING(-99.3052 54.615629,-95.783965 45.236546,-112.445055 47.137541)', + distance: 0, + geojson: { + type: 'Feature', + geometry: { + type: 'LineString', + coordinates: [ + [-99.3052, 54.615629], + [-95.783965, 45.236546], + [-112.445055, 47.137541], + ], + }, + properties: { + type: 'LineString', + buffer: { + width: '', + unit: 'meters', + }, + }, + }, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'DWITHIN', + property: 'location', + value: 'LINESTRING(-99.3052 54.615629,-95.783965 45.236546,-112.445055 47.137541)', + distance: 1, + geojson: { + type: 'Feature', + geometry: { + type: 'LineString', + coordinates: [ + [-99.3052, 54.615629], + [-95.783965, 45.236546], + [-112.445055, 47.137541], + ], + }, + properties: { + type: 'LineString', + buffer: { + width: '1', + unit: 'meters', + }, + }, + }, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'DWITHIN', + property: 'location', + value: 'POLYGON((-107.626679 53.160318,-97.142175 40.783651,-112.152477 38.528437,-107.626679 53.160318))', + distance: 3.6576000000000004, + geojson: { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-107.626679, 53.160318], + [-97.142175, 40.783651], + [-112.152477, 38.528437], + [-107.626679, 53.160318], + ], + ], + }, + properties: { + type: 'Polygon', + buffer: { + width: '12', + unit: 'feet', + }, + }, + }, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'DWITHIN', + property: 'location', + value: 'POINT(-101.741501 49.672811)', + distance: 636765.857025, + geojson: { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-101.741501, 49.672811], + }, + properties: { + type: 'Point', + buffer: { + width: 636765.857025, + unit: 'meters', + }, + }, + }, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'DWITHIN', + property: 'location', + value: 'POINT(-101.741501 49.672811)', + distance: 636765.857025, + geojson: { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [-101.741501, 49.672811], + }, + properties: { + type: 'Point', + buffer: { + width: 636765.857025, + unit: 'meters', + }, + }, + }, + }, + ], + }, + { + type: 'AND', + filters: [ + { + type: 'INTERSECTS', + property: 'location', + value: 'POLYGON((-106.606125 47.452416,-106.606125 51.974784,-92.669926 51.974784,-92.669926 47.452416,-106.606125 47.452416))', + geojson: { + type: 'Feature', + bbox: [47.452416, 51.974784, -106.606125, -92.669926], + geometry: { + type: 'Polygon', + coordinates: [ + [ + [-106.606125, 51.974784], + [-92.669926, 51.974784], + [-92.669926, 47.452416], + [-106.606125, 47.452416], + [-106.606125, 51.974784], + ], + ], + }, + properties: { + type: 'BoundingBox', + north: 51.974784, + east: -92.669926, + south: 47.452416, + west: -106.606125, + }, + }, + }, + ], + }, +]; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhhbXBsZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG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biAgICAgICAgcHJvcGVydHk6ICdsb2NhdGlvbi5hbHRpdHVkZS1tZXRlcnMnLFxuICAgICAgICB2YWx1ZTogJzEnLFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuICB7XG4gICAgdHlwZTogJ0FORCcsXG4gICAgZmlsdGVyczogW1xuICAgICAge1xuICAgICAgICB0eXBlOiAnPD0nLFxuICAgICAgICBwcm9wZXJ0eTogJ2xvY2F0aW9uLmFsdGl0dWRlLW1ldGVycycsXG4gICAgICAgIHZhbHVlOiAnMScsXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG4gIHtcbiAgICB0eXBlOiAnQU5EJyxcbiAgICBmaWx0ZXJzOiBbXG4gICAgICB7XG4gICAgICAgIHR5cGU6ICdCRVRXRUVOJyxcbiAgICAgICAgcHJvcGVydHk6ICdsb2NhdGlvbi5hbHRpdHVkZS1tZXRlcnMnLFxuICAgICAgICB2YWx1ZToge1xuICAgICAgICAgIGxvd2VyOiAxLFxuICAgICAgICAgIHVwcGVyOiAyLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuICB7XG4gICAgdHlwZTogJ0FORCcsXG4gICAgZmlsdGVyczogW1xuICAgICAge1xuICAgICAgICB0eXBlOiAnSU5URVJTRUNUUycsXG4gICAgICAgIHByb3BlcnR5OiAnbG9jYXRpb24nLFxuICAgICAgICB2YWx1ZTpcbiAgICAgICAgICAnTElORVNUUklORygtOTkuMzA1MiA1NC42MTU2MjksLTk1Ljc4Mzk2NSA0NS4yMzY1NDYsLTExMi40NDUwNTUgNDcuMTM3NTQxKScsXG4gICAgICAgIGRpc3RhbmNlOiAwLFxuICAgICAgICBnZW9qc29uOiB7XG4gICAgICAgICAgdHlwZTogJ0ZlYXR1cmUnLFxuICAgICAgICAgIGdlb21ldHJ5OiB7XG4gICAgICAgICAgICB0eXBlOiAnTGluZVN0cmluZycsXG4gICAgICAgICAgICBjb29yZGluYXRlczogW1xuICAgICAgICAgICAgICBbLTk5LjMwNTIsIDU0LjYxNTYyOV0sXG4gICAgICAgICAgICAgIFstOTUuNzgzOTY1LCA0NS4yMzY1NDZdLFxuICAgICAgICAgICAgICBbLTExMi40NDUwNTUsIDQ3LjEzNzU0MV0sXG4gICAgICAgICAgICBdLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgICAgdHlwZTogJ0xpbmVTdHJpbmcnLFxuICAgICAgICAgICAgYnVmZmVyOiB7XG4gICAgICAgICAgICAgIHdpZHRoOiAnJyxcbiAgICAgICAgICAgICAgdW5pdDogJ21ldGVycycsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG4gIHtcbiAgICB0eXBlOiAnQU5EJyxcbiAgICBmaWx0ZXJzOiBbXG4gICAgICB7XG4gICAgICAgIHR5cGU6ICdEV0lUSElOJyxcbiAgICAgICAgcHJvcGVydHk6ICdsb2NhdGlvbicsXG4gICAgICAgIHZhbHVlOlxuICAgICAgICAgICdMSU5FU1RSSU5HKC05OS4zMDUyIDU0LjYxNTYyOSwtOTUuNzgzOTY1IDQ1LjIzNjU0NiwtMTEyLjQ0NTA1NSA0Ny4xMzc1NDEpJyxcbiAgICAgICAgZGlzdGFuY2U6IDEsXG4gICAgICAgIGdlb2pzb246IHtcbiAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsXG4gICAgICAgICAgZ2VvbWV0cnk6IHtcbiAgICAgICAgICAgIHR5cGU6ICdMaW5lU3RyaW5nJyxcbiAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBbXG4gICAgICAgICAgICAgIFstOTkuMzA1MiwgNTQuNjE1NjI5XSxcbiAgICAgICAgICAgICAgWy05NS43ODM5NjUsIDQ1LjIzNjU0Nl0sXG4gICAgICAgICAgICAgIFstMTEyLjQ0NTA1NSwgNDcuMTM3NTQxXSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB0eXBlOiAnTGluZVN0cmluZycsXG4gICAgICAgICAgICBidWZmZXI6IHtcbiAgICAgICAgICAgICAgd2lkdGg6ICcxJyxcbiAgICAgICAgICAgICAgdW5pdDogJ21ldGVycycsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG4gIHtcbiAgICB0eXBlOiAnQU5EJyxcbiAgICBmaWx0ZXJzOiBbXG4gICAgICB7XG4gICAgICAgIHR5cGU6ICdEV0lUSElOJyxcbiAgICAgICAgcHJvcGVydHk6ICdsb2NhdGlvbicsXG4gICAgICAgIHZhbHVlOlxuICAgICAgICAgICdQT0xZR09OKCgtMTA3LjYyNjY3OSA1My4xNjAzMTgsLTk3LjE0MjE3NSA0MC43ODM2NTEsLTExMi4xNTI0NzcgMzguNTI4NDM3LC0xMDcuNjI2Njc5IDUzLjE2MDMxOCkpJyxcbiAgICAgICAgZGlzdGFuY2U6IDMuNjU3NjAwMDAwMDAwMDAwNCxcbiAgICAgICAgZ2VvanNvbjoge1xuICAgICAgICAgIHR5cGU6ICdGZWF0dXJlJyxcbiAgICAgICAgICBnZW9tZXRyeToge1xuICAgICAgICAgICAgdHlwZTogJ1BvbHlnb24nLFxuICAgICAgICAgICAgY29vcmRpbmF0ZXM6IFtcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIFstMTA3LjYyNjY3OSwgNTMuMTYwMzE4XSxcbiAgICAgICAgICAgICAgICBbLTk3LjE0MjE3NSwgNDAuNzgzNjUxXSxcbiAgICAgICAgICAgICAgICBbLTExMi4xNTI0NzcsIDM4LjUyODQzN10sXG4gICAgICAgICAgICAgICAgWy0xMDcuNjI2Njc5LCA1My4xNjAzMThdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIHR5cGU6ICdQb2x5Z29uJyxcbiAgICAgICAgICAgIGJ1ZmZlcjoge1xuICAgICAgICAgICAgICB3aWR0aDogJzEyJyxcbiAgICAgICAgICAgICAgdW5pdDogJ2ZlZXQnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuICB7XG4gICAgdHlwZTogJ0FORCcsXG4gICAgZmlsdGVyczogW1xuICAgICAge1xuICAgICAgICB0eXBlOiAnRFdJVEhJTicsXG4gICAgICAgIHByb3BlcnR5OiAnbG9jYXRpb24nLFxuICAgICAgICB2YWx1ZTogJ1BPSU5UKC0xMDEuNzQxNTAxIDQ5LjY3MjgxMSknLFxuICAgICAgICBkaXN0YW5jZTogNjM2NzY1Ljg1NzAyNSxcbiAgICAgICAgZ2VvanNvbjoge1xuICAgICAgICAgIHR5cGU6ICdGZWF0dXJlJyxcbiAgICAgICAgICBnZW9tZXRyeToge1xuICAgICAgICAgICAgdHlwZTogJ1BvaW50JyxcbiAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBbLTEwMS43NDE1MDEsIDQ5LjY3MjgxMV0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB0eXBlOiAnUG9pbnQnLFxuICAgICAgICAgICAgYnVmZmVyOiB7XG4gICAgICAgICAgICAgIHdpZHRoOiA2MzY3NjUuODU3MDI1LFxuICAgICAgICAgICAgICB1bml0OiAnbWV0ZXJzJyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgXSxcbiAgfSxcbiAge1xuICAgIHR5cGU6ICdBTkQnLFxuICAgIGZpbHRlcnM6IFtcbiAgICAgIHtcbiAgICAgICAgdHlwZTogJ0RXSVRISU4nLFxuICAgICAgICBwcm9wZXJ0eTogJ2xvY2F0aW9uJyxcbiAgICAgICAgd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uICAgICAgICAgICAgdHlwZTogJ1BvbHlnb24nLFxuICAgICAgICAgICAgY29vcmRpbmF0ZXM6IFtcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIFstMTA2LjYwNjEyNSwgNTEuOTc0Nzg0XSxcbiAgICAgICAgICAgICAgICBbLTkyLjY2OTkyNiwgNTEuOTc0Nzg0XSxcbiAgICAgICAgICAgICAgICBbLTkyLjY2OTkyNiwgNDcuNDUyNDE2XSxcbiAgICAgICAgICAgICAgICBbLTEwNi42MDYxMjUsIDQ3LjQ1MjQxNl0sXG4gICAgICAgICAgICAgICAgWy0xMDYuNjA2MTI1LCA1MS45NzQ3ODRdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIHR5cGU6ICdCb3VuZGluZ0JveCcsXG4gICAgICAgICAgICBub3J0aDogNTEuOTc0Nzg0LFxuICAgICAgICAgICAgZWFzdDogLTkyLjY2OTkyNixcbiAgICAgICAgICAgIHNvdXRoOiA0Ny40NTI0MTYsXG4gICAgICAgICAgICB3ZXN0OiAtMTA2LjYwNjEyNSxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuXVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/filter-branch.d.ts b/src/main/webapp/component/filter-builder/filter-branch.d.ts new file mode 100644 index 00000000000..756abe6df28 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-branch.d.ts @@ -0,0 +1,13 @@ +/// +import { FilterBuilderClass } from './filter.structure'; +import { ValidationResult } from '../../react-component/location/validators'; +type Props = { + filter: FilterBuilderClass; + setFilter: (filter: FilterBuilderClass) => void; + root?: boolean; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; +}; +declare const _default: ({ filter, setFilter, root, errorListener, }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/filter-builder/filter-branch.js b/src/main/webapp/component/filter-builder/filter-branch.js new file mode 100644 index 00000000000..40730b0edef --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-branch.js @@ -0,0 +1,123 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import Grid from '@mui/material/Grid'; +import FilterLeaf from './filter-leaf'; +import { useTheme } from '@mui/material/styles'; +import { HoverButton } from '../button/hover'; +import { FilterBuilderClass, FilterClass, isFilterBuilderClass, } from './filter.structure'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import AddIcon from '@mui/icons-material/Add'; +import { Memo } from '../memo/memo'; +var OperatorData = [ + { + label: 'AND', + value: 'AND', + }, + { + label: 'OR', + value: 'OR', + }, +]; +var ChildFilter = function (_a) { + var parentFilter = _a.parentFilter, filter = _a.filter, setFilter = _a.setFilter, index = _a.index, isFirst = _a.isFirst, errorListener = _a.errorListener; + return (React.createElement(React.Fragment, null, + !isFirst ? (React.createElement(Grid, { "data-id": "filter-settings-container", container: true, direction: "row", alignItems: "center", justifyContent: "center", wrap: "nowrap", className: "relative" }, + React.createElement(Grid, { item: true, className: "p-2" }, + React.createElement(TextField, { "data-id": "filter-operator-select", value: parentFilter.type, onChange: function (e) { + var newOperator = e.target.value; + setFilter(new FilterBuilderClass(__assign(__assign({}, parentFilter), { type: newOperator }))); + }, select: true, variant: "outlined", size: "small" }, OperatorData.map(function (operatorInfo) { + return (React.createElement(MenuItem, { key: operatorInfo.value, value: operatorInfo.value }, operatorInfo.label)); + }))), + React.createElement(Grid, { item: true, className: "ml-auto position absolute right-0" }, + React.createElement(Button, { "data-id": "remove-child-filter-button", color: "primary", onClick: function () { + var newFilters = parentFilter.filters.slice(0); + newFilters.splice(index, 1); + setFilter(new FilterBuilderClass(__assign(__assign({}, parentFilter), { filters: newFilters }))); + } }, "Remove")))) : null, + isFilterBuilderClass(filter) ? (React.createElement(FilterBranch, { filter: filter, setFilter: function (newChildFilter) { + var newFilters = parentFilter.filters.slice(0); + newFilters.splice(index, 1, newChildFilter); + setFilter(new FilterBuilderClass(__assign(__assign({}, parentFilter), { filters: newFilters }))); + }, errorListener: errorListener })) : (React.createElement(FilterLeaf, { filter: filter, setFilter: function (newChildFilter) { + var newFilters = parentFilter.filters.slice(0); + newFilters.splice(index, 1, newChildFilter); + setFilter(new FilterBuilderClass(__assign(__assign({}, parentFilter), { filters: newFilters }))); + }, errorListener: errorListener })))); +}; +var FilterBranch = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter, _b = _a.root, root = _b === void 0 ? false : _b, errorListener = _a.errorListener; + var _c = __read(React.useState(false), 2), hover = _c[0], setHover = _c[1]; + var theme = useTheme(); + /** + * Any non root branches lacking filters are pruned. + */ + React.useEffect(function () { + filter.filters.forEach(function (childFilter, index) { + if (isFilterBuilderClass(childFilter) && + childFilter.filters.length === 0) { + var newFilters = filter.filters.slice(0); + newFilters.splice(index, 1); + setFilter(new FilterBuilderClass(__assign(__assign({}, filter), { filters: newFilters }))); + } + }); + }, [filter]); + return (React.createElement("div", { onMouseOver: function () { + setHover(true); + }, onMouseOut: function () { + setHover(false); + } }, + React.createElement("div", { className: root + ? ' shadow-none' + : 'px-3 py-2 MuiPaper-box-shadow border-black border-2 border-opacity-30' }, + React.createElement("div", { className: " relative" }, + React.createElement("div", { "data-id": root ? 'root-filter-group-container' : 'filter-group-container', className: "".concat(filter.negated ? 'border px-3 py-4 mt-2' : '', " transition-all duration-200"), style: { + borderColor: theme.palette.primary.main, + } }, + React.createElement(Grid, { item: true, className: "w-full filter-actions" }, + React.createElement(Grid, { container: true, direction: "row", alignItems: "center", className: "w-full" }, + React.createElement(Grid, { item: true }, + React.createElement(Button, { "data-id": "add-field-button", color: "primary", onClick: function () { + setFilter(new FilterBuilderClass(__assign(__assign({}, filter), { filters: filter.filters.concat([new FilterClass()]) }))); + } }, + React.createElement(AddIcon, { className: "Mui-text-text-primary" }), + "Field")), + React.createElement(Grid, { item: true }, + React.createElement(Button, { "data-id": "add-group-button", color: "primary", onClick: function () { + setFilter(new FilterBuilderClass(__assign(__assign({}, filter), { filters: filter.filters.concat([ + new FilterBuilderClass(), + ]) }))); + } }, + React.createElement(AddIcon, { className: "Mui-text-text-primary" }), + "Group")), + filter.filters.length !== 0 ? (React.createElement(Grid, { item: true, className: "ml-auto" }, + React.createElement(Button, { "data-id": "remove-first-filter-button", color: "primary", onClick: function () { + var newFilters = filter.filters.slice(0); + newFilters.splice(0, 1); + setFilter(new FilterBuilderClass(__assign(__assign({}, filter), { filters: newFilters }))); + } }, "Remove"))) : null)), + filter.negated ? (React.createElement(React.Fragment, null, + React.createElement(HoverButton, { className: "absolute top-0 left-1/2 transform -translate-y-1/2 -translate-x-1/2 py-0 px-1 text-xs z-10", color: "primary", variant: "contained", onClick: function () { + setFilter(new FilterBuilderClass(__assign(__assign({}, filter), { negated: !filter.negated }))); + } }, function (_a) { + var hover = _a.hover; + if (hover) { + return React.createElement(React.Fragment, null, "Remove Not"); + } + else { + return React.createElement(React.Fragment, null, "NOT"); + } + }))) : (React.createElement(React.Fragment, null, + React.createElement(Button, { "data-id": "not-group-button", className: "".concat(hover ? 'opacity-25' : 'opacity-0', " hover:opacity-100 focus:opacity-100 transition-opacity duration-200 absolute top-0 left-1/2 transform -translate-y-1/2 -translate-x-1/2 py-0 px-1 text-xs z-10"), color: "primary", variant: "contained", onClick: function () { + setFilter(new FilterBuilderClass(__assign(__assign({}, filter), { negated: !filter.negated }))); + } }, "+ Not Group"))), + React.createElement(Memo, { dependencies: [filter] }, + React.createElement(React.Fragment, null, filter.filters.map(function (childFilter, index) { + return (React.createElement(ChildFilter, { key: childFilter.id, parentFilter: filter, filter: childFilter, setFilter: setFilter, index: index, isFirst: index === 0, isLast: index === filter.filters.length - 1, errorListener: errorListener })); + })))))))); +}; +export default hot(module)(FilterBranch); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWx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oZSkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IG5ld09wZXJhdG9yID0gZS50YXJnZXQudmFsdWUgYXMgRmlsdGVyQnVpbGRlckNsYXNzWyd0eXBlJ11cbiAgICAgICAgICAgICAgICBzZXRGaWx0ZXIoXG4gICAgICAgICAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgICAgLi4ucGFyZW50RmlsdGVyLFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiBuZXdPcGVyYXRvcixcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBzZWxlY3RcbiAgICAgICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAge09wZXJhdG9yRGF0YS5tYXAoKG9wZXJhdG9ySW5mbykgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICA8TWVudUl0ZW0ga2V5PXtvcGVyYXRvckluZm8udmFsdWV9IHZhbHVlPXtvcGVyYXRvckluZm8udmFsdWV9PlxuICAgICAgICAgICAgICAgICAgICB7b3BlcmF0b3JJbmZvLmxhYmVsfVxuICAgICAgICAgICAgICAgICAgPC9NZW51SXRlbT5cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgPC9UZXh0RmllbGQ+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwibWwtYXV0byBwb3NpdGlvbiBhYnNvbHV0ZSByaWdodC0wXCI+XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIGRhdGEtaWQ9XCJyZW1vdmUtY2hpbGQtZmlsdGVyLWJ1dHRvblwiXG4gICAgICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXdGaWx0ZXJzID0gcGFyZW50RmlsdGVyLmZpbHRlcnMuc2xpY2UoMClcbiAgICAgICAgICAgICAgICBuZXdGaWx0ZXJzLnNwbGljZShpbmRleCwgMSlcbiAgICAgICAgICAgICAgICBzZXRGaWx0ZXIoXG4gICAgICAgICAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgICAgLi4ucGFyZW50RmlsdGVyLFxuICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzOiBuZXdGaWx0ZXJzLFxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIFJlbW92ZVxuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICA8L0dyaWQ+XG4gICAgICApIDogbnVsbH1cbiAgICAgIHtpc0ZpbHRlckJ1aWxkZXJDbGFzcyhmaWx0ZXIpID8gKFxuICAgICAgICA8RmlsdGVyQnJhbmNoXG4gICAgICAgICAgZmlsdGVyPXtmaWx0ZXJ9XG4gICAgICAgICAgc2V0RmlsdGVyPXsobmV3Q2hpbGRGaWx0ZXIpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5ld0ZpbHRlcnMgPSBwYXJlbnRGaWx0ZXIuZmlsdGVycy5zbGljZSgwKVxuICAgICAgICAgICAgbmV3RmlsdGVycy5zcGxpY2UoaW5kZXgsIDEsIG5ld0NoaWxkRmlsdGVyKVxuICAgICAgICAgICAgc2V0RmlsdGVyKFxuICAgICAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAuLi5wYXJlbnRGaWx0ZXIsXG4gICAgICAgICAgICAgICAgZmlsdGVyczogbmV3RmlsdGVycyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9fVxuICAgICAgICAgIGVycm9yTGlzdGVuZXI9e2Vycm9yTGlzdGVuZXJ9XG4gICAgICAgIC8+XG4gICAgICApIDogKFxuICAgICAgICA8RmlsdGVyTGVhZlxuICAgICAgICAgIGZpbHRlcj17ZmlsdGVyfVxuICAgICAgICAgIHNldEZpbHRlcj17KG5ld0NoaWxkRmlsdGVyKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdGaWx0ZXJzID0gcGFyZW50RmlsdGVyLmZpbHRlcnMuc2xpY2UoMClcbiAgICAgICAgICAgIG5ld0ZpbHRlcnMuc3BsaWNlKGluZGV4LCAxLCBuZXdDaGlsZEZpbHRlcilcbiAgICAgICAgICAgIHNldEZpbHRlcihcbiAgICAgICAgICAgICAgbmV3IEZpbHRlckJ1aWxkZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgLi4ucGFyZW50RmlsdGVyLFxuICAgICAgICAgICAgICAgIGZpbHRlcnM6IG5ld0ZpbHRlcnMsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApXG4gICAgICAgICAgfX1cbiAgICAgICAgICBlcnJvckxpc3RlbmVyPXtlcnJvckxpc3RlbmVyfVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICA8Lz5cbiAgKVxufVxuXG50eXBlIFByb3BzID0ge1xuICBmaWx0ZXI6IEZpbHRlckJ1aWxkZXJDbGFzc1xuICBzZXRGaWx0ZXI6IChmaWx0ZXI6IEZpbHRlckJ1aWxkZXJDbGFzcykgPT4gdm9pZFxuICByb290PzogYm9vbGVhblxuICBlcnJvckxpc3RlbmVyPzogKHZhbGlkYXRpb25SZXN1bHRzOiB7XG4gICAgW2tleTogc3RyaW5nXTogVmFsaWRhdGlvblJlc3VsdCB8IHVuZGVmaW5lZFxuICB9KSA9PiB2b2lkXG59XG5cbmNvbnN0IEZpbHR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AgICAgIH19XG4gICAgPlxuICAgICAgPGRpdlxuICAgICAgICBjbGFzc05hbWU9e1xuICAgICAgICAgIHJvb3RcbiAgICAgICAgICAgID8gJyBzaGFkb3ctbm9uZSdcbiAgICAgICAgICAgIDogJ3B4LTMgcHktMiBNdWlQYXBlci1ib3gtc2hhZG93IGJvcmRlci1ibGFjayBib3JkZXItMiBib3JkZXItb3BhY2l0eS0zMCdcbiAgICAgICAgfVxuICAgICAgPlxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cIiByZWxhdGl2ZVwiPlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGRhdGEtaWQ9e1xuICAgICAgICAgICAgICByb290ID8gJ3Jvb3QtZmlsdGVyLWdyb3VwLWNvbnRhaW5lcicgOiAnZmlsdGVyLWdyb3VwLWNvbnRhaW5lcidcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNsYXNzTmFtZT17YCR7XG4gICAgICAgICAgICAgIGZpbHRlci5uZWdhdGVkID8gJ2JvcmRlciBweC0zIHB5LTQgbXQtMicgOiAnJ1xuICAgICAgICAgICAgfSB0cmFuc2l0aW9uLWFsbCBkdXJhdGlvbi0yMDBgfVxuICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgYm9yZGVyQ29sb3I6IHRoZW1lLnBhbGV0dGUucHJpbWFyeS5tYWluLFxuICAgICAgICAgICAgfX1cbiAgICAgICAgICA+XG4gICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbCBmaWx0ZXItYWN0aW9uc1wiPlxuICAgICAgICAgICAgICA8R3JpZFxuICAgICAgICAgICAgICAgIGNvbnRhaW5lclxuICAgICAgICAgICAgICAgIGRpcmVjdGlvbj1cInJvd1wiXG4gICAgICAgICAgICAgICAgYWxpZ25JdGVtcz1cImNlbnRlclwiXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsXCJcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJhZGQtZmllbGQtYnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIHNldEZpbHRlcihcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBGaWx0ZXJCdWlsZGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5maWx0ZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcnM6IGZpbHRlci5maWx0ZXJzLmNvbmNhdChbbmV3IEZpbHRlckNsYXNzKCldKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICA8QWRkSWNvbiBjbGFzc05hbWU9XCJNdWktdGV4dC10ZXh0LXByaW1hcnlcIiAvPlxuICAgICAgICAgICAgICAgICAgICBGaWVsZFxuICAgICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJhZGQtZ3JvdXAtYnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIHNldEZpbHRlcihcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBGaWx0ZXJCdWlsZGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5maWx0ZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcnM6IGZpbHRlci5maWx0ZXJzLmNvbmNhdChbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IEZpbHRlckJ1aWxkZXJDbGFzcygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICA8QWRkSWNvbiBjbGFzc05hbWU9XCJNdWktdGV4dC10ZXh0LXByaW1hcnlcIiAvPlxuICAgICAgICAgICAgICAgICAgICBHcm91cFxuICAgICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgIHtmaWx0ZXIuZmlsdGVycy5sZW5ndGggIT09IDAgPyAoXG4gICAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cIm1sLWF1dG9cIj5cbiAgICAgICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJyZW1vdmUtZmlyc3QtZmlsdGVyLWJ1dHRvblwiXG4gICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdGaWx0ZXJzID0gZmlsdGVyLmZpbHRlcnMuc2xpY2UoMClcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0ZpbHRlcnMuc3BsaWNlKDAsIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRGaWx0ZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBGaWx0ZXJCdWlsZGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmZpbHRlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzOiBuZXdGaWx0ZXJzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICBSZW1vdmVcbiAgICAgICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIHtmaWx0ZXIubmVnYXRlZCA/IChcbiAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICA8SG92ZXJCdXR0b25cbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17YGFic29sdXRlIHRvcC0wIGxlZnQtMS8yIHRyYW5zZm9ybSAtdHJhbnNsYXRlLXktMS8yIC10cmFuc2xhdGUteC0xLzIgcHktMCBweC0xIHRleHQteHMgei0xMGB9XG4gICAgICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHNldEZpbHRlcihcbiAgICAgICAgICAgICAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLmZpbHRlcixcbiAgICAgICAgICAgICAgICAgICAgICAgIG5lZ2F0ZWQ6ICFmaWx0ZXIubmVnYXRlZCxcbiAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIHsoeyBob3ZlciB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChob3Zlcikge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiA8PlJlbW92ZSBOb3Q8Lz5cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gPD5OT1Q8Lz5cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICA8L0hvdmVyQnV0dG9uPlxuICAgICAgICAgICAgICA8Lz5cbiAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgZGF0YS1pZD1cIm5vdC1ncm91cC1idXR0b25cIlxuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgJHtcbiAgICAgICAgICAgICAgICAgICAgaG92ZXIgPyAnb3BhY2l0eS0yNScgOiAnb3BhY2l0eS0wJ1xuICAgICAgICAgICAgICAgICAgfSBob3ZlcjpvcGFjaXR5LTEwMCBmb2N1czpvcGFjaXR5LTEwMCB0cmFuc2l0aW9uLW9wYWNpdHkgZHVyYXRpb24tMjAwIGFic29sdXRlIHRvcC0wIGxlZnQtMS8yIHRyYW5zZm9ybSAtdHJhbnNsYXRlLXktMS8yIC10cmFuc2xhdGUteC0xLzIgcHktMCBweC0xIHRleHQteHMgei0xMGB9XG4gICAgICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHNldEZpbHRlcihcbiAgICAgICAgICAgICAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLmZpbHRlcixcbiAgICAgICAgICAgICAgICAgICAgICAgIG5lZ2F0ZWQ6ICFmaWx0ZXIubmVnYXRlZCxcbiAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICsgTm90IEdyb3VwXG4gICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDxNZW1vIGRlcGVuZGVuY2llcz17W2ZpbHRlcl19PlxuICAgICAgICAgICAgICA8PlxuICAgICAgICAgICAgICAgIHtmaWx0ZXIuZmlsdGVycy5tYXAoKGNoaWxkRmlsdGVyLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgPENoaWxkRmlsdGVyXG4gICAgICAgICAgICAgICAgICAgICAga2V5PXtjaGlsZEZpbHRlci5pZH1cbiAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRGaWx0ZXI9e2ZpbHRlcn1cbiAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXI9e2NoaWxkRmlsdGVyfVxuICAgICAgICAgICAgICAgICAgICAgIHNldEZpbHRlcj17c2V0RmlsdGVyfVxuICAgICAgICAgICAgICAgICAgICAgIGluZGV4PXtpbmRleH1cbiAgICAgICAgICAgICAgICAgICAgICBpc0ZpcnN0PXtpbmRleCA9PT0gMH1cbiAgICAgICAgICAgICAgICAgICAgICBpc0xhc3Q9e2luZGV4ID09PSBmaWx0ZXIuZmlsdGVycy5sZW5ndGggLSAxfVxuICAgICAgICAgICAgICAgICAgICAgIGVycm9yTGlzdGVuZXI9e2Vycm9yTGlzdGVuZXJ9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgPC9NZW1vPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShGaWx0ZXJCcmFuY2gpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/filter-builder.d.ts b/src/main/webapp/component/filter-builder/filter-builder.d.ts new file mode 100644 index 00000000000..5c2f6dea719 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-builder.d.ts @@ -0,0 +1,14 @@ +/// +import { ValidationResult } from '../../react-component/location/validators'; +type Props = { + model: any; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; +}; +/** + * We use the filterTree of the model as the single source of truth, so it's always up to date. + * As a result, we have to listen to updates to it. + */ +export declare const FilterBuilderRoot: ({ model, errorListener }: Props) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/filter-builder/filter-builder.js b/src/main/webapp/component/filter-builder/filter-builder.js new file mode 100644 index 00000000000..91b08ecbf0d --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-builder.js @@ -0,0 +1,61 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import FilterBranch from './filter-branch'; +import { FilterBuilderClass, isFilterBuilderClass } from './filter.structure'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +var convertToFilterIfNecessary = function (_a) { + var filter = _a.filter; + if (isFilterBuilderClass(filter)) { + return filter; + } + if (filter.filters === undefined) { + return new FilterBuilderClass({ + type: 'AND', + filters: [filter], + negated: false, + }); + } + return new FilterBuilderClass(__assign({}, filter)); +}; +var getBaseFilter = function (_a) { + var model = _a.model; + var filter = model.get('filterTree'); + return convertToFilterIfNecessary({ filter: filter }); +}; +/** + * We use the filterTree of the model as the single source of truth, so it's always up to date. + * As a result, we have to listen to updates to it. + */ +export var FilterBuilderRoot = function (_a) { + var model = _a.model, errorListener = _a.errorListener; + var _b = __read(React.useState(getBaseFilter({ model: model })), 2), filter = _b[0], setFilter = _b[1]; + var _c = useBackbone(), listenTo = _c.listenTo, stopListening = _c.stopListening; + React.useEffect(function () { + var callback = function () { + setFilter(getBaseFilter({ model: model })); + }; + listenTo(model, 'change:filterTree', callback); + return function () { + stopListening(model, 'change:filterTree', callback); + }; + }, [model]); + return (React.createElement("div", null, + React.createElement(FilterBranch, { filter: filter, setFilter: function (update) { + model.set('filterTree', update); // update the filterTree directly so it's always in sync and we're ready to search + }, root: true, errorListener: errorListener }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWJ1aWxkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2ZpbHRlci1idWlsZGVyL2ZpbHRlci1idWlsZGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRTlCLE9BQU8sWUFBWSxNQUFNLGlCQUFpQixDQUFBO0FBRTFDLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG9CQUFvQixDQUFBO0FBQzdFL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ZXJyb3JMaXN0ZW5lcn1cbiAgICAgIC8+XG4gICAgPC9kaXY+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/filter-leaf.d.ts b/src/main/webapp/component/filter-builder/filter-leaf.d.ts new file mode 100644 index 00000000000..af4baeb3f11 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-leaf.d.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { FilterClass } from './filter.structure'; +import { ValidationResult } from '../../react-component/location/validators'; +type Props = { + filter: FilterClass; + setFilter: (filter: FilterClass) => void; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; +}; +export declare const FilterNegationControls: ({ filter, setFilter, children, }: Props & { + children: React.ReactNode; +}) => JSX.Element; +declare const _default: ({ filter, setFilter, errorListener }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/filter-builder/filter-leaf.js b/src/main/webapp/component/filter-builder/filter-leaf.js new file mode 100644 index 00000000000..4ae529f25e2 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-leaf.js @@ -0,0 +1,43 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import { useTheme } from '@mui/material/styles'; +import { HoverButton } from '../button/hover'; +import { FilterClass } from './filter.structure'; +import FilterPropertyAutocomplete from '../../react-component/filter/filter'; +import { Memo } from '../memo/memo'; +export var FilterNegationControls = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter, children = _a.children; + var _b = __read(React.useState(false), 2), hover = _b[0], setHover = _b[1]; + var theme = useTheme(); + return (React.createElement("div", { className: "relative", onMouseOver: function () { + setHover(true); + }, onMouseOut: function () { + setHover(false); + } }, + filter.negated ? (React.createElement(HoverButton, { "data-id": "remove-not-button", className: "absolute left-1/2 transform -translate-x-1/2 -translate-y-1/2 py-0 px-1 text-xs z-10", color: "primary", variant: "contained", onClick: function () { + setFilter(new FilterClass(__assign(__assign({}, filter), { negated: !filter.negated }))); + } }, function (_a) { + var hover = _a.hover; + if (hover) { + return React.createElement(React.Fragment, null, "Remove Not"); + } + else { + return React.createElement(React.Fragment, null, "NOT"); + } + })) : (React.createElement(Button, { "data-id": "not-field-button", className: "".concat(hover ? 'opacity-25' : 'opacity-0', " hover:opacity-100 focus:opacity-100 transition-opacity duration-200 absolute left-1/2 transform -translate-x-1/2 -translate-y-1/2 py-0 px-1 text-xs z-10"), color: "primary", variant: "contained", onClick: function () { + setFilter(new FilterClass(__assign(__assign({}, filter), { negated: !filter.negated }))); + } }, "+ Not Field")), + React.createElement("div", { className: "".concat(filter.negated ? 'border px-3 py-4 mt-2' : '', " transition-all duration-200"), style: { + borderColor: theme.palette.primary.main, + } }, children))); +}; +var FilterLeaf = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter, errorListener = _a.errorListener; + return (React.createElement(FilterNegationControls, { filter: filter, setFilter: setFilter }, + React.createElement(Memo, { dependencies: [filter, setFilter] }, + React.createElement(FilterPropertyAutocomplete, { filter: filter, setFilter: setFilter, errorListener: errorListener })))); +}; +export default hot(module)(FilterLeaf); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWxlYWYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2ZpbHRlci1idWlsZGVyL2ZpbHRlci1sZWFmLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtBQUMvQyxPQUFP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IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAuLi5maWx0ZXIsXG4gICAgICAgICAgICAgICAgbmVnYXRlZDogIWZpbHRlci5uZWdhdGVkLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICB7KHsgaG92ZXIgfSkgPT4ge1xuICAgICAgICAgICAgaWYgKGhvdmVyKSB7XG4gICAgICAgICAgICAgIHJldHVybiA8PlJlbW92ZSBOb3Q8Lz5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiA8Pk5PVDwvPlxuICAgICAgICAgICAgfVxuICAgICAgICAgIH19XG4gICAgICAgIDwvSG92ZXJCdXR0b24+XG4gICAgICApIDogKFxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgZGF0YS1pZD1cIm5vdC1maWVsZC1idXR0b25cIlxuICAgICAgICAgIGNsYXNzTmFtZT17YCR7XG4gICAgICAgICAgICBob3ZlciA/ICdvcGFjaXR5LTI1JyA6ICdvcGFjaXR5LTAnXG4gICAgICAgICAgfSBob3ZlcjpvcGFjaXR5LTEwMCBmb2N1czpvcGFjaXR5LTEwMCB0cmFuc2l0aW9uLW9wYWNpdHkgZHVyYXRpb24tMjAwIGFic29sdXRlIGxlZnQtMS8yIHRyYW5zZm9ybSAtdHJhbnNsYXRlLXgtMS8yIC10cmFuc2xhdGUteS0xLzIgcHktMCBweC0xIHRleHQteHMgei0xMGB9XG4gICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICB2YXJpYW50PVwiY29udGFpbmVkXCJcbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBzZXRGaWx0ZXIoXG4gICAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgLi4uZmlsdGVyLFxuICAgICAgICAgICAgICAgIG5lZ2F0ZWQ6ICFma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IGhvdChtb2R1bGUpKEZpbHRlckxlYWYpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/filter-leaf.spec.d.ts b/src/main/webapp/component/filter-builder/filter-leaf.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-leaf.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/component/filter-builder/filter-leaf.spec.js b/src/main/webapp/component/filter-builder/filter-leaf.spec.js new file mode 100644 index 00000000000..0934fbece2b --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter-leaf.spec.js @@ -0,0 +1,328 @@ +import * as React from 'react'; +import Enzyme, { mount } from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +Enzyme.configure({ adapter: new Adapter() }); +import { expect } from 'chai'; +import FilterLeaf from './filter-leaf'; +import { FilterClass, } from './filter.structure'; +import moment from 'moment'; +import user from '../singletons/user-instance'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { BasicDataTypePropertyName } from './reserved.properties'; +function addTestDefs() { + var _a; + StartupDataStore.MetacardDefinitions.addDynamicallyFoundMetacardDefinitions({ + testing: (_a = { + integerType: { + type: 'INTEGER', + id: 'integerType', + multivalued: false, + isInjected: false, + }, + floatType: { + type: 'FLOAT', + id: 'floatType', + multivalued: false, + isInjected: false, + }, + longType: { + type: 'LONG', + id: 'longType', + multivalued: false, + isInjected: false, + }, + shortType: { + type: 'SHORT', + id: 'shortType', + multivalued: false, + isInjected: false, + }, + doubleType: { + type: 'DOUBLE', + id: 'doubleType', + multivalued: false, + isInjected: false, + }, + booleanType: { + type: 'BOOLEAN', + id: 'booleanType', + multivalued: false, + isInjected: false, + }, + dateType: { + type: 'DATE', + id: 'dateType', + multivalued: false, + isInjected: false, + }, + locationType: { + type: 'LOCATION', + id: 'locationType', + multivalued: false, + isInjected: false, + }, + xmlType: { + type: 'XML', + id: 'xmlType', + multivalued: false, + isInjected: false, + hidden: true, + }, + binaryType: { + type: 'BINARY', + id: 'binaryType', + multivalued: false, + isInjected: false, + hidden: true, + }, + 'location.country-code': { + type: 'STRING', + id: 'location.country-code', + multivalued: false, + isInjected: false, + }, + datatype: { + type: 'STRING', + id: 'datatype', + multivalued: false, + isInjected: false, + }, + anyText: { + type: 'STRING', + id: 'anyText', + multivalued: false, + isInjected: false, + hidden: true, + } + }, + _a[BasicDataTypePropertyName] = { + type: 'STRING', + id: BasicDataTypePropertyName, + multivalued: false, + isInjected: false, + hidden: true, + }, + _a), + }); +} +// do not rely on our own transforms for testing, rely on static data! +var data = { + date1: { + timezone: 'America/St_Johns', + originalISO: '2021-01-15T06:53:54.316Z', + originalDate: new Date('2021-01-15T06:53:54.316Z'), + shiftedISO: '2021-01-15T10:23:54.316Z', + shiftedDate: new Date('2021-01-15T10:23:54.316Z'), + userFormatISO: '2021-01-15T03:23:54.316-03:30', + userFormat24: '15 Jan 2021 03:23:54.316 -03:30', + userFormat12: '15 Jan 2021 03:23:54.316 am -03:30', + }, + date2: { + timezone: 'America/St_Johns', + userSuppliedInput: '15 Jan 2021 03:24:54.316 -02:30', + parsedOutput: '15 Jan 2021 02:24:54.316 -03:30', + }, + date3: { + timezone: 'Etc/UTC', + maxFuture: moment().add(10, 'years').toISOString(), + disallowedFuture: moment().add(11, 'years').toISOString(), + }, + location1: { + type: 'LINE', + mode: 'line', + lineWidth: '50', + line: [ + [0, 0], + [1, 1], + ], + }, + location2: { + type: 'POLYGON', + mode: 'poly', + polygonBufferWidth: '50', + polygonBufferUnits: 'meters', + polygon: [ + [0, 0], + [1, 1], + [2, 2], + [0, 0], + ], + }, + location3: { + type: 'POINTRADIUS', + mode: 'circle', + radiusUnits: 'meters', + radius: 50, + lat: 0, + lon: 30, + }, +}; +describe('filter leaf testing', function () { + before(function () { + /** + * Needs to be done here, otherwise these get blown away when the mock fetch happens. + */ + addTestDefs(); + }); + it('renders with a blank FilterClass', function () { + mount(React.createElement(FilterLeaf, { filter: new FilterClass({}), setFilter: function () { } })); + }); + it('renders with a non-blank text FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: 'ILIKE', + property: 'anyText', + value: 'text', + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('anyText'); + expect(wrapper.find('input').last().render().val()).to.equal('text'); + }); + it('renders with a non-blank number FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: '<', + property: 'integerType', + value: 4, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('integerType'); + expect(wrapper.find('input').last().render().val()).to.equal('4'); + }); + it('renders with a non-blank integer FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: '<', + property: 'integerType', + value: 4, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('integerType'); + expect(wrapper.find('input').last().render().val()).to.equal('4'); + }); + it('renders with a non-blank float FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: '<', + property: 'floatType', + value: 4, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('floatType'); + expect(wrapper.find('input').last().render().val()).to.equal('4'); + }); + it('renders with a non-blank long FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: '<', + property: 'longType', + value: 4, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('longType'); + expect(wrapper.find('input').last().render().val()).to.equal('4'); + }); + it('renders with a non-blank short FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: '<', + property: 'shortType', + value: 4, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('shortType'); + expect(wrapper.find('input').last().render().val()).to.equal('4'); + }); + it('renders with a non-blank double FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: '<', + property: 'doubleType', + value: 4, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('doubleType'); + expect(wrapper.find('input').last().render().val()).to.equal('4'); + }); + it('renders with a non-blank boolean FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: '=', + property: 'booleanType', + value: true, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('booleanType'); + expect(wrapper.find('input').last().render().val()).to.equal('true'); + }); + it('renders with a non-blank date FilterClass', function () { + user.get('user').get('preferences').set('timeZone', data.date1.timezone); + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: 'AFTER', + property: 'dateType', + value: data.date1.originalISO, + }), setFilter: function () { } })); + expect(wrapper.find('input').first().render().val()).to.equal('dateType'); + expect(wrapper.find('input').last().render().val()).to.equal(data.date1.userFormatISO); + }); + it('renders with a non-blank location FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: 'DWITHIN', + property: 'locationType', + value: data.location1, + }), setFilter: function () { } })); + var thingsToFind = Object.values(data.location1) + .map(function (val) { + if (typeof val !== 'string') { + return JSON.stringify(val); + } + return val.toLowerCase(); + }) + .filter(function (val) { return val !== 'line'; }); + wrapper.find('input').forEach(function (node) { + var rendering = node.render(); + var val = rendering.val().toLowerCase(); + var index = thingsToFind.indexOf(val); + if (index >= 0) { + thingsToFind.splice(index, 1); + } + }); + expect(thingsToFind.length).to.equal(0); + }); + it('renders with a non-blank polygon location FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: 'DWITHIN', + property: 'locationType', + value: data.location2, + }), setFilter: function () { } })); + var thingsToFind = Object.values(data.location2) + .map(function (val) { + if (typeof val !== 'string') { + return JSON.stringify(val); + } + return val.toLowerCase(); + }) + .filter(function (val) { return val !== 'poly'; }); + wrapper.find('input').forEach(function (node) { + var rendering = node.render(); + var val = rendering.val().toLowerCase(); + var index = thingsToFind.indexOf(val); + if (index >= 0) { + thingsToFind.splice(index, 1); + } + }); + expect(thingsToFind.length).to.equal(0); + }); + it('renders with a non-blank point radius location FilterClass', function () { + var wrapper = mount(React.createElement(FilterLeaf, { filter: new FilterClass({ + type: 'DWITHIN', + property: 'locationType', + value: data.location3, + }), setFilter: function () { } })); + var thingsToFind = Object.values(data.location3) + .map(function (val) { + if (typeof val !== 'string') { + return JSON.stringify(val); + } + if (val === 'POINTRADIUS') { + return 'point-radius'; + } + return val.toLowerCase(); + }) + .filter(function (val) { return val !== 'circle'; }); + wrapper.find('input').forEach(function (node) { + var rendering = node.render(); + var val = rendering.val().toLowerCase(); + var index = thingsToFind.indexOf(val); + if (index >= 0) { + thingsToFind.splice(index, 1); + } + }); + expect(thingsToFind.length).to.equal(0); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWxlYWYuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmlsdGVyLWJ1aWxkZXIvZmlsdGVyLWxlYWYuc3BlYy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLEVBQUUsRUFBRSxLQUFLLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDdEMsT0FBTyxPQUFPLE1BQU0sb0NBQW9DLENBQUE7QUFDeEQsTUFBTSxDQUFDLFNBQVMsQ0FBQyxFQUFFLE9BQU8sRUFBRSxJQUFJLE9BQU8sRUFBRSxFQUFFLENBQUMsQ0FBQTtBQUM1QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzdCLE9BQU8sVUFBVSxNQUFNLGVBQWUsQ0FBQTtBQUN0QyxPQUFPLEVBQ0wsV0FBVyxHQUlaLE1BQU0sb0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A9IG1vdW50KFxuICAgICAgPEZpbHRlckxlYWZcbiAgICAgICAgZmlsdGVyPXtcbiAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgdHlwZTogJ0RXSVRISU4nLFxuICAgICAgICAgICAgcHJvcGVydHk6ICdsb2NhdGlvblR5cGUnLFxuICAgICAgICAgICAgdmFsdWU6IGRhdGEubG9jYXRpb24zLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgc2V0RmlsdGVyPXsoKSA9PiB7fX1cbiAgICAgIC8+XG4gICAgKVxuICAgIGNvbnN0IHRoaW5nc1RvRmluZCA9IE9iamVjdC52YWx1ZXMoZGF0YS5sb2NhdGlvbjMpXG4gICAgICAubWFwKCh2YWwpID0+IHtcbiAgICAgICAgaWYgKHR5cGVvZiB2YWwgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHZhbClcbiAgICAgICAgfVxuICAgICAgICBpZiAodmFsID09PSAnUE9JTlRSQURJVVMnKSB7XG4gICAgICAgICAgcmV0dXJuICdwb2ludC1yYWRpdXMnXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZhbC50b0xvd2VyQ2FzZSgpXG4gICAgICB9KVxuICAgICAgLmZpbHRlcigodmFsKSA9PiB2YWwgIT09ICdjaXJjbGUnKVxuICAgIHdyYXBwZXIuZmluZCgnaW5wdXQnKS5mb3JFYWNoKChub2RlKSA9PiB7XG4gICAgICBjb25zdCByZW5kZXJpbmcgPSBub2RlLnJlbmRlcigpXG4gICAgICBjb25zdCB2YWwgPSByZW5kZXJpbmcudmFsKCkudG9Mb3dlckNhc2UoKVxuICAgICAgY29uc3QgaW5kZXggPSB0aGluZ3NUb0ZpbmQuaW5kZXhPZih2YWwpXG4gICAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgICB0aGluZ3NUb0ZpbmQuc3BsaWNlKGluZGV4LCAxKVxuICAgICAgfVxuICAgIH0pXG4gICAgZXhwZWN0KHRoaW5nc1RvRmluZC5sZW5ndGgpLnRvLmVxdWFsKDApXG4gIH0pXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/filter.structure.d.ts b/src/main/webapp/component/filter-builder/filter.structure.d.ts new file mode 100644 index 00000000000..d4f4b86716b --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter.structure.d.ts @@ -0,0 +1,216 @@ +import { ValuesType } from 'utility-types'; +import { Omit } from '../../typescript'; +import { SpreadOperatorProtectedClass } from '../../typescript/classes'; +import { BasicDataTypePropertyName } from './reserved.properties'; +export declare const deserialize: { + /** + * example inputs: // ' are part of input + * 'RELATIVE(PT1S)' // last 1 seconds + * 'RELATIVE(PT1M)' // last 1 minutes + * 'RELATIVE(PT1H)' // last 1 hours + * 'RELATIVE(P1D)' // last 1 days + * 'RELATIVE(P7D)' // last 1 weeks (notice we get mod of 7 days) + * 'RELATIVE(P1M)' // last 1 month + * 'RELATIVE(P1Y)' // last 1 year + **/ + dateRelative: (val: string) => ValueTypes['relative']; +}; +export declare const serialize: { + dateRelative: ({ last, unit }: ValueTypes['relative']) => string; + dateAround: (value: ValueTypes['around']) => string; + dateBetween: (value: ValueTypes['between']) => string; + location: (property: string, value: ValueTypes['location']) => any; +}; +declare class BaseFilterBuilderClass extends SpreadOperatorProtectedClass { + readonly type: string; + readonly filters: Array; + readonly negated: boolean; + readonly id: string; + constructor({ type, filters, negated, id, }?: { + type?: BaseFilterBuilderClass['type']; + filters?: BaseFilterBuilderClass['filters']; + negated?: BaseFilterBuilderClass['negated']; + id?: string; + }); +} +export declare class FilterBuilderClass extends BaseFilterBuilderClass { + readonly type: 'AND' | 'OR'; + readonly filters: Array; + constructor({ type, filters, negated, id, }?: { + type?: FilterBuilderClass['type']; + filters?: FilterBuilderClass['filters']; + negated?: FilterBuilderClass['negated']; + id?: string; + }); +} +/** + * We want to support more complex negation than allowed by the normal filter tree, so we store negated in a property. + * However, since the write function in cql.tsx doesn't know about this, at some point we need to convert it back to this class where negation exists as a type instead of property. + * See the uncollapseNots function in cql.tsx for where this is done. + */ +export declare class CQLStandardFilterBuilderClass extends BaseFilterBuilderClass { + readonly type: 'AND' | 'OR' | 'NOT'; + readonly filters: Array; + constructor({ type, filters, negated, id, }?: { + type?: CQLStandardFilterBuilderClass['type']; + filters?: CQLStandardFilterBuilderClass['filters']; + negated?: CQLStandardFilterBuilderClass['negated']; + id?: string; + }); +} +export type BooleanTextType = { + text: string; + cql: string; + error: boolean; + errorMessage?: string; +}; +export type ValueTypes = { + proximity: { + first: string; + second: string; + distance: number; + }; + date: string; + boolean: boolean; + text: string; + float: number; + integer: number; + relative: { + last: string; + unit: 'm' | 'h' | 'd' | 'M' | 'y' | 's' | 'w'; + }; + around: { + date: string; + buffer: { + amount: string; + unit: 'm' | 'h' | 'd' | 'M' | 'y' | 's' | 'w'; + }; + direction: 'both' | 'before' | 'after'; + }; + during: { + start: string; + end: string; + }; + between: { + start: number; + end: number; + }; + multivalue: string[]; + booleanText: BooleanTextType; + location: // this is all we technically need to reconstruct (lo fidelity) + LineLocation | PolygonLocation | PointRadiusLocation; +}; +export type LineLocation = { + type: 'LINE'; + mode: 'line'; + lineWidth?: string; + line: Array>; +}; +export type PolygonLocation = { + type: 'POLYGON'; + polygonBufferWidth?: number | string; + polygonBufferUnits?: 'meters'; + polygon: Array>; + locationType?: 'dd'; + polyType?: 'polygon'; + mode: 'poly'; +}; +export type PointRadiusLocation = { + type: 'POINTRADIUS'; + radius: number | string; + radiusUnits?: 'meters'; + mode: 'circle'; + lat: number; + lon: number; + locationType?: 'dd'; +}; +export type ValueType = string | boolean | null | ValuesType; +export type FilterContext = { + [key: string]: any; +}; +export declare class FilterClass extends SpreadOperatorProtectedClass { + type: 'BEFORE' | 'AFTER' | 'RELATIVE' | '=' | 'DURING' | 'GEOMETRY' | 'DWITHIN' | 'ILIKE' | 'LIKE' | 'IS NULL' | '>' | '<' | '=' | '<=' | '>=' | 'DURING' | 'BETWEEN' | 'FILTER FUNCTION proximity' | 'AROUND' | 'BOOLEAN_TEXT_SEARCH'; + readonly property: string; + readonly value: ValueType; + readonly negated: boolean | undefined; + readonly id: string; + readonly context?: FilterContext; + constructor({ type, property, value, negated, id, context, }?: { + type?: FilterClass['type']; + property?: FilterClass['property']; + value?: FilterClass['value']; + negated?: FilterClass['negated']; + id?: string; + context?: FilterContext; + }); +} +/** + * determine it is actually an plain object form of the filter builder class + */ +export declare const shouldBeFilterBuilderClass: (filter: any) => filter is FilterBuilderClass; +/** + *determine it is actually an instantiation of the filter builder class + */ +export declare const isFilterBuilderClass: (filter: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass | Partial | Partial | Partial) => filter is FilterBuilderClass; +/** + *determine it is actually an instantiation of the cql standard filter builder class + */ +export declare const isCQLStandardFilterBuilderClass: (filter: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass | Partial | Partial | Partial) => filter is CQLStandardFilterBuilderClass; +export interface BasicFilterClass extends Omit { + property: string[]; +} +interface BasicDatatypeClass extends Omit { + property: typeof BasicDataTypePropertyName; + value: string[]; +} +export declare class BasicDatatypeFilter extends FilterClass implements BasicDatatypeClass { + property: typeof BasicDataTypePropertyName; + value: string[]; + constructor({ value, context, }?: { + value?: string[]; + context?: FilterContext; + }); +} +export declare const isBasicDatatypeClass: (filter: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass | Partial | Partial | Partial) => filter is BasicDatatypeClass; +export declare class ResourceSizeFilterClass extends FilterClass { + value: number; + context: FilterContext & { + units: string; + }; + constructor({ value, context, ...otherProps }: Omit & { + value: number; + context: FilterContext & { + units: string; + }; + }); +} +export declare class ResourceSizeRangeFilterClass extends FilterClass { + value: { + start: number; + end: number; + }; + context: FilterContext & { + startUnits: string; + endUnits: string; + }; + constructor({ value, context, ...otherProps }: Omit & { + value: { + start: number; + end: number; + }; + context: FilterContext & { + startUnits: string; + endUnits: string; + }; + }); +} +export declare const isResourceSizeFilterClass: (filter: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass | Partial | Partial | Partial) => filter is ResourceSizeFilterClass; +export declare const isResourceSizeRangeFilterClass: (filter: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass | Partial | Partial | Partial) => filter is ResourceSizeRangeFilterClass; +export declare const sizeUnits: string[]; +export declare const convertResourceSizeFilterClassValueToBytes: (filter: ResourceSizeFilterClass) => number; +export declare const convertResourceSizeRangeFilterClassValueToBytes: (filter: ResourceSizeRangeFilterClass) => { + start: number; + end: number; +}; +export declare function convertBytesToHumanReadable(bytes: number): string; +export {}; diff --git a/src/main/webapp/component/filter-builder/filter.structure.js b/src/main/webapp/component/filter-builder/filter.structure.js new file mode 100644 index 00000000000..81992085935 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter.structure.js @@ -0,0 +1,298 @@ +import { __assign, __extends, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import moment from 'moment-timezone'; +import CQLUtils from '../../js/CQLUtils'; +import { SpreadOperatorProtectedClass } from '../../typescript/classes'; +import ExtensionPoints from '../../extension-points'; +import { BasicDataTypePropertyName } from './reserved.properties'; +export var deserialize = { + /** + * example inputs: // ' are part of input + * 'RELATIVE(PT1S)' // last 1 seconds + * 'RELATIVE(PT1M)' // last 1 minutes + * 'RELATIVE(PT1H)' // last 1 hours + * 'RELATIVE(P1D)' // last 1 days + * 'RELATIVE(P7D)' // last 1 weeks (notice we get mod of 7 days) + * 'RELATIVE(P1M)' // last 1 month + * 'RELATIVE(P1Y)' // last 1 year + **/ + dateRelative: function (val) { + var last = ''; + var guts = val.split('(')[1].split(')')[0].substring(1); // get the thing between the parens, notice we don't care about P either + var unit = guts.charAt(guts.length - 1); // notice that we still need to know if it's minutes or months, the unit is the same between them! + if (guts.charAt(0) === 'T') { + last = guts.substring(1, guts.length - 1); + unit = unit.toLowerCase(); + } + else { + last = guts.substring(0, guts.length - 1); + if (unit !== 'M') { + unit = unit.toLowerCase(); // only M differs given the conflict between minutes / months + } + if (unit === 'd') { + if (Number(last) % 7 === 0) { + // manually convert to weeks since it's not "really" a cql supported unit for relative + last = (Number(last) / 7).toString(); + unit = 'w'; + } + } + } + return { + last: last, + unit: unit, + }; + }, +}; +export var serialize = { + dateRelative: function (_a) { + var last = _a.last, unit = _a.unit; + if (unit === undefined || !parseFloat(last)) { + return ''; + } + //Weeks is not a valid unit, so convert this to days + if (unit === 'w') { + var convertedUnit = 'd'; + var convertedLast = (parseFloat(last) * 7).toString(); + return "RELATIVE(".concat('P' + convertedLast + convertedUnit.toUpperCase(), ")"); + } + var prefix = unit === 's' || unit === 'm' || unit === 'h' ? 'PT' : 'P'; + return "RELATIVE(".concat(prefix + last + unit.toUpperCase(), ")"); + }, + dateAround: function (value) { + if (value.buffer === undefined || + value.date === undefined || + value.direction === undefined) { + return ''; + } + var before = ['both', 'before'].includes(value.direction) + ? moment(value.date) + .subtract(value.buffer.amount, value.buffer.unit) + .toISOString() + : value.date; + var after = ['both', 'after'].includes(value.direction) + ? moment(value.date) + .add(value.buffer.amount, value.buffer.unit) + .toISOString() + : value.date; + return "DURING ".concat(before, "/").concat(after); + }, + dateBetween: function (value) { + var from = moment(value.start); + var to = moment(value.end); + if (from.isAfter(to)) { + return (to.toISOString() || '') + '/' + (from.toISOString() || ''); + } + return (from.toISOString() || '') + '/' + (to.toISOString() || ''); + }, + location: function (property, value) { + var transformation = ExtensionPoints.serializeLocation(property, value); + if (transformation !== null) { + return transformation; + } + return CQLUtils.generateAnyGeoFilter(property, value); + }, +}; +var BaseFilterBuilderClass = /** @class */ (function (_super) { + __extends(BaseFilterBuilderClass, _super); + function BaseFilterBuilderClass(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.type, type = _c === void 0 ? 'AND' : _c, _d = _b.filters, filters = _d === void 0 ? [new FilterClass()] : _d, _e = _b.negated, negated = _e === void 0 ? false : _e, _f = _b.id, id = _f === void 0 ? Math.random().toString() : _f; + var _this = _super.call(this) || this; + _this.type = type; + /** + * If for some reason filters come in that aren't classed, this will handle it. + */ + _this.filters = filters.map(function (childFilter) { + if (isFilterBuilderClass(childFilter) || + shouldBeFilterBuilderClass(childFilter)) { + return new FilterBuilderClass(__assign({}, childFilter)); + } + else { + return new FilterClass(__assign({}, childFilter)); + } + }); + _this.negated = negated; + _this.id = id; + return _this; + } + return BaseFilterBuilderClass; +}(SpreadOperatorProtectedClass)); +var FilterBuilderClass = /** @class */ (function (_super) { + __extends(FilterBuilderClass, _super); + function FilterBuilderClass(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.type, type = _c === void 0 ? 'AND' : _c, _d = _b.filters, filters = _d === void 0 ? [new FilterClass()] : _d, _e = _b.negated, negated = _e === void 0 ? false : _e, _f = _b.id, id = _f === void 0 ? Math.random().toString() : _f; + return _super.call(this, { type: type, filters: filters, negated: negated, id: id }) || this; + } + return FilterBuilderClass; +}(BaseFilterBuilderClass)); +export { FilterBuilderClass }; +/** + * We want to support more complex negation than allowed by the normal filter tree, so we store negated in a property. + * However, since the write function in cql.tsx doesn't know about this, at some point we need to convert it back to this class where negation exists as a type instead of property. + * See the uncollapseNots function in cql.tsx for where this is done. + */ +var CQLStandardFilterBuilderClass = /** @class */ (function (_super) { + __extends(CQLStandardFilterBuilderClass, _super); + function CQLStandardFilterBuilderClass(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.type, type = _c === void 0 ? 'AND' : _c, _d = _b.filters, filters = _d === void 0 ? [new FilterClass()] : _d, _e = _b.negated, negated = _e === void 0 ? false : _e, _f = _b.id, id = _f === void 0 ? Math.random().toString() : _f; + return _super.call(this, { type: type, filters: filters, negated: negated, id: id }) || this; + } + return CQLStandardFilterBuilderClass; +}(BaseFilterBuilderClass)); +export { CQLStandardFilterBuilderClass }; +var FilterClass = /** @class */ (function (_super) { + __extends(FilterClass, _super); + function FilterClass(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.type, type = _c === void 0 ? 'ILIKE' : _c, _d = _b.property, property = _d === void 0 ? 'anyText' : _d, _e = _b.value, value = _e === void 0 ? '' : _e, _f = _b.negated, negated = _f === void 0 ? false : _f, _g = _b.id, id = _g === void 0 ? Math.random().toString() : _g, context = _b.context; + var _this = _super.call(this) || this; + _this.type = type; + _this.property = property; + _this.value = value; + _this.negated = negated; + _this.id = id; + _this.context = context; + return _this; + } + return FilterClass; +}(SpreadOperatorProtectedClass)); +export { FilterClass }; +/** + * determine it is actually an plain object form of the filter builder class + */ +export var shouldBeFilterBuilderClass = function (filter) { + return !isFilterBuilderClass(filter) && filter.filters !== undefined; +}; +/** + *determine it is actually an instantiation of the filter builder class + */ +export var isFilterBuilderClass = function (filter) { + return filter.constructor === FilterBuilderClass; +}; +/** + *determine it is actually an instantiation of the cql standard filter builder class + */ +export var isCQLStandardFilterBuilderClass = function (filter) { + return filter.constructor === CQLStandardFilterBuilderClass; +}; +var BasicDatatypeFilter = /** @class */ (function (_super) { + __extends(BasicDatatypeFilter, _super); + function BasicDatatypeFilter(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.value, value = _c === void 0 ? [] : _c, context = _b.context; + var _this = _super.call(this, { + property: BasicDataTypePropertyName, + value: value, + context: context, + }) || this; + _this.value = value; + return _this; + } + return BasicDatatypeFilter; +}(FilterClass)); +export { BasicDatatypeFilter }; +export var isBasicDatatypeClass = function (filter) { + try { + return (filter === null || filter === void 0 ? void 0 : filter.property) === BasicDataTypePropertyName; + } + catch (err) { + return false; + } +}; +var ResourceSizeFilterClass = /** @class */ (function (_super) { + __extends(ResourceSizeFilterClass, _super); + function ResourceSizeFilterClass(_a) { + var _b = _a.value, value = _b === void 0 ? 0 : _b, _c = _a.context, context = _c === void 0 ? { units: 'B' } : _c, otherProps = __rest(_a, ["value", "context"]); + return _super.call(this, __assign(__assign({}, otherProps), { value: value, context: __assign(__assign({}, context), { units: context.units }) })) || this; + } + return ResourceSizeFilterClass; +}(FilterClass)); +export { ResourceSizeFilterClass }; +var ResourceSizeRangeFilterClass = /** @class */ (function (_super) { + __extends(ResourceSizeRangeFilterClass, _super); + function ResourceSizeRangeFilterClass(_a) { + var _b = _a.value, value = _b === void 0 ? { start: 0, end: 1 } : _b, _c = _a.context, context = _c === void 0 ? { startUnits: 'B', endUnits: 'B' } : _c, otherProps = __rest(_a, ["value", "context"]); + return _super.call(this, __assign(__assign({}, otherProps), { value: value, context: __assign(__assign({}, context), { startUnits: context.startUnits, endUnits: context.endUnits }) })) || this; + } + return ResourceSizeRangeFilterClass; +}(FilterClass)); +export { ResourceSizeRangeFilterClass }; +export var isResourceSizeFilterClass = function (filter) { + var _a, _b; + try { + return ((filter === null || filter === void 0 ? void 0 : filter.value) !== undefined && + typeof (filter === null || filter === void 0 ? void 0 : filter.value) === 'number' && + !isNaN(filter === null || filter === void 0 ? void 0 : filter.value) && + ((_a = filter === null || filter === void 0 ? void 0 : filter.context) === null || _a === void 0 ? void 0 : _a.units) !== undefined && + sizeUnits.includes((_b = filter === null || filter === void 0 ? void 0 : filter.context) === null || _b === void 0 ? void 0 : _b.units)); + } + catch (err) { + return false; + } +}; +export var isResourceSizeRangeFilterClass = function (filter) { + var _a, _b, _c, _d; + try { + return ((filter === null || filter === void 0 ? void 0 : filter.value) !== undefined && + typeof (filter === null || filter === void 0 ? void 0 : filter.value) === 'object' && + typeof (filter === null || filter === void 0 ? void 0 : filter.value.start) === 'number' && + typeof (filter === null || filter === void 0 ? void 0 : filter.value.end) === 'number' && + ((_a = filter === null || filter === void 0 ? void 0 : filter.context) === null || _a === void 0 ? void 0 : _a.startUnits) !== undefined && + ((_b = filter === null || filter === void 0 ? void 0 : filter.context) === null || _b === void 0 ? void 0 : _b.endUnits) !== undefined && + sizeUnits.includes((_c = filter === null || filter === void 0 ? void 0 : filter.context) === null || _c === void 0 ? void 0 : _c.startUnits) && + sizeUnits.includes((_d = filter === null || filter === void 0 ? void 0 : filter.context) === null || _d === void 0 ? void 0 : _d.endUnits)); + } + catch (err) { + return false; + } +}; +export var sizeUnits = [ + 'B', + 'KB', + 'MB', + 'GB', + 'TB', + 'PB', // Petabytes +]; +var convertToBytesFromUnit = function (value, unit) { + var unitIndex = sizeUnits.indexOf(unit); + if (unitIndex === -1) { + return value; // If unit is not recognized, return the original value + } + return value * Math.pow(1000, unitIndex); +}; +// This function rounds down to the nearest whole number in bytes +export var convertResourceSizeFilterClassValueToBytes = function (filter) { + var value = filter.value, context = filter.context; + var unit = (context === null || context === void 0 ? void 0 : context.units) || 'B'; + return Math.floor(convertToBytesFromUnit(value, unit)); +}; +export var convertResourceSizeRangeFilterClassValueToBytes = function (filter) { + var value = filter.value, context = filter.context; + var startUnit = (context === null || context === void 0 ? void 0 : context.startUnits) || 'B'; + var endUnit = (context === null || context === void 0 ? void 0 : context.endUnits) || 'B'; + return { + start: Math.floor(convertToBytesFromUnit(value.start, startUnit)), + end: Math.floor(convertToBytesFromUnit(value.end, endUnit)), + }; +}; +export function convertBytesToHumanReadable(bytes) { + var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; + var unitIndex = 0; + while (bytes >= 1000 && unitIndex < units.length - 1) { + bytes /= 1000; + unitIndex++; + } + return "".concat(bytes.toFixed(2), " ").concat(units[unitIndex]); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLnN0cnVjdHVyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZmlsdGVyLWJ1aWxkZXIvZmlsdGVyLnN0cnVjdHVyZS50c3giXSwibmFtZXMiOltdLCJtYXB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J1RCJywgJ1BCJ11cbiAgbGV0IHVuaXRJbmRleCA9IDBcbiAgd2hpbGUgKGJ5dGVzID49IDEwMDAgJiYgdW5pdEluZGV4IDwgdW5pdHMubGVuZ3RoIC0gMSkge1xuICAgIGJ5dGVzIC89IDEwMDBcbiAgICB1bml0SW5kZXgrK1xuICB9XG4gIHJldHVybiBgJHtieXRlcy50b0ZpeGVkKDIpfSAke3VuaXRzW3VuaXRJbmRleF19YFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/filter.structure.util.d.ts b/src/main/webapp/component/filter-builder/filter.structure.util.d.ts new file mode 100644 index 00000000000..9ccbb64e312 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter.structure.util.d.ts @@ -0,0 +1,35 @@ +import { FilterClass, ValueType } from './filter.structure'; +export declare const isRelativeValue: (value: ValueType) => value is { + last: string; + unit: "s" | "m" | "d" | "y" | "M" | "w" | "h"; +}; +export declare const isAroundValue: (value: ValueType) => value is { + date: string; + buffer: { + amount: string; + unit: "s" | "m" | "d" | "y" | "M" | "w" | "h"; + }; + direction: "both" | "before" | "after"; +}; +export declare const isProximityValue: (value: ValueType) => value is { + first: string; + second: string; + distance: number; +}; +export declare const isDateValue: (value: ValueType) => value is string; +export declare const isBooleanValue: (value: ValueType) => value is boolean; +export declare const isTextValue: (value: ValueType) => value is string; +export declare const isFloatValue: (value: ValueType) => value is number; +export declare const isIntegerValue: (value: ValueType) => value is number; +export declare const isDuringValue: (value: ValueType) => value is { + start: string; + end: string; +}; +export declare const isBetweenValue: (value: ValueType) => value is { + start: number; + end: number; +}; +export declare const isMultivalue: (value: ValueType) => value is string[]; +export declare const isBooleanTextValue: (value: ValueType) => value is import("./filter.structure").BooleanTextType; +export declare const isLocationValue: (value: ValueType) => value is import("./filter.structure").LineLocation | import("./filter.structure").PolygonLocation | import("./filter.structure").PointRadiusLocation; +export declare const isValueEmpty: (filter: FilterClass) => boolean; diff --git a/src/main/webapp/component/filter-builder/filter.structure.util.js b/src/main/webapp/component/filter-builder/filter.structure.util.js new file mode 100644 index 00000000000..bb059a78339 --- /dev/null +++ b/src/main/webapp/component/filter-builder/filter.structure.util.js @@ -0,0 +1,150 @@ +export var isRelativeValue = function (value) { + return (typeof value === 'object' && + value !== null && + 'last' in value && + 'unit' in value && + typeof value.last === 'string' && + ['m', 'h', 'd', 'M', 'y', 's', 'w'].includes(value.unit)); +}; +export var isAroundValue = function (value) { + return (typeof value === 'object' && + value !== null && + 'date' in value && + 'buffer' in value && + 'direction' in value && + typeof value.date === 'string' && + typeof value.buffer === 'object' && + 'amount' in value.buffer && + 'unit' in value.buffer && + typeof value.buffer.amount === 'string' && + ['both', 'before', 'after'].includes(value.direction)); +}; +export var isProximityValue = function (value) { + return (typeof value === 'object' && + value !== null && + 'first' in value && + 'second' in value && + 'distance' in value && + typeof value.first === 'string' && + typeof value.second === 'string' && + typeof value.distance === 'number'); +}; +export var isDateValue = function (value) { + return typeof value === 'string'; +}; +export var isBooleanValue = function (value) { + return typeof value === 'boolean'; +}; +export var isTextValue = function (value) { + return typeof value === 'string'; +}; +export var isFloatValue = function (value) { + return typeof value === 'number'; +}; +export var isIntegerValue = function (value) { + return Number.isInteger(value); +}; +export var isDuringValue = function (value) { + return (typeof value === 'object' && + value !== null && + 'start' in value && + 'end' in value && + typeof value.start === 'string' && + typeof value.end === 'string'); +}; +export var isBetweenValue = function (value) { + return (typeof value === 'object' && + value !== null && + 'start' in value && + 'end' in value && + Number.isInteger(value.start) && + Number.isInteger(value.end)); +}; +export var isMultivalue = function (value) { + return Array.isArray(value) && value.every(function (v) { return typeof v === 'string'; }); +}; +export var isBooleanTextValue = function (value) { + return (typeof value === 'object' && + value !== null && + 'text' in value && + 'cql' in value && + 'error' in value && + typeof value.text === 'string' && + typeof value.cql === 'string' && + typeof value.error === 'boolean'); +}; +export var isLocationValue = function (value) { + return (typeof value === 'object' && + value !== null && + 'type' in value && + (value.type === 'LINE' || + value.type === 'POLYGON' || + value.type === 'POINTRADIUS')); +}; +export var isValueEmpty = function (filter) { + var type = filter.type; + if (type === 'IS NULL') { + return false; // IS NULL is never empty + } + var value = filter.value; + if (value === null || value === undefined || value === '') { + return true; + } + if (isDateValue(value)) { + return value.trim() === ''; + } + if (isBooleanValue(value)) { + return false; // Boolean values can't be "empty" + } + if (isTextValue(value)) { + return value.trim() === ''; + } + if (isFloatValue(value)) { + return isNaN(value); + } + if (isIntegerValue(value)) { + return isNaN(value); + } + if (isDuringValue(value)) { + return value.start.trim() === '' || value.end.trim() === ''; + } + if (isBetweenValue(value)) { + return isNaN(value.start) || isNaN(value.end); + } + if (isMultivalue(value)) { + return value.length === 0 || value.every(function (v) { return v.trim() === ''; }); + } + if (isBooleanTextValue(value)) { + return value.text.trim() === '' || value.cql.trim() === ''; + } + if (isLocationValue(value)) { + if (value.type === 'LINE') { + return value.line.length === 0; + } + else if (value.type === 'POLYGON') { + return value.polygon.length === 0; + } + else if (value.type === 'POINTRADIUS') { + return (isNaN(value.lat) || + isNaN(value.lon) || + isNaN(parseFloat(value.radius.toString()))); + } + } + if (isProximityValue(value)) { + return (value.first.trim() === '' || + value.second.trim() === '' || + isNaN(value.distance)); + } + if (isAroundValue(value)) { + return (value.date.trim() === '' || + isNaN(parseFloat(value.buffer.amount)) || + parseFloat(value.buffer.amount) <= 0); + } + if (isRelativeValue(value)) { + return (value.last.trim() === '' || + isNaN(parseFloat(value.last)) || + parseFloat(value.last) <= 0); + } + return false; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLnN0cnVjdHVyZS51dGlsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9maWx0ZXItYnVpbGRlci9maWx0ZXIuc3RydWN0dXJlLnV0aWwudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sQ0FBQy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dCh2YWx1ZS5sYXN0KSkgfHxcbiAgICAgIHBhcnNlRmxvYXQodmFsdWUubGFzdCkgPD0gMFxuICAgIClcbiAgfVxuXG4gIHJldHVybiBmYWxzZVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/filter-builder/reserved.properties.d.ts b/src/main/webapp/component/filter-builder/reserved.properties.d.ts new file mode 100644 index 00000000000..e010444a6d2 --- /dev/null +++ b/src/main/webapp/component/filter-builder/reserved.properties.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export declare const BasicDataTypePropertyName = "reserved.basic-datatype"; diff --git a/src/main/webapp/component/filter-builder/reserved.properties.js b/src/main/webapp/component/filter-builder/reserved.properties.js new file mode 100644 index 00000000000..8149cdbde5e --- /dev/null +++ b/src/main/webapp/component/filter-builder/reserved.properties.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// keep this file import free to avoid circular dependencies +export var BasicDataTypePropertyName = 'reserved.basic-datatype'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzZXJ2ZWQucHJvcGVydGllcy5qcyIsInNvdXJjZVJ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FsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuLy8ga2VlcCB0aGlzIGZpbGUgaW1wb3J0IGZyZWUgdG8gYXZvaWQgY2lyY3VsYXIgZGVwZW5kZW5jaWVzXG5cbmV4cG9ydCBjb25zdCBCYXNpY0RhdGFUeXBlUHJvcGVydHlOYW1lID0gJ3Jlc2VydmVkLmJhc2ljLWRhdGF0eXBlJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/cross-window-communication.d.ts b/src/main/webapp/component/golden-layout/cross-window-communication.d.ts new file mode 100644 index 00000000000..78f3f53f3da --- /dev/null +++ b/src/main/webapp/component/golden-layout/cross-window-communication.d.ts @@ -0,0 +1,28 @@ +import type { GoldenLayoutViewProps } from './golden-layout.view'; +export declare const GoldenLayoutWindowCommunicationEvents: { + requestInitialState: string; + consumeInitialState: string; + consumeStateChange: string; + consumePreferencesChange: string; + consumeSubwindowLayoutChange: string; + consumeNavigationChange: string; + consumeWreqrEvent: string; +}; +/** + * Overrides navigation functionality within subwindows of golden layout, so that navigation is handled by the main window. + * + * Notice we do this as a component rather than a hook so we can override the same useHistory instance that the visualization is using. + * (we temporarily eject from react to use golden layout, and rewrap each visual in it's own instance of the various providers, like react router) + * + * We could rewrite it as a hook and put it further down in the tree, but this is the same thing so no need. + * + * Also notice we attach this at the visual level for that reason, rather than at the single golden layout instance level. + */ +export declare const UseSubwindowConsumeNavigationChange: ({ goldenLayout, }: { + goldenLayout: any; +}) => null; +export declare const useCrossWindowGoldenLayoutCommunication: ({ goldenLayout, isInitialized, options, }: { + goldenLayout: any; + isInitialized: boolean; + options: GoldenLayoutViewProps; +}) => void; diff --git a/src/main/webapp/component/golden-layout/cross-window-communication.js b/src/main/webapp/component/golden-layout/cross-window-communication.js new file mode 100644 index 00000000000..3688977c492 --- /dev/null +++ b/src/main/webapp/component/golden-layout/cross-window-communication.js @@ -0,0 +1,444 @@ +import { __read } from "tslib"; +import React from 'react'; +import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks'; +import { useHistory } from 'react-router-dom'; +import _cloneDeep from 'lodash.clonedeep'; +import _isEqualWith from 'lodash.isequalwith'; +import { TypedUserInstance } from '../singletons/TypedUser'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import wreqr from '../../js/wreqr'; +import GoldenLayout from 'golden-layout'; +import { getRootColumnContent, rootIsNotAColumn } from './stack-toolbar'; +import { unMaximize } from '../../react-component/visualization-selector/visualization-selector'; +import { v4 as uuid } from 'uuid'; +var windowId = uuid(); +/** + * This function is used to extract the 'gl-window' parameter from the URL that was made by the golden layout library + */ +function getGLWindowParam(urlString) { + // Parse the URL + var url = new URL(urlString); + // Check 'gl-window' in the query string + var searchParams = new URLSearchParams(url.search); + if (searchParams.has('gl-window')) { + return searchParams.get('gl-window'); + } + // Check 'gl-window' in the fragment (hash) + if (url.hash) { + var hash = url.hash.substring(1); // Remove the leading '#' + // If the hash contains a path followed by query parameters + var hashIndex = hash.indexOf('?'); + if (hashIndex !== -1) { + var hashQueryString = hash.substring(hashIndex + 1); + var hashParams = new URLSearchParams(hashQueryString); + if (hashParams.has('gl-window')) { + return hashParams.get('gl-window'); + } + } + else { + // Handle the case where the hash itself is a query string + var hashParams = new URLSearchParams(hash); + if (hashParams.has('gl-window')) { + return hashParams.get('gl-window'); + } + } + } + // Return null if 'gl-window' is not found + return null; +} +/** + * This patches the popout url that golden layout creates so that it goes to the popout specific route, rather than the current route, which can have side effects. + * Notice we have to grab the window param and reattach it. + */ +function patchCreateUrl() { + var oldCreateUrl = GoldenLayout.__lm.controls.BrowserPopout + .prototype._createUrl; + GoldenLayout.__lm.controls.BrowserPopout.prototype._createUrl = + function () { + var oldCreatedUrl = oldCreateUrl.apply(this, arguments); + var glWindowParam = getGLWindowParam(oldCreatedUrl); + // determine if ?gl-window=' or &gl-window=, then redo the first part and tack that part on + var newCreatedUrl = document.location.origin + + document.location.pathname + + '#/_gl_popout?gl-window=' + + glWindowParam; + return newCreatedUrl; + }; +} +patchCreateUrl(); +/** + * The popin function in golden layout has issues, particularly when there is a single stack in the main window at root. + * It also, like many other things in golden layout, doesn't play well with maximize. + * + * This patch detects maximize and removes it (since it doesn't make sense when popping in) + * It also detects if the root is not a column, and if so, makes it a column so that popin works in all cases. + */ +function patchPopinFunction() { + var oldPopin = GoldenLayout.__lm.controls.BrowserPopout.prototype + .popIn; + GoldenLayout.__lm.controls.BrowserPopout.prototype.popIn = + function () { + var goldenLayoutRoot = this._layoutManager.root; + unMaximize(goldenLayoutRoot); + if (rootIsNotAColumn(goldenLayoutRoot)) { + var existingRootContent = getRootColumnContent(goldenLayoutRoot); + goldenLayoutRoot.removeChild(existingRootContent, true); // for some reason removeChild is overly restrictive on type of "thing" so we have to cast + // we need a column for minimize to work, so make a new column and add the existing root to it + var newColumnItem = this._layoutManager._$normalizeContentItem({ + type: 'column', + }); + newColumnItem.addChild(existingRootContent); + goldenLayoutRoot.addChild(newColumnItem); + } + oldPopin.apply(this, arguments); + }; +} +patchPopinFunction(); +export var GoldenLayoutWindowCommunicationEvents = { + requestInitialState: 'requestInitialState', + consumeInitialState: 'consumeInitialState', + consumeStateChange: 'consumeStateChange', + consumePreferencesChange: 'consumePreferencesChange', + consumeSubwindowLayoutChange: 'consumeSubwindowLayoutChange', + consumeNavigationChange: 'consumeNavigationChange', + consumeWreqrEvent: 'consumeWreqrEvent', +}; +var useProvideStateChange = function (_a) { + var goldenLayout = _a.goldenLayout, lazyResults = _a.lazyResults, isInitialized = _a.isInitialized; + React.useEffect(function () { + if (isInitialized && goldenLayout && lazyResults) { + var callback = function () { + goldenLayout.eventHub._childEventSource = null; + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumeStateChange, { + lazyResults: lazyResults, + }); + }; + var filteredResultsSubscription_1 = lazyResults.subscribeTo({ + subscribableThing: 'filteredResults', + callback: callback, + }); + var selectedResultsSubscription_1 = lazyResults.subscribeTo({ + subscribableThing: 'selectedResults', + callback: callback, + }); + var statusSubscription_1 = lazyResults.subscribeTo({ + subscribableThing: 'status', + callback: callback, + }); + var filterTreeSubscription_1 = lazyResults.subscribeTo({ + subscribableThing: 'filterTree', + callback: callback, + }); + return function () { + filteredResultsSubscription_1(); + selectedResultsSubscription_1(); + statusSubscription_1(); + filterTreeSubscription_1(); + }; + } + return function () { }; + }, [lazyResults, lazyResults === null || lazyResults === void 0 ? void 0 : lazyResults.results, isInitialized, goldenLayout]); +}; +var useProvideInitialState = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized, lazyResults = _a.lazyResults; + React.useEffect(function () { + if (isInitialized && + goldenLayout && + lazyResults && + !goldenLayout.isSubWindow) { + var handleInitializeState = function () { + // golden layout doesn't properly clear this flag + goldenLayout.eventHub._childEventSource = null; + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumeInitialState, { + lazyResults: lazyResults, + }); + }; + goldenLayout.eventHub.on(GoldenLayoutWindowCommunicationEvents.requestInitialState, handleInitializeState); + return function () { + try { + goldenLayout.eventHub.off(GoldenLayoutWindowCommunicationEvents.requestInitialState); + } + catch (err) { + console.log(err); + } + }; + } + return function () { }; + }, [isInitialized, goldenLayout, lazyResults, lazyResults === null || lazyResults === void 0 ? void 0 : lazyResults.results]); +}; +var useConsumeInitialState = function (_a) { + var goldenLayout = _a.goldenLayout, lazyResults = _a.lazyResults, isInitialized = _a.isInitialized; + var _b = __read(React.useState(false), 2), hasConsumedInitialState = _b[0], setHasConsumedInitialState = _b[1]; + React.useEffect(function () { + if (isInitialized && + !hasConsumedInitialState && + goldenLayout && + lazyResults && + goldenLayout.isSubWindow) { + var onSyncStateCallback_1 = function (eventData) { + setHasConsumedInitialState(true); + lazyResults.reset({ + filterTree: eventData.lazyResults.filterTree, + results: Object.values(eventData.lazyResults.results).map(function (result) { + return _cloneDeep(result.plain); + }), + highlights: eventData.lazyResults.highlights, + sorts: eventData.lazyResults.persistantSorts, + sources: eventData.lazyResults.sources, + status: eventData.lazyResults.status, + didYouMeanFields: eventData.lazyResults.didYouMeanFields, + showingResultsForFields: eventData.lazyResults.showingResultsForFields, + }); + lazyResults._resetSelectedResults(); + Object.values(eventData.lazyResults.selectedResults).forEach(function (result) { + lazyResults.results[result.plain.id].controlSelect(); + }); + }; + goldenLayout.eventHub.on(GoldenLayoutWindowCommunicationEvents.consumeInitialState, onSyncStateCallback_1); + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.requestInitialState, {}); + return function () { + goldenLayout.eventHub.off(GoldenLayoutWindowCommunicationEvents.consumeInitialState, onSyncStateCallback_1); + }; + } + return function () { }; + }, [goldenLayout, lazyResults, isInitialized]); +}; +var useConsumeStateChange = function (_a) { + var goldenLayout = _a.goldenLayout, lazyResults = _a.lazyResults, isInitialized = _a.isInitialized; + React.useEffect(function () { + if (goldenLayout && lazyResults && isInitialized) { + var onSyncStateCallback_2 = function (eventData) { + var results = Object.values(lazyResults.results).map(function (lazyResult) { + return { + plain: lazyResult.plain, + isSelected: lazyResult.isSelected, + }; + }); + var callbackResults = Object.values(eventData.lazyResults.results).map(function (lazyResult) { + return { + plain: lazyResult.plain, + isSelected: lazyResult.isSelected, + }; + }); + var filterTree = lazyResults.filterTree; + var callbackFilterTree = eventData.lazyResults.filterTree; + if (!_isEqualWith(results, callbackResults) || + !_isEqualWith(filterTree, callbackFilterTree)) { + lazyResults.reset({ + filterTree: eventData.lazyResults.filterTree, + results: Object.values(eventData.lazyResults.results).map(function (result) { return _cloneDeep(result.plain); }), + highlights: eventData.lazyResults.highlights, + sorts: eventData.lazyResults.persistantSorts, + sources: eventData.lazyResults.sources, + status: eventData.lazyResults.status, + didYouMeanFields: eventData.lazyResults.didYouMeanFields, + showingResultsForFields: eventData.lazyResults.showingResultsForFields, + }); + lazyResults._resetSelectedResults(); + Object.values(eventData.lazyResults.selectedResults).forEach(function (result) { + lazyResults.results[result.plain.id].controlSelect(); + }); + } + }; + goldenLayout.eventHub.on(GoldenLayoutWindowCommunicationEvents.consumeStateChange, onSyncStateCallback_2); + return function () { + goldenLayout.eventHub.off(GoldenLayoutWindowCommunicationEvents.consumeStateChange, onSyncStateCallback_2); + }; + } + return function () { }; + }, [goldenLayout, lazyResults, isInitialized]); +}; +var useConsumePreferencesChange = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized; + useListenTo(TypedUserInstance.getPreferences(), 'sync', function () { + if (goldenLayout && isInitialized) { + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumePreferencesChange, { + preferences: TypedUserInstance.getPreferences().toJSON(), + fromWindowId: windowId, + }); + } + }); + React.useEffect(function () { + if (goldenLayout && isInitialized) { + goldenLayout.eventHub.on(GoldenLayoutWindowCommunicationEvents.consumePreferencesChange, function (_a) { + var preferences = _a.preferences, fromWindowId = _a.fromWindowId; + if (windowId !== fromWindowId) { + TypedUserInstance.sync(preferences); + } + }); + return function () { }; + } + return function () { }; + }, [goldenLayout, isInitialized]); +}; +function useConsumeSubwindowLayoutChange(_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized; + React.useEffect(function () { + if (goldenLayout && isInitialized && !goldenLayout.isSubWindow) { + goldenLayout.eventHub.on(GoldenLayoutWindowCommunicationEvents.consumeSubwindowLayoutChange, function () { + goldenLayout.emit('stateChanged', 'subwindow'); + }); + return function () { + goldenLayout.eventHub.off(GoldenLayoutWindowCommunicationEvents.consumeSubwindowLayoutChange); + }; + } + return function () { }; + }, [goldenLayout, isInitialized]); +} +/** + * Notice that we are only forwarding events that start with 'search' for now, as these are drawing events. + */ +var useProvideWreqrEvents = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized; + useListenTo(wreqr.vent, 'all', function (event, args, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.doNotPropagate, doNotPropagate = _c === void 0 ? false : _c; + if (goldenLayout && isInitialized) { + if (event.startsWith('search') && !doNotPropagate) { + goldenLayout.eventHub._childEventSource = null; // golden layout doesn't properly clear this flag + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumeWreqrEvent, { + event: event, + args: args, + }); + } + } + }); +}; +var useConsumeWreqrEvents = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized; + React.useEffect(function () { + if (goldenLayout && isInitialized) { + goldenLayout.eventHub.on(GoldenLayoutWindowCommunicationEvents.consumeWreqrEvent, function (_a) { + var event = _a.event, args = _a.args; + wreqr.vent.trigger(event, args, { doNotPropagate: true }); + }); + return function () { + goldenLayout.eventHub.off(GoldenLayoutWindowCommunicationEvents.consumeWreqrEvent); + }; + } + return function () { }; + }, [goldenLayout, isInitialized]); +}; +/** + * Overrides navigation functionality within subwindows of golden layout, so that navigation is handled by the main window. + * + * Notice we do this as a component rather than a hook so we can override the same useHistory instance that the visualization is using. + * (we temporarily eject from react to use golden layout, and rewrap each visual in it's own instance of the various providers, like react router) + * + * We could rewrite it as a hook and put it further down in the tree, but this is the same thing so no need. + * + * Also notice we attach this at the visual level for that reason, rather than at the single golden layout instance level. + */ +export var UseSubwindowConsumeNavigationChange = function (_a) { + var goldenLayout = _a.goldenLayout; + var history = useHistory(); + React.useEffect(function () { + if (goldenLayout && history && goldenLayout.isSubWindow) { + var callback_1 = function (e) { + var _a, _b; + if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.constructor) === HTMLAnchorElement && + !((_b = e.target) === null || _b === void 0 ? void 0 : _b.href.startsWith('blob'))) { + e.preventDefault(); + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, { + href: e.target.href, + }); + } + }; + document.addEventListener('click', callback_1); + history.replace = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, { + replace: args, + }); + }; + history.push = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, { + push: args, + }); + }; + return function () { + document.removeEventListener('click', callback_1); + }; + } + return function () { }; + }, [history, goldenLayout]); + return null; +}; +/** + * Tells the main window of golden layout to listen for navigation changes in the subwindow. These are translated to be handled by the main window instead. + * Notice we attach this in the single instance of gl, not the individual components like the subwindows who send the event. + */ +var useWindowConsumeNavigationChange = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized; + var history = useHistory(); + React.useEffect(function () { + if (isInitialized && goldenLayout && history && !goldenLayout.isSubWindow) { + var callback_2 = function (params) { + if (params.href && params.href.startsWith('http')) { + // didn't not see a way to handle full urls with react router dom, but location works just as well I think + location = params.href; + } + else if (params.href) { + history.location = params.href; + } + else if (params.replace) { + history.replace.apply(undefined, params.replace); + } + else if (params.push) { + history.push.apply(undefined, params.push); + } + }; + goldenLayout.eventHub.on(GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, callback_2); + return function () { + goldenLayout.eventHub.off(GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, callback_2); + }; + } + return function () { }; + }, [history, goldenLayout, isInitialized]); + return null; +}; +var useListenToGoldenLayoutWindowClosed = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized; + React.useEffect(function () { + if (goldenLayout && isInitialized && !goldenLayout.isSubWindow) { + goldenLayout.on('windowClosed', function (event) { + // order of eventing is a bit off in golden layout, so we need to wait for reconciliation of windows to actually finish + // while gl does emit a stateChanged, it's missing an event, and it's before the popouts reconcile + setTimeout(function () { + goldenLayout.emit('stateChanged', event); + }, 0); + }); + return function () { + goldenLayout.off('windowClosed'); + }; + } + return function () { }; + }, [goldenLayout, isInitialized]); +}; +export var useCrossWindowGoldenLayoutCommunication = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized, options = _a.options; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: options.selectionInterface, + }); + useProvideStateChange({ + goldenLayout: goldenLayout, + lazyResults: lazyResults, + isInitialized: isInitialized, + }); + useProvideInitialState({ goldenLayout: goldenLayout, isInitialized: isInitialized, lazyResults: lazyResults }); + useConsumeInitialState({ goldenLayout: goldenLayout, lazyResults: lazyResults, isInitialized: isInitialized }); + useConsumeStateChange({ goldenLayout: goldenLayout, lazyResults: lazyResults, isInitialized: isInitialized }); + useConsumePreferencesChange({ goldenLayout: goldenLayout, isInitialized: isInitialized }); + useConsumeSubwindowLayoutChange({ goldenLayout: goldenLayout, isInitialized: isInitialized }); + useListenToGoldenLayoutWindowClosed({ goldenLayout: goldenLayout, isInitialized: isInitialized }); + useWindowConsumeNavigationChange({ goldenLayout: goldenLayout, isInitialized: isInitialized }); + useProvideWreqrEvents({ goldenLayout: goldenLayout, isInitialized: isInitialized }); + useConsumeWreqrEvents({ goldenLayout: goldenLayout, isInitialized: isInitialized }); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3Jvc3Mtd2luZG93LWNvbW11bmljYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2dvbGRlbi1sYXlvdXQvY3Jvc3Mtd2luZG93LWNvbW11bmljYXRpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxFQUFFLG9DQUFvQyxFQUFFLE1BQU0sOEJBQThCLENBQUE7QUFHbkYsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQzdDLE9BQU8sVUFBVSxNQUFNLGtCQUFrQixDQUFBO0FBQ3pDLE9BQ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25zdW1lTmF2aWdhdGlvbkNoYW5nZSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgaHJlZjogKGUudGFyZ2V0IGFzIEhUTUxBbmNob3JFbGVtZW50KS5ocmVmLFxuICAgICAgICAgICAgfVxuICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBjYWxsYmFjaylcbiAgICAgIGhpc3RvcnkucmVwbGFjZSA9ICguLi5hcmdzKSA9PiB7XG4gICAgICAgIGdvbGRlbkxheW91dC5ldmVudEh1Yi5lbWl0KFxuICAgICAgICAgIEdvbGRlbkxheW91dFdpbmRvd0NvbW11bmljYXRpb25FdmVudHMuY29uc3VtZU5hdmlnYXRpb25DaGFuZ2UsXG4gICAgICAgICAge1xuICAgICAgICAgICAgcmVwbGFjZTogYXJncyxcbiAgICAgICAgICB9XG4gICAgICAgIClcbiAgICAgIH1cbiAgICAgIGhpc3RvcnkucHVzaCA9ICguLi5hcmdzKSA9PiB7XG4gICAgICAgIGdvbGRlbkxheW91dC5ldmVudEh1Yi5lbWl0KFxuICAgICAgICAgIEdvbGRlbkxheW91dFdpbmRvd0NvbW11bmljYXRpb25FdmVudHMuY29uc3VtZU5hdmlnYXRpb25DaGFuZ2UsXG4gICAgICAgICAge1xuICAgICAgICAgICAgcHVzaDogYXJncyxcbiAgICAgICAgICB9XG4gICAgICAgIClcbiAgICAgIH1cbiAgICAgIHJldHVybiAoKSA9PiB7XG4gICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgY2FsbGJhY2spXG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiAoKSA9PiB7fVxuICB9LCBbaGlzdG9yeSwgZ29sZGVuTGF5b3V0XSlcbiAgcmV0dXJuIG51bGxcbn1cblxuLyoqXG4gKiAgVGVsbHMgdGhlIG1haW4gd2luZG93IG9mIGdvbGRlbiBsYXlv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5MYXlvdXQsIGlzSW5pdGlhbGl6ZWQgfSlcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/golden-layout.d.ts b/src/main/webapp/component/golden-layout/golden-layout.d.ts new file mode 100644 index 00000000000..cef8c6643c5 --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.d.ts @@ -0,0 +1,6 @@ +/// +type Props = { + selectionInterface: any; +}; +export declare const GoldenLayout: ({ selectionInterface }: Props) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/golden-layout/golden-layout.events.d.ts b/src/main/webapp/component/golden-layout/golden-layout.events.d.ts new file mode 100644 index 00000000000..91d8575d64a --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.events.d.ts @@ -0,0 +1,13 @@ +import React from 'react'; +import { LayoutConfig } from './golden-layout.types'; +export declare const goldenLayoutChangeEventName = "golden layout change"; +export type GoldenLayoutChangeEventType = CustomEvent<{ + value: LayoutConfig; + goldenLayout: any; +}>; +export declare const dispatchGoldenLayoutChangeEvent: (target: HTMLElement, detail: GoldenLayoutChangeEventType['detail']) => void; +export declare const useListenToGoldenLayoutChangeEvent: ({ callback, }: { + callback: (e: GoldenLayoutChangeEventType) => void; +}) => { + setElement: React.Dispatch>; +}; diff --git a/src/main/webapp/component/golden-layout/golden-layout.events.js b/src/main/webapp/component/golden-layout/golden-layout.events.js new file mode 100644 index 00000000000..c7ac70b756b --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.events.js @@ -0,0 +1,27 @@ +import { __read } from "tslib"; +import React from 'react'; +export var goldenLayoutChangeEventName = 'golden layout change'; +export var dispatchGoldenLayoutChangeEvent = function (target, detail) { + var customEvent = new CustomEvent(goldenLayoutChangeEventName, { + detail: detail, + bubbles: true, + }); + target.dispatchEvent(customEvent); +}; +export var useListenToGoldenLayoutChangeEvent = function (_a) { + var callback = _a.callback; + var _b = __read(React.useState(null), 2), element = _b[0], setElement = _b[1]; + React.useEffect(function () { + if (element) { + element.addEventListener(goldenLayoutChangeEventName, callback); + return function () { + element.removeEventListener(goldenLayoutChangeEventName, callback); + }; + } + return function () { }; + }, [element, callback]); + return { + setElement: setElement, + }; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ29sZGVuLWxheW91dC5ldmVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2dvbGRlbi1sYXlvdXQvZ29sZGVuLWxheW91dC5ldmVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFHekIsTUFBTSxDQUFDLElBQU0sMkJBQTJCLEdBQUcsc0JBQXNCLENBQUE7QUFPakUsTUFBTSxDQUFDLElBQU0sK0JBQStCLEdBQUcsVUFDN0MsTUFBbUIsRUFDbkIsTUFBNkM7SUFFN0MsSUFBTSxXQUFXLEdBQUcsSUFBSSxXQUFXLENBQUMsMkJBQTJCLEVBQUU7UUFDL0QsTUFBTSxRQUFBO1FBQ04sT0FBTyxFQUFFLElBQUk7S0FDZCxDQUFDLENBQUE7SUFDRixNQUFNLENBQUMsYUFBYSxDQUFDLFdBQVcsQ0FBQyxDQUFBO0FBQ25DLENBQUMsQ0FBQTtBQUVELE1BQU0sQ0FBQyxJQUFNLGtDQUFrQyxHQUFHLFVBQUMsRUFJbEQ7UUFIQyxRQUFRLGNBQUE7SUFJRixJQUFBLEtBQUEsT0FBd0IsS0FBSyxDQUFDLFFBQVEsQ0FBcUIsSUFBSSxDQUFDLElBQUEsRUFBL0QsT0FBTyxRQUFBLEVBQUUsVUFBVSxRQUE0QyxDQUFBO0lBRXRFLEtBQUssQ0FBQyxTQUFTLENBQUM7UUFDZCxJQUFJLE9BQU8sRUFBRTtZQUNYLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQywyQkFBMkIsRU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vbnN0IHVzZUxpc3RlblRvR29sZGVuTGF5b3V0Q2hhbmdlRXZlbnQgPSAoe1xuICBjYWxsYmFjayxcbn06IHtcbiAgY2FsbGJhY2s6IChlOiBHb2xkZW5MYXlvdXRDaGFuZ2VFdmVudFR5cGUpID0+IHZvaWRcbn0pID0+IHtcbiAgY29uc3QgW2VsZW1lbnQsIHNldEVsZW1lbnRdID0gUmVhY3QudXNlU3RhdGU8SFRNTEVsZW1lbnQgfCBudWxsPihudWxsKVxuXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgaWYgKGVsZW1lbnQpIHtcbiAgICAgIGVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihnb2xkZW5MYXlvdXRDaGFuZ2VFdmVudE5hbWUsIGNhbGxiYWNrKVxuICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgZWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKGdvbGRlbkxheW91dENoYW5nZUV2ZW50TmFtZSwgY2FsbGJhY2spXG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiAoKSA9PiB7fVxuICB9LCBbZWxlbWVudCwgY2FsbGJhY2tdKVxuICByZXR1cm4ge1xuICAgIHNldEVsZW1lbnQsXG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/golden-layout.js b/src/main/webapp/component/golden-layout/golden-layout.js new file mode 100644 index 00000000000..9995df3eb04 --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.js @@ -0,0 +1,29 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { useResizableGridContext } from '../resizable-grid/resizable-grid'; +import { GoldenLayoutViewReact } from './golden-layout.view'; +import Grid from '@mui/material/Grid'; +import Paper from '@mui/material/Paper'; +import ResultSelector from '../result-selector/result-selector'; +import { Elevations } from '../theme/theme'; +var useUpdateGoldenLayoutSize = function (_a) { + var goldenLayout = _a.goldenLayout, closed = _a.closed; + React.useEffect(function () { + setTimeout(function () { + if (goldenLayout && goldenLayout.isInitialised) + goldenLayout.updateSize(); + }, 100); + }, [closed, goldenLayout]); +}; +export var GoldenLayout = function (_a) { + var selectionInterface = _a.selectionInterface; + var _b = __read(React.useState(null), 2), goldenLayout = _b[0], setGoldenLayout = _b[1]; + var closed = useResizableGridContext().closed; + useUpdateGoldenLayoutSize({ goldenLayout: goldenLayout, closed: closed }); + return (React.createElement(Grid, { "data-id": "results-container", container: true, direction: "column", className: "w-full h-full", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full relative z-1 pb-2 pt-2 pr-2 shrink-0" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full py-1 px-2 overflow-hidden" }, goldenLayout ? (React.createElement(ResultSelector, { selectionInterface: selectionInterface, model: selectionInterface.getCurrentQuery(), goldenLayout: goldenLayout })) : null)), + React.createElement(Grid, { item: true, className: "w-full h-full overflow-hidden shrink-1 pb-2 pr-2" }, + React.createElement(GoldenLayoutViewReact, { selectionInterface: selectionInterface, configName: "goldenLayout", setGoldenLayout: setGoldenLayout })))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ29sZGVuLWxheW91dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZ29sZGVuLWxheW91dC9nb2xkZW4tbGF5b3V0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sa0NBQWtDLENBQUE7QUFDMUUsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sc0JBQXNCLENBQUE7QUFDNUQsT0FBTyxJQUFJLE1BQU0sb0JBQW9CLENBQUE7QUFDckMsT0FBTyxLQUFLLE1BQU0scUJBQX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LTBcIj5cbiAgICAgICAgPFBhcGVyXG4gICAgICAgICAgZWxldmF0aW9uPXtFbGV2YXRpb25zLnBhbmVsc31cbiAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGwgcHktMSBweC0yIG92ZXJmbG93LWhpZGRlblwiXG4gICAgICAgID5cbiAgICAgICAgICB7Z29sZGVuTGF5b3V0ID8gKFxuICAgICAgICAgICAgPFJlc3VsdFNlbGVjdG9yXG4gICAgICAgICAgICAgIHNlbGVjdGlvbkludGVyZmFjZT17c2VsZWN0aW9uSW50ZXJmYWNlfVxuICAgICAgICAgICAgICBtb2RlbD17c2VsZWN0aW9uSW50ZXJmYWNlLmdldEN1cnJlbnRRdWVyeSgpfVxuICAgICAgICAgICAgICBnb2xkZW5MYXlvdXQ9e2dvbGRlbkxheW91dH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIDwvUGFwZXI+XG4gICAgICA8L0dyaWQ+XG5cbiAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbCBvdmVyZmxvdy1oaWRkZW4gc2hyaW5rLTEgcGItMiBwci0yXCI+XG4gICAgICAgIDxHb2xkZW5MYXlvdXRWaWV3UmVhY3RcbiAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX1cbiAgICAgICAgICBjb25maWdOYW1lPVwiZ29sZGVuTGF5b3V0XCJcbiAgICAgICAgICBzZXRHb2xkZW5MYXlvdXQ9e3NldEdvbGRlbkxheW91dH1cbiAgICAgICAgLz5cbiAgICAgIDwvR3JpZD5cbiAgICA8L0dyaWQ+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.d.ts b/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.d.ts new file mode 100644 index 00000000000..21e1380b5c5 --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.d.ts @@ -0,0 +1,63 @@ +import { GoldenLayoutViewProps } from './golden-layout.view'; +import * as React from 'react'; +import { LayoutConfig } from './golden-layout.types'; +import { ResultType } from '../../js/model/Types'; +/** + * add in missing component state defaults, as we do not create layouts using golden layout all the time and sometimes they have minimal details, + * this will also add a default state to old layouts so they aren't seen as changed unnecessarily on load (we don't fire a change event) + */ +export declare function normalizeLayout(layout: LayoutConfig): LayoutConfig; +export declare function getInstanceConfig({ goldenLayout }: { + goldenLayout: any; +}): LayoutConfig; +export declare function parseResultLayout(layoutResult: ResultType): LayoutConfig; +export declare function getGoldenLayoutConfig({ layoutResult, editLayoutRef, configName, }: GoldenLayoutViewProps): LayoutConfig; +export declare function handleGoldenLayoutStateChange({ options, goldenLayout, currentConfig, lastConfig, }: { + goldenLayout: any; + currentConfig: any; + options: GoldenLayoutViewProps; + lastConfig: React.MutableRefObject; +}): void; +export declare function removeEphemeralStateAndNormalize(config: LayoutConfig): LayoutConfig; +export declare const FALLBACK_GOLDEN_LAYOUT: { + type: string; + content: { + type: string; + componentName: string; + title: string; + }[]; +}[]; +export declare const DEFAULT_GOLDEN_LAYOUT_CONTENT: { + content: import("../../js/model/Startup/startup.types").VisualizationType[] | { + type: string; + content: { + type: string; + componentName: string; + title: string; + }[]; + }[]; +}; +export declare const getStringifiedDefaultLayout: () => string; +export declare function getGoldenLayoutSettings(): { + settings: { + showPopoutIcon: boolean; + popoutWholeStack: boolean; + responsiveMode: string; + }; + dimensions: { + borderWidth: number; + minItemHeight: number; + minItemWidth: number; + headerHeight: number; + dragProxyWidth: number; + dragProxyHeight: number; + }; + labels: { + close: string; + maximise: string; + minimise: string; + popout: string; + popin: string; + tabDropdown: string; + }; +}; diff --git a/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.js b/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.js new file mode 100644 index 00000000000..6250f0f4505 --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.js @@ -0,0 +1,212 @@ +import _merge from 'lodash/merge'; +import _ from 'underscore'; +import wreqr from '../../js/wreqr'; +import user from '../singletons/user-instance'; +import { dispatchGoldenLayoutChangeEvent } from './golden-layout.events'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { HeaderHeight } from './stack-toolbar'; +import { getDefaultComponentState } from '../visualization/settings-helpers'; +function normalizeContent(content) { + if (content.componentState === undefined && content.componentName) { + content.componentState = getDefaultComponentState(content.componentName); + } + if (content.content) { + content.content.forEach(function (subContent) { + normalizeContent(subContent); + }); + } +} +/** + * add in missing component state defaults, as we do not create layouts using golden layout all the time and sometimes they have minimal details, + * this will also add a default state to old layouts so they aren't seen as changed unnecessarily on load (we don't fire a change event) + */ +export function normalizeLayout(layout) { + if (layout.content && layout.content.length > 0) { + layout.content.forEach(function (contentItem) { + normalizeContent(contentItem); + }); + } + if (layout.openPopouts && layout.openPopouts.length > 0) { + layout.openPopouts.forEach(function (popout) { + popout.content.forEach(function (contentItem) { + normalizeContent(contentItem); + }); + }); + } + return layout; +} +export function getInstanceConfig(_a) { + var goldenLayout = _a.goldenLayout; + var currentConfig = goldenLayout.toConfig(); + // tagAsProcessedByGoldenLayout({ config: currentConfig }) + return removeEphemeralStateAndNormalize(currentConfig); +} +export function parseResultLayout(layoutResult) { + var config = undefined; + try { + config = JSON.parse(layoutResult.metacard.properties.layout); + } + catch (err) { + console.warn('issue parsing a saved layout, falling back to default'); + config = DEFAULT_GOLDEN_LAYOUT_CONTENT; + } + _merge(config, getGoldenLayoutSettings()); + return normalizeLayout(config); +} +export function getGoldenLayoutConfig(_a) { + var layoutResult = _a.layoutResult, editLayoutRef = _a.editLayoutRef, configName = _a.configName; + var currentConfig = undefined; + if (layoutResult) { + return parseResultLayout(layoutResult); + } + else if (editLayoutRef) { + currentConfig = editLayoutRef.current; + } + else { + currentConfig = user.get('user').get('preferences').get(configName); + } + if (currentConfig === undefined) { + currentConfig = DEFAULT_GOLDEN_LAYOUT_CONTENT; + } + _merge(currentConfig, getGoldenLayoutSettings()); + return normalizeLayout(currentConfig); +} +export function handleGoldenLayoutStateChange(_a) { + var options = _a.options, goldenLayout = _a.goldenLayout, currentConfig = _a.currentConfig, lastConfig = _a.lastConfig; + var lastConfigValue = removeEphemeralStateAndNormalize(lastConfig.current); + var currentConfigValue = removeEphemeralStateAndNormalize(currentConfig); + if (_.isEqual(lastConfigValue, currentConfigValue)) { + return; + } + dispatchGoldenLayoutChangeEvent(goldenLayout.container[0], { + value: currentConfigValue, + goldenLayout: goldenLayout, + }); + lastConfig.current = currentConfig; + /** + * If we have this option, then we're editing a layout in the layout editor. + * Otherwise, we're using a layout (or possibly custom) and need to take a change as indication of moving to custom. + */ + if (options.editLayoutRef) { + options.editLayoutRef.current = currentConfig; + } + else { + // can technically do detections of max or empty here + //https://github.com/deepstreamIO/golden-layout/issues/253 + if (goldenLayout.isInitialised) { + user.get('user').get('preferences').set(options.configName, currentConfig); + wreqr.vent.trigger('resize'); + //do not add a window resize event, that will cause an endless loop. If you need something like that, listen to the wreqr resize event. + } + user.get('user').get('preferences').set({ + layoutId: 'custom', + }, { + internal: true, + }); + } +} +function removeMaximisedInformation(config) { + delete config.maximisedItemId; +} +function isLayoutConfig(config) { + return config.openPopouts !== undefined; +} +function isPopoutContent(config) { + return config.parentId !== undefined; +} +function removeOpenPopoutDimensionInformation(config) { + var _a; + delete config.dimensions; + if (isLayoutConfig(config) && + config.openPopouts && + ((_a = config.openPopouts) === null || _a === void 0 ? void 0 : _a.length) > 0) { + return _.forEach(config.openPopouts, removeOpenPopoutDimensionInformation); + } +} +function removeSettingsInformation(config) { + delete config.settings; +} +function removeUnusedTopLevelInformation(config) { + delete config.isClosable; + delete config.reorderEnabled; + if (!isLayoutConfig(config) && !isPopoutContent(config)) { + delete config.activeItemIndex; + } + if (config.content !== undefined && config.content.length > 0) { + _.forEach(config.content, removeUnusedTopLevelInformation); + } + if (isLayoutConfig(config) && + config.openPopouts && + config.openPopouts.length > 0) { + _.forEach(config.openPopouts, removeUnusedTopLevelInformation); + } +} +function normalizeOpenPopouts(config) { + if (config.openPopouts === undefined) { + config.openPopouts = []; + } +} +export function removeEphemeralStateAndNormalize(config) { + delete config.title; // only on the top level + removeMaximisedInformation(config); + removeOpenPopoutDimensionInformation(config); + removeSettingsInformation(config); + removeUnusedTopLevelInformation(config); + normalizeOpenPopouts(config); + return config; +} +export var FALLBACK_GOLDEN_LAYOUT = [ + { + type: 'stack', + content: [ + { + type: 'component', + componentName: 'cesium', + title: '3D Map', + }, + { + type: 'component', + componentName: 'inspector', + title: 'Inspector', + }, + ], + }, +]; +export var DEFAULT_GOLDEN_LAYOUT_CONTENT = { + content: StartupDataStore.Configuration.getDefaultLayout() || FALLBACK_GOLDEN_LAYOUT, +}; +export var getStringifiedDefaultLayout = function () { + try { + return JSON.stringify(DEFAULT_GOLDEN_LAYOUT_CONTENT); + } + catch (err) { + console.warn(err); + return JSON.stringify(FALLBACK_GOLDEN_LAYOUT); + } +}; +export function getGoldenLayoutSettings() { + return { + settings: { + showPopoutIcon: false, + popoutWholeStack: true, + responsiveMode: 'none', + }, + dimensions: { + borderWidth: 8, + minItemHeight: HeaderHeight, + minItemWidth: 50, + headerHeight: HeaderHeight, + dragProxyWidth: 300, + dragProxyHeight: 200, + }, + labels: { + close: 'close', + maximise: 'maximize', + minimise: 'minimize', + popout: 'open in new window', + popin: 'pop in', + tabDropdown: 'additional tabs', + }, + }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ29sZGVuLWxheW91dC5sYXlvdXQtY29uZmlnLWhhbmRsaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9nb2xkZW4tbGF5b3V0L2dvbGRlbi1sYXlvdXQubGF5b3V0LWNvbmZpZy1oYW5kbGluZy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6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V2lkdGg6IDgsXG4gICAgICBtaW5JdGVtSGVpZ2h0OiBIZWFkZXJIZWlnaHQsXG4gICAgICBtaW5JdGVtV2lkdGg6IDUwLFxuICAgICAgaGVhZGVySGVpZ2h0OiBIZWFkZXJIZWlnaHQsXG4gICAgICBkcmFnUHJveHlXaWR0aDogMzAwLFxuICAgICAgZHJhZ1Byb3h5SGVpZ2h0OiAyMDAsXG4gICAgfSxcbiAgICBsYWJlbHM6IHtcbiAgICAgIGNsb3NlOiAnY2xvc2UnLFxuICAgICAgbWF4aW1pc2U6ICdtYXhpbWl6ZScsXG4gICAgICBtaW5pbWlzZTogJ21pbmltaXplJyxcbiAgICAgIHBvcG91dDogJ29wZW4gaW4gbmV3IHdpbmRvdycsXG4gICAgICBwb3BpbjogJ3BvcCBpbicsXG4gICAgICB0YWJEcm9wZG93bjogJ2FkZGl0aW9uYWwgdGFicycsXG4gICAgfSxcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/golden-layout.types.d.ts b/src/main/webapp/component/golden-layout/golden-layout.types.d.ts new file mode 100644 index 00000000000..0fb35f679fc --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.types.d.ts @@ -0,0 +1,121 @@ +/** + * Probably some competing locations for where we should put some of these types, like the componentState + */ +import { LayerType } from '../../js/controllers/layers'; +import { ModeType } from '../visualization/results-visual/results-visual'; +interface LabelConfig { + close: string; + maximise: string; + minimise: string; + popout: string; + popin: string; + tabDropdown: string; +} +export interface CesiumStateType { + mapLayers: LayerType[]; +} +export interface OpenlayersStateType { + mapLayers: LayerType[]; +} +interface TimelineState { +} +interface HistogramState { +} +export interface ResultsState { + 'results-mode': ModeType; + 'results-attributesShownTable': string[]; + 'results-attributesShownList': string[]; +} +interface InspectorState { +} +type ComponentState = { + componentName: 'cesium'; + state: CesiumStateType; +} | { + componentName: 'openlayers'; + state: OpenlayersStateType; +} | { + componentName: 'timeline'; + state: TimelineState; +} | { + componentName: 'histogram'; + state: HistogramState; +} | { + componentName: 'results'; + state: ResultsState; +} | { + componentName: 'inspector'; + state: InspectorState; +}; +type ExtractComponentNames = T extends { + componentName: infer U; +} ? U : never; +export type ComponentNameType = ExtractComponentNames; +export interface ContentItem { + type: string; + isClosable?: boolean; + reorderEnabled: boolean; + title: string; + activeItemIndex?: number; + width?: number; + height?: number; + content?: ContentItem[]; + componentName?: ComponentNameType; + icon?: string; + componentState?: ComponentState['state']; + component?: ComponentNameType; + header?: Record; +} +export interface PopoutContent { + content: ContentItem[]; + parentId: string; + indexInParent: number; + dimensions?: PopoutDimensions; + reorderEnabled?: boolean; + isClosable?: boolean; + title?: string; +} +interface LayoutSettings { + hasHeaders: boolean; + constrainDragToContainer: boolean; + reorderEnabled: boolean; + selectionEnabled: boolean; + popoutWholeStack: boolean; + blockedPopoutsThrowError: boolean; + closePopoutsOnUnload: boolean; + showPopoutIcon: boolean; + showMaximiseIcon: boolean; + showCloseIcon: boolean; + responsiveMode: string; + tabOverlapAllowance: number; + reorderOnTabMenuClick: boolean; + tabControlOffset: number; +} +interface LayoutDimensions { + borderWidth: number; + borderGrabWidth: number; + minItemHeight: number; + minItemWidth: number; + headerHeight: number; + dragProxyWidth: number; + dragProxyHeight: number; +} +interface PopoutDimensions { + width: number; + height: number; + left: number; + top: number; +} +export interface LayoutConfig { + labels: LabelConfig; + content: ContentItem[]; + id?: string | string[]; + openPopouts?: PopoutContent[]; + settings?: LayoutSettings; + dimensions?: LayoutDimensions; + reorderEnabled?: boolean; + isClosable?: boolean; + title?: string; + maximisedItemId?: string | null; +} +export {}; diff --git a/src/main/webapp/component/golden-layout/golden-layout.types.js b/src/main/webapp/component/golden-layout/golden-layout.types.js new file mode 100644 index 00000000000..96c5fd4e972 --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ29sZGVuLWxheW91dC50eXBlcy5qcy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ybGFwQWxsb3dhbmNlOiBudW1iZXJcbiAgcmVvcmRlck9uVGFiTWVudUNsaWNrOiBib29sZWFuXG4gIHRhYkNvbnRyb2xPZmZzZXQ6IG51bWJlclxufVxuXG5pbnRlcmZhY2UgTGF5b3V0RGltZW5zaW9ucyB7XG4gIGJvcmRlcldpZHRoOiBudW1iZXJcbiAgYm9yZGVyR3JhYldpZHRoOiBudW1iZXJcbiAgbWluSXRlbUhlaWdodDogbnVtYmVyXG4gIG1pbkl0ZW1XaWR0aDogbnVtYmVyXG4gIGhlYWRlckhlaWdodDogbnVtYmVyXG4gIGRyYWdQcm94eVdpZHRoOiBudW1iZXJcbiAgZHJhZ1Byb3h5SGVpZ2h0OiBudW1iZXJcbn1cblxuaW50ZXJmYWNlIFBvcG91dERpbWVuc2lvbnMge1xuICB3aWR0aDogbnVtYmVyXG4gIGhlaWdodDogbnVtYmVyXG4gIGxlZnQ6IG51bWJlclxuICB0b3A6IG51bWJlclxufVxuXG5leHBvcnQgaW50ZXJmYWNlIExheW91dENvbmZpZyB7XG4gIGxhYmVsczogTGFiZWxDb25maWdcbiAgY29udGVudDogQ29udGVudEl0ZW1bXVxuICBpZD86IHN0cmluZyB8IHN0cmluZ1tdXG4gIG9wZW5Qb3BvdXRzPzogUG9wb3V0Q29udGVudFtdXG4gIHNldHRpbmdzPzogTGF5b3V0U2V0dGluZ3NcbiAgZGltZW5zaW9ucz86IExheW91dERpbWVuc2lvbnNcbiAgcmVvcmRlckVuYWJsZWQ/OiBib29sZWFuXG4gIGlzQ2xvc2FibGU/OiBib29sZWFuXG4gIHRpdGxlPzogc3RyaW5nXG4gIG1heGltaXNlZEl0ZW1JZD86IHN0cmluZyB8IG51bGxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/golden-layout.view.d.ts b/src/main/webapp/component/golden-layout/golden-layout.view.d.ts new file mode 100644 index 00000000000..a8332a30916 --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.view.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +export type GoldenLayoutViewProps = { + layoutResult?: LazyQueryResult['plain']; + editLayoutRef?: React.MutableRefObject; + configName?: string; + selectionInterface: any; + setGoldenLayout: (instance: any) => void; +}; +export declare const GoldenLayoutViewReact: (options: GoldenLayoutViewProps) => JSX.Element; diff --git a/src/main/webapp/component/golden-layout/golden-layout.view.js b/src/main/webapp/component/golden-layout/golden-layout.view.js new file mode 100644 index 00000000000..6a990416ddf --- /dev/null +++ b/src/main/webapp/component/golden-layout/golden-layout.view.js @@ -0,0 +1,418 @@ +import { __assign, __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { createRoot } from 'react-dom/client'; +import _ from 'underscore'; +import _debounce from 'lodash/debounce'; +import $ from 'jquery'; +import wreqr from '../../js/wreqr'; +import GoldenLayout from 'golden-layout'; +import Button from '@mui/material/Button'; +import ExtensionPoints from '../../extension-points/extension-points'; +import { Visualizations } from '../visualization/visualizations'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +import { Dialog, DialogActions, DialogContent, DialogTitle, } from '@mui/material'; +import { StackToolbar, MinimizedHeight } from './stack-toolbar'; +import { GoldenLayoutComponentHeader } from './visual-toolbar'; +import { UseSubwindowConsumeNavigationChange, useCrossWindowGoldenLayoutCommunication, GoldenLayoutWindowCommunicationEvents, } from './cross-window-communication'; +import { useVerifyMapExistsWhenDrawing } from './verify-map'; +import { VisualSettingsProvider } from './visual-settings.provider'; +import { getInstanceConfig } from './golden-layout.layout-config-handling'; +import { getGoldenLayoutConfig } from './golden-layout.layout-config-handling'; +import { handleGoldenLayoutStateChange } from './golden-layout.layout-config-handling'; +import { getGoldenLayoutSettings } from './golden-layout.layout-config-handling'; +/** + * For some reason golden layout removes configs from local storage upon first load of popout window, which means refreshing doesn't work. + * This prevents this line from doing so: https://github.com/golden-layout/golden-layout/blob/v1.5.9/src/js/LayoutManager.js#L797 + */ +import { getDefaultComponentState } from '../visualization/settings-helpers'; +(function preventRemovalFromStorage() { + var normalRemoveItem = window.localStorage.removeItem; + window.localStorage.removeItem = function (key) { + if (key.includes('gl-window')) { + return; + } + else { + normalRemoveItem(key); + } + }; +})(); +/** + * We attach this at the component level due to how popouts work. + * Essentially golden layout disconnects us from React and our providers in popouts to fullscreen visuals, + * so we can't use Dialog further up the tree. + */ +var UseMissingParentWindow = function (_a) { + var goldenLayout = _a.goldenLayout; + var _b = __read(React.useState(false), 2), missingWindow = _b[0], setMissingWindow = _b[1]; + React.useEffect(function () { + if (goldenLayout && goldenLayout.isSubWindow && window.opener === null) { + setMissingWindow(true); + } + }, [goldenLayout]); + if (missingWindow) { + return (React.createElement(Dialog, { open: true, className: " z-[1000000]" }, + React.createElement(DialogTitle, null, "Could not find parent visualization"), + React.createElement(DialogContent, null, "Please close the window."), + React.createElement(DialogActions, null, + React.createElement(Button, { variant: "contained", onClick: function () { + window.close(); + }, color: "primary" }, "Close Window")))); + } + return null; +}; +var GoldenLayoutComponent = function (_a) { + var ComponentView = _a.ComponentView, options = _a.options, container = _a.container, goldenLayout = _a.goldenLayout, componentState = _a.componentState; + var height = useContainerSize(container).height; + var isMinimized = height && height <= MinimizedHeight; + var normalizedComponentState = React.useMemo(function () { + return __assign(__assign({}, getDefaultComponentState(componentState.componentName)), { componentState: componentState }); + }, [componentState]); + return (React.createElement(ExtensionPoints.providers, null, + React.createElement(VisualSettingsProvider, { container: container, goldenLayout: goldenLayout }, + React.createElement(UseSubwindowConsumeNavigationChange, { goldenLayout: goldenLayout }), + React.createElement(UseMissingParentWindow, { goldenLayout: goldenLayout }), + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full ".concat(isMinimized ? 'hidden' : ''), square: true }, + React.createElement(ComponentView, { selectionInterface: options.selectionInterface, componentState: normalizedComponentState }))))); +}; +// see https://github.com/deepstreamIO/golden-layout/issues/239 for details on why the setTimeout is necessary +// The short answer is it mostly has to do with making sure these ComponentViews are able to function normally (set up events, etc.) +function registerComponent(marionetteView, name, ComponentView, componentOptions, viz) { + var options = _.extend({}, marionetteView.options, componentOptions); + marionetteView.goldenLayout.registerComponent(name, function (container, componentState) { + container.on('open', function () { + setTimeout(function () { + var root = createRoot(container.getElement()[0]); + root.render(React.createElement(GoldenLayoutComponent, { goldenLayout: marionetteView.goldenLayout, options: options, ComponentView: ComponentView, container: container, componentState: componentState })); + container.on('destroy', function () { + root.unmount(); + }); + }, 0); + }); + container.on('tab', function (tab) { + tab.closeElement.off('click').on('click', function (event) { + if (tab.header.parent.isMaximised && + tab.header.parent.contentItems.length === 1) { + tab.header.parent.toggleMaximise(); + } + tab._onCloseClickFn(event); + }); + var root = document.createElement('div'); + tab.element.append(root); + var intervalId = setInterval(function () { + try { + var renderRoot_1 = createRoot(tab.element[0]); + renderRoot_1.render(React.createElement(GoldenLayoutComponentHeader, { viz: viz, tab: tab, options: options, componentState: componentState, container: container, name: name })); + tab.header.on('destroy', function () { + renderRoot_1.unmount(); + }); + clearInterval(intervalId); + } + catch (err) { } + }, 100); + }); + }); +} +function registerGoldenLayoutComponents(_a) { + var goldenLayout = _a.goldenLayout, options = _a.options; + Visualizations.forEach(function (viz) { + try { + registerComponent({ goldenLayout: goldenLayout, options: options }, viz.id, viz.view, viz.options, viz); + } + catch (err) { + // likely already registered, in dev + } + }); +} +function handleGoldenLayoutStateChangeInSubwindow(_a) { + var goldenLayout = _a.goldenLayout; + // shouldn't need to send anything, as the main window can determine the config from the subwindow + goldenLayout.eventHub.emit(GoldenLayoutWindowCommunicationEvents.consumeSubwindowLayoutChange, null); +} +/** + * Replace the toolbar with our own + */ +function handleGoldenLayoutStackCreated(stack) { + var intervalId = setInterval(function () { + try { + var renderRoot_2 = createRoot(stack.header.controlsContainer[0]); + renderRoot_2.render(React.createElement(StackToolbar, { stack: stack })); + stack.on('activeContentItemChanged', function (contentItem) { + wreqr.vent.trigger('activeContentItemChanged', contentItem); + }); + stack.on('destroy', function () { + renderRoot_2.unmount(); + }); + clearInterval(intervalId); + } + catch (err) { } + }, 100); +} +function useContainerSize(container) { + var _a = __read(React.useState(container.width), 2), width = _a[0], setWidth = _a[1]; + var _b = __read(React.useState(container.height), 2), height = _b[0], setHeight = _b[1]; + React.useEffect(function () { + if (container) { + var resizeCallback_1 = function () { + setWidth(container.width); + setHeight(container.height); + }; + container.on('resize', resizeCallback_1); + return function () { + container.off('resize', resizeCallback_1); + }; + } + return function () { }; + }, [container]); + return { height: height, width: width }; +} +var useUpdateGoldenLayoutSize = function (_a) { + var wreqr = _a.wreqr, goldenLayout = _a.goldenLayout; + useListenTo(wreqr.vent, 'gl-updateSize', function () { + if (goldenLayout && goldenLayout.isInitialised) + goldenLayout.updateSize(); + }); + React.useEffect(function () { + if (goldenLayout) { + var randomString_1 = Math.random().toString(); + $(window).on('resize.' + randomString_1, _debounce(function () { + if (goldenLayout.isInitialised) + goldenLayout.updateSize(); + }, 100, { + leading: false, + trailing: true, + })); + return function () { + $(window).off('resize.' + randomString_1); + }; + } + return function () { }; + }, [goldenLayout]); +}; +var useSendGoldenLayoutReferenceUpwards = function (_a) { + var options = _a.options, goldenLayout = _a.goldenLayout; + React.useEffect(function () { + if (goldenLayout) { + options.setGoldenLayout(goldenLayout); + } + return function () { + if (goldenLayout) { + goldenLayout.destroy(); + } + }; + }, [goldenLayout]); +}; +var useAttachGoldenLayout = function (_a) { + var goldenLayoutAttachElement = _a.goldenLayoutAttachElement, setGoldenLayout = _a.setGoldenLayout, options = _a.options; + React.useEffect(function () { + if (goldenLayoutAttachElement) { + setGoldenLayout(new GoldenLayout(getGoldenLayoutConfig(options), goldenLayoutAttachElement)); + } + }, [goldenLayoutAttachElement]); +}; +var useRegisterGoldenLayoutComponents = function (_a) { + var options = _a.options, goldenLayout = _a.goldenLayout; + var _b = __read(React.useState(false), 2), finished = _b[0], setFinished = _b[1]; + React.useEffect(function () { + if (goldenLayout) { + registerGoldenLayoutComponents({ + goldenLayout: goldenLayout, + options: options, + }); + setFinished(true); + } + }, [goldenLayout]); + return finished; +}; +var useListenToGoldenLayoutStateChanges = function (_a) { + var options = _a.options, goldenLayout = _a.goldenLayout, lastConfig = _a.lastConfig; + var _b = __read(React.useState(false), 2), finished = _b[0], setFinished = _b[1]; + React.useEffect(function () { + if (goldenLayout) { + var debouncedHandleGoldenLayoutStateChange_1 = _.debounce(function (_a) { + var currentConfig = _a.currentConfig; + ; + wreqr.vent.trigger('resize'); // trigger resize of things like map + if (!goldenLayout.isSubWindow) { + // this function applies only to the main window, we have to communicate subwindow updates back to the original window instead + handleGoldenLayoutStateChange({ + options: options, + currentConfig: currentConfig, + goldenLayout: goldenLayout, + lastConfig: lastConfig, + }); + } + else { + handleGoldenLayoutStateChangeInSubwindow({ goldenLayout: goldenLayout }); + } + }, 200); + /** + * There is a bug in golden layout as follows: + * If you have a layout with 2 items (inspector above inspector for instance), close an item, then close the other, + * the final state change event is not triggered to show content as [] or empty. Oddly enough it works in other scenarios. + * I haven't determined a workaround for this, but it's not bothering users as far as I know at the moment. + * Basically the bug is that empty layouts aren't guaranteed to be saved, but non empty will always save appropriately. + */ + goldenLayout.on('stateChanged', function (event) { + var _a; + if (!event) { + return; + } + var fullyInitialized = goldenLayout.isInitialised && + !((_a = goldenLayout === null || goldenLayout === void 0 ? void 0 : goldenLayout.openPopouts) === null || _a === void 0 ? void 0 : _a.some(function (popout) { return !popout.isInitialised; })); + if (!fullyInitialized) { + setTimeout(function () { + goldenLayout.emit('stateChanged', 'retry'); + }, 200); + return; + } + var currentConfig = getInstanceConfig({ goldenLayout: goldenLayout }); + /** + * Get the config instantly, that way if we navigate away and the component is removed from the document we still get the correct config + * However, delay the actual attempt to save the config, so we don't save too often. + */ + debouncedHandleGoldenLayoutStateChange_1({ + currentConfig: currentConfig, + }); + }); + setFinished(true); + return function () { + goldenLayout.off('stateChanged'); + }; + } + return function () { }; + }, [goldenLayout]); + return finished; +}; +/** + * This will attach our custom toolbar to the golden layout stack header + */ +var useListenToGoldenLayoutStackCreated = function (_a) { + var goldenLayout = _a.goldenLayout; + var _b = __read(React.useState(false), 2), finished = _b[0], setFinished = _b[1]; + React.useEffect(function () { + if (goldenLayout) { + goldenLayout.on('stackCreated', handleGoldenLayoutStackCreated); + setFinished(true); + return function () { + goldenLayout.off('stackCreated'); + }; + } + return function () { }; + }, [goldenLayout]); + return finished; +}; +var useInitGoldenLayout = function (_a) { + var dependencies = _a.dependencies, goldenLayout = _a.goldenLayout; + var _b = __read(React.useState(false), 2), finished = _b[0], setFinished = _b[1]; + var _c = __read(React.useState(false), 2), error = _c[0], setError = _c[1]; + var _d = __read(React.useState('allowed'), 2), popupHandlingState = _d[0], setPopupHandlingState = _d[1]; + React.useEffect(function () { + var _a; + if (dependencies.every(function (dependency) { return dependency; })) { + if (goldenLayout.isSubWindow && window.opener === null) { + setError(true); + } + var onInit_1 = function () { + setFinished(true); + }; + goldenLayout.on('initialised', onInit_1); + if (goldenLayout.isSubWindow) { + // for some reason subwindow stacks lose dimensions, specifically the header height (see _createConfig in golden layout source code) + goldenLayout.config.dimensions = getGoldenLayoutSettings().dimensions; + } + try { + goldenLayout.init(); + } + catch (e) { + if (e.type === 'popoutBlocked') { + setPopupHandlingState('blocked'); + (_a = goldenLayout.openPopouts) === null || _a === void 0 ? void 0 : _a.forEach(function (popout) { + popout.close(); + }); + } + } + return function () { + goldenLayout.off('initialised', onInit_1); + }; + } + return function () { }; + }, __spreadArray(__spreadArray([], __read(dependencies), false), [popupHandlingState], false)); + return { + finished: finished, + error: error, + setPopupHandlingState: setPopupHandlingState, + popupHandlingState: popupHandlingState, + }; +}; +var HandlePopoutsBlocked = function (_a) { + var setPopupHandlingState = _a.setPopupHandlingState, goldenLayout = _a.goldenLayout; + return (React.createElement(Dialog, { open: true }, + React.createElement(DialogTitle, null, "Visualization popups blocked"), + React.createElement(DialogContent, null, "Please allow popups for this site, then click the button below to retry loading your visualization layout."), + React.createElement(DialogActions, null, + React.createElement(Button, { color: "error", onClick: function () { + goldenLayout.config.openPopouts = []; + setPopupHandlingState('proceed'); + } }, "Proceed without popups"), + React.createElement(Button, { variant: "contained", color: "primary", onClick: function () { + // try opening two windows, as one is allowed since the user interacts with the button + var window1 = window.open('', '_blank'); + var window2 = window.open('', '_blank'); + if (window1 && window2) { + setPopupHandlingState('allowed'); + } + window1 === null || window1 === void 0 ? void 0 : window1.close(); + window2 === null || window2 === void 0 ? void 0 : window2.close(); + } }, "Retry")))); +}; +export var GoldenLayoutViewReact = function (options) { + var _a = __read(React.useState(null), 2), goldenLayoutAttachElement = _a[0], setGoldenLayoutAttachElement = _a[1]; + var _b = __read(React.useState(null), 2), goldenLayout = _b[0], setGoldenLayout = _b[1]; + var lastConfig = React.useRef(getGoldenLayoutConfig(options)); + useUpdateGoldenLayoutSize({ wreqr: wreqr, goldenLayout: goldenLayout }); + useSendGoldenLayoutReferenceUpwards({ options: options, goldenLayout: goldenLayout }); + useAttachGoldenLayout({ goldenLayoutAttachElement: goldenLayoutAttachElement, setGoldenLayout: setGoldenLayout, options: options }); + var goldenLayoutComponentsRegistered = useRegisterGoldenLayoutComponents({ + options: options, + goldenLayout: goldenLayout, + }); + var listeningToGoldenLayoutStateChanges = useListenToGoldenLayoutStateChanges({ options: options, goldenLayout: goldenLayout, lastConfig: lastConfig }); + var listeningToGoldenLayoutStackCreated = useListenToGoldenLayoutStackCreated({ goldenLayout: goldenLayout }); + var _c = useInitGoldenLayout({ + dependencies: [ + goldenLayoutComponentsRegistered, + listeningToGoldenLayoutStateChanges, + listeningToGoldenLayoutStackCreated, + ], + goldenLayout: goldenLayout, + }), finished = _c.finished, error = _c.error, setPopupHandlingState = _c.setPopupHandlingState, popupHandlingState = _c.popupHandlingState; + useCrossWindowGoldenLayoutCommunication({ + goldenLayout: goldenLayout, + isInitialized: !error && finished, + options: options, + }); + useVerifyMapExistsWhenDrawing({ + goldenLayout: goldenLayout, + isInitialized: !error && finished, + }); + return (React.createElement("div", { "data-element": "golden-layout", className: "is-minimised h-full w-full" }, + popupHandlingState === 'blocked' ? (React.createElement(HandlePopoutsBlocked, { goldenLayout: goldenLayout, setPopupHandlingState: setPopupHandlingState })) : null, + React.createElement("div", { ref: setGoldenLayoutAttachElement, className: "golden-layout-container w-full h-full" }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ29sZGVuLWxheW91dC52aWV3LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9nb2xkZW4tbGF5b3V0L2dvbGRlbi1sYXlvdXQudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDN0MsT0FBTyxDQUFDLE1BQU0sWUFBWSxDQUFB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bXBvbmVudE9wdGlvbnMpXG4gIG1hcmlvbmV0dGVWaWV3LmdvbGRlbkxheW91dC5yZWdpc3RlckNvbXBvbmVudChcbiAgICBuYW1lLFxuICAgIChjb250YWluZXI6IGFueSwgY29tcG9uZW50U3RhdGU6IGFueSkgPT4ge1xuICAgICAgY29udGFpbmVyLm9uKCdvcGVuJywgKCkgPT4ge1xuICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICBjb25zdCByb290ID0gY3JlYXRlUm9vdChjb250YWluZXIuZ2V0RWxlbWVudCgpWzBdKVxuICAgICAgICAgIHJvb3QucmVuZGVyKFxuICAgICAgICAgICAgPEdvbGRlbkxheW91dENvbXBvbmVudFxuICAgICAgICAgICAgICBnb2xkZW5MYXlvdXQ9e21hcmlvbmV0dGVWaWV3LmdvbGRlbkxheW91dH1cbiAgICAgICAgICAgICAgb3B0aW9ucz17b3B0aW9uc31cbiAgICAgICAgICAgICAgQ29tcG9uZW50Vmlldz17Q29tcG9uZW50Vmlld31cbiAgICAgICAgICAgICAgY29udGFpbmVyPXtjb250YWluZXJ9XG4gICAgICAgICAgICAgIGNvbXBvbmVudFN0YXRlPXtjb21wb25lbnRTdGF0ZX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKVxuICAgICAgICAgIGNvbnRhaW5lci5vbignZGVzdHJveScsICgpID0+IHtcbiAgICAgICAgICAgIHJvb3QudW5tb3VudCgpXG4gICAgICAgICAgfSlcbiAgICAgICAgfSwgMClcbiAgICAgIH0pXG4gICAgICBjb250YWluZXIub24oJ3RhYicsICh0YWI6IGFueSkgPT4ge1xuICAgICAgICB0YWIuY2xvc2VFbGVtZW50Lm9mZignY2xpY2snKS5vbignY2xpY2snLCAoZXZlbnQ6IGFueSkgPT4ge1xuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIHRhYi5oZWFkZXIucGFyZW50LmlzTWF4aW1pc2VkICYmXG4gICAgICAgICAgICB0YWIuaGVhZGVyLnBhcmVudC5jb250ZW50SXRlbXMubGVuZ3RoID09PSAxXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICB0YWIuaGVhZGVyLnBhcmVudC50b2dnbGVNYXhpbWlzZSgpXG4gICAgICAgICAgfVxuICAgICAgICAgIHRhYi5fb25DbG9zZUNsaWNrRm4oZXZlbnQpXG4gICAgICAgIH0pXG4gICAgICAgIGNvbnN0IHJvb3QgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKVxuICAgICAgICB0YWIuZWxlbWVudC5hcHBlbmQocm9vdClcbiAgICAgICAgbGV0IGludGVydmFsSWQgPSBzZXRJbnRlcnZhbCgoKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IHJlbmRlclJvb3QgPSBjcmVhdGVSb290KHRhYi5lbGVtZW50WzBdKVxuICAgICAgICAgICAgcmVuZGVyUm9vdC5yZW5kZXIoXG4gICAgICAgICAgICAgIDxHb2xkZW5MYXlvdXRDb21wb25lbnRIZWFkZXJcbiAgICAgICAgICAgICAgICB2aXo9e3Zpen1cbiAgICAgICAgICAgICAgICB0YWI9e3RhYn1cbiAgICAgICAgICAgICAgICBvcHRpb25zPXtvcHRpb25zfVxuICAgICAgICAgICAgICAgIGNvbXBvbmVudFN0YXRlPXtjb21wb25lbnRTdGF0ZX1cbiAgICAgICAgICAgICAgICBjb250YWluZXI9e2NvbnRhaW5lcn1cbiAgICAgICAgICAgICAgICBuYW1lPXtuYW1lfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgdGFiLmhlYWRlci5vbignZGVzdHJveScsICgpID0+IHtcbiAgICAgICAgICAgICAgcmVuZGVyUm9vdC51bm1vdW50KClcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICBjbGVhckludGVydmFsKGludGVydmFsSWQpXG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7fVxuICAgICAgICB9LCAxMDApXG4gICAgICB9KVxuICAgIH1cbiAg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AgICAgIGNvbnN0IHJhbmRvbVN0cmluZyA9IE1hdGgucmFuZG9tKCkudG9TdHJpbmcoKVxuICAgICAgJCh3aW5kb3cpLm9uKFxuICAgICAgICAncmVzaXplLicgKyByYW5kb21TdHJpbmcsXG4gICAgICAgIF9kZWJvdW5jZShcbiAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICBpZiAoZ29sZGVuTGF5b3V0LmlzSW5pdGlhbGlzZWQpIGdvbGRlbkxheW91dC51cGRhdGVTaXplKClcbiAgICAgICAgICB9LFxuICAgICAgICAgIDEwMCxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBsZWFkaW5nOiBmYWxzZSxcbiAgICAgICAgICAgIHRyYWlsaW5nOiB0cnVlLFxuICAgICAgICAgIH1cbiAgICAgICAgKVxuICAgICAgKVxuICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgJCh3aW5kb3cpLm9mZigncmVzaXplLicgKyByYW5kb21TdHJpbmcpXG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiAoKSA9PiB7fVxuICB9LCBbZ29sZGVuTGF5b3V0XSlcbn1cblxuY29uc3QgdXNlU2VuZEdvbGRlbkxheW91dFJlZmVyZW5jZVVwd2FyZHMgPSAoe1xuICBvcHRpb25zLFxuICBnb2xkZW5MYXlvdXQsXG59OiB7XG4gIGdvbGRlbkxheW91dDogYW55XG4gIG9wdGlvbnM6IEdvbGRlbkxheW91dFZpZXdQcm9wc1xufSkgPT4ge1xuICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xuICAgIGlmIChnb2xkZW5MYXlvdXQpIHtcbiAgICAgIG9wdGlvbnMuc2V0R29sZGVuTGF5b3V0KGdvbGRlbkxheW91dClcbiAgICB9XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIGlmIChnb2xkZW5MYXlvdXQpIHtcbiAgICAgICAgZ29sZGVuTGF5b3V0LmRlc3Ryb3koKVxuICAgICAgfVxuICAgIH1cbiAgfSwgW2dvbGRlbkxhe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c0luaXRpYWxpemVkOiAhZXJyb3IgJiYgZmluaXNoZWQsXG4gICAgb3B0aW9ucyxcbiAgfSlcblxuICB1c2VWZXJpZnlNYXBFeGlzdHNXaGVuRHJhd2luZyh7XG4gICAgZ29sZGVuTGF5b3V0LFxuICAgIGlzSW5pdGlhbGl6ZWQ6ICFlcnJvciAmJiBmaW5pc2hlZCxcbiAgfSlcblxuICByZXR1cm4gKFxuICAgIDxkaXYgZGF0YS1lbGVtZW50PVwiZ29sZGVuLWxheW91dFwiIGNsYXNzTmFtZT1cImlzLW1pbmltaXNlZCBoLWZ1bGwgdy1mdWxsXCI+XG4gICAgICB7cG9wdXBIYW5kbGluZ1N0YXRlID09PSAnYmxvY2tlZCcgPyAoXG4gICAgICAgIDxIYW5kbGVQb3BvdXRzQmxvY2tlZFxuICAgICAgICAgIGdvbGRlbkxheW91dD17Z29sZGVuTGF5b3V0fVxuICAgICAgICAgIHNldFBvcHVwSGFuZGxpbmdTdGF0ZT17c2V0UG9wdXBIYW5kbGluZ1N0YXRlfVxuICAgICAgICAvPlxuICAgICAgKSA6IG51bGx9XG4gICAgICA8ZGl2XG4gICAgICAgIHJlZj17c2V0R29sZGVuTGF5b3V0QXR0YWNoRWxlbWVudH1cbiAgICAgICAgY2xhc3NOYW1lPVwiZ29sZGVuLWxheW91dC1jb250YWluZXIgdy1mdWxsIGgtZnVsbFwiXG4gICAgICAvPlxuICAgIDwvZGl2PlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/selection-ripple.d.ts b/src/main/webapp/component/golden-layout/selection-ripple.d.ts new file mode 100644 index 00000000000..7700766c650 --- /dev/null +++ b/src/main/webapp/component/golden-layout/selection-ripple.d.ts @@ -0,0 +1,5 @@ +/// +declare const _default: ({ selectionInterface, }: { + selectionInterface: any; +}) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/golden-layout/selection-ripple.js b/src/main/webapp/component/golden-layout/selection-ripple.js new file mode 100644 index 00000000000..445ea6b272f --- /dev/null +++ b/src/main/webapp/component/golden-layout/selection-ripple.js @@ -0,0 +1,30 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useLazyResultsSelectedResultsFromSelectionInterface } from '../selection-interface/hooks'; +import { useTheme } from '@mui/material/styles'; +var SelectionRipple = function (_a) { + var selectionInterface = _a.selectionInterface; + var theme = useTheme(); + var selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResultsArray = Object.values(selectedResults); + var _b = __read(React.useState(selectedResultsArray.length !== 0), 2), hasSelection = _b[0], setHasSelection = _b[1]; + React.useEffect(function () { + setHasSelection(selectedResultsArray.length !== 0); + }); + return (React.createElement("div", { className: " w-full h-full absolute z-0 left-0 top-0 transition-transform transform overflow-visible ease-in-out ".concat(hasSelection ? 'duration-1000' : 'duration-0'), style: { + transform: hasSelection + ? 'scale(100) translateX(0%) translateY(0%)' + : 'scale(1) translateX(0%) translateY(0%)', + background: theme.palette.secondary.main, + opacity: hasSelection + ? theme.palette.mode === 'dark' + ? 0.05 + : 0.05 + : 0, + } })); +}; +export default hot(module)(SelectionRipple); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0aW9uLXJpcHBsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZ29sZGVuLWxheW91dC9zZWxlY3Rpb24tcmlwcGxlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxtREFBbUQsRUFBRSxNQUFNLDhCQUE4QixDQUFBO0FBQ2xHLE9BQU8sRU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Agc2V0SGFzU2VsZWN0aW9uKHNlbGVjdGVkUmVzdWx0c0FycmF5Lmxlbmd0aCAhPT0gMClcbiAgfSlcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICBjbGFzc05hbWU9e2Agdy1mdWxsIGgtZnVsbCBhYnNvbHV0ZSB6LTAgbGVmdC0wIHRvcC0wIHRyYW5zaXRpb24tdHJhbnNmb3JtICB0cmFuc2Zvcm0gb3ZlcmZsb3ctdmlzaWJsZSAgZWFzZS1pbi1vdXQgJHtcbiAgICAgICAgaGFzU2VsZWN0aW9uID8gJ2R1cmF0aW9uLTEwMDAnIDogJ2R1cmF0aW9uLTAnXG4gICAgICB9YH1cbiAgICAgIHN0eWxlPXt7XG4gICAgICAgIHRyYW5zZm9ybTogaGFzU2VsZWN0aW9uXG4gICAgICAgICAgPyAnc2NhbGUoMTAwKSB0cmFuc2xhdGVYKDAlKSB0cmFuc2xhdGVZKDAlKSdcbiAgICAgICAgICA6ICdzY2FsZSgxKSB0cmFuc2xhdGVYKDAlKSB0cmFuc2xhdGVZKDAlKScsXG4gICAgICAgIGJhY2tncm91bmQ6IHRoZW1lLnBhbGV0dGUuc2Vjb25kYXJ5Lm1haW4sXG4gICAgICAgIG9wYWNpdHk6IGhhc1NlbGVjdGlvblxuICAgICAgICAgID8gdGhlbWUucGFsZXR0ZS5tb2RlID09PSAnZGFyaydcbiAgICAgICAgICAgID8gMC4wNVxuICAgICAgICAgICAgOiAwLjA1XG4gICAgICAgICAgOiAwLFxuICAgICAgfX1cbiAgICAvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFNlbGVjdGlvblJpcHBsZSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/stack-toolbar.d.ts b/src/main/webapp/component/golden-layout/stack-toolbar.d.ts new file mode 100644 index 00000000000..6f78a9c6e00 --- /dev/null +++ b/src/main/webapp/component/golden-layout/stack-toolbar.d.ts @@ -0,0 +1,36 @@ +/// +import GoldenLayout from 'golden-layout'; +import { TooltipProps } from '@mui/material/Tooltip'; +export declare const HeaderHeight = 32; +export declare const MinimizedHeight: number; +/** + * There's a bit of funkiness with normal tooltip behavior when we click the minimize buttons, as the tooltip sticks behind and flickers. + * This ensures that when the user clicks the button, the tooltip will be hidden. + */ +export declare function CloseOnClickTooltip(props: TooltipProps): JSX.Element; +/** + * This can change, so do not store it in a variable, instead keep around the Root from getRoot and refind the base item as necessary. + * @param stack + * @returns + */ +export declare function getRootColumnContent(stack: GoldenLayout.ContentItem | GoldenLayout.Tab): GoldenLayout.ContentItem | undefined; +export declare function rootIsNotAColumn(goldenLayoutRoot: GoldenLayout.ContentItem): boolean | undefined; +export declare function rootIsEmpty(goldenLayoutRoot: GoldenLayout.ContentItem): boolean; +export declare function getBottomItem(stack: GoldenLayout.Tab & GoldenLayout.ContentItem): GoldenLayout.ContentItem | undefined; +export declare function useStackSize(stack: GoldenLayout.Tab & GoldenLayout.ContentItem): { + height: number | undefined; + width: number | undefined; +}; +export declare function useIsMaximized({ stack, }: { + stack: GoldenLayout.Tab & GoldenLayout.ContentItem; +}): boolean; +export declare function useRoot(stack: GoldenLayout.Tab & GoldenLayout.ContentItem): GoldenLayout.ContentItem | undefined; +export declare function layoutAlreadyHasMinimizedStack({ stack, }: { + stack: GoldenLayout.Tab & GoldenLayout.ContentItem; +}): boolean | undefined; +export declare function adjustStackInMinimizedPlaceIfNecessary({ goldenLayoutRoot, }: { + goldenLayoutRoot: GoldenLayout.ContentItem; +}): void; +export declare const StackToolbar: ({ stack, }: { + stack: GoldenLayout.Tab & GoldenLayout.ContentItem; +}) => JSX.Element; diff --git a/src/main/webapp/component/golden-layout/stack-toolbar.js b/src/main/webapp/component/golden-layout/stack-toolbar.js new file mode 100644 index 00000000000..dc55375d256 --- /dev/null +++ b/src/main/webapp/component/golden-layout/stack-toolbar.js @@ -0,0 +1,303 @@ +import { __assign, __read } from "tslib"; +import React from 'react'; +import MuiTooltip from '@mui/material/Tooltip'; +import FullscreenExitIcon from '@mui/icons-material/FullscreenExit'; +import FullscreenIcon from '@mui/icons-material/Fullscreen'; +import MinimizeIcon from '@mui/icons-material/Minimize'; +import CloseIcon from '@mui/icons-material/Close'; +import PopoutIcon from '@mui/icons-material/OpenInNew'; +import Button from '@mui/material/Button'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +import ExtensionPoints from '../../extension-points/extension-points'; +export var HeaderHeight = 32; +export var MinimizedHeight = HeaderHeight + 5; +/** + * There's a bit of funkiness with normal tooltip behavior when we click the minimize buttons, as the tooltip sticks behind and flickers. + * This ensures that when the user clicks the button, the tooltip will be hidden. + */ +export function CloseOnClickTooltip(props) { + var _a = __read(React.useState(false), 2), show = _a[0], setShow = _a[1]; + return (React.createElement(MuiTooltip, __assign({ open: show, disableHoverListener: true, onMouseEnter: function () { return setShow(true); }, onMouseLeave: function () { return setShow(false); }, onMouseDown: function () { return setShow(false); } }, props))); +} +/** + * This can change, so do not store it in a variable, instead keep around the Root from getRoot and refind the base item as necessary. + * @param stack + * @returns + */ +export function getRootColumnContent(stack) { + var root = getRoot(stack); + if (root) { + return root.contentItems[0]; + } + return undefined; +} +function getStackInMinimizedLocation(_a) { + var goldenLayoutRoot = _a.goldenLayoutRoot; + var rootColumnContent = getRootColumnContent(goldenLayoutRoot); + if (rootColumnContent) { + return rootColumnContent.contentItems[rootColumnContent.contentItems.length - 1].getActiveContentItem().container; + } + return undefined; +} +export function rootIsNotAColumn(goldenLayoutRoot) { + var _a; + return (getRootColumnContent(goldenLayoutRoot) && + !((_a = getRootColumnContent(goldenLayoutRoot)) === null || _a === void 0 ? void 0 : _a.isColumn)); +} +export function rootIsEmpty(goldenLayoutRoot) { + return !getRootColumnContent(goldenLayoutRoot); +} +// to avoid fixing types everywhere, let's make a function +function getStackHeight(_a) { + var stack = _a.stack; + return stack.element.height(); +} +export function getBottomItem(stack) { + var rootColumnContent = getRootColumnContent(stack); + if (rootColumnContent) { + return rootColumnContent.contentItems[rootColumnContent.contentItems.length - 1]; + } + return undefined; +} +export function useStackSize(stack) { + if (stack.titleElement) { + stack = stack.contentItem.parent; // this is a tab, so find the stack related to the tab + } + var _a = __read(React.useState(stack.header.element.width()), 2), width = _a[0], setWidth = _a[1]; + var _b = __read(React.useState(getStackHeight({ stack: stack })), 2), height = _b[0], setHeight = _b[1]; + React.useEffect(function () { + if (stack) { + var resizeCallback_1 = function () { + setWidth(stack.header.element.width()); + setHeight(getStackHeight({ stack: stack })); + }; + stack.on('resize', resizeCallback_1); + return function () { + stack.off('resize', resizeCallback_1); + }; + } + return function () { }; + }, [stack]); + return { height: height, width: width }; +} +export function useIsMaximized(_a) { + var stack = _a.stack; + var _b = __read(React.useState(false), 2), isMaximized = _b[0], setIsMaximized = _b[1]; + React.useEffect(function () { + var maximizedCallback = function () { + setIsMaximized(true); + }; + stack.on('maximised', maximizedCallback); + var minimizedCallback = function () { + setIsMaximized(false); + }; + stack.on('minimised', minimizedCallback); + return function () { + stack.off('maximised', maximizedCallback); + stack.off('minimised', minimizedCallback); + }; + }, [stack]); + React.useEffect(function () { + setIsMaximized(stack.isMaximised); + }, [stack]); + return isMaximized; +} +/** + * Will return a safe, unchanging reference, feel free to keep in a variable + * @param stack + * @returns + */ +function getRoot(stack) { + if (!stack) { + return undefined; + } + var stackAsContentItem = stack; + if (stackAsContentItem === null || stackAsContentItem === void 0 ? void 0 : stackAsContentItem.isRoot) { + return stackAsContentItem; + } + var parent = stackAsContentItem.parent; + if ((parent === null || parent === void 0 ? void 0 : parent.type) === 'root') { + return parent; + } + else { + return getRoot(parent); + } +} +export function useRoot(stack) { + var _a = __read(React.useState(getRoot(stack)), 2), root = _a[0], setRoot = _a[1]; + React.useEffect(function () { + setRoot(getRoot(stack)); + }, [stack]); + return root; +} +// by ready, we mean the stack to be minimized is already on the bottom of a column layout => aka we can just resize it +function layoutIsAlreadyReady(_a) { + var _b, _c, _d; + var stack = _a.stack; + var bottomItem = getBottomItem(stack); + var isBottomItem = stack === bottomItem; + return ((isBottomItem && ((_b = getRootColumnContent(stack)) === null || _b === void 0 ? void 0 : _b.isColumn)) || + (!((_c = getRootColumnContent(stack)) === null || _c === void 0 ? void 0 : _c.isColumn) && + !((_d = getRootColumnContent(stack)) === null || _d === void 0 ? void 0 : _d.isRow))); +} +// check if a minimized stack already exists +export function layoutAlreadyHasMinimizedStack(_a) { + var _b; + var stack = _a.stack; + var bottomItem = getBottomItem(stack); + return (((_b = getRootColumnContent(stack)) === null || _b === void 0 ? void 0 : _b.isColumn) && + bottomItem.pixelHeight <= MinimizedHeight); +} +// add the stack to the existing minimized stack +function addStackToExistingMinimizedStack(_a) { + var stack = _a.stack; + var bottomItem = getBottomItem(stack); + if (bottomItem) { + stack.contentItems.slice().forEach(function (thing) { + stack.removeChild(thing, true); // for some reason removeChild is overly restrictive on type of "thing" so we have to cast + bottomItem.addChild(thing, undefined); + }); + } +} +// we have to move each item individually because golden layout doesn't support moving an entire stack, and addChild does not work as documentation says (it doesn't remove the existing automatically) +function createNewStackFromExistingStack(_a) { + var stack = _a.stack; + var existingItems = stack.contentItems.slice(); + var newStackItem = stack.layoutManager._$normalizeContentItem({ + type: 'stack', + }); + existingItems.forEach(function (thing) { + stack.removeChild(thing, true); // for some reason removeChild is overly restrictive on type of "thing" so we have to cast + newStackItem.addChild(thing, undefined); + }); + return newStackItem; +} +// create a new minimized stack and add the stack to it +function createAndAddNewMinimizedStack(_a) { + var _b; + var stack = _a.stack, goldenLayoutRoot = _a.goldenLayoutRoot; + var newStackItem = createNewStackFromExistingStack({ stack: stack }); + if (rootIsNotAColumn(goldenLayoutRoot)) { + var existingRootContent = getRootColumnContent(goldenLayoutRoot); + goldenLayoutRoot.removeChild(existingRootContent, true); // for some reason removeChild is overly restrictive on type of "thing" so we have to cast + // we need a column for minimize to work, so make a new column and add the existing root to it + var newColumnItem = stack.layoutManager._$normalizeContentItem({ + type: 'column', + }); + newColumnItem.addChild(existingRootContent); + newColumnItem.addChild(newStackItem); + goldenLayoutRoot.addChild(newColumnItem); + } + else if (rootIsEmpty(goldenLayoutRoot)) { + var newColumnItem = stack.layoutManager._$normalizeContentItem({ + type: 'column', + }); + newColumnItem.addChild(newStackItem); + goldenLayoutRoot.addChild(newColumnItem); + } + else { + (_b = getRootColumnContent(goldenLayoutRoot)) === null || _b === void 0 ? void 0 : _b.addChild(newStackItem); + } +} +// the true height of the stack - the golden layout implementation at the moment only tracks the height of the visual within the stack, not the stack itself +function getTrueHeight(_a) { + var _b; + var goldenLayoutRoot = _a.goldenLayoutRoot; + return ((_b = getStackInMinimizedLocation({ goldenLayoutRoot: goldenLayoutRoot })) === null || _b === void 0 ? void 0 : _b.parent.parent.element).height(); +} +export function adjustStackInMinimizedPlaceIfNecessary(_a) { + var _b; + var goldenLayoutRoot = _a.goldenLayoutRoot; + if ((_b = getRootColumnContent(goldenLayoutRoot)) === null || _b === void 0 ? void 0 : _b.isColumn) { + var trueHeight = getTrueHeight({ goldenLayoutRoot: goldenLayoutRoot }); + var minimizedStack = getStackInMinimizedLocation({ goldenLayoutRoot: goldenLayoutRoot }); + if (minimizedStack) { + minimizedStack.height = trueHeight || minimizedStack.height; // otherwise setSize will not work correctly! - this allows us to consistently and always set the height to what we want! + minimizedStack.setSize(10, HeaderHeight); + } + } +} +// keep track of pixel height on each stack, which allows us to detect when a stack is "minimized" later on +function usePixelHeightTracking(stack, height) { + React.useEffect(function () { + if (stack) { + ; + stack.pixelHeight = height; + } + }, [height, stack]); + var goldenLayoutRoot = useRoot(stack); + var minimizeCallback = React.useCallback(function () { + if (!goldenLayoutRoot) { + return; + } + if (layoutIsAlreadyReady({ stack: stack })) { + // do nothing? just resize to be minimized + } + else if (layoutAlreadyHasMinimizedStack({ stack: stack })) { + // minimized area exists, add this to it + addStackToExistingMinimizedStack({ stack: stack }); + } + else { + // rearrange layout if necessary and move the stack + createAndAddNewMinimizedStack({ stack: stack, goldenLayoutRoot: goldenLayoutRoot }); + } + adjustStackInMinimizedPlaceIfNecessary({ goldenLayoutRoot: goldenLayoutRoot }); + }, [stack, goldenLayoutRoot]); + return { minimizeCallback: minimizeCallback }; +} +function useCanBeMinimized(_a) { + var stack = _a.stack, height = _a.height, width = _a.width; + var _b = __read(React.useState(true), 2), canBeMinimized = _b[0], setCanBeMinimized = _b[1]; + React.useEffect(function () { + var rootContent = getRootColumnContent(stack); + if (rootContent === null || rootContent === void 0 ? void 0 : rootContent.isStack) { + setCanBeMinimized(false); + } + else { + setCanBeMinimized(true); + } + }, [stack, height, width]); + return canBeMinimized; +} +export var StackToolbar = function (_a) { + var stack = _a.stack; + var isMaximized = useIsMaximized({ stack: stack }); + var _b = useStackSize(stack), height = _b.height, width = _b.width; + var minimizeCallback = usePixelHeightTracking(stack, height).minimizeCallback; + var canBeMinimized = useCanBeMinimized({ stack: stack, width: width, height: height }); + var isMinimized = height && height <= MinimizedHeight; + return (React.createElement(ExtensionPoints.providers, null, + React.createElement("div", { className: "flex flex-row flex-nowrap items-center" }, + React.createElement(React.Fragment, null, + isMaximized || isMinimized || !canBeMinimized ? (React.createElement(React.Fragment, null)) : (React.createElement("div", null, + React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Minimize stack of visuals to bottom of layout") }, + React.createElement(Button, { "data-id": "minimise-layout-button", onClick: minimizeCallback }, + React.createElement(MinimizeIcon, { fontSize: "small" }))))), + isMaximized ? (React.createElement("div", null, + React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Restore stack of visuals to original size") }, + React.createElement(Button, { "data-id": "unmaximise-layout-button", onClick: function () { + stack.toggleMaximise(); + } }, + React.createElement(FullscreenExitIcon, { fontSize: "small" }))))) : (React.createElement("div", null, + React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Maximize stack of visuals") }, + React.createElement(Button, { "data-id": "maximise-layout-button", onClick: function () { + stack.toggleMaximise(); + } }, + React.createElement(FullscreenIcon, { fontSize: "small" }))))), + stack.layoutManager.isSubWindow ? null : (React.createElement("div", null, + React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Open stack of visuals in new window") }, + React.createElement(Button, { "data-id": "popout-layout-button", onClick: function () { + stack.popout(); + } }, + React.createElement(PopoutIcon, { fontSize: "small" }))))), + React.createElement("div", null, stack.header._isClosable() ? (React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Close stack of visuals") }, + React.createElement(Button, { "data-id": "close-layout-button", onClick: function () { + if (stack.isMaximised) { + stack.toggleMaximise(); + } + stack.remove(); + } }, + React.createElement(CloseIcon, { fontSize: "small" })))) : null))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhY2stdG9vbGJhci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZ29sZGVuLWxheW91dC9zdGFjay10b29sYmFyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sVUFBNEIsTUFBTSx1QkFBdUIsQ0FBQTtBQUNoRSxPQUFPLGtCQUFrQixNQUFNLG9DQUFvQyxDQUFBO0FBQ25FLE9BQU8sY0FBYyxNQUFNLGdDQUFnQyxDQUFBO0FBQzNELE9BQU8sWUFBWSxNQUFNLDhCQUE4QixDQUFBO0FBQ3ZELE9BQU8sU0FBUyxNQUFNLDJCQUEyQixDQUFBO0FBQ2pELE9BQU8sVUFBVSxNQUFNLCtCQUErQixDQUFBO0FBRXRELE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sS0FBSyxNQUFNLHFCQUFxQixDQUFBO0FBQ3ZDL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IHVuZGVmaW5lZFxufVxuXG5mdW5jdGlvbiBnZXRTdGFja0luTWluaW1pemVkTG9jYXRpb24oe1xuICBnb2xkZW5MYXlvdXRSb290LFxufToge1xuICBnb2xkZW5MYXlvdXRSb290OiBHb2xkZW5MYXlvdXQuQ29udGVudEl0ZW1cbn0pOiBHb2xkZW5MYXlvdXQuQ29udGFpbmVyIHwgdW5kZWZpbmVkIHtcbiAgY29uc3Qgcm9vdENvbHVtbkNvbnRlbnQgPSBnZXRSb290Q29sdW1uQ29udGVudChnb2xkZW5MYXlvdXRSb290KVxuICBpZiAocm9vdENvbHVtbkNvbnRlbnQpIHtcbiAgICByZXR1cm4gKFxuICAgICAgcm9vdENvbHVtbkNvbnRlbnQuY29udGVudEl0ZW1zW1xuICAgICAgICByb290Q29sdW1uQ29udGVudC5jb250ZW50SXRlbXMubGVuZ3RoIC0gMVxuICAgICAgXS5nZXRBY3RpdmVDb250ZW50SXRlbSgpIGFzIGFueVxuICAgICkuY29udGFpbmVyIGFzIEdvbGRlbkxheW91dC5Db250YWluZXJcbiAgfVxuICByZXR1cm4gdW5kZWZpbmVkXG59XG5cbmV4cG9ydCBmdW5jdGlvbiByb290SXNOb3RBQ29sdW1uKGdvbGRlbkxheW91dFJvb3Q6IEdvbGRlbkxheW91dC5Db250ZW50SXRlbSkge1xuICByZXR1cm4gKFxuICAgIGdldFJvb3RDb2x1bW5Db250ZW50KGdvbGRlbkxheW91dFJvb3QpICYmXG4gICAgIWdldFJvb3RDb2x1bW5Db250ZW50KGdvbGRlbkxheW91dFJvb3QpPy5pc0NvbHVtblxuICApXG59XG5cbmV4cG9ydCBmdW5jdGlvbiByb290SXNFbXB0eShnb2xkZW5MYXlvdXRSb290OiBHb2xkZW5MYXlvdXQuQ29udGVudEl0ZW0pIHtcbiAgcmV0dXJuICFnZXRSb290Q29sdW1uQ29udGVudChnb2xkZW5MYXlvdXRSb290KVxufVxuXG4vLyB0byBhdm9pZCBmaXhpbmcgdHlwZXMgZXZlcnl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aHRUcmFja2luZyhzdGFjaywgaGVpZ2h0KVxuICBjb25zdCBjYW5CZU1pbmltaXplZCA9IHVzZUNhbkJlTWluaW1pemVkKHsgc3RhY2ssIHdpZHRoLCBoZWlnaHQgfSlcbiAgY29uc3QgaXNNaW5pbWl6ZWQgPSBoZWlnaHQgJiYgaGVpZ2h0IDw9IE1pbmltaXplZEhlaWdodFxuICByZXR1cm4gKFxuICAgIDxFeHRlbnNpb25Qb2ludHMucHJvdmlkZXJzPlxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtcm93IGZsZXgtbm93cmFwIGl0ZW1zLWNlbnRlclwiPlxuICAgICAgICA8PlxuICAgICAgICAgIHtpc01heGltaXplZCB8fCBpc01pbmltaXplZCB8fCAhY2FuQmVNaW5pbWl6ZWQgPyAoXG4gICAgICAgICAgICA8PjwvPlxuICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICA8Q2xvc2VPbkNsaWNrVG9vbHRpcFxuICAgICAgICAgICAgICAgIHRpdGxlPXtcbiAgICAgICAgICAgICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMub3ZlcmxheXN9IGNsYXNzTmFtZT1cInAtMVwiPlxuICAgICAgICAgICAgICAgICAgICBNaW5pbWl6ZSBzdGFjayBvZiB2aXN1YWxzIHRvIGJvdHRvbSBvZiBsYXlvdXRcbiAgICAgICAgICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgZGF0YS1pZD1cIm1pbmltaXNlLWxheW91dC1idXR0b25cIlxuICAgICAgICAgICAgICAgICAgb25DbGljaz17bWluaW1pemVDYWxsYmFja31cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICA8TWluaW1pemVJY29uIGZvbnRTaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgICA8L0Nsb3NlT25DbGlja1Rvb2x0aXA+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICApfVxuICAgICAgICAgIHtpc01heGltaXplZCA/IChcbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIDxDbG9zZU9uQ2xpY2tUb29sdGlwXG4gICAgICAgICAgICAgICAgdGl0bGU9e1xuICAgICAgICAgICAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30gY2xhc3NOYW1lPVwicC0xXCI+XG4gICAgICAgICAgICAgICAgICAgIFJlc3RvcmUgc3RhY2sgb2YgdmlzdWFscyB0byBvcmlnaW5hbCBzaXplXG4gICAgICAgICAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJ1bm1heGltaXNlLWxheW91dC1idXR0b25cIlxuICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay50b2dnbGVNYXhpbWlzZSgpXG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxGdWxsc2NyZWVuRXhpdEljb24gZm9udFNpemU9XCJzbWFsbFwiIC8+XG4gICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgIDwvQ2xvc2VPbkNsaWNrVG9vbHRpcD5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICA8Q2xvc2VPbkNsaWNrVG9vbHRpcFxuICAgICAgICAgICAgICAgIHRpdGxlPXtcbiAgICAgICAgICAgICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMub3ZlcmxheXN9IGNsYXNzTmFtZT1cInAtMVwiPlxuICAgICAgICAgICAgICAgICAgICBNYXhpbWl6ZSBzdGFjayBvZiB2aXN1YWxzXG4gICAgICAgICAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJtYXhpbWlzZS1sYXlvdXQtYnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sudG9nZ2xlTWF4aW1pc2UoKVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICA8RnVsbHNjcmVlbkljb24gZm9udFNpemU9XCJzbWFsbFwiIC8+XG4gICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgIDwvQ2xvc2VPbkNsaWNrVG9vbHRpcD5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICl9XG5cbiAgICAgICAgICB7c3RhY2subGF5b3V0TWFuYWdlci5pc1N1YldpbmRvdyA/IG51bGwgOiAoXG4gICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICA8Q2xvc2VPbkNsaWNrVG9vbHRpcFxuICAgICAgICAgICAgICAgIHRpdGxlPXtcbiAgICAgICAgICAgICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMub3ZlcmxheXN9IGNsYXNzTmFtZT1cInAtMVwiPlxuICAgICAgICAgICAgICAgICAgICBPcGVuIHN0YWNrIG9mIHZpc3VhbHMgaW4gbmV3IHdpbmRvd1xuICAgICAgICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICBkYXRhLWlkPVwicG9wb3V0LWxheW91dC1idXR0b25cIlxuICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5wb3BvdXQoKVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICA8UG9wb3V0SWNvbiBmb250U2l6ZT1cInNtYWxsXCIgLz5cbiAgICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgPC9DbG9zZU9uQ2xpY2tUb29sdGlwPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgKX1cblxuICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICB7KHN0YWNrLmhlYWRlciBhcyBhbnkpLl9pc0Nsb3NhYmxlKCkgPyAoXG4gICAgICAgICAgICAgIDxDbG9zZU9uQ2xpY2tUb29sdGlwXG4gICAgICAgICAgICAgICAgdGl0bGU9e1xuICAgICAgICAgICAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30gY2xhc3NOYW1lPVwicC0xXCI+XG4gICAgICAgICAgICAgICAgICAgIENsb3NlIHN0YWNrIG9mIHZpc3VhbHNcbiAgICAgICAgICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgZGF0YS1pZD1cImNsb3NlLWxheW91dC1idXR0b25cIlxuICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhY2suaXNNYXhpbWlzZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzdGFjay50b2dnbGVNYXhpbWlzZSgpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc3RhY2sucmVtb3ZlKClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPENsb3NlSWNvbiBmb250U2l6ZT1cInNtYWxsXCIgLz5cbiAgICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgPC9DbG9zZU9uQ2xpY2tUb29sdGlwPlxuICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvPlxuICAgICAgPC9kaXY+XG4gICAgPC9FeHRlbnNpb25Qb2ludHMucHJvdmlkZXJzPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/verify-map.d.ts b/src/main/webapp/component/golden-layout/verify-map.d.ts new file mode 100644 index 00000000000..adf4a754da1 --- /dev/null +++ b/src/main/webapp/component/golden-layout/verify-map.d.ts @@ -0,0 +1,7 @@ +/** + * Notice that we are only forwarding events that start with 'search' for now, as these are drawing events. + */ +export declare const useVerifyMapExistsWhenDrawing: ({ goldenLayout, isInitialized, }: { + goldenLayout: any; + isInitialized: boolean; +}) => void; diff --git a/src/main/webapp/component/golden-layout/verify-map.js b/src/main/webapp/component/golden-layout/verify-map.js new file mode 100644 index 00000000000..f4eb86a2886 --- /dev/null +++ b/src/main/webapp/component/golden-layout/verify-map.js @@ -0,0 +1,71 @@ +import { __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import wreqr from '../../js/wreqr'; +import { Visualizations } from '../visualization/visualizations'; +function findMap(item) { + return item.componentName === 'openlayers' || item.componentName === 'cesium'; +} +function searchPopouts(popouts) { + var popoutItems = []; + popouts.forEach(function (popout) { + popoutItems.push.apply(popoutItems, __spreadArray([], __read(popout.getGlInstance().root.getItemsByFilter(findMap)), false)); + }); + return popoutItems; +} +/** + * Notice that we are only forwarding events that start with 'search' for now, as these are drawing events. + */ +export var useVerifyMapExistsWhenDrawing = function (_a) { + var goldenLayout = _a.goldenLayout, isInitialized = _a.isInitialized; + useListenTo(wreqr.vent, 'search:drawline search:drawpoly search:drawbbox search:drawcircle', function () { + if (goldenLayout && isInitialized) { + // // Launch the 2D Map (openlayers) if it's not already open + var contentItems = goldenLayout.root.getItemsByFilter(findMap); + var popoutItems = searchPopouts(goldenLayout.openPopouts); + if (contentItems.length === 0 && popoutItems.length === 0) { + var configs = Visualizations.reduce(function (cfg, viz) { + // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosable' does not exist on type 'Visu... Remove this comment to see the full error message + var id = viz.id, title = viz.title, icon = viz.icon, _a = viz.isClosable, isClosable = _a === void 0 ? true : _a; + cfg[id] = { + title: title, + type: 'component', + componentName: id, + icon: icon, + componentState: {}, + isClosable: isClosable, + }; + return cfg; + }, {}); + if (goldenLayout.root.contentItems.length === 0) { + goldenLayout.root.addChild({ + type: 'column', + content: [configs['openlayers']], + }); + } + else { + if (goldenLayout.root.contentItems[0].isColumn) { + goldenLayout.root.contentItems[0].contentItems[0].addChild(configs['openlayers'], 0); + } + else { + goldenLayout.root.contentItems[0].addChild(configs['openlayers'], 0); + } + } + } + } + }); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyaWZ5LW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvZ29sZGVuLWxheW91dC92ZXJpZnktbWFwLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmd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SA9PiB7XG4gICAgICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoMjMzOSkgRklYTUU6IFByb3BlcnR5ICdpc0Nsb3NhYmxlJyBkb2VzIG5vdCBleGlzdCBvbiB0eXBlICdWaXN1Li4uIFJlbW92ZSB0aGlzIGNvbW1lbnQgdG8gc2VlIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2VcbiAgICAgICAgICAgIGNvbnN0IHsgaWQsIHRpdGxlLCBpY29uLCBpc0Nsb3NhYmxlID0gdHJ1ZSB9ID0gdml6XG4gICAgICAgICAgICBjZmdbaWRdID0ge1xuICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgdHlwZTogJ2NvbXBvbmVudCcsXG4gICAgICAgICAgICAgIGNvbXBvbmVudE5hbWU6IGlkLFxuICAgICAgICAgICAgICBpY29uLFxuICAgICAgICAgICAgICBjb21wb25lbnRTdGF0ZToge30sXG4gICAgICAgICAgICAgIGlzQ2xvc2FibGUsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY2ZnXG4gICAgICAgICAgfSwge30gYXMgeyBba2V5OiBzdHJpbmddOiBhbnkgfSlcbiAgICAgICAgICBpZiAoZ29sZGVuTGF5b3V0LnJvb3QuY29udGVudEl0ZW1zLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgZ29sZGVuTGF5b3V0LnJvb3QuYWRkQ2hpbGQoe1xuICAgICAgICAgICAgICB0eXBlOiAnY29sdW1uJyxcbiAgICAgICAgICAgICAgY29udGVudDogW2NvbmZpZ3NbJ29wZW5sYXllcnMnXV0sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoZ29sZGVuTGF5b3V0LnJvb3QuY29udGVudEl0ZW1zWzBdLmlzQ29sdW1uKSB7XG4gICAgICAgICAgICAgIGdvbGRlbkxheW91dC5yb290LmNvbnRlbnRJdGVtc1swXS5jb250ZW50SXRlbXNbMF0uYWRkQ2hpbGQoXG4gICAgICAgICAgICAgICAgY29uZmlnc1snb3BlbmxheWVycyddLFxuICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZ29sZGVuTGF5b3V0LnJvb3QuY29udGVudEl0ZW1zWzBdLmFkZENoaWxkKFxuICAgICAgICAgICAgICAgIGNvbmZpZ3NbJ29wZW5sYXllcnMnXSxcbiAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/visual-settings.provider.d.ts b/src/main/webapp/component/golden-layout/visual-settings.provider.d.ts new file mode 100644 index 00000000000..87fd2f06023 --- /dev/null +++ b/src/main/webapp/component/golden-layout/visual-settings.provider.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +type LayoutContextType = { + getValue: (key: string, defaultValue?: any) => any; + setValue: (key: string, value: any) => void; + onStateChanged: (callback: () => void) => void; + visualTitle: string; + hasLayoutContext: boolean; +}; +export declare const LayoutContext: React.Context; +type VisualSettingsProviderProps = { + container: any; + goldenLayout: any; + children: React.ReactNode; +}; +export declare const VisualSettingsProvider: (props: VisualSettingsProviderProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/golden-layout/visual-settings.provider.js b/src/main/webapp/component/golden-layout/visual-settings.provider.js new file mode 100644 index 00000000000..88d254810f7 --- /dev/null +++ b/src/main/webapp/component/golden-layout/visual-settings.provider.js @@ -0,0 +1,49 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +export var LayoutContext = React.createContext({ + getValue: function () { }, + setValue: function () { }, + onStateChanged: function (callback) { return callback(); }, + visualTitle: '', + hasLayoutContext: false, +}); +export var VisualSettingsProvider = function (props) { + var container = props.container, goldenLayout = props.goldenLayout, children = props.children; + var getVisualSettingValue = function (key, defaultValue) { + var _a; + var settingsVal = (_a = container.getState()) === null || _a === void 0 ? void 0 : _a[key]; + if ((!settingsVal || settingsVal.length === 0) && defaultValue) { + settingsVal = defaultValue; + } + return settingsVal; + }; + var setVisualSettingValue = function (key, value) { + var _a; + container.setState(__assign(__assign({}, (container.getState() || {})), (_a = {}, _a[key] = value, _a))); + }; + var onVisualSettingChangedListener = function (callback) { + goldenLayout.on('stateChanged', function () { return callback(); }); + }; + return (React.createElement(LayoutContext.Provider, { value: { + getValue: getVisualSettingValue, + setValue: setVisualSettingValue, + onStateChanged: onVisualSettingChangedListener, + visualTitle: container.title, + hasLayoutContext: true, + } }, children)); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzdWFsLXNldHRpbmdzLnByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9nb2xkZW4tbGF5b3V0L3Zpc3Vh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0YXRlQ2hhbmdlZCcsICgpID0+IGNhbGxiYWNrKCkpXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxMYXlvdXRDb250ZXh0LlByb3ZpZGVyXG4gICAgICB2YWx1ZT17e1xuICAgICAgICBnZXRWYWx1ZTogZ2V0VmlzdWFsU2V0dGluZ1ZhbHVlLFxuICAgICAgICBzZXRWYWx1ZTogc2V0VmlzdWFsU2V0dGluZ1ZhbHVlLFxuICAgICAgICBvblN0YXRlQ2hhbmdlZDogb25WaXN1YWxTZXR0aW5nQ2hhbmdlZExpc3RlbmVyLFxuICAgICAgICB2aXN1YWxUaXRsZTogY29udGFpbmVyLnRpdGxlLFxuICAgICAgICBoYXNMYXlvdXRDb250ZXh0OiB0cnVlLFxuICAgICAgfX1cbiAgICA+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgPC9MYXlvdXRDb250ZXh0LlByb3ZpZGVyPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/golden-layout/visual-toolbar.d.ts b/src/main/webapp/component/golden-layout/visual-toolbar.d.ts new file mode 100644 index 00000000000..730ca24dd6f --- /dev/null +++ b/src/main/webapp/component/golden-layout/visual-toolbar.d.ts @@ -0,0 +1,10 @@ +/// +import GoldenLayout from 'golden-layout'; +export declare const GoldenLayoutComponentHeader: ({ viz, tab, options, componentState, container, name, }: { + viz: any; + tab: GoldenLayout.Tab & GoldenLayout.ContentItem; + options: any; + componentState: any; + container: any; + name: any; +}) => JSX.Element; diff --git a/src/main/webapp/component/golden-layout/visual-toolbar.js b/src/main/webapp/component/golden-layout/visual-toolbar.js new file mode 100644 index 00000000000..52213eaba09 --- /dev/null +++ b/src/main/webapp/component/golden-layout/visual-toolbar.js @@ -0,0 +1,156 @@ +import { __assign, __read } from "tslib"; +import React from 'react'; +import MinimizeIcon from '@mui/icons-material/Minimize'; +import CloseIcon from '@mui/icons-material/Close'; +import PopoutIcon from '@mui/icons-material/OpenInNew'; +import Button from '@mui/material/Button'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +import ExtensionPoints from '../../extension-points/extension-points'; +import { CloseOnClickTooltip, MinimizedHeight, adjustStackInMinimizedPlaceIfNecessary, getBottomItem, getRootColumnContent, layoutAlreadyHasMinimizedStack, rootIsEmpty, rootIsNotAColumn, useIsMaximized, useRoot, useStackSize, } from './stack-toolbar'; +import { Grid } from '@mui/material'; +import _ from 'underscore'; +function useStackRelatedToTab(tab) { + var _a = __read(React.useState(tab.contentItem.parent), 2), stack = _a[0], setStack = _a[1]; + React.useEffect(function () { + setStack(tab.contentItem.parent); + }, [tab]); + return stack; +} +// add the tab to the existing minimized stack +function addTabToExistingMinimizedStack(_a) { + var tab = _a.tab, stack = _a.stack; + var bottomItem = getBottomItem(stack); + if (bottomItem) { + stack.removeChild(tab.contentItem, true); // for some reason removeChild is overly restrictive on type of "thing" so we have to cast + bottomItem.addChild(tab.contentItem, undefined); + } +} +// we have to move each item individually because golden layout doesn't support moving an entire stack, and addChild does not work as documentation says (it doesn't remove the existing automatically) +function createNewStackFromExistingTab(_a) { + var tab = _a.tab, stack = _a.stack; + var existingItem = tab.contentItem; + var newStackItem = stack.layoutManager._$normalizeContentItem({ + type: 'stack', + }); + stack.removeChild(existingItem, true); // for some reason removeChild is overly restrictive on type of "thing" so we have to cast + newStackItem.addChild(existingItem, undefined); + return newStackItem; +} +function createAndAddNewMinimizedStackForTab(_a) { + var _b; + var tab = _a.tab, stack = _a.stack, goldenLayoutRoot = _a.goldenLayoutRoot; + var newStackItem = createNewStackFromExistingTab({ stack: stack, tab: tab }); + if (rootIsNotAColumn(goldenLayoutRoot)) { + var existingRootContent = getRootColumnContent(goldenLayoutRoot); + goldenLayoutRoot.removeChild(existingRootContent, true); // for some reason removeChild is overly restrictive on type of "thing" so we have to cast + // we need a column for minimize to work, so make a new column and add the existing root to it + var newColumnItem = stack.layoutManager._$normalizeContentItem({ + type: 'column', + }); + newColumnItem.addChild(existingRootContent); + newColumnItem.addChild(newStackItem); + goldenLayoutRoot.addChild(newColumnItem); + } + else if (rootIsEmpty(goldenLayoutRoot)) { + var newColumnItem = stack.layoutManager._$normalizeContentItem({ + type: 'column', + }); + newColumnItem.addChild(newStackItem); + goldenLayoutRoot.addChild(newColumnItem); + } + else { + (_b = getRootColumnContent(goldenLayoutRoot)) === null || _b === void 0 ? void 0 : _b.addChild(newStackItem); + } +} +// keep track of pixel height on each stack, which allows us to detect when a stack is "minimized" later on +function usePixelHeightTrackingForTab(tab, stack, height) { + React.useEffect(function () { + if (stack) { + ; + stack.pixelHeight = height; + } + }, [height, stack]); + var goldenLayoutRoot = useRoot(stack); + var minimizeCallback = React.useCallback(function () { + if (!goldenLayoutRoot) { + return; + } + if (layoutAlreadyHasMinimizedStack({ stack: stack })) { + // minimized area exists, add this to it + addTabToExistingMinimizedStack({ tab: tab, stack: stack }); + } + else { + // rearrange layout if necessary and move the stack + createAndAddNewMinimizedStackForTab({ tab: tab, stack: stack, goldenLayoutRoot: goldenLayoutRoot }); + } + adjustStackInMinimizedPlaceIfNecessary({ goldenLayoutRoot: goldenLayoutRoot }); + }, [stack, goldenLayoutRoot]); + return { minimizeCallback: minimizeCallback }; +} +function useCanBeMinimizedTab(_a) { + var stack = _a.stack, height = _a.height, width = _a.width; + var _b = __read(React.useState(stack.contentItems.length), 2), itemCount = _b[0], setItemCount = _b[1]; + var _c = __read(React.useState(true), 2), canBeMinimized = _c[0], setCanBeMinimized = _c[1]; + React.useEffect(function () { + var rootContent = getRootColumnContent(stack); + if ((rootContent === null || rootContent === void 0 ? void 0 : rootContent.isStack) && (rootContent === null || rootContent === void 0 ? void 0 : rootContent.contentItems.length) === 1) { + setCanBeMinimized(false); + } + else { + setCanBeMinimized(true); + } + }, [stack, height, width, itemCount]); + React.useEffect(function () { + if (stack) { + var callback_1 = function () { + setItemCount(stack.contentItems.length); + }; + stack.on('itemCreated', callback_1); + stack.on('itemDestroyed', callback_1); + return function () { + stack.off('itemCreated', callback_1); + stack.off('itemDestroyed', callback_1); + }; + } + return function () { }; + }, [stack]); + return canBeMinimized; +} +export var GoldenLayoutComponentHeader = function (_a) { + var viz = _a.viz, tab = _a.tab, options = _a.options, componentState = _a.componentState, container = _a.container, name = _a.name; + var relatedStack = useStackRelatedToTab(tab); + var _b = useStackSize(relatedStack), height = _b.height, width = _b.width; + var minimizeCallback = usePixelHeightTrackingForTab(tab, relatedStack, height).minimizeCallback; + var canBeMinimized = useCanBeMinimizedTab({ + stack: relatedStack, + width: width, + height: height, + }); + var isMaximized = useIsMaximized({ stack: relatedStack }); + var isMinimized = height && height <= MinimizedHeight; + return (React.createElement(ExtensionPoints.providers, null, + React.createElement("div", { "data-id": "".concat(name, "-tab"), className: "flex flex-row items-center flex-nowrap" }, + React.createElement(Grid, { item: true, className: "px-1 text-base" }, + React.createElement("div", null, tab.titleElement.text())), + React.createElement(Grid, { item: true }, viz.header ? (React.createElement(viz.header, __assign({}, _.extend({}, options, componentState, { + container: container, + })))) : null), + isMinimized || isMaximized || !canBeMinimized ? (React.createElement(React.Fragment, null)) : (React.createElement(Grid, { item: true }, + React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Minimize visual to bottom of layout") }, + React.createElement(Button, { onClick: minimizeCallback }, + React.createElement(MinimizeIcon, { fontSize: "small" }))))), + React.createElement(Grid, { item: true }, !tab.contentItem.layoutManager.isSubWindow && + tab.closeElement[0].style.display !== 'none' ? (React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Open visual in new window") }, + React.createElement(Button, { "data-id": "popout-tab-button", onClick: function () { + tab.contentItem.popout(); + } }, + React.createElement(PopoutIcon, { fontSize: "small" })))) : null), + React.createElement(Grid, { item: true }, tab.closeElement[0].style.display !== 'none' ? (React.createElement(CloseOnClickTooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-1" }, "Close visual") }, + React.createElement(Button, { "data-id": "close-tab-button", onClick: function (e) { + ; + tab._onCloseClickFn(e); + } }, + React.createElement(CloseIcon, { fontSize: "small" })))) : null)))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzdWFsLXRvb2xiYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2dvbGRlbi1sYXlvdXQvdmlzdWFsLXRvb2xiYXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxZQUFZLE1BQU0sOEJBQThCLENBQUE7QUFDdkQsT0FBTyxTQUFTLE1BQU0sMkJBQTJCLENBQUE7QUFDakQsT0FBTyxVQUFVLE1BQU0sK0JBQStCLENBQUE7QUFFdEQsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxLQUFLLE1BQU0scUJBQXFCLENBQUE7QUFDdkMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBQzNDLE9BQU8sZUFBZSxNQUFNLHlDQUF5QyxDQUFBO0FBQ3JFLE9BQU8sRUFDTCxtQkFBbUIsRUFDbkIsZUFBZSxFQUNmLHNDQUFzQyxFQUN0QyxhQUFhLEVBQ2Isb0JBQW9CLEVBQ3BCLDhCQUE4QixFQUM5QixXQUFXLEVBQ1gsZ0JBQWdCLEVBQ2hCLGNBQWMsRUFDZCxPQUFPLEVBQ1AsWUFBWSxHQUNiLE1BQU0saUJBQWlCLENBQUE7QUFDeEIsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUNwQyxPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFFMUIsU0FBUyxvQkFBb0IsQ0FBQyxHQUFxQjtJQUMzQyxJQUFBLEtBQUEsT0FBb0IsS0FBSyxDQUFDL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lzTWF4aW1pemVkKHsgc3RhY2s6IHJlbGF0ZWRTdGFjayB9KVxuICBjb25zdCBpc01pbmltaXplZCA9IGhlaWdodCAmJiBoZWlnaHQgPD0gTWluaW1pemVkSGVpZ2h0XG4gIHJldHVybiAoXG4gICAgPEV4dGVuc2lvblBvaW50cy5wcm92aWRlcnM+XG4gICAgICA8ZGl2XG4gICAgICAgIGRhdGEtaWQ9e2Ake25hbWV9LXRhYmB9XG4gICAgICAgIGNsYXNzTmFtZT17YGZsZXggZmxleC1yb3cgaXRlbXMtY2VudGVyIGZsZXgtbm93cmFwYH1cbiAgICAgID5cbiAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJweC0xIHRleHQtYmFzZVwiPlxuICAgICAgICAgIDxkaXY+e3RhYi50aXRsZUVsZW1lbnQudGV4dCgpfTwvZGl2PlxuICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAge3Zpei5oZWFkZXIgPyAoXG4gICAgICAgICAgICA8dml6LmhlYWRlclxuICAgICAgICAgICAgICB7Li4uXy5leHRlbmQoe30sIG9wdGlvbnMsIGNvbXBvbmVudFN0YXRlLCB7XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLFxuICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIDwvR3JpZD5cbiAgICAgICAge2lzTWluaW1pemVkIHx8IGlzTWF4aW1pemVkIHx8ICFjYW5CZU1pbmltaXplZCA/IChcbiAgICAgICAgICA8PjwvPlxuICAgICAgICApIDogKFxuICAgICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAgICA8Q2xvc2VPbkNsaWNrVG9vbHRpcFxuICAgICAgICAgICAgICB0aXRsZT17XG4gICAgICAgICAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30gY2xhc3NOYW1lPVwicC0xXCI+XG4gICAgICAgICAgICAgICAgICBNaW5pbWl6ZSB2aXN1YWwgdG8gYm90dG9tIG9mIGxheW91dFxuICAgICAgICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPEJ1dHRvbiBvbkNsaWNrPXttaW5pbWl6ZUNhbGxiYWNrfT5cbiAgICAgICAgICAgICAgICA8TWluaW1pemVJY29uIGZvbnRTaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgIDwvQ2xvc2VPbkNsaWNrVG9vbHRpcD5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICl9XG5cbiAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICB7IXRhYi5jb250ZW50SXRlbS5sYXlvdXRNYW5hZ2VyLmlzU3ViV2luZG93ICYmXG4gICAgICAgICAgdGFiLmNsb3NlRWxlbWVudFswXS5zdHlsZS5kaXNwbGF5ICE9PSAnbm9uZScgPyAoXG4gICAgICAgICAgICA8Q2xvc2VPbkNsaWNrVG9vbHRpcFxuICAgICAgICAgICAgICB0aXRsZT17XG4gICAgICAgICAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30gY2xhc3NOYW1lPVwicC0xXCI+XG4gICAgICAgICAgICAgICAgICBPcGVuIHZpc3VhbCBpbiBuZXcgd2luZG93XG4gICAgICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgZGF0YS1pZD1cInBvcG91dC10YWItYnV0dG9uXCJcbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICB0YWIuY29udGVudEl0ZW0ucG9wb3V0KClcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPFBvcG91dEljb24gZm9udFNpemU9XCJzbWFsbFwiIC8+XG4gICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgPC9DbG9zZU9uQ2xpY2tUb29sdGlwPlxuICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAge3RhYi5jbG9zZUVsZW1lbnRbMF0uc3R5bGUuZGlzcGxheSAhPT0gJ25vbmUnID8gKFxuICAgICAgICAgICAgPENsb3NlT25DbGlja1Rvb2x0aXBcbiAgICAgICAgICAgICAgdGl0bGU9e1xuICAgICAgICAgICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMub3ZlcmxheXN9IGNsYXNzTmFtZT1cInAtMVwiPlxuICAgICAgICAgICAgICAgICAgQ2xvc2UgdmlzdWFsXG4gICAgICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgZGF0YS1pZD1cImNsb3NlLXRhYi1idXR0b25cIlxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9eyhlKSA9PiB7XG4gICAgICAgICAgICAgICAgICA7KHRhYiBhcyBhbnkpLl9vbkNsb3NlQ2xpY2tGbihlKVxuICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8Q2xvc2VJY29uIGZvbnRTaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgIDwvQ2xvc2VPbkNsaWNrVG9vbHRpcD5cbiAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgPC9HcmlkPlxuICAgICAgPC9kaXY+XG4gICAgPC9FeHRlbnNpb25Qb2ludHMucHJvdmlkZXJzPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/help/help.view.d.ts b/src/main/webapp/component/help/help.view.d.ts new file mode 100644 index 00000000000..c23b0d1da19 --- /dev/null +++ b/src/main/webapp/component/help/help.view.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/component/help/help.view.js b/src/main/webapp/component/help/help.view.js new file mode 100644 index 00000000000..587f9c1c5b7 --- /dev/null +++ b/src/main/webapp/component/help/help.view.js @@ -0,0 +1,292 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import queryString from 'query-string'; +import { useHistory, useLocation } from 'react-router-dom'; +import { useMenuState, useRerenderingRef } from '../menu-state/menu-state'; +import Popover from '@mui/material/Popover'; +import Button from '@mui/material/Button'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +import _ from 'underscore'; +import $ from 'jquery'; +var zeroScale = 'matrix(0, 0, 0, 0, 0, 0)'; +var zeroOpacity = '0'; +// zeroScale to specifically to account for IE Edge Bug, see http://codepen.io/andrewkfiedler/pen/apBbxq +// zeroOpacity to account for how browsers work +function isEffectivelyHidden(element) { + if (element === document) { + return false; + } + else { + var computedStyle = window.getComputedStyle(element); + if (computedStyle.transform === zeroScale || + computedStyle.opacity === zeroOpacity) { + return true; + } + else { + return isEffectivelyHidden(element.parentNode); + } + } +} +// it'd be nice if we can use offsetParent directly, but that would require devs to be aware of how help.view works +function isOffsetParent(element) { + return window.getComputedStyle(element).overflow !== 'visible'; +} +function traverseAncestors(element, compareValue, extractValue) { + var value = extractValue(element); + element = element.parentNode; + while (element !== null && element !== document) { + if (isOffsetParent(element)) { + value = compareValue(value, extractValue(element)); + } + element = element.parentNode; + } + return value; +} +function findHighestAncestorTop(element) { + return traverseAncestors(element, function (currentTop, proposedTop) { return Math.max(currentTop, proposedTop); }, function (element) { return element.getBoundingClientRect().top; }); +} +function findHighestAncestorLeft(element) { + return traverseAncestors(element, function (currentLeft, proposedLeft) { + return Math.max(currentLeft, proposedLeft); + }, function (element) { return element.getBoundingClientRect().left; }); +} +function findLowestAncestorBottom(element) { + return traverseAncestors(element, function (currentBottom, proposedBottom) { + return Math.min(currentBottom, proposedBottom); + }, function (element) { return element.getBoundingClientRect().bottom; }); +} +function findLowestAncestorRight(element) { + return traverseAncestors(element, function (currentRight, proposedRight) { + return Math.min(currentRight, proposedRight); + }, function (element) { return element.getBoundingClientRect().right; }); +} +function findBlockers() { + var blockingElements = $('.is-blocker'); + return _.map(blockingElements, function (blockingElement) { return ({ + boundingRect: blockingElement.getBoundingClientRect(), + element: blockingElement, + }); }); +} +function isBlocked(element, boundingRect) { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '(blocker: any) => true | undefin... Remove this comment to see the full error message + return _.some(findBlockers(), function (blocker) { + if (blocker.element !== element && + $(blocker.element).find(element).length === 0) { + var top_1 = Math.max(blocker.boundingRect.top, boundingRect.top); + var bottom = Math.min(blocker.boundingRect.bottom, boundingRect.bottom); + var left = Math.max(blocker.boundingRect.left, boundingRect.left); + var right = Math.min(blocker.boundingRect.right, boundingRect.right); + var height = bottom - top_1; + var width = right - left; + if (height > 0 && width > 0) { + return true; + } + } + }); +} +var animationFrameId = -1; +var paintHint = function (element) { + if (isEffectivelyHidden(element)) { + return undefined; + } + var boundingRect = element.getBoundingClientRect(); + var top = Math.max(findHighestAncestorTop(element), boundingRect.top); + var bottom = Math.min(findLowestAncestorBottom(element), boundingRect.bottom); + var left = Math.max(findHighestAncestorLeft(element), boundingRect.left); + var right = Math.min(findLowestAncestorRight(element), boundingRect.right); + var height = bottom - top; + var width = right - left; + if (boundingRect.width > 0 && + height > 0 && + width > 0 && + !isBlocked(element, { + top: top, + bottom: bottom, + left: left, + right: right, + })) { + return { + height: height, + width: width, + top: top, + left: left, + text: element.getAttribute('data-help') || '', + id: Math.random().toString(), + }; + } + return undefined; +}; +var startPaintingHints = function ($elementsWithHints, attachElement, setPaintedHints) { + window.cancelAnimationFrame(animationFrameId); + paintHints($elementsWithHints, attachElement, [], setPaintedHints); +}; +var paintHints = function ($elementsWithHints, attachElement, paintedHints, setPaintedHints) { + animationFrameId = window.requestAnimationFrame(function () { + var elements = $elementsWithHints.splice(0, 4); + if (elements.length > 0) { + var newHints = elements + .map(function (element) { + return paintHint(element); + }) + .filter(function (hint) { return hint !== undefined; }); + var combinedValue = paintedHints.concat(newHints); + setPaintedHints(combinedValue); + paintHints($elementsWithHints, attachElement, combinedValue, setPaintedHints); + } + }); +}; +var useCloseOnTyping = function (_a) { + var showHints = _a.showHints, setShowHints = _a.setShowHints; + React.useEffect(function () { + var id = Math.random(); + $(window).on("keydown.".concat(id), function (event) { + var code = event.keyCode; + if (event.charCode && code == 0) + code = event.charCode; + switch (code) { + case 27: + // Escape + setShowHints(false); + break; + default: + break; + } + }); + return function () { + $(window).off("keydown.".concat(id)); + }; + }, [showHints]); +}; +var useRerenderOnResize = function () { + var _a = __read(React.useState(Math.random()), 2), resizeRerender = _a[0], setResizeRerender = _a[1]; + React.useEffect(function () { + var id = Math.random(); + $(window).on("resize.".concat(id), _.debounce(function () { + setResizeRerender(Math.random()); + }, 1000)); + return function () { + $(window).off("resize.".concat(id)); + }; + }, []); + return resizeRerender; +}; +var usePaintHints = function (_a) { + var showHints = _a.showHints, attachElement = _a.attachElement, setPaintedHints = _a.setPaintedHints; + var resizeRerender = useRerenderOnResize(); + React.useEffect(function () { + if (showHints && attachElement) { + var $elementsWithHints = $('[data-help]').not('.is-hidden [data-help]'); + // @ts-expect-error ts-migrate(2740) FIXME: Type 'HTMLElement[]' is missing the following prop... Remove this comment to see the full error message + $elementsWithHints = _.shuffle($elementsWithHints); + startPaintingHints($elementsWithHints, attachElement, setPaintedHints); + } + }, [showHints, attachElement, resizeRerender]); +}; +var HintsComponent = function () { + var location = useLocation(); + var history = useHistory(); + var _a = __read(React.useState(false), 2), showHints = _a[0], setShowHints = _a[1]; + var _b = __read(React.useState([]), 2), paintedHints = _b[0], setPaintedHints = _b[1]; + var attachRef = useRerenderingRef(); + var queryParams = queryString.parse(location.search); + React.useEffect(function () { + var openHelp = Boolean(queryParams['global-help']); + if (openHelp) { + setShowHints(true); + } + else { + setShowHints(false); + } + }); + React.useEffect(function () { + if (!showHints) { + window.cancelAnimationFrame(animationFrameId); + delete queryParams['global-help']; + history.push({ + pathname: location.pathname, + search: "".concat(queryString.stringify(__assign({}, queryParams))), + }); + } + }, [showHints]); + usePaintHints({ + showHints: showHints, + attachElement: attachRef.current, + setPaintedHints: setPaintedHints, + }); + useCloseOnTyping({ showHints: showHints, setShowHints: setShowHints }); + if (!showHints) { + return null; + } + return (React.createElement("div", { className: "help-component is-shown fixed left-0 top-0 h-full w-full bg-black opacity-50 z-50", onClick: function () { + setShowHints(false); + } }, + React.createElement("div", { className: "help-hints", ref: attachRef.ref }, paintedHints.map(function (paintedHint) { + return React.createElement(PaintedHint, __assign({ key: paintedHint.id }, paintedHint)); + })), + React.createElement(UntoggleElement, { setShowHints: setShowHints }))); +}; +var UntoggleElement = function (_a) { + var setShowHints = _a.setShowHints; + var _b = __read(React.useState(), 2), state = _b[0], setState = _b[1]; + var resizeRerender = useRerenderOnResize(); + React.useEffect(function () { + var untoggleElement = document.querySelector('[data-id=sidebar-help-button]'); + if (untoggleElement) { + setState(untoggleElement.getBoundingClientRect()); + } + }, [resizeRerender]); + if (state === undefined) { + return null; + } + var width = state.width, height = state.height, top = state.top, left = state.left; + return (React.createElement(React.Fragment, null, + React.createElement(Button, { variant: "contained", color: "primary", onClick: function () { + setShowHints(false); + }, className: "absolute ", style: { + width: width, + height: height, + top: top, + left: left, + opacity: '.5', + } }))); +}; +var PaintedHint = function (_a) { + var width = _a.width, height = _a.height, top = _a.top, left = _a.left, text = _a.text; + var menuState = useMenuState(); + return (React.createElement(React.Fragment, null, + React.createElement(Button, __assign({ className: "absolute painted-hint", style: { + width: width, + height: height, + top: top, + left: left, + opacity: '0.5', + }, variant: "contained", color: "primary" }, menuState.MuiButtonProps, { onClick: function (e) { + e.stopPropagation(); + menuState.handleClick(); + } })), + React.createElement(Popover, __assign({}, menuState.MuiPopoverProps, { onClick: function (e) { + e.stopPropagation(); + menuState.handleClose(); + } }), + React.createElement(Paper, { elevation: Elevations.overlays, onClick: function (e) { + e.stopPropagation(); + }, className: "p-2" }, text)))); +}; +export default hot(module)(HintsComponent); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscC52aWV3LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9oZWxwL2hlbHAudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxXQUFXLE1BQU0sY0FBYyxDQUFBO0FBQ3RDLE9BQU8sRUFBRSxVQUFVLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDMUQsT0FBTyxFQUFFLFlBQVksRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDBCQUEwQixDQUFBO0FBQzFFLE9BQU8sT0FBTyxNQUFNLHVCQUF1QixDQUFBO0FBQzNDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sS0FBSyxNQUF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pbnRUeXBlW11cbiAgICAgIGNvbnN0IGNvbWJpbmVkVmFsdWUgPSBwYWludGVkSGludHMuY29uY2F0KG5ld0hpbnRzKVxuICAgICAgc2V0UGFpbnRlZEhpbnRzKGNvbWJpbmVkVmFsdWUpXG4gICAgICBwYWludEhpbnRzKFxuICAgICAgICAkZWxlbWVudHNXaXRoSGludHMsXG4gICAgICAgIGF0dGFjaEVsZW1lbnQsXG4gICAgICAgIGNvbWJpbmVkVmFsdWUsXG4gICAgICAgIHNldFBhaW50ZWRIaW50c1xuICAgICAgKVxuICAgIH1cbiAgfSlcbn1cblxuY29uc3QgdXNlQ2xvc2VPblR5cGluZyA9ICh7XG4gIHNob3dIaW50cyxcbiAgc2V0U2hvd0hpbnRzLFxufToge1xuICBzaG93SGludHM6IGJvb2xlYW5cbiAgc2V0U2hvd0hpbnRzOiAodmFsdWU6IGJvb2xlYW4pID0+IHZvaWRcbn0pID0+IHtcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICBjb25zdCBpZCA9IE1hdGgucmFuZG9tKClcbiAgICAkKHdpbmRvdykub24oYGtleWRvd24uJHtpZH1gLCAoZXZlbnQ6IGFueSkgPT4ge1xuICAgICAgbGV0IGNvZGUgPSBldmVudC5rZXlDb2RlXG4gICAgICBpZiAoZXZlbnQuY2hhckNvZGUgJiYgY29kZSA9PSAwKSBjb2RlID0gZXZlbnQuY2hhckNvZGVcbiAgICAgIHN3aXRjaCAoY29kZSkge1xuICAgICAgICBjYXNlIDI3OlxuICAgICAgICAgIC8vIEVzY2FwZVxuICAgICAgICAgIHNldFNob3dIaW50cyhmYWxzZSlcbiAgICAgICAgICBicmVha1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIGJyZWFrXG4gICAgICB9XG4gICAgfSlcbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgJCh3aW5kb3cpLm9mZihga2V5ZG93bi4ke2lkfWApXG4gICAgfVxuICB9LCBbc2hvd0hpbnRzXSlcbn1c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AgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICB7Li4ubWVudVN0YXRlLk11aUJ1dHRvblByb3BzfVxuICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xuICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKClcbiAgICAgICAgICBtZW51U3RhdGUuaGFuZGxlQ2xpY2soKVxuICAgICAgICB9fVxuICAgICAgPjwvQnV0dG9uPlxuICAgICAgPFBvcG92ZXJcbiAgICAgICAgey4uLm1lbnVTdGF0ZS5NdWlQb3BvdmVyUHJvcHN9XG4gICAgICAgIG9uQ2xpY2s9eyhlKSA9PiB7XG4gICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKVxuICAgICAgICAgIG1lbnVTdGF0ZS5oYW5kbGVDbG9zZSgpXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIDxQYXBlclxuICAgICAgICAgIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c31cbiAgICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xuICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKVxuICAgICAgICAgIH19XG4gICAgICAgICAgY2xhc3NOYW1lPVwicC0yXCJcbiAgICAgICAgPlxuICAgICAgICAgIHt0ZXh0fVxuICAgICAgICA8L1BhcGVyPlxuICAgICAgPC9Qb3BvdmVyPlxuICAgIDwvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKEhpbnRzQ29tcG9uZW50KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/hooks/useDialogState.d.ts b/src/main/webapp/component/hooks/useDialogState.d.ts new file mode 100644 index 00000000000..590ac0cb7e6 --- /dev/null +++ b/src/main/webapp/component/hooks/useDialogState.d.ts @@ -0,0 +1,32 @@ +import { ButtonProps } from '@mui/material/Button'; +import { DialogProps } from '@mui/material/Dialog'; +import Dialog from '@mui/material/Dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +export declare function useDialogState(): { + open: boolean; + handleClick: () => void; + handleClose: () => void; + /** + * Handy prop bundles for passing to common components + */ + dropdownProps: { + open: boolean; + handleClose: () => void; + }; + MuiButtonComponents: { + Button: import("@mui/material").ExtendButtonBase>; + }; + MuiDialogComponents: { + Dialog: typeof Dialog; + DialogContent: typeof DialogContent; + DialogTitle: import("@mui/material/OverridableComponent").OverridableComponent>; + DialogActions: typeof DialogActions; + DialogContentText: import("@mui/material/OverridableComponent").OverridableComponent>; + }; + MuiDialogProps: Required>; + MuiButtonProps: Required>; + buttonProps: { + onClick: () => void; + }; +}; diff --git a/src/main/webapp/component/hooks/useDialogState.js b/src/main/webapp/component/hooks/useDialogState.js new file mode 100644 index 00000000000..2ca3a49de09 --- /dev/null +++ b/src/main/webapp/component/hooks/useDialogState.js @@ -0,0 +1,50 @@ +import { __read } from "tslib"; +import Button from '@mui/material/Button'; +import Dialog from '@mui/material/Dialog'; +import DialogTitle from '@mui/material/DialogTitle'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogContentText from '@mui/material/DialogContentText'; +import React from 'react'; +export function useDialogState() { + var _a = __read(React.useState(false), 2), open = _a[0], setOpen = _a[1]; + var handleClick = function () { + setOpen(!open); + }; + var handleClose = function () { + setOpen(false); + }; + return { + open: open, + handleClick: handleClick, + handleClose: handleClose, + /** + * Handy prop bundles for passing to common components + */ + dropdownProps: { + open: open, + handleClose: handleClose, + }, + MuiButtonComponents: { + Button: Button, + }, + MuiDialogComponents: { + Dialog: Dialog, + DialogContent: DialogContent, + DialogTitle: DialogTitle, + DialogActions: DialogActions, + DialogContentText: DialogContentText, + }, + MuiDialogProps: { + open: open, + onClose: handleClose, + }, + MuiButtonProps: { + onClick: handleClick, + }, + buttonProps: { + onClick: handleClick, + }, + }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlRGlhbG9nU3RhdGUuanMiLCJzb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newline at end of file diff --git a/src/main/webapp/component/hooks/useRender.d.ts b/src/main/webapp/component/hooks/useRender.d.ts new file mode 100644 index 00000000000..7025cfa0acb --- /dev/null +++ b/src/main/webapp/component/hooks/useRender.d.ts @@ -0,0 +1,4 @@ +/** + * Force your component to render + */ +export declare const useRender: () => () => void; diff --git a/src/main/webapp/component/hooks/useRender.js b/src/main/webapp/component/hooks/useRender.js new file mode 100644 index 00000000000..838f11502b2 --- /dev/null +++ b/src/main/webapp/component/hooks/useRender.js @@ -0,0 +1,12 @@ +import { __read } from "tslib"; +import React from 'react'; +/** + * Force your component to render + */ +export var useRender = function () { + var _a = __read(React.useState(Math.random()), 2), setRender = _a[1]; + return function () { + setRender(Math.random()); + }; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlUmVuZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9ob29rcy91c2VSZW5kZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekI7O0dBRUc7QUFDSCxNQUFNLENBQUMsSUFBTSxTQUFTLEdBQUc7SUFDakIsSUFBQSxLQUFBLE9BQWdCLEtBQUssQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLElBQUEsRUFBMUMsU0FBUyxRQUFpQyxDQUFBO0lBRW5ELE9BQU87UUFDTCxTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUE7SUFDMUIsQ0FBQyxDQUFBO0FBQ0gsQ0FBQyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuXG4vKipcbiAqICBGb3JjZSB5b3VyIGNvbXBvbmVudCB0byByZW5kZXJcbiAqL1xuZXhwb3J0IGNvbnN0IHVzZVJlbmRlciA9ICgpID0+IHtcbiAgY29uc3QgWywgc2V0UmVuZGVyXSA9IFJlYWN0LnVzZVN0YXRlKE1hdGgucmFuZG9tKCkpXG5cbiAgcmV0dXJuICgpID0+IHtcbiAgICBzZXRSZW5kZXIoTWF0aC5yYW5kb20oKSlcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/hooks/useSnack.d.ts b/src/main/webapp/component/hooks/useSnack.d.ts new file mode 100644 index 00000000000..095469d2301 --- /dev/null +++ b/src/main/webapp/component/hooks/useSnack.d.ts @@ -0,0 +1,2 @@ +declare const useSnack: () => import("../snack/snack.provider").AddSnack; +export default useSnack; diff --git a/src/main/webapp/component/hooks/useSnack.js b/src/main/webapp/component/hooks/useSnack.js new file mode 100644 index 00000000000..3de38bbc8fc --- /dev/null +++ b/src/main/webapp/component/hooks/useSnack.js @@ -0,0 +1,5 @@ +import { useContext } from 'react'; +import { SnackBarContext } from '../snack/snack.provider'; +var useSnack = function () { return useContext(SnackBarContext); }; +export default useSnack; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlU25hY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2hvb2tzL3VzZVNuYWNrLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ2xDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQTtBQUV6RCxJQUFNLFFBQVEsR0FBRyxjQUFNLE9BQUEsVUFBVSxDQUFDLGVBQWUsQ0FBQyxFQUEzQixDQUEyQixDQUFBO0FBRWxELGVBQWUsUUFBUSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdXNlQ29udGV4dCB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgU25hY2tCYXJDb250ZXh0IH0gZnJvbSAnLi4vc25hY2svc25hY2sucHJvdmlkZXInXG5cbmNvbnN0IHVzZVNuYWNrID0gKCkgPT4gdXNlQ29udGV4dChTbmFja0JhckNvbnRleHQpXG5cbmV4cG9ydCBkZWZhdWx0IHVzZVNuYWNrXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/ingest-details/ingest-details.view.d.ts b/src/main/webapp/component/ingest-details/ingest-details.view.d.ts new file mode 100644 index 00000000000..776be1d3ce0 --- /dev/null +++ b/src/main/webapp/component/ingest-details/ingest-details.view.d.ts @@ -0,0 +1,9 @@ +/// +type IngestDetailsViewReactType = { + extraHeaders?: any; + overrides?: any; + handleUploadSuccess?: any; + preIngestValidator?: any; +}; +export declare const IngestDetailsViewReact: (props: IngestDetailsViewReactType) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/ingest-details/ingest-details.view.js b/src/main/webapp/component/ingest-details/ingest-details.view.js new file mode 100644 index 00000000000..c07c84a6f5e --- /dev/null +++ b/src/main/webapp/component/ingest-details/ingest-details.view.js @@ -0,0 +1,169 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import _ from 'underscore'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'drop... Remove this comment to see the full error message +import Dropzone from 'dropzone'; +import { UploadItemCollection } from '../upload-item/upload-item.collection.view'; +import UploadBatchModel from '../../js/model/UploadBatch'; +import { UploadSummaryViewReact } from '../upload-summary/upload-summary.view'; +import Button from '@mui/material/Button'; +var useDropzone = function (_a) { + var dropzoneElement = _a.dropzoneElement, extraHeaders = _a.extraHeaders, overrides = _a.overrides, handleUploadSuccess = _a.handleUploadSuccess; + var _b = __read(React.useState(null), 2), dropzone = _b[0], setDropzone = _b[1]; + React.useEffect(function () { + if (dropzone && handleUploadSuccess) { + dropzone.on('success', handleUploadSuccess); + } + }, [dropzone]); + React.useEffect(function () { + if (dropzoneElement) { + if (dropzoneElement.dropzone) { + setDropzone(dropzoneElement.dropzone); + } + else { + setDropzone(new Dropzone(dropzoneElement, { + previewsContainer: false, + paramName: 'parse.resource', + url: './internal/catalog/', + maxFilesize: 5000000, + method: 'post', + autoProcessQueue: false, + headers: extraHeaders, + sending: function (_file, _xhr, formData) { + _.each(overrides, function (values, attribute) { + _.each(values, function (value) { + formData.append('parse.' + attribute, value); + }); + }); + }, + })); + } + } + }, [dropzoneElement]); + return dropzone; +}; +var useUploadBatchModel = function (_a) { + var dropzone = _a.dropzone, getNewUploadBatchModel = _a.getNewUploadBatchModel, setGetNewUploadBatchModel = _a.setGetNewUploadBatchModel; + var _b = __read(React.useState(dropzone), 2), uploadBatchModel = _b[0], setUploadBatchModel = _b[1]; + var _c = __read(React.useState(null), 2), uploadBatchModelJSON = _c[0], setUploadBatchModelJSON = _c[1]; + var callback = React.useMemo(function () { + return function () { + setUploadBatchModelJSON(uploadBatchModel.toJSON()); + }; + }, [uploadBatchModel]); + useListenTo(uploadBatchModel, 'add:uploads remove:uploads reset:uploads change:sending change:finished', callback); + React.useEffect(function () { + if (uploadBatchModel) { + setUploadBatchModelJSON(uploadBatchModel.toJSON()); + } + }, [uploadBatchModel]); + React.useEffect(function () { + if (dropzone && getNewUploadBatchModel) { + setUploadBatchModel(new UploadBatchModel({}, { + dropzone: dropzone, + })); + setGetNewUploadBatchModel(false); + } + }, [dropzone, getNewUploadBatchModel]); + return { + model: uploadBatchModel, + json: uploadBatchModelJSON, + }; +}; +function useIngestMode(_a) { + var uploadBatchModel = _a.uploadBatchModel, dropzone = _a.dropzone; + var _b = __read(React.useState('empty'), 2), mode = _b[0], setMode = _b[1]; + React.useEffect(function () { + if (!uploadBatchModel.json) { + setMode('empty'); + return; + } + if (uploadBatchModel.json.finished) { + setMode('is-finished'); + return; + } + if (uploadBatchModel.json.sending) { + setMode('is-uploading'); + return; + } + if (uploadBatchModel.json.uploads.length > 0) { + setMode('has-files'); + } + else { + setMode('empty'); + } + }, [uploadBatchModel]); + React.useEffect(function () { + if (mode === 'empty' && dropzone && uploadBatchModel.model) { + // reset dropzone + uploadBatchModel.model.unset('id'); + dropzone.options.autoProcessQueue = false; + dropzone.removeAllFiles(true); + uploadBatchModel.model.clear(); + var defaults = uploadBatchModel.model.defaults(); + delete defaults.uploads; + uploadBatchModel.model.set(defaults); + uploadBatchModel.model.get('uploads').reset(); + uploadBatchModel.model.unlistenToDropzone(); + uploadBatchModel.model.initialize(undefined, { + dropzone: dropzone, + }); + } + }, [mode, dropzone, uploadBatchModel.model]); + return [mode, setMode]; +} +export var IngestDetailsViewReact = function (props) { + var _a = __read(React.useState(null), 2), dropzoneElement = _a[0], setDropzoneElement = _a[1]; + var dropzone = useDropzone(__assign({ dropzoneElement: dropzoneElement }, props)); + var _b = __read(React.useState(true), 2), getNewUploadBatchModel = _b[0], setGetNewUploadBatchModel = _b[1]; + var uploadBatchModel = useUploadBatchModel({ + dropzone: dropzone, + getNewUploadBatchModel: getNewUploadBatchModel, + setGetNewUploadBatchModel: setGetNewUploadBatchModel, + }); + var _c = __read(useIngestMode({ uploadBatchModel: uploadBatchModel, dropzone: dropzone }), 1), mode = _c[0]; + return (React.createElement("div", { className: "ingest-details p-2 w-full h-full flex flex-col items-center flex-nowrap overflow-hidden space-y-2" }, + React.createElement("div", { className: "details-files w-full overflow-auto ".concat(mode === 'empty' ? '' : 'h-full') }, uploadBatchModel.model ? (React.createElement(UploadItemCollection, { collection: uploadBatchModel.model.get('uploads') })) : null), + mode === 'empty' || mode === 'has-files' ? (React.createElement("div", { className: "details-dropzone border border-dashed w-full h-full flex flex-col justify-center items-center cursor-pointer overflow-hidden", ref: setDropzoneElement }, + React.createElement("div", { className: "text-4xl cursor-pointer", onClick: function () { + if (dropzoneElement) { + dropzoneElement.click(); + } + } }, "Drop files here or click to upload"))) : null, + mode === 'is-finished' || mode === 'is-uploading' ? (React.createElement("div", { className: "details-summary w-full mt-2" }, uploadBatchModel.model ? (React.createElement(UploadSummaryViewReact, { model: uploadBatchModel.model })) : null)) : null, + React.createElement("div", { className: "details-footer w-full flex flex-row items-center flex-nowrap overflow-hidden shrink-0 mt-2" }, + mode === 'has-files' ? (React.createElement(React.Fragment, null, + React.createElement(Button, { onClick: function () { + setGetNewUploadBatchModel(true); + }, className: "w-full" }, "Clear"), + React.createElement(Button, { variant: "contained", color: "primary", onClick: function () { + if (props.preIngestValidator) { + props.preIngestValidator(_.bind(uploadBatchModel.model.start, uploadBatchModel.model)); + } + else { + uploadBatchModel.model.start(); + } + }, className: "w-full" }, "Start"))) : null, + mode === 'is-uploading' ? (React.createElement(Button, { variant: "contained", color: "primary", onClick: function () { + uploadBatchModel.model.cancel(); + }, className: "w-full" }, "Stop")) : null, + mode === 'is-finished' ? (React.createElement(Button, { variant: "contained", color: "primary", "data-id": "new", onClick: function () { + setGetNewUploadBatchModel(true); + }, className: "w-full" }, "New")) : null))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5nZXN0LWRldGFpbHMudmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvaW5nZXN0LWRldGFpbHMvaW5nZXN0LWRldGFpbHMudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs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gICAgIGNsYXNzTmFtZT1cInRleHQtNHhsIGN1cnNvci1wb2ludGVyXCJcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgaWYgKGRyb3B6b25lRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGRyb3B6b25lRWxlbWVudC5jbGljaygpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgRHJvcCBmaWxlcyBoZXJlIG9yIGNsaWNrIHRvIHVwbG9hZFxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICAgICkgOiBudWxsfVxuICAgICAge21vZGUgPT09ICdpcy1maW5pc2hlZCcgfHwgbW9kZSA9PT0gJ2lzLXVwbG9hZGluZycgPyAoXG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZGV0YWlscy1zdW1tYXJ5IHctZnVsbCBtdC0yXCI+XG4gICAgICAgICAge3VwbG9hZEJhdGNoTW9kZWwubW9kZWwgPyAoXG4gICAgICAgICAgICA8VXBsb2FkU3VtbWFyeVZpZXdSZWFjdCBtb2RlbD17dXBsb2FkQmF0Y2hNb2RlbC5tb2RlbH0gLz5cbiAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgPC9kaXY+XG4gICAgICApIDogbnVsbH1cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZGV0YWlscy1mb290ZXIgdy1mdWxsIGZsZXggZmxleC1yb3cgaXRlbXMtY2VudGVyIGZsZXgtbm93cmFwIG92ZXJmbG93LWhpZGRlbiBzaHJpbmstMCBtdC0yXCI+XG4gICAgICAgIHttb2RlID09PSAnaGFzLWZpbGVzJyA/IChcbiAgICAgICAgICA8PlxuICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0R2V0TmV3VXBsb2FkQmF0Y2hNb2RlbCh0cnVlKVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGxcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICBDbGVhclxuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIHZhcmlhbnQ9XCJjb250YWluZWRcIlxuICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHByb3BzLnByZUluZ2VzdFZhbGlkYXRvcikge1xuICAgICAgICAgICAgICAgICAgcHJvcHMucHJlSW5nZXN0VmFsaWRhdG9yKFxuICAgICAgICAgICAgICAgICAgICBfLmJpbmQodXBsb2FkQmF0Y2hNb2RlbC5tb2RlbC5zdGFydCwgdXBsb2FkQmF0Y2hNb2RlbC5tb2RlbClcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdXBsb2FkQmF0Y2hNb2RlbC5tb2RlbC5zdGFydCgpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGxcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICBTdGFydFxuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPC8+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgICB7bW9kZSA9PT0gJ2lzLXVwbG9hZGluZycgPyAoXG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICB1cGxvYWRCYXRjaE1vZGVsLm1vZGVsLmNhbmNlbCgpXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICBTdG9wXG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgICB7bW9kZSA9PT0gJ2lzLWZpbmlzaGVkJyA/IChcbiAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICB2YXJpYW50PVwiY29udGFpbmVkXCJcbiAgICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgICAgICBkYXRhLWlkPVwibmV3XCJcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgc2V0R2V0TmV3VXBsb2FkQmF0Y2hNb2RlbCh0cnVlKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGNsYXNzTmFtZT1cInctZnVsbFwiXG4gICAgICAgICAgPlxuICAgICAgICAgICAgTmV3XG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/layer-item/layer-item.collection.view.d.ts b/src/main/webapp/component/layer-item/layer-item.collection.view.d.ts new file mode 100644 index 00000000000..ebf5e1e9081 --- /dev/null +++ b/src/main/webapp/component/layer-item/layer-item.collection.view.d.ts @@ -0,0 +1,6 @@ +/// +export declare const LayerItemCollectionViewReact: ({ collection, updateOrdering, focusModel, }: { + collection: Array; + updateOrdering: any; + focusModel: any; +}) => JSX.Element; diff --git a/src/main/webapp/component/layer-item/layer-item.collection.view.js b/src/main/webapp/component/layer-item/layer-item.collection.view.js new file mode 100644 index 00000000000..680ebbc6095 --- /dev/null +++ b/src/main/webapp/component/layer-item/layer-item.collection.view.js @@ -0,0 +1,52 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* global require*/ +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'sort... Remove this comment to see the full error message +import Sortable from 'sortablejs'; +import * as React from 'react'; +import LayerItem from '../../react-component/layer-item'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +function useSortable(_a) { + var sortableElement = _a.sortableElement, updateOrdering = _a.updateOrdering, focusModel = _a.focusModel; + var _b = __read(React.useState(null), 2), sortable = _b[0], setSortable = _b[1]; + React.useEffect(function () { + if (sortableElement) { + setSortable(Sortable.create(sortableElement, { + handle: 'button.layer-rearrange', + animation: 250, + draggable: '>*', + onEnd: function () { + focusModel.clear(); + updateOrdering(); + }, + })); + } + }, [sortableElement]); + return sortable; +} +export var LayerItemCollectionViewReact = function (_a) { + var collection = _a.collection, updateOrdering = _a.updateOrdering, focusModel = _a.focusModel; + var _b = __read(React.useState(Math.random()), 2), setForceRender = _b[1]; + var _c = __read(React.useState(null), 2), sortableElement = _c[0], setSortableElement = _c[1]; + var sortable = useSortable({ sortableElement: sortableElement, updateOrdering: updateOrdering, focusModel: focusModel }); + useListenTo(collection, 'sort', function () { + setForceRender(Math.random()); + }); + return (React.createElement("div", { ref: setSortableElement }, collection.map(function (layer) { + return (React.createElement(LayerItem, { key: layer.id, layer: layer, focusModel: focusModel, updateOrdering: updateOrdering, sortable: sortable })); + }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXItaXRlbS5jb2xsZWN0aW9uLnZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi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9XG4gICAgICAgICAgICBmb2N1c01vZGVsPXtmb2N1c01vZGVsfVxuICAgICAgICAgICAgdXBkYXRlT3JkZXJpbmc9e3VwZGF0ZU9yZGVyaW5nfVxuICAgICAgICAgICAgc29ydGFibGU9e3NvcnRhYmxlfVxuICAgICAgICAgIC8+XG4gICAgICAgIClcbiAgICAgIH0pfVxuICAgIDwvZGl2PlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/layers/layers-dropdown.d.ts b/src/main/webapp/component/layers/layers-dropdown.d.ts new file mode 100644 index 00000000000..8352b0b7836 --- /dev/null +++ b/src/main/webapp/component/layers/layers-dropdown.d.ts @@ -0,0 +1,6 @@ +/// +type LayersDropdownProps = { + layers: Array; +}; +export declare const LayersDropdown: (props: LayersDropdownProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/layers/layers-dropdown.js b/src/main/webapp/component/layers/layers-dropdown.js new file mode 100644 index 00000000000..e4d8387a21a --- /dev/null +++ b/src/main/webapp/component/layers/layers-dropdown.js @@ -0,0 +1,34 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import Button from '@mui/material/Button'; +import Popover from '@mui/material/Popover'; +import { useMenuState } from '../menu-state/menu-state'; +import LayersView from './layers.view'; +import LayersIcon from '@mui/icons-material/Layers'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +export var LayersDropdown = function (props) { + var menuState = useMenuState(); + return (React.createElement(React.Fragment, null, + React.createElement(Button, __assign({ size: "small", "data-id": "layers-button" }, menuState.MuiButtonProps), + React.createElement("div", { className: "flex flex-row items-center" }, + React.createElement(LayersIcon, null))), + React.createElement(Popover, __assign({}, menuState.MuiPopoverProps), + React.createElement(Paper, { elevation: Elevations.overlays, className: "px-2" }, + React.createElement(LayersView, { layers: props.layers }))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXJzLWRyb3Bkb3duLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sYXllcnMvbGF5ZXJzLWRyb3Bkb3duLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sT0FBTyxNQUFNLHVCQUF1QixDQUFBO0FBQzNDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQTtBQUN2RCxPQUFPLFVBQVUsTUFBTSxlQUFlLENBQUE7QUFDdEMsT0FBTyxVQUFVLE1BQU0sNEJBQTRCLENBQUE7QUFDbkQsT0FBTyxLQUFLLE1BQU0scUJBQXFCLENBQUE7QUFDdkMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBTTNDLE1BQU0sQ0FBQyxJQUFNLGNBQWMsR0FBRyxVQUFDLEtBQTBCO0lBQ3ZELElBQU0sU0FBUyxHQUFHLFlBQVksRUFBRSxDQUFBO0lBRWhDLE9BQU8sQ0FDTDtRQUNFLG9CQUFDLE1BQU0sYUFDTCxJQUFJLEVBQUMsT0FBTyxhQUNKLGVBQWUsSUFDbkIsU0FBUyxDQUFDLGNBQWM7WUFFNUIsNkJBQUssU0FBUyxFQUFDLDRC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ICAgICA+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LXJvdyBpdGVtcy1jZW50ZXJcIj5cbiAgICAgICAgICA8TGF5ZXJzSWNvbiAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvQnV0dG9uPlxuICAgICAgPFBvcG92ZXIgey4uLm1lbnVTdGF0ZS5NdWlQb3BvdmVyUHJvcHN9PlxuICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfSBjbGFzc05hbWU9XCJweC0yXCI+XG4gICAgICAgICAgPExheWVyc1ZpZXcgbGF5ZXJzPXtwcm9wcy5sYXllcnN9IC8+XG4gICAgICAgIDwvUGFwZXI+XG4gICAgICA8L1BvcG92ZXI+XG4gICAgPC8+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/layers/layers.view.d.ts b/src/main/webapp/component/layers/layers.view.d.ts new file mode 100644 index 00000000000..7493011fb76 --- /dev/null +++ b/src/main/webapp/component/layers/layers.view.d.ts @@ -0,0 +1,6 @@ +/// +type LayersViewReactProps = { + layers?: Array; +}; +declare const _default: (props: LayersViewReactProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/layers/layers.view.js b/src/main/webapp/component/layers/layers.view.js new file mode 100644 index 00000000000..6e95ada1458 --- /dev/null +++ b/src/main/webapp/component/layers/layers.view.js @@ -0,0 +1,109 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* global require*/ +import React from 'react'; +import _ from 'underscore'; +import Backbone from 'backbone'; +import { LayerItemCollectionViewReact } from '../layer-item/layer-item.collection.view'; +import user from '../singletons/user-instance'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +import { useListenTo } from '../../component/selection-checkbox/useBackbone.hook'; +import debounce from 'lodash.debounce'; +// this is to track focus, since on reordering rerenders and loses focus +var FocusModel = Backbone.Model.extend({ + defaults: { + id: undefined, + direction: undefined, + }, + directions: { + up: 'up', + down: 'down', + }, + clear: function () { + this.set({ + id: undefined, + direction: undefined, + }); + }, + setUp: function (id) { + this.set({ + id: id, + direction: this.directions.up, + }); + }, + setDown: function (id) { + this.set({ + id: id, + direction: this.directions.down, + }); + }, + getDirection: function () { + return this.get('direction'); + }, + isUp: function () { + return this.getDirection() === this.directions.up; + }, + isDown: function () { + return this.getDirection() === this.directions.down; + }, +}); +var LayersViewReact = function (props) { + var _a; + var getImageryProviders = useConfiguration().getImageryProviders; + var _b = __read(React.useState(new FocusModel()), 1), focusModel = _b[0]; + var containerElementRef = React.useRef(null); + var layers = (_a = props.layers) !== null && _a !== void 0 ? _a : user.get('user>preferences>mapLayers'); + var savePreferencesCallback = React.useMemo(function () { + if (props.layers) { + return function () { }; + } + return debounce(function () { + user.get('user>preferences').savePreferences(); + }, 100); + }, []); + useListenTo(layers, 'change:alpha change:show', function () { + savePreferencesCallback(); + }); + return (React.createElement("div", { "data-id": "layers-container", ref: containerElementRef }, + React.createElement("div", { className: "text-xl text-center" }, "Layers"), + React.createElement("div", { className: "layers" }, + React.createElement(LayerItemCollectionViewReact, { collection: layers, updateOrdering: function () { + var _a; + _.forEach( + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'NodeListOf | undefined'... Remove this comment to see the full error message + (_a = containerElementRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".layer-item"), function (element, index) { + layers.get(element.getAttribute('layer-id')).set('order', index); + }); + layers.sort(); + savePreferencesCallback(); + }, focusModel: focusModel })), + React.createElement("div", { className: "footer" }, + React.createElement(Button, { "data-id": "reset-to-defaults-button", onClick: function () { + focusModel.clear(); + layers.forEach(function (viewLayer) { + var name = viewLayer.get('name'); + var defaultConfig = _.find(getImageryProviders(), function (layerObj) { return name === layerObj.name; }); + viewLayer.set(defaultConfig); + }); + layers.sort(); + savePreferencesCallback(); + } }, + React.createElement("span", null, "Reset to Defaults"))))); +}; +export default hot(module)(LayersViewReact); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXJzLnZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xheWVycy9sYXllcnMudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixtQkFBbUI7QUFDbkIsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sQ0FBQyxNQUFNLFlBQVksQ0FBQTtBQUMxQixPQUFPLFFBQVEsTUFBTSxVQUFVLENBQUE7QUFDL0IsT0FBTyxFQUFFLDRCQUE0QixFQUFFLE1BQU0sMENBQTBDLENBQUE7QUFDdkYsT0FBTyxJQUFJLE1BQU0sNkJBQTZCLENBQUE7QUFDOUMsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDRDQUE0QyxDQUFBO0FBQzdFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxxREFBcUQsQ0FBQTtBQUNqRixPQUFPLFFBQVEsTUFBTSxpQkFBaUIsQ0FBQTtBQUV0Qyx3RUFBd0U7QUFDeEUsSUFBTSxVQUFVLEdBQUcsUUFBUSxD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4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgICAgICAgICBjb250YWluZXJFbGVtZW50UmVmLmN1cnJlbnQ/LnF1ZXJ5U2VsZWN0b3JBbGwoYC5sYXllci1pdGVtYCksXG4gICAgICAgICAgICAgIChlbGVtZW50OiBhbnksIGluZGV4OiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgICBsYXllcnMuZ2V0KGVsZW1lbnQuZ2V0QXR0cmlidXRlKCdsYXllci1pZCcpKS5zZXQoJ29yZGVyJywgaW5kZXgpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGxheWVycy5zb3J0KClcbiAgICAgICAgICAgIHNhdmVQcmVmZXJlbmNlc0NhbGxiYWNrKClcbiAgICAgICAgICB9fVxuICAgICAgICAgIGZvY3VzTW9kZWw9e2ZvY3VzTW9kZWx9XG4gICAgICAgIC8+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZm9vdGVyXCI+XG4gICAgICAgIDxCdXR0b25cbiAgICAgICAgICBkYXRhLWlkPVwicmVzZXQtdG8tZGVmYXVsdHMtYnV0dG9uXCJcbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBmb2N1c01vZGVsLmNsZWFyKClcbiAgICAgICAgICAgIGxheWVycy5mb3JFYWNoKCh2aWV3TGF5ZXI6IGFueSkgPT4ge1xuICAgICAgICAgICAgICBjb25zdCBuYW1lID0gdmlld0xheWVyLmdldCgnbmFtZScpXG4gICAgICAgICAgICAgIGNvbnN0IGRlZmF1bHRDb25maWcgPSBfLmZpbmQoXG4gICAgICAgICAgICAgICAgZ2V0SW1hZ2VyeVByb3ZpZGVycygpLFxuICAgICAgICAgICAgICAgIChsYXllck9iajogYW55KSA9PiBuYW1lID09PSBsYXllck9iai5uYW1lXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgdmlld0xheWVyLnNldChkZWZhdWx0Q29uZmlnKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIGxheWVycy5zb3J0KClcbiAgICAgICAgICAgIHNhdmVQcmVmZXJlbmNlc0NhbGxiYWNrKClcbiAgICAgICAgICB9fVxuICAgICAgICA+XG4gICAgICAgICAgPHNwYW4+UmVzZXQgdG8gRGVmYXVsdHM8L3NwYW4+XG4gICAgICAgIDwvQnV0dG9uPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoTGF5ZXJzVmlld1JlYWN0KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/link/link.d.ts b/src/main/webapp/component/link/link.d.ts new file mode 100644 index 00000000000..71a31d7585a --- /dev/null +++ b/src/main/webapp/component/link/link.d.ts @@ -0,0 +1,3 @@ +import React from 'react'; +import { LinkProps as RouterLinkProps } from 'react-router-dom'; +export declare const Link: React.ForwardRefExoticComponent & React.RefAttributes>; diff --git a/src/main/webapp/component/link/link.js b/src/main/webapp/component/link/link.js new file mode 100644 index 00000000000..34fbf4fb46a --- /dev/null +++ b/src/main/webapp/component/link/link.js @@ -0,0 +1,5 @@ +import { __assign } from "tslib"; +import React from 'react'; +import { Link as RouterLink, } from 'react-router-dom'; +export var Link = React.forwardRef(function (props, ref) { return (React.createElement(RouterLink, __assign({ ref: ref }, props))); }); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvbGluay9saW5rLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sRUFDTCxJQUFJLElBQUksVUFBVSxHQUVuQixNQUFNLGtCQUFrQixDQUFBO0FBRXpCLE1BQU0sQ0FBQyxJQUFNLElBQUksR0FBRyxLQUFLLENBQUMsVUFBVSxDQUF1QixVQUFDLEtBQUssRUFBRSxHQUFHLElBQUssT0FBQSxDQUN6RSxvQkFBQyxVQUFVLGFBQUMsR0FBRyxFQUFFLEdBQUcsSUFBTSxLQUFLLEVBQUksQ0FDcEMsRUFGMEUsQ0FFMUUsQ0FBQyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHtcbiAgTGluayBhcyBSb3V0ZXJMaW5rLFxuICBMaW5rUHJvcHMgYXMgUm91dGVyTGlua1Byb3BzLFxufSBmcm9tICdyZWFjdC1yb3V0ZXItZG9tJ1xuXG5leHBvcnQgY29uc3QgTGluayA9IFJlYWN0LmZvcndhcmRSZWY8YW55LCBSb3V0ZXJMaW5rUHJvcHM+KChwcm9wcywgcmVmKSA9PiAoXG4gIDxSb3V0ZXJMaW5rIHJlZj17cmVmfSB7Li4ucHJvcHN9IC8+XG4pKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/coordinates.d.ts b/src/main/webapp/component/location-new/geo-components/coordinates.d.ts new file mode 100644 index 00000000000..dcd1bdc996f --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/coordinates.d.ts @@ -0,0 +1,7 @@ +/// +declare const DmsLatitude: (props: any) => JSX.Element; +declare const DmsLongitude: (props: any) => JSX.Element; +declare const DdLatitude: (props: any) => JSX.Element; +declare const DdLongitude: (props: any) => JSX.Element; +declare const UsngCoordinate: (props: any) => JSX.Element; +export { DmsLatitude, DmsLongitude, DdLatitude, DdLongitude, UsngCoordinate }; diff --git a/src/main/webapp/component/location-new/geo-components/coordinates.js b/src/main/webapp/component/location-new/geo-components/coordinates.js new file mode 100644 index 00000000000..159db621bfc --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/coordinates.js @@ -0,0 +1,54 @@ +import { __assign, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import TextField from '../../../react-component/text-field/index'; +import MaskedTextField from '../inputs/masked-text-field'; +import { latitudeDMSMask, longitudeDMSMask } from './masks'; +import { buildDmsString, parseDmsCoordinate } from '../utils/dms-utils'; +var Coordinate = function (props) { + var placeholder = props.placeholder, value = props.value, onChange = props.onChange, children = props.children, otherProps = __rest(props, ["placeholder", "value", "onChange", "children"]); + return (React.createElement("div", { className: "flex flex-row items-center w-full flex-nowrap" }, + React.createElement(TextField, __assign({ placeholder: placeholder, value: value, onChange: onChange }, otherProps)), + children)); +}; +var MaskedCoordinate = function (props) { + var placeholder = props.placeholder, mask = props.mask, value = props.value, onChange = props.onChange, children = props.children, otherProps = __rest(props, ["placeholder", "mask", "value", "onChange", "children"]); + return (React.createElement("div", { className: "flex flex-row items-center w-full flex-nowrap" }, + React.createElement(MaskedTextField, __assign({ placeholder: placeholder, mask: mask, value: value, onChange: onChange }, otherProps)), + children)); +}; +var DmsLatitude = function (props) { + return (React.createElement(MaskedCoordinate, __assign({ placeholder: "dd\u00B0mm'ss.sss\"", mask: latitudeDMSMask, placeholderChar: "_" }, props, { onBlur: function (event) { + props.onChange(buildDmsString(parseDmsCoordinate(props.value)), event.type); + } }))); +}; +var DmsLongitude = function (props) { + return (React.createElement(MaskedCoordinate, __assign({ placeholder: "ddd\u00B0mm'ss.sss\"", mask: longitudeDMSMask, placeholderChar: "_" }, props, { onBlur: function (event) { + props.onChange(buildDmsString(parseDmsCoordinate(props.value)), event.type); + } }))); +}; +var DdLatitude = function (props) { + return (React.createElement(Coordinate, __assign({ placeholder: "latitude", type: "number", step: "any", min: -90, max: 90, addon: "\u00B0" }, props))); +}; +var DdLongitude = function (props) { + return (React.createElement(Coordinate, __assign({ placeholder: "longitude", type: "number", step: "any", min: -180, max: 180, addon: "\u00B0" }, props))); +}; +var UsngCoordinate = function (props) { + return (React.createElement("div", { className: "coordinate" }, + React.createElement(TextField, __assign({ label: "Grid" }, props)))); +}; +export { DmsLatitude, DmsLongitude, DdLatitude, DdLongitude, UsngCoordinate }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29vcmRpbmF0ZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy9nZW8tY29tcG9uZW50cy9jb29yZGluYXRlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsT0FBTyxTQUFTLE1BQU0sMkNBQTJDLENBQUE7QUFDakUsT0FBTyxlQUFlLE1BQU0sNkJBQTZCLENBQUE7QUFDekQsT0FBTyxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUMzRCxPQUFPLEVBQUUsY0FBYyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sb0JBQW9CLENBQUE7QUFFdkUsSUFBTSxVQUFVLEdBQUcsVUFBQyxLQUFVO0lBQ3BCLElBQUEsV0FBVyxHQUErQyxLQUFLLFlBQXBELEVBQUUsS0FBSyxHQUF3QyxLQUFLLE1BQTdDLEVBQUUsUUFBUSxHQUE4QixLQUFLLFNBQW5DLEVBQUUsUUFBUSxHQUFvQixLQUFLLFNBQXpCLEVBQUss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gICAgICBtaW49ey0xODB9XG4gICAgICBtYXg9ezE4MH1cbiAgICAgIGFkZG9uPVwiwrBcIlxuICAgICAgey4uLnByb3BzfVxuICAgIC8+XG4gIClcbn1cblxuY29uc3QgVXNuZ0Nvb3JkaW5hdGUgPSAocHJvcHM6IGFueSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXYgY2xhc3NOYW1lPVwiY29vcmRpbmF0ZVwiPlxuICAgICAgPFRleHRGaWVsZCBsYWJlbD1cIkdyaWRcIiB7Li4ucHJvcHN9IC8+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IHsgRG1zTGF0aXR1ZGUsIERtc0xvbmdpdHVkZSwgRGRMYXRpdHVkZSwgRGRMb25naXR1ZGUsIFVzbmdDb29yZGluYXRlIH1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/direction.d.ts b/src/main/webapp/component/location-new/geo-components/direction.d.ts new file mode 100644 index 00000000000..b1c09b4597e --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/direction.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +declare class Direction extends React.Component { + getToggledOption(): any; + handleMouseDown(e: any): void; + handleKeyPress(e: any): void; + render(): JSX.Element; +} +export default Direction; diff --git a/src/main/webapp/component/location-new/geo-components/direction.js b/src/main/webapp/component/location-new/geo-components/direction.js new file mode 100644 index 00000000000..91bc197232f --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/direction.js @@ -0,0 +1,48 @@ +import { __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import TextField from '@mui/material/TextField'; +var Direction = /** @class */ (function (_super) { + __extends(Direction, _super); + function Direction() { + return _super !== null && _super.apply(this, arguments) || this; + } + Direction.prototype.getToggledOption = function () { + return this.props.value === this.props.options[0] + ? this.props.options[1] + : this.props.options[0]; + }; + Direction.prototype.handleMouseDown = function (e) { + e.preventDefault(); + this.props.onChange(this.getToggledOption()); + }; + Direction.prototype.handleKeyPress = function (e) { + var toggledOption = this.getToggledOption(); + if (String.fromCharCode(e.which).toUpperCase() === toggledOption.toUpperCase()) { + ; + this.props.onChange(toggledOption); + } + }; + Direction.prototype.render = function () { + // @ts-expect-error ts-migrate(2339) FIXME: Property 'value' does not exist on type 'Readonly<... Remove this comment to see the full error message + var value = this.props.value; + return (React.createElement("div", { className: "shrink-0 grow-0" }, + React.createElement(TextField, { size: "small", variant: "outlined", value: value, className: "flex-1 w-12 cursor-pointer", onMouseDown: this.handleMouseDown.bind(this), onKeyPress: this.handleKeyPress.bind(this), onChange: function (e) { return e.stopPropagation(); } }))); + }; + return Direction; +}(React.Component)); +export default Direction; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1uZXcvZ2VvLWNvbXBvbmVudHMvZGlyZWN0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHB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G9wUHJvcGFnYXRpb24oKX1cbiAgICAgICAgLz5cbiAgICAgIDwvZGl2PlxuICAgIClcbiAgfVxufVxuZXhwb3J0IGRlZmF1bHQgRGlyZWN0aW9uXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/index.d.ts b/src/main/webapp/component/location-new/geo-components/index.d.ts new file mode 100644 index 00000000000..495dacd8ee9 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/index.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import WKT from './wkt'; +import LatLongDD from './lat-long-dd'; +import LatLongDMS from './lat-long-dms'; +import USNG from './usng-mgrs'; +export { WKT, LatLongDD, LatLongDMS, USNG }; diff --git a/src/main/webapp/component/location-new/geo-components/index.js b/src/main/webapp/component/location-new/geo-components/index.js new file mode 100644 index 00000000000..ad657a59b16 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/index.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import WKT from './wkt'; +import LatLongDD from './lat-long-dd'; +import LatLongDMS from './lat-long-dms'; +import USNG from './usng-mgrs'; +export { WKT, LatLongDD, LatLongDM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Fk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgV0tUIGZyb20gJy4vd2t0J1xuXG5pbXBvcnQgTGF0TG9uZ0REIGZyb20gJy4vbGF0LWxvbmctZGQnXG5pbXBvcnQgTGF0TG9uZ0RNUyBmcm9tICcuL2xhdC1sb25nLWRtcydcbmltcG9ydCBVU05HIGZyb20gJy4vdXNuZy1tZ3JzJ1xuXG5leHBvcnQgeyBXS1QsIExhdExvbmdERCwgTGF0TG9uZ0RNUywgVVNORyB9XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/lat-long-dd.d.ts b/src/main/webapp/component/location-new/geo-components/lat-long-dd.d.ts new file mode 100644 index 00000000000..f7d7687a1e6 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/lat-long-dd.d.ts @@ -0,0 +1,3 @@ +/// +declare const LatLongDD: (props: any) => JSX.Element; +export default LatLongDD; diff --git a/src/main/webapp/component/location-new/geo-components/lat-long-dd.js b/src/main/webapp/component/location-new/geo-components/lat-long-dd.js new file mode 100644 index 00000000000..ca1d95b2fea --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/lat-long-dd.js @@ -0,0 +1,126 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Group from '../../../react-component/group/index'; +import { Radio, RadioItem } from '../../../react-component/radio/radio'; +import TextField from '../../../react-component/text-field/index'; +import { Units } from '../../../react-component/location/common'; +import ListEditor from '../inputs/list-editor'; +import { DdLatitude, DdLongitude } from './coordinates'; +import { ddPoint } from '../models'; +import DistanceUtils from '../../../js/DistanceUtils'; +var Point = function (props) { + var dd = props.dd, setState = props.setState; + return (React.createElement(Group, null, + React.createElement(DdLatitude, { value: dd.point.latitude.toString(), onChange: setState(function (draft, value) { + draft.dd.point.latitude = value; + }), onBlur: setState(function (draft) { + draft.dd.point.latitude = DistanceUtils.coordinateRound(draft.dd.point.latitude); + }) }), + React.createElement(DdLongitude, { value: dd.point.longitude.toString(), onChange: setState(function (draft, value) { return (draft.dd.point.longitude = value); }), onBlur: setState(function (draft) { + draft.dd.point.longitude = DistanceUtils.coordinateRound(draft.dd.point.longitude); + }) }))); +}; +var Circle = function (props) { + var dd = props.dd, setState = props.setState; + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(Group, null, + React.createElement(DdLatitude, { value: dd.circle.point.latitude.toString(), onChange: setState(function (draft, value) { return (draft.dd.circle.point.latitude = value); }), onBlur: setState(function (draft) { + draft.dd.circle.point.latitude = DistanceUtils.coordinateRound(draft.dd.circle.point.latitude); + }) }), + React.createElement(DdLongitude, { value: dd.circle.point.longitude.toString(), onChange: setState(function (draft, value) { + return (draft.dd.circle.point.longitude = value); + }), onBlur: setState(function (draft) { + draft.dd.circle.point.longitude = DistanceUtils.coordinateRound(draft.dd.circle.point.longitude); + }) })), + React.createElement(Units, { value: dd.circle.units, onChange: setState(function (draft, value) { return (draft.dd.circle.units = value); }) }, + React.createElement(TextField, { label: "Radius", type: "number", + // @ts-expect-error ts-migrate(2322) FIXME: Type 'number' is not assignable to type 'string | ... Remove this comment to see the full error message + value: DistanceUtils.coordinateRound(dd.circle.radius), onChange: setState(function (draft, value) { + return (draft.dd.circle.radius = DistanceUtils.coordinateRound(value)); + }) })))); +}; +var Line = function (props) { + var dd = props.dd, setState = props.setState; + var points = dd.line.list.map(function (_entry, index) { return (React.createElement(Group, { key: index }, + React.createElement(DdLatitude, { value: dd.line.list[index].latitude, onChange: setState(function (draft, value) { + return (draft.dd.line.list[index].latitude = value); + }), onBlur: setState(function (draft) { + draft.dd.line.list[index].latitude = DistanceUtils.coordinateRound(draft.dd.line.list[index].latitude); + }) }), + React.createElement(DdLongitude, { value: dd.line.list[index].longitude, onChange: setState(function (draft, value) { + return (draft.dd.line.list[index].longitude = value); + }), onBlur: setState(function (draft) { + return (draft.dd.line.list[index].longitude = + DistanceUtils.coordinateRound(draft.dd.line.list[index].longitude)); + }) }))); }); + return (React.createElement(ListEditor, { list: dd.line.list, defaultItem: ddPoint, onChange: setState(function (draft, value) { return (draft.dd.line.list = value); }) }, points)); +}; +var Polygon = function (props) { + var dd = props.dd, setState = props.setState; + var points = dd.polygon.list.map(function (_entry, index) { return (React.createElement(Group, { key: index }, + React.createElement(DdLatitude, { value: dd.polygon.list[index].latitude.toString(), onChange: setState(function (draft, value) { + return (draft.dd.polygon.list[index].latitude = value); + }), onBlur: setState(function (draft) { + return (draft.dd.polygon.list[index].latitude = + DistanceUtils.coordinateRound(draft.dd.polygon.list[index].latitude)); + }) }), + React.createElement(DdLongitude, { value: dd.polygon.list[index].longitude.toString(), onChange: setState(function (draft, value) { + return (draft.dd.polygon.list[index].longitude = value); + }), onBlur: setState(function (draft) { + return (draft.dd.polygon.list[index].longitude = + DistanceUtils.coordinateRound(draft.dd.polygon.list[index].longitude)); + }) }))); }); + return (React.createElement(ListEditor, { list: dd.polygon.list, defaultItem: ddPoint, onChange: setState(function (draft, value) { return (draft.dd.polygon.list = value); }) }, points)); +}; +var BoundingBox = function (props) { + var dd = props.dd, setState = props.setState; + return (React.createElement("div", { className: "flex flex-col space-y-2" }, + React.createElement(DdLatitude, { label: "South", value: dd.boundingbox.south.toString(), onChange: setState(function (draft, value) { return (draft.dd.boundingbox.south = value); }), onBlur: setState(function (draft) { + return (draft.dd.boundingbox.south = DistanceUtils.coordinateRound(draft.dd.boundingbox.south)); + }) }), + React.createElement(DdLatitude, { label: "North", value: dd.boundingbox.north.toString(), onChange: setState(function (draft, value) { return (draft.dd.boundingbox.north = value); }), onBlur: setState(function (draft) { + return (draft.dd.boundingbox.north = DistanceUtils.coordinateRound(draft.dd.boundingbox.north)); + }) }), + React.createElement(DdLongitude, { label: "West", value: dd.boundingbox.west.toString(), onChange: setState(function (draft, value) { return (draft.dd.boundingbox.west = value); }), onBlur: setState(function (draft) { + return (draft.dd.boundingbox.west = DistanceUtils.coordinateRound(draft.dd.boundingbox.west)); + }) }), + React.createElement(DdLongitude, { label: "East", value: dd.boundingbox.east.toString(), onChange: setState(function (draft, value) { return (draft.dd.boundingbox.east = value); }), onBlur: setState(function (draft) { + return (draft.dd.boundingbox.east = DistanceUtils.coordinateRound(draft.dd.boundingbox.east)); + }) }))); +}; +var LatLongDD = function (props) { + var dd = props.dd, setState = props.setState; + var inputs = { + point: Point, + line: Line, + circle: Circle, + polygon: Polygon, + boundingbox: BoundingBox, + }; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var Component = inputs[dd.shape] || null; + return (React.createElement("div", null, + React.createElement(Radio, { value: dd.shape, onChange: setState(function (draft, value) { return (draft.dd.shape = value); }) }, + React.createElement(RadioItem, { value: "point" }, "Point"), + React.createElement(RadioItem, { value: "circle" }, "Circle"), + React.createElement(RadioItem, { value: "line" }, "Line"), + React.createElement(RadioItem, { value: "polygon" }, "Polygon"), + React.createElement(RadioItem, { value: "boundingbox" }, "Bounding Box")), + React.createElement("div", { className: "input-location mt-2" }, Component !== null ? React.createElement(Component, __assign({}, props)) : null))); +}; +export default LatLongDD; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF0LWxvbmctZGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy9nZW8tY29tcG9uZW50cy9sYXQtbG9uZy1kZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsT0FBTyxLQUFLLE1BQU0sc0NBQXNDLENBQUE7QUFDeEQsT0FBTyxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQTtBQUN2RSxPQUFPLFNBQVMsTUFBTSwyQ0FBMkMsQ0FBQTtBQUNqRSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sMENBQTBDLENBQUE7QUFDaEUsT0FBTyxVQUFVLE1BQU0sdUJBQXVCLENBQUE7QUFDOUMsT0FBTyxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFDdkQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUNuQyxPQUFPLGFBQWEsTUFBTSwyQkFBMkIsQ0FBQTtBQUVyRCxJQUFNLEtBQUssR0FBRyxVQUFDLEtBQVU7SUFDZixJQUFBLEVBQUUsR0FBZSxLQUFLLEdBQXBCLEVBQUUsUUFBUSxHQUFLLEtBQUssU0FBVixDQUFVO0lBQzlCLE9BQU8sQ0FDTCxvQkFBQyxLQUFLO1F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ICAgICAgICAgb25CbHVyPXtzZXRTdGF0ZSgoZHJhZnQ6IGFueSkgPT4ge1xuICAgICAgICAgICAgZHJhZnQuZGQuY2lyY2xlLnBvaW50LmxhdGl0dWRlID0gRGlzdGFuY2VVdGlscy5jb29yZGluYXRlUm91bmQoXG4gICAgICAgICAgICAgIGRyYWZ0LmRkLmNpcmNsZS5wb2ludC5sYXRpdHVkZVxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0pfVxuICAgICAgICAvPlxuICAgICAgICA8RGRMb25naXR1ZGVcbiAgICAgICAgICB2YWx1ZT17ZGQuY2lyY2xlLnBvaW50LmxvbmdpdHVkZS50b1N0cmluZygpfVxuICAgICAgICAgIG9uQ2hhbmdlPXtzZXRTdGF0ZShcbiAgICAgICAgICAgIChkcmFmdDogYW55LCB2YWx1ZTogYW55KSA9PlxuICAgICAgICAgICAgICAoZHJhZnQuZGQuY2lyY2xlLnBvaW50LmxvbmdpdHVkZSA9IHZhbHVlKVxuICAgICAgICAgICl9XG4gICAgICAgICAgb25CbHVyPXtzZXRTdGF0ZSgoZHJhZnQ6IGFueSkgPT4ge1xuICAgICAgICAgICAgZHJhZnQuZGQuY2lyY2xlLnBvaW50LmxvbmdpdHVkZSA9IERpc3RhbmNlVXRpbHMuY29vcmRpbmF0ZVJvdW5kKFxuICAgICAgICAgICAgICBkcmFmdC5kZC5jaXJjbGUucG9pbnQubG9uZ2l0dWRlXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSl9XG4gICAgICAgIC8+XG4gICAgICA8L0dyb3VwPlxuICAgICAgPFVuaXRzXG4gICAgICAgIHZhbHVlPXtkZC5jaXJjbGUudW5pdHN9XG4gICAgICAgIG9uQ2hhbmdlPXtzZXRTdGF0ZShcbiAgICAgICAgICAoZHJhZnQ6IGFueSwgdmFsdWU6IGFueSkgPT4gKGRyYWZ0LmRkLmNpcmNsZS51bml0cyA9IHZhbHVlKVxuICAgICAgICApfVxuICAgICAgPlxuICAgICAgICA8VGV4dEZpZWx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XRpdHVkZSA9IHZhbHVlKVxuICAgICAgICApfVxuICAgICAgICBvbkJsdXI9e3NldFN0YXRlKChkcmFmdDogYW55KSA9PiB7XG4gICAgICAgICAgZHJhZnQuZGQubGluZS5saXN0W2luZGV4XS5sYXRpdHVkZSA9IERpc3RhbmNlVXRpbHMuY29vcmRpbmF0ZVJvdW5kKFxuICAgICAgICAgICAgZHJhZnQuZGQubGluZS5saXN0W2luZGV4XS5sYXRpdHVkZVxuICAgICAgICAgIClcbiAgICAgICAgfSl9XG4gICAgICAvPlxuICAgICAgPERkTG9uZ2l0dWRlXG4gICAgICAgIHZhbHVlPXtkZC5saW5lLmxpc3RbaW5kZXhdLmxvbmdpdHVkZX1cbiAgICAgICAgb25DaGFuZ2U9e3NldFN0YXRlKFxuICAgICAgICAgIChkcmFmdDogYW55LCB2YWx1ZTogYW55KSA9PlxuICAgICAgICAgICAgKGRyYWZ0LmRkLmxpbmUubGlzdFtpbmRleF0ubG9uZ2l0dWRlID0gdmFsdWUpXG4gICAgICAgICl9XG4gICAgICAgIG9uQmx1cj17c2V0U3RhdGUoXG4gICAgICAgICAgKGRyYWZ0OiBhbnkpID0+XG4gICAgICAgICAgICAoZHJhZnQuZGQubGluZS5saXN0W2luZGV4XS5sb25naXR1ZGUgPVxuICAgICAgICAgICAgICBEaXN0YW5jZVV0aWxzLmNvb3JkaW5hdGVSb3VuZChcbiAgICAgICAgICAgICAgICBkcmFmdC5kZC5saW5lLmxpc3RbaW5kZXhdLmxvbmdpdHVkZVxuICAgICAgICAgICAgICApKVxuICAgICAgICApfVxuICAgICAgLz5cbiAgICA8L0dyb3VwPlxuICApKVxuXG4gIHJldHVybiAoXG4gICAgPExpc3RFZGl0b3JcbiAgICAgIGxpc3Q9e2RkLmxpbmUubGlzdH1cbiAgICAgIGRlZmF1bHRJdGVtPXtkZFBvaW50fVxuICAgICAgb25DaGFuZ2U9e3NldFN0YXRlKFxuICAgICAgICAoZHJhZnQ6IGFueSwgdmFsdWU6IGFueSk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PlxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJpbnB1dC1sb2NhdGlvbiBtdC0yXCI+XG4gICAgICAgIHtDb21wb25lbnQgIT09IG51bGwgPyA8Q29tcG9uZW50IHsuLi5wcm9wc30gLz4gOiBudWxsfVxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgTGF0TG9uZ0REXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/lat-long-dms.d.ts b/src/main/webapp/component/location-new/geo-components/lat-long-dms.d.ts new file mode 100644 index 00000000000..cf0bcb03afe --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/lat-long-dms.d.ts @@ -0,0 +1,3 @@ +/// +declare const LatLongDMS: (props: any) => JSX.Element; +export default LatLongDMS; diff --git a/src/main/webapp/component/location-new/geo-components/lat-long-dms.js b/src/main/webapp/component/location-new/geo-components/lat-long-dms.js new file mode 100644 index 00000000000..c84a8dfe837 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/lat-long-dms.js @@ -0,0 +1,198 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Group from '../../../react-component/group/index'; +import { Radio, RadioItem } from '../../../react-component/radio/radio'; +import TextField from '../../../react-component/text-field/index'; +import { Units } from '../../../react-component/location/common'; +import ListEditor from '../inputs/list-editor'; +import { DmsLatitude, DmsLongitude } from './coordinates'; +import { dmsPoint } from '../models'; +import DirectionInput from './direction'; +import { Direction } from '../utils/dms-utils'; +var latitudeDirections = [Direction.North, Direction.South]; +var longitudeDirections = [Direction.East, Direction.West]; +var Point = function (props) { + var dms = props.dms, setState = props.setState; + return (React.createElement(Group, null, + React.createElement(DmsLatitude, { value: dms.point.latitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.point.latitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dms.point.latitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.point.latitude.direction = value); + }) })), + React.createElement(DmsLongitude, { value: dms.point.longitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.point.longitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dms.point.longitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.point.longitude.direction = value); + }) })))); +}; +var Circle = function (props) { + var dms = props.dms, setState = props.setState; + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(Group, null, + React.createElement(DmsLatitude, { value: dms.circle.point.latitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.circle.point.latitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dms.circle.point.latitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.circle.point.latitude.direction = value); + }) })), + React.createElement(DmsLongitude, { value: dms.circle.point.longitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.circle.point.longitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dms.circle.point.longitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.circle.point.longitude.direction = value); + }) }))), + React.createElement(Units, { value: dms.circle.units, onChange: setState(function (draft, value) { return (draft.dms.circle.units = value); }) }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: any; o... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: any; o... Remove this comment to see the full error message + label: "Radius", type: "number", value: dms.circle.radius, onChange: setState(function (draft, value) { return (draft.dms.circle.radius = value); }) })))); +}; +var Line = function (props) { + var dms = props.dms, setState = props.setState; + var points = dms.line.list.map(function (_entry, index) { return (React.createElement(Group, { key: index }, + React.createElement(DmsLatitude, { value: dms.line.list[index].latitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.line.list[index].latitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dms.line.list[index].latitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.line.list[index].latitude.direction = value); + }) })), + React.createElement(DmsLongitude, { value: dms.line.list[index].longitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.line.list[index].longitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dms.line.list[index].longitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.line.list[index].longitude.direction = value); + }) })))); }); + return (React.createElement(ListEditor, { list: dms.line.list, defaultItem: dmsPoint, onChange: setState(function (draft, value) { return (draft.dms.line.list = value); }) }, points)); +}; +var Polygon = function (props) { + var dms = props.dms, setState = props.setState; + var points = dms.polygon.list.map(function (_entry, index) { return (React.createElement(Group, { key: index }, + React.createElement(DmsLatitude, { value: dms.polygon.list[index].latitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.polygon.list[index].latitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dms.polygon.list[index].latitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.polygon.list[index].latitude.direction = value); + }) })), + React.createElement(DmsLongitude, { value: dms.polygon.list[index].longitude.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.polygon.list[index].longitude.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dms.polygon.list[index].longitude.direction, onChange: setState(function (draft, value) { + return (draft.dms.polygon.list[index].longitude.direction = value); + }) })))); }); + return (React.createElement(ListEditor, { list: dms.polygon.list, defaultItem: dmsPoint, onChange: setState(function (draft, value) { return (draft.dms.polygon.list = value); }) }, points)); +}; +var BoundingBox = function (props) { + var dms = props.dms, setState = props.setState; + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(DmsLatitude, { label: "South", value: dms.boundingbox.south.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.south.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dms.boundingbox.south.direction, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.south.direction = value); + }) })), + React.createElement(DmsLatitude, { label: "North", value: dms.boundingbox.north.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.north.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dms.boundingbox.north.direction, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.north.direction = value); + }) })), + React.createElement(DmsLongitude, { label: "West", value: dms.boundingbox.west.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.west.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dms.boundingbox.west.direction, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.west.direction = value); + }) })), + React.createElement(DmsLongitude, { label: "East", value: dms.boundingbox.east.coordinate, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.east.coordinate = value); + }) }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dms.boundingbox.east.direction, onChange: setState(function (draft, value) { + return (draft.dms.boundingbox.east.direction = value); + }) })))); +}; +var LatLongDMS = function (props) { + var dms = props.dms, setState = props.setState; + var inputs = { + point: Point, + line: Line, + circle: Circle, + polygon: Polygon, + boundingbox: BoundingBox, + }; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var Component = inputs[dms.shape] || null; + return (React.createElement("div", null, + React.createElement(Radio, { value: dms.shape, onChange: setState(function (draft, value) { return (draft.dms.shape = value); }) }, + React.createElement(RadioItem, { value: "point" }, "Point"), + React.createElement(RadioItem, { value: "circle" }, "Circle"), + React.createElement(RadioItem, { value: "line" }, "Line"), + React.createElement(RadioItem, { value: "polygon" }, "Polygon"), + React.createElement(RadioItem, { value: "boundingbox" }, "Bounding Box")), + React.createElement("div", { className: "input-location mt-2" }, Component !== null ? React.createElement(Component, __assign({}, props)) : null))); +}; +export default LatLongDMS; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF0LWxvbmctZG1zLmpzIiwic291cmNlUm9vd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gICAgICAgICAgdmFsdWU9e2Rtcy5jaXJjbGUucG9pbnQubG9uZ2l0dWRlLmNvb3JkaW5hdGV9XG4gICAgICAgICAgb25DaGFuZ2U9e3NldFN0YXRlKFxuICAgICAgICAgICAgKGRyYWZ0OiBhbnksIHZhbHVlOiBhbnkpID0+XG4gICAgICAgICAgICAgIChkcmFmdC5kbXMuY2lyY2xlLnBvaW50LmxvbmdpdHVkZS5jb29yZGluYXRlID0gdmFsdWUpXG4gICAgICAgICAgKX1cbiAgICAgICAgPlxuICAgICAgICAgIDxEaXJlY3Rpb25JbnB1dFxuICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDI3NjkpIEZJWE1FOiBObyBvdmVybG9hZCBtYXRjaGVzIHRoaXMgY2FsbC5cbiAgICAgICAgICAgIG9wdGlvbnM9e2xvbmdpdHVkZURpcmVjdGlvbnN9XG4gICAgICAgICAgICB2YWx1ZT17ZG1zLmNpcmNsZS5wb2ludC5sb25naXR1ZGUuZGlyZWN0aW9ufVxuICAgICAgICAgICAgb25DaGFuZ2U9e3NldFN0YXRlKFxuICAgICAgICAgICAgICAoZHJhZnQ6IGFueSwgdmFsdWU6IGFueSkgPT5cbiAgICAgICAgICAgICAgICAoZHJhZnQuZG1zLmNpcmNsZS5wb2ludC5sb25naXR1ZGUuZGlyZWN0aW9uID0gdmFsdWUpXG4gICAgICAgICAgICApfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvRG1zTG9uZ2l0dWRlPlxuICAgICAgPC9Hcm91cD5cbiAgICAgIDxVbml0c1xuICAgICAgICB2YWx1ZT17ZG1zLmNpcmNsZS51bml0c31cbiAgICAgICAgb25DaGFuZ2U9e3NldFN0YXRlKFxuICAgICAgICAgIChkcmFmdDogYW55LCB2YWx1ZTogYW55KSA9PiAoZHJhZnQuZG1zLmNpcmNsZS51bml0cyA9IHZhbHVlKVxuICAgICAgICApfVxuICAgICAgPlxuICAgICAgICA8VGV4dEZpZWxkXG4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GNsYXNzTmFtZT1cImlucHV0LWxvY2F0aW9uIG10LTJcIj5cbiAgICAgICAge0NvbXBvbmVudCAhPT0gbnVsbCA/IDxDb21wb25lbnQgey4uLnByb3BzfSAvPiA6IG51bGx9XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBMYXRMb25nRE1TXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/masks.d.ts b/src/main/webapp/component/location-new/geo-components/masks.d.ts new file mode 100644 index 00000000000..142372a3eea --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/masks.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export declare const latitudeDMSMask: (rawValue: any) => (string | RegExp)[]; +export declare const longitudeDMSMask: (rawValue: any) => (string | RegExp)[]; diff --git a/src/main/webapp/component/location-new/geo-components/masks.js b/src/main/webapp/component/location-new/geo-components/masks.js new file mode 100644 index 00000000000..190cc9f5b7a --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/masks.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* This is a collection of masking functions for the various coordinate inputs */ +var decimalMask = ['.', /\d/, /\d/, /\d/, '"']; +export var latitudeDMSMask = function (rawValue) { + var baseMask = [/\d/, /\d/, '°', /\d/, /\d/, "'", /\d/, /\d/]; + var pattern = new RegExp('^[0-9_]{2,3}[°*][0-9_]{2,3}[`\'’]([0-9_]{2,3}(?:[.][0-9]{0,3})?)"?'); + var match = rawValue.match(pattern); + if (match) { + var seconds = match[1]; + if (seconds.includes('.')) { + return baseMask.concat(decimalMask); + } + } + return baseMask.concat('"'); +}; +export var longitudeDMSMask = function (rawValue) { + var baseMask = [/\d/, /\d/, /\d/, '°', /\d/, /\d/, "'", /\d/, /\d/]; + var pattern = new RegExp('^[0-9_]{3,4}[°*][0-9_]{2,3}[`\'’]([0-9_]{2,3}(?:[.][0-9]{0,3})?)"?'); + var match = rawValue.match(pattern); + if (match) { + var seconds = match[1]; + if (seconds.includes('.')) { + return baseMask.concat(decimalMask); + } + } + return baseMask.concat('"'); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFza3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy9nZW8tY29tcG9uZW50cy9tYXNrcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osaUZBQWlGO0FBRWpGLElBQU0sV0FBVyxHQUFHLENBQUMsR0FBRyxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLEdBQUcsQ0FBQyxDQUFBO0FBRWhELE1BQU0sQ0FBQyxJQUFNLGVBQWUsR0FBRyxVQUFVLFFBQWE7SUFDcEQsSUFBTSxRQUFRLEdBQUcsQ0FBQyxJQUFJLEVBQUUsSUFBSSxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUU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KFxuICAgICdeWzAtOV9dezMsNH1bwrAqXVswLTlfXXsyLDN9W2BcXCfigJldKFswLTlfXXsyLDN9KD86Wy5dWzAtOV17MCwzfSk/KVwiPydcbiAgKVxuICBjb25zdCBtYXRjaCA9IHJhd1ZhbHVlLm1hdGNoKHBhdHRlcm4pXG4gIGlmIChtYXRjaCkge1xuICAgIGNvbnN0IHNlY29uZHMgPSBtYXRjaFsxXVxuICAgIGlmIChzZWNvbmRzLmluY2x1ZGVzKCcuJykpIHtcbiAgICAgIHJldHVybiBiYXNlTWFzay5jb25jYXQoZGVjaW1hbE1hc2spXG4gICAgfVxuICB9XG4gIHJldHVybiBiYXNlTWFzay5jb25jYXQoJ1wiJylcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/usng-mgrs.d.ts b/src/main/webapp/component/location-new/geo-components/usng-mgrs.d.ts new file mode 100644 index 00000000000..d80a9bf81d5 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/usng-mgrs.d.ts @@ -0,0 +1,3 @@ +/// +declare const USNG: (props: any) => JSX.Element; +export default USNG; diff --git a/src/main/webapp/component/location-new/geo-components/usng-mgrs.js b/src/main/webapp/component/location-new/geo-components/usng-mgrs.js new file mode 100644 index 00000000000..f8f0901eeb1 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/usng-mgrs.js @@ -0,0 +1,72 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { Radio, RadioItem } from '../../../react-component/radio/radio'; +import TextField from '../../../react-component/text-field/index'; +import { Units } from '../../../react-component/location/common'; +import ListEditor from '../inputs/list-editor'; +import { UsngCoordinate } from './coordinates'; +var Point = function (props) { + var usng = props.usng, setState = props.setState; + return (React.createElement(UsngCoordinate, { value: usng.point, onChange: setState(function (draft, value) { return (draft.usng.point = value); }) })); +}; +var Circle = function (props) { + var usng = props.usng, setState = props.setState; + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(UsngCoordinate, { value: usng.circle.point, onChange: setState(function (draft, value) { return (draft.usng.circle.point = value); }) }), + React.createElement(Units, { value: usng.circle.units, onChange: setState(function (draft, value) { return (draft.usng.circle.units = value); }) }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: any; o... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: any; o... Remove this comment to see the full error message + label: "Radius", type: "number", value: usng.circle.radius, onChange: setState(function (draft, value) { return (draft.usng.circle.radius = value); }) })))); +}; +var Line = function (props) { + var usng = props.usng, setState = props.setState; + var grids = usng.line.list.map(function (_entry, index) { return (React.createElement(UsngCoordinate, { value: usng.line.list[index], onChange: setState(function (draft, value) { return (draft.usng.line.list[index] = value); }), key: index })); }); + return (React.createElement(ListEditor, { list: usng.line.list, defaultItem: "", onChange: setState(function (draft, value) { return (draft.usng.line.list = value); }) }, grids)); +}; +var Polygon = function (props) { + var usng = props.usng, setState = props.setState; + var grids = usng.polygon.list.map(function (_entry, index) { return (React.createElement(UsngCoordinate, { value: usng.polygon.list[index], onChange: setState(function (draft, value) { return (draft.usng.polygon.list[index] = value); }), key: index })); }); + return (React.createElement(ListEditor, { list: usng.polygon.list, defaultItem: "", onChange: setState(function (draft, value) { return (draft.usng.polygon.list = value); }) }, grids)); +}; +var BoundingBox = function (props) { + var usng = props.usng, setState = props.setState; + return (React.createElement(UsngCoordinate, { value: usng.boundingbox, onChange: setState(function (draft, value) { return (draft.usng.boundingbox = value); }) })); +}; +var USNG = function (props) { + var usng = props.usng, setState = props.setState; + var inputs = { + point: Point, + circle: Circle, + line: Line, + polygon: Polygon, + boundingbox: BoundingBox, + }; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var Component = inputs[usng.shape] || null; + return (React.createElement("div", null, + React.createElement(Radio, { value: usng.shape, onChange: setState(function (draft, value) { return (draft.usng.shape = value); }) }, + React.createElement(RadioItem, { value: "point" }, "Point"), + React.createElement(RadioItem, { value: "circle" }, "Circle"), + React.createElement(RadioItem, { value: "line" }, "Line"), + React.createElement(RadioItem, { value: "polygon" }, "Polygon"), + React.createElement(RadioItem, { value: "boundingbox" }, "Bounding Box")), + React.createElement("div", { className: "input-location mt-2" }, Component !== null ? React.createElement(Component, __assign({}, props)) : null))); +}; +export default USNG; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNuZy1tZ3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1uZXcvZ2VvLWNvbXBvbmVudHMvdXNuZy1tZ3JzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUV6QixPQUFPLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNDQUFzQyxDQUFBO0FBQ3ZFLE9BQU8sU0FBUyxNQUFNLDJDQUEyQyxDQUFBO0FBQ2pFLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSwwQ0FBMEMsQ0FBQTtBQUNoRSxPQUFPLFVBQVUsTUFBTSx1QkFBdUIsQ0FBQTtBQUM5QyxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBRTlDLEl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b0l0ZW0+XG4gICAgICAgIDxSYWRpb0l0ZW0gdmFsdWU9XCJsaW5lXCI+TGluZTwvUmFkaW9JdGVtPlxuICAgICAgICA8UmFkaW9JdGVtIHZhbHVlPVwicG9seWdvblwiPlBvbHlnb248L1JhZGlvSXRlbT5cbiAgICAgICAgPFJhZGlvSXRlbSB2YWx1ZT1cImJvdW5kaW5nYm94XCI+Qm91bmRpbmcgQm94PC9SYWRpb0l0ZW0+XG4gICAgICA8L1JhZGlvPlxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJpbnB1dC1sb2NhdGlvbiBtdC0yXCI+XG4gICAgICAgIHtDb21wb25lbnQgIT09IG51bGwgPyA8Q29tcG9uZW50IHsuLi5wcm9wc30gLz4gOiBudWxsfVxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgVVNOR1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/geo-components/wkt.d.ts b/src/main/webapp/component/location-new/geo-components/wkt.d.ts new file mode 100644 index 00000000000..c05c8b74205 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/wkt.d.ts @@ -0,0 +1,3 @@ +/// +declare const WKT: (props: any) => JSX.Element; +export default WKT; diff --git a/src/main/webapp/component/location-new/geo-components/wkt.js b/src/main/webapp/component/location-new/geo-components/wkt.js new file mode 100644 index 00000000000..9a9476c3af3 --- /dev/null +++ b/src/main/webapp/component/location-new/geo-components/wkt.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import TextField from '../../../react-component/text-field/index'; +import { roundWktCoords } from '../utils'; +var WKT = function (props) { + var wkt = props.wkt, setState = props.setState; + return (React.createElement("div", { className: "input-location" }, + React.createElement(TextField, { value: roundWktCoords(wkt), onChange: setState(function (draft, value) { + return roundWktCoords((draft.wkt = value)); + }) }))); +}; +export default WKT; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2t0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1uZXcvZ2VvLWNvbXBvbmVudHMvd2t0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLE9BQU8sU0FBUyxNQUFNLDJDQUEyQyxDQUFBO0FBQ2pFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFFekMsSUFBTSxHQUFHLEdBQUcsVUFBQyxLQUFVO0lBQ2IsSUFBQSxHQUFHLEdBQWUsS0FBSyxJQUFwQixFQUFFLFFBQVEsR0FBSyxLQUFLLFNBQVYsQ0FBVTtJQUUvQixPQUFPLENBQ0wsNkJBQUssU0FBUyxFQUFDLGdCQUFnQjtRQUM3QixvQkFBQyxTQUFTLElBQ1IsS0FBSyxFQUFFLGNBQWMsQ0FBQyxHQUFHLENBQUMsRUFDMUIsUUFBUSxFQUFFLFFBQVEsQ0FBQyxVQUFDLEtBQVUsRUFBRSxLQUFVO2dCQUN4QyxPQUFBLGNBQWMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFHLEdBQUcsS0FBSyxDQUFDLENBQUM7WUFBbkMsQ0FBbUMsQ0FDcEMsR0FDRCxDQUNFLENBQ1AsQ0FBQTtBQUNILENBQUMsQ0FBQTtB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i4vLi4vcmVhY3QtY29tcG9uZW50L3RleHQtZmllbGQvaW5kZXgnXG5pbXBvcnQgeyByb3VuZFdrdENvb3JkcyB9IGZyb20gJy4uL3V0aWxzJ1xuXG5jb25zdCBXS1QgPSAocHJvcHM6IGFueSkgPT4ge1xuICBjb25zdCB7IHdrdCwgc2V0U3RhdGUgfSA9IHByb3BzXG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2IGNsYXNzTmFtZT1cImlucHV0LWxvY2F0aW9uXCI+XG4gICAgICA8VGV4dEZpZWxkXG4gICAgICAgIHZhbHVlPXtyb3VuZFdrdENvb3Jkcyh3a3QpfVxuICAgICAgICBvbkNoYW5nZT17c2V0U3RhdGUoKGRyYWZ0OiBhbnksIHZhbHVlOiBhbnkpID0+XG4gICAgICAgICAgcm91bmRXa3RDb29yZHMoKGRyYWZ0LndrdCA9IHZhbHVlKSlcbiAgICAgICAgKX1cbiAgICAgIC8+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgV0tUXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/inputs/list-editor.d.ts b/src/main/webapp/component/location-new/inputs/list-editor.d.ts new file mode 100644 index 00000000000..02c5cac3a10 --- /dev/null +++ b/src/main/webapp/component/location-new/inputs/list-editor.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +declare class ListEditor extends React.Component<{ + list: any; + defaultItem: any; + onChange: any; + children: React.ReactNode; +}> { + handleAdd(): void; + handleRemove(index: any): void; + render(): JSX.Element; +} +export default ListEditor; diff --git a/src/main/webapp/component/location-new/inputs/list-editor.js b/src/main/webapp/component/location-new/inputs/list-editor.js new file mode 100644 index 00000000000..11a724c7eb5 --- /dev/null +++ b/src/main/webapp/component/location-new/inputs/list-editor.js @@ -0,0 +1,49 @@ +import { __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Group from '../../../react-component/group/index'; +import Button from '@mui/material/Button'; +var ListEditor = /** @class */ (function (_super) { + __extends(ListEditor, _super); + function ListEditor() { + return _super !== null && _super.apply(this, arguments) || this; + } + ListEditor.prototype.handleAdd = function () { + var _a = this.props, list = _a.list, defaultItem = _a.defaultItem, onChange = _a.onChange; + var newList = list.slice(); + newList.push(defaultItem); + onChange(newList); + }; + ListEditor.prototype.handleRemove = function (index) { + var _a = this.props, list = _a.list, onChange = _a.onChange; + var newList = list.slice(); + newList.splice(index, 1); + onChange(newList); + }; + ListEditor.prototype.render = function () { + var _this = this; + var listItems = React.Children.map(this.props.children, function (child, index) { return (React.createElement("li", { className: "item" }, + React.createElement(Group, null, + child, + React.createElement(Button, { onClick: _this.handleRemove.bind(_this, index) }, "Remove")))); }); + return (React.createElement("div", null, + React.createElement("ul", { className: "list flex flex-col flex-nowrap space-y-2" }, listItems), + React.createElement(Button, { onClick: this.handleAdd.bind(this), className: "mt-2", fullWidth: true }, "Add"))); + }; + return ListEditor; +}(React.Component)); +export default ListEditor; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC1lZGl0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cm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FdpZHRoPlxuICAgICAgICAgIEFkZFxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgIDwvZGl2PlxuICAgIClcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBMaXN0RWRpdG9yXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/inputs/masked-text-field.d.ts b/src/main/webapp/component/location-new/inputs/masked-text-field.d.ts new file mode 100644 index 00000000000..9e731149c03 --- /dev/null +++ b/src/main/webapp/component/location-new/inputs/masked-text-field.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { MaskedInputProps } from 'react-text-mask'; +declare class MaskedTextField extends React.Component { + ref: any; + prevEvent: undefined; + padEndWithZeros(value: any): any; + render(): JSX.Element; +} +export default MaskedTextField; diff --git a/src/main/webapp/component/location-new/inputs/masked-text-field.js b/src/main/webapp/component/location-new/inputs/masked-text-field.js new file mode 100644 index 00000000000..9f65700519f --- /dev/null +++ b/src/main/webapp/component/location-new/inputs/masked-text-field.js @@ -0,0 +1,94 @@ +import { __assign, __extends, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Group from '../../../react-component/group/index'; +import MaskedInput from 'react-text-mask'; +import TextField from '@mui/material/TextField'; +var MaskedTextField = /** @class */ (function (_super) { + __extends(MaskedTextField, _super); + function MaskedTextField() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.prevEvent = undefined; + return _this; + } + MaskedTextField.prototype.padEndWithZeros = function (value) { + // This function is called for each field (east, west, south, north) multiple times. + // Sometimes the event variable is defined, other times it's undefined. + // We must capture the event in a variable when it's defined + // in order to leverage it in checks below even when it's undefined. + if (event) { + // @ts-expect-error ts-migrate(2322) FIXME: Type 'Event' is not assignable to type 'undefined'... Remove this comment to see the full error message + this.prevEvent = event; + } + if (value === undefined || + !value.includes('.') || + (((event && event.type === 'input') || + // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + (this.prevEvent && this.prevEvent.type === 'input')) && + // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + this.prevEvent.target.id === this.props.label)) { + return value; + } + var dmsCoordinateParts = value.toString().split("'"); + if (dmsCoordinateParts.length < 2) { + return value; + } + var decimalParts = dmsCoordinateParts[1].toString().split('.'); + if (decimalParts.length < 2) { + return value; + } + var decimal = decimalParts[1].replace('"', ''); + if (!decimal.endsWith('_')) { + return value; + } + var indexOfUnderscore = decimal.indexOf('_'); + var decimalLength = decimal.length; + decimal = decimal.substring(0, indexOfUnderscore); + return (dmsCoordinateParts[0] + + "'" + + decimalParts[0] + + '.' + + decimal.padEnd(decimalLength, '0') + + '"'); + }; + MaskedTextField.prototype.render = function () { + var _this = this; + // @ts-expect-error ts-migrate(2339) FIXME: Property 'label' does not exist on type 'Readonly<... Remove this comment to see the full error message + // eslint-disable-next-line no-unused-vars + var _a = this.props, label = _a.label, addon = _a.addon, onChange = _a.onChange, value = _a.value, args = __rest(_a, ["label", "addon", "onChange", "value"]); + return (React.createElement("div", { className: "flex-1" }, + React.createElement(Group, null, + label != null ? (React.createElement("div", { className: "p-2 shrink-0 grow-0", style: { + minWidth: '120px', + } }, + label, + "\u00A0")) : null, + React.createElement(MaskedInput, __assign({ className: "inline-block w-full whitespace-nowrap shrink", value: value, keepCharPositions: true, onChange: function (e) { + ; + _this.props.onChange(e.target.value); + }, pipe: function (value) { return _this.padEndWithZeros(value); }, render: function (setRef, _a) { + var defaultValue = _a.defaultValue, props = __rest(_a, ["defaultValue"]); + return (React.createElement(TextField, __assign({ size: "small", fullWidth: true, variant: "outlined", id: label, inputRef: function (ref) { + setRef(ref); + _this.ref = ref; + }, value: defaultValue || '' }, props))); + } }, args)), + addon != null ? (React.createElement("label", { className: "p-2 shrink-0 grow-0" }, addon)) : null))); + }; + return MaskedTextField; +}(React.Component)); +export default MaskedTextField; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFza2VkLXRleHQtZmllbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy9pbnB1dHMvbWFza2VkLXRleHQtZmllbGQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sS0FBSyxNQUFNLHNDQUFzQyxDQUFBO0FBQ3hELE9BQU8sV0FBaUMsTUFBTSxpQkFBaUIsQ0FBQTtBQUMvRCxPQUFPLFNBQVMsTUFBTSx5QkFBeUIsQ0FBQTtBQUMvQztJQUE4QixtQ0FBaUM7SUFBL0Q7UUFBQSxxRUFrR0M7UUFoR0MsZUFBUyxHQUFHLFNBQVMsQ0FBQTs7SUFnR3ZCLENBQUM7SUEvRkMseUNBQWUsR0FBZixVQUFnQixLQUFVO1FBQ3hCLG9GQUFvRjtRQUNwRix1RUFBdUU7UUFDdkUsNERBQTREO1FBQzVELG9FQUFvRTtRQUNwRSxJQU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ay0wIGdyb3ctMFwiXG4gICAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgICAgbWluV2lkdGg6ICcxMjBweCcsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIHtsYWJlbH1cbiAgICAgICAgICAgICAgJm5ic3A7XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICA8TWFza2VkSW5wdXRcbiAgICAgICAgICAgIGNsYXNzTmFtZT1cImlubGluZS1ibG9jayB3LWZ1bGwgd2hpdGVzcGFjZS1ub3dyYXAgc2hyaW5rXCJcbiAgICAgICAgICAgIHZhbHVlPXt2YWx1ZX1cbiAgICAgICAgICAgIGtlZXBDaGFyUG9zaXRpb25zXG4gICAgICAgICAgICBvbkNoYW5nZT17KGU6IGFueSkgPT4ge1xuICAgICAgICAgICAgICA7KHRoaXMucHJvcHMgYXMgYW55KS5vbkNoYW5nZShlLnRhcmdldC52YWx1ZSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBwaXBlPXsodmFsdWU6IGFueSkgPT4gdGhpcy5wYWRFbmRXaXRoWmVyb3ModmFsdWUpfVxuICAgICAgICAgICAgcmVuZGVyPXsoc2V0UmVmOiBhbnksIHsgZGVmYXVsdFZhbHVlLCAuLi5wcm9wcyB9OiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgICAgICAgICAgICB2YXJpYW50PVwib3V0bGluZWRcIlxuICAgICAgICAgICAgICAgICAgaWQ9e2xhYmVsfVxuICAgICAgICAgICAgICAgICAgaW5wdXRSZWY9eyhyZWYpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2V0UmVmKHJlZilcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWYgPSByZWZcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICB2YWx1ZT17ZGVmYXVsdFZhbHVlIHx8ICcnfVxuICAgICAgICAgICAgICAgICAgey4uLnByb3BzfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICB7Li4uYXJnc31cbiAgICAgICAgICAvPlxuICAgICAgICAgIHthZGRvbiAhPSBudWxsID8gKFxuICAgICAgICAgICAgPGxhYmVsIGNsYXNzTmFtZT1cInAtMiBzaHJpbmstMCBncm93LTBcIj57YWRkb259PC9sYWJlbD5cbiAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgPC9Hcm91cD5cbiAgICAgIDwvZGl2PlxuICAgIClcbiAgfVxufVxuZXhwb3J0IGRlZmF1bHQgTWFza2VkVGV4dEZpZWxkXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/location-new.d.ts b/src/main/webapp/component/location-new/location-new.d.ts new file mode 100644 index 00000000000..196e4e9b5ab --- /dev/null +++ b/src/main/webapp/component/location-new/location-new.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/location-new/location-new.js b/src/main/webapp/component/location-new/location-new.js new file mode 100644 index 00000000000..fb39b67668e --- /dev/null +++ b/src/main/webapp/component/location-new/location-new.js @@ -0,0 +1,79 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import { validateWkt, validateDd, validateDms, validateUsng, ddToWkt, dmsToWkt, usngToWkt, } from './utils'; +import { ddModel, dmsModel, usngModel } from './models'; +export default Backbone.AssociatedModel.extend({ + defaults: { + showErrors: true, + valid: true, + error: null, + mode: 'wkt', + wkt: '', + dd: ddModel, + dms: dmsModel, + usng: usngModel, + }, + initialize: function () { + this.listenTo(this, 'change:wkt change:dms change:dd change:usng change:mode', this.validate.bind(this)); + }, + isValid: function () { + return this.get('valid'); + }, + /* + * Return the active input converted to WKT. If the input failed validation, return "INVALID". + * If the input is blank, return null. + */ + getValue: function () { + if (!this.isValid()) { + return 'INVALID'; + } + var mode = this.get('mode'); + switch (mode) { + case 'wkt': + return this.get(mode); + case 'dd': + return ddToWkt(this.get(mode)); + case 'dms': + return dmsToWkt(this.get(mode)); + case 'usng': + return usngToWkt(this.get(mode)); + default: + return null; + } + }, + /* Run the appropriate validator for the active mode. Blank input is considered valid */ + validate: function () { + var mode = this.get('mode'); + var validationReport; + switch (mode) { + case 'wkt': + validationReport = validateWkt(this.get(mode)); + break; + case 'dd': + validationReport = validateDd(this.get(mode)); + break; + case 'dms': + validationReport = validateDms(this.get(mode)); + break; + case 'usng': + validationReport = validateUsng(this.get(mode)); + break; + } + this.set('valid', validationReport ? validationReport.valid : true); + this.set('error', validationReport ? validationReport.error : false); + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24tbmV3LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL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saWQgKi9cbiAgdmFsaWRhdGUoKSB7XG4gICAgY29uc3QgbW9kZSA9IHRoaXMuZ2V0KCdtb2RlJylcbiAgICBsZXQgdmFsaWRhdGlvblJlcG9ydFxuICAgIHN3aXRjaCAobW9kZSkge1xuICAgICAgY2FzZSAnd2t0JzpcbiAgICAgICAgdmFsaWRhdGlvblJlcG9ydCA9IHZhbGlkYXRlV2t0KHRoaXMuZ2V0KG1vZGUpKVxuICAgICAgICBicmVha1xuICAgICAgY2FzZSAnZGQnOlxuICAgICAgICB2YWxpZGF0aW9uUmVwb3J0ID0gdmFsaWRhdGVEZCh0aGlzLmdldChtb2RlKSlcbiAgICAgICAgYnJlYWtcbiAgICAgIGNhc2UgJ2Rtcyc6XG4gICAgICAgIHZhbGlkYXRpb25SZXBvcnQgPSB2YWxpZGF0ZURtcyh0aGlzLmdldChtb2RlKSlcbiAgICAgICAgYnJlYWtcbiAgICAgIGNhc2UgJ3VzbmcnOlxuICAgICAgICB2YWxpZGF0aW9uUmVwb3J0ID0gdmFsaWRhdGVVc25nKHRoaXMuZ2V0KG1vZGUpKVxuICAgICAgICBicmVha1xuICAgIH1cbiAgICB0aGlzLnNldCgndmFsaWQnLCB2YWxpZGF0aW9uUmVwb3J0ID8gdmFsaWRhdGlvblJlcG9ydC52YWxpZCA6IHRydWUpXG4gICAgdGhpcy5zZXQoJ2Vycm9yJywgdmFsaWRhdGlvblJlcG9ydCA/IHZhbGlkYXRpb25SZXBvcnQuZXJyb3IgOiBmYWxzZSlcbiAgfSxcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/location-new.view.d.ts b/src/main/webapp/component/location-new/location-new.view.d.ts new file mode 100644 index 00000000000..7deae9d5ca6 --- /dev/null +++ b/src/main/webapp/component/location-new/location-new.view.d.ts @@ -0,0 +1,10 @@ +/// +type LocationInputReactPropsType = { + value: string; + onChange: (val: string) => void; + isStateDirty?: boolean; + resetIsStateDirty?: () => void; +}; +export declare const LocationInputReact: ({ value, onChange, isStateDirty, resetIsStateDirty, }: LocationInputReactPropsType) => JSX.Element; +declare const _default: ({ value, onChange, isStateDirty, resetIsStateDirty, }: LocationInputReactPropsType) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/location-new/location-new.view.js b/src/main/webapp/component/location-new/location-new.view.js new file mode 100644 index 00000000000..1959d07a831 --- /dev/null +++ b/src/main/webapp/component/location-new/location-new.view.js @@ -0,0 +1,58 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import LocationComponent from './location'; +import { ddToWkt, dmsToWkt, usngToWkt } from './utils'; +import { hot } from 'react-hot-loader'; +import LocationNewModel from './location-new'; +export var LocationInputReact = function (_a) { + var value = _a.value, onChange = _a.onChange, _b = _a.isStateDirty, isStateDirty = _b === void 0 ? false : _b, _c = _a.resetIsStateDirty, resetIsStateDirty = _c === void 0 ? function () { } : _c; + var _d = __read(React.useState(new LocationNewModel({ wkt: value, mode: 'wkt' }).toJSON()), 2), state = _d[0], setState = _d[1]; + React.useEffect(function () { + if (isStateDirty) { + setState(new LocationNewModel({ wkt: value, mode: state.mode }).toJSON()); + resetIsStateDirty(); + } + }, [isStateDirty]); + React.useEffect(function () { + if (state.valid) { + switch (state.mode) { + case 'wkt': + onChange(state.wkt); + break; + case 'dd': + onChange(ddToWkt(state.dd)); + break; + case 'dms': + onChange(dmsToWkt(state.dms)); + break; + case 'usng': + onChange(usngToWkt(state.usng)); + break; + case 'keyword': + onChange(state.keyword ? state.keyword.wkt : null); + break; + default: + } + } + else { + onChange('INVALID'); + } + }, [state]); + return React.createElement(LocationComponent, { state: state, options: {}, setState: setState }); +}; +export default hot(module)(LocationInputReact); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24tbmV3LnZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy9sb2NhdGlvbi1uZXcudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLGlCQUE2QyxNQUFNLFlBQVksQ0FBQTtBQUN0RSxPQUFPLEVBQUUsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsTUFBTSxTQUFTLENBQUE7QUFDdEQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBRXRDLE9BQU8sZ0JBQWdCLE1BQU0sZ0JBQWdCLENBQUE7QUFTN0MsTUFBTSxDQUFDLElBQU0sa0JBQWtCLEdBQUcsVUFBQyxFQUtMO1FBSjVCLEtBQUssV0FBQSxFQUNMLFFBQVEsY0FBQSxFQUNSLG9CQUFvQixFQUFwQixZQUFZLG1CQUFHLEtBQUssS0FBQSxFQUNwQix5QkFBNEIsRUFBNUIsaUJBQWlCLG1CQUFHLGNBQU8sQ0FBQyxLQUFBO0lBRXRCLElBQUEsS0FBQSxPQUFvQixLQUFLLENBQUMsUUFBUSxDQUN0QyxJQUFJLGdCQUFnQixDQUFDLEVBQUUsR0FBRyxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQyxNQUFNLEVBQUUsQ0FDM0QsSUFBQSxFQUZNLEtBQUssUUFBQSxFQUFFLFFBQVEsUUFFckIsQ0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sc2Uge1xuICAgICAgb25DaGFuZ2UoJ0lOVkFMSUQnKVxuICAgIH1cbiAgfSwgW3N0YXRlXSlcblxuICByZXR1cm4gPExvY2F0aW9uQ29tcG9uZW50IHN0YXRlPXtzdGF0ZX0gb3B0aW9ucz17e319IHNldFN0YXRlPXtzZXRTdGF0ZX0gLz5cbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoTG9jYXRpb25JbnB1dFJlYWN0KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/location.d.ts b/src/main/webapp/component/location-new/location.d.ts new file mode 100644 index 00000000000..7906339de8b --- /dev/null +++ b/src/main/webapp/component/location-new/location.d.ts @@ -0,0 +1,41 @@ +/// +export type LocationInputPropsType = { + dd: { + boundingBox: { + north: string; + south: string; + east: string; + west: string; + }; + circle: { + point: { + latitude: string; + longitude: string; + }; + radius: string; + units: 'meters'; + }; + line: { + list: any[]; + }; + point: { + latitude: string; + longitude: string; + }; + polygon: { + list: any[]; + }; + shape: 'point'; + }; + keyword: any; + dms: any; + error: null | string; + mode: 'wkt' | 'dd' | 'dms' | 'usng' | 'keyword'; + setState: any; + showErrors: boolean; + usng: any; + valid: boolean; + wkt: string; +}; +declare const _default: ({ state, setState }: any) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/location-new/location.js b/src/main/webapp/component/location-new/location.js new file mode 100644 index 00000000000..db597bfafd9 --- /dev/null +++ b/src/main/webapp/component/location-new/location.js @@ -0,0 +1,115 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { validateWkt, validateDd, validateDms, validateUsng } from './utils'; +import { Radio, RadioItem } from '../../react-component/radio/radio'; +import { WKT, LatLongDD, LatLongDMS, USNG } from './geo-components'; +import Gazetteer from '../../react-component/location/gazetteer'; +import CQLUtils from '../../js/CQLUtils'; +import immer from 'immer.1.5.0'; +var produce = immer; +import { hot } from 'react-hot-loader'; +var inputs = { + wkt: { + label: 'WKT', + Component: WKT, + }, + dd: { + label: 'Lat/Lon (DD)', + Component: LatLongDD, + }, + dms: { + label: 'Lat/Lon (DMS)', + Component: LatLongDMS, + }, + usng: { + label: 'USNG/MGRS', + Component: USNG, + }, + keyword: { + label: 'Keyword', + Component: function (props) { + var keyword = props.keyword; + return (React.createElement(Gazetteer, { placeholder: 'Enter a location', value: keyword ? keyword.keywordValue : '', setState: props.setState(function (draft, value) { + value.type = + value.polyType.toLowerCase() === 'polygon' + ? 'POLYGON' + : 'MULTIPOLYGON'; + value.keywordValue = value.value; + value.mode = 'keyword'; + value.wkt = CQLUtils.generateFilter(undefined, 'location', value, undefined).value; + draft.keyword = value; + // onFieldEdit(field.id, location) + }) })); + }, + }, +}; +var validate = function (_a) { + var state = _a.state, setState = _a.setState; + var mode = state.mode; + var validationReport; + switch (mode) { + case 'wkt': + validationReport = validateWkt(state[mode]); + break; + case 'dd': + validationReport = validateDd(state[mode]); + break; + case 'dms': + validationReport = validateDms(state[mode]); + break; + case 'usng': + validationReport = validateUsng(state[mode]); + break; + } + setState(__assign(__assign({}, state), { valid: validationReport ? validationReport.valid : true, error: validationReport ? validationReport.error : false })); +}; +var LocationInput = function (props) { + var mode = props.mode, valid = props.valid, error = props.error, showErrors = props.showErrors, setState = props.setState; + var input = inputs[mode] || {}; + var _a = input.Component, Component = _a === void 0 ? null : _a; + React.useEffect(function () { + validate({ + state: props, + setState: props.setState(function (draft, value) { + draft.valid = value.valid; + draft.error = value.error; + return draft; + }), + }); + }, [props]); + return (React.createElement("div", null, + React.createElement(Radio, { value: mode, onChange: setState(function (draft, value) { return (draft.mode = value); }) }, Object.keys(inputs).map(function (key) { return (React.createElement(RadioItem, { key: key, value: key }, inputs[key].label)); })), + React.createElement("div", { className: "form-group flow-root mt-2" }, + Component !== null ? React.createElement(Component, __assign({}, props)) : null, + React.createElement("div", { className: "for-error whitespace-pre-line ".concat(!valid && showErrors ? '' : 'invisible'), style: { + width: '400px', + maxWidth: '100%', + } }, + React.createElement("span", { className: "fa fa-exclamation-triangle" }), + " ", + error)))); +}; +export default hot(module)(function (_a) { + var state = _a.state, setState = _a.setState; + return (React.createElement(LocationInput, __assign({}, state, { setState: function (producer) { return function (value) { + var nextState = produce(state, function (draft) { + producer(draft, value); + }); + setState(nextState); + }; } }))); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy9sb2NhdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQUUsV0FBVyxFQUFFLFlBQVksRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUM1RSxPQUFPLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLG1DQUFtQyxDQUFBO0FBQ3BFLE9BQU8sRUFBRSxHQUFHLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxJQUFJLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUNuRSxPQUFPLFNBQVMsTUFBTSwwQ0FBMEMsQ0FBQTtBQUNoRSxPQUFPLFFBQVEsTUFBTSxtQkFBbUIsQ0FBQTtBQUN4QyxPQUFPLEtBQUssTUFBTS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mVsOiAnTGF0L0xvbiAoRE1TKScsXG4gICAgQ29tcG9uZW50OiBMYXRMb25nRE1TLFxuICB9LFxuICB1c25nOiB7XG4gICAgbGFiZWw6ICdVU05HL01HUlMnLFxuICAgIENvbXBvbmVudDogVVNORyxcbiAgfSxcbiAga2V5d29yZDoge1xuICAgIGxhYmVsOiAnS2V5d29yZCcsXG4gICAgQ29tcG9uZW50OiAocHJvcHM6IExvY2F0aW9uSW5wdXRQcm9wc1R5cGUpID0+IHtcbiAgICAgIGNvbnN0IHsga2V5d29yZCB9ID0gcHJvcHNcbiAgICAgIHJldHVybiAoXG4gICAgICAgIDxHYXpldHRlZXJcbiAgICAgICAgICBwbGFjZWhvbGRlcj17J0VudGVyIGEgbG9jYXRpb24nfVxuICAgICAgICAgIHZhbHVlPXtrZXl3b3JkID8ga2V5d29yZC5rZXl3b3JkVmFsdWUgOiAnJ31cbiAgICAgICAgICBzZXRTdGF0ZT17cHJvcHMuc2V0U3RhdGUoXG4gICAgICAgICAgICAoZHJhZnQ6IExvY2F0aW9uSW5wdXRQcm9wc1R5cGUsIHZhbHVlOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgdmFsdWUudHlwZSA9XG4gICAgICAgICAgICAgICAgdmFsdWUucG9seVR5cGUudG9Mb3dlckNhc2UoKSA9PT0gJ3BvbHlnb24nXG4gICAgICAgICAgICAgICAgICA/ICdQT0xZR09OJ1xuICAgICAgICAgICAgICAgICAgOiAnTVVMVElQT0xZR09OJ1xuICAgICAgICAgICAgICB2YWx1ZS5rZXl3b3JkVmFsdWUgPSB2YWx1ZS52YWx1ZVxuICAgICAgICAgICAgICB2YWx1ZS5tb2RlID0gJ2tleXdvcmQnXG5cbiAgICAgICAgICAgICAgdmFsdWUud2t0ID0gQ1FMVXRpbHMuZ2VuZXJhdGVGaWx0ZXIoXG4gICAgICAgICAgICAgICAgdW5kZWZpbmVkLFxuICAgICAgICAgICAgICAgICdsb2NhdGlvbicsXG4gICAgICAgICAgICAgICAgdmF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B7Li4ucHJvcHN9IC8+IDogbnVsbH1cbiAgICAgICAgPGRpdlxuICAgICAgICAgIGNsYXNzTmFtZT17YGZvci1lcnJvciB3aGl0ZXNwYWNlLXByZS1saW5lICR7XG4gICAgICAgICAgICAhdmFsaWQgJiYgc2hvd0Vycm9ycyA/ICcnIDogJ2ludmlzaWJsZSdcbiAgICAgICAgICB9YH1cbiAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgd2lkdGg6ICc0MDBweCcsXG4gICAgICAgICAgICBtYXhXaWR0aDogJzEwMCUnLFxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9XCJmYSBmYS1leGNsYW1hdGlvbi10cmlhbmdsZVwiIC8+IHtlcnJvcn1cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKSgoeyBzdGF0ZSwgc2V0U3RhdGUgfTogYW55KSA9PiAoXG4gIDxMb2NhdGlvbklucHV0XG4gICAgey4uLnN0YXRlfVxuICAgIHNldFN0YXRlPXsocHJvZHVjZXI6IGFueSkgPT4gKHZhbHVlOiBhbnkpID0+IHtcbiAgICAgIGNvbnN0IG5leHRTdGF0ZSA9IHByb2R1Y2Uoc3RhdGUsIChkcmFmdDogYW55KSA9PiB7XG4gICAgICAgIHByb2R1Y2VyKGRyYWZ0LCB2YWx1ZSlcbiAgICAgIH0pXG4gICAgICBzZXRTdGF0ZShuZXh0U3RhdGUpXG4gICAgfX1cbiAgLz5cbikpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/models/dd-model.d.ts b/src/main/webapp/component/location-new/models/dd-model.d.ts new file mode 100644 index 00000000000..8e57027be22 --- /dev/null +++ b/src/main/webapp/component/location-new/models/dd-model.d.ts @@ -0,0 +1,45 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export declare const ddPoint: { + latitude: string; + longitude: string; +}; +export declare const ddModel: { + shape: string; + point: { + latitude: string; + longitude: string; + }; + circle: { + point: { + latitude: string; + longitude: string; + }; + radius: string; + units: string; + }; + line: { + list: never[]; + }; + polygon: { + list: never[]; + }; + boundingbox: { + north: string; + south: string; + east: string; + west: string; + }; +}; diff --git a/src/main/webapp/component/location-new/models/dd-model.js b/src/main/webapp/component/location-new/models/dd-model.js new file mode 100644 index 00000000000..2234634999e --- /dev/null +++ b/src/main/webapp/component/location-new/models/dd-model.js @@ -0,0 +1,41 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export var ddPoint = { + latitude: '', + longitude: '', +}; +export var ddModel = { + shape: 'point', + point: __assign({}, ddPoint), + circle: { + point: __assign({}, ddPoint), + radius: '1', + units: 'meters', + }, + line: { + list: [], + }, + polygon: { + list: [], + }, + boundingbox: { + north: '', + south: '', + east: '', + west: '', + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGQtbW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93Z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3Q6ICcnLFxuICAgIHdlc3Q6ICcnLFxuICB9LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/models/dms-model.d.ts b/src/main/webapp/component/location-new/models/dms-model.d.ts new file mode 100644 index 00000000000..d51d6badd56 --- /dev/null +++ b/src/main/webapp/component/location-new/models/dms-model.d.ts @@ -0,0 +1,61 @@ +export declare const dmsPoint: { + latitude: { + coordinate: string; + direction: "N"; + }; + longitude: { + coordinate: string; + direction: "E"; + }; +}; +export declare const dmsModel: { + shape: string; + point: { + latitude: { + coordinate: string; + direction: "N"; + }; + longitude: { + coordinate: string; + direction: "E"; + }; + }; + circle: { + point: { + latitude: { + coordinate: string; + direction: "N"; + }; + longitude: { + coordinate: string; + direction: "E"; + }; + }; + radius: string; + units: string; + }; + line: { + list: never[]; + }; + polygon: { + list: never[]; + }; + boundingbox: { + north: { + coordinate: string; + direction: "N"; + }; + south: { + coordinate: string; + direction: "N"; + }; + east: { + coordinate: string; + direction: "E"; + }; + west: { + coordinate: string; + direction: "E"; + }; + }; +}; diff --git a/src/main/webapp/component/location-new/models/dms-model.js b/src/main/webapp/component/location-new/models/dms-model.js new file mode 100644 index 00000000000..e4e5fb57026 --- /dev/null +++ b/src/main/webapp/component/location-new/models/dms-model.js @@ -0,0 +1,50 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { Direction } from '../utils/dms-utils'; +var dmsLatitude = { + coordinate: '', + direction: Direction.North, +}; +var dmsLongitude = { + coordinate: '', + direction: Direction.East, +}; +export var dmsPoint = { + latitude: __assign({}, dmsLatitude), + longitude: __assign({}, dmsLongitude), +}; +export var dmsModel = { + shape: 'point', + point: __assign({}, dmsPoint), + circle: { + point: __assign({}, dmsPoint), + radius: '1', + units: 'meters', + }, + line: { + list: [], + }, + polygon: { + list: [], + }, + boundingbox: { + north: __assign({}, dmsLatitude), + south: __assign({}, dmsLatitude), + east: __assign({}, dmsLongitude), + west: __assign({}, dmsLongitude), + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG1zLW1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1uZXcvbW9kZWxzL2Rtcy1tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQTtBQUU5QyxJQUFNLFdBQVcsR0FBRztJQUNsQixVQUFVLEVBQUUsRUFBRTtJQUNkLFNBQVMsRUFBRSxTQUFTLENBQUMsS0FBSztDQUMzQixDQUFBO0FBRUQsSUFBTSxZQUFZLEdBQUc7SUFDbkIsVUFBVSxFQUFFLEVBQUU7SUFDZCxTQUFTLEVBQUUsU0FBUyxDQUFDLElBQUk7Q0FDMUIsQ0FBQTtBQUVELE1BQU0sQ0FBQyxJQUFNLFFBQVEsR0FBRztJQUN0QixRQUFRLGVBQU8sV0FBVyxDQUFFO0lBQzVCLFNBQVMsZUFBTyxZQUFZLENBQUU7Q0FDL0IsQ0FBQTtBQUVELE1BQU0sQ0FBQyxJQUFNLFFBQVEsR0FBRztJQUN0QixLQUFLLEVBQUUsT0FBTztJQUNkLEtBQUssZUFBTyxRQUFRLENBQUU7SUFDdEIsTUFBTSxFQUFFO1FBQ04sS0FBSyxlQUFPLFFBQVEsQ0FB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0aXR1ZGUgfSxcbiAgICBlYXN0OiB7IC4uLmRtc0xvbmdpdHVkZSB9LFxuICAgIHdlc3Q6IHsgLi4uZG1zTG9uZ2l0dWRlIH0sXG4gIH0sXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/models/index.d.ts b/src/main/webapp/component/location-new/models/index.d.ts new file mode 100644 index 00000000000..086627e79cc --- /dev/null +++ b/src/main/webapp/component/location-new/models/index.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { ddPoint, ddModel } from './dd-model'; +import { dmsPoint, dmsModel } from './dms-model'; +import usngModel from './usng-model'; +export { ddPoint, dmsPoint, ddModel, dmsModel, usngModel }; diff --git a/src/main/webapp/component/location-new/models/index.js b/src/main/webapp/component/location-new/models/index.js new file mode 100644 index 00000000000..8569a53e263 --- /dev/null +++ b/src/main/webapp/component/location-new/models/index.js @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { ddPoint, ddModel } from './dd-model'; +import { dmsPoint, dmsModel } from './dms-model'; +import usngModel from './usng-model'; +export { ddPoint, dmsPoint, ddModel, dmsModel, usngModel }; +//# sourceMappingURL=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Fk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgeyBkZFBvaW50LCBkZE1vZGVsIH0gZnJvbSAnLi9kZC1tb2RlbCdcblxuaW1wb3J0IHsgZG1zUG9pbnQsIGRtc01vZGVsIH0gZnJvbSAnLi9kbXMtbW9kZWwnXG5pbXBvcnQgdXNuZ01vZGVsIGZyb20gJy4vdXNuZy1tb2RlbCdcblxuZXhwb3J0IHsgZGRQb2ludCwgZG1zUG9pbnQsIGRkTW9kZWwsIGRtc01vZGVsLCB1c25nTW9kZWwgfVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/models/usng-model.d.ts b/src/main/webapp/component/location-new/models/usng-model.d.ts new file mode 100644 index 00000000000..f1726a9ac07 --- /dev/null +++ b/src/main/webapp/component/location-new/models/usng-model.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const usngModel: { + shape: string; + point: string; + circle: { + point: string; + radius: string; + units: string; + }; + line: { + list: never[]; + }; + polygon: { + list: never[]; + }; + boundingbox: string; +}; +export default usngModel; diff --git a/src/main/webapp/component/location-new/models/usng-model.js b/src/main/webapp/component/location-new/models/usng-model.js new file mode 100644 index 00000000000..1a1e3f95235 --- /dev/null +++ b/src/main/webapp/component/location-new/models/usng-model.js @@ -0,0 +1,32 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +var usngModel = { + shape: 'point', + point: '', + circle: { + point: '', + radius: '', + units: 'meters', + }, + line: { + list: [], + }, + polygon: { + list: [], + }, + boundingbox: '', +}; +export default usngModel; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNuZy1tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvbG9jYXRpb24tbmV3L21vZGVscy91c25nLW1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixJQUFNLFNBQVMsR0FBRztJQUNoQixLQUFLLEVBQUUsT0FBTztJQUNkLEtBQUssRUFBRSxFQUFFO0lBQ1QsTUFBTSxFQUFFO1FBQ04sS0FBSyxFQUFFLEVBQUU7UUFDVCxNQUFNLEVBQUUsRUFBRTtRQUNWLEtBQUssRUFBRSxRQUFR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biBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmNvbnN0IHVzbmdNb2RlbCA9IHtcbiAgc2hhcGU6ICdwb2ludCcsXG4gIHBvaW50OiAnJyxcbiAgY2lyY2xlOiB7XG4gICAgcG9pbnQ6ICcnLFxuICAgIHJhZGl1czogJycsXG4gICAgdW5pdHM6ICdtZXRlcnMnLFxuICB9LFxuICBsaW5lOiB7XG4gICAgbGlzdDogW10sXG4gIH0sXG4gIHBvbHlnb246IHtcbiAgICBsaXN0OiBbXSxcbiAgfSxcbiAgYm91bmRpbmdib3g6ICcnLFxufVxuXG5leHBvcnQgZGVmYXVsdCB1c25nTW9kZWxcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/location-new/utils/dd-utils.d.ts b/src/main/webapp/component/location-new/utils/dd-utils.d.ts new file mode 100644 index 00000000000..6b9add8a8ce --- /dev/null +++ b/src/main/webapp/component/location-new/utils/dd-utils.d.ts @@ -0,0 +1,7 @@ +declare function ddToWkt(dd: any): string | null | undefined; +declare function validateDdPoint(point: any): boolean; +declare function validateDd(dd: any): { + valid: boolean; + error: string | null; +}; +export { ddToWkt, validateDd, validateDdPoint }; diff --git a/src/main/webapp/component/location-new/utils/dd-utils.js b/src/main/webapp/component/location-new/utils/dd-utils.js new file mode 100644 index 00000000000..6f8e31f7ab0 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/dd-utils.js @@ -0,0 +1,209 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wkx from 'wkx'; +import { computeCircle, toKilometers } from './geo-helper'; +import errorMessages from './errors'; +var ddRegex = new RegExp('^-?[0-9]*.?[0-9]*$'); +var minimumDifference = 0.0001; +function ddCoordinateIsBlank(coordinate) { + return coordinate.length === 0; +} +function ddPointIsBlank(point) { + return (ddCoordinateIsBlank(point.latitude) && ddCoordinateIsBlank(point.longitude)); +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function inputIsBlank(dd) { + switch (dd.shape) { + case 'point': + return ddPointIsBlank(dd.point); + case 'circle': + return ddPointIsBlank(dd.circle.point); + case 'line': + return dd.line.list.length === 0; + case 'polygon': + return dd.polygon.list.length === 0; + case 'boundingbox': + return (ddCoordinateIsBlank(dd.boundingbox.north) && + ddCoordinateIsBlank(dd.boundingbox.south) && + ddCoordinateIsBlank(dd.boundingbox.east) && + ddCoordinateIsBlank(dd.boundingbox.west)); + } +} +/* + * Decimal degrees -> WKT conversion utils + */ +function ddPointToWkt(point) { + return new wkx.Point(point.longitude, point.latitude); +} +function ddToWkt(dd) { + var _a; + if (inputIsBlank(dd)) { + return null; + } + var wkt = null; + var points = []; + switch (dd.shape) { + case 'point': + wkt = ddPointToWkt(dd.point).toWkt(); + break; + case 'circle': + if (!isNaN(dd.circle.point.latitude) && + !isNaN(dd.circle.point.longitude) && + dd.circle.radius > 0) { + var distance = toKilometers(dd.circle.radius, dd.circle.units); + wkt = (_a = computeCircle(ddPointToWkt(dd.circle.point), distance, 36)) === null || _a === void 0 ? void 0 : _a.toWkt(); + } + break; + case 'line': + if (dd.line.list.length > 0) { + dd.line.list.map(function (point) { return points.push(ddPointToWkt(point)); }); + wkt = new wkx.LineString(points).toWkt(); + } + break; + case 'polygon': + if (dd.polygon.list.length > 0) { + dd.polygon.list.map(function (point) { return points.push(ddPointToWkt(point)); }); + var p1 = points[0]; + var p2 = points[points.length - 1]; + if (p1.x !== p2.x || p1.y !== p2.y) { + points.push(new wkx.Point(p1.x, p1.y)); + } + wkt = new wkx.Polygon(points).toWkt(); + } + break; + case 'boundingbox': + var nw = new wkx.Point(dd.boundingbox.west, dd.boundingbox.north); + var ne = new wkx.Point(dd.boundingbox.east, dd.boundingbox.north); + var se = new wkx.Point(dd.boundingbox.east, dd.boundingbox.south); + var sw = new wkx.Point(dd.boundingbox.west, dd.boundingbox.south); + wkt = new wkx.Polygon([nw, ne, se, sw, nw]).toWkt(); + break; + } + return wkt; +} +/* + * Decimal degrees validation utils + */ +function parseDdCoordinate(coordinate) { + if (ddRegex.exec(coordinate) == null) { + return null; + } + var _coordinate = parseFloat(coordinate); + if (isNaN(_coordinate)) { + return null; + } + return _coordinate; +} +function inValidRange(coordinate, maximum) { + return coordinate >= -1 * maximum && coordinate <= maximum; +} +function validateDdPoint(point) { + var latitude = parseDdCoordinate(point.latitude); + var longitude = parseDdCoordinate(point.longitude); + if (latitude && longitude) { + return inValidRange(latitude, 90) && inValidRange(longitude, 180); + } + return false; +} +function validateDdBoundingBox(boundingbox) { + var north = parseDdCoordinate(boundingbox.north); + var south = parseDdCoordinate(boundingbox.south); + var east = parseDdCoordinate(boundingbox.east); + var west = parseDdCoordinate(boundingbox.west); + if (north == null || south == null || east == null || west == null) { + return false; + } + if (!inValidRange(north, 90) || + !inValidRange(south, 90) || + !inValidRange(east, 180) || + !inValidRange(west, 180)) { + return false; + } + if (north < south || east < west) { + return false; + } + if (north - south < minimumDifference || east - west < minimumDifference) { + return false; + } + return true; +} +function validateDd(dd) { + if (inputIsBlank(dd)) { + return { valid: true, error: null }; + } + var valid = true; + var error = null; + switch (dd.shape) { + case 'point': + if (!validateDdPoint(dd.point)) { + valid = false; + error = errorMessages.invalidCoordinates; + } + break; + case 'circle': + var radius = parseFloat(dd.circle.radius); + if (isNaN(radius) || + radius <= 0 || + toKilometers(radius, dd.circle.units) > 10000) { + valid = false; + error = errorMessages.invalidRadius; + } + else if (!validateDdPoint(dd.circle.point)) { + valid = false; + error = errorMessages.invalidCoordinates; + } + break; + case 'line': + if (!dd.line.list.every(validateDdPoint)) { + valid = false; + error = errorMessages.invalidList; + } + else if (dd.line.list.length < 2) { + valid = false; + error = errorMessages.tooFewPointsLine; + } + break; + case 'polygon': + if (!dd.polygon.list.every(validateDdPoint)) { + valid = false; + error = errorMessages.invalidList; + } + else if (dd.polygon.list.length < 3) { + valid = false; + error = errorMessages.tooFewPointsPolygon; + } + break; + case 'boundingbox': + if (!validateDdPoint({ + latitude: dd.boundingbox.north, + longitude: dd.boundingbox.east, + }) || + !validateDdPoint({ + latitude: dd.boundingbox.south, + longitude: dd.boundingbox.west, + })) { + valid = false; + error = errorMessages.invalidCoordinates; + } + else if (!validateDdBoundingBox(dd.boundingbox)) { + valid = false; + error = errorMessages.invalidBoundingBoxDd; + } + break; + } + return { valid: valid, error: error }; +} +export { ddToWkt, validateDd, validateDdPoint }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGQtdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy91dGlscy9kZC11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxHQUFHLE1BQU0sS0FBSyxDQUFBO0FBRXJCLE9BQU8sRUFBRSxhQUFhLEVBQUUsWUFBWSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQzFELE9BQU8sYUFBYSxNQUFNLFVBQVUsQ0FBQTtBQUVwQyxJQUFNLE9BQU8sR0FBRyxJQUFJLE1BQU0sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFBO0FBQ2hELElBQU0saUJBQWlCLEdBQUcsTUFBTSxDQUFBO0FBRWhDLFNBQVMsbUJBQW1CLENBQUMsVUFBZTtJQUMxQyxPQUFPLFVBQVUsQ0FBQyxNQUFNLEtBQUssQ0FB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BvaW50KS50b1drdCgpXG4gICAgICBicmVha1xuICAgIGNhc2UgJ2NpcmNsZSc6XG4gICAgICBpZiAoXG4gICAgICAgICFpc05hTihkZC5jaXJjbGUucG9pbnQubGF0aXR1ZGUpICYmXG4gICAgICAgICFpc05hTihkZC5jaXJjbGUucG9pbnQubG9uZ2l0dWRlKSAmJlxuICAgICAgICBkZC5jaXJjbGUucmFkaXVzID4gMFxuICAgICAgKSB7XG4gICAgICAgIGNvbnN0IGRpc3RhbmNlID0gdG9LaWxvbWV0ZXJzKGRkLmNpcmNsZS5yYWRpdXMsIGRkLmNpcmNsZS51bml0cylcbiAgICAgICAgd2t0ID0gY29tcHV0ZUNpcmNsZShcbiAgICAgICAgICBkZFBvaW50VG9Xa3QoZGQuY2lyY2xlLnBvaW50KSxcbiAgICAgICAgICBkaXN0YW5jZSxcbiAgICAgICAgICAzNlxuICAgICAgICApPy50b1drdCgpXG4gICAgICB9XG4gICAgICBicmVha1xuICAgIGNhc2UgJ2xpbmUnOlxuICAgICAgaWYgKGRkLmxpbmUubGlzdC5sZW5ndGggPiAwKSB7XG4gICAgICAgIGRkLmxpbmUubGlzdC5tYXAoKHBvaW50OiBhbnkpID0+IHBvaW50cy5wdXNoKGRkUG9pbnRUb1drdChwb2ludCkpKVxuICAgICAgICB3a3QgPSBuZXcgd2t4LkxpbmVTdHJpbmcocG9pbnRzKS50b1drdCgpXG4gICAgICB9XG4gICAgICBicmVha1xuICAgIGNhc2UgJ3BvbHlnb24nOlxuICAgICAgaWYgKGRkLnBvbHlnb24ubGlzdC5sZW5ndGggPiAwKSB7XG4gICAgICAgIGRkLnBvbHlnb24ubGlzdC5tYXAoKHBvaW50OiBhbnkpID0+IHBvaW50cy5wdXNoKGRkUG9pbnRUb1drdChwb2ludCkpKVxuICAgICAgICBjb25zdCBwMSA9IHBvaW50c1swXVxuICAgICAgICBjb25zdCBwMiA9IHBvaW50c1twb2ludHMubGVuZ3RoIC0gMV1cbiAgICAgICAgaWYgKHAxLnggIT09IHAyLnggfHwgcDEueSAhPT0gcDIueSkge1xuICAgICAgICAgIHBvaW50cy5wdXNoKG5ldyB3a3guUG9pbnQocDEueCwgcDEueSkpXG4gICAgICAgIH1cbiAgICAgICAgd2t0ID0gbmV3IHdreC5Qb2x5Z29uKHBvaW50cykudG9Xa3QoKVxuICAgICAgfVxuICAgICAgYnJlYWtcbiAgICBjYXNlICdib3VuZGluZ2JveCc6XG4gICAgICBjb25zdCBudyA9IG5ldyB3a3guUG9pbnQoZGQuYm91bmRpbmdib3gud2VzdCwgZGQuYm91bmRpbmdib3gubm9ydGgpXG4gICAgICBjb25zdCBuZSA9IG5ldyB3a3guUG9pbnQoZGQuYm91bmRpbmdib3guZWFzdCwgZGQuYm91bmRpbmdib3gubm9ydGgpXG4gICAgICBjb25zdCBzZSA9IG5ldyB3a3guUG9pbnQoZGQuYm91bmRpbmdib3guZWFzdCwgZGQuYm91bmRpbmdib3guc291dGgpXG4gICAgICBjb25zdCBzdyA9IG5ldyB3a3guUG9pbnQoZGQuYm91bmRpbmdib3gud2VzdCwgZGQuYm91bmRpbmdib3guc291dGgpXG4gICAgICB3a3QgPSBuZXcgd2t4LlBvbHlnb24oW253LCBuZSwgc2UsIHN3LCBud10pLnRvV2t0KClcbiAgICAgIGJyZWFrXG4gIH1cbiAgcmV0dXJuIHdrdFxufVxuXG4vKlxuICogIERlY2ltYWwgZGVncmVlcyB2YWxpZGF0aW9uIHV0aWxzXG4gKi9cbmZ1bmN0aW9uIHBhcnNlRGRDb29yZGluYXRlKGNvb3JkaW5hdGU6IGFueSkge1xuICBpZiAoZGRSZWdleC5leGVjKGNvb3JkaW5hdGUpID09IG51bGwpIHtcbiAgICByZXR1cm4gbnVsbFxuICB9XG4gIGNvbnN0IF9jb29yZGluYXRlID0gcGFyc2VGbG9hdChjb29yZGluYXRlKVxuICBpZiAoaXNOYU4oX2Nvb3JkaW5hdGUpKSB7XG4gICAgcmV0dXJuIG51bGxcbiAgfVxuICByZXR1cm4gX2N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gaWYgKFxuICAgICAgICAhdmFsaWRhdGVEZFBvaW50KHtcbiAgICAgICAgICBsYXRpdHVkZTogZGQuYm91bmRpbmdib3gubm9ydGgsXG4gICAgICAgICAgbG9uZ2l0dWRlOiBkZC5ib3VuZGluZ2JveC5lYXN0LFxuICAgICAgICB9KSB8fFxuICAgICAgICAhdmFsaWRhdGVEZFBvaW50KHtcbiAgICAgICAgICBsYXRpdHVkZTogZGQuYm91bmRpbmdib3guc291dGgsXG4gICAgICAgICAgbG9uZ2l0dWRlOiBkZC5ib3VuZGluZ2JveC53ZXN0LFxuICAgICAgICB9KVxuICAgICAgKSB7XG4gICAgICAgIHZhbGlkID0gZmFsc2VcbiAgICAgICAgZXJyb3IgPSBlcnJvck1lc3NhZ2VzLmludmFsaWRDb29yZGluYXRlc1xuICAgICAgfSBlbHNlIGlmICghdmFsaWRhdGVEZEJvdW5kaW5nQm94KGRkLmJvdW5kaW5nYm94KSkge1xuICAgICAgICB2YWxpZCA9IGZhbHNlXG4gICAgICAgIGVycm9yID0gZXJyb3JNZXNzYWdlcy5pbnZhbGlkQm91bmRpbmdCb3hEZFxuICAgICAgfVxuICAgICAgYnJlYWtcbiAgfVxuICByZXR1cm4geyB2YWxpZCwgZXJyb3IgfVxufVxuXG5leHBvcnQgeyBkZFRvV2t0LCB2YWxpZGF0ZURkLCB2YWxpZGF0ZURkUG9pbnQgfVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/utils/dms-utils.d.ts b/src/main/webapp/component/location-new/utils/dms-utils.d.ts new file mode 100644 index 00000000000..1fd76a3ef26 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/dms-utils.d.ts @@ -0,0 +1,25 @@ +declare const Direction: Readonly<{ + North: "N"; + South: "S"; + East: "E"; + West: "W"; +}>; +declare function parseDmsCoordinate(coordinate: any): any; +declare function dmsCoordinateToDD(coordinate: any): number | null; +declare function dmsToWkt(dms: any): string | null | undefined; +declare function validateDmsPoint(point: any): boolean; +declare function validateDms(dms: any): { + valid: boolean; + error: string | null; +}; +declare function buildDmsString(components: any): any; +declare function ddToDmsCoordinateLat(dd: any, secondsPrecision?: number): { + coordinate: any; + direction: any; +} | undefined; +declare function ddToDmsCoordinateLon(dd: any, secondsPrecision?: number): { + coordinate: any; + direction: any; +} | undefined; +declare function getSecondsPrecision(dmsCoordinate: any): number | undefined; +export { dmsToWkt, validateDms, validateDmsPoint, dmsCoordinateToDD, parseDmsCoordinate, ddToDmsCoordinateLat, ddToDmsCoordinateLon, getSecondsPrecision, buildDmsString, Direction, }; diff --git a/src/main/webapp/component/location-new/utils/dms-utils.js b/src/main/webapp/component/location-new/utils/dms-utils.js new file mode 100644 index 00000000000..baa726d98c4 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/dms-utils.js @@ -0,0 +1,360 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wkx from 'wkx'; +import { computeCircle, toKilometers } from './geo-helper'; +import errorMessages from './errors'; +var dmsRegex = new RegExp('^([0-9_]*)°([0-9_]*)\'([0-9_]*\\.?[0-9_]*)"$'); +var minimumDifference = 0.0001; +var LAT_DEGREES_DIGITS = 2; +var LON_DEGREES_DIGITS = 3; +var DEFAULT_SECONDS_PRECISION = 3; +var Direction = Object.freeze({ + North: 'N', + South: 'S', + East: 'E', + West: 'W', +}); +function dmsCoordinateIsBlank(coordinate) { + return coordinate.coordinate.length === 0; +} +function dmsPointIsBlank(point) { + return (dmsCoordinateIsBlank(point.latitude) && + dmsCoordinateIsBlank(point.longitude)); +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function inputIsBlank(dms) { + switch (dms.shape) { + case 'point': + return dmsPointIsBlank(dms.point); + case 'circle': + return dmsPointIsBlank(dms.circle.point); + case 'line': + return dms.line.list.length === 0; + case 'polygon': + return dms.polygon.list.length === 0; + case 'boundingbox': + return (dmsCoordinateIsBlank(dms.boundingbox.north) && + dmsCoordinateIsBlank(dms.boundingbox.south) && + dmsCoordinateIsBlank(dms.boundingbox.east) && + dmsCoordinateIsBlank(dms.boundingbox.west)); + } +} +function parseDmsCoordinate(coordinate) { + if (coordinate === undefined) { + return coordinate; + } + var matches = dmsRegex.exec(coordinate); + if (!matches) { + return coordinate; + } + var degrees = replacePlaceholderWithZeros(matches[1]); + var minutes = replacePlaceholderWithZeros(matches[2]); + var seconds = replacePlaceholderWithZeros(matches[3]); + return { degrees: degrees, minutes: minutes, seconds: seconds }; +} +function dmsCoordinateToDD(coordinate) { + var seconds = parseFloat(coordinate.seconds); + if (isNaN(seconds)) { + return null; + } + var dd = parseInt(coordinate.degrees) + + parseInt(coordinate.minutes) / 60 + + seconds / 3600; + if (coordinate.direction === Direction.North || + coordinate.direction === Direction.East) { + return dd; + } + else { + return -dd; + } +} +/* + * DMS -> WKT conversion utils + */ +function dmsPointToWkt(point) { + var latitude = parseDmsCoordinate(point.latitude.coordinate); + var longitude = parseDmsCoordinate(point.longitude.coordinate); + var _latitude = dmsCoordinateToDD(__assign(__assign({}, latitude), { direction: point.latitude.direction })); + var _longitude = dmsCoordinateToDD(__assign(__assign({}, longitude), { direction: point.longitude.direction })); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number | null' is not assignable... Remove this comment to see the full error message + return new wkx.Point(_longitude, _latitude); +} +function dmsToWkt(dms) { + var _a; + if (inputIsBlank(dms)) { + return null; + } + var wkt = null; + var points = []; + switch (dms.shape) { + case 'point': + wkt = dmsPointToWkt(dms.point).toWkt(); + break; + case 'circle': + var distance = toKilometers(dms.circle.radius, dms.circle.units); + wkt = (_a = computeCircle(dmsPointToWkt(dms.circle.point), distance, 36)) === null || _a === void 0 ? void 0 : _a.toWkt(); + break; + case 'line': + if (dms.line.list.length > 0) { + dms.line.list.map(function (point) { return points.push(dmsPointToWkt(point)); }); + wkt = new wkx.LineString(points).toWkt(); + } + break; + case 'polygon': + if (dms.polygon.list.length > 0) { + dms.polygon.list.map(function (point) { return points.push(dmsPointToWkt(point)); }); + var p1 = points[0]; + var p2 = points[points.length - 1]; + if (p1.x !== p2.x || p1.y !== p2.y) { + points.push(new wkx.Point(p1.x, p1.y)); + } + wkt = new wkx.Polygon(points).toWkt(); + } + break; + case 'boundingbox': + var nw = { + latitude: dms.boundingbox.north, + longitude: dms.boundingbox.west, + }; + var ne = { + latitude: dms.boundingbox.north, + longitude: dms.boundingbox.east, + }; + var se = { + latitude: dms.boundingbox.south, + longitude: dms.boundingbox.east, + }; + var sw = { + latitude: dms.boundingbox.south, + longitude: dms.boundingbox.west, + }; + var _nw = dmsPointToWkt(nw); + var _ne = dmsPointToWkt(ne); + var _se = dmsPointToWkt(se); + var _sw = dmsPointToWkt(sw); + wkt = new wkx.Polygon([_nw, _ne, _se, _sw, _nw]).toWkt(); + break; + } + return wkt; +} +/* + * DMS validation utils + */ +function inValidRange(coordinate, maximum) { + var degrees = parseInt(coordinate.degrees); + var minutes = parseInt(coordinate.minutes); + var seconds = parseFloat(coordinate.seconds); + if (isNaN(seconds)) { + return false; + } + if (degrees > maximum || minutes > 60 || seconds > 60) { + return false; + } + if (degrees === maximum && (minutes > 0 || seconds > 0)) { + return false; + } + return true; +} +function validateDmsPoint(point) { + var latitude = parseDmsCoordinate(point.latitude.coordinate); + var longitude = parseDmsCoordinate(point.longitude.coordinate); + if (latitude && longitude) { + return inValidRange(latitude, 90) && inValidRange(longitude, 180); + } + return false; +} +function validateDmsBoundingBox(boundingbox) { + var north = parseDmsCoordinate(boundingbox.north.coordinate); + var south = parseDmsCoordinate(boundingbox.south.coordinate); + var east = parseDmsCoordinate(boundingbox.east.coordinate); + var west = parseDmsCoordinate(boundingbox.west.coordinate); + if (!north || !south || !east || !west) { + return false; + } + if (!inValidRange(north, 90) || + !inValidRange(south, 90) || + !inValidRange(east, 180) || + !inValidRange(west, 180)) { + return false; + } + var ddNorth = dmsCoordinateToDD(__assign(__assign({}, north), { direction: boundingbox.north.direction })); + var ddSouth = dmsCoordinateToDD(__assign(__assign({}, south), { direction: boundingbox.south.direction })); + var ddEast = dmsCoordinateToDD(__assign(__assign({}, east), { direction: boundingbox.east.direction })); + var ddWest = dmsCoordinateToDD(__assign(__assign({}, west), { direction: boundingbox.west.direction })); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + if (ddNorth < ddSouth || ddEast < ddWest) { + return false; + } + if ( + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ddNorth - ddSouth < minimumDifference || + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ddEast - ddWest < minimumDifference) { + return false; + } + return true; +} +function validateDms(dms) { + if (inputIsBlank(dms)) { + return { valid: true, error: null }; + } + var valid = true; + var error = null; + switch (dms.shape) { + case 'point': + if (!validateDmsPoint(dms.point)) { + valid = false; + error = errorMessages.invalidCoordinates; + } + break; + case 'circle': + var radius = parseFloat(dms.circle.radius); + if (isNaN(radius) || + radius <= 0 || + toKilometers(radius, dms.circle.units) > 10000) { + valid = false; + error = errorMessages.invalidRadius; + } + else if (!validateDmsPoint(dms.circle.point)) { + valid = false; + error = errorMessages.invalidCoordinates; + } + break; + case 'line': + if (!dms.line.list.every(validateDmsPoint)) { + valid = false; + error = errorMessages.invalidList; + } + else if (dms.line.list.length < 2) { + valid = false; + error = errorMessages.tooFewPointsLine; + } + break; + case 'polygon': + if (!dms.polygon.list.every(validateDmsPoint)) { + valid = false; + error = errorMessages.invalidList; + } + else if (dms.polygon.list.length < 3) { + valid = false; + error = errorMessages.tooFewPointsPolygon; + } + break; + case 'boundingbox': + if (!validateDmsPoint({ + latitude: dms.boundingbox.north, + longitude: dms.boundingbox.east, + }) || + !validateDmsPoint({ + latitude: dms.boundingbox.south, + longitude: dms.boundingbox.west, + })) { + valid = false; + error = errorMessages.invalidCoordinates; + } + else if (!validateDmsBoundingBox(dms.boundingbox)) { + valid = false; + error = errorMessages.invalidBoundingBoxDms; + } + break; + } + return { valid: valid, error: error }; +} +/* + * Decimal degrees -> DMS conversion utils + */ +function roundTo(num, sigDigits) { + var scaler = Math.pow(10, sigDigits); + return Math.round(num * scaler) / scaler; +} +function padWithZeros(num, width) { + return num.toString().padStart(width, '0'); +} +function padDecimalWithZeros(num, width) { + var decimalParts = num.toString().split('.'); + if (decimalParts.length > 1) { + return decimalParts[0].padStart(width, '0') + '.' + decimalParts[1]; + } + else { + return padWithZeros(num, width); + } +} +function buildDmsString(components) { + if (!components) { + return components; + } + return "".concat(components.degrees, "\u00B0").concat(components.minutes, "'").concat(components.seconds, "\""); +} +function replacePlaceholderWithZeros(numString) { + if (numString === void 0) { numString = ''; } + while (numString.includes('_')) { + if (numString.includes('.')) { + numString = numString.replace('_', '0'); + } + else { + numString = numString.replace('_', ''); + numString = '0' + numString; + } + } + return numString; +} +function ddToDmsCoordinate(dd, direction, degreesPad, secondsPrecision) { + if (secondsPrecision === void 0) { secondsPrecision = DEFAULT_SECONDS_PRECISION; } + var ddAbsoluteValue = Math.abs(dd); + var degrees = Math.trunc(ddAbsoluteValue); + var degreeFraction = ddAbsoluteValue - degrees; + var minutes = Math.trunc(60 * degreeFraction); + var seconds = 3600 * degreeFraction - 60 * minutes; + var secondsRounded = roundTo(seconds, secondsPrecision); + return { + coordinate: buildDmsString({ + degrees: padWithZeros(degrees, degreesPad), + minutes: padWithZeros(minutes, 2), + seconds: padDecimalWithZeros(secondsRounded, 2), + }), + direction: direction, + }; +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function ddToDmsCoordinateLat(dd, secondsPrecision) { + if (secondsPrecision === void 0) { secondsPrecision = DEFAULT_SECONDS_PRECISION; } + if (!isNaN(dd)) { + var direction = dd >= 0 ? Direction.North : Direction.South; + return ddToDmsCoordinate(dd, direction, LAT_DEGREES_DIGITS, secondsPrecision); + } +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function ddToDmsCoordinateLon(dd, secondsPrecision) { + if (secondsPrecision === void 0) { secondsPrecision = DEFAULT_SECONDS_PRECISION; } + if (!isNaN(dd)) { + var direction = dd >= 0 ? Direction.East : Direction.West; + return ddToDmsCoordinate(dd, direction, LON_DEGREES_DIGITS, secondsPrecision); + } +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function getSecondsPrecision(dmsCoordinate) { + if (dmsCoordinate === undefined) { + return; + } + var decimalIndex = dmsCoordinate.indexOf('.'); + // Must subtract 2 instead of 1 because the DMS coordinate ends with " + var lastNumberIndex = dmsCoordinate.length - 2; + if (decimalIndex > -1 && lastNumberIndex > decimalIndex) { + return lastNumberIndex - decimalIndex; + } +} +export { dmsToWkt, validateDms, validateDmsPoint, dmsCoordinateToDD, parseDmsCoordinate, ddToDmsCoordinateLat, ddToDmsCoordinateLon, getSecondsPrecision, buildDmsString, Direction, }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG1zLXV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1uZXcvdXRpbHMvZG1zLXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxHQUFHLE1BQU0sS0FBSyxDQUFBO0FBRXJCLE9BQU8sRUFBRSxhQUFhLEVBQUUsWUFBWSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQzFELE9BQU8sYUFBYSxNQUFNLFVBQVUsQ0FBQTtBQUVwQyxJQUFNLFFBQVEsR0FBRyxJQUFJLE1BQU0s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ycm9yID0gZXJyb3JNZXNzYWdlcy5pbnZhbGlkTGlzdFxuICAgICAgfSBlbHNlIGlmIChkbXMubGluZS5saXN0Lmxlbmd0aCA8IDIpIHtcbiAgICAgICAgdmFsaWQgPSBmYWxzZVxuICAgICAgICBlcnJvciA9IGVycm9yTWVzc2FnZXMudG9vRmV3UG9pbnRzTGluZVxuICAgICAgfVxuICAgICAgYnJlYWtcbiAgICBjYXNlICdwb2x5Z29uJzpcbiAgICAgIGlmICghZG1zLnBvbHlnb24ubGlzdC5ldmVyeSh2YWxpZGF0ZURtc1BvaW50KSkge1xuICAgICAgICB2YWxpZCA9IGZhbHNlXG4gICAgICAgIGVycm9yID0gZXJyb3JNZXNzYWdlcy5pbnZhbGlkTGlzdFxuICAgICAgfSBlbHNlIGlmIChkbXMucG9seWdvbi5saXN0Lmxlbmd0aCA8IDMpIHtcbiAgICAgICAgdmFsaWQgPSBmYWxzZVxuICAgICAgICBlcnJvciA9IGVycm9yTWVzc2FnZXMudG9vRmV3UG9pbnRzUG9seWdvblxuICAgICAgfVxuICAgICAgYnJlYWtcbiAgICBjYXNlICdib3VuZGluZ2JveCc6XG4gICAgICBpZiAoXG4gICAgICAgICF2YWxpZGF0ZURtc1BvaW50KHtcbiAgICAgICAgICBsYXRpdHVkZTogZG1zLmJvdW5kaW5nYm94Lm5vcnRoLFxuICAgICAgICAgIGxvbmdpdHVkZTogZG1zLmJvdW5kaW5nYm94LmVhc3QsXG4gICAgICAgIH0pIHx8XG4gICAgICAgICF2YWxpZGF0ZURtc1BvaW50KHtcbiAgICAgICAgICBsYXRpdHVkZTogZG1zLmJvdW5kaW5nYm94LnNvdXRoLFxuICAgICAgICAgIGxvbmdpdHVkZTogZG1zLmJvdW5kaW5nYm94Lndlc3QsXG4gICAgICAgIH0pXG4gICAgICApIHtcbiAgICAgICAgdmFsaWQgPSBmYWxzZVxuICAgICAgICBlcnJvciA9IGVycm9yTWVzc2FnZXMuaW52YWxpZENvb3JkaW5hdGVzXG4gICA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Ub0Rtc0Nvb3JkaW5hdGVMYXQsXG4gIGRkVG9EbXNDb29yZGluYXRlTG9uLFxuICBnZXRTZWNvbmRzUHJlY2lzaW9uLFxuICBidWlsZERtc1N0cmluZyxcbiAgRGlyZWN0aW9uLFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/utils/errors.d.ts b/src/main/webapp/component/location-new/utils/errors.d.ts new file mode 100644 index 00000000000..a7e4133fcb9 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/errors.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const errorMessages: { + malformedWkt: string; + invalidWktCoordinates: string; + invalidCoordinates: string; + invalidUsngGrid: string; + invalidRadius: string; + invalidList: string; + invalidBoundingBoxDd: string; + invalidBoundingBoxDms: string; + tooFewPointsLine: string; + tooFewPointsPolygon: string; + firstLastPointMismatch: string; +}; +export default errorMessages; diff --git a/src/main/webapp/component/location-new/utils/errors.js b/src/main/webapp/component/location-new/utils/errors.js new file mode 100644 index 00000000000..2a995df9bd5 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/errors.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +var errorMessages = { + malformedWkt: "Malformed WKT. Syntax for supported geometries:\n POINT (50 40)\n LINESTRING (30 10, 10 30, 40 40)\n POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))\n MULTIPOINT (10 40, 40 30, 20 20, 30 10)\n MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))\n MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))\n GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10))\n ", + invalidWktCoordinates: 'Invalid coordinates. Note that WKT coordinates are ordered longitude then latitude.', + invalidCoordinates: 'Invalid coordinates', + invalidUsngGrid: 'Invalid USNG / MGRS grid', + invalidRadius: 'Radius must be greater than 0 and at most 10,000 kilometers', + invalidList: 'One or more entries are invalid', + invalidBoundingBoxDd: "Invalid bounding box. Coordinates must satisfy the following conditions:\n North > South\n East > West\n North - South >= 0.0001\u00B0\n East - West >= 0.0001\u00B0\n ", + invalidBoundingBoxDms: "Invalid bounding box. Coordinates must satisfy the following conditions:\n North > South\n East > West\n North - South >= 0.36\" (seconds)\n East - West >= 0.36\" (seconds)\n ", + tooFewPointsLine: 'Lines must contain 2 or more points', + tooFewPointsPolygon: 'Polygons must contain 3 or more points', + firstLastPointMismatch: 'First and last points must be the same', +}; +export default errorMessages; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1uZXcvdXRpbHMvZXJyb3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixJQUFNLGFBQWEsR0FBRztJQUNwQixZQUFZLEVBQUUsMmhCQVFHO0lB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ZhbGlkIGNvb3JkaW5hdGVzLiBOb3RlIHRoYXQgV0tUIGNvb3JkaW5hdGVzIGFyZSBvcmRlcmVkIGxvbmdpdHVkZSB0aGVuIGxhdGl0dWRlLicsXG4gIGludmFsaWRDb29yZGluYXRlczogJ0ludmFsaWQgY29vcmRpbmF0ZXMnLFxuICBpbnZhbGlkVXNuZ0dyaWQ6ICdJbnZhbGlkIFVTTkcgLyBNR1JTIGdyaWQnLFxuICBpbnZhbGlkUmFkaXVzOiAnUmFkaXVzIG11c3QgYmUgZ3JlYXRlciB0aGFuIDAgYW5kIGF0IG1vc3QgMTAsMDAwIGtpbG9tZXRlcnMnLFxuICBpbnZhbGlkTGlzdDogJ09uZSBvciBtb3JlIGVudHJpZXMgYXJlIGludmFsaWQnLFxuICBpbnZhbGlkQm91bmRpbmdCb3hEZDogYEludmFsaWQgYm91bmRpbmcgYm94LiBDb29yZGluYXRlcyBtdXN0IHNhdGlzZnkgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgTm9ydGggPiBTb3V0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgRWFzdCA+IFdlc3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vcnRoIC0gU291dGggPj0gMC4wMDAxwrBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIEVhc3QgLSBXZXN0ID49IDAuMDAwMcKwXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGAsXG4gIGludmFsaWRCb3VuZGluZ0JveERtczogYEludmFsaWQgYm91bmRpbmcgYm94LiBDb29yZGluYXRlcyBtdXN0IHNhdGlzZnkgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vcnRoID4gU291dGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBFYXN0ID4gV2VzdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vcnRoIC0gU291dGggPj0gMC4zNlwiIChzZWNvbmRzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVhc3QgLSBXZXN0ID49IDAuMzZcIiAoc2Vjb25kcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGAsXG4gIHRvb0Zld1BvaW50c0xpbmU6ICdMaW5lcyBtdXN0IGNvbnRhaW4gMiBvciBtb3JlIHBvaW50cycsXG4gIHRvb0Zld1BvaW50c1BvbHlnb246ICdQb2x5Z29ucyBtdXN0IGNvbnRhaW4gMyBvciBtb3JlIHBvaW50cycsXG4gIGZpcnN0TGFzdFBvaW50TWlzbWF0Y2g6ICdGaXJzdCBhbmQgbGFzdCBwb2ludHMgbXVzdCBiZSB0aGUgc2FtZScsXG59XG5cbmV4cG9ydCBkZWZhdWx0IGVycm9yTWVzc2FnZXNcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/location-new/utils/geo-helper.d.ts b/src/main/webapp/component/location-new/utils/geo-helper.d.ts new file mode 100644 index 00000000000..2f41d9f28be --- /dev/null +++ b/src/main/webapp/component/location-new/utils/geo-helper.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wkx from 'wkx'; +export declare function computeCircle(point: any, distance: any, n: any): wkx.Polygon | null; +export declare function toKilometers(distance: any, units: any): any; diff --git a/src/main/webapp/component/location-new/utils/geo-helper.js b/src/main/webapp/component/location-new/utils/geo-helper.js new file mode 100644 index 00000000000..b094f6e27b5 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/geo-helper.js @@ -0,0 +1,98 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wkx from 'wkx'; +function degreesToRadians(degrees) { + return (degrees * Math.PI) / 180; +} +function radiansToDegrees(radians) { + return (radians * 180) / Math.PI; +} +/* + * Constants used for the calculations below: + * R is Earth's approximate radius. Assumes a perfect circle, which will produce at most 0.5% error + */ +var R = 6371.01; +/* + * Given a starting point, initial bearing, and distance travelled, returns the destination point + * reached by travelling the given distance along a great circle arc at that bearing. + * Reference: https://www.movable-type.co.uk/scripts/latlong.html#destPoint + * @param point: wkx Point + * @param bearing: degrees from north + * @param distance: kilometers + */ +function computeDestination(point, bearing, distance) { + if (distance < 0) { + return null; + } + var lat1 = degreesToRadians(point.y); + var lon1 = degreesToRadians(point.x); + var radBearing = degreesToRadians(bearing); + var radDistance = distance / R; + var lat2 = Math.asin(Math.sin(lat1) * Math.cos(radDistance) + + Math.cos(lat1) * Math.sin(radDistance) * Math.cos(radBearing)); + var lon2 = lon1 + + Math.atan2(Math.sin(radBearing) * Math.sin(radDistance) * Math.cos(lat1), Math.cos(radDistance) - Math.sin(lat1) * Math.sin(lat2)); + if (isNaN(lat2) || isNaN(lon2)) { + return null; + } + lat2 = radiansToDegrees(lat2); + lon2 = radiansToDegrees(lon2); + if (lon2 > 180 || lon2 < -180) { + lon2 = ((lon2 + 540) % 360) - 180; + } + return new wkx.Point(lon2, lat2); +} +/* + * TODO: Use Spatial4j buffered point, e.g. BUFFER(POINT(0 0), 10), instead of approximating circle + * Given a point and distance, returns an n-point polygon approximating a circle surrounding the + * point with radius equal to the input distance. + * @param point: wkx Point + * @param distance: kilometers + * @param n: number of points used to approximate the circle + */ +export function computeCircle(point, distance, n) { + if (distance < 0 || n < 0) { + return null; + } + var points = []; + for (var i = 0; i < n; i++) { + points.push(computeDestination(point, (360 * i) / n, distance)); + } + points.push(points[0]); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '(Point | null)[]' is not assigna... Remove this comment to see the full error message + return new wkx.Polygon(points); +} +/* + * Converts the given distance to kilometers. All conversions are exact. Note that the + * international definition for nautical mile is used (1 nautical mile = 1852 meters). + * Reference: https://www.sfei.org/it/gis/map-interpretation/conversion-constants + */ +export function toKilometers(distance, units) { + switch (units) { + case 'meters': + return distance / 1000; + case 'kilometers': + return distance; + case 'feet': + return distance * 0.0003048; + case 'yards': + return distance * 0.0009144; + case 'miles': + return distance * 1.609344; + case 'nautical miles': + return distance * 1.852; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvLWhlbHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvbG9jYXRpb24tbmV3L3V0aWxzL2dlby1oZWxwZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sR0FBRyxNQUFNLEtBQUssQ0FBQTtBQUVyQixTQUFTLGdCQUFnQixDQUFDLE9BQVk7SUFDcEMsT0FBTyxDQUFDLE9BQU8sR0FBRyxJQUFJLENBQUMsRUFBRSxDQUFDLEdBQUcsR0FBRyxDQUFBO0FBQ2xDLENBQUM7QUFFRCxTQUFTLGdCQUFnQixDQUFDLE9BQVk7SUFDcEMsT0FBTyxDQUFDLE9BQU8sR0FBRyxHQUFHLENBQUMsR0FBRyxJQUFJLENBQUMsRUFBRSxDQUFBO0FBQ2xDLENBQUM7QUFFRDs7O0dBR0c7QUFDSCxJQUFNLENBQUMsR0FBRyxPQUFPLENBQUE7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IGNhc2UgJ2tpbG9tZXRlcnMnOlxuICAgICAgcmV0dXJuIGRpc3RhbmNlXG4gICAgY2FzZSAnZmVldCc6XG4gICAgICByZXR1cm4gZGlzdGFuY2UgKiAwLjAwMDMwNDhcbiAgICBjYXNlICd5YXJkcyc6XG4gICAgICByZXR1cm4gZGlzdGFuY2UgKiAwLjAwMDkxNDRcbiAgICBjYXNlICdtaWxlcyc6XG4gICAgICByZXR1cm4gZGlzdGFuY2UgKiAxLjYwOTM0NFxuICAgIGNhc2UgJ25hdXRpY2FsIG1pbGVzJzpcbiAgICAgIHJldHVybiBkaXN0YW5jZSAqIDEuODUyXG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/location-new/utils/index.d.ts b/src/main/webapp/component/location-new/utils/index.d.ts new file mode 100644 index 00000000000..053f626ee21 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/index.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { validateWkt, roundWktCoords } from './wkt-utils'; +import { ddToWkt, validateDd, validateDdPoint } from './dd-utils'; +import { dmsToWkt, validateDms, validateDmsPoint, dmsCoordinateToDD, parseDmsCoordinate, ddToDmsCoordinateLat, ddToDmsCoordinateLon, getSecondsPrecision, Direction } from './dms-utils'; +import { usngToWkt, validateUsng, validateUsngGrid } from './usng-utils'; +import errorMessages from './errors'; +export { validateWkt, roundWktCoords, validateDd, validateDdPoint, validateDms, validateDmsPoint, validateUsng, validateUsngGrid, ddToWkt, ddToDmsCoordinateLat, ddToDmsCoordinateLon, parseDmsCoordinate, dmsCoordinateToDD, dmsToWkt, usngToWkt, errorMessages, getSecondsPrecision, Direction, }; diff --git a/src/main/webapp/component/location-new/utils/index.js b/src/main/webapp/component/location-new/utils/index.js new file mode 100644 index 00000000000..fd7168fb84f --- /dev/null +++ b/src/main/webapp/component/location-new/utils/index.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { validateWkt, roundWktCoords } from './wkt-utils'; +import { ddToWkt, validateDd, validateDdPoint } from './dd-utils'; +import { dmsToWkt, validateDms, validateDmsPoint, dmsCoordinateToDD, parseDmsCoordinate, ddToDmsCoordinateLat, ddToDmsCoordinateLon, getSecondsPrecision, Direction, } from './dms-utils'; +import { usngToWkt, validateUsng, validateUsngGrid } from './usng-utils'; +import errorMessages from './errors'; +export { validateWkt, roundWktCoords, validateDd, validateDdPoint, validateDms, validateDmsPoint, validateUsng, validateUsngGrid, ddToWkt, ddToDmsCoordinateLat, ddToDmsCoordinateLon, parseDmsCoordinate, dmsCoordinateToDD, dmsToWkt, usngToWkt, errorMessages, getSecondsPrecision, Direction, }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L2xvY2F0aW9uLW5ldy91dGlscy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyx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kc1ByZWNpc2lvbixcbiAgRGlyZWN0aW9uLFxufSBmcm9tICcuL2Rtcy11dGlscydcblxuaW1wb3J0IHsgdXNuZ1RvV2t0LCB2YWxpZGF0ZVVzbmcsIHZhbGlkYXRlVXNuZ0dyaWQgfSBmcm9tICcuL3VzbmctdXRpbHMnXG5pbXBvcnQgZXJyb3JNZXNzYWdlcyBmcm9tICcuL2Vycm9ycydcblxuZXhwb3J0IHtcbiAgdmFsaWRhdGVXa3QsXG4gIHJvdW5kV2t0Q29vcmRzLFxuICB2YWxpZGF0ZURkLFxuICB2YWxpZGF0ZURkUG9pbnQsXG4gIHZhbGlkYXRlRG1zLFxuICB2YWxpZGF0ZURtc1BvaW50LFxuICB2YWxpZGF0ZVVzbmcsXG4gIHZhbGlkYXRlVXNuZ0dyaWQsXG4gIGRkVG9Xa3QsXG4gIGRkVG9EbXNDb29yZGluYXRlTGF0LFxuICBkZFRvRG1zQ29vcmRpbmF0ZUxvbixcbiAgcGFyc2VEbXNDb29yZGluYXRlLFxuICBkbXNDb29yZGluYXRlVG9ERCxcbiAgZG1zVG9Xa3QsXG4gIHVzbmdUb1drdCxcbiAgZXJyb3JNZXNzYWdlcyxcbiAgZ2V0U2Vjb25kc1ByZWNpc2lvbixcbiAgRGlyZWN0aW9uLFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-new/utils/usng-utils.d.ts b/src/main/webapp/component/location-new/utils/usng-utils.d.ts new file mode 100644 index 00000000000..e8678f19339 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/usng-utils.d.ts @@ -0,0 +1,6 @@ +export declare function validateUsngGrid(grid: any): boolean; +export declare function usngToWkt(usng: any): string | null | undefined; +export declare function validateUsng(usng: any): { + valid: boolean; + error: string | null; +}; diff --git a/src/main/webapp/component/location-new/utils/usng-utils.js b/src/main/webapp/component/location-new/utils/usng-utils.js new file mode 100644 index 00000000000..43b6b1272b2 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/usng-utils.js @@ -0,0 +1,157 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wkx from 'wkx'; +import * as usng from 'usng.js'; +// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. +var converter = new usng.Converter(); +import { computeCircle, toKilometers } from './geo-helper'; +import errorMessages from './errors'; +export function validateUsngGrid(grid) { + return converter.isUSNG(grid) !== 0; +} +function gridIsBlank(grid) { + return grid.length === 0; +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function inputIsBlank(usng) { + switch (usng.shape) { + case 'point': + return gridIsBlank(usng.point); + case 'circle': + return gridIsBlank(usng.circle.point); + case 'line': + return usng.line.list.length === 0; + case 'polygon': + return usng.polygon.list.length === 0; + case 'boundingbox': + return gridIsBlank(usng.boundingbox); + } +} +/* + * USNG/MGRS -> WKT conversion utils + */ +function usngGridToWktPoint(grid) { + var LL = converter.USNGtoLL(grid, true); + return new wkx.Point(LL.lon, LL.lat); +} +export function usngToWkt(usng) { + var _a; + if (inputIsBlank(usng)) { + return null; + } + var wkt = null; + var points = []; + switch (usng.shape) { + case 'point': + wkt = usngGridToWktPoint(usng.point).toWkt(); + break; + case 'circle': + var distance = toKilometers(usng.circle.radius, usng.circle.units); + wkt = (_a = computeCircle(usngGridToWktPoint(usng.circle.point), distance, 36)) === null || _a === void 0 ? void 0 : _a.toWkt(); + break; + case 'line': + if (usng.line.list.length > 0) { + usng.line.list.map(function (grid) { return points.push(usngGridToWktPoint(grid)); }); + wkt = new wkx.LineString(points).toWkt(); + } + break; + case 'polygon': + if (usng.polygon.list.length > 0) { + usng.polygon.list.map(function (grid) { + return points.push(usngGridToWktPoint(grid)); + }); + var p1 = points[0]; + var p2 = points[points.length - 1]; + if (p1.x !== p2.x || p1.y !== p2.y) { + points.push(new wkx.Point(p1.x, p1.y)); + } + wkt = new wkx.Polygon(points).toWkt(); + } + break; + case 'boundingbox': + var grid = converter.isUSNG(usng.boundingbox); + var bbox = converter.USNGtoLL(grid, false); + var minLon = bbox.west; + var minLat = bbox.south; + var maxLon = bbox.east; + var maxLat = bbox.north; + var nw = new wkx.Point(minLon, maxLat); + var ne = new wkx.Point(maxLon, maxLat); + var se = new wkx.Point(maxLon, minLat); + var sw = new wkx.Point(minLon, minLat); + wkt = new wkx.Polygon([nw, ne, se, sw, nw]).toWkt(); + break; + } + return wkt; +} +/* + * USNG/MGRS validation utils + */ +export function validateUsng(usng) { + if (inputIsBlank(usng)) { + return { valid: true, error: null }; + } + var valid = true; + var error = null; + switch (usng.shape) { + case 'point': + if (!validateUsngGrid(usng.point)) { + valid = false; + error = errorMessages.invalidUsngGrid; + } + break; + case 'circle': + var radius = parseFloat(usng.circle.radius); + if (isNaN(radius) || + radius <= 0 || + toKilometers(radius, usng.circle.units) > 10000) { + valid = false; + error = errorMessages.invalidRadius; + } + else if (!validateUsngGrid(usng.circle.point)) { + valid = false; + error = errorMessages.invalidUsngGrid; + } + break; + case 'line': + if (!usng.line.list.every(validateUsngGrid)) { + valid = false; + error = errorMessages.invalidList; + } + else if (usng.line.list.length < 2) { + valid = false; + error = errorMessages.tooFewPointsLine; + } + break; + case 'polygon': + if (!usng.polygon.list.every(validateUsngGrid)) { + valid = false; + error = errorMessages.invalidList; + } + else if (usng.line.list.length < 3) { + valid = false; + error = errorMessages.tooFewPointsPolygon; + } + break; + case 'boundingbox': + if (!validateUsngGrid(usng.boundingbox)) { + valid = false; + error = errorMessages.invalidUsngGrid; + } + break; + } + return { valid: valid, error: error }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNuZy11dGlscy5qcy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JjbGUudW5pdHMpXG4gICAgICB3a3QgPSBjb21wdXRlQ2lyY2xlKFxuICAgICAgICB1c25nR3JpZFRvV2t0UG9pbnQodXNuZy5jaXJjbGUucG9pbnQpLFxuICAgICAgICBkaXN0YW5jZSxcbiAgICAgICAgMzZcbiAgICAgICk/LnRvV2t0KClcbiAgICAgIGJyZWFrXG4gICAgY2FzZSAnbGluZSc6XG4gICAgICBpZiAodXNuZy5saW5lLmxpc3QubGVuZ3RoID4gMCkge1xuICAgICAgICB1c25nLmxpbmUubGlzdC5tYXAoKGdyaWQ6IGFueSkgPT4gcG9pbnRzLnB1c2godXNuZ0dyaWRUb1drdFBvaW50KGdyaWQpKSlcbiAgICAgICAgd2t0ID0gbmV3IHdreC5MaW5lU3RyaW5nKHBvaW50cykudG9Xa3QoKVxuICAgICAgfVxuICAgICAgYnJlYWtcbiAgICBjYXNlICdwb2x5Z29uJzpcbiAgICAgIGlmICh1c25nLnBvbHlnb24ubGlzdC5sZW5ndGggPiAwKSB7XG4gICAgICAgIHVzbmcucG9seWdvbi5saXN0Lm1hcCgoZ3JpZDogYW55KSA9PlxuICAgICAgICAgIHBvaW50cy5wdXNoKHVzbmdHcmlkVG9Xa3RQb2ludChncmlkKSlcbiAgICAgICAgKVxuICAgICAgICBjb25zdCBwMSA9IHBvaW50c1swXVxuICAgICAgICBjb25zdCBwMiA9IHBvaW50c1twb2ludHMubGVuZ3RoIC0gMV1cbiAgICAgICAgaWYgKHAxLnggIT09IHAyLnggfHwgcDEueSAhPT0gcDIueSkge1xuICAgICAgICAgIHBvaW50cy5wdXNoKG5ldyB3a3guUG9pbnQocDEueCwgcDEueSkpXG4gICAgICAgIH1cbiAgICAgICAgd2t0ID0gbmV3IHdreC5Qb2x5Z29uKHBvaW50cykudG9Xa3QoKVxuICAgICAgfVxuICAgICAgYnJlYWtcbiAgICBjYXNlICdib3VuZGluZ2JveCc6XG4gICAgICBjb25zdCBncmlkID0gY29udmVydGVyLmlzVVNORyh1c25nLmJvdW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gICAgZXJyb3IgPSBlcnJvck1lc3NhZ2VzLmludmFsaWRMaXN0XG4gICAgICB9IGVsc2UgaWYgKHVzbmcubGluZS5saXN0Lmxlbmd0aCA8IDMpIHtcbiAgICAgICAgdmFsaWQgPSBmYWxzZVxuICAgICAgICBlcnJvciA9IGVycm9yTWVzc2FnZXMudG9vRmV3UG9pbnRzUG9seWdvblxuICAgICAgfVxuICAgICAgYnJlYWtcbiAgICBjYXNlICdib3VuZGluZ2JveCc6XG4gICAgICBpZiAoIXZhbGlkYXRlVXNuZ0dyaWQodXNuZy5ib3VuZGluZ2JveCkpIHtcbiAgICAgICAgdmFsaWQgPSBmYWxzZVxuICAgICAgICBlcnJvciA9IGVycm9yTWVzc2FnZXMuaW52YWxpZFVzbmdHcmlkXG4gICAgICB9XG4gICAgICBicmVha1xuICB9XG4gIHJldHVybiB7IHZhbGlkLCBlcnJvciB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/location-new/utils/wkt-utils.d.ts b/src/main/webapp/component/location-new/utils/wkt-utils.d.ts new file mode 100644 index 00000000000..e851e55d93e --- /dev/null +++ b/src/main/webapp/component/location-new/utils/wkt-utils.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare function validateWkt(wkt: any): { + valid: boolean; + error: string | null; +}; +declare function roundWktCoords(wkt: any): any; +export { validateWkt, roundWktCoords }; diff --git a/src/main/webapp/component/location-new/utils/wkt-utils.js b/src/main/webapp/component/location-new/utils/wkt-utils.js new file mode 100644 index 00000000000..564964cd000 --- /dev/null +++ b/src/main/webapp/component/location-new/utils/wkt-utils.js @@ -0,0 +1,182 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wkx from 'wkx'; +import errorMessages from './errors'; +import DistanceUtils from '../../../js/DistanceUtils'; +function convertUserValueToWKT(val) { + val = val.split(' (').join('(').split(', ').join(','); + val = val + .split('MULTIPOINT') + .map(function (value) { + if (value.indexOf('((') === 0) { + var endOfMultiPoint = value.indexOf('))') + 2; + var multipointStr = value.substring(0, endOfMultiPoint); + multipointStr = multipointStr + .split('((') + .join('(') + .split('),(') + .join(',') + .split('))') + .join(')'); + return multipointStr + value.substring(endOfMultiPoint); + } + else { + return value; + } + }) + .join('MULTIPOINT'); + return val; +} +function removeTrailingZeros(wkt) { + return wkt.replace(/[-+]?[0-9]*\.?[0-9]+/g, function (number) { return Number(number); }); +} +function checkCoordinateOrder(coordinate) { + return (coordinate[0] >= -180 && + coordinate[0] <= 180 && + coordinate[1] >= -90 && + coordinate[1] <= 90); +} +function checkGeometryCoordinateOrdering(geometry) { + switch (geometry.type) { + case 'Point': + return checkCoordinateOrder(geometry.coordinates); + case 'LineString': + case 'MultiPoint': + return geometry.coordinates.every(function (coordinate) { + return checkCoordinateOrder(coordinate); + }); + case 'Polygon': + case 'MultiLineString': + return geometry.coordinates.every(function (line) { + return line.every(function (coordinate) { return checkCoordinateOrder(coordinate); }); + }); + case 'MultiPolygon': + return geometry.coordinates.every(function (multipolygon) { + return multipolygon.every(function (polygon) { + return polygon.every(function (coordinate) { return checkCoordinateOrder(coordinate); }); + }); + }); + case 'GeometryCollection': + return geometry.geometries.every(function (subgeometry) { + return checkGeometryCoordinateOrdering(subgeometry); + }); + } +} +function checkForm(wkt) { + try { + var test_1 = wkx.Geometry.parse(wkt); + return test_1.toWkt() === removeTrailingZeros(convertUserValueToWKT(wkt)); + } + catch (err) { + return false; + } +} +function checkLonLatOrdering(wkt) { + try { + var test_2 = wkx.Geometry.parse(wkt); + return checkGeometryCoordinateOrdering(test_2.toGeoJSON()); + } + catch (err) { + return false; + } +} +function inputIsBlank(wkt) { + return !wkt || wkt.length === 0; +} +function validateWkt(wkt) { + if (inputIsBlank(wkt)) { + return { valid: true, error: null }; + } + var valid = true; + var error = null; + if (!checkForm(wkt)) { + valid = false; + error = errorMessages.malformedWkt; + } + else if (!checkLonLatOrdering(wkt)) { + valid = false; + error = errorMessages.invalidWktCoordinates; + } + return { valid: valid, error: error }; +} +function createCoordPair(coordinate) { + return coordinate + .map(function (val) { return DistanceUtils.coordinateRound(val); }) + .join(' '); +} +function createLineString(coordinates) { + return ('(' + + coordinates + .map(function (coord) { + return createCoordPair(coord); + }) + .join(', ') + + ')'); +} +function createMultiLineString(coordinates) { + return ('(' + + coordinates + .map(function (line) { + return createLineString(line); + }) + .join(', ') + + ')'); +} +function createMultiPolygon(coordinates) { + return ('(' + + coordinates + .map(function (line) { + return createMultiLineString(line); + }) + .join(', ') + + ')'); +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function createRoundedWktGeo(geoJson) { + switch (geoJson.type) { + case 'Point': + return (geoJson.type.toUpperCase() + + '(' + + createCoordPair(geoJson.coordinates) + + ')'); + case 'LineString': + case 'MultiPoint': + return geoJson.type.toUpperCase() + createLineString(geoJson.coordinates); + case 'Polygon': + case 'MultiLineString': + return (geoJson.type.toUpperCase() + createMultiLineString(geoJson.coordinates)); + case 'MultiPolygon': + return (geoJson.type.toUpperCase() + createMultiPolygon(geoJson.coordinates)); + case 'GeometryCollection': + return (geoJson.type.toUpperCase() + + '(' + + geoJson.geometries + .map(function (geo) { return createRoundedWktGeo(geo); }) + .join(', ') + + ')'); + } +} +function roundWktCoords(wkt) { + if (!inputIsBlank(wkt) && checkForm(wkt) && checkLonLatOrdering(wkt)) { + var parsed = wkx.Geometry.parse(wkt); + var geoJson = parsed.toGeoJSON(); + return createRoundedWktGeo(geoJson); + } + else { + return wkt; + } +} +export { validateWkt, roundWktCoords }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2t0LXV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1uZXcvdXRpbHMvd2t0LXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFFSixPQUFPLEdBQUcsTUFBTSxLQUFLLENBQUE7QUFFckIsT0FBTyxhQUFhLE1BQU0sVUFBVSxDQUFBO0FBQ3BDLE9BQU8sYUFBYSxNQUFNLDJCQUEyQixDQUFBO0FBRXJELFNBQVMscUJBQXFCLENBQUMsR0FBUTtJQUNyQyxHQUFHLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUNyRCxHQUFHLEdBQUcsR0FBRztTQUNOLEtBQUssQ0FBQyxZQUFZLENBQUM7U0FDbkIsR0FBRyxDQUFDLFVBQUMsS0FBVTtRQUNkLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDN0IsSUFBTSxlQUFlLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUE7WUFDL0MsSUFBSSxhQUFhLEdBQ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3JNZXNzYWdlcy5tYWxmb3JtZWRXa3RcbiAgfSBlbHNlIGlmICghY2hlY2tMb25MYXRPcmRlcmluZyh3a3QpKSB7XG4gICAgdmFsaWQgPSBmYWxzZVxuICAgIGVycm9yID0gZXJyb3JNZXNzYWdlcy5pbnZhbGlkV2t0Q29vcmRpbmF0ZXNcbiAgfVxuICByZXR1cm4geyB2YWxpZCwgZXJyb3IgfVxufVxuXG5mdW5jdGlvbiBjcmVhdGVDb29yZFBhaXIoY29vcmRpbmF0ZTogYW55KSB7XG4gIHJldHVybiBjb29yZGluYXRlXG4gICAgLm1hcCgodmFsOiBhbnkpID0+IERpc3RhbmNlVXRpbHMuY29vcmRpbmF0ZVJvdW5kKHZhbCkpXG4gICAgLmpvaW4oJyAnKVxufVxuXG5mdW5jdGlvbiBjcmVhdGVMaW5lU3RyaW5nKGNvb3JkaW5hdGVzOiBhbnkpIHtcbiAgcmV0dXJuIChcbiAgICAnKCcgK1xuICAgIGNvb3JkaW5hdGVzXG4gICAgICAubWFwKChjb29yZDogYW55KSA9PiB7XG4gICAgICAgIHJldHVybiBjcmVhdGVDb29yZFBhaXIoY29vcmQpXG4gICAgICB9KVxuICAgICAgLmpvaW4oJywgJykgK1xuICAgICcpJ1xuICApXG59XG5cbmZ1bmN0aW9uIGNyZWF0ZU11bHRpTGluZVN0cmluZyhjb29yZGluYXRlczogYW55KSB7XG4gIHJldHVybiAoXG4gICAgJygnICtcbiAgICBjb29yZGluYXRlc1xuICAgICAgLm1hcCgobGluZTogYW55KSA9PiB7XG4gICAgICAgIHJldHVybiBjcmVhdGVMaW5lU3RyaW5nKGxpbmUpXG4gICAgICB9KVxuICAgICAgLmpvaW4oJywgJykgK1xuICAgICcpJ1xuICApXG59XG5cbmZ1bmN0aW9uIGNyZWF0ZU11bHRpUG9seWdvbihjb29yZGluYXRlczogYW55KSB7XG4gIHJldHVybiAoXG4gICAgJygnICtcbiAgICBjb29yZGluYXRlc1xuICAgICAgLm1hcCgobGluZTogYW55K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AnR2VvbWV0cnlDb2xsZWN0aW9uJzpcbiAgICAgIHJldHVybiAoXG4gICAgICAgIGdlb0pzb24udHlwZS50b1VwcGVyQ2FzZSgpICtcbiAgICAgICAgJygnICtcbiAgICAgICAgZ2VvSnNvbi5nZW9tZXRyaWVzXG4gICAgICAgICAgLm1hcCgoZ2VvOiBhbnkpID0+IGNyZWF0ZVJvdW5kZWRXa3RHZW8oZ2VvKSlcbiAgICAgICAgICAuam9pbignLCAnKSArXG4gICAgICAgICcpJ1xuICAgICAgKVxuICB9XG59XG5cbmZ1bmN0aW9uIHJvdW5kV2t0Q29vcmRzKHdrdDogYW55KSB7XG4gIGlmICghaW5wdXRJc0JsYW5rKHdrdCkgJiYgY2hlY2tGb3JtKHdrdCkgJiYgY2hlY2tMb25MYXRPcmRlcmluZyh3a3QpKSB7XG4gICAgbGV0IHBhcnNlZCA9IHdreC5HZW9tZXRyeS5wYXJzZSh3a3QpXG4gICAgbGV0IGdlb0pzb24gPSBwYXJzZWQudG9HZW9KU09OKClcbiAgICByZXR1cm4gY3JlYXRlUm91bmRlZFdrdEdlbyhnZW9Kc29uKVxuICB9IGVsc2Uge1xuICAgIHJldHVybiB3a3RcbiAgfVxufVxuXG5leHBvcnQgeyB2YWxpZGF0ZVdrdCwgcm91bmRXa3RDb29yZHMgfVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/location-old/location-old.d.ts b/src/main/webapp/component/location-old/location-old.d.ts new file mode 100644 index 00000000000..5298df7f0f6 --- /dev/null +++ b/src/main/webapp/component/location-old/location-old.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/location-old/location-old.js b/src/main/webapp/component/location-old/location-old.js new file mode 100644 index 00000000000..eca29a4b64a --- /dev/null +++ b/src/main/webapp/component/location-old/location-old.js @@ -0,0 +1,990 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* eslint-disable no-var */ +import _ from 'underscore'; +import Backbone from 'backbone'; +import * as usngs from 'usng.js'; +import * as dmsUtils from '../location-new/utils/dms-utils'; +import DistanceUtils from '../../js/DistanceUtils'; +import wreqr from '../../js/wreqr'; +import { Drawing } from '../singletons/drawing'; +import { validateUsngLineOrPoly, validateDmsLineOrPoly, validateUtmUpsLineOrPoly, parseDmsCoordinate, isUPS, } from '../../react-component/location/validators'; +import { locationColors } from '../../react-component/location/location-color-selector'; +import { v4 } from 'uuid'; +// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. +var converter = new usngs.Converter(); +var utmUpsLocationType = 'utmUps'; +// offset used by utmUps for southern hemisphere +var utmUpsBoundaryNorth = 84; +var utmUpsBoundarySouth = -80; +var northingOffset = 10000000; +var usngPrecision = 6; +var Direction = dmsUtils.Direction; +export default Backbone.AssociatedModel.extend({ + defaults: function () { + return { + // later on we should probably update areas using locationId to just use id + locationId: v4(), + color: Object.values(locationColors)[0], + drawing: false, + north: undefined, + east: undefined, + south: undefined, + west: undefined, + dmsNorth: undefined, + dmsSouth: undefined, + dmsEast: undefined, + dmsWest: undefined, + dmsNorthDirection: Direction.North, + dmsSouthDirection: Direction.North, + dmsEastDirection: Direction.East, + dmsWestDirection: Direction.East, + dmsPointArray: undefined, + mapNorth: undefined, + mapEast: undefined, + mapWest: undefined, + mapSouth: undefined, + radiusUnits: 'meters', + radius: '', + locationType: 'dd', + prevLocationType: 'dd', + lat: undefined, + lon: undefined, + dmsLat: undefined, + dmsLon: undefined, + dmsLatDirection: Direction.North, + dmsLonDirection: Direction.East, + bbox: undefined, + usng: undefined, + utmUps: undefined, + utmUpsPointArray: undefined, + line: undefined, + multiline: undefined, + lineWidth: '', + lineUnits: 'meters', + polygon: undefined, + polygonBufferWidth: '', + polyType: undefined, + polygonBufferUnits: 'meters', + hasKeyword: false, + keywordValue: undefined, + utmUpsUpperLeftEasting: undefined, + utmUpsUpperLeftNorthing: undefined, + utmUpsUpperLeftHemisphere: 'Northern', + utmUpsUpperLeftZone: 1, + utmUpsLowerRightEasting: undefined, + utmUpsLowerRightNorthing: undefined, + utmUpsLowerRightHemisphere: 'Northern', + utmUpsLowerRightZone: 1, + utmUpsEasting: undefined, + utmUpsNorthing: undefined, + utmUpsZone: 1, + utmUpsHemisphere: 'Northern', + usngbbUpperLeft: undefined, + usngbbLowerRight: undefined, + usngPointArray: undefined, + }; + }, + set: function (key, value, options) { + if (!_.isObject(key)) { + var keyObject = {}; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + keyObject[key] = value; + key = keyObject; + value = options; + } + Backbone.AssociatedModel.prototype.set.call(this, key, value, options); + }, + initialize: function (props) { + var _this_1 = this; + this.listenTo(this, 'change:line change:polygon', this.setUsngDmsUtmWithLineOrPoly); + this.listenTo(this, 'change:dmsPointArray', this.setLatLonLinePolyFromDms); + this.listenTo(this, 'change:usngPointArray', this.setLatLonLinePolyFromUsng); + this.listenTo(this, 'change:utmUpsPointArray', this.setLatLonLinePolyFromUtmUps); + this.listenTo(this, 'change:north change:south change:east change:west', this.setBBox); + this.listenTo(this, 'change:dmsNorth change:dmsNorthDirection', this.setBboxDmsNorth); + this.listenTo(this, 'change:dmsSouth change:dmsSouthDirection', this.setBboxDmsSouth); + this.listenTo(this, 'change:dmsEast change:dmsEastDirection', this.setBboxDmsEast); + this.listenTo(this, 'change:dmsWest change:dmsWestDirection', this.setBboxDmsWest); + this.listenTo(this, 'change:dmsLat change:dmsLatDirection', this.setRadiusDmsLat); + this.listenTo(this, 'change:dmsLon change:dmsLonDirection', this.setRadiusDmsLon); + this.listenTo(this, 'change:usngbbUpperLeft change:usngbbLowerRight', this.setBboxUsng); + this.listenTo(this, 'change:locationType', this.handleLocationType); + this.listenTo(this, 'change:bbox', _.debounce(this.setBboxLatLon, 5)); + this.listenTo(this, 'change:lat change:lon', this.setRadiusLatLon); + this.listenTo(this, 'change:usng', this.setRadiusUsng); + this.listenTo(this, 'change:utmUpsEasting change:utmUpsNorthing change:utmUpsZone change:utmUpsHemisphere', this.setRadiusUtmUps); + this.listenTo(this, 'change:utmUpsUpperLeftEasting change:utmUpsUpperLeftNorthing change:utmUpsUpperLeftZone change:utmUpsUpperLeftHemisphere change:utmUpsLowerRightEasting change:utmUpsLowerRightNorthing change:utmUpsLowerRightZone change:utmUpsLowerRightHemisphere', this.setBboxUtmUps); + this.listenTo(this, 'change:mode', function () { + _this_1.set(_this_1.defaults()); + wreqr.vent.trigger('search:drawend', [_this_1]); + }); + this.listenTo(this, 'EndExtent', this.drawingOff); + this.listenTo(this, 'BeginExtent', this.drawingOn); + this.initializeValues(props); + }, + initializeValues: function (props) { + if ((props.type === 'POINTRADIUS' || props.type === 'POINT') && + props.lat && + props.lon) { + if (!props.usng || !props.utmUpsEasting) { + // initializes dms/usng/utmUps using lat/lon + this.updateCoordPointRadiusValues(props.lat, props.lon); + } + } + else if (props.mode === 'bbox') { + this.setBBox(); + } + else { + this.setUsngDmsUtmWithLineOrPoly(this); + } + }, + updateCoordPointRadiusValues: function (lat, lon) { + if (!this.isLatLonValid(lat, lon)) + return; + this.setRadiusDmsFromMap(); + var utmUps = this.LLtoUtmUps(lat, lon); + if (utmUps !== undefined) { + var utmUpsParts = this.formatUtmUps(utmUps); + this.setUtmUpsPointRadius(utmUpsParts, true); + } + else { + this.clearUtmUpsPointRadius(false); + } + if (this.isInUpsSpace(lat, lon)) { + this.set('usng', undefined); + return; + } + var usngsStr = converter.LLtoUSNG(lat, lon, usngPrecision); + this.set('usng', usngsStr, { silent: true }); + }, + drawingOff: function () { + if (this.get('locationType') === 'dms') { + this.setBboxDmsFromMap(); + } + var prevLocationType = this.get('prevLocationType'); + if (prevLocationType === 'utmUps') { + this.set('prevLocationType', ''); + this.set('locationType', 'utmUps'); + } + this.drawing = false; + Drawing.turnOffDrawing(); + }, + drawingOn: function () { + var locationType = this.get('locationType'); + if (locationType === 'utmUps') { + this.set('prevLocationType', 'utmUps'); + this.set('locationType', 'dd'); + } + this.drawing = true; + Drawing.turnOnDrawing(this); + }, + repositionLatLonUtmUps: function (isDefined, parse, assign, clear) { + if (isDefined(this)) { + var utmUpsParts = parse(this); + if (utmUpsParts !== undefined) { + var result = this.utmUpstoLL(utmUpsParts); + if (result !== undefined) { + var newResult = {}; + assign(newResult, result.lat, result.lon); + this.set(newResult); + } + else { + clear(this); + } + } + } + }, + repositionLatLon: function () { + var result = this.usngBbToLatLon(); + if (result !== undefined) { + try { + var newResult = {}; + newResult.mapNorth = result.north; + newResult.mapSouth = result.south; + newResult.mapEast = result.east; + newResult.mapWest = result.west; + this.set(newResult); + } + catch (err) { + // do nothing + } + } + this.repositionLatLonUtmUps(function (_this) { return _this.isUtmUpsUpperLeftDefined(); }, function (_this) { return _this.parseUtmUpsUpperLeft(); }, function (newResult, lat, lon) { + newResult.mapNorth = lat; + newResult.mapWest = lon; + }, function (_this) { return _this.clearUtmUpsUpperLeft(true); }); + this.repositionLatLonUtmUps(function (_this) { return _this.isUtmUpsLowerRightDefined(); }, function (_this) { return _this.parseUtmUpsLowerRight(); }, function (newResult, lat, lon) { + newResult.mapSouth = lat; + newResult.mapEast = lon; + }, function (_this) { return _this.clearUtmUpsLowerRight(true); }); + }, + setLatLonUtmUps: function (result, isDefined, parse, assign, clear) { + if (!(result.north !== undefined && + result.south !== undefined && + result.west !== undefined && + result.east !== undefined) && + isDefined(this)) { + // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '_this'. + // eslint-disable-next-line no-undef + var utmUpsParts = parse(_this); + if (utmUpsParts !== undefined) { + var utmUpsResult = this.utmUpstoLL(utmUpsParts); + if (utmUpsResult !== undefined) { + assign(result, utmUpsResult.lat, utmUpsResult.lon); + } + else { + clear(this); + } + } + } + }, + convertLatLonLinePolyToUsng: function (points) { + return Array.isArray(points) + ? points.map(function (point) { + // A little bit unintuitive, but lat/lon is swapped here + return converter.LLtoMGRSUPS(point[1], point[0], usngPrecision); + }) + : undefined; + }, + convertLatLonLinePolyToDms: function (points) { + return Array.isArray(points) + ? points.map(function (point) { + var lat = dmsUtils.ddToDmsCoordinateLat(point[1]); + var lon = dmsUtils.ddToDmsCoordinateLon(point[0]); + return { + // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + lat: lat.coordinate, + // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + lon: lon.coordinate, + // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + latDirection: lat.direction, + // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + lonDirection: lon.direction, + }; + }) + : undefined; + }, + convertLatLonLinePolyToUtm: function (points) { + var _this_1 = this; + return Array.isArray(points) + ? points.map(function (point) { + var llPoint = _this_1.LLtoUtmUps(point[1], point[0]); + return __assign(__assign({}, llPoint), { hemisphere: llPoint.hemisphere.toUpperCase() === 'NORTHERN' + ? 'Northern' + : 'Southern' }); + }) + : undefined; + }, + setUsngDmsUtmWithLineOrPoly: function (model) { + var key = this.get('mode'); + if (key === 'poly') + key = 'polygon'; + if (key && (key === 'line' || key === 'polygon')) { + var points = this.get(key); + var usngPoints = this.convertLatLonLinePolyToUsng(points); + var dmsPoints = this.convertLatLonLinePolyToDms(points); + var utmupsPoints = this.convertLatLonLinePolyToUtm(points); + model.set({ + usngPointArray: usngPoints, + dmsPointArray: dmsPoints, + utmUpsPointArray: utmupsPoints, + }, { + silent: true, //don't trigger another onChange for line or poly + }); + } + }, + setLatLonLinePolyFromDms: function () { + var _a; + var key = this.get('mode'); + if (key === 'poly') + key = 'polygon'; + if (key && (key === 'line' || key === 'polygon')) { + var validation = validateDmsLineOrPoly(this.get('dmsPointArray'), key); + if (!validation.error) { + var llPoints = this.get('dmsPointArray').map(function (point) { + var latCoordinate = dmsUtils.dmsCoordinateToDD(__assign(__assign({}, parseDmsCoordinate(point.lat)), { direction: point.latDirection })); + var lonCoordinate = dmsUtils.dmsCoordinateToDD(__assign(__assign({}, parseDmsCoordinate(point.lon)), { direction: point.lonDirection })); + // A little bit unintuitive, but lat/lon is swapped here + return [lonCoordinate, latCoordinate]; + }); + var usngPoints = this.convertLatLonLinePolyToUsng(llPoints); + var utmupsPoints = this.convertLatLonLinePolyToUtm(llPoints); + this.set((_a = {}, + _a[key] = llPoints, + _a.usngPointArray = usngPoints, + _a.utmUpsPointArray = utmupsPoints, + _a), { + silent: true, //don't trigger another onChange for line or poly + }); + } + } + }, + setLatLonLinePolyFromUsng: function () { + var _a; + var key = this.get('mode'); + if (key === 'poly') + key = 'polygon'; + if (key && (key === 'line' || key === 'polygon')) { + var validation = validateUsngLineOrPoly(this.get('usngPointArray'), key); + if (!validation.error) { + var llPoints = this.get('usngPointArray').map(function (point) { + // A little bit unintuitive, but lat/lon is swapped here + var convertedPoint = isUPS(point) + ? converter.UTMUPStoLL(point) + : converter.USNGtoLL(point, usngPrecision); + return [convertedPoint.lon, convertedPoint.lat]; + }); + var dmsPoints = this.convertLatLonLinePolyToDms(llPoints); + var utmupsPoints = this.convertLatLonLinePolyToUtm(llPoints); + this.set((_a = {}, + _a[key] = llPoints, + _a.dmsPointArray = dmsPoints, + _a.utmUpsPointArray = utmupsPoints, + _a), { + silent: true, //don't trigger another onChange for line or poly + }); + } + } + }, + setLatLonLinePolyFromUtmUps: function () { + var _a; + var _this_1 = this; + var key = this.get('mode'); + if (key === 'poly') + key = 'polygon'; + if (key && (key === 'line' || key === 'polygon')) { + var validation = validateUtmUpsLineOrPoly(this.get('utmUpsPointArray'), key); + if (!validation.error) { + var llPoints = this.get('utmUpsPointArray').map(function (point) { + var convertedPoint = _this_1.utmUpstoLL(point); + return [convertedPoint.lon, convertedPoint.lat]; + }); + var dmsPoints = this.convertLatLonLinePolyToDms(llPoints); + var usngPoints = this.convertLatLonLinePolyToUsng(llPoints); + this.set((_a = {}, + _a[key] = llPoints, + _a.dmsPointArray = dmsPoints, + _a.usngPointArray = usngPoints, + _a), { + silent: true, //don't trigger another onChange for line or poly + }); + } + } + }, + setLatLon: function () { + if (this.get('locationType') === 'dd') { + var result = {}; + result.north = this.get('mapNorth'); + result.south = this.get('mapSouth'); + result.west = this.get('mapWest'); + result.east = this.get('mapEast'); + if (!(result.north !== undefined && + result.south !== undefined && + result.west !== undefined && + result.east !== undefined) && + this.get('usngbbUpperLeft') && + this.get('usngbbLowerRight')) { + try { + result = this.usngBbToLatLon(); + } + catch (err) { + // do nothing + } + } + this.setLatLonUtmUps(result, function (_this) { return _this.isUtmUpsUpperLeftDefined(); }, function (_this) { return _this.parseUtmUpsUpperLeft(); }, function (result, lat, lon) { + result.north = lat; + result.west = lon; + }, function (_this) { + _this.clearUtmUpsUpperLeft(true); + }); + this.setLatLonUtmUps(result, function (_this) { return _this.isUtmUpsLowerRightDefined(); }, function (_this) { return _this.parseUtmUpsLowerRight(); }, function (result, lat, lon) { + result.south = lat; + result.east = lon; + }, function (_this) { + _this.clearUtmUpsLowerRight(true); + }); + result.north = DistanceUtils.coordinateRound(result.north); + result.east = DistanceUtils.coordinateRound(result.east); + result.south = DistanceUtils.coordinateRound(result.south); + result.west = DistanceUtils.coordinateRound(result.west); + this.set(result); + } + else if (this.get('locationType') === 'dms') { + this.setBboxDmsFromMap(); + } + }, + setFilterBBox: function (model) { + var north = parseFloat(model.get('north')); + var south = parseFloat(model.get('south')); + var west = parseFloat(model.get('west')); + var east = parseFloat(model.get('east')); + model.set({ + mapNorth: Number.isNaN(north) ? undefined : north, + mapSouth: Number.isNaN(south) ? undefined : north, + mapEast: Number.isNaN(east) ? undefined : east, + mapWest: Number.isNaN(west) ? undefined : west, + }); + }, + setBboxLatLon: function () { + var north = parseFloat(this.get('north')), south = parseFloat(this.get('south')), west = parseFloat(this.get('west')), east = parseFloat(this.get('east')); + if (!this.isLatLonValid(north, west) || !this.isLatLonValid(south, east)) { + return; + } + this.setBboxDmsFromMap(); + var utmUps = this.LLtoUtmUps(north, west); + if (utmUps !== undefined) { + var utmUpsParts = this.formatUtmUps(utmUps); + this.setUtmUpsUpperLeft(utmUpsParts, !this.isLocationTypeUtmUps()); + } + utmUps = this.LLtoUtmUps(south, east); + if (utmUps !== undefined) { + // eslint-disable-next-line no-redeclare + var utmUpsParts = this.formatUtmUps(utmUps); + this.setUtmUpsLowerRight(utmUpsParts, !this.isLocationTypeUtmUps()); + } + if (this.isLocationTypeUtmUps() && this.get('drawing')) { + this.repositionLatLon(); + } + var lat = (north + south) / 2; + var lon = (east + west) / 2; + if (this.isInUpsSpace(lat, lon)) { + this.set({ + usngbbUpperLeft: undefined, + usngbbLowerRight: undefined, + }); + return; + } + var result = this.usngBbFromLatLon({ north: north, west: west, south: south, east: east }); + this.set(result, { + silent: this.get('locationType') !== 'usng', + }); + if (this.get('locationType') === 'usng' && this.get('drawing')) { + this.repositionLatLon(); + } + }, + setRadiusLatLon: function () { + var lat = this.get('lat'), lon = this.get('lon'); + this.updateCoordPointRadiusValues(lat, lon); + }, + setRadiusDmsLat: function () { + this.setLatLonFromDms('dmsLat', 'dmsLatDirection', 'lat'); + }, + setRadiusDmsLon: function () { + this.setLatLonFromDms('dmsLon', 'dmsLonDirection', 'lon'); + }, + usngBbFromLatLon: function (_a) { + var north = _a.north, west = _a.west, south = _a.south, east = _a.east; + try { + var usngbbUpperLeft = converter.LLtoUSNG(north, west, usngPrecision); + var usngbbLowerRight = converter.LLtoUSNG(south, east, usngPrecision); + return { + usngbbUpperLeft: usngbbUpperLeft, + usngbbLowerRight: usngbbLowerRight, + }; + } + catch (err) { + // do nothing + } + return { + usngbbUpperLeft: undefined, + usngbbLowerRight: undefined, + }; + }, + usngBbToLatLon: function () { + if (this.get('usngbbUpperLeft') !== undefined && + this.get('usngbbLowerRight') !== undefined) { + var _a = converter.USNGtoLL(this.get('usngbbUpperLeft')), north = _a.north, west = _a.west; + var _b = converter.USNGtoLL(this.get('usngbbLowerRight')), south = _b.south, east = _b.east; + return { north: north, south: south, east: east, west: west }; + } + return {}; + }, + setBboxUsng: function () { + if (this.get('locationType') !== 'usng') { + return; + } + var _a = this.usngBbToLatLon(), north = _a.north, west = _a.west, south = _a.south, east = _a.east; + this.set({ + mapNorth: north, + mapSouth: south, + mapEast: east, + mapWest: west, + }); + this.set({ + north: north, + west: west, + south: south, + east: east, + }, { + silent: true, + }); + var utmUps = this.LLtoUtmUps(north, west); + if (utmUps !== undefined) { + var utmUpsFormatted = this.formatUtmUps(utmUps); + this.setUtmUpsUpperLeft(utmUpsFormatted, true); + } + utmUps = this.LLtoUtmUps(south, east); + if (utmUps !== undefined) { + var utmUpsFormatted = this.formatUtmUps(utmUps); + this.setUtmUpsLowerRight(utmUpsFormatted, true); + } + }, + setBBox: function () { + //we need these to always be inferred + //as numeric values and never as strings + var north = parseFloat(this.get('north')); + var south = parseFloat(this.get('south')); + var west = parseFloat(this.get('west')); + var east = parseFloat(this.get('east')); + if (!Number.isNaN(north) && + !Number.isNaN(south) && + !Number.isNaN(east) && + !Number.isNaN(west)) { + this.set('bbox', [west, south, east, north].join(',')); + } + this.set({ + mapNorth: Number.isNaN(north) ? undefined : north, + mapSouth: Number.isNaN(south) ? undefined : south, + mapEast: Number.isNaN(east) ? undefined : east, + mapWest: Number.isNaN(west) ? undefined : west, + }); + }, + setRadiusUsng: function () { + var usng = this.get('usng'); + if (usng === undefined) { + return; + } + var result; + try { + result = converter.USNGtoLL(usng, true); + } + catch (err) { + // do nothing + } + if (!isNaN(result.lat) && !isNaN(result.lon)) { + this.set(result); + var utmUps = this.LLtoUtmUps(result.lat, result.lon); + if (utmUps !== undefined) { + var utmUpsParts = this.formatUtmUps(utmUps); + this.setUtmUpsPointRadius(utmUpsParts, true); + } + } + else { + this.clearUtmUpsPointRadius(true); + this.set({ + lat: undefined, + lon: undefined, + }); + } + }, + isLatLonValid: function (lat, lon) { + lat = parseFloat(lat); + lon = parseFloat(lon); + return lat > -90 && lat < 90 && lon > -180 && lon < 180; + }, + isInUpsSpace: function (lat, lon) { + lat = parseFloat(lat); + lon = parseFloat(lon); + return (this.isLatLonValid(lat, lon) && + (lat < utmUpsBoundarySouth || lat > utmUpsBoundaryNorth)); + }, + // This method is called when the UTM/UPS point radius coordinates are changed by the user. + setRadiusUtmUps: function () { + if (!this.isLocationTypeUtmUps() && !this.isUtmUpsPointRadiusDefined()) { + return; + } + var utmUpsParts = this.parseUtmUpsPointRadius(); + if (utmUpsParts === undefined) { + return; + } + var utmUpsResult = this.utmUpstoLL(utmUpsParts); + if (utmUpsResult === undefined) { + if (utmUpsParts.zoneNumber !== 0) { + this.clearUtmUpsPointRadius(true); + } + this.set({ + lat: undefined, + lon: undefined, + usng: undefined, + radius: '', + }); + return; + } + this.set(utmUpsResult); + var lat = utmUpsResult.lat, lon = utmUpsResult.lon; + if (!this.isLatLonValid(lat, lon) || this.isInUpsSpace(lat, lon)) { + this.set({ usng: undefined }); + return; + } + var usngsStr = converter.LLtoUSNG(lat, lon, usngPrecision); + this.set('usng', usngsStr, { silent: true }); + }, + // This method is called when the UTM/UPS bounding box coordinates are changed by the user. + setBboxUtmUps: function () { + if (!this.isLocationTypeUtmUps()) { + return; + } + var upperLeft = undefined; + var lowerRight = undefined; + if (this.isUtmUpsUpperLeftDefined()) { + var upperLeftParts = this.parseUtmUpsUpperLeft(); + if (upperLeftParts !== undefined) { + upperLeft = this.utmUpstoLL(upperLeftParts); + if (upperLeft !== undefined) { + this.set({ mapNorth: upperLeft.lat, mapWest: upperLeft.lon }); + this.set({ north: upperLeft.lat, west: upperLeft.lon }, { silent: true }); + } + else { + this.set({ + mapNorth: undefined, + mapSouth: undefined, + mapEast: undefined, + mapWest: undefined, + usngbbUpperLeft: undefined, + usngbbLowerRight: undefined, + }); + } + } + else { + this.set({ north: undefined, west: undefined }, { silent: true }); + } + } + else { + this.set({ north: undefined, west: undefined }, { silent: true }); + } + if (this.isUtmUpsLowerRightDefined()) { + var lowerRightParts = this.parseUtmUpsLowerRight(); + if (lowerRightParts !== undefined) { + lowerRight = this.utmUpstoLL(lowerRightParts); + if (lowerRight !== undefined) { + this.set({ mapSouth: lowerRight.lat, mapEast: lowerRight.lon }); + this.set({ south: lowerRight.lat, east: lowerRight.lon }, { silent: true }); + } + else { + this.set({ + mapNorth: undefined, + mapSouth: undefined, + mapEast: undefined, + mapWest: undefined, + usngbbUpperLeft: undefined, + usngbbLowerRight: undefined, + }); + } + } + else { + this.set({ south: undefined, east: undefined }, { silent: true }); + } + } + else { + this.set({ south: undefined, east: undefined }, { silent: true }); + } + if (upperLeft === undefined || lowerRight == undefined) { + return; + } + var lat = (upperLeft.lat + lowerRight.lat) / 2; + var lon = (upperLeft.lon + lowerRight.lon) / 2; + if (!this.isLatLonValid(lat, lon) || this.isInUpsSpace(lat, lon)) { + this.set({ + usngbbUpperLeft: undefined, + usngbbLowerRight: undefined, + }); + return; + } + var result = this.usngBbFromLatLon({ + north: upperLeft.lat, + south: lowerRight.lat, + east: lowerRight.lon, + west: upperLeft.lon, + }); + this.set(result, { + silent: this.get('locationType') === 'usng', + }); + }, + setBboxDmsNorth: function () { + this.setLatLonFromDms('dmsNorth', 'dmsNorthDirection', 'north'); + }, + setBboxDmsSouth: function () { + this.setLatLonFromDms('dmsSouth', 'dmsSouthDirection', 'south'); + }, + setBboxDmsEast: function () { + this.setLatLonFromDms('dmsEast', 'dmsEastDirection', 'east'); + }, + setBboxDmsWest: function () { + this.setLatLonFromDms('dmsWest', 'dmsWestDirection', 'west'); + }, + setBboxDmsFromMap: function () { + var dmsNorth = dmsUtils.ddToDmsCoordinateLat(this.get('mapNorth'), dmsUtils.getSecondsPrecision(this.get('dmsNorth'))); + var dmsSouth = dmsUtils.ddToDmsCoordinateLat(this.get('mapSouth'), dmsUtils.getSecondsPrecision(this.get('dmsSouth'))); + var dmsWest = dmsUtils.ddToDmsCoordinateLon(this.get('mapWest'), dmsUtils.getSecondsPrecision(this.get('dmsWest'))); + var dmsEast = dmsUtils.ddToDmsCoordinateLon(this.get('mapEast'), dmsUtils.getSecondsPrecision(this.get('dmsEast'))); + this.set({ + dmsNorth: dmsNorth && dmsNorth.coordinate, + dmsNorthDirection: (dmsNorth && dmsNorth.direction) || Direction.North, + dmsSouth: dmsSouth && dmsSouth.coordinate, + dmsSouthDirection: (dmsSouth && dmsSouth.direction) || Direction.North, + dmsWest: dmsWest && dmsWest.coordinate, + dmsWestDirection: (dmsWest && dmsWest.direction) || Direction.East, + dmsEast: dmsEast && dmsEast.coordinate, + dmsEastDirection: (dmsEast && dmsEast.direction) || Direction.East, + }, { silent: true }); + }, + setRadiusDmsFromMap: function () { + var dmsLat = dmsUtils.ddToDmsCoordinateLat(this.get('lat'), dmsUtils.getSecondsPrecision(this.get('dmsLat'))); + var dmsLon = dmsUtils.ddToDmsCoordinateLon(this.get('lon'), dmsUtils.getSecondsPrecision(this.get('dmsLon'))); + this.set({ + dmsLat: dmsLat && dmsLat.coordinate, + dmsLatDirection: (dmsLat && dmsLat.direction) || Direction.North, + dmsLon: dmsLon && dmsLon.coordinate, + dmsLonDirection: (dmsLon && dmsLon.direction) || Direction.East, + }, { silent: true }); + }, + setLatLonFromDms: function (dmsCoordinateKey, dmsDirectionKey, latLonKey) { + var dmsCoordinate = dmsUtils.parseDmsCoordinate(this.get(dmsCoordinateKey)); + if (dmsCoordinate) { + this.set(latLonKey, dmsUtils.dmsCoordinateToDD(__assign(__assign({}, dmsCoordinate), { direction: this.get(dmsDirectionKey) }))); + } + else { + this.set(latLonKey, undefined); + } + }, + handleLocationType: function () { + if (this.get('locationType') === 'dd') { + this.set({ + north: this.get('mapNorth'), + south: this.get('mapSouth'), + east: this.get('mapEast'), + west: this.get('mapWest'), + }); + } + else if (this.get('locationType') === 'dms') { + this.setBboxDmsFromMap(); + this.setRadiusDmsFromMap(); + } + }, + // Convert Lat-Lon to UTM/UPS coordinates. Returns undefined if lat or lon is undefined or not a number. + // Returns undefined if the underlying call to usng fails. Otherwise, returns an object with: + // + // easting : FLOAT + // northing : FLOAT + // zoneNumber : INTEGER (>=0 and <= 60) + // hemisphere : STRING (NORTHERN or SOUTHERN) + LLtoUtmUps: function (lat, lon) { + lat = parseFloat(lat); + lon = parseFloat(lon); + if (!this.isLatLonValid(lat, lon)) { + return undefined; + } + var utmUps = converter.LLtoUTMUPSObject(lat, lon); + utmUps.hemisphere = lat >= 0 ? 'NORTHERN' : 'SOUTHERN'; + return utmUps; + }, + // Convert UTM/UPS coordinates to Lat-Lon. Expects an argument object with: + // + // easting : FLOAT + // northing : FLOAT + // zoneNumber : INTEGER (>=0 and <= 60) + // hemisphere : STRING (NORTHERN or SOUTHERN) + // + // Returns an object with: + // + // lat : FLOAT + // lon : FLOAT + // + // Returns undefined if the latitude is out of range. + // + utmUpstoLL: function (utmUpsParts) { + var hemisphere = utmUpsParts.hemisphere, zoneNumber = utmUpsParts.zoneNumber, northing = utmUpsParts.northing; + var northernHemisphere = hemisphere.toUpperCase() === 'NORTHERN'; + utmUpsParts = __assign(__assign({}, utmUpsParts), { northPole: northernHemisphere }); + var isUps = zoneNumber === 0; + utmUpsParts.northing = + isUps || northernHemisphere ? northing : northing - northingOffset; + var lat, lon; + try { + var result = converter.UTMUPStoLL(utmUpsParts); + lat = result.lat; + lon = result.lon % 360; + if (lon < -180) { + lon = lon + 360; + } + if (lon > 180) { + lon = lon - 360; + } + if (!this.isLatLonValid(lat, lon)) { + return { lat: undefined, lon: undefined }; + } + } + catch (err) { + return { lat: undefined, lon: undefined }; + } + return { lat: lat, lon: lon }; + }, + // Return true if the current location type is UTM/UPS, otherwise false. + isLocationTypeUtmUps: function () { + return this.get('locationType') === utmUpsLocationType; + }, + // Set the model fields for the Upper-Left bounding box UTM/UPS. The arguments are: + // + // utmUpsFormatted : output from the method 'formatUtmUps' + // silent : BOOLEAN (true if events should be generated) + setUtmUpsUpperLeft: function (utmUpsFormatted, silent) { + this.set('utmUpsUpperLeftEasting', utmUpsFormatted.easting, { + silent: silent, + }); + this.set('utmUpsUpperLeftNorthing', utmUpsFormatted.northing, { + silent: silent, + }); + this.set('utmUpsUpperLeftZone', utmUpsFormatted.zoneNumber, { + silent: silent, + }); + this.set('utmUpsUpperLeftHemisphere', utmUpsFormatted.hemisphere, { + silent: silent, + }); + }, + // Set the model fields for the Lower-Right bounding box UTM/UPS. The arguments are: + // + // utmUpsFormatted : output from the method 'formatUtmUps' + // silent : BOOLEAN (true if events should be generated) + setUtmUpsLowerRight: function (utmUpsFormatted, silent) { + this.set('utmUpsLowerRightEasting', utmUpsFormatted.easting, { + silent: silent, + }); + this.set('utmUpsLowerRightNorthing', utmUpsFormatted.northing, { + silent: silent, + }); + this.set('utmUpsLowerRightZone', utmUpsFormatted.zoneNumber, { + silent: silent, + }); + this.set('utmUpsLowerRightHemisphere', utmUpsFormatted.hemisphere, { + silent: silent, + }); + }, + // Set the model fields for the Point Radius UTM/UPS. The arguments are: + // + // utmUpsFormatted : output from the method 'formatUtmUps' + // silent : BOOLEAN (true if events should be generated) + setUtmUpsPointRadius: function (utmUpsFormatted, silent) { + this.set('utmUpsEasting', utmUpsFormatted.easting, { silent: silent }); + this.set('utmUpsNorthing', utmUpsFormatted.northing, { silent: silent }); + this.set('utmUpsZone', utmUpsFormatted.zoneNumber, { silent: silent }); + this.set('utmUpsHemisphere', utmUpsFormatted.hemisphere, { + silent: silent, + }); + }, + clearUtmUpsPointRadius: function (silent) { + this.set('utmUpsEasting', undefined, { silent: silent }); + this.set('utmUpsNorthing', undefined, { silent: silent }); + this.set('utmUpsZone', 1, { silent: silent }); + this.set('utmUpsHemisphere', 'Northern', { silent: silent }); + }, + clearUtmUpsUpperLeft: function (silent) { + this.set({ + utmUpsUpperLeftEasting: undefined, + utmUpsUpperLeftNorthing: undefined, + utmUpsUpperLeftZone: 1, + utmUpsUpperLeftHemisphere: 'Northern', + }, { silent: silent }); + }, + clearUtmUpsLowerRight: function (silent) { + this.set('utmUpsLowerRightEasting', undefined, { silent: silent }); + this.set('utmUpsLowerRightNorthing', undefined, { silent: silent }); + this.set('utmUpsLowerRightZone', 1, { silent: silent }); + this.set('utmUpsLowerRightHemisphere', 'Northern', { silent: silent }); + }, + // Parse the UTM/UPS fields that come from the HTML layer. The parameters eastingRaw and northingRaw + // are string representations of floating pointnumbers. The zoneRaw parameter is a string + // representation of an integer in the range [0,60]. The hemisphereRaw parameters is a string + // that should be 'Northern' or 'Southern'. + parseUtmUps: function (eastingRaw, northingRaw, zoneRaw, hemisphereRaw) { + var easting = parseFloat(eastingRaw); + var northing = parseFloat(northingRaw); + var zone = parseInt(zoneRaw); + var hemisphere = hemisphereRaw === 'Northern' + ? 'NORTHERN' + : hemisphereRaw === 'Southern' + ? 'SOUTHERN' + : undefined; + if (!isNaN(easting) && + !isNaN(northing) && + !isNaN(zone) && + hemisphere !== undefined && + zone >= 0 && + zone <= 60) { + return { + zoneNumber: zone, + hemisphere: hemisphere, + easting: easting, + northing: northing, + }; + } + return undefined; + }, + // Format the internal representation of UTM/UPS coordinates into the form expected by the model. + formatUtmUps: function (utmUps) { + return { + easting: utmUps.easting, + northing: utmUps.northing, + zoneNumber: utmUps.zoneNumber, + hemisphere: utmUps.hemisphere === 'NORTHERN' + ? 'Northern' + : utmUps.hemisphere === 'SOUTHERN' + ? 'Southern' + : undefined, + }; + }, + // Return true if all of the UTM/UPS upper-left model fields are defined. Otherwise, false. + isUtmUpsUpperLeftDefined: function () { + return (this.get('utmUpsUpperLeftEasting') !== undefined && + this.get('utmUpsUpperLeftNorthing') !== undefined && + this.get('utmUpsUpperLeftZone') !== undefined && + this.get('utmUpsUpperLeftHemisphere') !== undefined); + }, + // Return true if all of the UTM/UPS lower-right model fields are defined. Otherwise, false. + isUtmUpsLowerRightDefined: function () { + return (this.get('utmUpsLowerRightEasting') !== undefined && + this.get('utmUpsLowerRightNorthing') !== undefined && + this.get('utmUpsLowerRightZone') !== undefined && + this.get('utmUpsLowerRightHemisphere') !== undefined); + }, + // Return true if all of the UTM/UPS point radius model fields are defined. Otherwise, false. + isUtmUpsPointRadiusDefined: function () { + return (this.get('utmUpsEasting') !== undefined && + this.get('utmUpsNorthing') !== undefined && + this.get('utmUpsZone') !== undefined && + this.get('utmUpsHemisphere') !== undefined); + }, + // Get the UTM/UPS Upper-Left bounding box fields in the internal format. See 'parseUtmUps'. + parseUtmUpsUpperLeft: function () { + return this.parseUtmUps(this.get('utmUpsUpperLeftEasting'), this.get('utmUpsUpperLeftNorthing'), this.get('utmUpsUpperLeftZone'), this.get('utmUpsUpperLeftHemisphere')); + }, + // Get the UTM/UPS Lower-Right bounding box fields in the internal format. See 'parseUtmUps'. + parseUtmUpsLowerRight: function () { + return this.parseUtmUps(this.get('utmUpsLowerRightEasting'), this.get('utmUpsLowerRightNorthing'), this.get('utmUpsLowerRightZone'), this.get('utmUpsLowerRightHemisphere')); + }, + // Get the UTM/UPS point radius fields in the internal format. See 'parseUtmUps'. + parseUtmUpsPointRadius: function () { + return this.parseUtmUps(this.get('utmUpsEasting'), this.get('utmUpsNorthing'), this.get('utmUpsZone'), this.get('utmUpsHemisphere')); + }, + // override toJSON so that when we save the location information elsewhere we don't include ephemeral state, like isInteractive + toJSON: function (options) { + var originalJSON = Backbone.Model.prototype.toJSON.apply(this, [options]); + delete originalJSON['isInteractive']; + delete originalJSON['isReadonly']; + return originalJSON; + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24tb2xkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9sb2NhdGlvbi1vbGQvbG9jYXRpb24tb2xkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osMkJBQTJCO0FBQzNCLE9BQU8sQ0FBQyxN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dCBsbFBvaW50cyA9IHRoaXMuZ2V0KCdkbXNQb2ludEFycmF5JykubWFwKChwb2ludDogYW55KSA9PiB7XG4gICAgICAgICAgbGV0IGxhdENvb3JkaW5hdGUgPSBkbXNVdGlscy5kbXNDb29yZGluYXRlVG9ERCh7XG4gICAgICAgICAgICAuLi5wYXJzZURtc0Nvb3JkaW5hdGUocG9pbnQubGF0KSxcbiAgICAgICAgICAgIGRpcmVjdGlvbjogcG9pbnQubGF0RGlyZWN0aW9uLFxuICAgICAgICAgIH0pXG4gICAgICAgICAgbGV0IGxvbkNvb3JkaW5hdGUgPSBkbXNVdGlscy5kbXNDb29yZGluYXRlVG9ERCh7XG4gICAgICAgICAgICAuLi5wYXJzZURtc0Nvb3JkaW5hdGUocG9pbnQubG9uKSxcbiAgICAgICAgICAgIGRpcmVjdGlvbjogcG9pbnQubG9uRGlyZWN0aW9uLFxuICAgICAgICAgIH0pXG4gICAgICAgICAgLy8gQSBsaXR0bGUgYml0IHVuaW50dWl0aXZlLCBidXQgbGF0L2xvbiBpcyBzd2FwcGVkIGhlcmVcbiAgICAgICAgICByZXR1cm4gW2xvbkNvb3JkaW5hdGUsIGxhdENvb3JkaW5hdGVdXG4gICAgICAgIH0pXG4gICAgICAgIGNvbnN0IHVzbmdQb2ludHMgPSB0aGlzLmNvbnZlcnRMYXRMb25MaW5lUG9seVRvVXNuZyhsbFBvaW50cylcbiAgICAgICAgY29uc3QgdXRtdXBzUG9pbnRzID0gdGhpcy5jb252ZXJ0TGF0TG9uTGluZVBvbHlUb1V0bShsbFBvaW50cylcbiAgICAgICAgdGhpcy5zZXQoXG4gICAgICAgICAge1xuICAgICAgICAgICAgW2tleV06IGxsUG9pbnRzLFxuICAgICAgICAgICAgdXNuZ1BvaW50QXJyYXk6IHVzbmdQb2ludHMsXG4gICAgICAgICAgICB1dG1VcHNQb2ludEFycmF5OiB1dG11cHNQb2ludHMsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBz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Y29uc3QgdXRtdXBzUG9pbnRzID0gdGhpcy5jb252ZXJ0TGF0TG9uTGluZVBvbHlUb1V0bShsbFBvaW50cylcbiAgICAgICAgdGhpcy5zZXQoXG4gICAgICAgICAge1xuICAgICAgICAgICAgW2tleV06IGxsUG9pbnRzLFxuICAgICAgICAgICAgZG1zUG9pbnRBcnJheTogZG1zUG9pbnRzLFxuICAgICAgICAgICAgdXRtVXBzUG9pbnRBcnJheTogdXRtdXBzUG9pbnRzLFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgc2lsZW50OiB0cnVlLCAvL2Rvbid0IHRyaWdnZXIgYW5vdGhlciBvbkNoYW5nZSBmb3IgbGluZSBvciBwb2x5XG4gICAgICAgICAgfVxuICAgICAgICApXG4gICAgICB9XG4gICAgfVxuICB9LFxuICBzZXRMYXRMb25MaW5lUG9seUZyb21VdG1VcHMoKSB7XG4gICAgbGV0IGtleSA9IHRoaXMuZ2V0KCdtb2RlJylcbiAgICBpZiAoa2V5ID09PSAncG9seScpIGtleSA9ICdwb2x5Z29uJ1xuICAgIGlmIChrZXkgJiYgKGtleSA9PT0gJ2xpbmUnIHx8IGtleSA9PT0gJ3BvbHlnb24nKSkge1xuICAgICAgbGV0IHZhbGlkYXRpb24gPSB2YWxpZGF0ZVV0bVVwc0xpbmVPclBvbHkoXG4gICAgICAgIHRoaXMuZ2V0KCd1dG1VcHNQb2ludEFycmF5JyksXG4gICAgICAgIGtleVxuICAgICAgKVxuICAgICAgaWYgKCF2YWxpZGF0aW9uLmVycm9yKSB7XG4gICAgICAgIGNvbnN0IGxsUG9pbnRzID0gdGhpcy5nZXQoJ3V0bVVwc1BvaW50QXJyYXknKS5tYXAoKHBvaW50OiBhbnkpID0+IHtcbiAgICAgICAgICBjb25zdCBjb252ZXJ0ZWRQb2ludCA9IHRoaXMudXRtVXBzdG9MTChwb2ludClcbiAgICAgICAgICByZXR1cm4gW2NvbnZlcnRlZFBvaW50LmxvbiwgY29udmVydGVkUG9pbnQubGF0XVxuICAgICAgICB9KVxuICAgICAgICBjb25zdCBkbXNQb2ludHMgPSB0aGlzLmNvbnZlcnRMYXRMb25MaW5lUG9seVRvRG1zKGxsUG9pbnRzKVxuICAgICAgICBjb25zdCB1c25nUG9pbnRzID0gdGhpcy5jb252ZXJ0TGF0TG9uTGluZVBvbHlUb1VzbmcobGxQb2ludHMpXG4gICAgICAgIHRoaXMuc2V0KFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIFtrZXldOiBsbFBvaW50cyxcbiAgICAgICAgICAgIGRtc1BvaW50QXJyYXk6IGRtc1BvaW50cyxcbiAgICAgICAgICAgIHVzbmdQb2ludEFycmF5OiB1c25nUG9pbnRzLFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgc2lsZW50OiB0cnVlLCAvL2Rvbid0IHRyaWdnZXIgYW5vdGhlciBvbkNoYW5nZSBmb3IgbGluZSBvciBwb2x5XG4gICAgICAgICAgfVxuICAgICAgICApXG4gICAgICB9XG4gICAgfVxuICB9LFxuICBzZXRMYXRMb24oKSB7XG4gICAgaWYgKHRoaXMuZ2V0KCdsb2NhdGlvblR5cGUnKSA9PT0gJ2RkJykge1xuICAgICAgbGV0IHJlc3VsdCA9IHt9XG4gICAgICA7KHJlc3VsdCBhcyBhbnkpLm5vcnRoID0gdGhpcy5nZXQoJ21hcE5vcnRoJylcbiAgICAgIDsocmVzdWx0IGFzIGFueSkuc291dGggPSB0aGlzLmdldCgnbWFwU291dGgnKVxuICAgICAgOyhyZXN1bHQgYXMgYW55KS53ZXN0ID0gdGhpcy5nZXQoJ21hcFdlc3QnKVxuICAgICAgOyhyZXN1bHQgYXMgYW55KS5lYXN0ID0gdGhpcy5nZXQoJ21hcEVhc3QnKVxuICAgICAgaWYgKFxuICAgICAgICAhKFxuICAgICAgICAgIChyZXN1bHQgYXMgYW55KS5ub3J0aCAhPT0gdW5kZWZpbmVkICYmXG4gICAgICAgICAgKHJlc3VsdCBhcyBhbnkpLnNvdXRoICE9PSB1bmRlZmluZWQgJiZcbiAgICAgICAgICAocmVzdWx0IGFzIGFueSkud2VzdCAhPT0gdW5kZWZpbmVkICYmXG4gICAgICAgICAgKHJlc3VsdCBhcyBhbnkpLmVhc3QgIT09IHVuZGVmaW5lZFxuICAgICAgICApICYmXG4gICAgICAgIHRoaXMuZ2V0KCd1c25nYmJVcHBlckxlZnQnKSAmJlxuICAgICAgICB0aGlzLmdldCgndXNuZ2JiTG93ZXJSaWdodCcpXG4gICAgICApIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXN1bHQgPSB0aGlzLnVzbmdCYlRvTGF0TG9uKClcbiAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgLy8gZG8gbm90aGluZ1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICB0aGlzLnNldExhdExvblV0bVVwcyhcbiAgICAgICAgcmVzdWx0LFxuICAgICAgICAoX3RoaXM6IGFueSkgPT4gX3RoaXMuaXNVdG1VcHNVcHBlckxlZnREZWZpbmVkKCksXG4gICAgICAgIChfdGhpczogYW55KSA9PiBfdGhpcy5wYXJzZVV0bVVwc1VwcGVyTGVmdCgpLFxuICAgICAgICAocmVzdWx0OiBhbnksIGxhdDogYW55LCBsb246IGFueSkgPT4ge1xuICAgICAgICAgIHJlc3VsdC5ub3J0aCA9IGxhdFxuICAgICAgICAgIHJlc3VsdC53ZXN0ID0gbG9uXG4gICAgICAgIH0sXG4gICAgICAgIChfdGhpczogYW55KSA9PiB7XG4gICAgICAgICAgX3RoaXMuY2xlYXJVdG1VcHNVcHBlckxlZnQodHJ1ZSlcbiAgICAgICAgfVxuICAgICAgKVxuICAgICAgdGhpcy5zZXRMYXRMb25VdG1VcHMoXG4gICAgICAgIHJlc3VsdCxcbiAgICAgICAgKF90aGlzOiBhbnkpID0+IF90aGlzLmlzVXRtVXBzTG93ZXJSaWdodERlZmluZWQoKSxcbiAgICAgICAgKF90aGlzOiBhbnkpID0+IF90aG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4gICAgICB0aGlzLmdldCgndXRtVXBzTG93ZXJSaWdodEhlbWlzcGhlcmUnKVxuICAgIClcbiAgfSxcbiAgLy8gR2V0IHRoZSBVVE0vVVBTIHBvaW50IHJhZGl1cyBmaWVsZHMgaW4gdGhlIGludGVybmFsIGZvcm1hdC4gU2VlICdwYXJzZVV0bVVwcycuXG4gIHBhcnNlVXRtVXBzUG9pbnRSYWRpdXMoKSB7XG4gICAgcmV0dXJuIHRoaXMucGFyc2VVdG1VcHMoXG4gICAgICB0aGlzLmdldCgndXRtVXBzRWFzdGluZycpLFxuICAgICAgdGhpcy5nZXQoJ3V0bVVwc05vcnRoaW5nJyksXG4gICAgICB0aGlzLmdldCgndXRtVXBzWm9uZScpLFxuICAgICAgdGhpcy5nZXQoJ3V0bVVwc0hlbWlzcGhlcmUnKVxuICAgIClcbiAgfSxcbiAgLy8gb3ZlcnJpZGUgdG9KU09OIHNvIHRoYXQgd2hlbiB3ZSBzYXZlIHRoZSBsb2NhdGlvbiBpbmZvcm1hdGlvbiBlbHNld2hlcmUgd2UgZG9uJ3QgaW5jbHVkZSBlcGhlbWVyYWwgc3RhdGUsIGxpa2UgaXNJbnRlcmFjdGl2ZVxuICB0b0pTT04ob3B0aW9uczogYW55KSB7XG4gICAgY29uc3Qgb3JpZ2luYWxKU09OID0gQmFja2JvbmUuTW9kZWwucHJvdG90eXBlLnRvSlNPTi5hcHBseSh0aGlzLCBbb3B0aW9uc10pXG4gICAgZGVsZXRlIG9yaWdpbmFsSlNPTlsnaXNJbnRlcmFjdGl2ZSddXG4gICAgZGVsZXRlIG9yaWdpbmFsSlNPTlsnaXNSZWFkb25seSddXG4gICAgcmV0dXJuIG9yaWdpbmFsSlNPTlxuICB9LFxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/map-context-menu/map-context-menu.view.d.ts b/src/main/webapp/component/map-context-menu/map-context-menu.view.d.ts new file mode 100644 index 00000000000..ea71490d628 --- /dev/null +++ b/src/main/webapp/component/map-context-menu/map-context-menu.view.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +declare const _default: ({ mapModel }: { + mapModel: any; +}) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/map-context-menu/map-context-menu.view.js b/src/main/webapp/component/map-context-menu/map-context-menu.view.js new file mode 100644 index 00000000000..da58544c424 --- /dev/null +++ b/src/main/webapp/component/map-context-menu/map-context-menu.view.js @@ -0,0 +1,60 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useMenuState } from '../menu-state/menu-state'; +import Popover from '@mui/material/Popover'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../theme/theme'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import CopyCoordinates from '../../react-component/copy-coordinates'; +var MapContextDropdown = function (_a) { + var mapModel = _a.mapModel; + var _b = __read(React.useState(mapModel.toJSON().coordinateValues), 2), coordinates = _b[0], setCoordinates = _b[1]; + var menuState = useMenuState(); + var _c = mapModel.toJSON(), mouseX = _c.mouseX, mouseY = _c.mouseY, mouseLat = _c.mouseLat; + useListenTo(mapModel, 'change:open', function () { + if (mapModel.get('open')) { + menuState.handleClick(); + } + else { + menuState.handleClose(); + } + }); + useListenTo(mapModel, 'change:coordinateValues', function () { + setCoordinates(mapModel.toJSON().coordinateValues); + }); + React.useEffect(function () { + if (menuState.open && mouseLat === undefined) { + menuState.handleClose(); + } + if (!menuState.open) { + mapModel.set('open', false); + } + }, [menuState.open]); + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "absolute", ref: menuState.anchorRef, style: { + left: mouseX, + top: mouseY, + } }), + React.createElement(Popover, __assign({}, menuState.MuiPopoverProps), + React.createElement(Paper, { elevation: Elevations.overlays }, + React.createElement(CopyCoordinates, { key: JSON.stringify(coordinates), coordinateValues: coordinates, closeParent: function () { + menuState.handleClose(); + } }))))); +}; +export default hot(module)(MapContextDropdown); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLWNvbnRleHQtbWVudS52aWV3LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9tYXAtY29udGV4dC1tZW51L21hcC1jb250ZXh0LW1lbnUudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTs7QUFFSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDBCQUEwQixDQUFBO0FBQ3ZELE9BQU8sT0FBTyxNQUFNLHVCQUF1QixDQUFBO0FBQzNDLE9BQU8sS0FBSyxNQUFNLHFCQUFxQixDQUFBO0FBQ3ZDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUMzQyxPQUFPLEVBQUUsV0FB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2xvc2UoKVxuICAgIH1cbiAgICBpZiAoIW1lbnVTdGF0ZS5vcGVuKSB7XG4gICAgICBtYXBNb2RlbC5zZXQoJ29wZW4nLCBmYWxzZSlcbiAgICB9XG4gIH0sIFttZW51U3RhdGUub3Blbl0pXG4gIHJldHVybiAoXG4gICAgPD5cbiAgICAgIDxkaXZcbiAgICAgICAgY2xhc3NOYW1lPVwiYWJzb2x1dGVcIlxuICAgICAgICByZWY9e21lbnVTdGF0ZS5hbmNob3JSZWZ9XG4gICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgbGVmdDogbW91c2VYLFxuICAgICAgICAgIHRvcDogbW91c2VZLFxuICAgICAgICB9fVxuICAgICAgPjwvZGl2PlxuICAgICAgPFBvcG92ZXIgey4uLm1lbnVTdGF0ZS5NdWlQb3BvdmVyUHJvcHN9PlxuICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfT5cbiAgICAgICAgICA8Q29weUNvb3JkaW5hdGVzXG4gICAgICAgICAgICBrZXk9e0pTT04uc3RyaW5naWZ5KGNvb3JkaW5hdGVzKX1cbiAgICAgICAgICAgIGNvb3JkaW5hdGVWYWx1ZXM9e2Nvb3JkaW5hdGVzfVxuICAgICAgICAgICAgY2xvc2VQYXJlbnQ9eygpID0+IHtcbiAgICAgICAgICAgICAgbWVudVN0YXRlLmhhbmRsZUNsb3NlKClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgLz5cbiAgICAgICAgPC9QYXBlcj5cbiAgICAgIDwvUG9wb3Zlcj5cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShNYXBDb250ZXh0RHJvcGRvd24pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/memo/memo.d.ts b/src/main/webapp/component/memo/memo.d.ts new file mode 100644 index 00000000000..ffa95929c6e --- /dev/null +++ b/src/main/webapp/component/memo/memo.d.ts @@ -0,0 +1,7 @@ +/// +type MemoProps = { + children: JSX.Element | JSX.Element[]; + dependencies?: any[]; +}; +export declare const Memo: ({ dependencies, children }: MemoProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/memo/memo.js b/src/main/webapp/component/memo/memo.js new file mode 100644 index 00000000000..61adf1ecfb3 --- /dev/null +++ b/src/main/webapp/component/memo/memo.js @@ -0,0 +1,8 @@ +import * as React from 'react'; +export var Memo = function (_a) { + var _b = _a.dependencies, dependencies = _b === void 0 ? [] : _b, children = _a.children; + return React.useMemo(function () { + return React.createElement(React.Fragment, null, children); + }, dependencies); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVtby5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvbWVtby9tZW1vLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQVM5QixNQUFNLENBQUMsSUFBTSxJQUFJLEdBQUcsVUFBQyxFQUEwQztRQUF4QyxvQkFBaUIsRUFBakIsWUFBWSxtQkFBRyxFQUFFLEtBQUEsRUFBRSxRQUFRLGNBQUE7SUFDaEQsT0FBTyxLQUFLLENBQUMsT0FBTyxDQUFDO1FBQ25CLE9BQU8sMENBQUcsUUFBUSxDQUFJLENBQUE7SUFDeEIsQ0FBQyxFQUFFLFlBQVksQ0FBQyxDQUFBO0FBQ2xCLENBQUMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0J1xuXG4vLyBDb252ZW5pZW5jZSB3cmFwcGVyIGFyb3VuZCBtZW1vXG5cbnR5cGUgTWVtb1Byb3BzID0ge1xuICBjaGlsZHJlbjogSlNYLkVsZW1lbnQgfCBKU1guRWxlbWVudFtdXG4gIGRlcGVuZGVuY2llcz86IGFueVtdXG59XG5cbmV4cG9ydCBjb25zdCBNZW1vID0gKHsgZGVwZW5kZW5jaWVzID0gW10sIGNoaWxkcmVuIH06IE1lbW9Qcm9wcykgPT4ge1xuICByZXR1cm4gUmVhY3QudXNlTWVtbygoKSA9PiB7XG4gICAgcmV0dXJuIDw+e2NoaWxkcmVufTwvPlxuICB9LCBkZXBlbmRlbmNpZXMpXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/menu-state/menu-state.d.ts b/src/main/webapp/component/menu-state/menu-state.d.ts new file mode 100644 index 00000000000..083e8d83268 --- /dev/null +++ b/src/main/webapp/component/menu-state/menu-state.d.ts @@ -0,0 +1,57 @@ +import { ButtonProps } from '@mui/material/Button'; +import { PopoverProps } from '@mui/material/Popover'; +import * as React from 'react'; +type Props = { + /** + * Why maxheight? Well, we just want to be able to constrain popovers. It also doesn't preclude the inside components from having am min height if they so desire. + */ + maxHeight?: CSSStyleDeclaration['maxHeight']; +}; +/** + * Normal refs don't cause a rerender, but often times we want that behavior when grabbing dom nodes and otherwise + * https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node + */ +export declare function useRerenderingRef(): { + current: T | undefined; + ref: React.Dispatch>; +}; +export declare const useMenuState: ({ maxHeight }?: Props) => { + anchorRef: React.RefObject; + open: boolean; + handleClick: () => void; + handleClose: () => void; + /** + * Handy prop bundles for passing to common components + */ + dropdownProps: { + open: boolean; + handleClose: () => void; + }; + MuiPopoverProps: Required>; + MuiButtonProps: Required>; + buttonProps: { + ref: React.RefObject; + onClick: () => void; + }; +}; +export declare const POPOVER_DEFAULTS: ({ maxHeight }?: Props) => Required>; +declare const _default: ({ maxHeight }?: Props) => { + anchorRef: React.RefObject; + open: boolean; + handleClick: () => void; + handleClose: () => void; + /** + * Handy prop bundles for passing to common components + */ + dropdownProps: { + open: boolean; + handleClose: () => void; + }; + MuiPopoverProps: Required>; + MuiButtonProps: Required>; + buttonProps: { + ref: React.RefObject; + onClick: () => void; + }; +}; +export default _default; diff --git a/src/main/webapp/component/menu-state/menu-state.js b/src/main/webapp/component/menu-state/menu-state.js new file mode 100644 index 00000000000..fa2c46bc11d --- /dev/null +++ b/src/main/webapp/component/menu-state/menu-state.js @@ -0,0 +1,170 @@ +import { __assign, __read, __values } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import debounce from 'lodash.debounce'; +/** + * Normal refs don't cause a rerender, but often times we want that behavior when grabbing dom nodes and otherwise + * https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node + */ +export function useRerenderingRef() { + var _a = __read(React.useState(), 2), ref = _a[0], setRef = _a[1]; + var rerenderingRef = React.useCallback(setRef, []); + return { + current: ref, + ref: rerenderingRef, + }; +} +/** + * Firefox and Chrome differ slightly in implementation. If only one entry, firefox returns that instead of an array! + */ +var getBorderBoxSizeFromEntry = function (entry) { + var borderBoxSizeArray = []; + return borderBoxSizeArray.concat(entry.borderBoxSize); +}; +var useListenForChildUpdates = function (_a) { + var popoverRef = _a.popoverRef, action = _a.action; + React.useEffect(function () { + var lastWidth = 0; + var lastHeight = 0; + /** + * Width is less likely to change in popups, so we can react immediately + */ + var widthCallback = function (entries) { + var e_1, _a, e_2, _b; + var _c; + try { + for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) { + var entry = entries_1_1.value; + try { + for (var _d = (e_2 = void 0, __values(getBorderBoxSizeFromEntry(entry))), _e = _d.next(); !_e.done; _e = _d.next()) { + var subentry = _e.value; + if (subentry.inlineSize !== lastWidth) { + lastWidth = subentry.inlineSize; + (_c = action.current) === null || _c === void 0 ? void 0 : _c.updatePosition(); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_e && !_e.done && (_b = _d.return)) _b.call(_d); + } + finally { if (e_2) throw e_2.error; } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + /** + * Height is very likely to change in popups, so we should react less immediately + */ + var heightCallback = debounce(function (entries) { + var e_3, _a, e_4, _b; + var _c; + try { + for (var entries_2 = __values(entries), entries_2_1 = entries_2.next(); !entries_2_1.done; entries_2_1 = entries_2.next()) { + var entry = entries_2_1.value; + try { + for (var _d = (e_4 = void 0, __values(getBorderBoxSizeFromEntry(entry))), _e = _d.next(); !_e.done; _e = _d.next()) { + var subentry = _e.value; + if (subentry.blockSize !== lastHeight) { + lastHeight = subentry.blockSize; + (_c = action.current) === null || _c === void 0 ? void 0 : _c.updatePosition(); + } + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_e && !_e.done && (_b = _d.return)) _b.call(_d); + } + finally { if (e_4) throw e_4.error; } + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (entries_2_1 && !entries_2_1.done && (_a = entries_2.return)) _a.call(entries_2); + } + finally { if (e_3) throw e_3.error; } + } + }, 300); + var resizeObserver = new ResizeObserver(function (entries) { + widthCallback(entries); + heightCallback(entries); + }); + if (popoverRef) { + var paperElement = popoverRef.querySelector(':scope > .MuiPaper-root'); + if (paperElement) { + resizeObserver.observe(paperElement); + } + } + return function () { + resizeObserver.disconnect(); + }; + }, [action.current, popoverRef]); +}; +export var useMenuState = function (_a) { + var _b = _a === void 0 ? {} : _a, maxHeight = _b.maxHeight; + var anchorRef = React.useRef(null); + var popoverRef = useRerenderingRef(); + var action = React.useRef(); + var _c = __read(React.useState(false), 2), open = _c[0], setOpen = _c[1]; + useListenForChildUpdates({ popoverRef: popoverRef.current, action: action }); + var handleClick = function () { + setOpen(!open); + }; + var handleClose = function () { + setOpen(false); + }; + return { + anchorRef: anchorRef, + open: open, + handleClick: handleClick, + handleClose: handleClose, + /** + * Handy prop bundles for passing to common components + */ + dropdownProps: { + open: open, + handleClose: handleClose, + }, + MuiPopoverProps: __assign({ open: open, onClose: handleClose, anchorEl: anchorRef.current, action: action, ref: popoverRef.ref }, POPOVER_DEFAULTS({ maxHeight: maxHeight })), + MuiButtonProps: { + ref: anchorRef, + onClick: handleClick, + }, + buttonProps: { + ref: anchorRef, + onClick: handleClick, + }, + }; +}; +export var POPOVER_DEFAULTS = function (_a) { + var _b = _a === void 0 ? {} : _a, maxHeight = _b.maxHeight; + return { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'center', + }, + transformOrigin: { + vertical: 'top', + horizontal: 'center', + }, + TransitionProps: { + onEntered: function (element) { + element.style.maxHeight = + maxHeight || "calc(100% - ".concat(element.style.top, " - 10px)"); + }, + }, + }; +}; +export default hot(module)(useMenuState); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS1zdGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvbWVudS1zdGF0ZS9tZW51LXN0YXRlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sUUFBUSxNQUFNLGlCQUFpQixDQUFBO0FBU3RDOzs7R0FHRztBQUNILE1BQU0sVUFBVSxpQkFBaUI7SUFDekIsSUFBQSxLQUFBLE9BQWdCLEtBQUssQ0FBQyxRQUFRLEVBQUssSUFBQSxFQUFsQyxHQUFHLFFBQUEsRUFBRSxNQUFNLFFBQXVCLENBQUE7SUFDekMsSUFBTSxjQUFjLEdBQUcsS0FBSyxDQUFDLFdBQVcsQ0FBQyxNQUFNLEVBQUUsRUFBRSxDQUFDLENBQUE7SUFDcEQsT0FBTztRQUNMLE9BQU8sRUFBRSxHQUFHO1FBQ1osR0FBRyxFQUFFL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cbmV4cG9ydCBjb25zdCBQT1BPVkVSX0RFRkFVTFRTID0gKHsgbWF4SGVpZ2h0IH06IFByb3BzID0ge30pID0+IHtcbiAgcmV0dXJuIHtcbiAgICBhbmNob3JPcmlnaW46IHtcbiAgICAgIHZlcnRpY2FsOiAnYm90dG9tJyxcbiAgICAgIGhvcml6b250YWw6ICdjZW50ZXInLFxuICAgIH0sXG4gICAgdHJhbnNmb3JtT3JpZ2luOiB7XG4gICAgICB2ZXJ0aWNhbDogJ3RvcCcsXG4gICAgICBob3Jpem9udGFsOiAnY2VudGVyJyxcbiAgICB9LFxuICAgIFRyYW5zaXRpb25Qcm9wczoge1xuICAgICAgb25FbnRlcmVkOiAoZWxlbWVudCkgPT4ge1xuICAgICAgICBlbGVtZW50LnN0eWxlLm1heEhlaWdodCA9XG4gICAgICAgICAgbWF4SGVpZ2h0IHx8IGBjYWxjKDEwMCUgLSAke2VsZW1lbnQuc3R5bGUudG9wfSAtIDEwcHgpYFxuICAgICAgfSxcbiAgICB9LFxuICB9IGFzIFJlcXVpcmVkPFxuICAgIFBpY2s8UG9wb3ZlclByb3BzLCAnYW5jaG9yT3JpZ2luJyB8ICd0cmFuc2Zvcm1PcmlnaW4nIHwgJ1RyYW5zaXRpb25Qcm9wcyc+XG4gID5cbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkodXNlTWVudVN0YXRlKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.d.ts b/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.d.ts new file mode 100644 index 00000000000..5fbb4835f68 --- /dev/null +++ b/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +export declare const MetacardOverwrite: ({ title, lazyResult, overwriteUrl, }: { + title: string; + lazyResult: LazyQueryResult; + overwriteUrl?: string | undefined; +}) => JSX.Element; diff --git a/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.js b/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.js new file mode 100644 index 00000000000..72cc030ae9e --- /dev/null +++ b/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.js @@ -0,0 +1,189 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign, __makeTemplateObject, __read } from "tslib"; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'drop... Remove this comment to see the full error message +import Dropzone from 'dropzone'; +import OverwritesInstance from '../singletons/overwrites-instance'; +import React from 'react'; +import styled from 'styled-components'; +import { readableColor } from 'polished'; +import Button from '@mui/material/Button'; +import DialogActions from '@mui/material/DialogActions'; +import DialogTitle from '@mui/material/DialogTitle'; +import DialogContent from '@mui/material/DialogContent'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import { useDialog } from '../dialog'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: auto;\n white-space: nowrap;\n height: 100%;\n"], ["\n overflow: auto;\n white-space: nowrap;\n height: 100%;\n"]))); +var OverwriteStatus = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n white-space: normal;\n vertical-align: top !important;\n width: 100%;\n transform: translateX(0%);\n transition: transform ", " linear;\n text-align: center;\n position: relative;\n padding: 10px;\n"], ["\n display: inline-block;\n white-space: normal;\n vertical-align: top !important;\n width: 100%;\n transform: translateX(0%);\n transition: transform ", " linear;\n text-align: center;\n position: relative;\n padding: 10px;\n"])), function (props) { return props.theme.coreTransitionTime; }); +var OverwriteProgress = styled(OverwriteStatus)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n line-height: ", ";\n"], ["\n line-height: ", ";\n"])), function (props) { return props.theme.minimumButtonSize; }); +var ProgressText = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 10px;\n top: 0px;\n left: 0px;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n font-size: ", ";\n color: ", ";\n"], ["\n padding: 10px;\n top: 0px;\n left: 0px;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 1;\n font-size: ", ";\n color: ", ";\n"])), function (props) { return props.theme.largeFontSize; }, function (props) { return readableColor(props.theme.backgroundContent); }); +var ProgressTextUnder = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: ", ";\n visibility: hidden;\n"], ["\n font-size: ", ";\n visibility: hidden;\n"])), function (props) { return props.theme.largeFontSize; }); +var ProgressInfo = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: ", ";\n color: ", ";\n"], ["\n font-size: ", ";\n color: ", ";\n"])), function (props) { return props.theme.mediumFontSize; }, function (props) { return readableColor(props.theme.backgroundContent); }); +var ProgressBar = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n z-index: 0;\n top: 0px;\n left: 0px;\n position: absolute;\n width: 0%;\n height: 100%;\n background: ", ";\n transition: width ", " linear;\n"], ["\n z-index: 0;\n top: 0px;\n left: 0px;\n position: absolute;\n width: 0%;\n height: 100%;\n background: ", ";\n transition: width ", " linear;\n"])), function (props) { return props.theme.positiveColor; }, function (props) { return props.theme.coreTransitionTime; }); +var OverwriteSuccess = styled(OverwriteStatus)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n font-size: ", ";\n overflow-wrap: break-word;\n width: 50em;\n"], ["\n color: ", ";\n background: ", ";\n font-size: ", ";\n overflow-wrap: break-word;\n width: 50em;\n"])), function (props) { return readableColor(props.theme.positiveColor); }, function (props) { return props.theme.positiveColor; }, function (props) { return props.theme.mediumFontSize; }); +var OverwriteError = styled(OverwriteStatus)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n font-size: ", ";\n overflow-wrap: break-word;\n width: 50em;\n"], ["\n color: ", ";\n background: ", ";\n font-size: ", ";\n overflow-wrap: break-word;\n width: 50em;\n"])), function (props) { return readableColor(props.theme.negativeColor); }, function (props) { return props.theme.negativeColor; }, function (props) { return props.theme.mediumFontSize; }); +var ResultMessage = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-size: ", ";\n margin-left: ", ";\n"], ["\n font-size: ", ";\n margin-left: ", ";\n"])), function (props) { return props.theme.largeFontSize; }, function (props) { return props.theme.minimumButtonSize; }); +var Sending = function (props) { return (React.createElement(OverwriteProgress, null, + React.createElement(ProgressTextUnder, null, + "Uploading File", + React.createElement("div", null, + props.percentage, + "%"), + React.createElement(ProgressInfo, null, "If you leave this view, the overwrite will still continue.")), + React.createElement(ProgressText, null, + "Uploading File", + React.createElement("div", null, + Math.floor(props.percentage), + "%"), + React.createElement(ProgressInfo, null, "If you leave this view, the overwrite will still continue.")), + React.createElement(ProgressBar, { style: { width: "".concat(props.percentage, "%") } }))); }; +var Success = function (props) { return (React.createElement(OverwriteSuccess, null, + React.createElement(ResultMessage, null, props.message))); }; +var Error = function (props) { return (React.createElement(OverwriteError, null, + React.createElement(ResultMessage, null, props.message))); }; +var Stages = { + Sending: Sending, + Success: Success, + Error: Error, +}; +var defaultState = { + stage: '', + percentage: 0, + message: '', +}; +var mapOverwriteModelToState = function (overwriteModel) { + var currentState = {}; + if (overwriteModel.get('success')) { + currentState.stage = 'Success'; + } + else if (overwriteModel.get('error')) { + currentState.stage = 'Error'; + } + else if (overwriteModel.get('sending')) { + currentState.stage = 'Sending'; + } + else { + currentState.stage = ''; + } + currentState.percentage = overwriteModel.get('percentage'); + currentState.message = overwriteModel.escape('message'); + return currentState; +}; +var getOverwriteModel = function (_a) { + var lazyResult = _a.lazyResult; + if (!lazyResult) { + return; + } + return OverwritesInstance.get(lazyResult.plain.id); +}; +export var MetacardOverwrite = function (_a) { + var title = _a.title, lazyResult = _a.lazyResult, overwriteUrl = _a.overwriteUrl; + var dialogContext = useDialog(); + var _b = __read(React.useState(null), 2), overwriteModel = _b[0], setOverwriteModel = _b[1]; + var _c = __read(React.useState(null), 2), dropzone = _c[0], setDropzone = _c[1]; + var _d = __read(React.useState(null), 2), dropzoneElement = _d[0], setDropdownElement = _d[1]; + var _e = useBackbone(), listenTo = _e.listenTo, stopListening = _e.stopListening; + var _f = __read(React.useState(defaultState), 2), state = _f[0], setState = _f[1]; + React.useEffect(function () { + return function () { + OverwritesInstance.removeIfUnused(lazyResult === null || lazyResult === void 0 ? void 0 : lazyResult.plain.id); + }; + }, []); + React.useEffect(function () { + if (lazyResult && dropzoneElement) { + var overrides_1 = { + 'security.access-administrators': lazyResult.plain.metacard.properties['security.access-administrators'] || [], + 'security.access-groups': lazyResult.plain.metacard.properties['security.access-groups'] || [], + 'security.access-groups-read': lazyResult.plain.metacard.properties['security.access-groups-read'] || + [], + 'security.access-individuals': lazyResult.plain.metacard.properties['security.access-individuals'] || + [], + 'security.access-individuals-read': lazyResult.plain.metacard.properties['security.access-individuals-read'] || [], + }; + setDropzone(new Dropzone(dropzoneElement, { + paramName: 'parse.resource', + url: (overwriteUrl ? overwriteUrl : './internal/catalog/') + + lazyResult.plain.id, + maxFilesize: 5000000, + method: 'put', + sending: function (_file, _xhr, formData) { + Object.keys(overrides_1).forEach(function (attribute) { + overrides_1[attribute].forEach(function (value) { + formData.append('parse.' + attribute, value); + }); + }); + }, + })); + } + }, [dropzoneElement, lazyResult]); + React.useEffect(function () { + if (dropzone && lazyResult) { + if (!getOverwriteModel({ lazyResult: lazyResult })) { + OverwritesInstance.add({ + id: lazyResult === null || lazyResult === void 0 ? void 0 : lazyResult.plain.id, + dropzone: dropzone, + result: lazyResult, + }); + } + setOverwriteModel(getOverwriteModel({ lazyResult: lazyResult })); + } + }, [dropzone, lazyResult]); + React.useEffect(function () { + if (overwriteModel) { + setState(mapOverwriteModelToState(overwriteModel)); + var callback_1 = function () { + setState(mapOverwriteModelToState(overwriteModel)); + }; + var eventString_1 = 'change:percentage change:sending change:error change:success'; + listenTo(overwriteModel, eventString_1, callback_1); + return function () { + if (overwriteModel) { + stopListening(overwriteModel, eventString_1, callback_1); + } + }; + } + return function () { }; + }, [overwriteModel]); + var startOver = function () { + OverwritesInstance.remove(lazyResult === null || lazyResult === void 0 ? void 0 : lazyResult.plain.id); + OverwritesInstance.add({ + id: lazyResult === null || lazyResult === void 0 ? void 0 : lazyResult.plain.id, + dropzone: dropzone, + result: lazyResult, + }); + setOverwriteModel(getOverwriteModel({ lazyResult: lazyResult })); + setState(defaultState); + }; + var Component = Stages[state.stage]; + return (React.createElement(Root, null, + React.createElement("div", { style: { display: 'none' }, ref: setDropdownElement }), + React.createElement(DialogTitle, null, title), + React.createElement(DialogContent, { style: { width: '50em' } }, + "Are you sure you want to overwrite the content?", + React.createElement("br", null), + "WARNING: This will completely overwrite the current content and metadata."), + Component && React.createElement(Component, __assign({}, state)), + React.createElement(DialogActions, null, + React.createElement(Button, { onClick: function () { + dialogContext.setProps({ open: false }); + startOver(); + } }, "Cancel"), + React.createElement(Button, { onClick: function () { + dropzoneElement === null || dropzoneElement === void 0 ? void 0 : dropzoneElement.click(); + startOver(); + } }, "Overwrite")))); +}; +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_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3cml0ZSB0aGUgY29udGVudD9cbiAgICAgICAgPGJyIC8+XG4gICAgICAgIFdBUk5JTkc6IFRoaXMgd2lsbCBjb21wbGV0ZWx5IG92ZXJ3cml0ZSB0aGUgY3VycmVudCBjb250ZW50IGFuZFxuICAgICAgICBtZXRhZGF0YS5cbiAgICAgIDwvRGlhbG9nQ29udGVudD5cblxuICAgICAge0NvbXBvbmVudCAmJiA8Q29tcG9uZW50IHsuLi5zdGF0ZX0gLz59XG5cbiAgICAgIDxEaWFsb2dBY3Rpb25zPlxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgZGlhbG9nQ29udGV4dC5zZXRQcm9wcyh7IG9wZW46IGZhbHNlIH0pXG4gICAgICAgICAgICBzdGFydE92ZXIoKVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICBDYW5jZWxcbiAgICAgICAgPC9CdXR0b24+XG4gICAgICAgIDxCdXR0b25cbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBkcm9wem9uZUVsZW1lbnQ/LmNsaWNrKClcbiAgICAgICAgICAgIHN0YXJ0T3ZlcigpXG4gICAgICAgICAgfX1cbiAgICAgICAgPlxuICAgICAgICAgIE92ZXJ3cml0ZVxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgIDwvRGlhbG9nQWN0aW9ucz5cbiAgICA8L1Jvb3Q+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/metacard-preview/metacard-preview.view.d.ts b/src/main/webapp/component/metacard-preview/metacard-preview.view.d.ts new file mode 100644 index 00000000000..e038fc4ac6f --- /dev/null +++ b/src/main/webapp/component/metacard-preview/metacard-preview.view.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +export declare const MetacardPreviewReact: ({ result, }: { + result: LazyQueryResult; +}) => JSX.Element; diff --git a/src/main/webapp/component/metacard-preview/metacard-preview.view.js b/src/main/webapp/component/metacard-preview/metacard-preview.view.js new file mode 100644 index 00000000000..6f970807cab --- /dev/null +++ b/src/main/webapp/component/metacard-preview/metacard-preview.view.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Paper from '@mui/material/Paper'; +import React from 'react'; +import Common from '../../js/Common'; +export var MetacardPreviewReact = function (_a) { + var result = _a.result; + return (React.createElement(Paper, { className: "p-4 w-full h-full overflow-auto" }, + React.createElement("span", { className: " whitespace-pre-wrap", dangerouslySetInnerHTML: { + __html: Common.escapeHTML(result.getPreview()), + } }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQtcHJldmlldy52aWV3LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9tZXRhY2FyZC1wcmV2aWV3L21ldGFjYXJkLXByZXZpZXcudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE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IVE1MKHJlc3VsdC5nZXRQcmV2aWV3KCkpLFxuICAgICAgICB9fVxuICAgICAgLz5cbiAgICA8L1BhcGVyPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/notification-group/notification-group.view.d.ts b/src/main/webapp/component/notification-group/notification-group.view.d.ts new file mode 100644 index 00000000000..17341893685 --- /dev/null +++ b/src/main/webapp/component/notification-group/notification-group.view.d.ts @@ -0,0 +1,7 @@ +/// +type NotificationGroupViewReactType = { + date: any; + filter: any; +}; +export declare const NotificationGroupViewReact: ({ date, filter, }: NotificationGroupViewReactType) => JSX.Element | null; +export {}; diff --git a/src/main/webapp/component/notification-group/notification-group.view.js b/src/main/webapp/component/notification-group/notification-group.view.js new file mode 100644 index 00000000000..0722693bb9e --- /dev/null +++ b/src/main/webapp/component/notification-group/notification-group.view.js @@ -0,0 +1,55 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { UploadBatchItemViewReact } from '../upload-batch-item/upload-batch-item.view'; +import userNotifications from '../singletons/user-notifications'; +import user from '../singletons/user-instance'; +import Button from '@mui/material/Button'; +import CloseIcon from '@mui/icons-material/Close'; +import { useDialogState } from '../hooks/useDialogState'; +export var NotificationGroupViewReact = function (_a) { + var date = _a.date, filter = _a.filter; + var dialog = useDialogState(); + var relevantNotifications = userNotifications.filter(filter); + if (relevantNotifications.length === 0) { + return null; + } + return (React.createElement(React.Fragment, null, + React.createElement(dialog.MuiDialogComponents.Dialog, __assign({}, dialog.MuiDialogProps), + React.createElement(dialog.MuiDialogComponents.DialogTitle, null, + "Remove all notifications for ", + date, + "?"), + React.createElement(dialog.MuiDialogComponents.DialogActions, null, + React.createElement(Button, { onClick: function () { + dialog.handleClose(); + } }, "Cancel"), + React.createElement(Button, { color: "primary", onClick: function () { + dialog.handleClose(); + userNotifications.filter(filter).forEach(function (model) { + model.collection.remove(model); + }); + user.get('user').get('preferences').savePreferences(); + } }, "Confirm"))), + React.createElement("div", { className: "flex flex-row items-center w-full" }, + React.createElement("div", { className: "header-when w-full" }, date), + React.createElement(Button, __assign({ size: "large" }, dialog.MuiButtonProps), + React.createElement(CloseIcon, null))), + React.createElement("div", { className: "w-full flex flex-col space-y-4" }, userNotifications.filter(filter).map(function (notification) { + return (React.createElement(UploadBatchItemViewReact, { key: notification.id, model: notification })); + })))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWdyb3VwLnZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L25vdGlmaWNhdGlvbi1ncm91cC9ub3RpZmljYXRpb24tZ3JvdXAudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sNkNBQTZDLENBQUE7QUFDdEYsT0FBTyxpQkFBaUIsTUFBTSxrQ0FBa0MsQ0FBQTtBQUNoRSxPQUFPLElBQUksTUFBTSw2QkFBNkIsQ0FBQTtBQUM5QyxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLFNBQVMsTUFBTSwyQkFBMkIsQ0FBQTtBQUNqRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0seUJBQXlCLENBQUE7QUF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IHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPFVwbG9hZEJhdGNoSXRlbVZpZXdSZWFjdFxuICAgICAgICAgICAgICBrZXk9e25vdGlmaWNhdGlvbi5pZH1cbiAgICAgICAgICAgICAgbW9kZWw9e25vdGlmaWNhdGlvbn1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKVxuICAgICAgICB9KX1cbiAgICAgIDwvZGl2PlxuICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/overflow-tooltip/overflow-tooltip.d.ts b/src/main/webapp/component/overflow-tooltip/overflow-tooltip.d.ts new file mode 100644 index 00000000000..5831c9ef644 --- /dev/null +++ b/src/main/webapp/component/overflow-tooltip/overflow-tooltip.d.ts @@ -0,0 +1,20 @@ +import React from 'react'; +import { TooltipProps } from '@mui/material/Tooltip'; +type OverflowTipType = { + children: React.ReactNode; + tooltipProps?: Partial; + refOfThingToMeasure?: HTMLDivElement | null; + className?: string; +}; +export type OverflowTooltipHTMLElement = HTMLDivElement & { + overflowTooltip: { + setOpen: (open: boolean) => void; + }; +}; +export declare function useIsTruncated(passedInRef?: T | null): { + isTruncated: boolean; + ref: React.MutableRefObject; + compareSize: React.MutableRefObject<() => void>; +}; +declare const _default: ({ children, tooltipProps, refOfThingToMeasure: refOfThingToMeasurePassedIn, className, }: OverflowTipType) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/overflow-tooltip/overflow-tooltip.js b/src/main/webapp/component/overflow-tooltip/overflow-tooltip.js new file mode 100644 index 00000000000..669aaf34515 --- /dev/null +++ b/src/main/webapp/component/overflow-tooltip/overflow-tooltip.js @@ -0,0 +1,91 @@ +import { __assign, __read, __rest } from "tslib"; +import React, { useRef, useEffect } from 'react'; +import Tooltip from '@mui/material/Tooltip'; +import Paper from '@mui/material/Paper'; +import { hot } from 'react-hot-loader'; +import { Elevations } from '../theme/theme'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import wreqr from '../../js/wreqr'; +function areDescendentsTruncated(element) { + if (!element) { + return false; + } + /** + * Why 1 and not 0? Well, in writing mode vertical, there is a discrepancy of 1. + */ + if (Math.abs(element.scrollWidth - element.clientWidth) > 1) { + return true; + } + if (element.children) { + for (var i = 0; i < element.children.length; i++) { + var hasTruncatedDescendent = areDescendentsTruncated(element.children[i]); + if (hasTruncatedDescendent) { + return hasTruncatedDescendent; + } + } + } + return false; +} +export function useIsTruncated(passedInRef) { + if (passedInRef === void 0) { passedInRef = null; } + var _a = __read(React.useState(false), 2), isTruncated = _a[0], setIsTruncated = _a[1]; + var ref = useRef(passedInRef); + var compareSizeRef = useRef(function () { }); + var _b = useBackbone(), listenTo = _b.listenTo, stopListening = _b.stopListening; + useEffect(function () { + var compareSize = function () { + if (ref.current) { + setIsTruncated(areDescendentsTruncated(ref.current)); + } + }; + compareSizeRef.current = compareSize; + if (ref.current) { + compareSize(); + listenTo(wreqr.vent, 'resize', compareSize); + window.addEventListener('resize', compareSize); + ref.current.addEventListener('mouseenter', compareSize); + } + else { + console.warn('WARNING: No element found to compare. You must take in and set a ref (refOfThingToMeasure) on one of your elements so this knows when to display a tooltip.'); + } + return function () { + var _a; + stopListening(wreqr.vent, 'resize', compareSize); + window.removeEventListener('resize', compareSize); + (_a = ref.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', compareSize); + }; + }); + return { + isTruncated: isTruncated, + ref: ref, + compareSize: compareSizeRef, + }; +} +var OverflowTip = function (_a) { + var children = _a.children, _b = _a.tooltipProps, tooltipProps = _b === void 0 ? {} : _b, refOfThingToMeasurePassedIn = _a.refOfThingToMeasure, className = _a.className; + var title = tooltipProps.title, otherTooltipProps = __rest(tooltipProps, ["title"]); + var _c = __read(React.useState(false), 2), open = _c[0], setOpen = _c[1]; + var isTruncatedState = useIsTruncated(refOfThingToMeasurePassedIn); + React.useEffect(function () { + // expose this ugly thing when no other way will work (autocompletes unfortunately) + ; + isTruncatedState.ref.current.overflowTooltip = { + setOpen: function (open) { + if (isTruncatedState.isTruncated) + setOpen(open); + }, + }; + }, [isTruncatedState.ref.current]); + return (React.createElement(Tooltip, __assign({ title: React.createElement(Paper, { className: "p-1 overflow-auto max-w-screen-sm", elevation: Elevations.overlays }, title ? title : children), open: open, onOpen: function () { + if (isTruncatedState.isTruncated) { + setOpen(true); + } + }, onClose: function () { + setOpen(false); + }, PopperProps: { + className: '', + } }, otherTooltipProps), + React.createElement("div", { ref: isTruncatedState.ref, className: className }, children))); +}; +export default hot(module)(OverflowTip); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcmZsb3ctdG9vbHRpcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvb3ZlcmZsb3ctdG9vbHRpcC9vdmVyZmxvdy10b29sdGlwLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ2hELE9BQU8sT0FBeUIsTUFBTSx1QkFBdUIsQ0FBQTtBQUM3RCxPQUFPLEtBQUssTUFBTSxxQkFBcUIsQ0FBQTtBQUN2QyxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBQzNDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQTtBQUNwRSxPQUFPLEtBQUssTUFBTSxnQkFBZ0IsQ0FBQTtBQVlsQyxTQUFTLHVCQUF1QixDQUFDLE9BQWlCO0lBQ2hELElBQUksQ0FBQyxPQUFPLEVBQUU7UUFDWixPQUFPLEtBQUssQ0FB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F0ZWRTdGF0ZS5yZWZ9IGNsYXNzTmFtZT17Y2xhc3NOYW1lfT5cbiAgICAgICAge2NoaWxkcmVufVxuICAgICAgPC9kaXY+XG4gICAgPC9Ub29sdGlwPlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShPdmVyZmxvd1RpcClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/pages/browse.d.ts b/src/main/webapp/component/pages/browse.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/component/pages/browse.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/pages/browse.js b/src/main/webapp/component/pages/browse.js new file mode 100644 index 00000000000..3291a590b7f --- /dev/null +++ b/src/main/webapp/component/pages/browse.js @@ -0,0 +1,161 @@ +import { __assign, __read } from "tslib"; +import TextField from '@mui/material/TextField'; +import Paper from '@mui/material/Paper'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { DarkDivider } from '../dark-divider/dark-divider'; +import { FilterBuilderClass, FilterClass, } from '../filter-builder/filter.structure'; +import { useQuery, useUserQuery } from '../../js/model/TypedQuery'; +import { useLazyResultsSelectedResultsFromSelectionInterface } from '../selection-interface/hooks'; +import { Elevations } from '../theme/theme'; +import SelectionInterface from '../selection-interface/selection-interface.model'; +import _debounce from 'lodash.debounce'; +import LinearProgress from '@mui/material/LinearProgress'; +import Autocomplete from '@mui/material/Autocomplete'; +import Button from '@mui/material/Button'; +import QueryFeed from '../result-selector/query-feed'; +import Paging from '../result-selector/paging'; +import { getSortDirectionOptions } from '../../react-component/query-sort-selection/sort-selection-helpers'; +import ResultsVisual from '../visualization/results-visual/results-visual'; +import { SplitPane } from '../resizable-grid/resizable-grid'; +import { GoldenLayout } from '../golden-layout/golden-layout'; +import { Memo } from '../memo/memo'; +import { useUpdateEffect } from 'react-use'; +import { getDefaultComponentState } from '../visualization/settings-helpers'; +var modifySearch = function (_a) { + var search = _a.search, filter = _a.filter, sortAttribute = _a.sortAttribute, sortDirection = _a.sortDirection; + var filterBuilder = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: '=', + property: 'metacard-tags', + value: 'query', // query + }), + ], + }); + if (filter.length > 0) { + filterBuilder.filters.push(new FilterClass({ + type: 'ILIKE', + property: 'title', + value: "*".concat(filter, "*"), + })); + } + var sorts = [ + { + attribute: sortAttribute === 'title' ? 'title' : 'metacard.modified', + direction: sortDirection.toLowerCase(), + }, + ]; + search.set('filterTree', filterBuilder); + search.set('sorts', sorts); + return search; +}; +var buildSearchFromSelection = function (_a) { + var search = _a.search, lazyResults = _a.lazyResults; + var totalFilterTree = Object.values(lazyResults).reduce(function (filterTree, lazyResult) { + filterTree.filters.push(new FilterBuilderClass(JSON.parse(lazyResult.plain.metacard.properties.filterTree))); + return filterTree; + }, new FilterBuilderClass({ type: 'OR', filters: [] })); + search.set('filterTree', totalFilterTree); + return search; +}; +var SelectionInfoPane = function (_a) { + var searchSelectionInterface = _a.searchSelectionInterface; + var _b = __read(useUserQuery(), 1), search = _b[0]; + var lazyResults = useLazyResultsSelectedResultsFromSelectionInterface({ + selectionInterface: searchSelectionInterface, + }); + var _c = __read(React.useState(new SelectionInterface({ + currentQuery: buildSearchFromSelection({ lazyResults: lazyResults, search: search }), + })), 1), selectionInterface = _c[0]; + React.useEffect(function () { + if (Object.keys(lazyResults).length > 0) { + buildSearchFromSelection({ + search: search, + lazyResults: lazyResults, + }); + selectionInterface.getCurrentQuery().startSearchFromFirstPage(); + } + else { + selectionInterface.getCurrentQuery().cancelCurrentSearches(); + } + }, [lazyResults]); + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "block w-full h-full relative" }, + React.createElement("div", { className: Object.keys(lazyResults).length > 0 + ? 'hidden' + : 'block py-2 pr-2 w-full h-full left-0 top-0 absolute z-10' }, + React.createElement("div", { className: "p-2 w-full h-full relative" }, + React.createElement("div", { className: "opacity-75 bg-black absolute left-0 top-0 w-full h-full z-0" }), + React.createElement("div", { className: "block text-xl text-white z-10 relative" }, + React.createElement("span", { className: "bg-black p-2" }, "Select a search(s) from the left to preview.")))), + React.createElement(GoldenLayout, { selectionInterface: selectionInterface })))); +}; +var SavedSearches = function () { + var _a; + var _b = __read(React.useState(''), 2), filter = _b[0], setFilter = _b[1]; + var _c = __read(React.useState('last modified'), 2), sortAttribute = _c[0], setSortAttribute = _c[1]; + var _d = __read(React.useState('descending'), 2), sortDirection = _d[0], setSortDirection = _d[1]; + var _f = __read(useQuery(), 1), search = _f[0]; + var selectionInterface = React.useMemo(function () { + return new SelectionInterface({ + currentQuery: search, + }); + }, []); + var debouncedUpdate = React.useRef(_debounce(function (_a) { + var filter = _a.filter, sortAttribute = _a.sortAttribute, sortDirection = _a.sortDirection, search = _a.search; + modifySearch({ filter: filter, sortAttribute: sortAttribute, sortDirection: sortDirection, search: search }); + selectionInterface.getCurrentQuery().startSearchFromFirstPage(); + setIsUpdating(false); + }, 500)); + var _g = __read(React.useState(false), 2), isUpdating = _g[0], setIsUpdating = _g[1]; + React.useEffect(function () { + setIsUpdating(true); + debouncedUpdate.current({ + filter: filter, + sortAttribute: sortAttribute, + sortDirection: sortDirection, + search: selectionInterface.getCurrentQuery(), + }); + }, [filter, sortAttribute, sortDirection]); + useUpdateEffect(function () { + /** + * This makes sense, because we only have title and last modified. + * + * The natural inclination is inverted for sort direction for alphabetical vs time. + */ + setSortDirection(sortAttribute === 'title' ? 'ascending' : 'descending'); + }, [sortAttribute]); + return (React.createElement("div", { className: "w-full h-full flex flex-col flex-nowrap overflow-hidden " }, + React.createElement("div", { className: "shrink-0 w-full pt-2 pr-2" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "min-h-16 w-full shrink-0 p-2 flex flex-row items-center flex-wrap" }, + React.createElement(TextField, { label: "Filter", size: "small", value: filter, variant: "outlined", autoFocus: true, onChange: function (e) { + setFilter(e.target.value); + } }), + React.createElement(Autocomplete, { className: "w-48 ml-2", options: ['title', 'last modified'], renderOption: function (option) { + return React.createElement(React.Fragment, null, option); + }, value: sortAttribute, onChange: function (_e, newValue) { + setSortAttribute(newValue || 'title'); + }, renderInput: function (params) { + return (React.createElement(TextField, __assign({}, params, { label: "Sort by", variant: "outlined", size: "small", inputProps: __assign({}, params.inputProps) }))); + } }), + React.createElement(Button, { className: "ml-2", size: "small", variant: "text", onClick: function () { + setSortDirection(sortDirection === 'ascending' ? 'descending' : 'ascending'); + } }, (_a = getSortDirectionOptions(sortAttribute === 'title' ? 'title' : 'metacard.modified').find(function (option) { return option.value === sortDirection; })) === null || _a === void 0 ? void 0 : _a.label), + React.createElement("div", { className: "ml-auto" }, + React.createElement(QueryFeed, { selectionInterface: selectionInterface })), + React.createElement("div", { className: "ml-2" }, + React.createElement(Paging, { selectionInterface: selectionInterface })))), + React.createElement(DarkDivider, null), + React.createElement("div", { className: "relative h-full overflow-hidden w-full shrink" }, + isUpdating ? (React.createElement(LinearProgress, { variant: "indeterminate", className: "absolute left-0 top-0 w-full h-min" })) : null, + React.createElement(Memo, { dependencies: [] }, + React.createElement(SplitPane, { variant: "horizontal" }, + React.createElement("div", { className: "py-2 w-full h-full" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "w-full h-full" }, + React.createElement(ResultsVisual, { selectionInterface: selectionInterface, componentState: getDefaultComponentState('results') }))), + React.createElement(SelectionInfoPane, { searchSelectionInterface: selectionInterface })))))); +}; +export default hot(module)(SavedSearches); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJvd3NlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9wYWdlcy9icm93c2UudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLFNBQVMsTUFBTSx5QkFBeUIsQ0FBQTtBQUMvQyxPQUFPLEtBQUssTUFBTSxxQkFB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IHctZnVsbCBwdC0yIHByLTJcIj5cbiAgICAgICAgPFBhcGVyXG4gICAgICAgICAgZWxldmF0aW9uPXtFbGV2YXRpb25zLnBhbmVsc31cbiAgICAgICAgICBjbGFzc05hbWU9XCJtaW4taC0xNiB3LWZ1bGwgc2hyaW5rLTAgcC0yIGZsZXggZmxleC1yb3cgaXRlbXMtY2VudGVyIGZsZXgtd3JhcFwiXG4gICAgICAgID5cbiAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICBsYWJlbD1cIkZpbHRlclwiXG4gICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgdmFsdWU9e2ZpbHRlcn1cbiAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICBhdXRvRm9jdXNcbiAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBzZXRGaWx0ZXIoZS50YXJnZXQudmFsdWUpXG4gICAgICAgICAgICB9fVxuICAgICAgICAgIC8+XG4gICAgICAgICAgey8qIDxkaXYgY2xhc3NOYW1lPVwidGV4dC1sZ1wiPlNvcnQgYnk8L2Rpdj4gKi99XG4gICAgICAgICAgPEF1dG9jb21wbGV0ZVxuICAgICAgICAgICAgY2xhc3NOYW1lPVwidy00OCBtbC0yXCJcbiAgICAgICAgICAgIG9wdGlvbnM9e1sndGl0bGUnLCAnbGFzdCBtb2RpZmllZCddIGFzIFNvcnRBdHRyaWJ1dGVUeXBlW119XG4gICAgICAgICAgICByZW5kZXJPcHRpb249eyhvcHRpb24pID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIDw+e29wdGlvbn08Lz5cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICB2YWx1ZT17c29ydEF0dHJpYnV0ZX1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsoX2UsIG5ld1ZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgIHNldFNvcnRBdHRyaWJ1dGUobmV3VmFsdWUgfHwgJ3RpdGxlJylcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICByZW5kZXJJbnB1dD17KHBhcmFtcykgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxUZXh0RmllbGRcbiAgICAgICAgICAgICAgICAgIHsuLi5wYXJhbXN9XG4gICAgICAgICAgICAgICAgICBsYWJlbD1cIlNvcnQgYnlcIlxuICAgICAgICAgICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICAgICAgICBpbnB1dFByb3BzPXt7IC4uLnBhcmFtcy5pbnB1dFByb3BzIH19XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgIGNsYXNzTmFtZT1cIm1sLTJcIlxuICAgICAgICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgICAgICAgIHZhcmlhbnQ9XCJ0ZXh0XCJcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgc2V0U29ydERpcmVjdGlvbihcbiAgICAgICAgICAgICAgICBzb3J0RGlyZWN0aW9uID09PSAnYXNjZW5kaW5nJyA/ICdkZXNjZW5kaW5nJyA6ICdhc2NlbmRpbmcnXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBnZXRTb3J0RGlyZWN0aW9uT3B0aW9ucyhcbiAgICAgICAgICAgICAgICBzb3J0QXR0cmlidXRlID09PSAndGl0bGUnID8gJ3RpdGxlJyA6ICdtZXRhY2FyZC5tb2RpZmllZCdcbiAgICAgICAgICAgICAgKS5maW5kKChvcHRpb24pID0+IG9wdGlvbi52YWx1ZSA9PT0gc29ydERpcmV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N1bHRzVmlzdWFsXG4gICAgICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX1cbiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudFN0YXRlPXtnZXREZWZhdWx0Q29tcG9uZW50U3RhdGUoJ3Jlc3VsdHMnKSBhcyBhbnl9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPFNlbGVjdGlvbkluZm9QYW5lIHNlYXJjaFNlbGVjdGlvbkludGVyZmFjZT17c2VsZWN0aW9uSW50ZXJmYWNlfSAvPlxuICAgICAgICAgIDwvU3BsaXRQYW5lPlxuICAgICAgICA8L01lbW8+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShTYXZlZFNlYXJjaGVzKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/pages/create.d.ts b/src/main/webapp/component/pages/create.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/component/pages/create.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/pages/create.js b/src/main/webapp/component/pages/create.js new file mode 100644 index 00000000000..1624e3e8ac2 --- /dev/null +++ b/src/main/webapp/component/pages/create.js @@ -0,0 +1,70 @@ +import { __read } from "tslib"; +import Button from '@mui/material/Button'; +import MenuItem from '@mui/material/MenuItem'; +import Paper from '@mui/material/Paper'; +import Popover from '@mui/material/Popover'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useHistory } from 'react-router-dom'; +import { AsyncTasks } from '../../js/model/AsyncTask/async-task'; +import { useQuery, UserQuery } from '../../js/model/TypedQuery'; +import { useMenuState } from '../menu-state/menu-state'; +import { Elevations } from '../theme/theme'; +import { OpenSearch, SaveForm } from './search'; +import SelectionInterfaceModel from '../selection-interface/selection-interface.model'; +var selectionInterface = new SelectionInterfaceModel(); +var Open = function () { + var history = useHistory(); + var openMenuState = useMenuState(); + var titleMenuState = useMenuState(); + var fromExistingMenuState = useMenuState(); + var _a = __read(useQuery(), 1), search = _a[0]; + React.useEffect(function () { + openMenuState.handleClick(); + }, []); + React.useEffect(function () { + selectionInterface.setCurrentQuery(search); + }, []); + return (React.createElement("div", { className: "w-full h-full p-2" }, + React.createElement(Button, { component: "div", onClick: openMenuState.handleClick, className: "text-2xl pb-2", variant: "contained", color: "primary", ref: openMenuState.anchorRef }, "Create"), + React.createElement(Popover, { open: titleMenuState.open, anchorEl: titleMenuState.anchorRef.current, onClose: titleMenuState.handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, + React.createElement(SaveForm, { selectionInterface: selectionInterface, onClose: function () { + titleMenuState.handleClose(); + }, onSave: function (title) { + var searchData = UserQuery().toJSON(); + searchData.title = title; + var task = AsyncTasks.createSearch({ data: searchData }); + history.push({ + pathname: "/search/".concat(task.data.id), + search: '', + }); + } }))), + React.createElement(Popover, { open: fromExistingMenuState.open, anchorEl: fromExistingMenuState.anchorRef.current, onClose: fromExistingMenuState.handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2 w-64" }, + React.createElement(OpenSearch, { label: "", constructLink: function (result) { + return "/search/".concat(result.plain.id); + }, onFinish: function (value) { + var copy = JSON.parse(JSON.stringify(value.plain.metacard.properties)); + delete copy.id; + copy.title = "New from '".concat(copy.title, "'"); + var task = AsyncTasks.createSearch({ data: copy }); + // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally + history.replace({ + pathname: "/search/".concat(task.data.id), + search: '', + }); + }, autocompleteProps: { + fullWidth: true, + className: 'w-full', + } }))), + React.createElement(Popover, { open: openMenuState.open, onClose: openMenuState.handleClose, anchorEl: openMenuState.anchorRef.current, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(MenuItem, { component: "div", ref: titleMenuState.anchorRef, onClick: function () { + titleMenuState.handleClick(); + } }, "Search"), + React.createElement(MenuItem, { component: "div", ref: fromExistingMenuState.anchorRef, onClick: function () { + fromExistingMenuState.handleClick(); + } }, "Search from existing")))); +}; +export default hot(module)(Open); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9wYWdlcy9jcmVhdGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLFFBQVEsTUFBTSx3QkFBd0IsQ0FBQTtBQUM3QyxPQUFPLEtBQUssTUFBTSxxQkFBcUIsQ0FBQTtBQUN2QyxPQUFPLE9BQU8sTUFBTSx1QkFBdUIsQ0FBQTtBQUMzQyxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQzdDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQTtBQUNoRSxPQUFPLEVBQUUsUUFBUSxFQUFFLFNBQVMsRUFBRSxNQUFNLDJCQUEyQixDQUFBO0FBQy9ELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQTtBQUN2RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZ0JBQWdCLENBQUE7QUFDM0MsT0FBTyxFQUFFLFVBQVU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ICAgICAgICAgICBvbkZpbmlzaD17KHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IGNvcHkgPSBKU09OLnBhcnNlKFxuICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KHZhbHVlLnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMpXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgZGVsZXRlIGNvcHkuaWRcbiAgICAgICAgICAgICAgY29weS50aXRsZSA9IGBOZXcgZnJvbSAnJHtjb3B5LnRpdGxlfSdgXG4gICAgICAgICAgICAgIGNvbnN0IHRhc2sgPSBBc3luY1Rhc2tzLmNyZWF0ZVNlYXJjaCh7IGRhdGE6IGNvcHkgfSlcbiAgICAgICAgICAgICAgLy8gcmVwbGFjZSBiZWNhdXNlIHRlY2huaWNhbGx5IHRoZXkgZ2V0IHRoZSBsaW5rIGluIGNvbnN0cnVjdExpbmsgcHV0IGludG8gaGlzdG9yeSBhcyB3ZWxsIHVuZm9ydHVuYXRlbHksIHdpbGwgbmVlZCB0byBmaXggdGhpcyBtb3JlIGdlbmVyYWxseVxuICAgICAgICAgICAgICBoaXN0b3J5LnJlcGxhY2Uoe1xuICAgICAgICAgICAgICAgIHBhdGhuYW1lOiBgL3NlYXJjaC8ke3Rhc2suZGF0YS5pZH1gLFxuICAgICAgICAgICAgICAgIHNlYXJjaDogJycsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgYXV0b2NvbXBsZXRlUHJvcHM9e3tcbiAgICAgICAgICAgICAgZnVsbFdpZHRoOiB0cnVlLFxuICAgICAgICAgICAgICBjbGFzc05hbWU6ICd3LWZ1bGwnLFxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L1BhcGVyPlxuICAgICAgPC9Qb3BvdmVyPlxuICAgICAgPFBvcG92ZXJcbiAgICAgICAgb3Blbj17b3Blbk1lbnVTdGF0ZS5vcGVufVxuICAgICAgICBvbkNsb3NlPXtvcGVuTWVudVN0YXRlLmhhbmRsZUNsb3NlfVxuICAgICAgICBhbmNob3JFbD17b3Blbk1lbnVTdGF0ZS5hbmNob3JSZWYuY3VycmVudH1cbiAgICAgICAgYW5jaG9yT3JpZ2luPXt7IHZlcnRpY2FsOiAnYm90dG9tJywgaG9yaXpvbnRhbDogJ2xlZnQnIH19XG4gICAgICA+XG4gICAgICAgIDxNZW51SXRlbVxuICAgICAgICAgIGNvbXBvbmVudD1cImRpdlwiXG4gICAgICAgICAgcmVmPXt0aXRsZU1lbnVTdGF0ZS5hbmNob3JSZWZ9XG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgdGl0bGVNZW51U3RhdGUuaGFuZGxlQ2xpY2soKVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICBTZWFyY2hcbiAgICAgICAgPC9NZW51SXRlbT5cbiAgICAgICAgPE1lbnVJdGVtXG4gICAgICAgICAgY29tcG9uZW50PVwiZGl2XCJcbiAgICAgICAgICByZWY9e2Zyb21FeGlzdGluZ01lbnVTdGF0ZS5hbmNob3JSZWZ9XG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgZnJvbUV4aXN0aW5nTWVudVN0YXRlLmhhbmRsZUNsaWNrKClcbiAgICAgICAgICB9fVxuICAgICAgICA+XG4gICAgICAgICAgU2VhcmNoIGZyb20gZXhpc3RpbmdcbiAgICAgICAgPC9NZW51SXRlbT5cbiAgICAgIDwvUG9wb3Zlcj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShPcGVuKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/pages/metacard-nav.d.ts b/src/main/webapp/component/pages/metacard-nav.d.ts new file mode 100644 index 00000000000..af0f588cec3 --- /dev/null +++ b/src/main/webapp/component/pages/metacard-nav.d.ts @@ -0,0 +1,7 @@ +/// +import { FilterBuilderClass } from '../filter-builder/filter.structure'; +export declare const getFilterTreeForId: ({ id }: { + id: string; +}) => FilterBuilderClass; +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/pages/metacard-nav.js b/src/main/webapp/component/pages/metacard-nav.js new file mode 100644 index 00000000000..4a7f5cb9ccb --- /dev/null +++ b/src/main/webapp/component/pages/metacard-nav.js @@ -0,0 +1,84 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useParams } from 'react-router-dom'; +import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks'; +import { useStatusOfLazyResults } from '../../js/model/LazyQueryResult/hooks'; +import CircularProgress from '@mui/material/CircularProgress'; +import SelectionInterfaceModel from '../selection-interface/selection-interface.model'; +import Grid from '@mui/material/Grid'; +import { DEFAULT_QUERY_OPTIONS, useUserQuery } from '../../js/model/TypedQuery'; +import { FilterBuilderClass, FilterClass, } from '../filter-builder/filter.structure'; +import { TypedUserInstance, useEphemeralFilter } from '../singletons/TypedUser'; +import Button from '@mui/material/Button'; +import { TitleView } from '../visualization/inspector/inspector'; +export var getFilterTreeForId = function (_a) { + var id = _a.id; + return new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: '=', + value: id, + property: '"id"', + }), + new FilterClass({ + type: 'ILIKE', + value: '*', + property: '"metacard-tags"', + }), + ], + }); +}; +var MetacardNavRoute = function () { + var params = useParams(); + var _a = __read(React.useState(params.metacardId || params.id), 2), id = _a[0], setId = _a[1]; + React.useEffect(function () { + setId(params.metacardId || params.id); + }, [params.metacardId]); + var _b = __read(useUserQuery({ + attributes: { + filterTree: getFilterTreeForId({ id: id }), + }, + options: { + transformDefaults: DEFAULT_QUERY_OPTIONS.transformDefaults, + }, + }), 1), query = _b[0]; + var ephemeralFilter = useEphemeralFilter(); + var _c = __read(React.useState(new SelectionInterfaceModel({ + currentQuery: query, + })), 1), selectionInterface = _c[0]; + React.useEffect(function () { + query.set('filterTree', getFilterTreeForId({ id: id })); + query.cancelCurrentSearches(); + query.startSearchFromFirstPage(); + return function () { + query.cancelCurrentSearches(); + }; + }, [id]); + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var isSearching = useStatusOfLazyResults({ lazyResults: lazyResults }).isSearching; + var filteredResults = Object.values(lazyResults.results); + var notFoundYet = isSearching && filteredResults.length === 0; + if (notFoundYet) { + return (React.createElement(React.Fragment, null, + React.createElement("div", null, + React.createElement(CircularProgress, { color: "inherit" })))); + } + else if (filteredResults.length === 0) { + return (React.createElement("div", { className: "flex h-full items-center" }, + React.createElement("div", null, " No result could be found."), + ephemeralFilter ? (React.createElement(Button, { variant: "outlined", color: "primary", className: "ml-2", onClick: function () { + TypedUserInstance.removeEphemeralFilter(); + } }, "Remove filter?")) : null)); + } + else { + return (React.createElement(Grid, { container: true, alignItems: "center", className: "w-full h-full" }, + React.createElement(Grid, { item: true, className: "max-w-full" }, + React.createElement(TitleView, { lazyResult: filteredResults[0] })))); + } +}; +export default hot(module)(MetacardNavRoute); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQtbmF2LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9wYWdlcy9tZXRhY2FyZC1uYXYudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQzVDLE9BQU8sRUFBRSxvQ0FBb0MsRUFBRSxNQUFNLDhCQUE4QixDQUFBO0FBQ25GLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHNDQUFzQy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mlsdGVyKClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgUmVtb3ZlIGZpbHRlcj9cbiAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICA8L2Rpdj5cbiAgICApXG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxHcmlkIGNvbnRhaW5lciBhbGlnbkl0ZW1zPVwiY2VudGVyXCIgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiPlxuICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cIm1heC13LWZ1bGxcIj5cbiAgICAgICAgICA8VGl0bGVWaWV3IGxhenlSZXN1bHQ9e2ZpbHRlcmVkUmVzdWx0c1swXX0gLz5cbiAgICAgICAgPC9HcmlkPlxuICAgICAgPC9HcmlkPlxuICAgIClcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShNZXRhY2FyZE5hdlJvdXRlKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/pages/metacard.d.ts b/src/main/webapp/component/pages/metacard.d.ts new file mode 100644 index 00000000000..9e237a9ff05 --- /dev/null +++ b/src/main/webapp/component/pages/metacard.d.ts @@ -0,0 +1,14 @@ +/// +/// +import { FilterBuilderClass } from '../filter-builder/filter.structure'; +type UploadType = Backbone.Model<{ + uploads: Backbone.Model<{ + id: string; + children: string[]; + }>[]; +}>; +export declare const getFilterTreeForUpload: ({ upload, }: { + upload: UploadType; +}) => FilterBuilderClass; +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/pages/metacard.js b/src/main/webapp/component/pages/metacard.js new file mode 100644 index 00000000000..917768682c0 --- /dev/null +++ b/src/main/webapp/component/pages/metacard.js @@ -0,0 +1,96 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useParams } from 'react-router-dom'; +import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks'; +import { GoldenLayout } from '../golden-layout/golden-layout'; +import { DEFAULT_QUERY_OPTIONS, useUserQuery } from '../../js/model/TypedQuery'; +import { FilterBuilderClass, FilterClass, } from '../filter-builder/filter.structure'; +import { getFilterTreeForId } from './metacard-nav'; +import SelectionInterfaceModel from '../selection-interface/selection-interface.model'; +import user from '../singletons/user-instance'; +import _ from 'underscore'; +export var getFilterTreeForUpload = function (_a) { + var upload = _a.upload; + return new FilterBuilderClass({ + type: 'OR', + filters: _.flatten(upload + .get('uploads') + .filter(function (file) { return file.id || file.get('children') !== undefined; }) + .map(function (file) { + if (file.get('children') !== undefined) { + return file.get('children').map(function (child) { + return new FilterClass({ + type: '=', + value: child, + property: 'id', + }); + }); + } + else { + return new FilterClass({ + type: '=', + value: file.id, + property: 'id', + }); + } + }) + .concat(new FilterClass({ + type: '=', + value: '-1', + property: 'id', + }))), + }); +}; +var MetacardRoute = function () { + var params = useParams(); + var _a = __read(React.useState(params.metacardId || params.id), 2), id = _a[0], setId = _a[1]; + React.useEffect(function () { + setId(params.metacardId || params.id); + }, [params.metacardId]); + var _b = __read(useUserQuery({ + attributes: getFilterTreeForId({ id: id }), + options: { + transformDefaults: DEFAULT_QUERY_OPTIONS.transformDefaults, + }, + }), 1), query = _b[0]; + var _c = __read(React.useState(new SelectionInterfaceModel({ + currentQuery: query, + })), 1), selectionInterface = _c[0]; + React.useEffect(function () { + if (id === undefined && params.uploadId) { + var upload = user + .get('user') + .get('preferences') + .get('uploads') + .get(params.uploadId); + if (upload) { + query.set('filterTree', getFilterTreeForUpload({ upload: upload })); + query.cancelCurrentSearches(); + query.startSearchFromFirstPage(); + } + } + }, [id, params.uploadId]); + React.useEffect( + // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. + function () { + if (id) { + query.set('filterTree', getFilterTreeForId({ id: id })); + query.cancelCurrentSearches(); + query.startSearchFromFirstPage(); + return function () { + query.cancelCurrentSearches(); + }; + } + }, [id]); + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var filteredResults = Object.values(lazyResults.results); + filteredResults.forEach(function (result) { + result.setSelected(true); + }); + return React.createElement(GoldenLayout, { selectionInterface: selectionInterface }); +}; +export default hot(module)(MetacardRoute); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3BhZ2VzL21ldGFjYXJkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUM1QyxPQUFPLEVBQUUsb0NBQW9DLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQTtBQUNuRixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sZ0NBQWdDLENBQUE7QUFDN0QsT0FBTyxFQUFFLHFCQUFxQixFQUFFLFlBQVksRUFBRSxNQUFNLDJCQUEyQixDQUFBO0FBQy9FLE9BQU8sRUFDTCxrQkFBa0IsRUFDbEIsV0FBVyxHQUNaLE1BQU0sb0NBQW9DLENBQUE7QUFDM0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sZ0JBQWdCLENBQUE7QUFDbkQsT0FBTyx1QkFBdUIsTUFBTSxrREFBa0QsQ0FBQTtBQUN0RixPQUFPLElBQUksTUFBTSw2QkFBNkIsQ0FBQTtBQUM5QyxPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFNMUIsTUFBTSxDQUFDLElBQU0sc0JBQXNCLEdBQUcsVUFBQyxFQUl0QztRQUhDLE1BQU0sWUFBQTtJQUl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gICByZXR1cm4gKCkgPT4ge1xuICAgICAgICAgIHF1ZXJ5LmNhbmNlbEN1cnJlbnRTZWFyY2hlcygpXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuICAgIFtpZF1cbiAgKVxuICBjb25zdCBsYXp5UmVzdWx0cyA9IHVzZUxhenlSZXN1bHRzRnJvbVNlbGVjdGlvbkludGVyZmFjZSh7XG4gICAgc2VsZWN0aW9uSW50ZXJmYWNlLFxuICB9KVxuICBjb25zdCBmaWx0ZXJlZFJlc3VsdHMgPSBPYmplY3QudmFsdWVzKGxhenlSZXN1bHRzLnJlc3VsdHMpXG5cbiAgZmlsdGVyZWRSZXN1bHRzLmZvckVhY2goKHJlc3VsdCkgPT4ge1xuICAgIHJlc3VsdC5zZXRTZWxlY3RlZCh0cnVlKVxuICB9KVxuXG4gIHJldHVybiA8R29sZGVuTGF5b3V0IHNlbGVjdGlvbkludGVyZmFjZT17c2VsZWN0aW9uSW50ZXJmYWNlfSAvPlxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShNZXRhY2FyZFJvdXRlKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/pages/open.d.ts b/src/main/webapp/component/pages/open.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/component/pages/open.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/pages/open.js b/src/main/webapp/component/pages/open.js new file mode 100644 index 00000000000..711a862e146 --- /dev/null +++ b/src/main/webapp/component/pages/open.js @@ -0,0 +1,28 @@ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useHistory } from 'react-router-dom'; +import useSnack from '../hooks/useSnack'; +import { OpenSearch } from './search'; +var Open = function () { + var history = useHistory(); + var addSnack = useSnack(); + return (React.createElement("div", { className: "w-full h-full p-2" }, + React.createElement("div", { className: "text-2xl pb-2" }, "Open a search"), + React.createElement(OpenSearch, { label: "", constructLink: function (result) { + return "/search/".concat(result.plain.id); + }, onFinish: function (value) { + // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally + history.replace({ + pathname: "/search/".concat(value.plain.id), + search: '', + }); + addSnack("Search '".concat(value.plain.metacard.properties.title, "' opened"), { + alertProps: { severity: 'info' }, + }); + }, autocompleteProps: { + fullWidth: true, + className: 'w-full', + } }))); +}; +export default hot(module)(Open); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3Blbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvcGFnZXMvb3Blbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUM3QyxPQUFPLFFBQVEsTUFBTSxtQkFBbUIsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBRXJDLElBQU0sSUFBSSxHQUFHO0lBQ1gsSUFBTSxPQUFPLEdBQUcsVUFBVSxFQUFFLENBQUE7SUFDNUIsSUFBTSxRQUFRLEdBQUcsUUFBUSxFQUFFLENBQUE7SUFDM0IsT0FBTyxDQUNMLDZCQUFLLFNBQVMsRUFBQyxtQkFBbUI7UUFDaEMsNkJBQUssU0FBUyxFQUFDLGVBQWUsb0JBQW9CO1FBQ2xELG9CQUFDLFVBQVUsSUFDVCxLQUFLLEVBQUMsRUFBRSxFQUNSLGFBQWEsRUFBRSxVQUFDLE1BQU07Z0JBQ3BCLE9BQU8sa0JBQVcsTUFBTSxDQUFDLEtBQUssQ0FBQy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lxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKE9wZW4pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/pages/restore.d.ts b/src/main/webapp/component/pages/restore.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/component/pages/restore.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/pages/restore.js b/src/main/webapp/component/pages/restore.js new file mode 100644 index 00000000000..737a776cfe2 --- /dev/null +++ b/src/main/webapp/component/pages/restore.js @@ -0,0 +1,38 @@ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useHistory } from 'react-router-dom'; +import { AsyncTasks } from '../../js/model/AsyncTask/async-task'; +import { OpenSearch } from './search'; +var Open = function () { + var history = useHistory(); + return (React.createElement("div", { className: "w-full h-full p-2" }, + React.createElement("div", { className: "text-2xl pb-2" }, "Restore a search"), + React.createElement(OpenSearch, { archived: true, label: "", constructLink: function (result) { + var copy = JSON.parse(JSON.stringify(result.plain.metacard.properties)); + delete copy.id; + delete copy.title; + delete copy['metacard.deleted.date']; + delete copy['metacard.deleted.id']; + delete copy['metacard.deleted.tags']; + delete copy['metacard.deleted.version']; + delete copy['metacard-tags']; + delete copy['metacard-type']; + var encodedQueryModel = encodeURIComponent(JSON.stringify(copy)); + return { + pathname: '/search', + search: "?defaultQuery=".concat(encodedQueryModel), + }; + }, onFinish: function (result) { + AsyncTasks.restore({ lazyResult: result }); + // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally + history.replace({ + pathname: "/search/".concat(result.plain.metacard.properties['metacard.deleted.id']), + search: '', + }); + }, autocompleteProps: { + fullWidth: true, + className: 'w-full', + } }))); +}; +export default hot(module)(Open); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdG9yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi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1bGUpKE9wZW4pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/pages/search.d.ts b/src/main/webapp/component/pages/search.d.ts new file mode 100644 index 00000000000..2d2dbcfe89d --- /dev/null +++ b/src/main/webapp/component/pages/search.d.ts @@ -0,0 +1,19 @@ +/// +import { LinkProps } from 'react-router-dom'; +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +import { AutocompleteProps } from '@mui/material/Autocomplete'; +type SaveFormType = { + selectionInterface: any; + onSave: (title: string) => void; + onClose: () => void; +}; +export declare const SaveForm: ({ onClose, selectionInterface, onSave, }: SaveFormType) => JSX.Element; +export declare const OpenSearch: ({ onFinish, constructLink, label, archived, autocompleteProps, }: { + onFinish: (selection: LazyQueryResult) => void; + constructLink: (result: LazyQueryResult) => LinkProps['to']; + label: string; + archived?: boolean | undefined; + autocompleteProps?: Partial> | undefined; +}) => JSX.Element; +export declare const HomePage: () => JSX.Element; +export {}; diff --git a/src/main/webapp/component/pages/search.js b/src/main/webapp/component/pages/search.js new file mode 100644 index 00000000000..13e3e982e09 --- /dev/null +++ b/src/main/webapp/component/pages/search.js @@ -0,0 +1,844 @@ +import { __assign, __read, __rest, __spreadArray } from "tslib"; +import * as React from 'react'; +import { GoldenLayout } from '../golden-layout/golden-layout'; +import { SplitPane, useResizableGridContext, } from '../resizable-grid/resizable-grid'; +import SelectionInterfaceModel from '../selection-interface/selection-interface.model'; +import { useQuery, useUserQuery } from '../../js/model/TypedQuery'; +import Paper from '@mui/material/Paper'; +import { QueryAddReact } from '../query-add/query-add'; +import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft'; +import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; +import queryString from 'query-string'; +import Button from '@mui/material/Button'; +import MoreVert from '@mui/icons-material/MoreVert'; +import { Elevations } from '../theme/theme'; +import SearchIcon from '@mui/icons-material/SearchTwoTone'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import { Link, useHistory, useLocation, useParams, } from 'react-router-dom'; +import _ from 'lodash'; +import TextField from '@mui/material/TextField'; +import { DarkDivider } from '../dark-divider/dark-divider'; +import LinearProgress from '@mui/material/LinearProgress'; +import { useUpdateEffect } from 'react-use'; +import { FilterBuilderClass, FilterClass, } from '../filter-builder/filter.structure'; +import Skeleton from '@mui/material/Skeleton'; +import CircularProgress from '@mui/material/CircularProgress'; +import { useRerenderOnBackboneSync, useStatusOfLazyResults, } from '../../js/model/LazyQueryResult/hooks'; +import CloudDoneIcon from '@mui/icons-material/CloudDone'; +import SaveIcon from '@mui/icons-material/Save'; +import { useMenuState } from '../menu-state/menu-state'; +import MenuItem from '@mui/material/MenuItem'; +import Menu from '@mui/material/Menu'; +import { TypedUserInstance } from '../singletons/TypedUser'; +import useSnack from '../hooks/useSnack'; +import Popover from '@mui/material/Popover'; +import Autocomplete from '@mui/material/Autocomplete'; +import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks'; +import OverflowTooltip from '../overflow-tooltip/overflow-tooltip'; +import { AsyncTasks, useCreateSearchTask, useRestoreSearchTask, useSaveSearchTaskBasedOnParams, } from '../../js/model/AsyncTask/async-task'; +import { Memo } from '../memo/memo'; +import { useListenToEnterKeySubmitEvent } from '../custom-events/enter-key-submit'; +export var SaveForm = function (_a) { + var onClose = _a.onClose, selectionInterface = _a.selectionInterface, onSave = _a.onSave; + var currentQuery = selectionInterface.getCurrentQuery(); + var _b = __read(React.useState(currentQuery.get('title') || ''), 2), title = _b[0], setTitle = _b[1]; + var _c = __read(React.useState({}), 2), validation = _c[0], setValidation = _c[1]; + useUpdateEffect(function () { + if (!title) { + setValidation({ + title: 'Cannot be blank', + }); + } + else { + setValidation({}); + } + }, [title]); + return (React.createElement(React.Fragment, null, + React.createElement("form", { action: "./blank.html", method: "POST", onSubmit: function (e) { + if (!title) { + setValidation({ + title: 'Cannot be blank', + }); + e.preventDefault(); + return false; + } + else { + currentQuery.set('title', title); + onSave(title); + e.preventDefault(); + onClose(); + return false; + } + }, className: "w-full h-full" }, + React.createElement("div", { className: "p-2" }, + React.createElement(TextField, { variant: "outlined", size: "small", label: "Name", value: title, onChange: function (e) { + setTitle(e.target.value); + }, error: Boolean(validation.title), autoFocus: true, onFocus: function (e) { + e.target.select(); + }, helperText: validation.title })), + React.createElement(DarkDivider, null), + React.createElement("div", { className: "flex flex-row flex-nowrap align justify-end p-2" }, + React.createElement(Button, { type: "button", variant: "text", color: "primary", onClick: function () { + onClose(); + } }, "Cancel"), + React.createElement(Button, { disabled: Object.keys(validation).length > 0, type: "submit", className: "ml-3", variant: "contained", color: "primary" }, "Save"))))); +}; +var ButtonWithTwoStates = function (props) { + var states = props.states, state = props.state, buttonProps = __rest(props, ["states", "state"]); + if (states.length === 0) { + return React.createElement("div", null, "You must specify at least one state"); + } + var longestState = states.reduce(function (longest, current) { + if (current.state.length > longest.length) { + return current.state; + } + return longest; + }, states[0].state); + var currentState = states.find(function (stateInfo) { return stateInfo.state === state; }); + if (currentState === undefined) { + return React.createElement("div", null, "You must specify a valid state"); + } + var isLoading = currentState === null || currentState === void 0 ? void 0 : currentState.loading; + return (React.createElement(Button, __assign({ disabled: isLoading }, buttonProps), + React.createElement("span", { className: "invisible ".concat(props.labelClassName) }, longestState), + React.createElement("span", { className: "absolute ".concat(props.labelClassName) }, state), + isLoading ? (React.createElement(LinearProgress, { className: "absolute left-0 top-0 w-full h-full opacity-50", variant: "indeterminate" })) : null)); +}; +var useSearchResults = function (_a) { + var searchText = _a.searchText, _b = _a.archived, archived = _b === void 0 ? false : _b; + var _c = __read(React.useState({ + lazyResults: [], + loading: true, + }), 2), state = _c[0], setState = _c[1]; + var _d = __read(React.useState(false), 2), hasSearched = _d[0], setHasSearched = _d[1]; + var _f = __read(useQuery({ + attributes: { + sorts: [{ attribute: 'metacard.modified', direction: 'descending' }], + filterTree: new FilterBuilderClass({ + type: 'AND', + filters: __spreadArray([ + new FilterClass({ + property: 'title', + value: "*".concat(searchText, "*"), + type: 'ILIKE', + }), + new FilterClass({ + property: archived ? 'metacard.deleted.tags' : 'metacard-tags', + value: 'query', + type: 'ILIKE', + }) + ], __read((archived + ? [ + new FilterClass({ + property: 'metacard-tags', + value: '*', + type: 'ILIKE', + }), + ] + : [])), false), + }), + }, + }), 1), queryModel = _f[0]; + var _g = __read(React.useState(new SelectionInterfaceModel({ + currentQuery: queryModel, + })), 1), selectionInterface = _g[0]; + React.useEffect(function () { + selectionInterface.getCurrentQuery().set('filterTree', new FilterBuilderClass({ + type: 'AND', + filters: __spreadArray([ + new FilterClass({ + property: 'title', + value: "*".concat(searchText, "*"), + type: 'ILIKE', + }), + new FilterClass({ + property: archived ? 'metacard.deleted.tags' : 'metacard-tags', + value: 'query', + type: 'ILIKE', + }) + ], __read((archived + ? [ + new FilterClass({ + property: 'metacard-tags', + value: '*', + type: 'ILIKE', + }), + ] + : [])), false), + })); + selectionInterface.getCurrentQuery().cancelCurrentSearches(); + setState({ + lazyResults: [], + loading: true, + }); + var timeoutId = window.setTimeout(function () { + if (searchText.length >= 0) { + selectionInterface.getCurrentQuery().startSearchFromFirstPage(); + setHasSearched(true); + } + }, 500); + return function () { + window.clearTimeout(timeoutId); + }; + }, [searchText]); + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var isSearching = useStatusOfLazyResults({ lazyResults: lazyResults }).isSearching; + React.useEffect(function () { + setState({ + lazyResults: Object.values(lazyResults.results), + loading: hasSearched ? isSearching : true, + }); + }, [lazyResults, isSearching]); + return state; +}; +export var OpenSearch = function (_a) { + var onFinish = _a.onFinish, constructLink = _a.constructLink, label = _a.label, _b = _a.archived, archived = _b === void 0 ? false : _b, autocompleteProps = _a.autocompleteProps; + var _c = __read(React.useState(false), 2), positioningDone = _c[0], setPositioningDone = _c[1]; + var _d = __read(React.useState(''), 2), value = _d[0], setValue = _d[1]; + var _f = __read(React.useState(true), 2), open = _f[0], setOpen = _f[1]; + var inputRef = React.useRef(null); + var _g = __read(React.useState(null), 2), currentHighlight = _g[0], setCurrentHighlight = _g[1]; + var _h = __read(React.useState([]), 2), options = _h[0], setOptions = _h[1]; + var _j = useSearchResults({ + searchText: value, + archived: archived, + }), lazyResults = _j.lazyResults, loading = _j.loading; + React.useEffect(function () { + setOptions(lazyResults); + }, [lazyResults]); + React.useEffect(function () { + if (currentHighlight && currentHighlight.overflowTooltip) { + currentHighlight.overflowTooltip.setOpen(true); + } + return function () { + if (currentHighlight && currentHighlight.overflowTooltip) + currentHighlight.overflowTooltip.setOpen(false); + }; + }, [currentHighlight]); + React.useEffect(function () { + var timeoutid = window.setTimeout(function () { + setPositioningDone(true); + }, 500); + return function () { + window.clearTimeout(timeoutid); + }; + }, []); + return (React.createElement(Autocomplete, __assign({ className: "w-64", isOptionEqualToValue: function (option) { return option.plain.id === option.plain.id; }, getOptionLabel: function (option) { return option.plain.metacard.properties.title; }, options: options, ref: inputRef, open: open && positioningDone, onOpen: function () { + setOpen(true); + }, onClose: function () { + setOpen(false); + }, loading: loading, autoHighlight: true, onHighlightChange: function () { + if (inputRef.current) { + var highlightedElementString = inputRef.current.querySelector('input').getAttribute('aria-activedescendant'); + if (highlightedElementString) { + setCurrentHighlight(document.getElementById(highlightedElementString).querySelector('div')); + } + else { + setCurrentHighlight(null); + } + } + else { + setCurrentHighlight(null); + } + }, noOptionsText: "Nothing found.", renderOption: function (props, option) { + return (React.createElement("li", __assign({}, props), + React.createElement(Link, { className: "w-full p-0 font-normal no-underline hover:font-normal hover:no-underline", to: constructLink(option) }, + React.createElement(OverflowTooltip, { tooltipProps: { + title: (React.createElement("div", { className: "w-full p-2" }, option.plain.metacard.properties.title)), + } }, + React.createElement("div", { className: "truncate w-full p-2" }, option.plain.metacard.properties.title))))); + }, ListboxProps: { + className: 'children-p-0 MuiAutocomplete-listbox', // we have to add the original class (MuiAutocomplete-listbox) back on unfortunately + }, onChange: function (_e, value) { + if (value) { + onFinish(value); + } + }, renderInput: function (params) { + return (React.createElement(TextField, __assign({}, params, { value: value, onChange: function (e) { + setValue(e.target.value); + }, label: label, variant: "outlined", autoFocus: true, InputProps: __assign(__assign({}, params.InputProps), { endAdornment: (React.createElement(React.Fragment, null, + loading ? (React.createElement(CircularProgress, { color: "inherit", size: 20 })) : null, + params.InputProps.endAdornment)) }) }))); + } }, autocompleteProps))); +}; +var OptionsButton = function () { + var _a = React.useContext(SavedSearchModeContext), searchPageMode = _a.searchPageMode, data = _a.data, selectionInterface = _a.selectionInterface; + var closed = useResizableGridContext().closed; + var menuState = useMenuState(); + var menuStateOpenSearch = useMenuState(); + var menuStateNewFromExisting = useMenuState(); + var menuStateCopy = useMenuState(); + var menuStateRename = useMenuState(); + var menuStateRestore = useMenuState(); + var addSnack = useSnack(); + var history = useHistory(); + var _b = __read(React.useState(''), 2), encodedQueryModelJSON = _b[0], setEncodedQueryModelJSON = _b[1]; + React.useEffect(function () { + setEncodedQueryModelJSON(encodeURIComponent(JSON.stringify(selectionInterface.getCurrentQuery().toJSON()))); + }, [menuState.open]); + return (React.createElement(React.Fragment, null, + React.createElement(Button, { component: "div", fullWidth: true, ref: menuState.anchorRef, onClick: menuState.handleClick }, + closed ? null : React.createElement("span", { className: "Mui-text-primary" }, "Options"), + React.createElement(MoreVert, null)), + React.createElement(Popover, { open: menuStateRestore.open, anchorEl: menuState.anchorRef.current, onClose: menuStateRestore.handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, + React.createElement(OpenSearch, { label: "Restore a search from the trash", archived: true, constructLink: function (result) { + var copy = JSON.parse(JSON.stringify(result.plain.metacard.properties)); + delete copy.id; + delete copy.title; + delete copy['metacard.deleted.date']; + delete copy['metacard.deleted.id']; + delete copy['metacard.deleted.tags']; + delete copy['metacard.deleted.version']; + delete copy['metacard-tags']; + delete copy['metacard-type']; + var encodedQueryModel = encodeURIComponent(JSON.stringify(copy)); + return { + pathname: '/search', + search: "?defaultQuery=".concat(encodedQueryModel), + }; + }, onFinish: function (result) { + AsyncTasks.restore({ lazyResult: result }); + // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally + history.replace({ + pathname: "/search/".concat(result.plain.metacard.properties['metacard.deleted.id']), + search: '', + }); + menuStateRestore.handleClose(); + } }))), + React.createElement(Popover, { open: menuStateCopy.open, anchorEl: menuState.anchorRef.current, onClose: menuStateCopy.handleClose, anchorOrigin: { + vertical: 'bottom', + horizontal: 'left', + } }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, + React.createElement(SaveForm, { onClose: function () { + menuStateCopy.handleClose(); + }, onSave: function (title) { + var currentQueryJSON = selectionInterface + .getCurrentQuery() + .toJSON(); + currentQueryJSON.title = title; + var task = AsyncTasks.createSearch({ data: currentQueryJSON }); + history.push({ + pathname: "/search/".concat(task.data.id), + search: '', + }); + addSnack("Making a copy of ".concat(title), { + alertProps: { severity: 'info' }, + }); + }, selectionInterface: selectionInterface }))), + React.createElement(Popover, { open: menuStateRename.open, anchorEl: menuState.anchorRef.current, onClose: menuStateRename.handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, + React.createElement(SaveForm, { onClose: function () { + menuStateRename.handleClose(); + }, onSave: function (title) { + if (typeof data !== 'boolean') { + var currentQueryJSON = selectionInterface + .getCurrentQuery() + .toJSON(); + currentQueryJSON.title = title; + AsyncTasks.saveSearch({ + data: currentQueryJSON, + lazyResult: data, + }); + } + }, selectionInterface: selectionInterface }))), + React.createElement(Popover, { open: menuStateNewFromExisting.open, anchorEl: menuState.anchorRef.current, onClose: menuStateNewFromExisting.handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, + React.createElement(OpenSearch, { label: "Start a new search from an existing saved search", constructLink: function (result) { + var copy = JSON.parse(JSON.stringify(result.plain.metacard.properties)); + delete copy.id; + delete copy.title; + var encodedQueryModel = encodeURIComponent(JSON.stringify(copy)); + return { + pathname: '/search', + search: "?defaultQuery=".concat(encodedQueryModel), + }; + }, onFinish: function (result) { + var copy = JSON.parse(JSON.stringify(result.plain.metacard.properties)); + delete copy.id; + delete copy.title; + var encodedQueryModel = encodeURIComponent(JSON.stringify(copy)); + // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally + history.replace({ + pathname: '/search', + search: "?defaultQuery=".concat(encodedQueryModel), + }); + selectionInterface.getCurrentQuery().set(__assign(__assign({}, copy), { id: null, title: '' })); + addSnack("New search based on '".concat(result.plain.metacard.properties.title, "'"), { + alertProps: { severity: 'info' }, + }); + menuStateNewFromExisting.handleClose(); + } }))), + React.createElement(Popover, { open: menuStateOpenSearch.open, anchorEl: menuState.anchorRef.current, onClose: menuStateOpenSearch.handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, + React.createElement("div", { className: "flex flex-row flex-nowrap" }, + React.createElement(OpenSearch, { label: "Open a saved search", constructLink: function (result) { + return "/search/".concat(result.plain.id); + }, onFinish: function (value) { + // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally + history.replace({ + pathname: "/search/".concat(value.plain.id), + search: '', + }); + addSnack("Search '".concat(value.plain.metacard.properties.title, "' opened"), { + alertProps: { severity: 'info' }, + }); + menuStateOpenSearch.handleClose(); + } }), + React.createElement(Button, { color: "primary", onClick: function () { + menuStateOpenSearch.handleClose(); + menuStateRestore.handleClick(); + } }, "Check Trash?")))), + React.createElement(Menu, { anchorEl: menuState.anchorRef.current, open: menuState.open, onClose: menuState.handleClose, keepMounted: true, disableEnforceFocus: true, disableAutoFocus: true, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(MenuItem, { component: Link, to: "/search", onClick: function () { + menuState.handleClose(); + selectionInterface + .getCurrentQuery() + .set('id', null) + .resetToDefaults(); + addSnack('Starting a new search', { + alertProps: { severity: 'info' }, + }); + } }, "New"), + React.createElement(MenuItem, { component: "div", ref: menuStateNewFromExisting.anchorRef, onClick: function () { + menuState.handleClose(); + menuStateNewFromExisting.handleClick(); + } }, "New from existing"), + React.createElement(MenuItem, { component: "div", ref: menuStateOpenSearch.anchorRef, onClick: function () { + menuState.handleClose(); + menuStateOpenSearch.handleClick(); + } }, "Open"), + React.createElement(MenuItem, { component: Link, disabled: searchPageMode === 'adhoc' || typeof data === 'boolean', to: "/search?defaultQuery=".concat(encodedQueryModelJSON), onClick: function (e) { + e.stopPropagation(); + e.preventDefault(); + menuState.handleClose(); + menuStateCopy.handleClick(); + return; + } }, "Make a copy"), + React.createElement(DarkDivider, { className: "m-2" }), + React.createElement(MenuItem, { disabled: searchPageMode === 'adhoc' || typeof data === 'boolean', onClick: function () { + menuStateRename.handleClick(); + menuState.handleClose(); + } }, "Rename"), + React.createElement(MenuItem, { disabled: searchPageMode === 'adhoc' || typeof data === 'boolean', onClick: function () { + if (typeof data !== 'boolean') { + AsyncTasks.delete({ lazyResult: data }); + history.push({ + pathname: "/search", + search: '', + }); + } + menuState.handleClose(); + } }, "Move to trash"), + React.createElement(DarkDivider, { className: "m-2" }), + React.createElement(MenuItem, { disabled: searchPageMode === 'saved' && typeof data === 'boolean', onClick: function () { + selectionInterface.getCurrentQuery().set('type', 'advanced'); + if (searchPageMode === 'adhoc') { + // set this as their preference + TypedUserInstance.updateQuerySettings({ + type: 'advanced', + }); + } + menuState.handleClose(); + } }, "Advanced View"), + React.createElement(MenuItem, { disabled: searchPageMode === 'saved' && typeof data === 'boolean', onClick: function () { + selectionInterface.getCurrentQuery().set('type', 'basic'); + if (searchPageMode === 'adhoc') { + // set this as their preference + TypedUserInstance.updateQuerySettings({ + type: 'basic', + }); + } + menuState.handleClose(); + } }, "Basic View")))); +}; +var SaveButton = function () { + var closed = useResizableGridContext().closed; + var _a = React.useContext(SavedSearchModeContext), data = _a.data, searchPageMode = _a.searchPageMode, isSaving = _a.isSaving; + return (React.createElement(React.Fragment, null, closed ? (React.createElement(Button, { disabled: data === true, variant: "outlined", color: "primary", size: "small" }, + React.createElement(SaveIcon, null))) : (React.createElement(ButtonWithTwoStates, { disabled: data === true, variant: "outlined", color: "primary", size: "small", states: [ + { state: 'Saving', loading: true }, + { + state: searchPageMode === 'adhoc' ? 'Save' : 'Save as', + loading: false, + }, + ], state: (function () { + if (isSaving) { + return 'Saving'; + } + return searchPageMode === 'adhoc' ? 'Save' : 'Save as'; + })() })))); +}; +var LeftBottom = function () { + var _a = useResizableGridContext(), closed = _a.closed, setClosed = _a.setClosed, lastLength = _a.lastLength, setLength = _a.setLength; + var _b = React.useContext(SavedSearchModeContext), data = _b.data, searchPageMode = _b.searchPageMode, selectionInterface = _b.selectionInterface; + if (closed) { + return (React.createElement("div", { className: "flex flex-col items-center w-full py-4 flex-nowrap shrink-0 overflow-hidden" }, + React.createElement("div", { className: "px-2" }, + React.createElement(Button, { fullWidth: true, variant: "text", color: "primary", size: "small", onClick: function () { + setClosed(false); + setLength(lastLength); + } }, + React.createElement(KeyboardArrowRightIcon, { color: "inherit", className: "Mui-text-text-primary" }), + React.createElement(KeyboardArrowRightIcon, { color: "inherit", className: "-ml-5 Mui-text-text-primary" })), + React.createElement(Button, { disabled: typeof data === 'boolean' && searchPageMode === 'saved', className: "mt-3", fullWidth: true, variant: "contained", color: "primary", size: "small", onClick: function () { + selectionInterface.getCurrentQuery().startSearchFromFirstPage(); + } }, + React.createElement(SearchIcon, null))))); + } + return (React.createElement("div", { className: "w-full min-h-16 py-1 px-2 flex flex-row flex-nowrap items-center" }, + React.createElement(Button, { variant: "text", color: "primary", size: "small", onClick: function () { + setClosed(true); + } }, + "Collapse", + React.createElement(KeyboardArrowLeftIcon, { color: "inherit", className: "Mui-text-text-primary Mui-icon-size-small" }), + React.createElement(KeyboardArrowLeftIcon, { color: "inherit", className: "-ml-3 Mui-text-text-primary Mui-icon-size-small" })), + React.createElement(Button, { className: "ml-auto", disabled: typeof data === 'boolean' && searchPageMode === 'saved', variant: "contained", color: "primary", size: "small", onClick: function () { + selectionInterface.getCurrentQuery().startSearchFromFirstPage(); + } }, "Search"))); +}; +var SaveIndicator = function () { + var isSaving = React.useContext(SavedSearchModeContext).isSaving; + var closed = useResizableGridContext().closed; + var _a = __read(React.useState(false), 2), showTempMessage = _a[0], setShowTempMessage = _a[1]; + var popupState = useMenuState(); + useUpdateEffect(function () { + var timeoutid = undefined; + if (isSaving === false) { + setShowTempMessage(true); + timeoutid = window.setTimeout(function () { + setShowTempMessage(false); + }, 4000); + } + return function () { + window.clearTimeout(timeoutid); + }; + }, [isSaving]); + return (React.createElement(React.Fragment, null, + React.createElement(Popover, { anchorEl: popupState.anchorRef.current, open: popupState.open, onClose: popupState.handleClose, onMouseDown: function (e) { + // otherwise since we're technically in a button this will trigger it + e.stopPropagation(); + }, onClick: function (e) { + // otherwise since we're technically in a button this will trigger it + e.stopPropagation(); + }, anchorOrigin: { vertical: 'bottom', horizontal: 'left' } }, + React.createElement(Paper, { elevation: Elevations.overlays }, + React.createElement("div", { className: "flex flex-row flex-nowrap items-center p-4 text-2xl Mui-text-primary" }, isSaving ? (React.createElement(React.Fragment, null, + React.createElement(CircularProgress, { className: "mr-2", style: { width: '1rem', height: '1rem' } }), + "Saving ...")) : (React.createElement(React.Fragment, null, + React.createElement(CloudDoneIcon, { className: "mr-2" }), + " All changes saved to the system."))), + React.createElement(DarkDivider, null), + React.createElement("div", { className: "p-4" }, "Every change you make is automatically saved."))), + React.createElement(Button, { component: "div", className: "shrink-0", onClick: function (e) { + e.stopPropagation(); + popupState.handleClick(); + }, ref: popupState.anchorRef }, + React.createElement("span", { className: "opacity-75 text-sm shrink-0 flex items-center flex-nowrap ".concat(closed ? 'mr-min flex-col' : 'mt-min flex-row') }, isSaving ? (React.createElement(React.Fragment, null, + React.createElement(CircularProgress, { className: "text-current text-base", style: { width: '1rem', height: '1rem' } }), + ' ', + React.createElement("span", { className: "".concat(closed ? 'writing-mode-vertical-lr mt-1' : 'ml-1') }, "Saving ..."))) : (React.createElement(React.Fragment, null, + React.createElement(CloudDoneIcon, { className: "text-base" }), + ' ', + React.createElement("span", { className: "".concat(closed ? 'writing-mode-vertical-lr mt-1' : 'ml-1') }, showTempMessage ? 'Saved' : ''))))))); +}; +var LeftTop = function () { + var closed = useResizableGridContext().closed; + var _a = React.useContext(SavedSearchModeContext), data = _a.data, searchPageMode = _a.searchPageMode, selectionInterface = _a.selectionInterface; + useRerenderOnBackboneSync({ + lazyResult: typeof data !== 'boolean' ? data : undefined, + }); + var history = useHistory(); + var adhocMenuState = useMenuState(); + var savedMenuState = useMenuState(); + return (React.createElement("div", { className: "min-h-16 ".concat(closed ? 'h-full shrink overflow-hidden' : '') }, + React.createElement("div", { className: "h-full w-full relative p-2 ".concat(closed + ? 'flex flex-col flex-nowrap items-center' + : 'flex flex-row flex-nowrap items-center') }, + searchPageMode === 'adhoc' ? (React.createElement(React.Fragment, null, + React.createElement(Popover, { anchorEl: adhocMenuState.anchorRef.current, open: adhocMenuState.open, onClose: adhocMenuState.handleClose, anchorOrigin: { + vertical: closed ? 'top' : 'bottom', + horizontal: closed ? 'right' : 'left', + } }, + React.createElement(Paper, { elevation: Elevations.overlays }, + React.createElement(SaveForm, { onClose: function () { + adhocMenuState.handleClose(); + }, selectionInterface: selectionInterface, onSave: function (title) { + selectionInterface.getCurrentQuery().set('title', title); + var searchData = selectionInterface + .getCurrentQuery() + .toJSON(); + if (searchPageMode === 'adhoc') { + var task = AsyncTasks.createSearch({ + data: searchData, + }); + history.push({ + pathname: "/search/".concat(task.data.id), + search: '', + }); + } + else if (typeof data !== 'boolean') { + AsyncTasks.saveSearch({ + lazyResult: data, + data: searchData, + }); + } + } }))), + React.createElement(Button, { color: "inherit", component: "div", className: "text-left text-2xl shrink truncate ".concat(closed ? 'h-full' : ''), onClick: adhocMenuState.handleClick, size: "small", ref: adhocMenuState.anchorRef }, + React.createElement("div", { className: "flex items-center flex-nowrap ".concat(closed ? 'flex-col h-full' : 'flex-row w-full') }, + React.createElement("span", { className: "opacity-50 shrink truncate ".concat(closed ? 'writing-mode-vertical-lr mb-2' : 'mr-2') }, + "Unsaved search", + ' '), + React.createElement(SaveButton, null))))) : null, + data === false && searchPageMode === 'saved' ? (React.createElement("div", { className: "text-2xl opacity-50 ".concat(closed ? 'writing-mode-vertical-lr' : '') }, "Could not find search")) : null, + data === true ? (React.createElement(React.Fragment, null, + React.createElement(Skeleton, { variant: "rectangular", className: "w-full h-full" }))) : null, + typeof data !== 'boolean' ? (React.createElement(React.Fragment, null, + React.createElement(Popover, { anchorEl: savedMenuState.anchorRef.current, open: savedMenuState.open, onClose: savedMenuState.handleClose, anchorOrigin: { + vertical: closed ? 'top' : 'bottom', + horizontal: closed ? 'right' : 'left', + } }, + React.createElement(Paper, { elevation: Elevations.overlays }, + React.createElement(SaveForm, { onClose: savedMenuState.handleClose, selectionInterface: selectionInterface, onSave: function (title) { + selectionInterface.getCurrentQuery().set('title', title); + var searchData = selectionInterface + .getCurrentQuery() + .toJSON(); + if (searchPageMode === 'adhoc') { + AsyncTasks.createSearch({ data: searchData }); + } + else if (typeof data !== 'boolean') { + AsyncTasks.saveSearch({ + lazyResult: data, + data: searchData, + }); + } + } }))), + React.createElement(Button, { component: "div", fullWidth: true, className: "text-left text-2xl shrink overflow-hidden ".concat(closed ? 'h-full' : ''), onClick: savedMenuState.handleClick, size: "small", ref: savedMenuState.anchorRef }, + React.createElement("div", { className: "flex items-center flex-nowrap ".concat(closed ? 'flex-col h-full' : 'w-full flex-row') }, + React.createElement("span", { className: "truncate ".concat(closed ? 'writing-mode-vertical-lr mb-2 shrink' : 'mr-2') }, data.plain.metacard.properties.title), + React.createElement(SaveIndicator, null))))) : (React.createElement(React.Fragment, null)), + React.createElement("div", { className: "ml-auto shrink-0 ".concat(closed ? 'w-full order-first pt-1 h-16' : '') }, + React.createElement(OptionsButton, null))), + closed ? null : React.createElement(DarkDivider, { className: "h-min w-full" }))); +}; +var LeftMiddle = function () { + var closed = useResizableGridContext().closed; + var _a = React.useContext(SavedSearchModeContext), data = _a.data, searchPageMode = _a.searchPageMode, selectionInterface = _a.selectionInterface; + if (data === false && searchPageMode === 'saved') { + // eventually add something? + return React.createElement("div", { className: "overflow-hidden w-full h-full shrink" }); + } + return (React.createElement("div", { className: "overflow-hidden w-full ".concat(closed ? 'shrink hidden' : 'h-full') }, data === true ? (React.createElement(Skeleton, { variant: "rectangular", className: "w-full h-full p-10" })) : (React.createElement("div", { className: "w-full h-full overflow-auto pb-64 ".concat(closed ? 'hidden' : '') }, + React.createElement(QueryAddReact, { model: selectionInterface.getCurrentQuery() }))))); +}; +var useKeepSearchInUrl = function (_a) { + var queryModel = _a.queryModel, on = _a.on; + var history = useHistory(); + var _b = useBackbone(), listenTo = _b.listenTo, stopListening = _b.stopListening; + React.useEffect(function () { + // this is fairly expensive, so keep it heavily debounced + var debouncedUpdate = _.debounce(function () { + if (on) { + var encodedQueryModel = encodeURIComponent(JSON.stringify(queryModel.toJSON())); + history.replace({ + search: "".concat(queryString.stringify({ + defaultQuery: encodedQueryModel, + })), + }); + } + }, 2000); + listenTo(queryModel, 'change', debouncedUpdate); + return function () { + debouncedUpdate.cancel(); + stopListening(queryModel, 'change', debouncedUpdate); + }; + }, [on, queryModel]); +}; +var useSearchPageMode = function (_a) { + var id = _a.id; + var _b = __read(React.useState(id ? 'saved' : 'adhoc'), 2), mode = _b[0], setMode = _b[1]; + React.useEffect(function () { + if (id) { + return setMode('saved'); + } + return setMode('adhoc'); + }, [id]); + return mode; +}; +var useSavedSearchPageMode = function (_a) { + var id = _a.id; + // handle all loading / data in here + var _b = __read(React.useState(false), 2), data = _b[0], setData = _b[1]; + var task = useCreateSearchTask({ id: id }); + var restoreTask = useRestoreSearchTask({ id: id }); + var _c = __read(useQuery({ + attributes: { + sources: ['local'], + }, + }), 1), queryModel = _c[0]; + React.useEffect(function () { + if (task || restoreTask) { + setData(true); + return; + } + var subscriptionCancel = function () { }; + if (id) { + setData(true); + queryModel.set('filterTree', new FilterBuilderClass({ + filters: [ + new FilterClass({ + type: '=', + property: 'id', + value: id, + }), + new FilterClass({ + type: 'ILIKE', + property: 'metacard-tags', + value: '*', + }), + ], + })); + queryModel.initializeResult(); + var lazyResults_1 = queryModel.getLazyResults(); + subscriptionCancel = lazyResults_1.subscribeTo({ + subscribableThing: 'filteredResults', + callback: function () { + var results = Object.values(lazyResults_1.results); + if (results.length > 0) { + setData(results[0]); + } + else { + setData(false); + } + }, + }); + queryModel.startSearchFromFirstPage(); + } + else { + setData(false); + } + return function () { + subscriptionCancel(); + queryModel.cancelCurrentSearches(); + }; + }, [id, task, restoreTask]); + return data; +}; +var AutoSave = function () { + var _a = React.useContext(SavedSearchModeContext), searchPageMode = _a.searchPageMode, selectionInterface = _a.selectionInterface, data = _a.data; + var queryModel = selectionInterface.getCurrentQuery(); + var on = searchPageMode === 'saved'; + var _b = useBackbone(), listenTo = _b.listenTo, stopListening = _b.stopListening; + React.useEffect(function () { + var callback = function () { + var changedAttributes = Object.keys(queryModel.changedAttributes()); + var isFromSwappingToSavedSearch = changedAttributes.includes('id'); + var isAttributeThatMatters = changedAttributes.includes('filterTree') || + changedAttributes.includes('sorts') || + changedAttributes.includes('sources'); + if (on && + queryModel.get('id') && + !isFromSwappingToSavedSearch && + isAttributeThatMatters && + typeof data !== 'boolean') { + AsyncTasks.saveSearch({ + lazyResult: data, + data: queryModel.toJSON(), + }); + } + }; + listenTo(queryModel, 'change', callback); + return function () { + stopListening(queryModel, 'change', callback); + }; + }, [on, queryModel, data]); + return null; +}; +var SavedSearchModeContext = React.createContext({ + data: false, + searchPageMode: 'adhoc', + isSaving: false, + selectionInterface: {}, +}); +var decodeUrlIfValid = function (search) { + if (location) { + try { + var queryParams = queryString.parse(search); + var defaultQueryString = (queryParams['defaultQuery'] || '').toString(); + return JSON.parse(decodeURIComponent(defaultQueryString)); + } + catch (err) { + return {}; + } + } + else { + return {}; + } +}; +export var HomePage = function () { + var location = useLocation(); + var _a = __read(useUserQuery({ + attributes: decodeUrlIfValid(location.search), + }), 1), queryModel = _a[0]; + var id = useParams().id; + var searchPageMode = useSearchPageMode({ id: id }); + var data = useSavedSearchPageMode({ id: id }); + var saveSearchTask = useSaveSearchTaskBasedOnParams(); + var isSaving = saveSearchTask !== null; + React.useEffect(function () { + var urlBasedQuery = location.search.split('?defaultQuery=')[1]; + if (urlBasedQuery) { + selectionInterface.getCurrentQuery().refetchOrStartSearchFromFirstPage(); + } + }, []); + var _b = __read(React.useState(new SelectionInterfaceModel({ + currentQuery: queryModel, + })), 1), selectionInterface = _b[0]; + useKeepSearchInUrl({ + queryModel: selectionInterface.getCurrentQuery(), + on: searchPageMode === 'adhoc', + }); + React.useEffect(function () { + if (typeof data !== 'boolean') { + selectionInterface.getCurrentQuery().set(data.plain.metacard.properties); + } + }, [data]); + useUpdateEffect(function () { + if (searchPageMode === 'adhoc') { + selectionInterface.getCurrentQuery().unset('id'); + if (location.search === '') { + selectionInterface.getCurrentQuery().resetToDefaults(); + } + } + }, [searchPageMode, location.search]); + var setElement = useListenToEnterKeySubmitEvent({ + callback: function () { + ; + selectionInterface.getCurrentQuery().startSearchFromFirstPage(); + }, + }).setElement; + return (React.createElement(SavedSearchModeContext.Provider, { value: { + data: data, + searchPageMode: searchPageMode, + isSaving: isSaving, + selectionInterface: selectionInterface, + } }, + React.createElement(Memo, { dependencies: [selectionInterface] }, + React.createElement(AutoSave, null), + React.createElement("div", { className: "w-full h-full" }, + React.createElement(SplitPane, { variant: "horizontal", collapsedLength: 80 }, + React.createElement("div", { className: "h-full w-full py-2" }, + React.createElement(Paper, { elevation: Elevations.panels, className: "h-full overflow-hidden w-full" }, + React.createElement("div", { className: "flex flex-col flex-nowrap w-full h-full", ref: setElement }, + React.createElement(LeftTop, null), + React.createElement(LeftMiddle, null), + React.createElement(DarkDivider, { className: "h-min w-full" }), + React.createElement(LeftBottom, null)))), + React.createElement("div", { className: "w-full h-full" }, + React.createElement(GoldenLayout, { selectionInterface: selectionInterface }))))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIj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RsZSkge1xuICAgICAgICAgICAgc2V0VmFsaWRhdGlvbih7XG4gICAgICAgICAgICAgIHRpdGxlOiAnQ2Fubm90IGJlIGJsYW5rJyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KClcbiAgICAgICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjdXJyZW50UXVlcnkuc2V0KCd0aXRsZScsIHRpdGxlKVxuICAgICAgICAgICAgb25TYXZlKHRpdGxlKVxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpXG4gICAgICAgICAgICBvbkNsb3NlKClcbiAgICAgICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgICAgIH1cbiAgICAgICAgfX1cbiAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiXG4gICAgICA+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicC0yXCI+XG4gICAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICBsYWJlbD1cIk5hbWVcIlxuICAgICAgICAgICAgdmFsdWU9e3RpdGxlfVxuICAgICAgICAgICAgb25DaGFuZ2U9eyhlKSA9PiB7XG4gICAgICAgICAgICAgIHNldFRpdGxlKGUudGFyZ2V0LnZhbHVlKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGVycm9yPXtCb29sZWFuKHZhbGlkYXRpb24udGl0bGUpfVxuICAgICAgICAgICAgYXV0b0ZvY3VzXG4gICAgICAgICAgICBvbkZvY3VzPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBlLnRhcmdldC5zZWxlY3QoKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGhlbHBlclRleHQ9e3ZhbGlkYXRpb24udGl0bGV9XG4gICAgICAgICAgLz5cbiAgICAg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VyczogW1xuICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICBwcm9wZXJ0eTogJ3RpdGxlJyxcbiAgICAgICAgICAgIHZhbHVlOiBgKiR7c2VhcmNoVGV4dH0qYCxcbiAgICAgICAgICAgIHR5cGU6ICdJTElLRScsXG4gICAgICAgICAgfSksXG4gICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgIHByb3BlcnR5OiBhcmNoaXZlZCA/ICdtZXRhY2FyZC5kZWxldGVkLnRhZ3MnIDogJ21ldGFjYXJkLXRhZ3MnLFxuICAgICAgICAgICAgdmFsdWU6ICdxdWVyeScsXG4gICAgICAgICAgICB0eXBlOiAnSUxJS0UnLFxuICAgICAgICAgIH0pLFxuICAgICAgICAgIC4uLihhcmNoaXZlZFxuICAgICAgICAgICAgPyBbXG4gICAgICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiAnbWV0YWNhcmQtdGFncycsXG4gICAgICAgICAgICAgICAgICB2YWx1ZTogJyonLFxuICAgICAgICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgOiBbXSksXG4gICAgICAgIF0sXG4gICAgICB9KSxcbiAgICB9LFxuICB9KVxuXG4gIGNvbnN0IFtzZWxlY3Rpb25JbnRlcmZhY2VdID0gUmVhY3QudXNlU3RhdGUoXG4gICAgbmV3IFNlbGVjdGlvbkludGVyZmFjZU1vZGVsKHtcbiAgICAgIGN1cnJlbnRRdWVyeTogcXVlcnlNb2RlbCxcbiAgICB9KVxuICApXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgc2VsZWN0aW9uSW50ZXJmYWNlLmdldEN1cnJlbnRRdWVyeSgpLnNldChcbiAgICAgICdmaWx0ZXJUcmVlJyxcbiAgICAgIG5ldyBGaWx0ZXJCdWlsZGVyQ2xhc3Moe1xuICAgICAgICB0eXBlOiAnQU5EJyxcbiAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICBwcm9wZXJ0eTogJ3RpdGxlJyxcbiAgICAgICAgICAgIHZhbHVlOiBgKiR7c2VhcmNoVGV4dH0qYCxcbiAgICAgICAgICAgIHR5cGU6ICdJTElLRScsXG4gICAgICAgICAgfSksXG4gICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgIHByb3BlcnR5OiBhcmNoaXZlZCA/ICdtZXRhY2FyZC5kZWxldGVkLnRhZ3MnIDogJ21ldGFjYXJkLXRhZ3MnLFxuICAgICAgICAgICAgdmFsdWU6ICdxdWVyeScsXG4gICAgICAgICAgICB0eXBlOiAnSUxJS0UnLFxuICAgICAgICAgIH0pLFxuICAgICAgICAgIC4uLihhcmNoaXZlZFxuICAgICAgICAgICAgPyBbXG4gICAgICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiAnbWV0YWNhcmQtdGFncycsXG4gICAgICAgICAgICAgICAgICB2YWx1ZTogJyonLFxuICAgICAgICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgOiBbXSksXG4gICAgICAgIF0sXG4gICAgICB9KVxuICAgIClcbiAgICBzZWxlY3Rpb25JbnRlcmZhY2UuZ2V0Q3VycmVudFF1ZXJ5KCkuY2FuY2VsQ3VycmVudFNlYXJjaGVzKClcbiAgICBzZXRTdGF0ZSh7XG4gICAgICBsYXp5UmVzdWx0czogW10sXG4gICAgICBsb2FkaW5nOiB0cnVlLFxuICAgIH0pXG4gICAgY29uc3QgdGltZW91dElkID0gd2luZG93LnNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgaWYgKHNlYXJja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AgICAgIG9uQ2xvc2U9eygpID0+IHtcbiAgICAgICAgc2V0T3BlbihmYWxzZSlcbiAgICAgIH19XG4gICAgICBsb2FkaW5nPXtsb2FkaW5nfVxuICAgICAgYXV0b0hpZ2hsaWdodFxuICAgICAgb25IaWdobGlnaHRDaGFuZ2U9eygpID0+IHtcbiAgICAgICAgaWYgKGlucHV0UmVmLmN1cnJlbnQpIHtcbiAgICAgICAgICBjb25zdCBoaWdobGlnaHRlZEVsZW1lbnRTdHJpbmcgPSAoXG4gICAgICAgICAgICBpbnB1dFJlZi5jdXJyZW50LnF1ZXJ5U2VsZWN0b3IoJ2lucHV0JykgYXMgSFRNTElucHV0RWxlbWVudFxuICAgICAgICAgICkuZ2V0QXR0cmlidXRlKCdhcmlhLWFjdGl2ZWRlc2NlbmRhbnQnKVxuICAgICAgICAgIGlmIChoaWdobGlnaHRlZEVsZW1lbnRTdHJpbmcpIHtcbiAgICAgICAgICAgIHNldEN1cnJlbnRIaWdobGlnaHQoXG4gICAgICAgICAgICAgIChcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcbiAgICAgICAgICAgICAgICAgIGhpZ2hsaWdodGVkRWxlbWVudFN0cmluZ1xuICAgICAgICAgICAgICAgICkgYXMgSFRNTExJRWxlbWVudFxuICAgICAgICAgICAgICApLnF1ZXJ5U2VsZWN0b3IoJ2RpdicpIGFzIE92ZXJmbG93VG9vbHRpcEhUTUxFbGVtZW50XG4gICAgICAgICAgICApXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNldEN1cnJlbnRIaWdobGlnaHQobnVsbClcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2V0Q3VycmVudEhpZ2hsaWdodChudWxsKVxuICAgICAgICB9XG4gICAgICB9fVxuICAgICAgbm9PcHRpb25zVGV4dD1cIk5vdGhpbmcgZm91bmQuXCJcbiAgICAgIHJlbmRlck9wdGlvbj17KHByb3BzLCBvcHRpb24pID0+IHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICA8bGkgey4uLnByb3BzfT5cbiAgICAgICAgICAgIDxMaW5rXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cInctZnVsbCBwLTAgZm9udC1ub3JtYWwgbm8tdW5kZXJsaW5lIGhvdmVyOmZvbnQtbm9ybWFsIGhvdmVyOm5vLXVuZGVybGluZVwiXG4gICAgICAgICAgICAgIHRvPXtjb25zdHJ1Y3RMaW5rKG9wdGlvbil9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxPdmVyZmxvd1Rvb2x0aXBcbiAgICAgICAgICAgICAgICB0b29sdGlwUHJvcHM9e3tcbiAgICAgICAgICAgICAgICAgIHRpdGxlOiAoXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwidy1mdWxsIHAtMlwiPlxuICAgICAgICAgICAgICAgICAgICAgIHtvcHRpb24ucGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy50aXRsZX1cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInRydW5jYXRlIHctZnVsbCBwLTJcIj5cbiAgICAgICAgICAgICAgICAgIHtvcHRpb24ucGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy50aXRsZX1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgPC9PdmVyZmxvd1Rvb2x0aXA+XG4gICAgICAgICAgICA8L0xpbms+XG4gICAgICAgICAgPC9saT5cbiAgICAgICAgKVxuICAgICAgfX1cbiAgICAgIExpc3Rib3hQcm9wcz17e1xuICAgICAgICBjbGFzc05hbWU6ICdjaGlsZHJlbi1wLTAgTXVpQXV0b2NvbXBsZXRlLWxpc3Rib3gnLCAvLyB3ZSBoYXZlIHRvIGFkZCB0aGUgb3JpZ2luYWwgY2xhc3MgKE11aUF1dG9jb21wbGV0ZS1saXN0Ym94KSBiYWNrIG9uIHVuZm9ydHVuYXRlbHlcbiAgICAgIH19XG4gICAgICBvbkNoYW5nZT17KF9lLCB2YWx1ZSkgPT4ge1xuICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICBvbkZpbmlzaCh2YWx1ZSlcbiAgICAgICAgfVxuICAgICAgfX1cbiAgICAgIHJlbmRlcklucHV0PXsocGFyYW1zKSA9PiB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgICAgey4uLnBhcmFtc31cbiAgICAgICAgICAgIHZhbHVlPXt2YWx1ZX1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBzZXRWYWx1ZShlLnRhcmdldC52YWx1ZSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBsYWJlbD17bGFiZWx9XG4gICAgICAgICAgICB2YXJpYW50PVwib3V0bGluZWRcIlxuICAgICAgICAgICAgYXV0b0ZvY3VzXG4gICAgICAgICAgICBJbnB1dFByb3BzPXt7XG4gICAgICAgICAgICAgIC4uLnBhcmFtcy5JbnB1dFByb3BzLFxuICAgICAgICAgICAgICBlbmRBZG9ybm1lbnQ6IChcbiAgICAgICAgICAgICAgICA8UmVhY3QuRnJhZ21lbnQ+XG4gICAgICAgICAgICAgICAgICB7bG9hZGluZyA/IChcbiAgICAgICAgICAgICAgICAgICAgPENpcmN1bGFyUHJvZ3Jlc3MgY29sb3I9XCJpbmhlcml0XCIgc2l6ZT17MjB9IC8+XG4gICAgICAgICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgICAgICAgIHtwYXJhbXMuSW5wdXRQcm9wcy5lbmRBZG9ybm1lbnR9XG4gICAgICAgICAgICAgICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIH19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GluayBwdXQgaW50byBoaXN0b3J5IGFzIHdlbGwgdW5mb3J0dW5hdGVseSwgd2lsbCBuZWVkIHRvIGZpeCB0aGlzIG1vcmUgZ2VuZXJhbGx5XG4gICAgICAgICAgICAgIGhpc3RvcnkucmVwbGFjZSh7XG4gICAgICAgICAgICAgICAgcGF0aG5hbWU6IGAvc2VhcmNoLyR7cmVzdWx0LnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXNbJ21ldGFjYXJkLmRlbGV0ZWQuaWQnXX1gLFxuICAgICAgICAgICAgICAgIHNlYXJjaDogJycsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIG1lbnVTdGF0ZVJlc3RvcmUuaGFuZGxlQ2xvc2UoKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L1BhcGVyPlxuICAgICAgPC9Qb3BvdmVyPlxuICAgICAgPFBvcG92ZXJcbiAgICAgICAgb3Blbj17bWVudVN0YXRlQ29weS5vcGVufVxuICAgICAgICBhbmNob3JFbD17bWVudVN0YXRlLmFuY2hvclJlZi5jdXJyZW50fVxuICAgICAgICBvbkNsb3NlPXttZW51U3RhdGVDb3B5LmhhbmRsZUNsb3NlfVxuICAgICAgICBhbmNob3JPcmlnaW49e3tcbiAgICAgICAgICB2ZXJ0aWNhbDogJ2JvdHRvbScsXG4gICAgICAgICAgaG9yaXpvbnRhbDogJ2xlZnQnLFxuICAgICAgICB9fVxuICAgICAgPlxuICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfSBjbGFzc05hbWU9XCJwLTJcIj5cbiAgICAgICAgICA8U2F2ZUZvcm1cbiAgICAgICAgICAgIG9uQ2xvc2U9eygpID0+IHtcbiAgICAgICAgICAgICAgbWVudVN0YXRlQ29weS5oYW5kbGVDbG9zZSgpXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgb25TYXZlPXsodGl0bGUpID0+IHtcbiAgICAgICAgICAgICAgY29uc3QgY3VycmVudFF1ZXJ5SlNPTiA9IHNlbGVjdGlvbkludGVyZmFjZVxuICAgICAgICAgICAgICAgIC5nZXRDdXJyZW50UXVlcnkoKVxuICAgICAgICAgICAgICAgIC50b0pTT04oKVxuICAgICAgICAgICAgICBjdXJyZW50UXVlcnlKU09OLnRpdGxlID0gdGl0bGVcbiAgICAgICAgICAgICAgY29uc3QgdGFzayA9IEFzeW5jVGFza3MuY3JlYXRlU2VhcmNoKHsgZGF0YTogY3VycmVudFF1ZXJ5SlNPTiB9KVxuICAgICAgICAgICAgICBoaXN0b3J5LnB1c2goe1xuICAgICAgICAgICAgICAgIHBhdGhuYW1lOiBgL3NlYXJjaC8ke3Rhc2suZGF0YS5pZH1gLFxuICAgICAgICAgICAgICAgIHNlYXJjaDogJycsXG4gICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgYWRkU25hY2soYE1ha2luZyBhIGNvcHkgb2YgJHt0aXRsZX1gLCB7XG4gICAgICAgICAgICAgICAgYWxlcnRQcm9wczogeyBzZXZlcml0eTogJ2luZm8nIH0sXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgc2VsZWN0aW9uSW50ZXJmYWNlPXtzZWxlY3Rpb25JbnRlcmZhY2V9XG4gICAgICAgICAgLz5cbiAgICAgICAgPC9QYXBlcj5cbiAgICAgIDwvUG9wb3Zlcj5cbiAgICAgIDxQb3BvdmVyXG4gICAgICAgIG9wZW49e21lbnVTdGF0ZVJlbmFtZS5vcGVufVxuICAgICAgICBhbmNob3JFbD17bWVudVN0YXRlLmFuY2hvclJlZi5jdXJyZW50fVxuICAgICAgICBvbkNsb3NlPXttZW51U3RhdGVSZW5hbWUuaGFuZGxlQ2xvc2V9XG4gICAgICAgIGFuY2hvck9yaWdpbj17eyB2ZXJ0aWNhbDogJ2JvdHRvbScsIGhvcml6b250YWw6ICdsZWZ0JyB9fVxuICAgICAgPlxuICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfSBjbGFzc05hbWU9XCJwLTJcIj5cbiAgICAgICAgICA8U2F2ZUZvcm1cbiAgICAgICAgICAgIG9uQ2xvc2U9eygpID0+IHtcbiAgICAgICAgICAgICAgbWVudVN0YXRlUmVuYW1lLmhhbmRsZUNsb3NlKClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBvblNhdmU9eyh0aXRsZSkgPT4ge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIGRhdGEgIT09ICdib29sZWFuJykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRRdWVyeUpTT04gPSBzZWxlY3Rpb25JbnRlcmZhY2VcbiAgICAgICAgICAgICAgICAgIC5nZXRDdXJyZW50UXVlcnkoKVxuICAgICAgICAgICAgICAgICAgLnRvSlNPTigpXG4gICAgICAgICAgICAgICAgY3VycmVudFF1ZXJ5SlNPTi50aXRsZSA9IHRpdGxlXG4gICAgICAgICAgICAgICAgQXN5bmNUYXNrcy5zYXZlU2VhcmNoKHtcbiAgICAgICAgICAgICAgICAgIGRhdGE6IGN1cnJlbnRRdWVyeUpTT04sXG4gICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0OiBkYXRhLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L1BhcGVyPlxuICAgICAgPC9Qb3BvdmVyPlxuICAgICAgPFBvcG92ZXJcbiAgICAgICAgb3Blbj17bWVudVN0YXRlTmV3RnJvbUV4aXN0aW5nLm9wZW59XG4gICAgICAgIGFuY2hvckVsPXttZW51U3RhdGUuYW5jaG9yUmVmLmN1cnJlbnR9XG4gICAgICAgIG9uQ2xvc2U9e21lbnVTdGF0ZU5ld0Zyb21FeGlzdGluZy5oYW5kbGVDbG9z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cGVydGllcylcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICBkZWxldGUgY29weS5pZFxuICAgICAgICAgICAgICBkZWxldGUgY29weS50aXRsZVxuICAgICAgICAgICAgICBjb25zdCBlbmNvZGVkUXVlcnlNb2RlbCA9IGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeShjb3B5KSlcbiAgICAgICAgICAgICAgLy8gcmVwbGFjZSBiZWNhdXNlIHRlY2huaWNhbGx5IHRoZXkgZ2V0IHRoZSBsaW5rIGluIGNvbnN0cnVjdExpbmsgcHV0IGludG8gaGlzdG9yeSBhcyB3ZWxsIHVuZm9ydHVuYXRlbHksIHdpbGwgbmVlZCB0byBmaXggdGhpcyBtb3JlIGdlbmVyYWxseVxuICAgICAgICAgICAgICBoaXN0b3J5LnJlcGxhY2Uoe1xuICAgICAgICAgICAgICAgIHBhdGhuYW1lOiAnL3NlYXJjaCcsXG4gICAgICAgICAgICAgICAgc2VhcmNoOiBgP2RlZmF1bHRRdWVyeT0ke2VuY29kZWRRdWVyeU1vZGVsfWAsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIHNlbGVjdGlvbkludGVyZmFjZS5nZXRDdXJyZW50UXVlcnkoKS5zZXQoe1xuICAgICAgICAgICAgICAgIC4uLmNvcHksXG4gICAgICAgICAgICAgICAgaWQ6IG51bGwsXG4gICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBhZGRTbmFjayhcbiAgICAgICAgICAgICAgICBgTmV3IHNlYXJjaCBiYXNlZCBvbiAnJHtyZXN1bHQucGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy50aXRsZX0nYCxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBhbGVydFByb3BzOiB7IHNldmVyaXR5OiAnaW5mbycgfSxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgbW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XJhbGx5XG4gICAgICAgICAgICAgICAgaGlzdG9yeS5yZXBsYWNlKHtcbiAgICAgICAgICAgICAgICAgIHBhdGhuYW1lOiBgL3NlYXJjaC8ke3ZhbHVlLnBsYWluLmlkfWAsXG4gICAgICAgICAgICAgICAgICBzZWFyY2g6ICcnLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgYWRkU25hY2soXG4gICAgICAgICAgICAgICAgICBgU2VhcmNoICcke3ZhbHVlLnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMudGl0bGV9JyBvcGVuZWRgLFxuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBhbGVydFByb3BzOiB7IHNldmVyaXR5OiAnaW5mbycgfSxcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgbWVudVN0YXRlT3BlblNlYXJjaC5oYW5kbGVDbG9zZSgpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgbWVudVN0YXRlT3BlblNlYXJjaC5oYW5kbGVDbG9zZSgpXG4gICAgICAgICAgICAgICAgbWVudVN0YXRlUmVzdG9yZS5oYW5kbGVDbGljaygpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIENoZWNrIFRyYXNoP1xuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvUGFwZXI+XG4gICAgICA8L1BvcG92ZXI+XG4gICAgICA8TWVudVxuICAgICAgICBhbmNob3JFbD17bWVudVN0YXRlLmFuY2hvclJlZi5jdXJyZW50fVxuICAgICAgICBvcGVuPXttZW51U3RhdGUub3Blbn1cbiAgICAgICAgb25DbG9zZT17bWVudVN0YXRlLmhhbmRsZUNsb3NlfVxuICAgICAgICBrZWVwTW91bnRlZD17dHJ1ZX1cbiAgICAgICAgZGlzYWJsZUVuZm9yY2VGb2N1c1xuICAgICAgICBkaXNhYmxlQXV0b0ZvY3VzXG4gICAgICAgIGFuY2hvck9yaWdpbj17eyB2ZXJ0aWNhbDogJ2JvdHRvbScsIGhvcml6b250YWw6ICdsZWZ0JyB9fVxuICAgICAgPlxuICAgICAgICA8TWVudUl0ZW1cbiAgICAgICAgICBjb21wb25lbnQ9e0xpbmt9XG4gICAgICAgICAgdG89XCIvc2VhcmNoXCJcbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBtZW51U3RhdGUuaGFuZGxlQ2xvc2UoKVxuICAgICAgICAgICAgc2VsZWN0aW9uSW50ZXJmYWNlXG4gICAgICAgICAgICAgIC5nZXRDdXJyZW50UXVlcnkoKVxuICAgICAgICAgICAgICAuc2V0KCdpZCcsIG51bGwpXG4gICAgICAgICAgICAgIC5yZXNldFRvRGVmYXVsdHMoKVxuICAgICAgICAgICAgYWRkU25hY2soJ1N0YXJ0aW5nIGEgbmV3IHNlYXJjaCcsIHtcbiAgICAgICAgICAgICAgYWxlcnRQcm9wczogeyBzZXZlcml0eTogJ2luZm8nIH0sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICBOZXdcbiAgICAgICAgPC9NZW51SXRlbT5cbiAgICAgICAgPE1lbnVJdGVtXG4gICAgICAgICAgY29tcG9uZW50PVwiZGl2XCJcbiAgICAgICAgICByZWY9e21lbnVTdGF0ZU5ld0Zyb21FeGlzdGluZy5hbmNob3JSZWZ9XG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgbWVudVN0YXRlLmhhbmRsZUNsb3NlKClcbiAgICAgICAgICAgIG1lbnVTdGF0ZU5ld0Zyb21FeGlzdGluZy5oYW5kbGVDbGljaygpXG4gICAgICAgICAgfX1cbiAgICAgICAgPlxuICAgICAgICAgIE5ldyBmcm9tIGV4aXN0aW5nXG4gICAgICAgIDwvTWVudUl0ZW0+XG4gICAgICAgIDxNZW51SXRlbVxuICAgICAgICAgIGNvbXBvbmVudD1cImRpdlwiXG4gICAgICAgICAgcmVmPXttZW51U3RhdGVPcGVuU2VhcmNoLmFuY2hvclJlZn1cbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBtZW51U3RhdGUuaGFuZGxlQ2xvc2UoKVxuICAgICAgICAgICAgbWVudVN0YXRlT3BlblNlYXJjaC5oYW5kbGVDbGljaygpXG4gICAgICAgICAgfX1cbiAgICAgICAgPlxuICAgICAgICAgIE9wZW5cbiAgICAgICAgPC9NZW51SXRlbT5cbiAgICAgICAgey8qIDxNZW51SXRlbVxuICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgIG1lbnVTdGF0ZVJlc3RvcmUuaGFuZGxlQ2xpY2soKVxuICAgICAgICAgICAgbWVudVN0YXRlLmhhbmRsZUNsb3NlKClcbiAgICAgICAgICB9fVxuICAgICAgICA+XG4gICAgICAgICAgUmVzdG9yZSBmcm9tIHRyYXNoXG4gICAgICAgIDwvTWVudUl0ZW0+ICovfVxuICAgICAgICA8TWVudUl0ZW1cbiAgICAgICAgICBjb21wb25lbnQ9e0xpbmt9XG4gICAgICAgICAgZGlzYWJsZWQ9e3NlYXJjaFBhZ2VNb2RlID09PSAnYWRob2MnIHx8IHR5cGVvZiBkYXRhID09PSAnYm9vbGVhbid9XG4gICAgICAgICAgdG89e2Avc2VhcmNoP2RlZmF1bHRRdWVyeT0ke2VuY29kZWRRdWVyeU1vZGVsSlNPTn1gfVxuICAgICAgICAgIG9uQ2xpY2s9eyhlOiBhbnkpID0+IHtcbiAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKClcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKVxuICAgICAgICAgICAgbWVud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dGEgfSlcbiAgICAgICAgICAgICAgaGlzdG9yeS5wdXNoKHtcbiAgICAgICAgICAgICAgICBwYXRobmFtZTogYC9zZWFyY2hgLFxuICAgICAgICAgICAgICAgIHNlYXJjaDogJycsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBtZW51U3RhdGUuaGFuZGxlQ2xvc2UoKVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICBNb3ZlIHRvIHRyYXNoXG4gICAgICAgIDwvTWVudUl0ZW0+XG4gICAgICAgIDxEYXJrRGl2aWRlciBjbGFzc05hbWU9XCJtLTJcIiAvPlxuICAgICAgICA8TWVudUl0ZW1cbiAgICAgICAgICBkaXNhYmxlZD17c2VhcmNoUGFnZU1vZGUgPT09ICdzYXZlZCcgJiYgdHlwZW9mIGRhdGEgPT09ICdib29sZWFuJ31cbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2UuZ2V0Q3VycmVudFF1ZXJ5KCkuc2V0KCd0eXBlJywgJ2FkdmFuY2VkJylcbiAgICAgICAgICAgIGlmIChzZWFyY2hQYWdlTW9kZSA9PT0gJ2FkaG9jJykge1xuICAgICAgICAgICAgICAvLyBzZXQgdGhpcyBhcyB0aGVpciBwcmVmZXJlbmNlXG4gICAgICAgICAgICAgIFR5cGVkVXNlckluc3RhbmNlLnVwZGF0ZVF1ZXJ5U2V0dGluZ3Moe1xuICAgICAgICAgICAgICAgIHR5cGU6ICdhZHZhbmNlZCcsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBtZW51U3RhdGUuaGFuZGxlQ2xvc2UoKVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICBBZHZhbmNlZCBWaWV3XG4gICAgICAgIDwvTWVudUl0ZW0+XG4gICAgICAgIDxNZW51SXRlbVxuICAgICAgICAgIGRpc2FibGVkPXtz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0aW9uSW50ZXJmYWNlIH0gPSBSZWFjdC51c2VDb250ZXh0KFxuICAgIFNhdmVkU2VhcmNoTW9kZUNvbnRleHRcbiAgKVxuXG4gIGlmIChjbG9zZWQpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtY29sIGl0ZW1zLWNlbnRlciB3LWZ1bGwgcHktNCAgZmxleC1ub3dyYXAgc2hyaW5rLTAgb3ZlcmZsb3ctaGlkZGVuXCI+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHgtMlwiPlxuICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICAgICAgdmFyaWFudD1cInRleHRcIlxuICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgIHNldENsb3NlZChmYWxzZSlcbiAgICAgICAgICAgICAgc2V0TGVuZ3RoKGxhc3RMZW5ndGgpXG4gICAgICAgICAgICB9fVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxLZXlib2FyZEFycm93UmlnaHRJY29uXG4gICAgICAgICAgICAgIGNvbG9yPVwiaW5oZXJpdFwiXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cIk11aS10ZXh0LXRleHQtcHJpbWFyeVwiXG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAgPEtleWJvYXJkQXJyb3dSaWdodEljb25cbiAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiLW1sLTUgTXVpLXRleHQtdGV4dC1wcmltYXJ5XCJcbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC9CdXR0b24+XG5cbiAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICBkaXNhYmxlZD17dHlwZW9mIGRhdGEgPT09ICdib29sZWFuJyAmJiBzZWFyY2hQYWdlTW9kZSA9PT0gJ3NhdmVkJ31cbiAgICAgICAgICAgIGNsYXNzTmFtZT1cIm10LTNcIlxuICAgICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgICAgICB2YXJpYW50PVwiY29udGFpbmVkXCJcbiAgICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2UuZ2V0Q3VycmVudFF1ZXJ5KCkuc3RhcnRTZWFyY2hGcm9tRmlyc3RQYWdlKClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPFNlYXJjaEljb24gLz5cbiAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICApXG4gIH1cbiAgcmV0dXJuIChcbiAgICA8ZGl2IGNsYXNzTmFtZT1cInctZnVsbCBtaW4taC0xNiBweS0xIHB4LTIgZmxleCBmbGV4LXJvdyBmbGV4LW5vd3JhcCBpdGVtcy1jZW50ZXJcIj5cbiAgICAgIDxCdXR0b25cbiAgICAgICAgdmFyaWFudD1cInRleHRcIlxuICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgc2V0Q2xvc2VkKHRydWUpXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIENvbGxhcHNlXG4gICAgICAgIDxLZXlib2FyZEFycm93TGVmdEljb25cbiAgICAgICAgICBjb2xvcj1cImluaGVyaXRcIlxuICAgICAgICAgIGNsYXNzTmFtZT1cIk11aS10ZXh0LXRleHQtcHJpbWFyeSBNdWktaWNvbi1zaXplLXNtYWxsXCJcbiAgICAgICAgLz5cbiAgICAg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vbnRhbDogJ2xlZnQnIH19XG4gICAgICA+XG4gICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMub3ZlcmxheXN9PlxuICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LXJvdyBmbGV4LW5vd3JhcCBpdGVtcy1jZW50ZXIgcC00IHRleHQtMnhsIE11aS10ZXh0LXByaW1hcnlcIj5cbiAgICAgICAgICAgIHtpc1NhdmluZyA/IChcbiAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICA8Q2lyY3VsYXJQcm9ncmVzc1xuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwibXItMlwiXG4gICAgICAgICAgICAgICAgICBzdHlsZT17eyB3aWR0aDogJzFyZW0nLCBoZWlnaHQ6ICcxcmVtJyB9fVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgU2F2aW5nIC4uLlxuICAgICAgICAgICAgICA8Lz5cbiAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgPENsb3VkRG9uZUljb24gY2xhc3NOYW1lPVwibXItMlwiIC8+IEFsbCBjaGFuZ2VzIHNhdmVkIHRvIHRoZVxuICAgICAgICAgICAgICAgIHN5c3RlbS5cbiAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICApfVxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDxEYXJrRGl2aWRlciAvPlxuICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicC00XCI+XG4gICAgICAgICAgICBFdmVyeSBjaGFuZ2UgeW91IG1ha2UgaXMgYXV0b21hdGljYWxseSBzYXZlZC5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9QYXBlcj5cbiAgICAgIDwvUG9wb3Zlcj5cbiAgICAgIDxCdXR0b25cbiAgICAgICAgY29tcG9uZW50PVwiZGl2XCJcbiAgICAgICAgY2xhc3NOYW1lPVwic2hyaW5rLTBcIlxuICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xuICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKClcbiAgICAgICAgICBwb3B1cFN0YXRlLmhhbmRsZUNsaWNrKClcbiAgICAgICAgfX1cbiAgICAgICAgcmVmPXtwb3B1cFN0YXRlLmFuY2hvclJlZn1cbiAgICAgID5cbiAgICAgICAgPHNwYW5cbiAgICAgICAgICBjbGFzc05hbWU9e2BvcGFjaXR5LTc1IHRleHQtc20gc2hyaW5rLTAgZmxleCBpdGVtcy1jZW50ZXIgZmxleC1ub3dyYXAgJHtcbiAgICAgICAgICAgIGNsb3NlZCA/ICdtci1taW4gZmxleC1jb2wnIDogJ210LW1pbiBmbGV4LXJvdydcbiAgICAgICAgICB9YH1cbiAgICAgICAgPlxuICAgICAgICAgIHtpc1NhdmluZyA/IChcbiAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgIDxDaXJjdWxhclByb2dyZXNzXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidGV4dC1jdXJyZW50IHRleHQtYmFzZVwiXG4gICAgICAgICAgICAgICAgc3R5bGU9e3sgd2lkdGg6ICcxcmVtJywgaGVpZ2h0OiAnMXJlbScgfX1cbiAgICAgICAgICAgICAgLz57JyAnfVxuICAgICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17YCR7XG4gICAgICAgICAgICAgICAgICBjbG9zZWQgPyAnd3JpdGluZy1tb2RlLXZlcnRpY2FsLWxyIG10LTEnIDogJ21sLTEnXG4gICAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICBTYXZpbmcgLi4uXG4gICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgIDwvPlxuICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICA8PlxuICAgICAgICAgICAgICA8Q2xvdWREb25lSWNvbiBjbGFzc05hbWU9XCJ0ZXh0LWJhc2VcIiA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8ZGl2XG4gICAgICAgIGNsYXNzTmFtZT17YGgtZnVsbCB3LWZ1bGwgcmVsYXRpdmUgcC0yICR7XG4gICAgICAgICAgY2xvc2VkXG4gICAgICAgICAgICA/ICdmbGV4IGZsZXgtY29sIGZsZXgtbm93cmFwIGl0ZW1zLWNlbnRlcidcbiAgICAgICAgICAgIDogJ2ZsZXggZmxleC1yb3cgZmxleC1ub3dyYXAgaXRlbXMtY2VudGVyJ1xuICAgICAgICB9YH1cbiAgICAgID5cbiAgICAgICAge3NlYXJjaFBhZ2VNb2RlID09PSAnYWRob2MnID8gKFxuICAgICAgICAgIDw+XG4gICAgICAgICAgICA8UG9wb3ZlclxuICAgICAgICAgICAgICBhbmNob3JFbD17YWRob2NNZW51U3RhdGUuYW5jaG9yUmVmLmN1cnJlbnR9XG4gICAgICAgICAgICAgIG9wZW49e2FkaG9jTWVudVN0YXRlLm9wZW59XG4gICAgICAgICAgICAgIG9uQ2xvc2U9e2FkaG9jTWVudVN0YXRlLmhhbmRsZUNsb3NlfVxuICAgICAgICAgICAgICBhbmNob3JPcmlnaW49e3tcbiAgICAgICAgICAgICAgICB2ZXJ0aWNhbDogY2xvc2VkID8gJ3RvcCcgOiAnYm90dG9tJyxcbiAgICAgICAgICAgICAgICBob3Jpem9udGFsOiBjbG9zZWQgPyAncmlnaHQnIDogJ2xlZnQnLFxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfT5cbiAgICAgICAgICAgICAgICA8U2F2ZUZvcm1cbiAgICAgICAgICAgICAgICAgIG9uQ2xvc2U9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYWRob2NNZW51U3RhdGUuaGFuZGxlQ2xvc2UoKVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbkludGVyZmFjZT17c2VsZWN0aW9uSW50ZXJmYWNlfVxuICAgICAgICAgICAgICAgICAgb25TYXZlPXsodGl0bGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uSW50ZXJmYWNlLmdldEN1cnJlbnRRdWVyeSgpLnNldCgndGl0bGUnLCB0aXRsZSlcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2VhcmNoRGF0YSA9IHNlbGVjdGlvbkludGVyZmFjZVxuICAgICAgICAgICAgICAgICAgICAgIC5nZXRDdXJyZW50UXVlcnkoKVxuICAgICAgICAgICAgICAgICAgICAgIC50b0pTT04oKVxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoUGFnZU1vZGUgPT09ICdhZGhvYycpIHtcbiAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0YXNrID0gQXN5bmNUYXNrcy5jcmVhdGVTZWFyY2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogc2VhcmNoRGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgIGhpc3RvcnkucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRobmFtZTogYC9zZWFyY2gvJHt0YXNrLmRhdGEuaWR9YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlYXJjaDogJycsXG4gICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZGF0YSAhPT0gJ2Jvb2xlYW4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgQXN5bmNUYXNrcy5zYXZlU2VhcmNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHQ6IGRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBzZWFyY2hEYXRhLFxuICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICAgIDwvUG9wb3Zlcj5cbiAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgY29tcG9uZW50PVwiZGl2XCJcbiAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgdGV4dC1sZWZ0IHRleHQtMnhsIHNocmluayB0cnVuY2F0ZSAke1xuICAgICAgICAgICAgICAgIGNsb3NlZCA/ICdoLWZ1bGwnIDogJydcbiAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgIG9uQ2xpY2s9e2FkaG9jTWVudVN0YXRlLmhhbmRsZUNsaWNrfVxuICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICByZWY9e2FkaG9jTWVudVN0YXRlLmFuY2hvclJlZn1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17YGZsZXggaXRlbXMtY2VudGVyIGZsZXgtbm93cmFwICR7XG4gICAgICAgICAgICAgICAgICBjbG9zZWQgPyAnZmxleC1jb2wgaC1mdWxsJyA6ICdmbGV4LXJvdyB3LWZ1bGwnXG4gICAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgb3BhY2l0eS01MCBzaHJpbmsgdHJ1bmNhdGUgJHtcbiAgICAgICAgICAgICAgICAgICAgY2xvc2VkID8gJ3dyaXRpbmctbW9kZS12ZXJ0aWNhbC1sciBtYi0yJyA6ICdtci0yJ1xuICAgICAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgVW5zYXZlZCBzZWFyY2h7JyAnfVxuICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgICAgICA8U2F2ZUJ1dHRvbiAvPlxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDwvPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgICAge2RhdGEgPT09IGZhbHNlICYmIHNlYXJjaFBhZ2VNb2RlID09PSAnc2F2ZWQnID8gKFxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNsYXNzTmFtZT17YHRleHQtMnhsIG9wYWNpdHktNTAgJHtcbiAgICAgICAgICAgICAgY2xvc2VkID8gJ3dyaXRpbmctbW9kZS12ZXJ0aWNhbC1scicgOiAnJ1xuICAgICAgICAgICAgfWB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAgQ291bGQgbm90IGZpbmQgc2VhcmNoXG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgICB7ZGF0YSA9PT0gdHJ1ZSA/IChcbiAgICAgICAgICA8PlxuICAgICAgICAgICAgPFNrZWxldG9uIHZhcmlhbnQ9XCJyZWN0YW5ndWxhclwiIGNsYXNzTmFtZT1cInctZnVsbCBoLWZ1bGxcIiAvPlxuICAgICAgICAgIDwvPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgICAge3R5cGVvZiBkYXRhICE9PSAnYm9vbGVhbicgPyAoXG4gICAgICAgICAgPD5cbiAgICAgICAgICAgIDxQb3BvdmVyXG4gICAgICAgICAgICAgIGFuY2hvckVsPXtzYXZlZE1lbnVTdGF0ZS5hbmNob3JSZWYuY3VycmVudH1cbiAgICAgICAgICAgICAgb3Blbj17c2F2ZWRNZW51U3RhdGUub3Blbn1cbiAgICAgICAgICAgICAgb25DbG9zZT17c2F2ZWRNZW51U3RhdGUuaGFuZGxlQ2xvc2V9XG4gICAgICAgICAgICAgIGFuY2hvck9yaWdpbj17e1xuICAgICAgICAgICAgICAgIHZlcnRpY2FsOiBjbG9zZWQgPyAndG9wJyA6ICdib3R0b20nLFxuICAgICAgICAgICAgICAgIGhvcml6b250YWw6IGNsb3NlZCA/ICdyaWdodCcgOiAnbGVmdCcsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMub3ZlcmxheXN9PlxuICAgICAgICAgICAgICAgIDxTYXZlRm9ybVxuICAgICAgICAgICAgICAgICAgb25DbG9zZT17c2F2ZWRNZW51U3RhdGUuaGFuZGxlQ2xvc2V9XG4gICAgICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX1cbiAgICAgICAgICAgICAgICAgIG9uU2F2ZT17KHRpdGxlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbkludGVyZmFjZS5nZXRDdXJyZW50UXVlcnkoKS5zZXQoJ3RpdGxlJywgdGl0bGUpXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNlYXJjaERhdGEgPSBzZWxlY3Rpb25JbnRlcmZhY2VcbiAgICAgICAgICAgICAgICAgICAgICAuZ2V0Q3VycmVudFF1ZXJ5KClcbiAgICAgICAgICAgICAgICAgICAgICAudG9KU09OKClcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlYXJjaFBhZ2VNb2RlID09PSAnYWRob2MnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgQXN5bmNUYXNrcy5jcmVhdGVTZWFyY2goeyBkYXRhOiBzZWFyY2hEYXRhIH0pXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGRhdGEgIT09ICdib29sZWFuJykge1xuICAgICAgICAgICAgICAgICAgICAgIEFzeW5jVGFza3Muc2F2ZVNlYXJjaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0OiBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogc2VhcmNoRGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgICAgICA8L1BvcG92ZXI+XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIGNvbXBvbmVudD1cImRpdlwiXG4gICAgICAgICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICAgICAgICBjbGFzc05hbWU9e2B0ZXh0LWxlZnQgdGV4dC0yeGwgc2hyaW5rIG92ZXJmbG93LWhpZGRlbiAke1xuICAgICAgICAgICAgICAgIGNsb3NlZCA/ICdoLWZ1bGwnIDogJydcbiAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgIG9uQ2xpY2s9e3NhdmVkTWVudVN0YXRlLmhhbmRsZUNsaWNrfVxuICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICByZWY9e3NhdmVkTWVudVN0YXRlLmFuY2hvclJlZn1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17YGZsZXggaXRlbXMtY2VudGVyIGZsZXgtbm93cmFwICR7XG4gICAgICAgICAgICAgICAgICBjbG9zZWQgPyAnZmxleC1jb2wgaC1mdWxsJyA6ICd3LWZ1bGwgZmxleC1yb3cnXG4gICAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgdHJ1bmNhdGUgJHtcbiAgICAgICAgICAgICAgICAgICAgY2xvc2VkID8gJ3dyaXRpbmctbW9kZS12ZXJ0aWNhbC1sciBtYi0yIHNocmluaycgOiAnbXItMidcbiAgICAgICAgICAgICAgICAgIH1gfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIHtkYXRhLnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMudGl0bG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Q2xhc3Moe1xuICAgICAgICAgICAgICB0eXBlOiAnPScsXG4gICAgICAgICAgICAgIHByb3BlcnR5OiAnaWQnLFxuICAgICAgICAgICAgICB2YWx1ZTogaWQsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgIHR5cGU6ICdJTElLRScsXG4gICAgICAgICAgICAgIHByb3BlcnR5OiAnbWV0YWNhcmQtdGFncycsXG4gICAgICAgICAgICAgIHZhbHVlOiAnKicsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICBdLFxuICAgICAgICB9KVxuICAgICAgKVxuICAgICAgcXVlcnlNb2RlbC5pbml0aWFsaXplUmVzdWx0KClcbiAgICAgIGNvbnN0IGxhenlSZXN1bHRzID0gcXVlcnlNb2RlbC5nZXRMYXp5UmVzdWx0cygpXG4gICAgICBzdWJzY3JpcHRpb25DYW5jZWwgPSBsYXp5UmVzdWx0cy5zdWJzY3JpYmVUbyh7XG4gICAgICAgIHN1YnNjcmliYWJsZVRoaW5nOiAnZmlsdGVyZWRSZXN1bHRzJyxcbiAgICAgICAgY2FsbGJhY2s6ICgpID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHRzID0gT2JqZWN0LnZhbHVlcyhsYXp5UmVzdWx0cy5yZXN1bHRzKVxuICAgICAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHNldERhdGEocmVzdWx0c1swXSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2V0RGF0YShmYWxzZSlcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICB9KVxuICAgICAgcXVlcnlNb2RlbC5zdGFydFNlYXJjaEZyb21GaXJzdFBhZ2UoKVxuICAgIH0gZWxzZSB7XG4gICAgICBzZXREYXRhKGZhbHNlKVxuICAgIH1cbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgc3Vic2NyaXB0aW9uQ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AgICAgID5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJmbGV4IGZsZXgtY29sIGZsZXgtbm93cmFwIHctZnVsbCBoLWZ1bGxcIlxuICAgICAgICAgICAgICAgICAgcmVmPXtzZXRFbGVtZW50fVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxMZWZ0VG9wIC8+XG5cbiAgICAgICAgICAgICAgICAgIDxMZWZ0TWlkZGxlIC8+XG4gICAgICAgICAgICAgICAgICA8RGFya0RpdmlkZXIgY2xhc3NOYW1lPVwiaC1taW4gdy1mdWxsXCIgLz5cbiAgICAgICAgICAgICAgICAgIDxMZWZ0Qm90dG9tIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiPlxuICAgICAgICAgICAgICA8R29sZGVuTGF5b3V0IHNlbGVjdGlvbkludGVyZmFjZT17c2VsZWN0aW9uSW50ZXJmYWNlfSAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9TcGxpdFBhbmU+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9NZW1vPlxuICAgIDwvU2F2ZWRTZWFyY2hNb2RlQ29udGV4dC5Qcm92aWRlcj5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/query-add/query-add.d.ts b/src/main/webapp/component/query-add/query-add.d.ts new file mode 100644 index 00000000000..1cc41b33b0f --- /dev/null +++ b/src/main/webapp/component/query-add/query-add.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { ValidationResult } from '../../react-component/location/validators'; +export declare const queryForms: { + id: string; + title: string; + view: ({ model, errorListener, Extensions }: { + model: any; + errorListener?: ((validationResults: { + [key: string]: ValidationResult | undefined; + }) => void) | undefined; + Extensions?: React.FunctionComponent<{}> | undefined; + }) => JSX.Element; +}[]; +type QueryAddReactType = { + model: any; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; + Extensions?: React.FunctionComponent; +}; +export declare const QueryAddReact: ({ model, errorListener, Extensions, }: QueryAddReactType) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/query-add/query-add.js b/src/main/webapp/component/query-add/query-add.js new file mode 100644 index 00000000000..65bcd225cd5 --- /dev/null +++ b/src/main/webapp/component/query-add/query-add.js @@ -0,0 +1,46 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __read } from "tslib"; +import * as React from 'react'; +import QueryBasic from '../../component/query-basic/query-basic.view'; +import QueryAdvanced from '../../component/query-advanced/query-advanced'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +export var queryForms = [ + { id: 'basic', title: 'Basic Search', view: QueryBasic }, + { + id: 'advanced', + title: 'Advanced Search', + view: QueryAdvanced, + }, +]; +export var QueryAddReact = function (_a) { + var model = _a.model, errorListener = _a.errorListener, Extensions = _a.Extensions; + var _b = __read(React.useState(Math.random()), 2), setForceRender = _b[1]; + useListenTo(model, 'resetToDefaults change:type', function () { + setForceRender(Math.random()); + }); + var formType = model.get('type'); + var form = queryForms.find(function (form) { return form.id === formType; }) || queryForms[0]; + return (React.createElement(React.Fragment, null, + React.createElement("form", { target: "autocomplete", action: "/search/catalog/blank.html", className: "w-full" }, (function () { + if (form.id === 'basic') { + return (React.createElement(QueryBasic, { model: model, key: model.id, errorListener: errorListener, Extensions: Extensions })); + } + else { + return (React.createElement(QueryAdvanced, { model: model, key: model.id, errorListener: errorListener, Extensions: Extensions })); + } + })()))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktYWRkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9xdWVyeS1hZGQvcXVlcnktYWRkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJOztBQUVKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sVUFBVSxNQUFNLDhDQUE4QyxDQUFBO0FBRXJFLE9BQU8sYUFBYSxNQUFNLCtDQUErQyxDQUFBO0FBQ3pFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQTtBQUVwRSxNQUFNLENBQUMsSUFBTSxVQUFVLEdBQUc7SUFDeEIsRUFBRSxFQUFFLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxjQUFjLEVBQUUsSUFBSSxFQUFFLFVBQVUsRUFBRTtJQUN4RDtRQUNFLEVBQUUsRUFBRSxVQUFVO1FBQ2QsS0FBSyxFQUFFLGlCQUFpQjtRQUN4QixJQUFJLEVBQUUsYUFBYTtLQUNwQjtDQUNGLENBQUE7QUFVRCxNQUFNLENBQUMsSUFBTSxhQUFhLEdBQUcsVUFBQyxFQUlWO1FBSGxC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yTGlzdGVuZXI9e2Vycm9yTGlzdGVuZXJ9XG4gICAgICAgICAgICAgICAgRXh0ZW5zaW9ucz17RXh0ZW5zaW9uc31cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIClcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPFF1ZXJ5QWR2YW5jZWRcbiAgICAgICAgICAgICAgICBtb2RlbD17bW9kZWx9XG4gICAgICAgICAgICAgICAga2V5PXttb2RlbC5pZH1cbiAgICAgICAgICAgICAgICBlcnJvckxpc3RlbmVyPXtlcnJvckxpc3RlbmVyfVxuICAgICAgICAgICAgICAgIEV4dGVuc2lvbnM9e0V4dGVuc2lvbnN9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICB9KSgpfVxuICAgICAgPC9mb3JtPlxuICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/query-advanced/query-advanced.d.ts b/src/main/webapp/component/query-advanced/query-advanced.d.ts new file mode 100644 index 00000000000..f4e6f51a712 --- /dev/null +++ b/src/main/webapp/component/query-advanced/query-advanced.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { ValidationResult } from '../../react-component/location/validators'; +type Props = { + model: any; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; + Extensions?: React.FunctionComponent; +}; +export declare const QueryAdvanced: ({ model, errorListener, Extensions }: Props) => JSX.Element; +declare const _default: ({ model, errorListener, Extensions }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/query-advanced/query-advanced.js b/src/main/webapp/component/query-advanced/query-advanced.js new file mode 100644 index 00000000000..c3153454a65 --- /dev/null +++ b/src/main/webapp/component/query-advanced/query-advanced.js @@ -0,0 +1,32 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import QuerySettings from '../query-settings/query-settings'; +import { FilterBuilderRoot } from '../filter-builder/filter-builder'; +import { hot } from 'react-hot-loader'; +import Swath from '../swath/swath'; +export var QueryAdvanced = function (_a) { + var model = _a.model, errorListener = _a.errorListener, Extensions = _a.Extensions; + return (React.createElement("div", { className: "w-full h-full" }, + React.createElement("div", { "data-id": "advanced-search-container", className: "w-full h-full px-2 pt-2 overflow-auto" }, + React.createElement("div", { className: "query-advanced w-full" }, + React.createElement(FilterBuilderRoot, { model: model, errorListener: errorListener })), + React.createElement("div", { className: "py-5 w-full" }, + React.createElement(Swath, { className: "w-full h-1" })), + React.createElement("div", { className: "query-settings w-full" }, + React.createElement(QuerySettings, { model: model, Extensions: Extensions }))))); +}; +export default hot(module)(QueryAdvanced); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktYWR2YW5jZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3F1ZXJ5LWFkdmFuY2VkL3F1ZXJ5LWFkdmFuY2VkLn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Lz5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHktNSB3LWZ1bGxcIj5cbiAgICAgICAgICA8U3dhdGggY2xhc3NOYW1lPVwidy1mdWxsIGgtMVwiIC8+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInF1ZXJ5LXNldHRpbmdzIHctZnVsbFwiPlxuICAgICAgICAgIDxRdWVyeVNldHRpbmdzIG1vZGVsPXttb2RlbH0gRXh0ZW5zaW9ucz17RXh0ZW5zaW9uc30gLz5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShRdWVyeUFkdmFuY2VkKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/query-basic/query-basic.view.d.ts b/src/main/webapp/component/query-basic/query-basic.view.d.ts new file mode 100644 index 00000000000..41b71ab8100 --- /dev/null +++ b/src/main/webapp/component/query-basic/query-basic.view.d.ts @@ -0,0 +1,46 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { BasicDatatypeFilter, BasicFilterClass } from '../filter-builder/filter.structure'; +import { FilterBuilderClass, FilterClass } from '../filter-builder/filter.structure'; +import { ValidationResult } from '../../react-component/location/validators'; +import { BasicDataTypePropertyName } from '../filter-builder/reserved.properties'; +type PropertyValueMapType = { + anyText: Array; + anyDate: Array; + anyGeo: Array; + [BasicDataTypePropertyName]: { + on: boolean; + value: BasicDatatypeFilter; + }; + [key: string]: any; +}; +export declare function downgradeFilterTreeToBasic(filter: FilterBuilderClass): FilterBuilderClass; +export declare function translateFilterToBasicMap(filter: FilterBuilderClass): { + propertyValueMap: PropertyValueMapType; + downConversion: boolean; +}; +type QueryBasicProps = { + model: any; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; + Extensions?: React.FunctionComponent; +}; +export declare const constructFilterFromBasicFilter: ({ basicFilter, }: { + basicFilter: PropertyValueMapType; +}) => FilterBuilderClass; +declare const _default: ({ model, errorListener, Extensions }: QueryBasicProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/query-basic/query-basic.view.js b/src/main/webapp/component/query-basic/query-basic.view.js new file mode 100644 index 00000000000..b423c3a6b55 --- /dev/null +++ b/src/main/webapp/component/query-basic/query-basic.view.js @@ -0,0 +1,321 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import cql from '../../js/cql'; +import CQLUtils from '../../js/CQLUtils'; +import QuerySettings from '../query-settings/query-settings'; +import QueryTimeReactView from '../query-time/query-time.view'; +import { BasicDatatypeFilter, isBasicDatatypeClass, isFilterBuilderClass, } from '../filter-builder/filter.structure'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Checkbox from '@mui/material/Checkbox'; +import { FilterBuilderClass, FilterClass, } from '../filter-builder/filter.structure'; +import Typography from '@mui/material/Typography'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import FilterInput from '../../react-component/filter/filter-input'; +import Swath from '../swath/swath'; +import Grid from '@mui/material/Grid'; +import BooleanSearchBar from '../boolean-search-bar/boolean-search-bar'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { useMetacardDefinitions } from '../../js/model/Startup/metacard-definitions.hooks'; +import { ReservedBasicDatatype } from '../reserved-basic-datatype/reserved.basic-datatype'; +import { BasicDataTypePropertyName } from '../filter-builder/reserved.properties'; +function isNested(filter) { + var nested = false; + filter.filters.forEach(function (subfilter) { + nested = nested || subfilter.filters; + }); + return nested; +} +// strip extra quotes +var stripQuotes = function (property) { + if (property === void 0) { property = 'anyText'; } + return property === null || property === void 0 ? void 0 : property.replace(/^"(.+(?="$))"$/, '$1'); +}; +function isAnyDate(filter) { + if (!filter.filters) { + return (StartupDataStore.MetacardDefinitions.getAttributeMap()[stripQuotes(filter.property)].type === 'DATE'); + } + var typesFound = {}; + var valuesFound = {}; + filter.filters.forEach(function (subfilter) { + typesFound[subfilter.type] = true; + valuesFound[subfilter.value] = true; + }); + typesFound = Object.keys(typesFound); + valuesFound = Object.keys(valuesFound); + if (typesFound.length > 1 || valuesFound.length > 1) { + return false; + } + else { + var attributes = filter.filters.map(function (subfilter) { return subfilter.property; }); + return (StartupDataStore.MetacardDefinitions.getAttributeMap()[stripQuotes(attributes[0])].type === 'DATE'); + } +} +function handleAnyDateFilter(propertyValueMap, filter) { + propertyValueMap['anyDate'] = propertyValueMap['anyDate'] || []; + var existingFilter = propertyValueMap['anyDate'].filter(function (anyDateFilter) { + return anyDateFilter.type === + (filter.filters ? filter.filters[0].type : filter.type); + })[0]; + if (!existingFilter) { + existingFilter = { + property: [], + }; + propertyValueMap['anyDate'].push(existingFilter); + } + existingFilter.property = existingFilter.property.concat(filter.filters + ? filter.filters.map(function (subfilter) { return stripQuotes(subfilter.property); }) + : [stripQuotes(filter.property)]); + existingFilter.type = filter.filters ? filter.filters[0].type : filter.type; + existingFilter.value = filter.filters ? filter.filters[0].value : filter.value; + if (existingFilter.type === 'DURING') { + existingFilter.from = filter.filters ? filter.filters[0].from : filter.from; + existingFilter.to = filter.filters ? filter.filters[0].to : filter.to; + } +} +export function downgradeFilterTreeToBasic(filter) { + return constructFilterFromBasicFilter({ + basicFilter: translateFilterToBasicMap(filter).propertyValueMap, + }); +} +export function translateFilterToBasicMap(filter) { + var _a; + var propertyValueMap = (_a = { + anyDate: [], + anyText: [], + anyGeo: [] + }, + _a[BasicDataTypePropertyName] = { + on: false, + value: new BasicDatatypeFilter({ + value: [], + }), + }, + _a); + var downConversion = false; + if (!filter.filters && isAnyDate(filter)) { + handleAnyDateFilter(propertyValueMap, filter); + } + if (isFilterBuilderClass(filter)) { + filter.filters.forEach(function (subfilter) { + if (!isFilterBuilderClass(subfilter) && isAnyDate(subfilter)) { + handleAnyDateFilter(propertyValueMap, subfilter); + } + else if (!isFilterBuilderClass(subfilter) && + isBasicDatatypeClass(subfilter)) { + propertyValueMap[BasicDataTypePropertyName].on = true; + propertyValueMap[BasicDataTypePropertyName].value = subfilter; + } + else if (!isFilterBuilderClass(subfilter)) { + if (['anyDate', 'anyText', 'anyGeo'].includes(subfilter.property)) { + propertyValueMap[CQLUtils.getProperty(subfilter)] = + propertyValueMap[CQLUtils.getProperty(subfilter)] || []; + if (propertyValueMap[CQLUtils.getProperty(subfilter)].filter(function (existingFilter) { return existingFilter.type === subfilter.type; }).length === 0) { + propertyValueMap[CQLUtils.getProperty(subfilter)].push(subfilter); + } + } + } + else if (!isNested(subfilter) && isAnyDate(subfilter)) { + handleAnyDateFilter(propertyValueMap, subfilter); + } + else { + downConversion = true; + } + }); + } + else { + propertyValueMap[CQLUtils.getProperty(filter)] = + propertyValueMap[CQLUtils.getProperty(filter)] || []; + propertyValueMap[CQLUtils.getProperty(filter)].push(filter); + } + if (propertyValueMap.anyText.length === 0) { + propertyValueMap.anyText.push(new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + property: 'anyText', + value: '', + })); + } + return { + propertyValueMap: propertyValueMap, + downConversion: downConversion, + }; +} +function getFilterTree(model) { + if (typeof model.get('filterTree') === 'object') { + return model.get('filterTree'); + } + return cql.simplify(cql.read(model.get('cql'))); +} +export var constructFilterFromBasicFilter = function (_a) { + var basicFilter = _a.basicFilter; + var filters = []; + if (basicFilter.anyText[0].value !== '') { + filters.push(basicFilter.anyText[0]); + } + if (basicFilter.anyDate[0] !== undefined) { + filters.push(new FilterBuilderClass({ + type: 'OR', + filters: basicFilter.anyDate[0].property.length !== 0 + ? basicFilter.anyDate[0].property.map(function (property) { + return __assign(__assign({}, basicFilter.anyDate[0]), { property: property }); + }) + : [ + __assign(__assign({}, basicFilter.anyDate[0]), { property: 'anyDate' }), + ], // we need a default since we rely on the filterTree solely + })); + } + if (basicFilter.anyGeo[0] !== undefined) { + filters.push(basicFilter.anyGeo[0]); + } + if (basicFilter[BasicDataTypePropertyName].on && + basicFilter[BasicDataTypePropertyName].value.value.length > 0) { + filters.push(basicFilter[BasicDataTypePropertyName].value); + } + else if (basicFilter[BasicDataTypePropertyName].on) { + // a bit of an unfortunate hack so we can depend directly on filterTree (this will only happen if properties is blank!) + // see the anyDate part of translateFilterToBasicMap for more details + filters.push(new BasicDatatypeFilter({ + value: [], + })); + } + return new FilterBuilderClass({ + type: 'AND', + filters: filters, + }); +}; +/** + * We want to reset the basic filter whenever the filter tree changes on the model. + * + * We also want to update the filter tree once whenever the component is first + */ +var useBasicFilterFromModel = function (_a) { + var model = _a.model; + var _b = __read(React.useState(translateFilterToBasicMap(getFilterTree(model)).propertyValueMap), 2), basicFilter = _b[0], setBasicFilter = _b[1]; + var _c = useBackbone(), listenTo = _c.listenTo, stopListening = _c.stopListening; + React.useEffect(function () { + var callback = function () { + setBasicFilter(translateFilterToBasicMap(getFilterTree(model)).propertyValueMap); + }; + listenTo(model, 'change:filterTree', callback); + return function () { + stopListening(model, 'change:filterTree', callback); + }; + }, [model]); + return basicFilter; +}; +var QueryBasic = function (_a) { + var model = _a.model, errorListener = _a.errorListener, Extensions = _a.Extensions; + var MetacardDefinitions = useMetacardDefinitions(); + var inputRef = React.useRef(); + var basicFilter = useBasicFilterFromModel({ model: model }); + /** + * Because of how things render, auto focusing to the input is more complicated than I wish. + * This ensures it works every time, whereas autoFocus prop is unreliable + */ + React.useEffect(function () { + var timeoutId = setTimeout(function () { + if (inputRef.current) { + inputRef.current.focus(); + } + }, 100); + return function () { + clearTimeout(timeoutId); + }; + }, []); + var anyTextValue = (function () { + if (basicFilter.anyText) { + if (typeof basicFilter.anyText[0].value === 'string') { + return { + text: basicFilter.anyText[0].value, + cql: '', + error: false, + }; + } + else { + return basicFilter.anyText[0].value; + } + } + else { + return { + text: '', + cql: '', + error: false, + }; + } + })(); + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "editor-properties px-2 py-3" }, + React.createElement("div", null, + React.createElement(Typography, { className: "pb-2" }, "Keyword"), + React.createElement(BooleanSearchBar, { value: anyTextValue, key: model.id, onChange: function (_a) { + var text = _a.text, cql = _a.cql, error = _a.error; + // we want the string value, the cql value, and if it's correct + basicFilter.anyText[0] = new FilterClass(__assign(__assign({}, basicFilter.anyText[0]), { type: 'BOOLEAN_TEXT_SEARCH', value: { + text: text, + cql: cql, + error: error, + } })); + model.set('filterTree', constructFilterFromBasicFilter({ basicFilter: basicFilter })); + } })), + React.createElement("div", { className: "pt-2" }, + React.createElement(QueryTimeReactView, { value: basicFilter.anyDate[0], onChange: function (newValue) { + basicFilter.anyDate[0] = newValue; + model.set('filterTree', constructFilterFromBasicFilter({ basicFilter: basicFilter })); + } })), + React.createElement("div", { className: "" }, + React.createElement(FormControlLabel, { labelPlacement: "end", control: React.createElement(Checkbox, { color: "default", checked: Boolean(basicFilter.anyGeo[0]), onChange: function (e) { + if (!e.target.checked) { + basicFilter.anyGeo.pop(); + } + else { + basicFilter.anyGeo.push(new FilterClass({ + type: 'GEOMETRY', + property: 'anyGeo', + value: '', + })); + } + model.set('filterTree', constructFilterFromBasicFilter({ basicFilter: basicFilter })); + } }), label: MetacardDefinitions.getAlias('location') }), + basicFilter.anyGeo[0] ? (React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pt-2" }, + React.createElement(Grid, { item: true }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { item: true, className: "w-full pl-2" }, + React.createElement(FilterInput, { filter: new FilterClass(__assign(__assign({}, basicFilter.anyGeo[0]), { property: basicFilter.anyGeo[0].property })), setFilter: function (val) { + basicFilter.anyGeo[0] = val; + model.set('filterTree', constructFilterFromBasicFilter({ basicFilter: basicFilter })); + }, errorListener: errorListener })))) : null), + React.createElement("div", { className: "" }, + React.createElement(FormControlLabel, { labelPlacement: "end", control: React.createElement(Checkbox, { color: "default", checked: basicFilter[BasicDataTypePropertyName].on, onChange: function (e) { + basicFilter[BasicDataTypePropertyName].on = e.target.checked; + model.set('filterTree', constructFilterFromBasicFilter({ basicFilter: basicFilter })); + } }), label: MetacardDefinitions.getAlias(BasicDataTypePropertyName) }), + basicFilter[BasicDataTypePropertyName].on ? (React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pt-2" }, + React.createElement(Grid, { item: true }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { item: true, className: "w-full pl-2" }, + React.createElement(ReservedBasicDatatype, { value: basicFilter[BasicDataTypePropertyName].value.value, onChange: function (newValue) { + basicFilter[BasicDataTypePropertyName].value.value = + newValue; + model.set('filterTree', constructFilterFromBasicFilter({ basicFilter: basicFilter })); + } })))) : null), + React.createElement("div", { className: "py-2 w-full" }, + React.createElement(Swath, { className: "w-full h-1" })), + React.createElement("div", { className: "basic-settings" }, + React.createElement(QuerySettings, { model: model, Extensions: Extensions }))))); +}; +export default hot(module)(QueryBasic); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktYmFzaWMudmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQv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4gICAgZmlsdGVycy5wdXNoKGJhc2ljRmlsdGVyLmFueVRleHRbMF0pXG4gIH1cbiAgaWYgKGJhc2ljRmlsdGVyLmFueURhdGVbMF0gIT09IHVuZGVmaW5lZCkge1xuICAgIGZpbHRlcnMucHVzaChcbiAgICAgIG5ldyBGaWx0ZXJCdWlsZGVyQ2xhc3Moe1xuICAgICAgICB0eXBlOiAnT1InLFxuICAgICAgICBmaWx0ZXJzOlxuICAgICAgICAgIGJhc2ljRmlsdGVyLmFueURhdGVbMF0ucHJvcGVydHkubGVuZ3RoICE9PSAwXG4gICAgICAgICAgICA/IGJhc2ljRmlsdGVyLmFueURhdGVbMF0ucHJvcGVydHkubWFwKChwcm9wZXJ0eSkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAuLi5iYXNpY0ZpbHRlci5hbnlEYXRlWzBdLFxuICAgICAgICAgICAgICAgICAgcHJvcGVydHksXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgLi4uYmFzaWNGaWx0ZXIuYW55RGF0ZVswXSxcbiAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiAnYW55RGF0ZScsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgXSwgLy8gd2UgbmVlZCBhIGRlZmF1bHQgc2luY2Ugd2UgcmVseSBvbiB0aGUgZmlsdGVyVHJlZSBzb2xlbHlcbiAgICAgIH0pXG4gICAgKVxuICB9XG4gIGlmIChiYXNpY0ZpbHRlci5hbnlHZW9bMF0gIT09IHVuZGVmaW5lZCkge1xuICAgIGZpbHRlcnMucHVzaChiYXNpY0ZpbHRlci5hbnlHZW9bMF0pXG4gIH1cbiAgaWYgKFxuICAgIGJhc2ljRmlsdGVyW0Jhc2ljRGF0YVR5cGVQcm9wZXJ0eU5hbWVdLm9uICYmXG4gICAgYmFzaWN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3I6IGZhbHNlLFxuICAgICAgfVxuICAgIH1cbiAgfSkoKVxuICByZXR1cm4gKFxuICAgIDw+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cImVkaXRvci1wcm9wZXJ0aWVzIHB4LTIgcHktM1wiPlxuICAgICAgICA8ZGl2PlxuICAgICAgICAgIDxUeXBvZ3JhcGh5IGNsYXNzTmFtZT1cInBiLTJcIj5LZXl3b3JkPC9UeXBvZ3JhcGh5PlxuICAgICAgICAgIDxCb29sZWFuU2VhcmNoQmFyXG4gICAgICAgICAgICB2YWx1ZT17YW55VGV4dFZhbHVlfVxuICAgICAgICAgICAga2V5PXttb2RlbC5pZH1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsoeyB0ZXh0LCBjcWwsIGVycm9yIH0pID0+IHtcbiAgICAgICAgICAgICAgLy8gd2Ugd2FudCB0aGUgc3RyaW5nIHZhbHVlLCB0aGUgY3FsIHZhbHVlLCBhbmQgaWYgaXQncyBjb3JyZWN0XG4gICAgICAgICAgICAgIGJhc2ljRmlsdGVyLmFueVRleHRbMF0gPSBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgIC4uLmJhc2ljRmlsdGVyLmFueVRleHRbMF0sXG4gICAgICAgICAgICAgICAgdHlwZTogJ0JPT0xFQU5fVEVYVF9TRUFSQ0gnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgICAgICB0ZXh0LFxuICAgICAgICAgICAgICAgICAgY3FsLFxuICAgICAgICAgICAgICAgICAgZXJyb3IsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgbW9kZWwuc2V0KFxuICAgICAgICAgICAgICAgICdmaWx0ZXJUcmVlJyxcbiAgICAgICAgICAgICAgICBjb25zdHJ1Y3RGaWx0ZXJGcm9tQmFzaWNGaWx0ZXIoeyBiYXNpY0ZpbHRlciB9KVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9fVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInB0LTJcIj5cbiAgICAgICAgICA8UXVlcnlUaW1lUmVhY3RWaWV3XG4gICAgICAgICAgICB2YWx1ZT17YmFzaWNGaWx0ZXIuYW55RGF0ZVswXX1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsobmV3VmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgYmFzaWNGaWx0ZXIuYW55RGF0ZVswXSA9IG5ld1ZhbHVlXG4gICAgICAgICAgICAgIG1vZGVsLnNldChcbiAgICAgICAgICAgICAgICAnZmlsdGVyVHJlZScsXG4gICAgICAgICAgICAgICAgY29uc3RydWN0RmlsdGVyRnJvbUJhc2ljRmlsdGVyKHsgYmFzaWNGaWx0ZXIgfSlcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJcIj5cbiAgICAgICAgICA8Rm9ybUNvbnRyb2xMYWJlbFxuICAgICAgICAgICAgbGFiZWxQbGFjZW1lbnQ9XCJlbmRcIlxuICAgICAgICAgICAgY29udHJvbD17XG4gICAgICAgICAgICAgIDxDaGVja2JveFxuICAgICAgICAgICAgICAgIGNvbG9yPVwiZGVmYXVsdFwiXG4gICAgICAgICAgICAgICAgY2hlY2tlZD17Qm9vbGVhbihiYXNpY0ZpbHRlci5hbnlHZW9bMF0pfVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgaWYgKCFlLnRhcmdldC5jaGVja2VkKSB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2ljRmlsdGVyLmFueUdlby5wb3AoKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYmFzaWNGaWx0ZXIuYW55R2VvLnB1c2goXG4gICAgICAgICAgICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogJycsXG4gICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgbW9kZWwuc2V0KFxuICAgICAgICAgICAgICAgICAgICAnZmlsdGVyVHJlZScsXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cnVjdEZpbHRlckZyb21CYXNpY0ZpbHRlcih7IGJhc2ljRmlsdGVyIH0pXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhYmVsPXtNZXRhY2FyZERlZmluaXRpb25zLmdldEFsaWFzKCdsb2NhdGlvbicpfVxuICAgICAgICAgIC8+XG4gICAgICAgICAge2Jhc2ljRmlsdGVyLmFueUdlb1swXSA/IChcbiAgICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICAgIGNvbnRhaW5lclxuICAgICAgICAgICAgICBhbGlnbkl0ZW1zPVwic3RyZXRjaFwiXG4gICAgICAgICAgICAgIGRpcmVjdGlvbj1cInJvd1wiXG4gICAgICAgICAgICAgIHdyYXA9XCJub3dyYXBcIlxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJwdC0yXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgICAgICA8U3dhdGggY2xhc3NOYW1lPVwidy0xIGgtZnVsbFwiIC8+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgcGwtMlwiPlxuICAgICAgICAgICAgICAgIDxGaWx0ZXJJbnB1dFxuICAgICAgICAgICAgICAgICAgZmlsdGVyPXtcbiAgICAgICAgICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICAgICAgICAuLi5iYXNpY0ZpbHRlci5hbnlHZW9bMF0sXG4gICAgICAgICAgICAgICAgICAgICAgcHJvcGVydHk6IGJhc2ljRmlsdGVyLmFueUdlb1swXS5wcm9wZXJ0eSxcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIHNldEZpbHRlcj17KHZhbDogYW55KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2ljRmlsdGVyLmFueUdlb1swXSA9IHZhbFxuICAgICAgICAgICAgICAgICAgICBtb2RlbC5zZXQoXG4gICAgICAgICAgICAgICAgICAgICAgJ2ZpbHRlclRyZWUnLFxuICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cnVjdEZpbHRlckZyb21CYXNpY0ZpbHRlcih7IGJhc2ljRmlsdGVyIH0pXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICBlcnJvckxpc3RlbmVyPXtlcnJvckxpc3RlbmVyfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiXCI+XG4gICAgICAgICAgPEZvcm1Db250cm9sTGFiZWxcbiAgICAgICAgICAgIGxhYmVsUGxhY2VtZW50PVwiZW5kXCJcbiAgICAgICAgICAgIGNvbnRyb2w9e1xuICAgICAgICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICAgICAgICBjb2xvcj1cImRlZmF1bHRcIlxuICAgICAgICAgICAgICAgIGNoZWNrZWQ9e2Jhc2ljRmlsdGVyW0Jhc2ljRGF0YVR5cGVQcm9wZXJ0eU5hbWVdLm9ufVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgYmFzaWNGaWx0ZXJbQmFzaWNEYXRhVHlwZVByb3BlcnR5TmFtZV0ub24gPSBlLnRhcmdldC5jaGVja2VkXG4gICAgICAgICAgICAgICAgICBtb2RlbC5zZXQoXG4gICAgICAgICAgICAgICAgICAgICdmaWx0ZXJUcmVlJyxcbiAgICAgICAgICAgICAgICAgICAgY29uc3RydWN0RmlsdGVyRnJvbUJhc2ljRmlsdGVyKHsgYmFzaWNGaWx0ZXIgfSlcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFiZWw9e01ldGFjYXJkRGVmaW5pdGlvbnMuZ2V0QWxpYXMoQmFzaWNEYXRhVHlwZVByb3BlcnR5TmFtZSl9XG4gICAgICAgICAgLz5cbiAgICAgICAgICB7YmFzaWNGaWx0ZXJbQmFzaWNEYXRhVHlwZVByb3BlcnR5TmFtZV0ub24gPyAoXG4gICAgICAgICAgICA8R3JpZFxuICAgICAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICAgICAgYWxpZ25JdGVtcz1cInN0cmV0Y2hcIlxuICAgICAgICAgICAgICBkaXJlY3Rpb249XCJyb3dcIlxuICAgICAgICAgICAgICB3cmFwPVwibm93cmFwXCJcbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwicHQtMlwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAgICAgICAgPFN3YXRoIGNsYXNzTmFtZT1cInctMSBoLWZ1bGxcIiAvPlxuICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsIHBsLTJcIj5cbiAgICAgICAgICAgICAgICA8UmVzZXJ2ZWRCYXNpY0RhdGF0eXBlXG4gICAgICAgICAgICAgICAgICB2YWx1ZT17YmFzaWNGaWx0ZXJbQmFzaWNEYXRhVHlwZVByb3BlcnR5TmFtZV0udmFsdWUudmFsdWV9XG4gICAgICAgICAgICAgICAgICBvbkNoYW5nZT17KG5ld1ZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2ljRmlsdGVyW0Jhc2ljRGF0YVR5cGVQcm9wZXJ0eU5hbWVdLnZhbHVlLnZhbHVlID1cbiAgICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZVxuICAgICAgICAgICAgICAgICAgICBtb2RlbC5zZXQoXG4gICAgICAgICAgICAgICAgICAgICAgJ2ZpbHRlclRyZWUnLFxuICAgICAgICAgICAgICAgICAgICAgIGNvbnN0cnVjdEZpbHRlckZyb21CYXNpY0ZpbHRlcih7IGJhc2ljRmlsdGVyIH0pXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJweS0yIHctZnVsbFwiPlxuICAgICAgICAgIDxTd2F0aCBjbGFzc05hbWU9XCJ3LWZ1bGwgaC0xXCIgLz5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiYmFzaWMtc2V0dGluZ3NcIj5cbiAgICAgICAgICA8UXVlcnlTZXR0aW5ncyBtb2RlbD17bW9kZWx9IEV4dGVuc2lvbnM9e0V4dGVuc2lvbnN9IC8+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC8+XG4gIClcbn1cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFF1ZXJ5QmFzaWMpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/query-basic/query-basic.view.spec.d.ts b/src/main/webapp/component/query-basic/query-basic.view.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/component/query-basic/query-basic.view.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/component/query-basic/query-basic.view.spec.js b/src/main/webapp/component/query-basic/query-basic.view.spec.js new file mode 100644 index 00000000000..20f51d0e781 --- /dev/null +++ b/src/main/webapp/component/query-basic/query-basic.view.spec.js @@ -0,0 +1,488 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import { constructFilterFromBasicFilter, translateFilterToBasicMap, } from './query-basic.view'; +import { FilterBuilderClass, FilterClass, } from '../filter-builder/filter.structure'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +// function to remove any key with id from an arbitrarily nested object +function removeId(obj) { + if (obj && typeof obj === 'object') { + Object.keys(obj).forEach(function (key) { + if (key === 'id') { + delete obj[key]; + } + else { + removeId(obj[key]); + } + }); + } + return obj; +} +function removeCustomClasses(obj) { + return JSON.parse(JSON.stringify(obj)); +} +describe('verify going back and forth from filter to state in query basic is not lossy or "wrong"', function () { + it('handles just keyword ', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap = { + anyText: { + type: 'STRING', + id: 'anyText', + multivalued: false, + isInjected: false, + }, + }; + } + var startingFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + property: 'anyText', + value: { + text: 't', + cql: "(anyText ILIKE 't')", + error: false, + }, + negated: false, + }), + ], + negated: false, + }); + expect(removeCustomClasses(removeId(constructFilterFromBasicFilter({ + basicFilter: translateFilterToBasicMap(startingFilter).propertyValueMap, + })))).to.deep.equal(removeCustomClasses(removeId(startingFilter))); + }); + it('handles just time ', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap = { + anyText: { + type: 'STRING', + id: 'anyText', + multivalued: false, + isInjected: false, + }, + created: { + type: 'DATE', + id: 'created', + multivalued: false, + isInjected: false, + }, + effective: { + type: 'DATE', + id: 'effective', + multivalued: false, + isInjected: false, + }, + modified: { + type: 'DATE', + id: 'modified', + multivalued: false, + isInjected: false, + }, + 'metacard.created': { + type: 'DATE', + id: 'metacard.created', + multivalued: false, + isInjected: false, + }, + 'metacard.modified': { + type: 'DATE', + id: 'metacard.modified', + multivalued: false, + isInjected: false, + }, + }; + } + var startingFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + property: 'anyText', + value: { + text: 't', + cql: "(anyText ILIKE 't')", + error: false, + }, + negated: false, + }), + new FilterBuilderClass({ + type: 'OR', + filters: [ + new FilterClass({ + type: 'BEFORE', + property: 'created', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'effective', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'modified', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'metacard.created', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'metacard.modified', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + ], + negated: false, + }), + ], + negated: false, + }); + expect(removeCustomClasses(removeId(constructFilterFromBasicFilter({ + basicFilter: translateFilterToBasicMap(startingFilter).propertyValueMap, + })))).to.deep.equal(removeCustomClasses(removeId(startingFilter))); + }); + it('handles just location ', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap = { + anyText: { + type: 'STRING', + id: 'anyText', + multivalued: false, + isInjected: false, + }, + anyGeo: { + type: 'LOCATION', + id: 'anyGeo', + multivalued: false, + isInjected: false, + }, + }; + } + var startingFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + property: 'anyText', + value: { + text: 't', + cql: "(anyText ILIKE 't')", + error: false, + }, + negated: false, + id: '0.04416459837101705', + }), + new FilterClass({ + type: 'GEOMETRY', + property: 'anyGeo', + value: { + // @ts-ignore + locationId: 1713480576078, + color: '#8E79DD', + drawing: false, + dmsNorthDirection: 'N', + dmsSouthDirection: 'N', + dmsEastDirection: 'E', + dmsWestDirection: 'E', + radiusUnits: 'meters', + radius: 955.1713897900735, + locationType: 'dd', + prevLocationType: 'dd', + lat: 44.352567, + lon: -108.13405, + dmsLat: '44°21\'09.241"', + dmsLon: '108°08\'02.58"', + dmsLatDirection: 'N', + dmsLonDirection: 'W', + usng: '12T YQ 28412 15028', + lineWidth: '', + lineUnits: 'meters', + polygonBufferWidth: '', + polygonBufferUnits: 'meters', + hasKeyword: false, + utmUpsUpperLeftHemisphere: 'Northern', + utmUpsUpperLeftZone: 1, + utmUpsLowerRightHemisphere: 'Northern', + utmUpsLowerRightZone: 1, + utmUpsEasting: 728412.2560937542, + utmUpsNorthing: 4915028.120213763, + utmUpsZone: 12, + utmUpsHemisphere: 'Northern', + mode: 'circle', + type: 'POINTRADIUS', + }, + negated: false, + }), + ], + negated: false, + }); + expect(removeCustomClasses(removeId(constructFilterFromBasicFilter({ + basicFilter: translateFilterToBasicMap(startingFilter).propertyValueMap, + })))).to.deep.equal(removeCustomClasses(removeId(startingFilter))); + }); + it('handles just types but when blank ', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap = { + anyText: { + type: 'STRING', + id: 'anyText', + multivalued: false, + isInjected: false, + }, + 'reserved.basic-datatype': { + type: 'STRING', + id: 'reserved.basic-datatype', + multivalued: false, + isInjected: false, + }, + }; + } + var startingFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + property: 'anyText', + value: { + text: 't', + cql: "(anyText ILIKE 't')", + error: false, + }, + negated: false, + }), + new FilterClass({ + type: 'ILIKE', + property: 'reserved.basic-datatype', + value: [], + negated: false, + }), + ], + negated: false, + }); + expect(removeCustomClasses(removeId(constructFilterFromBasicFilter({ + basicFilter: translateFilterToBasicMap(startingFilter).propertyValueMap, + })))).to.deep.equal(removeCustomClasses(removeId(startingFilter))); + }); + it('handles just types when types are filled out ', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap = { + anyText: { + type: 'STRING', + id: 'anyText', + multivalued: false, + isInjected: false, + }, + 'reserved.basic-datatype': { + type: 'STRING', + id: 'reserved.basic-datatype', + multivalued: false, + isInjected: false, + }, + }; + } + var startingFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + property: 'anyText', + value: { + text: 't', + cql: "(anyText ILIKE 't')", + error: false, + }, + negated: false, + }), + new FilterClass({ + type: 'ILIKE', + property: 'reserved.basic-datatype', + value: ['Equipment'], + negated: false, + }), + ], + negated: false, + }); + expect(removeCustomClasses(removeId(constructFilterFromBasicFilter({ + basicFilter: translateFilterToBasicMap(startingFilter).propertyValueMap, + })))).to.deep.equal(removeCustomClasses(removeId(startingFilter))); + }); + it('handles just types when everything is filled out ', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap = { + anyText: { + type: 'STRING', + id: 'anyText', + multivalued: false, + isInjected: false, + }, + anyGeo: { + type: 'LOCATION', + id: 'anyGeo', + multivalued: false, + isInjected: false, + }, + created: { + type: 'DATE', + id: 'created', + multivalued: false, + isInjected: false, + }, + effective: { + type: 'DATE', + id: 'effective', + multivalued: false, + isInjected: false, + }, + modified: { + type: 'DATE', + id: 'modified', + multivalued: false, + isInjected: false, + }, + 'metacard.created': { + type: 'DATE', + id: 'metacard.created', + multivalued: false, + isInjected: false, + }, + 'metacard.modified': { + type: 'DATE', + id: 'metacard.modified', + multivalued: false, + isInjected: false, + }, + 'reserved.basic-datatype': { + type: 'STRING', + id: 'reserved.basic-datatype', + multivalued: false, + isInjected: false, + }, + }; + } + var startingFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + property: 'anyText', + value: { + text: 't', + cql: "(anyText ILIKE 't')", + error: false, + }, + negated: false, + }), + new FilterBuilderClass({ + type: 'OR', + filters: [ + new FilterClass({ + type: 'BEFORE', + property: 'created', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'effective', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'modified', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'metacard.created', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + new FilterClass({ + type: 'BEFORE', + property: 'metacard.modified', + value: '2024-04-18T22:39:05.946Z', + negated: false, + }), + ], + negated: false, + }), + new FilterClass({ + type: 'GEOMETRY', + property: 'anyGeo', + value: { + // @ts-ignore + locationId: 1713480576078, + color: '#8E79DD', + drawing: false, + dmsNorthDirection: 'N', + dmsSouthDirection: 'N', + dmsEastDirection: 'E', + dmsWestDirection: 'E', + radiusUnits: 'meters', + radius: 955.1713897900735, + locationType: 'dd', + prevLocationType: 'dd', + lat: 44.352567, + lon: -108.13405, + dmsLat: '44°21\'09.241"', + dmsLon: '108°08\'02.58"', + dmsLatDirection: 'N', + dmsLonDirection: 'W', + usng: '12T YQ 28412 15028', + lineWidth: '', + lineUnits: 'meters', + polygonBufferWidth: '', + polygonBufferUnits: 'meters', + hasKeyword: false, + utmUpsUpperLeftHemisphere: 'Northern', + utmUpsUpperLeftZone: 1, + utmUpsLowerRightHemisphere: 'Northern', + utmUpsLowerRightZone: 1, + utmUpsEasting: 728412.2560937542, + utmUpsNorthing: 4915028.120213763, + utmUpsZone: 12, + utmUpsHemisphere: 'Northern', + mode: 'circle', + type: 'POINTRADIUS', + }, + negated: false, + }), + new FilterClass({ + type: 'ILIKE', + property: 'reserved.basic-datatype', + value: ['Equipment'], + negated: false, + }), + ], + negated: false, + }); + var result = removeCustomClasses(removeId(constructFilterFromBasicFilter({ + basicFilter: translateFilterToBasicMap(startingFilter).propertyValueMap, + }))); + expect(result).to.deep.equal(removeCustomClasses(removeId(startingFilter))); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktYmFzaWMudmlldy5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9xdWVyeS1iYXNpYy9xdWVyeS1iYXNpYy52aWV3LnNwZWMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzdCLE9BQU8sRUFDTCw4QkFBOEIsRUFDOUIseUJBQXlCLEdBQzFCLE1BQU0sb0JBQW9CLENBQUE7QUFDM0IsT0FBTyxFQUNMLGtCQUFrQixFQUNsQixXQUFXLEdBQ1osTUFBTSxvQ0FBb0MsQ0FBQTtBQUMzQyxPQUFPLEVBQUUsZ0JBQ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LFxuICAgICAgICAgIHByb3BlcnR5OiAnYW55VGV4dCcsXG4gICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgIHRleHQ6ICd0JyxcbiAgICAgICAgICAgIGNxbDogXCIoYW55VGV4dCBJTElLRSAndCcpXCIsXG4gICAgICAgICAgICBlcnJvcjogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgfSksXG4gICAgICAgIG5ldyBGaWx0ZXJCdWlsZGVyQ2xhc3Moe1xuICAgICAgICAgIHR5cGU6ICdPUicsXG4gICAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgdHlwZTogJ0JFRk9SRScsXG4gICAgICAgICAgICAgIHByb3BlcnR5OiAnY3JlYXRlZCcsXG4gICAgICAgICAgICAgIHZhbHVlOiAnMjAyNC0wNC0xOFQyMjozOTowNS45NDZaJyxcbiAgICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgIHR5cGU6ICdCRUZPUkUnLFxuICAgICAgICAgICAgICBwcm9wZXJ0eTogJ2VmZmVjdGl2ZScsXG4gICAgICAgICAgICAgIHZhbHVlOiAnMjAyNC0wNC0xOFQyMjozOTowNS45NDZaJyxcbiAgICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgIHR5cGU6ICdCRUZPUkUnLFxuICAgICAgICAgICAgICBwcm9wZXJ0eTogJ21vZGlmaWVkJyxcbiAgICAgICAgICAgICAgdmFsdWU6ICcyMDI0LTA0LTE4VDIyOjM5OjA1Ljk0NlonLFxuICAgICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbi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uMDQ0MTY0NTk4MzcxMDE3MDUnLFxuICAgICAgICB9KSxcbiAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgbG9jYXRpb25JZDogMTcxMzQ4MDU3NjA3OCxcbiAgICAgICAgICAgIGNvbG9yOiAnIzhFNzlERCcsXG4gICAgICAgICAgICBkcmF3aW5nOiBmYWxzZSxcbiAgICAgICAgICAgIGRtc05vcnRoRGlyZWN0aW9uOiAnTicsXG4gICAgICAgICAgICBkbXNTb3V0aERpcmVjdGlvbjogJ04nLFxuICAgICAgICAgICAgZG1zRWFzdERpcmVjdGlvbjogJ0UnLFxuICAgICAgICAgICAgZG1zV2VzdERpcmVjdGlvbjogJ0UnLFxuICAgICAgICAgICAgcmFkaXVzVW5pdHM6ICdtZXRlcnMnLFxuICAgICAgICAgICAgcmFkaXVzOiA5NTUuMTcxMzg5NzkwMDczNSxcbiAgICAgICAgICAgIGxvY2F0aW9uVHlwZTogJ2RkJyxcbiAgICAgICAgICAgIHByZXZMb2NhdGlvblR5cGU6ICdkZCcsXG4gICAgICAgICAgICBsYXQ6IDQ0LjM1MjU2NyxcbiAgICAgICAgICAgIGxvbjogLTEwOC4xMzQwNSxcbiAgICAgICAgICAgIGRtc0xhdDogJzQ0wrAyMVxcJzA5LjI0MVwiJyxcbiAgICAgICAgICAgIGRtc0xvbjogJzEwOMKwMDhcXCcwMi41OFwiJyxcbiAgICAgICAgICAgIGRtc0xhdERpcmVjdGlvbjogJ04nLFxuICAgICAgICAgICAgZG1zTG9uRGlyZWN0aW9uOiAnVycsXG4gICAgICAgICAgICB1c25nOiAnMTJUIFlRIDI4NDEyIDE1MDI4JyxcbiAgICAgICAgICAgIGxpbmVXaWR0aDogJycsXG4gICAgICAg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LFxuICAgICAgICAgIGlkOiAnYW55R2VvJyxcbiAgICAgICAgICBtdWx0aXZhbHVlZDogZmFsc2UsXG4gICAgICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgIGNyZWF0ZWQ6IHtcbiAgICAgICAgICB0eXBlOiAnREFURScsXG4gICAgICAgICAgaWQ6ICdjcmVhdGVkJyxcbiAgICAgICAgICBtdWx0aXZhbHVlZDogZmFsc2UsXG4gICAgICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgIGVmZmVjdGl2ZToge1xuICAgICAgICAgIHR5cGU6ICdEQVRFJyxcbiAgICAgICAgICBpZDogJ2VmZmVjdGl2ZScsXG4gICAgICAgICAgbXVsdGl2YWx1ZWQ6IGZhbHNlLFxuICAgICAgICAgIGlzSW5qZWN0ZWQ6IGZhbHNlLFxuICAgICAgICB9LFxuICAgICAgICBtb2RpZmllZDoge1xuICAgICAgICAgIHR5cGU6ICdEQVRFJyxcbiAgICAgICAgICBpZDogJ21vZGlmaWVkJyxcbiAgICAgICAgICBtdWx0aXZhbHVlZDogZmFsc2UsXG4gICAgICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgICdtZXRhY2FyZC5jcmVhdGVkJzoge1xuICAgICAgICAgIHR5cGU6ICdEQVRFJyxcbiAgICAgICAgICBpZDogJ21ldGFjYXJkLmNyZWF0ZWQnLFxuICAgICAgICAgIG11bHRpdmFsdWVkOiBmYWxzZSxcbiAgICAgICAgICBpc0luamVjdGVkOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAgJ21ldGFjYXJkLm1vZGlmaWVkJzoge1xuICAgICAgICAgIHR5cGU6ICdEQVRFJyxcbiAgICAgICAgICBpZDogJ21ldGFjYXJkLm1vZGlmaWVkJyxcbiAgICAgICAgICBtdWx0aXZhbHVlZDogZmFsc2UsXG4gICAgICAgICAgaXNJbmplY3RlZDogZmF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pLFxuICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgdHlwZTogJ0JFRk9SRScsXG4gICAgICAgICAgICAgIHByb3BlcnR5OiAnZWZmZWN0aXZlJyxcbiAgICAgICAgICAgICAgdmFsdWU6ICcyMDI0LTA0LTE4VDIyOjM5OjA1Ljk0NlonLFxuICAgICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgdHlwZTogJ0JFRk9SRScsXG4gICAgICAgICAgICAgIHByb3BlcnR5OiAnbW9kaWZpZWQnLFxuICAgICAgICAgICAgICB2YWx1ZTogJzIwMjQtMDQtMThUMjI6Mzk6MDUuOTQ2WicsXG4gICAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgICB0eXBlOiAnQkVGT1JFJyxcbiAgICAgICAgICAgICAgcHJvcGVydHk6ICdtZXRhY2FyZC5jcmVhdGVkJyxcbiAgICAgICAgICAgICAgdmFsdWU6ICcyMDI0LTA0LTE4VDIyOjM5OjA1Ljk0NlonLFxuICAgICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgdHlwZTogJ0JFRk9SRScsXG4gICAgICAgICAgICAgIHByb3BlcnR5OiAnbWV0YWNhcmQubW9kaWZpZWQnLFxuICAgICAgICAgICAgICB2YWx1ZTogJzIwMjQtMDQtMThUMjI6Mzk6MDUuOTQ2WicsXG4gICAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgXSxcbiAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgfSksXG4gICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgdHlwZTogJ0dFT01FVFJZJyxcbiAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgIGxvY2F0aW9uSWQ6IDE3MTM0ODA1NzYwNzgsXG4gICAgICAgICAgICBjb2xvcjogJyM4RTc5REQnLFxuICAgICAgICAgICAgZHJhd2luZzogZmFsc2UsXG4gICAgICAgICAgICBkbXNOb3J0aERpcmVjdGlvbjogJ04nLFxuICAgICAgICAgICAgZG1zU291dGhEaXJlY3Rpb246ICdOJyxcbiAgICAgICAgICAgIGRtc0Vhc3REaXJlY3Rpb246ICdFJyxcbiAgICAgICAgICAgIGRtc1dlc3REaXJlY3Rpb246ICdFJyxcbiAgICAgICAgICAgIHJhZGl1c1VuaXRzOiAnbWV0ZXJzJyxcbiAgICAgICAgICAgIHJhZGl1czogOTU1LjE3MTM4OTc5MDA3MzUsXG4gICAgICAgICAgICBsb2NhdGlvblR5cGU6ICdkZCcsXG4gICAgICAgICAgICBwcmV2TG9jYXRpb25UeXBlOiAnZGQnLFxuICAgICAgICAgICAgbGF0OiA0NC4zNTI1NjcsXG4gICAgICAgICAgICBsb246IC0xMDguMTM0MDUsXG4gICAgICAgICAgICBkbXNMYXQ6ICc0NMKwMjFcXCcwOS4yNDFcIicsXG4gICAgICAgICAgICBkbXNMb246ICcxMDjCsDA4XFwnMDIuNThcIicsXG4gICAgICAgICAgICBkbXNMYXREaXJlY3Rpb246ICdOJyxcbiAgICAgICAgICAgIGRtc0xvbkRpcmVjdGlvbjogJ1cnLFxuICAgICAgICAgICAgdXNuZzogJzEyVCBZUSAyODQxMiAxNTAyOCcsXG4gICAgICAgICAgICBsaW5lV2lkdGg6ICcnLFxuICAgICAgICAgICAgbGluZVVuaXRzOiAnbWV0ZXJzJyxcbiA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cyhcbiAgICAgIHJlbW92ZUlkKFxuICAgICAgICBjb25zdHJ1Y3RGaWx0ZXJGcm9tQmFzaWNGaWx0ZXIoe1xuICAgICAgICAgIGJhc2ljRmlsdGVyOlxuICAgICAgICAgICAgdHJhbnNsYXRlRmlsdGVyVG9CYXNpY01hcChzdGFydGluZ0ZpbHRlcikucHJvcGVydHlWYWx1ZU1hcCxcbiAgICAgICAgfSlcbiAgICAgIClcbiAgICApXG5cbiAgICBleHBlY3QocmVzdWx0KS50by5kZWVwLmVxdWFsKHJlbW92ZUN1c3RvbUNsYXNzZXMocmVtb3ZlSWQoc3RhcnRpbmdGaWx0ZXIpKSlcbiAgfSlcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/query-settings/phonetics.d.ts b/src/main/webapp/component/query-settings/phonetics.d.ts new file mode 100644 index 00000000000..8b95ad346f2 --- /dev/null +++ b/src/main/webapp/component/query-settings/phonetics.d.ts @@ -0,0 +1,7 @@ +/// +import { QueryType } from '../../js/model/Query'; +type Props = { + model: QueryType; +}; +declare const _default: ({ model }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/query-settings/phonetics.js b/src/main/webapp/component/query-settings/phonetics.js new file mode 100644 index 00000000000..6083d6c65c3 --- /dev/null +++ b/src/main/webapp/component/query-settings/phonetics.js @@ -0,0 +1,21 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Checkbox from '@mui/material/Checkbox'; +var Phonetics = function (_a) { + var model = _a.model; + var _b = __read(React.useState(Boolean(model.get('phonetics'))), 2), phonetics = _b[0], setPhonetics = _b[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(model, 'change:phonetics', function () { + setPhonetics(model.get('phonetics')); + }); + }, []); + return (React.createElement(FormControlLabel, { labelPlacement: "start", control: React.createElement(Checkbox, { color: "default", checked: phonetics, onChange: function (e) { + model.set('phonetics', e.target.checked); + } }), label: "Similar word matching" })); +}; +export default hot(module)(Phonetics); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGhvbmV0aWNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9xdWVyeS1zZXR0aW5ncy9waG9uZXRpY3MudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdDQUF3QyxDQUFBO0FBQ3BFLE9BQU8sZ0JBQWdCLE1BQU0sZ0NBQWdDLENBQUE7QUFDN0QsT0FBTyxRQUFRLE1BQU0sd0JBQXdCLENBQUE7QUFPN0MsSUFBTSxTQUFTLEdBQUcsVUFBQyxFQUFnQjtRQUFkLEtBQUssV0FBQTtJQUNsQixJQUFBLEtBQUEsT0FBNEIsS0FBSyxDQUFDLFFBQVEsQ0FDOUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FDaEMsSUFBQSxFQUZNLFNBQVMsUUFBQSxFQUFFLFlBQVksUUFFN0IsQ0FBQTtJQUNPLElBQUEsUUFBUSxHQUFLLFdBQVcsRUFBRSxTQUFsQixDQUFrQjtJQUNsQyxLQUFLLENBQUMsU0FBUyxDQUFDO1FBQ2QsUUFBUSxDQUFDLEtBQUssRUFBRSxrQkFBa0IsRUFBRTtZQUNsQyxZQUFZLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFBO1FBQ3RDLENBQUMsQ0FBQyxDQUFBO0lBQ0osQ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FjdC51c2VTdGF0ZShcbiAgICBCb29sZWFuKG1vZGVsLmdldCgncGhvbmV0aWNzJykpXG4gIClcbiAgY29uc3QgeyBsaXN0ZW5UbyB9ID0gdXNlQmFja2JvbmUoKVxuICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xuICAgIGxpc3RlblRvKG1vZGVsLCAnY2hhbmdlOnBob25ldGljcycsICgpID0+IHtcbiAgICAgIHNldFBob25ldGljcyhtb2RlbC5nZXQoJ3Bob25ldGljcycpKVxuICAgIH0pXG4gIH0sIFtdKVxuICByZXR1cm4gKFxuICAgIDxGb3JtQ29udHJvbExhYmVsXG4gICAgICBsYWJlbFBsYWNlbWVudD1cInN0YXJ0XCJcbiAgICAgIGNvbnRyb2w9e1xuICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICBjb2xvcj1cImRlZmF1bHRcIlxuICAgICAgICAgIGNoZWNrZWQ9e3Bob25ldGljc31cbiAgICAgICAgICBvbkNoYW5nZT17KGUpID0+IHtcbiAgICAgICAgICAgIG1vZGVsLnNldCgncGhvbmV0aWNzJywgZS50YXJnZXQuY2hlY2tlZClcbiAgICAgICAgICB9fVxuICAgICAgICAvPlxuICAgICAgfVxuICAgICAgbGFiZWw9XCJTaW1pbGFyIHdvcmQgbWF0Y2hpbmdcIlxuICAgIC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUGhvbmV0aWNzKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/query-settings/query-settings.d.ts b/src/main/webapp/component/query-settings/query-settings.d.ts new file mode 100644 index 00000000000..5ae14243a38 --- /dev/null +++ b/src/main/webapp/component/query-settings/query-settings.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { QueryType } from '../../js/model/Query'; +type Props = { + model: QueryType; + Extensions?: React.FunctionComponent; +}; +declare const _default: ({ model, Extensions }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/query-settings/query-settings.js b/src/main/webapp/component/query-settings/query-settings.js new file mode 100644 index 00000000000..f54d34a884a --- /dev/null +++ b/src/main/webapp/component/query-settings/query-settings.js @@ -0,0 +1,47 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign } from "tslib"; +import PermanentSearchSort from '../../react-component/query-sort-selection/permanent-search-sort'; +import * as React from 'react'; +import SourceSelector from './source-selector'; +import SourcesInfo from './sources-info'; +import Phonetics from './phonetics'; +import Spellcheck from './spellcheck'; +import { hot } from 'react-hot-loader'; +import { Memo } from '../memo/memo'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +/** + * This is expensive to rerender, so we memo. However, if the inner components aren't listening to the query, + * this will not work. + */ +var QuerySettings = function (_a) { + var model = _a.model, Extensions = _a.Extensions; + var config = useConfiguration().config; + return (React.createElement(Memo, { dependencies: [model] }, + React.createElement("div", null, + Extensions ? React.createElement(Extensions, __assign({}, { model: model })) : null, + (config === null || config === void 0 ? void 0 : config.isSpellcheckEnabled) ? (React.createElement("div", { className: "pb-2" }, + React.createElement(Spellcheck, { model: model }))) : null, + (config === null || config === void 0 ? void 0 : config.isPhoneticsEnabled) ? (React.createElement("div", { className: "pb-2" }, + React.createElement(Phonetics, { model: model }))) : null, + React.createElement("div", { className: "pb-2" }, + React.createElement(PermanentSearchSort, { model: model })), + React.createElement("div", { className: "pb-2" }, + React.createElement(SourceSelector, { search: model })), + React.createElement("div", null, + React.createElement(SourcesInfo, null))))); +}; +export default hot(module)(QuerySettings); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktc2V0dGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3F1ZXJ5LXNldHRpbmdzL3F1ZXJ5LXNldHRpbmdzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJOztBQUVKLE9BQU8sbUJBQW1CLE1BQU0sa0VBQWtFLENBQUE7QUFFbEcsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxjQUFjLE1BQU0sbUJBQW1CLENBQUE7QUFDOUMsT0FBTyxXQUFXLE1BQU0sZ0JBQWdCLENBQUE7QUFDeEMsT0FBTyxTQUFTLE1BQU0sYUFBYSxDQUFBO0FBQ25DLE9BQU8sVUFBVSxNQUFNLGNBQWMsQ0FBQTtBQUNyQyxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUVuQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw0Q0FBNEMsQ0FBQTtBQU83RTs7O0dBR0c7QUFDSCxJQUFNLGFBQWEsR0FBRyxVQUFDLEVBQTRCO1FBQTFCLEtBQUssV0FBQSxFQUFFLFVBQVUsZ0JBQUE7SUFDaEMsSUFBQSxNQUFNLEdBQUssZ0JBQWdCLEVBQUUsT0FBdkI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XY+XG4gICAgICAgIHtFeHRlbnNpb25zID8gPEV4dGVuc2lvbnMgey4uLnsgbW9kZWw6IG1vZGVsIH19IC8+IDogbnVsbH1cbiAgICAgICAge2NvbmZpZz8uaXNTcGVsbGNoZWNrRW5hYmxlZCA/IChcbiAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInBiLTJcIj5cbiAgICAgICAgICAgIDxTcGVsbGNoZWNrIG1vZGVsPXttb2RlbH0gLz5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIHtjb25maWc/LmlzUGhvbmV0aWNzRW5hYmxlZCA/IChcbiAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInBiLTJcIj5cbiAgICAgICAgICAgIDxQaG9uZXRpY3MgbW9kZWw9e21vZGVsfSAvPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApIDogbnVsbH1cbiAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJwYi0yXCI+XG4gICAgICAgICAgPFBlcm1hbmVudFNlYXJjaFNvcnQgbW9kZWw9e21vZGVsfSAvPlxuICAgICAgICA8L2Rpdj5cblxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInBiLTJcIj5cbiAgICAgICAgICA8U291cmNlU2VsZWN0b3Igc2VhcmNoPXttb2RlbH0gLz5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXY+XG4gICAgICAgICAgPFNvdXJjZXNJbmZvIC8+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9NZW1vPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFF1ZXJ5U2V0dGluZ3MpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/query-settings/source-selector.d.ts b/src/main/webapp/component/query-settings/source-selector.d.ts new file mode 100644 index 00000000000..d587ec1273d --- /dev/null +++ b/src/main/webapp/component/query-settings/source-selector.d.ts @@ -0,0 +1,7 @@ +/// +type Props = { + search: any; +}; +export declare const getHumanReadableSourceName: (sourceId: string) => string | JSX.Element; +declare const _default: ({ search }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/query-settings/source-selector.js b/src/main/webapp/component/query-settings/source-selector.js new file mode 100644 index 00000000000..7e9c2decf69 --- /dev/null +++ b/src/main/webapp/component/query-settings/source-selector.js @@ -0,0 +1,263 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import Typography from '@mui/material/Typography'; +import Swath from '../swath/swath'; +import Grid from '@mui/material/Grid'; +import HomeIcon from '@mui/icons-material/Home'; +import CloudIcon from '@mui/icons-material/Cloud'; +import WarningIcon from '@mui/icons-material/Warning'; +import CheckBoxIcon from '@mui/icons-material/CheckBox'; +import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; +import Chip from '@mui/material/Chip'; +import _ from 'lodash'; +import { useSources } from '../../js/model/Startup/sources.hooks'; +export var getHumanReadableSourceName = function (sourceId) { + if (sourceId === 'all') { + return 'All'; + } + else if (sourceId === 'remote') { + return (React.createElement("div", { className: "flex flex-row items-center" }, + React.createElement("div", null, "Slow (offsite)"), + ' ', + React.createElement("div", null, + React.createElement(CloudIcon, null)))); + } + else if (sourceId === 'local') { + return (React.createElement("div", { className: "flex flex-row items-center" }, + React.createElement("div", null, "Fast (onsite)"), + ' ', + React.createElement("div", null, + React.createElement(HomeIcon, null)))); + } + return sourceId; +}; +var getSourcesFromSearch = function (_a) { + var search = _a.search; + return search.get('sources') || []; +}; +var shouldBeSelected = function (_a) { + var srcId = _a.srcId, sources = _a.sources, isHarvested = _a.isHarvested; + if (sources.includes('all')) { + return true; + } + else if (sources.includes('local') && isHarvested(srcId)) { + return true; + } + else if (sources.includes('remote') && + !isHarvested(srcId) && + srcId !== 'all' && + srcId !== 'local') { + return true; + } + if (sources.includes(srcId)) { + return true; + } + return false; +}; +/** + * So we used to use two separate search properties to track sources, federation and sources. + * If federation was enterprise, we searched everything. If not, we looked to sources. I also think local was a thing. + * + * Instead, we're going to swap to storing only one property, sources (an array of strings). + * If sources includes, 'all' then that's enterprise. If it includes 'local', then that means everything local. + * If it includes 'remote', that that means everything remote. All other values are singular selections of a source. + */ +var SourceSelector = function (_a) { + var search = _a.search; + var availableSources = useSources().sources; + var _b = __read(React.useState(getSourcesFromSearch({ search: search })), 2), sources = _b[0], setSources = _b[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(search, 'change:sources', function () { + setSources(getSourcesFromSearch({ search: search })); + }); + }, []); + React.useEffect(function () { + search.set('sources', sources); + }, [sources]); + var availableLocalSources = availableSources.filter(function (availableSource) { + return availableSource.harvested; + }); + var availableRemoteSources = availableSources.filter(function (availableSource) { + return !availableSource.harvested; + }); + var isHarvested = function (source) { + return availableLocalSources.some(function (availableSource) { + return availableSource.id === source; + }); + }; + return (React.createElement("div", null, + React.createElement(Typography, { className: "pb-2" }, "Data Sources"), + React.createElement(TextField, { "data-id": "data-sources-select", fullWidth: true, variant: "outlined", select: true, SelectProps: { + multiple: true, + renderValue: function (selected) { + return (React.createElement(Grid, { container: true, alignItems: "center", direction: "row" }, selected + .sort(function (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); // case insensitive sort + }) + .sort(function (a) { + if (a === 'local' || a === 'remote') { + return -1; // move these subcategories upwards to front + } + return 0; + }) + .map(function (src) { + return (React.createElement(Grid, { item: true, key: src, className: "mr-2" }, + React.createElement(Chip, { variant: "outlined", color: "default", className: "cursor-pointer", label: getHumanReadableSourceName(src) }))); + }))); + }, + MenuProps: {}, + }, value: sources, onChange: function (e) { + // first of all I'm sorry, second of all, order matters in these cases. Should really just make a state machine out of this. + // https://xstate.js.org/docs/ perhaps? + var newSources = e.target.value; + // these first three if only apply if the value didn't previous exist (user is going from not all to 'all', etc.) + var newLocalSources = newSources + .filter(function (src) { return !['all', 'remote', 'local'].includes(src); }) + .filter(function (src) { return isHarvested(src); }); + var newRemoteSources = newSources + .filter(function (src) { return !['all', 'remote', 'local'].includes(src); }) + .filter(function (src) { return !isHarvested(src); }); + if ((newSources.includes('all') && !sources.includes('all')) || + (newSources.includes('local') && + newSources.includes('remote') && + (!sources.includes('remote') || !sources.includes('local')) && + !sources.includes('all'))) { + setSources(['all']); + } + else if (sources.includes('all') && newSources.includes('local')) { + setSources(['remote']); + } + else if (sources.includes('all') && newSources.includes('remote')) { + setSources(['local']); + } + else if (sources.includes('all') && newLocalSources.length > 0) { + setSources(_.difference(availableLocalSources.map(function (src) { return src.id; }).concat(['remote']), newLocalSources)); + } + else if (sources.includes('all') && newRemoteSources.length > 0) { + setSources(_.difference(availableRemoteSources.map(function (src) { return src.id; }).concat(['local']), newRemoteSources)); + } + else if (sources.includes('local') && newLocalSources.length > 0) { + setSources(_.difference(sources + .filter(function (src) { return src !== 'local'; }) + .concat(availableLocalSources.map(function (src) { return src.id; })), newLocalSources)); + } + else if (sources.includes('remote') && + newRemoteSources.length > 0) { + setSources(_.difference(sources + .filter(function (src) { return src !== 'remote'; }) + .concat(availableRemoteSources.map(function (src) { return src.id; })), newRemoteSources)); + } + else if (newSources.includes('local') && + !sources.includes('local')) { + setSources(newSources.filter(function (val) { return !isHarvested(val) && val !== 'all'; })); + } + else if (newSources.includes('remote') && + !sources.includes('remote')) { + setSources(['remote'].concat(newSources.filter(function (val) { return isHarvested(val) && val !== 'all'; }))); + } + else if (newSources.length === + availableLocalSources.length + availableRemoteSources.length || + (newSources.includes('local') && + newSources.length === availableRemoteSources.length + 1) || + (newSources.includes('remote') && + newSources.length === availableLocalSources.length + 1)) { + setSources(['all']); + } + else if (availableLocalSources.length > 0 && + _.difference(availableLocalSources.map(function (src) { return src.id; }), newSources.filter(function (src) { return isHarvested(src); })).length === 0) { + setSources(['local'].concat(newSources.filter(function (src) { return !isHarvested(src); }))); + } + else if (availableRemoteSources.length > 0 && + _.difference(availableRemoteSources.map(function (src) { return src.id; }), newSources.filter(function (src) { return !isHarvested(src); })).length === 0) { + setSources(['remote'].concat(newSources.filter(function (src) { return isHarvested(src); }))); + } + else { + // in these case, we now have to determine if we should remove all, remote, or local based on what is in newSources + // no matter what all should be removed + newSources = newSources.filter(function (src) { return src !== 'all'; }); + if (newSources.find(function (src) { return isHarvested(src); })) { + newSources = newSources.filter(function (src) { return src !== 'local'; }); + } + if (newSources.find(function (src) { return src !== 'remote' && !isHarvested(src); })) { + newSources = newSources.filter(function (src) { return src !== 'remote'; }); + } + setSources(newSources); + } + }, size: "small" }, + React.createElement(MenuItem, { "data-id": "all-option", value: "all" }, + React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap" }, + React.createElement(Grid, { container: true, direction: "row", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "pr-2" }, shouldBeSelected({ srcId: 'all', sources: sources, isHarvested: isHarvested }) ? (React.createElement(CheckBoxIcon, null)) : (React.createElement(CheckBoxOutlineBlankIcon, null))), + React.createElement(Grid, { item: true }, "All")))), + availableLocalSources.length > 0 ? (React.createElement(MenuItem, { "data-id": "onsite-option", value: "local" }, + React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pl-3" }, + React.createElement(Grid, { item: true, className: "pr-2" }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { container: true, direction: "row", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "pr-2" }, shouldBeSelected({ + srcId: 'local', + sources: sources, + isHarvested: isHarvested, + }) ? (React.createElement(CheckBoxIcon, null)) : (React.createElement(CheckBoxOutlineBlankIcon, null))), + React.createElement(Grid, { item: true }, "Fast (onsite)"), + React.createElement(Grid, { item: true, className: "pl-2" }, + React.createElement(HomeIcon, null)))))) : null, + availableLocalSources.length > 0 + ? availableLocalSources.map(function (source) { + return (React.createElement(MenuItem, { "data-id": "source-".concat(source.id, "-option"), key: source.id, value: source.id }, + React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pl-6" }, + React.createElement(Grid, { item: true, className: "pl-3 pr-3" }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { container: true, direction: "row", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "pr-2" }, shouldBeSelected({ + srcId: source.id, + sources: sources, + isHarvested: isHarvested, + }) ? (React.createElement(CheckBoxIcon, null)) : (React.createElement(CheckBoxOutlineBlankIcon, null))), + React.createElement(Grid, { item: true }, + React.createElement("div", { className: source.available + ? 'Mui-text-text-primary' + : 'Mui-text-warning' }, source.id)), + React.createElement(Grid, { item: true, className: "pl-2" }, source.available ? null : React.createElement(WarningIcon, null)))))); + }) + : null, + availableRemoteSources.length > -1 ? (React.createElement(MenuItem, { "data-id": "offsite-option", value: "remote" }, + React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pl-3" }, + React.createElement(Grid, { item: true, className: "pr-2" }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { container: true, direction: "row", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "pr-2" }, shouldBeSelected({ + srcId: 'remote', + sources: sources, + isHarvested: isHarvested, + }) ? (React.createElement(CheckBoxIcon, null)) : (React.createElement(CheckBoxOutlineBlankIcon, null))), + React.createElement(Grid, { item: true }, "Slow (offsite)"), + React.createElement(Grid, { item: true, className: "pl-2" }, + React.createElement(CloudIcon, null)))))) : null, + availableRemoteSources.length > 0 + ? availableRemoteSources.map(function (source) { + return (React.createElement(MenuItem, { "data-id": "source-".concat(source.id, "-option"), key: source.id, value: source.id }, + React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pl-6" }, + React.createElement(Grid, { item: true, className: "pl-3 pr-3" }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { container: true, direction: "row", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "pr-2" }, shouldBeSelected({ + srcId: source.id, + sources: sources, + isHarvested: isHarvested, + }) ? (React.createElement(CheckBoxIcon, null)) : (React.createElement(CheckBoxOutlineBlankIcon, null))), + React.createElement(Grid, { item: true }, + React.createElement("div", { className: source.available + ? 'Mui-text-text-primary' + : 'Mui-text-warning' }, source.id)), + React.createElement(Grid, { item: true, className: "pl-2" }, source.available ? null : React.createElement(WarningIcon, null)))))); + }) + : null))); +}; +export default hot(module)(SourceSelector); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlLXNlbGVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9xdWVyeS1zZXR0aW5ncy9zb3VyY2Utc2VsZWN0b3IudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdDQUF3QyxDQUFBO0FBQ3BFLE9BQU8sU0FBUyxNQUFNLHlCQUF5QixDQUFBO0FBQy9DLE9BQU8sUUFBUSxNQUFNLHdCQUF3QixDQUFBO0FBQzdDLE9BQU8sVUFBVSxNQUFNLDBCQUEwQixDQUFBO0FBQ2pELE9BQU8sS0FBSyxNQUFNLGdCQUFnQixDQUFBO0FBQ2xDLE9BQU8sSUFBSSxNQUFNLG9CQUFvQixDQUFBO0FBQ3JDLE9BQU8sUUFBUSxNQUFNLDBCQUEwQixDQUFBO0FBQy9DLE9BQU8sU0FBUyxNQUFNLDJCQUEyQixDQUFBO0FBQ2pELE9BQU8sV0FBVyxNQUFNLDZCQUE2QixDQUFBO0FBQ3JELE9BQU8sWUFBWSxNQUFNLDhCQUE4QixDQUFBO0FBQ3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jdGVkXG4gICAgICAgICAgICAgICAgICAuc29ydCgoYSwgYikgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYS50b0xvd2VyQ2FzZSgpLmxvY2FsZUNvbXBhcmUoYi50b0xvd2VyQ2FzZSgpKSAvLyBjYXNlIGluc2Vuc2l0aXZlIHNvcnRcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAuc29ydCgoYSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoYSA9PT0gJ2xvY2FsJyB8fCBhID09PSAncmVtb3RlJykge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMSAvLyBtb3ZlIHRoZXNlIHN1YmNhdGVnb3JpZXMgdXB3YXJkcyB0byBmcm9udFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAwXG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgLm1hcCgoc3JjKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgPEdyaWQgaXRlbSBrZXk9e3NyY30gY2xhc3NOYW1lPVwibXItMlwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPENoaXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJkZWZhdWx0XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiY3Vyc29yLXBvaW50ZXJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbD17Z2V0SHVtYW5SZWFkYWJsZVNvdXJjZU5hbWUoc3JjKX1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICB9KX1cbi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HNyYykgPT4gIWlzSGFydmVzdGVkKHNyYykpXG5cbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAobmV3U291cmNlcy5pbmNsdWRlcygnYWxsJykgJiYgIXNvdXJjZXMuaW5jbHVkZXMoJ2FsbCcpKSB8fFxuICAgICAgICAgICAgKG5ld1NvdXJjZXMuaW5jbHVkZXMoJ2xvY2FsJykgJiZcbiAgICAgICAgICAgICAgbmV3U291cmNlcy5pbmNsdWRlcygncmVtb3RlJykgJiZcbiAgICAgICAgICAgICAgKCFzb3VyY2VzLmluY2x1ZGVzKCdyZW1vdGUnKSB8fCAhc291cmNlcy5pbmNsdWRlcygnbG9jYWwnKSkgJiZcbiAgICAgICAgICAgICAgIXNvdXJjZXMuaW5jbHVkZXMoJ2FsbCcpKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgc2V0U291cmNlcyhbJ2FsbCddKVxuICAgICAgICAgIH0gZWxzZSBpZiAoc291cmNlcy5pbmNsdWRlcygnYWxsJykgJiYgbmV3U291cmNlcy5pbmNsdWRlcygnbG9jYWwnKSkge1xuICAgICAgICAgICAgc2V0U291cmNlcyhbJ3JlbW90ZSddKVxuICAgICAgICAgIH0gZWxzZSBpZiAoc291cmNlcy5pbmNsdWRlcygnYWxsJykgJiYgbmV3U291cmNlcy5pbmNsdWRlcygncmVtb3RlJykpIHtcbiAgICAgICAgICAgIHNldFNvdXJjZXMoWydsb2NhbCddKVxuICAgICAgICAgIH0gZWxzZSBpZiAoc291cmNlcy5pbmNsdWRlcygnYWxsJykgJiYgbmV3TG9jYWxTb3VyY2VzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHNldFNvdXJjZXMoXG4gICAgICAgICAgICAgIF8uZGlmZmVyZW5jZShcbiAgICAgICAgICAgICAgICBhdmFpbGFibGVMb2NhbFNvdXJjZXMubWFwKChzcmMpID0+IHNyYy5pZCkuY29uY2F0KFsncmVtb3RlJ10pLFxuICAgICAgICAgICAgICAgIG5ld0xvY2FsU291cmNlc1xuICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VzLmluY2x1ZGVzKCdhbGwnKSAmJiBuZXdSZW1vdGVTb3VyY2VzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHNldFNvdXJjZXMoXG4gICAgICAgICAgICAgIF8uZGlmZmVyZW5jZShcbiAgICAgICAgICAgICAgICBhdmFpbGFibGVSZW1vdGVTb3VyY2VzLm1hcCgoc3JjKSA9PiBzcmMuaWQpLmNvbmNhdChbJ2xvY2FsJ10pLFxuICAgICAgICAgICAgICAgIG5ld1JlbW90ZVNvdXJjZXNcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0gZWxzZSBpZiAoc291cmNlcy5pbmNsdWRlcygnbG9jYWwnKSAmJiBuZXdMb2NhbFNvdXJjZXMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgc2V0U291cmNlcyhcbiAgICAgICAgICAgICAgXy5kaWZmZXJlbmNlKFxuICAgICAgICAgICAgICAgIHNvdXJjZXNcbiAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKHNyYykgPT4gc3JjICE9PSAnbG9jYWwnKVxuICAgICAgICAgICAgICAgICAgLmNvbmNhdChhdmFpbGFibGVMb2NhbFNvdXJjZXMubWFwKChzcmMpID0+IHNyYy5pZCkpLFxuICAgICAgICAgICAgICAgIG5ld0xvY2FsU291cmNlc1xuICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgIHNvdXJjZXMuaW5jbHVkZXMoJ3JlbW90ZScpICYmXG4gICAgICAgICAgICBuZXdSZW1vdGVTb3VyY2VzLmxlbmd0aCA+IDBcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIHNldFNvdXJjZXMoXG4gICAgICAgICAgICAgIF8uZGlmZmVyZW5jZShcbiAgICAgICAgICAgICAgICBzb3VyY2VzXG4gICAgICAgICAgICAgICAgICAuZmlsdGVyKChzcmMpID0+IHNyYyAhPT0gJ3JlbW90ZScpXG4gICAgICAgICAgICAgICAgICAuY29uY2F0KGF2YWlsYWJsZVJlbW90ZVNvdXJjZXMubWFwKChzcmMpID0+IHNyYy5pZCkpLFxuICAgICAgICAgICAgICAgIG5ld1JlbW90ZVNvdXJjZXNcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICBuZXdTb3VyY2VzLmluY2x1ZGVzKCdsb2NhbCcpICYmXG4gICAgICAgICAgICAhc291cmNlcy5pbmNsdWRlcygnbG9jYWwnKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgc2V0U291cmNlcyhcbiAgICAgICAgICAgICAgbmV3U291cmNlcy5maWx0ZXIoKHZhbCkgPT4gIWlzSGFydmVzdGVkKHZhbCkgJiYgdmFsICE9PSAnYWxsJylcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgbmV3U291cmNlcy5pbmNsdWRlcygncmVtb3RlJykgJiZcbiAgICAgICAgICAgICFzb3VyY2VzLmluY2x1ZGVzKCdyZW1vdGUnKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgc2V0U291cmNlcyhcbiAgICAgICAgICAgICAgWydyZW1vdGUnXS5jb25jYXQoXG4gICAgICAgICAgICAgICAgbmV3U291cmNlcy5maWx0ZXIoKHZhbCkgPT4gaXNIYXJ2ZXN0ZWQodmFsKSAmJiB2YWwgIT09ICdhbGwnKVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgIG5ld1NvdXJjZXMubGVuZ3RoID09PVxuICAgICAgICAgICAgICBhdmFpbGFibGVMb2NhbFNvdXJjZXMubGVuZ3RoICsgYXZhaWxhYmxlUmVtb3RlU291cmNlcy5sZW5ndGggfHxcbiAgICAgICAgICAgIChuZXdTb3VyY2VzLmluY2x1ZGVzKCdsb2NhbCcpICYmXG4gICAgICAgICAgICAgIG5ld1NvdXJjZXMubGVuZ3RoID09PSBhdmFpbGFibGVSZW1vdGVTb3VyY2VzLmxlbmd0aCArIDEpIHx8XG4gICAgICAgICAgICAobmV3U291cmNlcy5pbmNsdWRlcygncmVtb3RlJykgJiZcbiAgICAgICAgICAgICAgbmV3U291cmNlcy5sZW5ndGggPT09IGF2YWlsYWJsZUxvY2FsU291cmNlcy5sZW5ndGggKyAxKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgc2V0U291cmNlcyhbJ2FsbCddKVxuICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICBhdmFpbGFibGVMb2NhbFNvdXJjZXMubGVuZ3RoID4gMCAmJlxuICAgICAgICAgICAgXy5kaWZmZXJlbmNlKFxuICAgICAgICAgICAgICBhdmFpbGFibGVMb2NhbFNvdXJjZXMubWFwKChzcmMpID0+IHNyYy5pZCksXG4gICAgICAgICAgICAgIG5ld1NvdXJjZXMuZmlsdGVyKChzcmMpID0+IGlzSGFydmVzdGVkKHNyYykpXG4gICAgICAgICAgICApLmxlbmd0aCA9PT0gMFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgc2V0U291cmNlcyhcbiAgICAgICAgICAgICAgWydsb2NhbCddLmNvbmNhdChuZXdTb3VyY2VzLmZpbHRlcigoc3JjKSA9PiAhaXNIYXJ2ZXN0ZWQoc3JjKSkpXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgIGF2YWlsYWJsZVJlbW90ZVNvdXJjZXMubGVuZ3RoID4gMCAmJlxuICAgICAgICAgICAgXy5kaWZmZXJlbmNlKFxuICAgICAgICAgICAgICBhdmFpbGFibGVSZW1vdGVTb3VyY2VzLm1hcCgoc3JjKSA9PiBzcmMuaWQpLFxuICAgICAgICAgICAgICBuZXdTb3VyY2VzLmZpbHRlcigoc3JjKSA9PiAha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ICAgICAgfVxuICAgICAgICB9fVxuICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgPlxuICAgICAgICA8TWVudUl0ZW0gZGF0YS1pZD1cImFsbC1vcHRpb25cIiB2YWx1ZT1cImFsbFwiPlxuICAgICAgICAgIDxHcmlkIGNvbnRhaW5lciBhbGlnbkl0ZW1zPVwic3RyZXRjaFwiIGRpcmVjdGlvbj1cInJvd1wiIHdyYXA9XCJub3dyYXBcIj5cbiAgICAgICAgICAgIDxHcmlkIGNvbnRhaW5lciBkaXJlY3Rpb249XCJyb3dcIiBhbGlnbkl0ZW1zPVwiY2VudGVyXCI+XG4gICAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwicHItMlwiPlxuICAgICAgICAgICAgICAgIHtzaG91bGRCZVNlbGVjdGVkKHsgc3JjSWQ6ICdhbGwnLCBzb3VyY2VzLCBpc0hhcnZlc3RlZCB9KSA/IChcbiAgICAgICAgICAgICAgICAgIDxDaGVja0JveEljb24gLz5cbiAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgPENoZWNrQm94T3V0bGluZUJsYW5rSWNvbiAvPlxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPEdyaWQgaXRlbT5BbGw8L0dyaWQ+XG4gICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICA8L01lbnVJdGVtPlxuICAgICAgICB7YXZhaWxhYmxlTG9jYWxTb3VyY2VzLmxlbmd0aCA+IDAgPyAoXG4gICAgICAgICAgPE1lbnVJdGVtIGRhdGEtaWQ9XCJvbnNpdGUtb3B0aW9uXCIgdmFsdWU9XCJsb2NhbFwiPlxuICAgICAgICAgICAgPEdyaWRcbiAgICAgICAgICAgICAgY29udGFpbmVyXG4gICAgICAgICAgICAgIGFsaWduSXRlbXM9XCJzdHJldGNoXCJcbiAgICAgICAgICAgICAgZGlyZWN0aW9uPVwicm93XCJcbiAgICAgICAgICAgICAgd3JhcD1cIm5vd3JhcFwiXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cInBsLTNcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInByLTJcIj5cbiAgICAgICAgICAgICAgICA8U3dhdGggY2xhc3NOYW1lPVwidy0xIGgtZnVsbFwiIC8+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPEdyaWQgY29udGFpbmVyIGRpcmVjdGlvbj1cInJvd1wiIGFsaWduSXRlbXM9XCJjZW50ZXJcIj5cbiAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInByLTJcIj5cbiAgICAgICAgICAgICAgICAgIHtzaG91bGRCZVNlbGVjdGVkKHtcbiAgICAgICAgICAgICAgICAgICAgc3JjSWQ6ICdsb2NhbCcsXG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZXMsXG4gICAgICAgICAgICAgICAgICAgIGlzSGFydmVzdGVkLFxuICAgICAgICAgICAgICAgICAgfSkgPyAoXG4gICAgICAgICAgICAgICAgICAgIDxDaGVja0JveEljb24gLz5cbiAgICAgICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgICAgIDxDaGVja0JveE91dGxpbmVCbGFua0ljb24gLz5cbiAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgIDxHcmlkIGl0ZW0+RmFzdCAob25zaXRlKTwvR3JpZD5cbiAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInBsLTJcIj5cbiAgICAgICAgICAgICAgICAgIDxIb21lSWNvbiAvPlxuICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgIDwvTWVudUl0ZW0+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgICB7YXZhaWxhYmxlTG9jYWxTb3VyY2VzLmxlbmd0aCA+IDBcbiAgICAgICAgICA/IGF2YWlsYWJsZUxvY2FsU291cmNlcy5tYXAoKHNvdXJjZTogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPE1lbnVJdGVtXG4gICAgICAgICAgICAgICAgICBkYXRhLWlkPXtgc291cmNlLSR7c291cmNlLmlkfS1vcHRpb25gfVxuICAgICAgICAgICAgICAgICAga2V5PXtzb3VyY2UuaWR9XG4gICAgICAgICAgICAgICAgICB2YWx1ZT17c291cmNlLmlkfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lclxuICAgICAgICAgICAgICAgICAgICBhbGlnbkl0ZW1zPVwic3RyZXRjaFwiXG4gICAgICAgICAgICAgICAgICAgIGRpcmVjdGlvbj1cInJvd1wiXG4gICAgICAgICAgICAgICAgICAgIHdyYXA9XCJub3dyYXBcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJwbC02XCJcbiAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJwbC0zIHByLTNcIj5cbiAgICAgICAgICAgICAgICAgICAgICA8U3dhdGggY2xhc3NOYW1lPVwidy0xIGgtZnVsbFwiIC8+XG4gICAgICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgICAgICAgPEdyaWQgY29udGFpbmVyIGRpcmVjdGlvbj1cInJvd1wiIGFsaWduSXRlbXM9XCJjZW50ZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInByLTJcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtzaG91bGRCZVNlbGVjdGVkKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgc3JjSWQ6IHNvdXJjZS5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaXNIYXJ2ZXN0ZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgPENoZWNrQm94SWNvbiAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgPENoZWNrQm94T3V0bGluZUJsYW5rSWNvbiAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2UuYXZhaWxhYmxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICdNdWktdGV4dC10ZXh0LXByaW1hcnknXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICdNdWktdGV4dC13YXJuaW5nJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtzb3VyY2UuaWR9XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJwbC0yXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICB7c291cmNlLmF2YWlsYWJsZSA/IG51bGwgOiA8V2FybmluZ0ljb24gLz59XG4gICAgICAgICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgPC9NZW51SXRlbT5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICA6IG51bGx9XG4gICAgICAgIHthdmFpbGFibGVSZW1vdGVTb3VyY2VzLmxlbmd0aCA+IC0xID8gKFxuICAgICAgICAgIDxNZW51SXRlbSBkYXRhLWlkPVwib2Zmc2l0ZS1vcHRpb25cIiB2YWx1ZT1cInJlbW90ZVwiPlxuICAgICAgICAgICAgPEdyaWRcbiAgICAgICAgICAgICAgY29udGFpbmVyXG4gICAgICAgICAgICAgIGFsaWduSXRlbXM9XCJzdHJldGNoXCJcbiAgICAgICAgICAgICAgZGlyZWN0aW9uPVwicm93XCJcbiAgICAgICAgICAgICAgd3JhcD1cIm5vd3JhcFwiXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cInBsLTNcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInByLTJcIj5cbiAgICAgICAgICAgICAgICA8U3dhdGggY2xhc3NOYW1lPVwidy0xIGgtZnVsbFwiIC8+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPEdyaWQgY29udGFpbmVyIGRpcmVjdGlvbj1cInJvd1wiIGFsaWduSXRlbXM9XCJjZW50ZXJcIj5cbiAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInByLTJcIj5cbiAgICAgICAgICAgICAgICAgIHtzaG91bGRCZVNlbGVjdGVkKHtcbiAgICAgICAgICAgICAgICAgICAgc3JjSWQ6ICdyZW1vdGUnLFxuICAgICAgICAgICAgICAgICAgICBzb3VyY2VzLFxuICAgICAgICAgICAgICAgICAgICBpc0hhcnZlc3RlZCxcbiAgICAgICAgICAgICAgICAgIH0pID8gKFxuICAgICAgICAgICAgICAgICAgICA8Q2hlY2tCb3hJY29uIC8+XG4gICAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgICA8Q2hlY2tCb3hPdXRsaW5lQmxhbmtJY29uIC8+XG4gICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgICA8R3JpZCBpdGVtPlNsb3cgKG9mZnNpdGUpPC9HcmlkPlxuICAgICAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwicGwtMlwiPlxuICAgICAgICAgICAgICAgICAgPENsb3VkSWNvbiAvPlxuICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgIDwvTWVudUl0ZW0+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgICB7YXZhaWxhYmxlUmVtb3RlU291cmNlcy5sZW5ndGggPiAwXG4gICAgICAgICAgPyBhdmFpbGFibGVSZW1vdGVTb3VyY2VzLm1hcCgoc291cmNlOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8TWVudUl0ZW1cbiAgICAgICAgICAgICAgICAgIGRhdGEtaWQ9e2Bzb3VyY2UtJHtzb3VyY2UuaWR9LW9wdGlvbmB9XG4gICAgICAgICAgICAgICAgICBrZXk9e3NvdXJjZS5pZH1cbiAgICAgICAgICAgICAgICAgIHZhbHVlPXtzb3VyY2UuaWR9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPEdyaWRcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyXG4gICAgICAgICAgICAgICAgICAgIGFsaWduSXRlbXM9XCJzdHJldGNoXCJcbiAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uPVwicm93XCJcbiAgICAgICAgICAgICAgICAgICAgd3JhcD1cIm5vd3JhcFwiXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cInBsLTZcIlxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInBsLTMgcHItM1wiPlxuICAgICAgICAgICAgICAgICAgICAgIDxTd2F0aCBjbGFzc05hbWU9XCJ3LTEgaC1mdWxsXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICAgICAgICA8R3JpZCBjb250YWluZXIgZGlyZWN0aW9uPVwicm93XCIgYWxpZ25JdGVtcz1cImNlbnRlclwiPlxuICAgICAgICAgICAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwicHItMlwiPlxuICAgICAgICAgICAgICAgICAgICAgICAge3Nob3VsZEJlU2VsZWN0ZWQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICBzcmNJZDogc291cmNlLmlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2VzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBpc0hhcnZlc3RlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pID8gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICA8Q2hlY2tCb3hJY29uIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgICAgICAgICA8Q2hlY2tCb3hPdXRsaW5lQmxhbmtJY29uIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgICAgICAgICA8R3JpZCBpdGVtPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZS5hdmFpbGFibGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gJ011aS10ZXh0LXRleHQtcHJpbWFyeSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJ011aS10ZXh0LXdhcm5pbmcnXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAge3NvdXJjZS5pZH1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInBsLTJcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtzb3VyY2UuYXZhaWxhYmxlID8gbnVsbCA6IDxXYXJuaW5nSWNvbiAvPn1cbiAgICAgICAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgICA8L01lbnVJdGVtPlxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIDogbnVsbH1cbiAgICAgIDwvVGV4dEZpZWxkPlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFNvdXJjZVNlbGVjdG9yKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/query-settings/sources-info.d.ts b/src/main/webapp/component/query-settings/sources-info.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/component/query-settings/sources-info.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/query-settings/sources-info.js b/src/main/webapp/component/query-settings/sources-info.js new file mode 100644 index 00000000000..a27fb7eb8c3 --- /dev/null +++ b/src/main/webapp/component/query-settings/sources-info.js @@ -0,0 +1,36 @@ +import Button from '@mui/material/Button'; +import Grid from '@mui/material/Grid'; +import Paper from '@mui/material/Paper'; +import Popover from '@mui/material/Popover'; +import StorageIcon from '@mui/icons-material/Storage'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import ExtensionPoints from '../../extension-points'; +import SourcesPage from '../../react-component/sources/presentation'; +import { Elevations } from '../theme/theme'; +import { useMenuState } from '../menu-state/menu-state'; +var SourcesInfo = function () { + var _a = useMenuState(), anchorRef = _a.anchorRef, handleClick = _a.handleClick, handleClose = _a.handleClose, open = _a.open; + var popoverActions = React.useRef(null); + var onChange = function () { + if (popoverActions.current) { + popoverActions.current.updatePosition(); + } + }; + return (React.createElement(React.Fragment, null, + React.createElement(Button, { component: "div", "data-id": "sources-button", fullWidth: true, variant: "text", color: "primary", onClick: handleClick, ref: anchorRef }, + React.createElement(Grid, { container: true, direction: "row", alignItems: "center", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "pr-1" }, + React.createElement(StorageIcon, { className: "Mui-text-text-primary" })), + React.createElement(Grid, { item: true }, "Sources"))), + React.createElement(Popover, { action: popoverActions, open: open, anchorEl: anchorRef.current, onClose: handleClose, anchorOrigin: { + vertical: 'bottom', + horizontal: 'center', + }, transformOrigin: { + vertical: 'top', + horizontal: 'center', + }, className: "max-h-screen-1/2" }, + React.createElement(Paper, { elevation: Elevations.overlays, className: "min-w-120" }, ExtensionPoints.customSourcesPage ? (React.createElement(ExtensionPoints.customSourcesPage, { onChange: onChange })) : (React.createElement(SourcesPage, null)))))); +}; +export default hot(module)(SourcesInfo); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlcy1pbmZvLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9xdWVyeS1zZXR0aW5ncy9zb3VyY2VzLWluZm8udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9B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ZW50ZXInLFxuICAgICAgICB9fVxuICAgICAgICB0cmFuc2Zvcm1PcmlnaW49e3tcbiAgICAgICAgICB2ZXJ0aWNhbDogJ3RvcCcsXG4gICAgICAgICAgaG9yaXpvbnRhbDogJ2NlbnRlcicsXG4gICAgICAgIH19XG4gICAgICAgIGNsYXNzTmFtZT1cIm1heC1oLXNjcmVlbi0xLzJcIlxuICAgICAgPlxuICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfSBjbGFzc05hbWU9XCJtaW4tdy0xMjBcIj5cbiAgICAgICAgICB7RXh0ZW5zaW9uUG9pbnRzLmN1c3RvbVNvdXJjZXNQYWdlID8gKFxuICAgICAgICAgICAgPEV4dGVuc2lvblBvaW50cy5jdXN0b21Tb3VyY2VzUGFnZSBvbkNoYW5nZT17b25DaGFuZ2V9IC8+XG4gICAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDxTb3VyY2VzUGFnZSAvPlxuICAgICAgICAgICl9XG4gICAgICAgIDwvUGFwZXI+XG4gICAgICA8L1BvcG92ZXI+XG4gICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShTb3VyY2VzSW5mbylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/query-settings/spellcheck.d.ts b/src/main/webapp/component/query-settings/spellcheck.d.ts new file mode 100644 index 00000000000..8b95ad346f2 --- /dev/null +++ b/src/main/webapp/component/query-settings/spellcheck.d.ts @@ -0,0 +1,7 @@ +/// +import { QueryType } from '../../js/model/Query'; +type Props = { + model: QueryType; +}; +declare const _default: ({ model }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/query-settings/spellcheck.js b/src/main/webapp/component/query-settings/spellcheck.js new file mode 100644 index 00000000000..7b0eba626eb --- /dev/null +++ b/src/main/webapp/component/query-settings/spellcheck.js @@ -0,0 +1,21 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Checkbox from '@mui/material/Checkbox'; +var Spellcheck = function (_a) { + var model = _a.model; + var _b = __read(React.useState(Boolean(model.get('spellcheck'))), 2), spellcheck = _b[0], setSpellcheck = _b[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(model, 'change:spellcheck', function () { + setSpellcheck(model.get('spellcheck')); + }); + }, []); + return (React.createElement(FormControlLabel, { labelPlacement: "start", control: React.createElement(Checkbox, { color: "default", checked: spellcheck, onChange: function (e) { + model.set('spellcheck', e.target.checked); + } }), label: "Spellcheck" })); +}; +export default hot(module)(Spellcheck); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BlbGxjaGVjay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvcXVlcnktc2V0dGluZ3Mvc3BlbGxjaGVjay50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sd0NBQXdDLENBQUE7QUFDcEUsT0FBTyxnQkFBZ0IsTUFBTSxnQ0FBZ0MsQ0FBQTtBQUM3RCxPQUFPLFFBQVEsTUFBTSx3QkFBd0IsQ0FBQTtBQU83QyxJQUFNLFVBQVUsR0FBRyxVQUFDLEVBQWdCO1FBQWQsS0FBSyxXQUFBO0lBQ25CLElBQUEsS0FBQSxPQUE4QixLQUFLLENBQUMsUUFBUSxDQUNoRCxPQUFPLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxZQUFZL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59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFNwZWxsY2hlY2spXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/query-time/query-time.view.d.ts b/src/main/webapp/component/query-time/query-time.view.d.ts new file mode 100644 index 00000000000..569fc12f6d2 --- /dev/null +++ b/src/main/webapp/component/query-time/query-time.view.d.ts @@ -0,0 +1,8 @@ +/// +import { BasicFilterClass } from '../filter-builder/filter.structure'; +type QueryTimeProps = { + value: undefined | BasicFilterClass; + onChange: (e: any) => void; +}; +declare const _default: ({ value, onChange }: QueryTimeProps) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/component/query-time/query-time.view.js b/src/main/webapp/component/query-time/query-time.view.js new file mode 100644 index 00000000000..0d1254f703d --- /dev/null +++ b/src/main/webapp/component/query-time/query-time.view.js @@ -0,0 +1,110 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* eslint-disable no-var */ +import * as React from 'react'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import { hot } from 'react-hot-loader'; +import Autocomplete from '@mui/material/Autocomplete'; +import Chip from '@mui/material/Chip'; +import Grid from '@mui/material/Grid'; +import Swath from '../swath/swath'; +import FilterInput from '../../react-component/filter/filter-input'; +import Checkbox from '@mui/material/Checkbox'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +var getPossibleProperties = function () { + return StartupDataStore.MetacardDefinitions.getSortedAttributes() + .filter(function (definition) { return !definition.hidden && definition.type === 'DATE'; }) + .map(function (definition) { return ({ + label: definition.alias || definition.id, + value: definition.id, + }); }); +}; +var getDefaultPropertiesToApplyTo = function () { + return (StartupDataStore.Configuration.getBasicSearchTemporalSelectionDefault() || + []).map(function (property) { + return { + label: StartupDataStore.MetacardDefinitions.getAlias(property), + value: property, + }; + }); +}; +var determinePropertiesToApplyTo = function (_a) { + var value = _a.value; + if (value.property) { + return value.property + .filter(function (prop) { return prop !== 'anyDate'; }) + .map(function (property) { + return { + label: StartupDataStore.MetacardDefinitions.getAlias(property), + value: property, + }; + }); + } + else { + return getDefaultPropertiesToApplyTo(); + } +}; +var QueryTime = function (_a) { + var value = _a.value, onChange = _a.onChange; + React.useEffect(function () { + if (value && value.property === undefined) { + onChange(__assign(__assign({}, value), { property: determinePropertiesToApplyTo({ value: value }).map(function (val) { return val.value; }) })); + } + }, [value]); + if (value && value.property === undefined) { + return null; // the use effect above should fire to take care of setting a default + } + return (React.createElement(React.Fragment, null, + React.createElement("div", null, + React.createElement(FormControlLabel, { labelPlacement: "end", control: React.createElement(Checkbox, { color: "default", checked: value ? true : false, onChange: function (e) { + if (e.target.checked) { + onChange(__assign(__assign({}, value), { type: 'AFTER', property: getDefaultPropertiesToApplyTo().map(function (val) { return val.value; }) })); + } + else { + onChange(undefined); + } + } }), label: "Time" }), + value ? (React.createElement(Grid, { container: true, alignItems: "stretch", direction: "column", wrap: "nowrap", className: "pt-2" }, + React.createElement(Grid, { item: true, className: "w-full pb-2" }, + React.createElement(Autocomplete, { fullWidth: true, multiple: true, options: getPossibleProperties(), disableCloseOnSelect: true, getOptionLabel: function (option) { return option.label; }, isOptionEqualToValue: function (option, value) { + return option.value === value.value; + }, onChange: function (_e, newValue) { + onChange(__assign(__assign({}, value), { property: newValue.map(function (val) { return val.value; }) })); + }, size: "small", renderTags: function (tagValue, getTagProps) { + return tagValue.map(function (option, index) { return (React.createElement(Chip, __assign({ variant: "outlined", color: "default", label: option.label }, getTagProps({ index: index })))); }); + }, value: determinePropertiesToApplyTo({ value: value }), renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { variant: "outlined" }))); } })), + React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pt-2" }, + React.createElement(Grid, { item: true }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { container: true, direction: "column" }, + React.createElement(Grid, { item: true, className: "w-full pl-2 pb-2" }, + React.createElement(TextField, { fullWidth: true, variant: "outlined", size: "small", select: true, value: value.type, onChange: function (e) { + onChange(__assign(__assign({}, value), { type: e.target.value })); + } }, + React.createElement(MenuItem, { value: "AFTER" }, "After"), + React.createElement(MenuItem, { value: "BEFORE" }, "Before"), + React.createElement(MenuItem, { value: "DURING" }, "Between"), + React.createElement(MenuItem, { value: "RELATIVE" }, "Within the last"), + React.createElement(MenuItem, { value: "AROUND" }, "Around"))), + React.createElement(Grid, { item: true, className: "w-full pl-2" }, + React.createElement(FilterInput, { filter: __assign(__assign({}, value), { property: value.property[0] }), setFilter: function (val) { + onChange(__assign(__assign({}, value), { value: val.value })); + } })))))) : null))); +}; +export default hot(module)(QueryTime); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktdGltZS52aWV3LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9xdWVyeS10aW1lL3F1ZXJ5LXRpbWUudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSiwyQkFBMkI7QUFDM0IsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxTQUFTLE1BQU0seUJBQXlCLENBQUE7QUFDL0MsT0FBTyxRQUFRLE1BQU0sd0JBQXdCLENBQUE7QUFDN0MsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQix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4gICAgaWYgKHZhbHVlICYmIHZhbHVlLnByb3BlcnR5ID09PSB1bmRlZmluZWQpIHtcbiAgICAgIG9uQ2hhbmdlKHtcbiAgICAgICAgLi4udmFsdWUsXG4gICAgICAgIHByb3BlcnR5OiBkZXRlcm1pbmVQcm9wZXJ0aWVzVG9BcHBseVRvKHsgdmFsdWUgfSkubWFwKFxuICAgICAgICAgICh2YWwpID0+IHZhbC52YWx1ZVxuICAgICAgICApLFxuICAgICAgfSlcbiAgICB9XG4gIH0sIFt2YWx1ZV0pXG4gIGlmICh2YWx1ZSAmJiB2YWx1ZS5wcm9wZXJ0eSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgcmV0dXJuIG51bGwgLy8gdGhlIHVzZSBlZmZlY3QgYWJvdmUgc2hvdWxkIGZpcmUgdG8gdGFrZSBjYXJlIG9mIHNldHRpbmcgYSBkZWZhdWx0XG4gIH1cbiAgcmV0dXJuIChcbiAgICA8PlxuICAgICAgPGRpdj5cbiAgICAgICAgPEZvcm1Db250cm9sTGFiZWxcbiAgICAgICAgICBsYWJlbFBsYWNlbWVudD1cImVuZFwiXG4gICAgICAgICAgY29udHJvbD17XG4gICAgICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICAgICAgY29sb3I9XCJkZWZhdWx0XCJcbiAgICAgICAgICAgICAgY2hlY2tlZD17dmFsdWUgPyB0cnVlIDogZmFsc2V9XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChlLnRhcmdldC5jaGVja2VkKSB7XG4gICAgICAgICAgICAgICAgICBvbkNoYW5nZSh7XG4gICAgICAgICAgICAgICAgICAgIC4uLnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnQUZURVInLFxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eTogZ2V0RGVmYXVsdFByb3BlcnRpZXNUb0FwcGx5VG8oKS5tYXAoXG4gICAgICAgICAgICAgICAgICAgICAgKHZhbCkgPT4gdmFsLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBvbkNoYW5nZSh1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICB9XG4gICAgICAgICAgbGFiZWw9XCJUaW1lXCJcbiAgICAgICAgLz5cbiAgICAgICAge3ZhbHVlID8gKFxuICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICAgIGFsaWduSXRlbXM9XCJzdHJldGNoXCJcbiAgICAgICAgICAgIGRpcmVjdGlvbj1cImNvbHVtblwiXG4gICAgICAgICAgICB3cmFwPVwibm93cmFwXCJcbiAgICAgICAgICAgIGNsYXNzTmFtZT1cInB0LTJcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsIHBiLTJcIj5cbiAgICAgICAgICAgICAgPEF1dG9jb21wbGV0ZVxuICAgICAgICAgICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICAgICAgICAgIG11bHRpcGxlXG4gICAgICAgICAgICAgICAgb3B0aW9ucz17Z2V0UG9zc2libGVQcm9wZXJ0aWVzKCl9XG4gICAgICAgICAgICAgICAgZGlzYWJsZUNsb3NlT25TZWxlY3RcbiAgICAgICAgICAgICAgICBnZXRPcHRpb25MYWJlbD17KG9wdGlvbikgPT4gb3B0aW9uLmxhYmVsfVxuICAgICAgICAgICAgICAgIGlzT3B0aW9uRXF1YWxUb1ZhbHVlPXsob3B0aW9uLCB2YWx1ZSkgPT5cbiAgICAgICAgICAgICAgICAgIG9wdGlvbi52YWx1ZSA9PT0gdmFsdWUudmFsdWVcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb25DaGFuZ2U9eyhfZSwgbmV3VmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlKHtcbiAgICAgICAgICAgICAgICAgICAgLi4udmFsdWUsXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5OiBuZXdWYWx1ZS5tYXAoKHZhbCkgPT4gdmFsLnZhbHVlKSxcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICAgIHJlbmRlclRhZ3M9eyh0YWdWYWx1ZSwgZ2V0VGFnUHJvcHMpID0+XG4gICAgICAgICAgICAgICAgICB0YWdWYWx1ZS5tYXAoKG9wdGlvbiwgaW5kZXgpID0+IChcbiAgICAgICAgICAgICAgICAgICAgPENoaXBcbiAgICAgICAgICAgICAgICAgICAgICB2YXJpYW50PVwib3V0bGluZWRcIlxuICAgICAgICAgICAgICAgICAgICAgIGNvbG9yPVwiZGVmYXVsdFwiXG4gICAgICAgICAgICAgICAgICAgICAgbGFiZWw9e29wdGlvbi5sYWJlbH1cbiAgICAgICAgICAgICAgICAgICAgICB7Li4uZ2V0VGFnUHJvcHMoeyBpbmRleCB9KX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICkpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhbHVlPXtkZXRlcm1pbmVQcm9wZXJ0aWVzVG9BcHBseVRvKHsgdmFsdWUgfSl9XG4gICAgICAgICAgICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IChcbiAgICAgICAgICAgICAgICAgIDxUZXh0RmllbGQgey4uLnBhcmFtc30gdmFyaWFudD1cIm91dGxpbmVkXCIgLz5cbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPEdyaWRcbiAgICAgICAgICAgICAgY29udGFpbmVyXG4gICAgICAgICAgICAgIGFsaWduSXRlbXM9XCJzdHJldGNoXCJcbiAgICAgICAgICAgICAgZGlyZWN0aW9uPVwicm93XCJcbiAgICAgICAgICAgICAgd3JhcD1cIm5vd3JhcFwiXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cInB0LTJcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8R3JpZCBpdGVtPlxuICAgICAgICAgICAgICAgIDxTd2F0aCBjbGFzc05hbWU9XCJ3LTEgaC1mdWxsXCIgLz5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICA8R3JpZCBjb250YWluZXIgZGlyZWN0aW9uPVwiY29sdW1uXCI+XG4gICAgICAgICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgcGwtMiBwYi0yXCI+XG4gICAgICAgICAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICAgICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICAgICAgICAgICAgICB2YXJpYW50PVwib3V0bGluZWRcIlxuICAgICAgICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU9e3ZhbHVlLnR5cGV9XG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogZS50YXJnZXQudmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgPE1lbnVJdGVtIHZhbHVlPVwiQUZURVJcIj5BZnRlcjwvTWVudUl0ZW0+XG4gICAgICAgICAgICAgICAgICAgIDxNZW51SXRlbSB2YWx1ZT1cIkJFRk9SRVwiPkJlZm9yZTwvTWVudUl0ZW0+XG4gICAgICAgICAgICAgICAgICAgIDxNZW51SXRlbSB2YWx1ZT1cIkRVUklOR1wiPkJldHdlZW48L01lbnVJdGVtPlxuICAgICAgICAgICAgICAgICAgICA8TWVudUl0ZW0gdmFsdWU9XCJSRUxBVElWRVwiPldpdGhpbiB0aGUgbGFzdDwvTWVudUl0ZW0+XG4gICAgICAgICAgICAgICAgICAgIDxNZW51SXRlbSB2YWx1ZT1cIkFST1VORFwiPkFyb3VuZDwvTWVudUl0ZW0+XG4gICAgICAgICAgICAgICAgICA8L1RleHRGaWVsZD5cbiAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgcGwtMlwiPlxuICAgICAgICAgICAgICAgICAgPEZpbHRlcklucHV0XG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcj17eyAuLi52YWx1ZSwgcHJvcGVydHk6IHZhbHVlLnByb3BlcnR5WzBdIH19XG4gICAgICAgICAgICAgICAgICAgIHNldEZpbHRlcj17KHZhbDogYW55KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4udmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICA8L2Rpdj5cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShRdWVyeVRpbWUpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.d.ts b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.d.ts new file mode 100644 index 00000000000..c60c39f7378 --- /dev/null +++ b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.d.ts @@ -0,0 +1,44 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +import { useMetacardDefinitions } from '../../js/model/Startup/metacard-definitions.hooks'; +import { BasicDatatypeFilter } from '../filter-builder/filter.structure'; +import { DataTypesConfiguration, ReverseDataTypesConfiguration } from '../datatypes/datatypes'; +export declare function getDataTypesConfiguration({ Configuration, MetacardDefinitions, }: { + Configuration: ReturnType; + MetacardDefinitions: ReturnType; +}): { + groupMap: DataTypesConfiguration; + valueMap: ReverseDataTypesConfiguration; +}; +export declare function generateSortedValues({ dataTypesConfiguration, }: { + dataTypesConfiguration: ReturnType; +}): { + label: string; + value: string; +}[]; +export declare function generateGroupsToValues({ dataTypesConfiguration, }: { + dataTypesConfiguration: ReturnType; +}): { + [key: string]: string[]; +}; +export declare function generateKnownGroups({ dataTypesConfiguration, }: { + dataTypesConfiguration: ReturnType; +}): string[]; +export declare const ReservedBasicDatatype: ({ value, onChange, }: { + value: BasicDatatypeFilter['value']; + onChange: (value: BasicDatatypeFilter['value']) => void; +}) => JSX.Element | null; diff --git a/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.js b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.js new file mode 100644 index 00000000000..99c38a02611 --- /dev/null +++ b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.js @@ -0,0 +1,270 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import IconHelper from '../../js/IconHelper'; +import TextField from '@mui/material/TextField'; +import CheckBoxIcon from '@mui/icons-material/CheckBox'; +import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; +import IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox'; +import Chip from '@mui/material/Chip'; +import Autocomplete from '@mui/material/Autocomplete'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { useMetacardDefinitions } from '../../js/model/Startup/metacard-definitions.hooks'; +import Swath from '../swath/swath'; +function getMatchTypeAttribute() { + return StartupDataStore.MetacardDefinitions.getAttributeMap()[StartupDataStore.Configuration.getBasicSearchMatchType()] + ? StartupDataStore.Configuration.getBasicSearchMatchType() + : 'datatype'; +} +/** + * If the configuration is empty, we generate a configuration based off the enum instead + */ +function getTypesMapping(_a) { + var Configuration = _a.Configuration, MetacardDefinitions = _a.MetacardDefinitions; + var customTypesConfig = Configuration.getDataTypes(); + if (Object.keys(customTypesConfig.groups).length > 0) { + return customTypesConfig; + } + var matchTypeAttr = getMatchTypeAttribute(); + var validTypes = MetacardDefinitions.getEnum(matchTypeAttr); + var defaultTypesMapping = validTypes.reduce(function (blob, value) { + var iconClass = IconHelper.getClassByName(value); + blob.groups['Other'] = blob.groups['Other'] || {}; + blob.groups['Other'].values = blob.groups['Other'].values || {}; + blob.groups['Other'].values[value] = { + attributes: { + datatype: [value], + 'metadata-content-type': [value], + }, + iconConfig: { + class: iconClass, + }, + }; + return blob; + }, { + groups: {}, + }); + return defaultTypesMapping; +} +export function getDataTypesConfiguration(_a) { + var Configuration = _a.Configuration, MetacardDefinitions = _a.MetacardDefinitions; + var typesMapping = getTypesMapping({ Configuration: Configuration, MetacardDefinitions: MetacardDefinitions }); + var reverseMapping = Object.entries(typesMapping.groups).reduce(function (blob, _a) { + var _b = __read(_a, 2), groupName = _b[0], groupInfo = _b[1]; + Object.entries(groupInfo.values).forEach(function (_a) { + var _b = __read(_a, 2), valueName = _b[0], valueInfo = _b[1]; + blob[valueName] = __assign({ group: { + name: groupName, + iconConfig: groupInfo.iconConfig, + } }, valueInfo); + }); + return blob; + }, {}); + return { + groupMap: typesMapping, + valueMap: reverseMapping, + }; +} +function getGroupFromValue(_a) { + var _b; + var dataTypesConfiguration = _a.dataTypesConfiguration, value = _a.value, orderedGroups = _a.orderedGroups; + var groupName = (_b = dataTypesConfiguration.valueMap[value]) === null || _b === void 0 ? void 0 : _b.group.name; + return orderedGroups.includes(groupName) + ? groupName + : orderedGroups.includes(value) + ? value + : null; +} +export function generateSortedValues(_a) { + var dataTypesConfiguration = _a.dataTypesConfiguration; + var orderedGroups = Object.keys(dataTypesConfiguration.groupMap.groups); + return Object.keys(dataTypesConfiguration.valueMap) + .concat(orderedGroups) + .sort(function (a, b) { + var groupA = getGroupFromValue({ + dataTypesConfiguration: dataTypesConfiguration, + value: a, + orderedGroups: orderedGroups, + }); + var groupB = getGroupFromValue({ + dataTypesConfiguration: dataTypesConfiguration, + value: b, + orderedGroups: orderedGroups, + }); + // Handle cases where one value has a group and the other doesn't (grouped comes first) + if (groupA && !groupB) + return -1; + if (!groupA && groupB) + return 1; + // Sort by group if both values have different groups (group order matters) + if (groupA && groupB && groupA !== groupB) { + return orderedGroups.indexOf(groupA) - orderedGroups.indexOf(groupB); + } + // If they are in the same group, sort by whether the value itself is the group (if it's the group, it comes first) + if (groupA === groupB) { + if (a === groupA) + return -1; + if (b === groupB) + return 1; + return a.localeCompare(b); // Sub-sort alphabetically if not the group itself + } + // If no groups are involved, sort alphabetically + return a.localeCompare(b); + }) + .map(function (value) { + return { + label: value, + value: value, + }; + }); +} +export function generateGroupsToValues(_a) { + var dataTypesConfiguration = _a.dataTypesConfiguration; + return Object.keys(dataTypesConfiguration.groupMap.groups).reduce(function (groupsToValuesMapping, groupName) { + groupsToValuesMapping[groupName] = Object.keys(dataTypesConfiguration.groupMap.groups[groupName].values); + return groupsToValuesMapping; + }, {}); +} +export function generateKnownGroups(_a) { + var dataTypesConfiguration = _a.dataTypesConfiguration; + return Object.keys(dataTypesConfiguration.groupMap.groups); +} +function useDataTypesConfiguration() { + var Configuration = useConfiguration(); + var MetacardDefinitions = useMetacardDefinitions(); + var dataTypesConfiguration = React.useMemo(function () { + return getDataTypesConfiguration({ Configuration: Configuration, MetacardDefinitions: MetacardDefinitions }); + }, [Configuration.getDataTypes(), MetacardDefinitions]); + var sortedValues = React.useMemo(function () { + return generateSortedValues({ dataTypesConfiguration: dataTypesConfiguration }); + }, [dataTypesConfiguration]); + var groupsToValues = React.useMemo(function () { + return generateGroupsToValues({ dataTypesConfiguration: dataTypesConfiguration }); + }, [dataTypesConfiguration]); + var knownGroups = React.useMemo(function () { + return generateKnownGroups({ dataTypesConfiguration: dataTypesConfiguration }); + }, [dataTypesConfiguration]); + return { + configuration: dataTypesConfiguration, + sortedValues: sortedValues, + groupsToValues: groupsToValues, + knownGroups: knownGroups, + }; +} +function validateShape(_a) { + var value = _a.value, onChange = _a.onChange; + if (!hasValidShape({ value: value })) { + onChange([]); + } +} +function hasValidShape(_a) { + var value = _a.value; + if (value === undefined || value === null || value.constructor !== Array) { + return false; + } + else { + return (value.find(function (subvalue) { + return typeof subvalue !== 'string'; + }) === undefined); + } +} +function getIconForValue(_a) { + var _b, _c, _d, _f; + var value = _a.value, configuration = _a.configuration; + return (((_c = (_b = configuration.valueMap[value]) === null || _b === void 0 ? void 0 : _b.iconConfig) === null || _c === void 0 ? void 0 : _c.class) || + ((_f = (_d = configuration.groupMap.groups[value]) === null || _d === void 0 ? void 0 : _d.iconConfig) === null || _f === void 0 ? void 0 : _f.class)); +} +export var ReservedBasicDatatype = function (_a) { + var _b = _a.value, value = _b === void 0 ? [] : _b, onChange = _a.onChange; + var datatypesConfiguration = useDataTypesConfiguration(); + React.useEffect(function () { + validateShape({ value: value, onChange: onChange }); + }, []); + if (!hasValidShape({ value: value })) { + return null; + } + return (React.createElement(Autocomplete, { fullWidth: true, multiple: true, options: datatypesConfiguration.sortedValues, disableCloseOnSelect: true, getOptionLabel: function (option) { return option.label; }, isOptionEqualToValue: function (option, value) { return option.value === value.value; }, onChange: function (_e, newValue) { + var _a; + // should technically only ever be one value, since we filter these out at the end + var includedGroup = (_a = newValue.find(function (val) { + return datatypesConfiguration.knownGroups.includes(val.value); + })) === null || _a === void 0 ? void 0 : _a.value; + // determine if we need to deselect or select all values in a group + if (includedGroup) { + // determine if everything in a group is selected + var groupValues_1 = datatypesConfiguration.groupsToValues[includedGroup]; + var isGroupSelected = groupValues_1.every(function (val) { + return value.includes(val); + }); + if (isGroupSelected) { + newValue = newValue.filter(function (val) { + return !groupValues_1.includes(val.value); + }); + } + else { + groupValues_1.forEach(function (val) { + if (!newValue.find(function (value) { return value.value === val; })) { + newValue.push({ label: val, value: val }); + } + }); + } + } + // remove any groups, as we don't actually want these in the value or we can't remove other chips in that category once it gets added + newValue = newValue.filter(function (val) { + return !datatypesConfiguration.knownGroups.includes(val.value); + }); + onChange(newValue.map(function (val) { return val.value; })); + }, size: "small", renderOption: function (props, option) { + var isGroup = datatypesConfiguration.knownGroups.includes(option.value); + // determine if everything in a group is selected + var isGroupSelected = isGroup + ? datatypesConfiguration.groupsToValues[option.value].every(function (val) { + return value.includes(val); + }) + : false; + // determine if anything in a group is selected but not everything + var isGroupPartiallySelected = isGroup && !isGroupSelected + ? datatypesConfiguration.groupsToValues[option.value].some(function (val) { + return value.includes(val); + }) + : false; + var isSelected = props['aria-selected'] || isGroupSelected; + return (React.createElement("li", __assign({}, props, { className: "".concat(props.className, " ").concat(isGroup ? '!pl-2' : '!pl-8', " ").concat(isGroupSelected ? '' : ''), "aria-selected": isSelected }), + isGroup ? React.createElement(React.Fragment, null) : React.createElement(Swath, { className: "w-1 h-6" }), + React.createElement("div", { className: "px-2" }, isGroup ? (isGroupSelected ? (React.createElement(CheckBoxIcon, null)) : isGroupPartiallySelected ? (React.createElement(IndeterminateCheckBoxIcon, null)) : (React.createElement(CheckBoxOutlineBlankIcon, null))) : isSelected ? (React.createElement(CheckBoxIcon, null)) : (React.createElement(CheckBoxOutlineBlankIcon, null))), + React.createElement("div", { className: "pr-2 icon ".concat(getIconForValue({ + value: option.value, + configuration: datatypesConfiguration.configuration, + })) }), + React.createElement("div", { className: "pt-[3px]" }, + " ", + option.label))); + }, renderTags: function (tagValue, getTagProps) { + return tagValue.map(function (option, index) { return (React.createElement(Chip, __assign({ variant: "outlined", color: "default", label: React.createElement(React.Fragment, null, + React.createElement("div", { className: "pr-2 icon ".concat(getIconForValue({ + value: option.value, + configuration: datatypesConfiguration.configuration, + })) }), + option.label) }, getTagProps({ index: index })))); }); + }, value: value.map(function (val) { + return { + label: val, + value: val, + }; + }), renderInput: function (params) { return React.createElement(TextField, __assign({}, params, { variant: "outlined" })); } })); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzZXJ2ZWQuYmFzaWMtZGF0YXR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Jlc2VydmVkLWJhc2ljLWRhdGF0eXBlL3Jlc2VydmVkLmJhc2ljLWRhdGF0eXBlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIj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ICAgICAgaXNHcm91cCAmJiAhaXNHcm91cFNlbGVjdGVkXG4gICAgICAgICAgICA/IGRhdGF0eXBlc0NvbmZpZ3VyYXRpb24uZ3JvdXBzVG9WYWx1ZXNbb3B0aW9uLnZhbHVlXS5zb21lKFxuICAgICAgICAgICAgICAgICh2YWwpID0+IHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZS5pbmNsdWRlcyh2YWwpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICA6IGZhbHNlXG5cbiAgICAgICAgY29uc3QgaXNTZWxlY3RlZCA9IHByb3BzWydhcmlhLXNlbGVjdGVkJ10gfHwgaXNHcm91cFNlbGVjdGVkXG5cbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICA8bGlcbiAgICAgICAgICAgIHsuLi5wcm9wc31cbiAgICAgICAgICAgIGNsYXNzTmFtZT17YCR7cHJvcHMuY2xhc3NOYW1lfSAke2lzR3JvdXAgPyAnIXBsLTInIDogJyFwbC04J30gJHtcbiAgICAgICAgICAgICAgaXNHcm91cFNlbGVjdGVkID8gJycgOiAnJ1xuICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICBhcmlhLXNlbGVjdGVkPXtpc1NlbGVjdGVkfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtpc0dyb3VwID8gPD48Lz4gOiA8U3dhdGggY2xhc3NOYW1lPVwidy0xIGgtNlwiIC8+fVxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJweC0yXCI+XG4gICAgICAgICAgICAgIHtpc0dyb3VwID8gKFxuICAgICAgICAgICAgICAgIGlzR3JvdXBTZWxlY3RlZCA/IChcbiAgICAgICAgICAgICAgICAgIDxDaGVja0JveEljb24gLz5cbiAgICAgICAgICAgICAgICApIDogaXNHcm91cFBhcnRpYWxseVNlbGVjdGVkID8gKFxuICAgICAgICAgICAgICAgICAgPEluZGV0ZXJtaW5hdGVDaGVja0JveEljb24gLz5cbiAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgPENoZWNrQm94T3V0bGluZUJsYW5rSWNvbiAvPlxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSA6IGlzU2VsZWN0ZWQgPyAoXG4gICAgICAgICAgICAgICAgPENoZWNrQm94SWNvbiAvPlxuICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgIDxDaGVja0JveE91dGxpbmVCbGFua0ljb24gLz5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICBjbGFzc05hbWU9e2Bwci0yIGljb24gJHtnZXRJY29uRm9yVmFsdWUoe1xuICAgICAgICAgICAgICAgIHZhbHVlOiBvcHRpb24udmFsdWUsXG4gICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbjogZGF0YXR5cGVzQ29uZmlndXJhdGlvbi5jb25maWd1cmF0aW9uLFxuICAgICAgICAgICAgICB9KX1gfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHQtWzNweF1cIj4ge29wdGlvbi5sYWJlbH08L2Rpdj5cbiAgICAgICAgICA8L2xpPlxuICAgICAgICApXG4gICAgICB9fVxuICAgICAgcmVuZGVyVGFncz17KHRhZ1ZhbHVlLCBnZXRUYWdQcm9wcykgPT5cbiAgICAgICAgdGFnVmFsdWUubWFwKChvcHRpb24sIGluZGV4KSA9PiAoXG4gICAgICAgICAgPENoaXBcbiAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICBjb2xvcj1cImRlZmF1bHRcIlxuICAgICAgICAgICAgbGFiZWw9e1xuICAgICAgICAgICAgICA8PlxuICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17YHByLTIgaWNvbiAke2dldEljb25Gb3JWYWx1ZSh7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBvcHRpb24udmFsdWUsXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYXRpb246IGRhdGF0eXBlc0NvbmZpZ3VyYXRpb24uY29uZmlndXJhdGlvbixcbiAgICAgICAgICAgICAgICAgIH0pfWB9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICB7b3B0aW9uLmxhYmVsfVxuICAgICAgICAgICAgICA8Lz5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHsuLi5nZXRUYWdQcm9wcyh7IGluZGV4IH0pfVxuICAgICAgICAgIC8+XG4gICAgICAgICkpXG4gICAgICB9XG4gICAgICB2YWx1ZT17dmFsdWUubWFwKCh2YWwpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsYWJlbDogdmFsLFxuICAgICAgICAgIHZhbHVlOiB2YWwsXG4gICAgICAgIH1cbiAgICAgIH0pfVxuICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IDxUZXh0RmllbGQgey4uLnBhcmFtc30gdmFyaWFudD1cIm91dGxpbmVkXCIgLz59XG4gICAgLz5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.d.ts b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.js b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.js new file mode 100644 index 00000000000..dd77a429838 --- /dev/null +++ b/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.js @@ -0,0 +1,543 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { generateGroupsToValues, generateKnownGroups, generateSortedValues, getDataTypesConfiguration, } from './reserved.basic-datatype'; +var DatatypesJSONConfig = { + groups: { + Object: { + iconConfig: { + class: 'fa fa-file-text-o', + }, + values: { + Person: { + attributes: { + description: ['person'], + }, + iconConfig: { + class: 'fa fa-user', + }, + }, + Group: { + attributes: { + description: ['group'], + }, + iconConfig: { + class: 'fa fa-users', + }, + }, + Equipment: { + attributes: { + description: ['equipment'], + }, + iconConfig: { + class: 'fa fa-wrench', + }, + }, + Platform: { + attributes: { + description: ['platform'], + }, + iconConfig: { + class: 'fa fa-industry', + }, + }, + Facility: { + attributes: { + description: ['facility'], + }, + iconConfig: { + class: 'fa fa-building', + }, + }, + }, + }, + Happenings: { + iconConfig: { + class: 'fa fa-bolt', + }, + values: { + Civil: { + attributes: { + description: ['civil'], + }, + iconConfig: { + class: 'fa fa-university', + }, + }, + Military: { + attributes: { + description: ['military'], + }, + iconConfig: { + class: 'fa fa-shield', + }, + }, + Political: { + attributes: { + description: ['political'], + }, + iconConfig: { + class: 'fa fa-balance-scale', + }, + }, + Natural: { + attributes: { + description: ['natural'], + }, + iconConfig: { + class: 'fa fa-leaf', + }, + }, + Other: { + attributes: { + description: ['other'], + }, + }, + }, + }, + 'Visual Media': { + iconConfig: { + class: 'fa fa-camera-retro', + }, + values: { + Image: { + attributes: { + datatype: ['Image'], + }, + iconConfig: { + class: 'fa fa-picture-o', + }, + }, + 'Moving Image': { + attributes: { + datatype: ['Moving Image'], + }, + iconConfig: { + class: 'fa fa-film', + }, + }, + 'Still Image': { + attributes: { + datatype: ['Still Image'], + }, + iconConfig: { + class: 'fa fa-camera-retro', + }, + }, + }, + }, + }, +}; +describe('Reserved Basic Datatype', function () { + it('should use defaults when extra json is not defined', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap['datatype'] = { + id: 'datatype', + multivalued: false, + type: 'STRING', + enumerations: ['Image'], + isInjected: true, + }; + } + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.extra = {}; + } + var resolvedConfiguration = getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); + expect(resolvedConfiguration.groupMap).to.deep.equal({ + groups: { + Other: { + values: { + Image: { + attributes: { + datatype: ['Image'], + 'metadata-content-type': ['Image'], + }, + iconConfig: { + class: undefined, + }, + }, + }, + }, + }, + }); + }); + it('should use defaults when extra json is not defined p2', function () { + if (StartupDataStore.MetacardDefinitions.attributeMap) { + StartupDataStore.MetacardDefinitions.attributeMap['datatype'] = { + id: 'datatype', + multivalued: false, + type: 'STRING', + enumerations: ['Image', 'Moving Image'], + isInjected: true, + }; + } + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.extra = {}; + } + var resolvedConfiguration = getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); + expect(resolvedConfiguration.groupMap).to.deep.equal({ + groups: { + Other: { + values: { + Image: { + attributes: { + datatype: ['Image'], + 'metadata-content-type': ['Image'], + }, + iconConfig: { + class: undefined, + }, + }, + 'Moving Image': { + attributes: { + datatype: ['Moving Image'], + 'metadata-content-type': ['Moving Image'], + }, + iconConfig: { + class: undefined, + }, + }, + }, + }, + }, + }); + }); + it('should use extra json when defined', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + } + var resolvedConfiguration = getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); + expect(resolvedConfiguration.groupMap).to.deep.equal(DatatypesJSONConfig); + }); + it('should generate a proper value mapping', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + } + var resolvedConfiguration = getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); + expect(resolvedConfiguration.valueMap).to.deep.equal({ + Person: { + group: { + name: 'Object', + iconConfig: { + class: 'fa fa-file-text-o', + }, + }, + attributes: { + description: ['person'], + }, + iconConfig: { + class: 'fa fa-user', + }, + }, + Group: { + group: { + name: 'Object', + iconConfig: { + class: 'fa fa-file-text-o', + }, + }, + attributes: { + description: ['group'], + }, + iconConfig: { + class: 'fa fa-users', + }, + }, + Equipment: { + group: { + name: 'Object', + iconConfig: { + class: 'fa fa-file-text-o', + }, + }, + attributes: { + description: ['equipment'], + }, + iconConfig: { + class: 'fa fa-wrench', + }, + }, + Platform: { + group: { + name: 'Object', + iconConfig: { + class: 'fa fa-file-text-o', + }, + }, + attributes: { + description: ['platform'], + }, + iconConfig: { + class: 'fa fa-industry', + }, + }, + Facility: { + group: { + name: 'Object', + iconConfig: { + class: 'fa fa-file-text-o', + }, + }, + attributes: { + description: ['facility'], + }, + iconConfig: { + class: 'fa fa-building', + }, + }, + Civil: { + group: { + name: 'Happenings', + iconConfig: { + class: 'fa fa-bolt', + }, + }, + attributes: { + description: ['civil'], + }, + iconConfig: { + class: 'fa fa-university', + }, + }, + Military: { + group: { + name: 'Happenings', + iconConfig: { + class: 'fa fa-bolt', + }, + }, + attributes: { + description: ['military'], + }, + iconConfig: { + class: 'fa fa-shield', + }, + }, + Political: { + group: { + name: 'Happenings', + iconConfig: { + class: 'fa fa-bolt', + }, + }, + attributes: { + description: ['political'], + }, + iconConfig: { + class: 'fa fa-balance-scale', + }, + }, + Natural: { + group: { + name: 'Happenings', + iconConfig: { + class: 'fa fa-bolt', + }, + }, + attributes: { + description: ['natural'], + }, + iconConfig: { + class: 'fa fa-leaf', + }, + }, + Other: { + group: { + name: 'Happenings', + iconConfig: { + class: 'fa fa-bolt', + }, + }, + attributes: { + description: ['other'], + }, + }, + Image: { + group: { + name: 'Visual Media', + iconConfig: { + class: 'fa fa-camera-retro', + }, + }, + attributes: { + datatype: ['Image'], + }, + iconConfig: { + class: 'fa fa-picture-o', + }, + }, + 'Moving Image': { + group: { + name: 'Visual Media', + iconConfig: { + class: 'fa fa-camera-retro', + }, + }, + attributes: { + datatype: ['Moving Image'], + }, + iconConfig: { + class: 'fa fa-film', + }, + }, + 'Still Image': { + group: { + name: 'Visual Media', + iconConfig: { + class: 'fa fa-camera-retro', + }, + }, + attributes: { + datatype: ['Still Image'], + }, + iconConfig: { + class: 'fa fa-camera-retro', + }, + }, + }); + }); + it('should sort values appropriately, according to the key order in the json config, and alphabetically otherwise', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + } + var resolvedConfiguration = getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); + var sortedValues = generateSortedValues({ + dataTypesConfiguration: resolvedConfiguration, + }); + expect(sortedValues).to.deep.equal([ + { + label: 'Object', + value: 'Object', + }, + { + label: 'Equipment', + value: 'Equipment', + }, + { + label: 'Facility', + value: 'Facility', + }, + { + label: 'Group', + value: 'Group', + }, + { + label: 'Person', + value: 'Person', + }, + { + label: 'Platform', + value: 'Platform', + }, + { + label: 'Happenings', + value: 'Happenings', + }, + { + label: 'Civil', + value: 'Civil', + }, + { + label: 'Military', + value: 'Military', + }, + { + label: 'Natural', + value: 'Natural', + }, + { + label: 'Other', + value: 'Other', + }, + { + label: 'Political', + value: 'Political', + }, + { + label: 'Visual Media', + value: 'Visual Media', + }, + { + label: 'Image', + value: 'Image', + }, + { + label: 'Moving Image', + value: 'Moving Image', + }, + { + label: 'Still Image', + value: 'Still Image', + }, + ]); + }); + it('should use generate groups to values appropriately', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + } + var resolvedConfiguration = getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); + var groupsToValues = generateGroupsToValues({ + dataTypesConfiguration: resolvedConfiguration, + }); + expect(groupsToValues).to.deep.equal({ + Object: ['Person', 'Group', 'Equipment', 'Platform', 'Facility'], + Happenings: ['Civil', 'Military', 'Political', 'Natural', 'Other'], + 'Visual Media': ['Image', 'Moving Image', 'Still Image'], + }); + }); + it('should use generate known groups appropriately', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + } + var resolvedConfiguration = getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); + var knownGroups = generateKnownGroups({ + dataTypesConfiguration: resolvedConfiguration, + }); + expect(knownGroups).to.deep.equal(['Object', 'Happenings', 'Visual Media']); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzZXJ2ZWQuYmFzaWMtZGF0YXR5cGUuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvcmVzZXJ2ZWQtYmFzaWMtZGF0YXR5cGUvcmVzZXJ2ZWQuYmFzaWMtZGF0YXR5cGUuc3BlYy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxNQUFNLENBQUE7QUFFN0IsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZ0NB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tcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWydwZXJzb24nXSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtdXNlcicsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgR3JvdXA6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWydncm91cCddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS11c2VycycsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgRXF1aXBtZW50OiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGVzY3JpcHRpb246IFsnZXF1aXBtZW50J10sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLXdyZW5jaCcsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgUGxhdGZvcm06IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWydwbGF0Zm9ybSddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1pbmR1c3RyeScsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgRmFjaWxpdHk6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWydmYWNpbGl0eSddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1idWlsZGluZycsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICBIYXBwZW5pbmdzOiB7XG4gICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgIGNsYXNzOiAnZmEgZmEtYm9sdCcsXG4gICAgICB9LFxuICAgICAgdmFsdWVzOiB7XG4gICAgICAgIENpdmlsOiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGVzY3JpcHRpb246IFsnY2l2aWwnXSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtdW5pdmVyc2l0eScsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgTWlsaXRhcnk6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWydtaWxpdGFyeSddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1zaGllbGQnLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIFBvbGl0aWNhbDoge1xuICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ3BvbGl0aWNhbCddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1iYWxhbmNlLXNjYWxlJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBOYXR1cmFsOiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGVzY3JpcHRpb246IFsnbmF0dXJhbCddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1sZWFmJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBPdGhlcjoge1xuICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ290aGVyJ10sXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICAnVmlzdWFsIE1lZGlhJzoge1xuICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICBjbGFzczogJ2ZhIGZhLWNhbWVyYS1yZXRybycsXG4gICAgICB9LFxuICAgICAgdmFsdWVzOiB7XG4gICAgICAgIEltYWdlOiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGF0YXR5cGU6IFsnSW1hZ2UnXSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtcGljdHVyZS1vJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICAnTW92aW5nIEltYWdlJzoge1xuICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgIGRhdGF0eXBlOiBbJ01vdmluZyBJbWFnZSddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1maWxtJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICAnU3RpbGwgSW1hZ2UnOiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGF0YXR5cGU6IFsnU3RpbGwgSW1hZ2UnXSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtY2FtZXJhLXJldHJvJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9LFxuICB9LFxufSBhcyBEYXR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ICAgIE90aGVyOiB7XG4gICAgICAgICAgdmFsdWVzOiB7XG4gICAgICAgICAgICBJbWFnZToge1xuICAgICAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICAgICAgZGF0YXR5cGU6IFsnSW1hZ2UnXSxcbiAgICAgICAgICAgICAgICAnbWV0YWRhdGEtY29udGVudC10eXBlJzogWydJbWFnZSddLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICAgICAgY2xhc3M6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfSlcbiAgfSlcbiAgaXQoJ3Nob3VsZCB1c2UgZGVmYXVsdHMgd2hlbiBleHRyYSBqc29uIGlzIG5vdCBkZWZpbmVkIHAyJywgKCkgPT4ge1xuICAgIGlmIChTdGFydHVwRGF0YVN0b3JlLk1ldGFjYXJkRGVmaW5pdGlvbnMuYXR0cmlidXRlTWFwKSB7XG4gICAgICBTdGFydHVwRGF0YVN0b3JlLk1ldGFjYXJkRGVmaW5pdGlvbnMuYXR0cmlidXRlTWFwWydkYXRhdHlwZSddID0ge1xuICAgICAgICBpZDogJ2RhdGF0eXBlJyxcbiAgICAgICAgbXVsdGl2YWx1ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnU1RSSU5HJyxcbiAgICAgICAgZW51bWVyYXRpb25zOiBbJ0ltYWdlJywgJ01vdmluZyBJbWFnZSddLFxuICAgICAgICBpc0luamVjdGVkOiB0cnVlLFxuICAgICAgfVxuICAgIH1cbiAgICBpZiAoU3RhcnR1cERhdGFTdG9yZS5Db25maWd1cmF0aW9uLmNvbmZpZykge1xuICAgICAgU3RhcnR1cERhdGFTdG9yZS5Db25maWd1cmF0aW9uLmNvbmZpZy5leHRyYSA9IHt9XG4gICAgfVxuICAgIGNvbnN0IHJlc29sdmVkQ29uZmlndXJhdGlvbiA9IGdldERhdGFUeXBlc0NvbmZpZ3VyYXRpb24oe1xuICAgICAgQ29uZmlndXJhdGlvbjogU3RhcnR1cERhdGFTdG9yZS5Db25maWd1cmF0aW9uLFxuICAgICAgTWV0YWNhcmREZWZpbml0aW9uczogU3RhcnR1cERhdGFTdG9yZS5NZXRhY2FyZERlZmluaXRpb25zLFxuICAgIH0pXG4gICAgZXhwZWN0KHJlc29sdmVkQ29uZmlndXJhdGlvbi5ncm91cE1hcCkudG8uZGVlcC5lcXVhbCh7XG4gICAgICBncm91cHM6IHtcbiAgICAgICAgT3RoZXI6IHtcbiAgICAgICAgICB2YWx1ZXM6IHtcbiAgICAgICAgICAgIEltYWdlOiB7XG4gICAgICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgICAgICBkYXRhdHlwZTogWydJbWFnZSddLFxuICAgICAgICAgICAgICAgICdtZXRhZGF0YS1jb250ZW50LXR5cGUnOiBbJ0ltYWdlJ10sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgICAgICBjbGFzczogdW5kZWZpbmVkLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICdNb3ZpbmcgSW1hZ2UnOiB7XG4gICAgICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgICAgICBkYXRhdHlwZTogWydNb3ZpbmcgSW1hZ2UnXSxcbiAgICAgICAgICAgICAgICAnbWV0YWRhdGEtY29udGVudC10eXBlJzogWydNb3ZpbmcgSW1hZ2UnXSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgICAgIGNsYXNzOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICA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pZ3VyYXRpb24sXG4gICAgICBNZXRhY2FyZERlZmluaXRpb25zOiBTdGFydHVwRGF0YVN0b3JlLk1ldGFjYXJkRGVmaW5pdGlvbnMsXG4gICAgfSlcbiAgICBleHBlY3QocmVzb2x2ZWRDb25maWd1cmF0aW9uLnZhbHVlTWFwKS50by5kZWVwLmVxdWFsKHtcbiAgICAgIFBlcnNvbjoge1xuICAgICAgICBncm91cDoge1xuICAgICAgICAgIG5hbWU6ICdPYmplY3QnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtZmlsZS10ZXh0LW8nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogWydwZXJzb24nXSxcbiAgICAgICAgfSxcbiAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgIGNsYXNzOiAnZmEgZmEtdXNlcicsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgR3JvdXA6IHtcbiAgICAgICAgZ3JvdXA6IHtcbiAgICAgICAgICBuYW1lOiAnT2JqZWN0JyxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWZpbGUtdGV4dC1vJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgZGVzY3JpcHRpb246IFsnZ3JvdXAnXSxcbiAgICAgICAgfSxcbiAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgIGNsYXNzOiAnZmEgZmEtdXNlcnMnLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIEVxdWlwbWVudDoge1xuICAgICAgICBncm91cDoge1xuICAgICAgICAgIG5hbWU6ICdPYmplY3QnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtZmlsZS10ZXh0LW8nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogWydlcXVpcG1lbnQnXSxcbiAgICAgICAgfSxcbiAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgIGNsYXNzOiAnZmEgZmEtd3JlbmNoJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBQbGF0Zm9ybToge1xuICAgICAgICBncm91cDoge1xuICAgICAgICAgIG5hbWU6ICdPYmplY3QnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtZmlsZS10ZXh0LW8nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogWydwbGF0Zm9ybSddLFxuICAgICAgICB9LFxuICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgY2xhc3M6ICdmYSBmYS1pbmR1c3RyeScsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgRmFjaWxpdHk6IHtcbiAgICAgICAgZ3JvdXA6IHtcbiAgICAgICAgICBuYW1lOiAnT2JqZWN0JyxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWZpbGUtdGV4dC1vJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgZGVzY3JpcHRpb246IFsnZmFjaWxpdHknXSxcbiAgICAgICAgfSxcbiAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgIGNsYXNzOiAnZmEgZmEtYnVpbGRpbmcnLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIENpdmlsOiB7XG4gICAgICAgIGdyb3VwOiB7XG4gICAgICAgICAgbmFtZTogJ0hhcHBlbmluZ3MnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtYm9sdCcsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ2NpdmlsJ10sXG4gICAgICAgIH0sXG4gICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICBjbGFzczogJ2ZhIGZhLXVuaXZlcnNpdHknLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIE1pbGl0YXJ5OiB7XG4gICAgICAgIGdyb3VwOiB7XG4gICAgICAgICAgbmFtZTogJ0hhcHBlbmluZ3MnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtYm9sdCcsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ21pbGl0YXJ5J10sXG4gICAgICAgIH0sXG4gICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICBjbGFzczogJ2ZhIGZhLXNoaWVsZCcsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgUG9saXRpY2FsOiB7XG4gICAgICAgIGdyb3VwOiB7XG4gICAgICAgICAgbmFtZTogJ0hhcHBlbmluZ3MnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtYm9sdCcsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ3BvbGl0aWNhbCddLFxuICAgICAgICB9LFxuICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgY2xhc3M6ICdmYSBmYS1iYWxhbmNlLXNjYWxlJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBOYXR1cmFsOiB7XG4gICAgICAgIGdyb3VwOiB7XG4gICAgICAgICAgbmFtZTogJ0hhcHBlbmluZ3MnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtYm9sdCcsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ25hdHVyYWwnXSxcbiAgICAgICAgfSxcbiAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgIGNsYXNzOiAnZmEgZmEtbGVhZicsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgT3RoZXI6IHtcbiAgICAgICAgZ3JvdXA6IHtcbiAgICAgICAgICBuYW1lOiAnSGFwcGVuaW5ncycsXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1ib2x0JyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgZGVzY3JpcHRpb246IFsnb3RoZXInXSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBJbWFnZToge1xuICAgICAgICBncm91cDoge1xuICAgICAgICAgIG5hbWU6ICdWaXN1YWwgTWVkaWEnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtY2FtZXJhLXJldHJvJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgZGF0YXR5cGU6IFsnSW1hZ2UnXSxcbiAgICAgICAgfSxcbiAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgIGNsYXNzOiAnZmEgZmEtcGljdHVyZS1vJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICAnTW92aW5nIEltYWdlJzoge1xuICAgICAgICBncm91cDoge1xuICAgICAgICAgIG5hbWU6ICdWaXN1YWwgTWVkaWEnLFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtY2FtZXJhLXJldHJvJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgZGF0YXR5cGU6IFsnTW92aW5nIEltYWdlJ10sXG4gICAgICAgIH0sXG4gICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICBjbGFzczogJ2ZhIGZhLWZpbG0nLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgICdTdGlsbCBJbWFnZSc6IHtcbiAgICAgICAgZ3JvdXA6IHtcbiAgICAgICAgICBuYW1lOiAnVmlzdWFsIE1lZGlhJyxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWNhbWVyYS1yZXRybycsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgIGRhdGF0eXBlOiBbJ1N0aWxsIEltYWdlJ10sXG4gICAgICAgIH0sXG4gICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICBjbGFzczogJ2ZhIGZhLWNhbWVyYS1yZXRybycsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIH0pXG4gIH0pXG5cbiAgaXQoJ3Nob3VsZCBzb3J0IHZhbHVlcyBhcHByb3ByaWF0ZWx5LCBhY2NvcmRpbmcgdG8gdGhlIGtleSBvcmRlciBpbiB0aGUganNvbiBjb25maWcsIGFuZCBhbHBoYWJldGljYWxseSBvdGhlcndpc2UnLCAoKSA9PiB7XG4gICAgaWYgKFN0YXJ0dXBEYXRhU3RvcmUuQ29uZmlndXJhdGlvbi5jb25maWcpIHtcbiAgICAgIFN0YXJ0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ZSBrbm93biBncm91cHMgYXBwcm9wcmlhdGVseScsICgpID0+IHtcbiAgICBpZiAoU3RhcnR1cERhdGFTdG9yZS5Db25maWd1cmF0aW9uLmNvbmZpZykge1xuICAgICAgU3RhcnR1cERhdGFTdG9yZS5Db25maWd1cmF0aW9uLmNvbmZpZy5leHRyYSA9IHtcbiAgICAgICAgZGF0YXR5cGVzOiBEYXRhdHlwZXNKU09OQ29uZmlnLFxuICAgICAgfVxuICAgIH1cbiAgICBjb25zdCByZXNvbHZlZENvbmZpZ3VyYXRpb24gPSBnZXREYXRhVHlwZXNDb25maWd1cmF0aW9uKHtcbiAgICAgIENvbmZpZ3VyYXRpb246IFN0YXJ0dXBEYXRhU3RvcmUuQ29uZmlndXJhdGlvbixcbiAgICAgIE1ldGFjYXJkRGVmaW5pdGlvbnM6IFN0YXJ0dXBEYXRhU3RvcmUuTWV0YWNhcmREZWZpbml0aW9ucyxcbiAgICB9KVxuICAgIGNvbnN0IGtub3duR3JvdXBzID0gZ2VuZXJhdGVLbm93bkdyb3Vwcyh7XG4gICAgICBkYXRhVHlwZXNDb25maWd1cmF0aW9uOiByZXNvbHZlZENvbmZpZ3VyYXRpb24sXG4gICAgfSlcbiAgICBleHBlY3Qoa25vd25Hcm91cHMpLnRvLmRlZXAuZXF1YWwoWydPYmplY3QnLCAnSGFwcGVuaW5ncycsICdWaXN1YWwgTWVkaWEnXSlcbiAgfSlcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/resizable-grid/resizable-grid.d.ts b/src/main/webapp/component/resizable-grid/resizable-grid.d.ts new file mode 100644 index 00000000000..f813f0316bf --- /dev/null +++ b/src/main/webapp/component/resizable-grid/resizable-grid.d.ts @@ -0,0 +1,38 @@ +import * as React from 'react'; +import { ResizableProps } from 're-resizable'; +export declare const DEFAULT_AUTO_COLLAPSE_LENGTH = 300; +export declare const DEFAULT_STARTING_LENGTH = 550; +export declare const DEFAULT_COLLAPSED_LENGTH = 75; +type ResizableGridType = React.ComponentType>; +export declare const useResizableGridContext: () => useResizableGridType, UseResizableGridContextProvider: React.Provider; +type useResizableGridType = { + length: number; + closed: boolean; + setClosed: React.Dispatch; + setLength: React.Dispatch>; + lastLength: number; + setLastLength: React.Dispatch>; + dragging: boolean; + setDragging: React.Dispatch>; +}; +export declare const useResizableGrid: ({ startingLength, collapsedLength, autoCollapseLength, }?: { + startingLength?: number | undefined; + collapsedLength?: number | undefined; + autoCollapseLength?: number | undefined; +}) => useResizableGridType; +export declare const CustomResizableGrid: import("styled-components").StyledComponent; +type SplitPaneProps = { + firstStyle?: React.CSSProperties | undefined; + secondStyle?: React.CSSProperties | undefined; + variant: 'horizontal' | 'vertical'; + children: [React.ReactNode, React.ReactNode]; + collapsedLength?: number; + autoCollapseLength?: number; + startingLength?: number; + controlled?: useResizableGridType; +}; +export declare const SplitPane: ({ secondStyle, variant, children, collapsedLength, autoCollapseLength, startingLength, controlled, }: SplitPaneProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/resizable-grid/resizable-grid.js b/src/main/webapp/component/resizable-grid/resizable-grid.js new file mode 100644 index 00000000000..a047d2df734 --- /dev/null +++ b/src/main/webapp/component/resizable-grid/resizable-grid.js @@ -0,0 +1,150 @@ +var _a; +import { __assign, __makeTemplateObject, __read } from "tslib"; +import * as React from 'react'; +import Grid from '@mui/material/Grid'; +import { Resizable } from 're-resizable'; +import styled from 'styled-components'; +import { createCtx } from '../../typescript/context'; +import wreqr from '../../js/wreqr'; +export var DEFAULT_AUTO_COLLAPSE_LENGTH = 300; +export var DEFAULT_STARTING_LENGTH = 550; +export var DEFAULT_COLLAPSED_LENGTH = 75; +var ResizableGrid = Grid; +export var useResizableGridContext = (_a = __read(createCtx({ + closed: false, +}), 2), _a[0]), UseResizableGridContextProvider = _a[1]; +export var useResizableGrid = function (_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.startingLength, startingLength = _c === void 0 ? DEFAULT_STARTING_LENGTH : _c, _d = _b.collapsedLength, collapsedLength = _d === void 0 ? DEFAULT_COLLAPSED_LENGTH : _d, _e = _b.autoCollapseLength, autoCollapseLength = _e === void 0 ? DEFAULT_AUTO_COLLAPSE_LENGTH : _e; + var _f = __read(React.useState(false), 2), closed = _f[0], setClosed = _f[1]; + var _g = __read(React.useState(startingLength), 2), length = _g[0], setLength = _g[1]; + var _h = __read(React.useState(startingLength), 2), lastLength = _h[0], setLastLength = _h[1]; + var _j = __read(React.useState(false), 2), dragging = _j[0], setDragging = _j[1]; + React.useEffect(function () { + if (!dragging) { + if (length < autoCollapseLength) { + setClosed(true); + setLength(collapsedLength); + } + else { + setLastLength(length); + setClosed(false); + } + } + setTimeout(function () { + ; + wreqr.vent.trigger('gl-updateSize'); + wreqr.vent.trigger('resize'); + }, 500); + }, [length, dragging]); + React.useEffect(function () { + if (closed && length !== collapsedLength) { + setLastLength(length); + setLength(collapsedLength); + } + }, [closed]); + return { + length: length, + closed: closed, + setClosed: setClosed, + setLength: setLength, + lastLength: lastLength, + setLastLength: setLastLength, + dragging: dragging, + setDragging: setDragging, + }; +}; +export var CustomResizableGrid = styled(ResizableGrid)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .actions {\n opacity: 0;\n transform: translateX(-100%);\n transition: opacity 0.2s ease-in-out 0.5s, transform 0.2s ease-in-out 0.5s;\n }\n > span > div:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n\n :focus-within .actions,\n :hover .actions {\n opacity: 1;\n transform: translateX(-50%);\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n }\n .actions > div + div {\n margin-top: 10px;\n }\n"], ["\n .actions {\n opacity: 0;\n transform: translateX(-100%);\n transition: opacity 0.2s ease-in-out 0.5s, transform 0.2s ease-in-out 0.5s;\n }\n > span > div:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n\n :focus-within .actions,\n :hover .actions {\n opacity: 1;\n transform: translateX(-50%);\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n }\n .actions > div + div {\n margin-top: 10px;\n }\n"]))); +export var SplitPane = function (_a) { + var secondStyle = _a.secondStyle, variant = _a.variant, children = _a.children, _b = _a.collapsedLength, collapsedLength = _b === void 0 ? DEFAULT_COLLAPSED_LENGTH : _b, _c = _a.autoCollapseLength, autoCollapseLength = _c === void 0 ? DEFAULT_AUTO_COLLAPSE_LENGTH : _c, _d = _a.startingLength, startingLength = _d === void 0 ? DEFAULT_STARTING_LENGTH : _d, controlled = _a.controlled; + var _e = controlled || + useResizableGrid({ + startingLength: startingLength, + collapsedLength: collapsedLength, + autoCollapseLength: autoCollapseLength, + }), length = _e.length, closed = _e.closed, setClosed = _e.setClosed, setLength = _e.setLength, lastLength = _e.lastLength, setLastLength = _e.setLastLength, dragging = _e.dragging, setDragging = _e.setDragging; + var _f = __read(children, 2), First = _f[0], Second = _f[1]; + return (React.createElement(UseResizableGridContextProvider, { value: { + length: length, + closed: closed, + setClosed: setClosed, + setLength: setLength, + lastLength: lastLength, + setLastLength: setLastLength, + dragging: dragging, + setDragging: setDragging, + } }, + React.createElement(Grid, { container: true, wrap: "nowrap", direction: (function () { + switch (variant) { + case 'horizontal': + return 'row'; + case 'vertical': + return 'column'; + } + })(), className: "w-full h-full" }, + React.createElement(CustomResizableGrid, { component: Resizable, item: true, size: (function () { + switch (variant) { + case 'horizontal': + return { + width: length, + height: '100%', + }; + case 'vertical': + return { + width: '100%', + height: length, + }; + } + })(), minWidth: collapsedLength, enable: (function () { + switch (variant) { + case 'horizontal': + return { + top: false, + right: true, + bottom: false, + left: false, + topRight: false, + bottomRight: false, + bottomLeft: false, + topLeft: false, + }; + case 'vertical': + return { + top: false, + right: false, + bottom: true, + left: false, + topRight: false, + bottomRight: false, + bottomLeft: false, + topLeft: false, + }; + } + })(), style: { + flexShrink: 0, + }, onResizeStop: function () { + setDragging(false); + }, onResizeStart: function () { + setDragging(true); + }, onResize: function (e) { + switch (variant) { + case 'horizontal': + setLength(e.clientX - + e.target.parentElement.getBoundingClientRect().x); + break; + case 'vertical': + setLength(e.clientY - + e.target.parentElement.getBoundingClientRect().y); + break; + } + }, className: "z-10 pr-2" }, First), + React.createElement(Grid, { item: true, style: (function () { + switch (variant) { + case 'horizontal': + return __assign({ height: '100%', width: "calc(100% - ".concat(length, "px)"), flexShrink: 1 }, secondStyle); + case 'vertical': + return __assign({ height: "calc(100% - ".concat(length, "px)"), width: '100%', flexShrink: 1 }, secondStyle); + } + })() }, Second)))); +}; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzaXphYmxlLWdyaWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Jlc2l6YWJsZS1ncmlkL3Jlc2l6YWJsZS1ncmlkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sSUFBSSxNQUFNLG9CQUFvQixDQUFBO0FBQ3JDLE9BQU8sRUFBRSxTQUFTLEVBQWtCLE1BQU0sY0FBYyxDQUFBO0FBQ3hELE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQTtBQUNwRCxPQUFPLEtBQUssTUFBTSxnQkFBZ0IsQ0FBQTtBQUNsQyxNQUFNLENBQUMsSUFBTSw0QkFBNEIsR0FBRyxHQUFHLENBQUE7QUFDL0MsTUFBTSxDQUFDLElBQU0sdUJBQXVCLEdBQUcsR0FBRyxDQUFBO0FBQzFDLE1BQU0sQ0FBQyxJQUFNLHdCQUF3QixHQUFHLEVBQUUsQ0FBQTtBQVMxQyxJQUFNLGFBQWEsR0FBRyxJQUF5QixDQUFBO0FBQy9DLE1BQU0sQ0FBUSxJQUFBLHVCQUF1QixJQUF4QixLQUFBLE9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GlsZHJlblxuICByZXR1cm4gKFxuICAgIDxVc2VSZXNpemFibGVHcmlkQ29udGV4dFByb3ZpZGVyXG4gICAgICB2YWx1ZT17e1xuICAgICAgICBsZW5ndGgsXG4gICAgICAgIGNsb3NlZCxcbiAgICAgICAgc2V0Q2xvc2VkLFxuICAgICAgICBzZXRMZW5ndGgsXG4gICAgICAgIGxhc3RMZW5ndGgsXG4gICAgICAgIHNldExhc3RMZW5ndGgsXG4gICAgICAgIGRyYWdnaW5nLFxuICAgICAgICBzZXREcmFnZ2luZyxcbiAgICAgIH19XG4gICAgPlxuICAgICAgPEdyaWRcbiAgICAgICAgY29udGFpbmVyXG4gICAgICAgIHdyYXA9XCJub3dyYXBcIlxuICAgICAgICBkaXJlY3Rpb249eygoKSA9PiB7XG4gICAgICAgICAgc3dpdGNoICh2YXJpYW50KSB7XG4gICAgICAgICAgICBjYXNlICdob3Jpem9udGFsJzpcbiAgICAgICAgICAgICAgcmV0dXJuICdyb3cnXG4gICAgICAgICAgICBjYXNlICd2ZXJ0aWNhbCc6XG4gICAgICAgICAgICAgIHJldHVybiAnY29sdW1uJ1xuICAgICAgICAgIH1cbiAgICAgICAgfSkoKX1cbiAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiXG4gICAgICA+XG4gICAgICAgIDxDdXN0b21SZXNpemFibGVHcmlkXG4gICAgICAgICAgY29tcG9uZW50PXtSZXNpemFibGV9XG4gICAgICAgICAgaXRlbVxuICAgICAgICAgIHNpemU9eygoKSA9PiB7XG4gICAgICAgICAgICBzd2l0Y2ggKHZhcmlhbnQpIHtcbiAgICAgICAgICAgICAgY2FzZSAnaG9yaXpvbnRhbCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgIHdpZHRoOiBsZW5ndGgsXG4gICAgICAgICAgICAgICAgICBoZWlnaHQ6ICcxMDAlJyxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGNhc2UgJ3ZlcnRpY2FsJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgICAgICAgIGhlaWdodDogbGVuZ3RoLFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSgpfVxuICAgICAgICAgIG1pbldpZHRoPXtjb2xsYXBzZWRMZW5ndGh9XG4gICAgICAgICAgZW5hYmxlPXsoKCkgPT4ge1xuICAgICAgICAgICAgc3dpdGNoICh2YXJpYW50KSB7XG4gICAgICAgICAgICAgIGNhc2UgJ2hvcml6b250YWwnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICB0b3A6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgcmlnaHQ6IHRydWUsXG4gICAgICAgICAgICAgICAgICBib3R0b206IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgbGVmdDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICB0b3BSaWdodDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICBib3R0b21SaWdodDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICBib3R0b21MZWZ0OiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgIHRvcExlZnQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgY2FzZSAndmVydGljYWwnOlxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICB0b3A6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgcmlnaHQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgYm90dG9tOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgbGVmdDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICB0b3BSaWdodDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICBib3R0b21SaWdodDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICBib3R0b21MZWZ0OiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgIHRvcExlZnQ6IGZhbHNlLFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSgpfVxuICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICBmbGV4U2hyaW5rOiAwLFxuICAgICAgICAgIH19XG4gICAgICAgICAgb25SZXNpemVTdG9wPXsoKSA9PiB7XG4gICAgICAgICAgICBzZXREcmFnZ2luZyhmYWxzZSlcbiAgICAgICAgICB9fVxuICAgICAgICAgIG9uUmVzaXplU3RhcnQ9eygpID0+IHtcbiAgICAgICAgICAgIHNldERyYWdnaW5nKHRydWUpXG4gICAgICAgICAgfX1cbiAgICAgICAgICBvblJlc2l6ZT17KGUpID0+IHtcbiAgICAgICAgICAgIHN3aXRjaCAodmFyaWFudCkge1xuICAgICAgICAgICAgICBjYXNlICdob3Jpem9udGFsJzpcbiAgICAgICAgICAgICAgICBzZXRMZW5ndGgoXG4gICAgICAgICAgICAgICAgICAoZSBhcyBhbnkpLmNsaWVudFggLVxuICAgICAgICAgICAgICAgICAgICAoZS50YXJnZXQgYXMgYW55KS5wYXJlbnRFbGVtZW50LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLnhcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgY2FzZSAndmVydGljYWwnOlxuICAgICAgICAgICAgICAgIHNldExlbmd0aChcbiAgICAgICAgICAgICAgICAgIChlIGFzIGFueSkuY2xpZW50WSAtXG4gICAgICAgICAgICAgICAgICAgIChlLnRhcmdldCBhcyBhbnkpLnBhcmVudEVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkueVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH19XG4gICAgICAgICAgY2xhc3NOYW1lPVwiei0xMCBwci0yXCJcbiAgICAgICAgPlxuICAgICAgICAgIHtGaXJzdH1cbiAgICAgICAgPC9DdXN0b21SZXNpemFibGVHcmlkPlxuICAgICAgICA8R3JpZFxuICAgICAgICAgIGl0ZW1cbiAgICAgICAgICBzdHlsZT17KCgpID0+IHtcbiAgICAgICAgICAgIHN3aXRjaCAodmFyaWFudCkge1xuICAgICAgICAgICAgICBjYXNlICdob3Jpem9udGFsJzpcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnMTAwJScsXG4gICAgICAgICAgICAgICAgICB3aWR0aDogYGNhbGMoMTAwJSAtICR7bGVuZ3RofXB4KWAsXG4gICAgICAgICAgICAgICAgICBmbGV4U2hyaW5rOiAxLFxuICAgICAgICAgICAgICAgICAgLi4uc2Vjb25kU3R5bGUsXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBjYXNlICd2ZXJ0aWNhbCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgIGhlaWdodDogYGNhbGMoMTAwJSAtICR7bGVuZ3RofXB4KWAsXG4gICAgICAgICAgICAgICAgICB3aWR0aDogJzEwMCUnLFxuICAgICAgICAgICAgICAgICAgZmxleFNocmluazogMSxcbiAgICAgICAgICAgICAgICAgIC4uLnNlY29uZFN0eWxlLFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSgpfVxuICAgICAgICA+XG4gICAgICAgICAge1NlY29uZH1cbiAgICAgICAgPC9HcmlkPlxuICAgICAgPC9HcmlkPlxuICAgIDwvVXNlUmVzaXphYmxlR3JpZENvbnRleHRQcm92aWRlcj5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/result-filter/result-filter.d.ts b/src/main/webapp/component/result-filter/result-filter.d.ts new file mode 100644 index 00000000000..e518c8146f7 --- /dev/null +++ b/src/main/webapp/component/result-filter/result-filter.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +declare const _default: ({ closeDropdown }: { + closeDropdown: () => void; +}) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/result-filter/result-filter.js b/src/main/webapp/component/result-filter/result-filter.js new file mode 100644 index 00000000000..4d894599fea --- /dev/null +++ b/src/main/webapp/component/result-filter/result-filter.js @@ -0,0 +1,85 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign, __read } from "tslib"; +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import FilterBranch from '../filter-builder/filter-branch'; +import { FilterBuilderClass, FilterClass, } from '../filter-builder/filter.structure'; +import Button from '@mui/material/Button'; +import Grid from '@mui/material/Grid'; +import user from '../singletons/user-instance'; +import { useListenToEnterKeySubmitEvent } from '../custom-events/enter-key-submit'; +var getResultFilter = function () { + return user.get('user').get('preferences').get('resultFilter'); +}; +var getBaseFilter = function () { + var filter = getResultFilter(); + if (filter === undefined) { + return new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + property: 'anyText', + value: '', + type: 'ILIKE', + }), + ], + negated: false, + }); + } + else if (filter.filters === undefined) { + return new FilterBuilderClass({ + type: 'AND', + filters: [filter], + negated: false, + }); + } + return new FilterBuilderClass(__assign({}, filter)); +}; +var removeFilter = function () { + user.get('user').get('preferences').set('resultFilter', ''); + user.get('user').get('preferences').savePreferences(); +}; +var saveFilter = function (_a) { + var filter = _a.filter; + user.get('user').get('preferences').set('resultFilter', filter); + user.get('user').get('preferences').savePreferences(); +}; +var ResultFilter = function (_a) { + var closeDropdown = _a.closeDropdown; + var _b = __read(React.useState(getBaseFilter()), 2), filter = _b[0], setFilter = _b[1]; + var setElement = useListenToEnterKeySubmitEvent({ + callback: function () { + saveFilter({ filter: filter }); + closeDropdown(); + }, + }).setElement; + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "min-w-120 max-w-120", ref: setElement }, + React.createElement(FilterBranch, { root: true, filter: filter, setFilter: setFilter })), + React.createElement(Grid, { className: "w-full pt-2", container: true, direction: "row", alignItems: "center", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Button, { "data-id": "remove-all-results-filters-button", fullWidth: true, variant: "text", color: "secondary", onClick: function () { + removeFilter(); + closeDropdown(); + } }, "Remove")), + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Button, { "data-id": "save-results-filters-button", fullWidth: true, variant: "contained", color: "primary", onClick: function () { + saveFilter({ filter: filter }); + closeDropdown(); + } }, "Save"))))); +}; +export default hot(module)(ResultFilter); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0LWZpbHRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvcmVzdWx0LWZpbHRlci9yZXN1bHQtZmlsdGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJOztBQUVKLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLE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bW92ZVxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsXCI+XG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgZGF0YS1pZD1cInNhdmUtcmVzdWx0cy1maWx0ZXJzLWJ1dHRvblwiXG4gICAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICAgIHZhcmlhbnQ9XCJjb250YWluZWRcIlxuICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgc2F2ZUZpbHRlcih7IGZpbHRlciB9KVxuICAgICAgICAgICAgICBjbG9zZURyb3Bkb3duKClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgU2F2ZVxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICA8L0dyaWQ+XG4gICAgICA8L0dyaWQ+XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUmVzdWx0RmlsdGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/result-selector/fuzzy-results.d.ts b/src/main/webapp/component/result-selector/fuzzy-results.d.ts new file mode 100644 index 00000000000..e462de748d2 --- /dev/null +++ b/src/main/webapp/component/result-selector/fuzzy-results.d.ts @@ -0,0 +1,2 @@ +export declare const fuzzyResultCount: (resultCount: number) => number | "< 10" | "< 100" | "< 1000" | "< 10,000" | "< 100,000" | "< 1,000,000" | "< 10,000,000" | ">= 10,000,000"; +export declare const fuzzyHits: (resultCount: number) => string; diff --git a/src/main/webapp/component/result-selector/fuzzy-results.js b/src/main/webapp/component/result-selector/fuzzy-results.js new file mode 100644 index 00000000000..605c186d578 --- /dev/null +++ b/src/main/webapp/component/result-selector/fuzzy-results.js @@ -0,0 +1,26 @@ +import { StartupDataStore } from '../../js/model/Startup/startup'; +export var fuzzyResultCount = function (resultCount) { + if (!StartupDataStore.Configuration.getIsFuzzyResultsEnabled()) { + return resultCount; + } + if (resultCount < 10) + return '< 10'; + else if (resultCount < 100) + return '< 100'; + else if (resultCount < 1000) + return '< 1000'; + else if (resultCount < 10000) + return '< 10,000'; + else if (resultCount < 100000) + return '< 100,000'; + else if (resultCount < 1000000) + return '< 1,000,000'; + else if (resultCount < 10000000) + return '< 10,000,000'; + else + return '>= 10,000,000'; +}; +export var fuzzyHits = function (resultCount) { + return "".concat(fuzzyResultCount(resultCount), " hits"); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnV6enktcmVzdWx0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvcmVzdWx0LXNlbGVjdG9yL2Z1enp5LXJlc3VsdHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFBO0FBRWpFLE1BQU0sQ0FBQyxJQUFNLGdCQUFnQixHQUFHLFVBQUMsV0FBbUI7SUFDbEQsSUFBSSxDQUFDLGdCQUFnQixDQUFDLGFBQWEsQ0FBQyx3QkFBd0IsRUFBRSxFQUFFO1FBQzlELE9BQU8sV0FBVyxDQUFBO0tBQ25CO0lBRUQsSUFBSSxXQUFXLEdBQUcsRUFBRTtRQUFFLE9BQU8sTUFBTSxDQUFBO1NBQzlCLElBQUksV0FBVyxHQUFHLEdBQUc7UUFBRSxPQUFPLE9BQU8sQ0FBQTtTQUNyQyxJQUFJLFdBQVcsR0FBRyxJQUFJO1FBQUUsT0FBTyxRQUFRLENBQUE7U0FDdkMsSUFBSSxXQUFXLEdBQUcsS0FBSztRQUFFLE9BQU8sVUFBVSxDQUFBO1NBQzFDLElBQUksV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wMDAnXG4gIGVsc2UgaWYgKHJlc3VsdENvdW50IDwgMTAwMDAwMDApIHJldHVybiAnPCAxMCwwMDAsMDAwJ1xuICBlbHNlIHJldHVybiAnPj0gMTAsMDAwLDAwMCdcbn1cblxuZXhwb3J0IGNvbnN0IGZ1enp5SGl0cyA9IChyZXN1bHRDb3VudDogbnVtYmVyKSA9PiB7XG4gIHJldHVybiBgJHtmdXp6eVJlc3VsdENvdW50KHJlc3VsdENvdW50KX0gaGl0c2Bcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/result-selector/paging.d.ts b/src/main/webapp/component/result-selector/paging.d.ts new file mode 100644 index 00000000000..c4a4ea4ff70 --- /dev/null +++ b/src/main/webapp/component/result-selector/paging.d.ts @@ -0,0 +1,9 @@ +/// +type Props = { + selectionInterface: any; + onClose?: any; + exportSuccessful?: boolean; + setExportSuccessful?: () => void; +}; +declare const _default: ({ selectionInterface }: Props) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/component/result-selector/paging.js b/src/main/webapp/component/result-selector/paging.js new file mode 100644 index 00000000000..438b11a3d3f --- /dev/null +++ b/src/main/webapp/component/result-selector/paging.js @@ -0,0 +1,80 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import { useLazyResultsStatusFromSelectionInterface } from '../selection-interface/hooks'; +import TableExport from '../table-export/table-export'; +import { useDialogState } from '../../component/hooks/useDialogState'; +import Divider from '@mui/material/Divider'; +import { Dialog, DialogActions, DialogTitle } from '@mui/material'; +var determineIsOutdated = function (_a) { + var selectionInterface = _a.selectionInterface; + var search = selectionInterface.get('currentQuery'); + if (search) { + return search.get('isOutdated'); + } + return false; +}; +var Paging = function (_a) { + var selectionInterface = _a.selectionInterface; + var isSearching = useLazyResultsStatusFromSelectionInterface({ + selectionInterface: selectionInterface, + }).isSearching; + var exportDialogState = useDialogState(); + var _b = __read(React.useState(false), 2), exportSuccessful = _b[0], setExportSuccessful = _b[1]; + var _c = __read(React.useState(determineIsOutdated({ selectionInterface: selectionInterface })), 2), isOutdated = _c[0], setIsOutdated = _c[1]; + var _d = useBackbone(), listenTo = _d.listenTo, stopListening = _d.stopListening; + React.useEffect(function () { + var search = selectionInterface.get('currentQuery'); + if (search) { + listenTo(search, 'change:isOutdated', function () { + setIsOutdated(determineIsOutdated({ selectionInterface: selectionInterface })); + }); + } + return function () { + if (search) { + stopListening(search); + } + }; + }); + if (!selectionInterface.get('currentQuery') || + !selectionInterface.get('currentQuery').get('result')) { + return null; + } + var isPreviousDisabled = isOutdated || + selectionInterface.get('currentQuery').hasPreviousServerPage() === false; + var isNextDisabled = isOutdated || + selectionInterface.get('currentQuery').hasNextServerPage() === false; + return (React.createElement(React.Fragment, null, + React.createElement(Button, { "data-id": "prev-page-button", className: "".concat(isPreviousDisabled ? 'invisible' : ''), disabled: isPreviousDisabled, onClick: function () { + selectionInterface.get('currentQuery').getPreviousServerPage(); + } }, "Prev Page"), + React.createElement(Button, { "data-id": "next-page-button", className: "".concat(isPreviousDisabled && isNextDisabled ? 'invisible' : ''), disabled: isNextDisabled, onClick: function () { + selectionInterface.get('currentQuery').getNextServerPage(); + } }, "Next Page"), + React.createElement(exportDialogState.MuiDialogComponents.Dialog, __assign({}, exportDialogState.MuiDialogProps, { disableEscapeKeyDown: true, onClose: function (event, reason) { + if (reason === 'backdropClick') { + return; + } + exportDialogState.MuiDialogProps.onClose(event, reason); + } }), + React.createElement(exportDialogState.MuiDialogComponents.DialogTitle, null, + React.createElement("div", { className: "flex flex-row items-center justify-between flex-nowrap w-full" }, "Export Results")), + React.createElement(Divider, null), + React.createElement(TableExport, { selectionInterface: selectionInterface, setExportSuccessful: setExportSuccessful, exportSuccessful: exportSuccessful, onClose: function () { + exportDialogState.handleClose(); + } })), + React.createElement(Button, { "data-id": "export-table-button", className: "".concat(isOutdated ? 'invisible' : ''), disabled: isSearching, onClick: function () { + exportDialogState.handleClick(); + }, color: "primary" }, "Export"), + exportSuccessful && (React.createElement(Dialog, { open: exportSuccessful }, + React.createElement(DialogTitle, null, + React.createElement("div", { className: "flex flex-row items-center justify-between flex-nowrap w-full" }, "Export Successful!")), + React.createElement(Divider, null), + React.createElement(DialogActions, null, + React.createElement("div", { className: "pt-2", style: { display: 'flex', justifyContent: 'flex-end' } }, + React.createElement(Button, { color: "primary", onClick: function () { return setExportSuccessful(false); } }, "Close"))))))); +}; +export default hot(module)(Paging); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9yZXN1bHQtc2VsZWN0b3IvcGFnaW5nLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQTtBQUNwRSxPQUFPLEVBQUUsMENBQTBDLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQTtBQUN6RixPQUFPLFdBQVcsTUFBTSw4QkFBOEIsQ0FBQTtBQUN0RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sc0NBQXNDLENBQUE7QUFDckUsT0FBTyxPQUFPLE1BQU0sdUJBQXVCLENBQUE7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxhQUFhLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBU2xFLElBQU0sbUJBQW1CLEdBQUcsVUFBQyxFQUE2QjtRQUEzQixrQ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AgICAgICBjbGFzc05hbWU9XCJwdC0yXCJcbiAgICAgICAgICAgICAgc3R5bGU9e3sgZGlzcGxheTogJ2ZsZXgnLCBqdXN0aWZ5Q29udGVudDogJ2ZsZXgtZW5kJyB9fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBzZXRFeHBvcnRTdWNjZXNzZnVsKGZhbHNlKX1cbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIENsb3NlXG4gICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9EaWFsb2dBY3Rpb25zPlxuICAgICAgICA8L0RpYWxvZz5cbiAgICAgICl9XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUGFnaW5nKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/result-selector/query-feed.d.ts b/src/main/webapp/component/result-selector/query-feed.d.ts new file mode 100644 index 00000000000..36244386e41 --- /dev/null +++ b/src/main/webapp/component/result-selector/query-feed.d.ts @@ -0,0 +1,6 @@ +/// +type Props = { + selectionInterface: any; +}; +declare const _default: ({ selectionInterface }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/result-selector/query-feed.js b/src/main/webapp/component/result-selector/query-feed.js new file mode 100644 index 00000000000..57e2d07acf6 --- /dev/null +++ b/src/main/webapp/component/result-selector/query-feed.js @@ -0,0 +1,147 @@ +import { __assign, __makeTemplateObject, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Paper from '@mui/material/Paper'; +import moment from 'moment'; +import styled from 'styled-components'; +import Button from '@mui/material/Button'; +import { useLazyResultsStatusFromSelectionInterface } from '../selection-interface/hooks'; +import Tooltip from '@mui/material/Tooltip'; +import { Elevations } from '../theme/theme'; +import FilterListIcon from '@mui/icons-material/FilterList'; +import { fuzzyHits, fuzzyResultCount } from './fuzzy-results'; +import WarningIcon from '@mui/icons-material/Warning'; +import ErrorIcon from '@mui/icons-material/Error'; +import { useMenuState } from '../menu-state/menu-state'; +import Popover from '@mui/material/Popover'; +var Cell = styled.td(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 20px;\n border: solid 1px rgba(120, 120, 120, 0.2);\n"], ["\n padding: 20px;\n border: solid 1px rgba(120, 120, 120, 0.2);\n"]))); +var HeaderCell = styled.th(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 20px;\n"], ["\n padding: 20px;\n"]))); +var CellValue = function (props) { + var value = props.value, _a = props.warnings, warnings = _a === void 0 ? [] : _a, _b = props.errors, errors = _b === void 0 ? [] : _b, message = props.message, alwaysShowValue = props.alwaysShowValue, hasReturned = props.hasReturned, successful = props.successful; + return (React.createElement(React.Fragment, null, + (errors.length > 0 || !successful) && (React.createElement(Tooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, (function () { + if (errors.length > 0) { + return errors.map(function (error) { return React.createElement("div", { key: error }, error); }); + } + else if (message) { + return message; + } + else { + return 'Something went wrong searching this source.'; + } + })()) }, + React.createElement(ErrorIcon, { style: { paddingRight: '5px' }, color: "error" }))), + warnings.length > 0 && (React.createElement(Tooltip, { title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, warnings.map(function (warning) { return (React.createElement("div", { key: warning }, warning)); })) }, + React.createElement(WarningIcon, { style: { paddingRight: '5px' }, color: "warning" }))), + alwaysShowValue || (!message && hasReturned) ? value : null, + !hasReturned && !alwaysShowValue && (React.createElement("span", { className: "fa fa-circle-o-notch fa-spin", title: "Waiting for source to return" })))); +}; +var QueryStatusRow = function (_a) { + var status = _a.status, query = _a.query; + var hasReturned = status.hasReturned; + var successful = status.successful; + var message = status.message; + var warnings = status.warnings; + var errors = status.errors; + var id = status.id; + return (React.createElement("tr", { "data-id": "source-".concat(id, "-row") }, + React.createElement(Cell, { "data-id": "source-id-label" }, + React.createElement(CellValue, { value: id, hasReturned: hasReturned, successful: successful, warnings: warnings, errors: errors, message: message, alwaysShowValue: true })), + React.createElement(Cell, { "data-id": "available-label" }, + React.createElement(CellValue, { value: "".concat(status.count, " hit").concat(status.count === 1 ? '' : 's'), hasReturned: hasReturned, successful: successful, warnings: warnings, errors: errors, message: message })), + React.createElement(Cell, { "data-id": "possible-label" }, + React.createElement(CellValue, { value: fuzzyHits(status.hits), hasReturned: hasReturned, successful: successful, warnings: warnings, errors: errors, message: message })), + React.createElement(Cell, { "data-id": "time-label" }, + React.createElement(CellValue, { value: status.elapsed / 1000, hasReturned: hasReturned, successful: successful, warnings: warnings, errors: errors, message: message })), + React.createElement(Cell, { className: "status-filter" }, + React.createElement(Tooltip, { title: "Click to search only this source." }, + React.createElement(Button, { "data-id": "filter-button", onClick: function () { + query.set('sources', [status.id]); + query.startSearchFromFirstPage(); + }, color: "primary" }, + React.createElement(FilterListIcon, { className: "Mui-text-text-primary" }), + "Filter"))))); +}; +var QueryStatus = function (_a) { + var statusBySource = _a.statusBySource, query = _a.query; + return (React.createElement("table", null, + React.createElement("tr", null, + React.createElement(HeaderCell, null, "Source"), + React.createElement(HeaderCell, { "data-help": "This is the number of results available based on the current sorting." }, "Available"), + React.createElement(HeaderCell, { "data-help": "This is the total number of results (hits) that matched your search." }, "Possible"), + React.createElement(HeaderCell, { "data-help": "This is the time (in seconds) that it took for the search to run." }, "Time (s)"), + React.createElement(HeaderCell, { "data-help": "Locally filter results to be from a specific source." }, "Filter")), + React.createElement("tbody", null, statusBySource.map(function (status) { + return (React.createElement(QueryStatusRow, { key: status.id, status: status, query: query })); + })))); +}; +var LastRan = function (_a) { + var currentAsOf = _a.currentAsOf; + var _b = __read(React.useState(moment(currentAsOf).fromNow()), 2), howLongAgo = _b[0], setHowLongAgo = _b[1]; + React.useEffect(function () { + setHowLongAgo(moment(currentAsOf).fromNow()); + var intervalId = setInterval(function () { + setHowLongAgo(moment(currentAsOf).fromNow()); + }, 60000); + return function () { + clearInterval(intervalId); + }; + }, [currentAsOf]); + return React.createElement("div", { style: { whiteSpace: 'nowrap' } }, + "Current as of ", + howLongAgo); +}; +var QueryFeed = function (_a) { + var selectionInterface = _a.selectionInterface; + var _b = useMenuState(), MuiButtonProps = _b.MuiButtonProps, MuiPopoverProps = _b.MuiPopoverProps; + var _c = useLazyResultsStatusFromSelectionInterface({ + selectionInterface: selectionInterface, + }), status = _c.status, currentAsOf = _c.currentAsOf, isSearching = _c.isSearching; + var statusBySource = Object.values(status); + var resultMessage = '', pending = false, failed = false, warnings = false, errors = false; + if (statusBySource.length === 0) { + resultMessage = 'Has not been run'; + } + else { + var sourcesThatHaveReturned = statusBySource.filter(function (status) { return status.hasReturned; }); + if (sourcesThatHaveReturned.length > 0) { + var results = statusBySource.filter(function (status) { return status.hasReturned; }); + var available_1 = 0; + var possible_1 = 0; + results.forEach(function (result) { + var _a, _b; + available_1 += (_a = result === null || result === void 0 ? void 0 : result.count) !== null && _a !== void 0 ? _a : 0; + possible_1 += (_b = result === null || result === void 0 ? void 0 : result.hits) !== null && _b !== void 0 ? _b : 0; + }); + resultMessage = "".concat(available_1, " hit").concat(available_1 === 1 ? '' : 's', " out of ").concat(fuzzyResultCount(possible_1), " possible"); + } + else { + resultMessage = 'Searching...'; + } + failed = sourcesThatHaveReturned.some(function (status) { return !status.successful; }); + warnings = sourcesThatHaveReturned.some(function (status) { return status.warnings && status.warnings.length > 0; }); + errors = sourcesThatHaveReturned.some(function (status) { + return status.errors && status.errors.length > 0; + }); + pending = isSearching; + } + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "flex flex-row items-center flex-nowrap" }, + React.createElement("div", { className: "leading-5" }, + React.createElement("div", { "data-id": "results-count-label", title: resultMessage, className: " whitespace-nowrap" }, resultMessage), + React.createElement(LastRan, { currentAsOf: currentAsOf })), + React.createElement("div", null, + React.createElement("div", null, + React.createElement("div", { className: "relative" }, + React.createElement(Button, __assign({ "data-id": "heartbeat-button", title: "Show the full status for the search.", "data-help": "Show the full status for the search." }, MuiButtonProps), + pending && (React.createElement("i", { className: "fa fa-circle-o-notch fa-spin is-critical-animation", style: { paddingRight: '2px' } })), + (errors || failed) && (React.createElement(ErrorIcon, { fontSize: "inherit", color: "error" })), + warnings && React.createElement(WarningIcon, { fontSize: "inherit", color: "warning" }), + React.createElement("span", { className: "fa fa-heartbeat" })), + React.createElement(Popover, __assign({}, MuiPopoverProps), + React.createElement(Paper, { "data-id": "query-status-container", style: { padding: '20px' }, className: "intrigue-table" }, + React.createElement(QueryStatus, { statusBySource: statusBySource, query: selectionInterface.getCurrentQuery() }))))))))); +}; +export default hot(module)(QueryFeed); +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktZmVlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvcmVzdWx0LXNlbGVjdG9yL3F1ZXJ5LWZlZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxLQUFLLE1BQU0scUJBQXFCLENBQUE7QUFDdkMsT0FBTyxNQUFNLE1BQU0sUUFBUSxDQUFBO0FBQzNCLE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBRXpDLE9BQU8sRUFBRSwwQ0FBMEMsRUFBRSxNQUFNLDhCQUE4QixDQUFBO0FBQ3pGLE9BQU8sT0FBTyxNQUFNLHVCQUF1QixDQUFBO0FBQzNDLE9BQU8sRUFBRSxV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B7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gJ1NvbWV0aGluZyB3ZW50IHdyb25nIHNlYXJjaGluZyB0aGlzIHNvdXJjZS4nXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSgpfVxuICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICB9XG4gICAgICAgID5cbiAgICAgICAgICA8RXJyb3JJY29uIHN0eWxlPXt7IHBhZGRpbmdSaWdodDogJzVweCcgfX0gY29sb3I9XCJlcnJvclwiIC8+XG4gICAgICAgIDwvVG9vbHRpcD5cbiAgICAgICl9XG4gICAgICB7d2FybmluZ3MubGVuZ3RoID4gMCAmJiAoXG4gICAgICAgIDxUb29sdGlwXG4gICAgICAgICAgdGl0bGU9e1xuICAgICAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30gY2xhc3NOYW1lPVwicC0yXCI+XG4gICAgICAgICAgICAgIHt3YXJuaW5ncy5tYXAoKHdhcm5pbmcpID0+IChcbiAgICAgICAgICAgICAgICA8ZGl2IGtleT17d2FybmluZ30+e3dhcm5pbmd9PC9kaXY+XG4gICAgICAgICAgICAgICkpfVxuICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICB9XG4gICAgICAgID5cbiAgICAgICAgICA8V2FybmluZ0ljb24gc3R5bGU9e3sgcGFkZGluZ1JpZ2h0OiAnNXB4JyB9fSBjb2xvcj1cIndhcm5pbmdcIiAvPlxuICAgICAgICA8L1Rvb2x0aXA+XG4gICAgICApfVxuICAgICAge2Fsd2F5c1Nob3dWYWx1ZSB8fCAoIW1lc3NhZ2UgJiYgaGFzUmV0dXJuZWQpID8gdmFsdWUgOiBudWxsfVxuICAgICAgeyFoYXNSZXR1cm5lZCAmJiAhYWx3YXlzU2hvd1ZhbHVlICYmIChcbiAgICAgICAgP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gIGRhdGEtaGVscD1cIlNob3cgdGhlIGZ1bGwgc3RhdHVzIGZvciB0aGUgc2VhcmNoLlwiXG4gICAgICAgICAgICAgICAgey4uLk11aUJ1dHRvblByb3BzfVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge3BlbmRpbmcgJiYgKFxuICAgICAgICAgICAgICAgICAgPGlcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiZmEgZmEtY2lyY2xlLW8tbm90Y2ggZmEtc3BpbiBpcy1jcml0aWNhbC1hbmltYXRpb25cIlxuICAgICAgICAgICAgICAgICAgICBzdHlsZT17eyBwYWRkaW5nUmlnaHQ6ICcycHgnIH19XG4gICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgeyhlcnJvcnMgfHwgZmFpbGVkKSAmJiAoXG4gICAgICAgICAgICAgICAgICA8RXJyb3JJY29uIGZvbnRTaXplPVwiaW5oZXJpdFwiIGNvbG9yPVwiZXJyb3JcIiAvPlxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAge3dhcm5pbmdzICYmIDxXYXJuaW5nSWNvbiBmb250U2l6ZT1cImluaGVyaXRcIiBjb2xvcj1cIndhcm5pbmdcIiAvPn1cbiAgICAgICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9XCJmYSBmYS1oZWFydGJlYXRcIiAvPlxuICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgPFBvcG92ZXIgey4uLk11aVBvcG92ZXJQcm9wc30+XG4gICAgICAgICAgICAgICAgPFBhcGVyXG4gICAgICAgICAgICAgICAgICBkYXRhLWlkPVwicXVlcnktc3RhdHVzLWNvbnRhaW5lclwiXG4gICAgICAgICAgICAgICAgICBzdHlsZT17eyBwYWRkaW5nOiAnMjBweCcgfX1cbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImludHJpZ3VlLXRhYmxlXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICA8UXVlcnlTdGF0dXNcbiAgICAgICAgICAgICAgICAgICAgc3RhdHVzQnlTb3VyY2U9e3N0YXR1c0J5U291cmNlfVxuICAgICAgICAgICAgICAgICAgICBxdWVyeT17c2VsZWN0aW9uSW50ZXJmYWNlLmdldEN1cnJlbnRRdWVyeSgpfVxuICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICAgICAgICA8L1BvcG92ZXI+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShRdWVyeUZlZWQpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/result-selector/result-selector.d.ts b/src/main/webapp/component/result-selector/result-selector.d.ts new file mode 100644 index 00000000000..b72c0d9107e --- /dev/null +++ b/src/main/webapp/component/result-selector/result-selector.d.ts @@ -0,0 +1,11 @@ +/// +import { ResultType } from '../../js/model/Types'; +type Props = { + selectionInterface: any; + model: any; + goldenLayout: any; + layoutResult?: ResultType; + editLayoutRef?: any; +}; +declare const _default: ({ selectionInterface, model, goldenLayout, layoutResult, editLayoutRef, }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/result-selector/result-selector.js b/src/main/webapp/component/result-selector/result-selector.js new file mode 100644 index 00000000000..73771e3271c --- /dev/null +++ b/src/main/webapp/component/result-selector/result-selector.js @@ -0,0 +1,125 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import Spellcheck from '../spellcheck/spellcheck'; +import Grid from '@mui/material/Grid'; +import { hot } from 'react-hot-loader'; +import QueryFeed from './query-feed'; +import LinearProgress from '@mui/material/LinearProgress'; +import Paging from './paging'; +import Paper from '@mui/material/Paper'; +import Button from '@mui/material/Button'; +import FilterListIcon from '@mui/icons-material/FilterList'; +import ResultFilter from '../result-filter/result-filter'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import EphemeralSearchSort from '../../react-component/query-sort-selection/ephemeral-search-sort'; +import { useLazyResultsStatusFromSelectionInterface, useLazyResultsSelectedResultsFromSelectionInterface, } from '../selection-interface/hooks'; +import VisualizationSelector from '../../react-component/visualization-selector/visualization-selector'; +import LayoutDropdownIcon from '@mui/icons-material/ViewComfy'; +import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward'; +import user from '../singletons/user-instance'; +import MoreIcon from '@mui/icons-material/MoreVert'; +import LazyMetacardInteractions from '../visualization/results-visual/lazy-metacard-interactions'; +import { Elevations } from '../theme/theme'; +import SelectionRipple from '../golden-layout/selection-ripple'; +import Extensions from '../../extension-points'; +import { useMenuState } from '../menu-state/menu-state'; +import Popover from '@mui/material/Popover'; +import Badge from '@mui/material/Badge'; +var SelectedResults = function (_a) { + var selectionInterface = _a.selectionInterface; + var selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResultsArray = Object.values(selectedResults); + var _b = useMenuState(), MuiButtonProps = _b.MuiButtonProps, MuiPopoverProps = _b.MuiPopoverProps, handleClose = _b.handleClose; + return (React.createElement(React.Fragment, null, + React.createElement(Button, __assign({ "data-id": "result-selector-more-vert-button", className: "relative ".concat(selectedResultsArray.length === 0 ? 'invisible' : ''), color: "primary", disabled: selectedResultsArray.length === 0, style: { height: '100%' }, size: "small" }, MuiButtonProps), + selectedResultsArray.length, + " selected", + React.createElement("div", { className: selectedResultsArray.length === 0 ? '' : 'Mui-text-text-primary' }, + React.createElement(MoreIcon, null))), + React.createElement(Popover, __assign({}, MuiPopoverProps, { keepMounted: true }), + React.createElement(Paper, null, + React.createElement(LazyMetacardInteractions, { lazyResults: selectedResultsArray, onClose: handleClose }))))); +}; +var determineResultFilterSize = function () { + var resultFilters = user.get('user').get('preferences').get('resultFilter'); + if (!resultFilters || !resultFilters.filters) { + return 0; + } + return resultFilters.filters.length; +}; +var determineResultSortSize = function () { + var resultSorts = user.get('user').get('preferences').get('resultSort'); + if (!resultSorts) { + return 0; + } + return resultSorts.length; +}; +var ResultSelector = function (_a) { + var selectionInterface = _a.selectionInterface, model = _a.model, goldenLayout = _a.goldenLayout, layoutResult = _a.layoutResult, editLayoutRef = _a.editLayoutRef; + var isSearching = useLazyResultsStatusFromSelectionInterface({ + selectionInterface: selectionInterface, + }).isSearching; + var _b = __read(React.useState(determineResultFilterSize()), 2), resultFilterSize = _b[0], setResultFilterSize = _b[1]; + var _c = __read(React.useState(determineResultSortSize()), 2), resultSortSize = _c[0], setResultSortSize = _c[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:resultFilter', function () { + setResultFilterSize(determineResultFilterSize()); + }); + listenTo(user.get('user').get('preferences'), 'change:resultSort', function () { + setResultSortSize(determineResultSortSize()); + }); + }, []); + var LayoutDropdown = Extensions.layoutDropdown({ + goldenLayout: goldenLayout, + layoutResult: layoutResult, + editLayoutRef: editLayoutRef, + }); + var resultFilterMenuState = useMenuState(); + var resultSortMenuState = useMenuState(); + var layoutMenuState = useMenuState(); + return (React.createElement(React.Fragment, null, + React.createElement(Grid, { container: true, alignItems: "center", justifyContent: "flex-start", direction: "row" }, + isSearching ? (React.createElement(LinearProgress, { variant: "query", className: "opacity-100 absolute w-full h-1 left-0 bottom-0" })) : null, + React.createElement(Grid, { item: true }, + React.createElement(Spellcheck, { key: Math.random(), selectionInterface: selectionInterface, model: model })), + React.createElement(Grid, { item: true, className: "relative z-10" }, + React.createElement(QueryFeed, { selectionInterface: selectionInterface })), + React.createElement(Grid, { item: true, className: "relative z-0" }, + React.createElement(SelectionRipple, { selectionInterface: selectionInterface }), + React.createElement(SelectedResults, { selectionInterface: selectionInterface })), + React.createElement(Grid, { item: true, className: "pl-2 mx-auto" }, + React.createElement(Paging, { selectionInterface: selectionInterface })), + React.createElement(Grid, { item: true, className: "ml-auto" }, + React.createElement(Button, __assign({ "data-id": "filter-button", variant: "text", color: "primary" }, resultFilterMenuState.MuiButtonProps), + React.createElement(Badge, { color: "secondary", badgeContent: resultFilterSize, anchorOrigin: { + vertical: 'top', + horizontal: 'left', + }, className: "items-center" }, + React.createElement(FilterListIcon, { className: "Mui-text-text-primary" }), + "Filter")), + React.createElement(Popover, __assign({}, resultFilterMenuState.MuiPopoverProps), + React.createElement(Paper, { className: "p-3", elevation: Elevations.overlays }, + React.createElement(ResultFilter, { closeDropdown: resultFilterMenuState.handleClose })))), + React.createElement(Grid, { item: true, className: "pl-2" }, + React.createElement(Button, __assign({ "data-id": "sort-button", variant: "text", color: "primary" }, resultSortMenuState.MuiButtonProps), + React.createElement(Badge, { color: "secondary", badgeContent: resultSortSize, anchorOrigin: { + vertical: 'top', + horizontal: 'left', + }, className: "items-center" }, + React.createElement(ArrowDownwardIcon, { className: "Mui-text-text-primary" }), + "Sort")), + React.createElement(Popover, __assign({}, resultSortMenuState.MuiPopoverProps), + React.createElement(Paper, { className: "p-3", elevation: Elevations.overlays }, + React.createElement(EphemeralSearchSort, { closeDropdown: resultSortMenuState.handleClose })))), + React.createElement(Grid, { item: true, className: "pl-2" }, + React.createElement(Button, __assign({ "data-id": "layout-button", color: "primary" }, layoutMenuState.MuiButtonProps), + React.createElement(LayoutDropdownIcon, { className: "Mui-text-text-primary" }), + React.createElement("div", { className: "pl-1" }, "Layout")), + React.createElement(Popover, __assign({}, layoutMenuState.MuiPopoverProps), + React.createElement(Paper, { className: "p-3", elevation: Elevations.overlays }, LayoutDropdown || (React.createElement(VisualizationSelector, { onClose: layoutMenuState.handleClose, goldenLayout: goldenLayout })))))))); +}; +export default hot(module)(ResultSelector); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0LXNlbGVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXB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AgIDxCdXR0b25cbiAgICAgICAgICAgIGRhdGEtaWQ9XCJmaWx0ZXItYnV0dG9uXCJcbiAgICAgICAgICAgIHZhcmlhbnQ9XCJ0ZXh0XCJcbiAgICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgICAgICB7Li4ucmVzdWx0RmlsdGVyTWVudVN0YXRlLk11aUJ1dHRvblByb3BzfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxCYWRnZVxuICAgICAgICAgICAgICBjb2xvcj1cInNlY29uZGFyeVwiXG4gICAgICAgICAgICAgIGJhZGdlQ29udGVudD17cmVzdWx0RmlsdGVyU2l6ZX1cbiAgICAgICAgICAgICAgYW5jaG9yT3JpZ2luPXt7XG4gICAgICAgICAgICAgICAgdmVydGljYWw6ICd0b3AnLFxuICAgICAgICAgICAgICAgIGhvcml6b250YWw6ICdsZWZ0JyxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiaXRlbXMtY2VudGVyXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPEZpbHRlckxpc3RJY29uIGNsYXNzTmFtZT1cIk11aS10ZXh0LXRleHQtcHJpbWFyeVwiIC8+XG4gICAgICAgICAgICAgIEZpbHRlclxuICAgICAgICAgICAgPC9CYWRnZT5cbiAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICA8UG9wb3ZlciB7Li4ucmVzdWx0RmlsdGVyTWVudVN0YXRlLk11aVBvcG92ZXJQcm9wc30+XG4gICAgICAgICAgICA8UGFwZXIgY2xhc3NOYW1lPVwicC0zXCIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfT5cbiAgICAgICAgICAgICAgPFJlc3VsdEZpbHRlciBjbG9zZURyb3Bkb3duPXtyZXN1bHRGaWx0ZXJNZW51U3RhdGUuaGFuZGxlQ2xvc2V9IC8+XG4gICAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICAgIDwvUG9wb3Zlcj5cbiAgICAgICAgPC9HcmlkPlxuICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInBsLTJcIj5cbiAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICBkYXRhLWlkPVwic29ydC1idXR0b25cIlxuICAgICAgICAgICAgdmFyaWFudD1cInRleHRcIlxuICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgIHsuLi5yZXN1bHRTb3J0TWVudVN0YXRlLk11aUJ1dHRvblByb3BzfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxCYWRnZVxuICAgICAgICAgICAgICBjb2xvcj1cInNlY29uZGFyeVwiXG4gICAgICAgICAgICAgIGJhZGdlQ29udGVudD17cmVzdWx0U29ydFNpemV9XG4gICAgICAgICAgICAgIGFuY2hvck9yaWdpbj17e1xuICAgICAgICAgICAgICAgIHZlcnRpY2FsOiAndG9wJyxcbiAgICAgICAgICAgICAgICBob3Jpem9udGFsOiAnbGVmdCcsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cIml0ZW1zLWNlbnRlclwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxBcnJvd0Rvd253YXJkSWNvbiBjbGFzc05hbWU9XCJNdWktdGV4dC10ZXh0LXByaW1hcnlcIiAvPlxuICAgICAgICAgICAgICBTb3J0XG4gICAgICAgICAgICA8L0JhZGdlPlxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDxQb3BvdmVyIHsuLi5yZXN1bHRTb3J0TWVudVN0YXRlLk11aVBvcG92ZXJQcm9wc30+XG4gICAgICAgICAgICA8UGFwZXIgY2xhc3NOYW1lPVwicC0zXCIgZWxldmF0aW9uPXtFbGV2YXRpb25zLm92ZXJsYXlzfT5cbiAgICAgICAgICAgICAgPEVwaGVtZXJhbFNlYXJjaFNvcnRcbiAgICAgICAgICAgICAgICBjbG9zZURyb3Bkb3duPXtyZXN1bHRTb3J0TWVudVN0YXRlLmhhbmRsZUNsb3NlfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICA8L1BvcG92ZXI+XG4gICAgICAgIDwvR3JpZD5cbiAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJwbC0yXCI+XG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgZGF0YS1pZD1cImxheW91dC1idXR0b25cIlxuICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgIHsuLi5sYXlvdXRNZW51U3RhdGUuTXVpQnV0dG9uUHJvcHN9XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPExheW91dERyb3Bkb3duSWNvbiBjbGFzc05hbWU9XCJNdWktdGV4dC10ZXh0LXByaW1hcnlcIiAvPlxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJwbC0xXCI+TGF5b3V0PC9kaXY+XG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPFBvcG92ZXIgey4uLmxheW91dE1lbnVTdGF0ZS5NdWlQb3BvdmVyUHJvcHN9PlxuICAgICAgICAgICAgPFBhcGVyIGNsYXNzTmFtZT1cInAtM1wiIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30+XG4gICAgICAgICAgICAgIHtMYXlvdXREcm9wZG93biB8fCAoXG4gICAgICAgICAgICAgICAgPFZpc3VhbGl6YXRpb25TZWxlY3RvclxuICAgICAgICAgICAgICAgICAgb25DbG9zZT17bGF5b3V0TWVudVN0YXRlLmhhbmRsZUNsb3NlfVxuICAgICAgICAgICAgICAgICAgZ29sZGVuTGF5b3V0PXtnb2xkZW5MYXlvdXR9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgICAgPC9Qb3BvdmVyPlxuICAgICAgICA8L0dyaWQ+XG4gICAgICA8L0dyaWQ+XG4gICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShSZXN1bHRTZWxlY3RvcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/selection-checkbox/useBackbone.hook.d.ts b/src/main/webapp/component/selection-checkbox/useBackbone.hook.d.ts new file mode 100644 index 00000000000..652bbbf3676 --- /dev/null +++ b/src/main/webapp/component/selection-checkbox/useBackbone.hook.d.ts @@ -0,0 +1,14 @@ +export type WithBackboneProps = { + listenTo: (object: any, events: string, callback: Function) => any; + stopListening: (object?: any, events?: string | undefined, callback?: Function | undefined) => any; + listenToOnce: (object: any, events: string, callback: Function) => any; +}; +export declare function useBackbone(): WithBackboneProps; +/** + * This is the most common use case. You start listening at the first lifecycle (render), and stop listening at the last lifecycle (destruction). + * If the paremeters ever change, we unlisten to the old case and relisten with the new parameters (object, events, callback). + * + * For more complex uses, it's better to use useBackbone which gives you more control. + * @param parameters + */ +export declare function useListenTo(...parameters: Parameters): void; diff --git a/src/main/webapp/component/selection-checkbox/useBackbone.hook.js b/src/main/webapp/component/selection-checkbox/useBackbone.hook.js new file mode 100644 index 00000000000..3255dcc44de --- /dev/null +++ b/src/main/webapp/component/selection-checkbox/useBackbone.hook.js @@ -0,0 +1,41 @@ +import Backbone from 'backbone'; +import * as React from 'react'; +export function useBackbone() { + var backboneModel = new Backbone.Model({}); + React.useEffect(function () { + return function () { + backboneModel.stopListening(); + backboneModel.destroy(); + }; + }, []); + return { + listenTo: backboneModel.listenTo.bind(backboneModel), + stopListening: backboneModel.stopListening.bind(backboneModel), + listenToOnce: backboneModel.listenToOnce.bind(backboneModel), + }; +} +/** + * This is the most common use case. You start listening at the first lifecycle (render), and stop listening at the last lifecycle (destruction). + * If the paremeters ever change, we unlisten to the old case and relisten with the new parameters (object, events, callback). + * + * For more complex uses, it's better to use useBackbone which gives you more control. + * @param parameters + */ +export function useListenTo() { + var parameters = []; + for (var _i = 0; _i < arguments.length; _i++) { + parameters[_i] = arguments[_i]; + } + var _a = useBackbone(), listenTo = _a.listenTo, stopListening = _a.stopListening; + React.useEffect(function () { + if (parameters[0]) { + listenTo.apply(undefined, parameters); + } + return function () { + if (parameters[0]) { + stopListening.apply(undefined, parameters); + } + }; + }, [parameters]); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQmFja2JvbmUuaG9vay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvc2VsZWN0aW9uLWNoZWNrYm94L3VzZUJhY2tib25lLmhvb2sudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUMvQixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQVk5QixNQUFNLFVBQVUsV0FBVztJQUN6QixJQUFNLGFBQWEsR0FBRyxJQUFJLFFBQVEsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUE7SUFDNUMsS0FBSyxDQUFDLFNBQVMsQ0FBQztRQUNkLE9BQU87WUFDTCxhQUFhLENBQUMsYUFBYSxFQUFFLENBQUE7WUFDN0IsYUFBYSxDQUFDLE9BQU8sRUFBRSxDQUFBO1FBQ3pCLENBQUMsQ0FBQTtJQUNILENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQTtJQUNOLE9BQU87UUFDTCxRQUFRLEVBQUUsYUFBYSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsYUFBYSxDQUFDO1FBQ3BELGFBQWEsRUFBRSxhQUFhLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUM7UUFDOUQsWUFBWSxFQUFFLGFBQWEsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLGFBQWEsQ0FBQztLQUM3RCxDQ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9yZSBjb21wbGV4IHVzZXMsIGl0J3MgYmV0dGVyIHRvIHVzZSB1c2VCYWNrYm9uZSB3aGljaCBnaXZlcyB5b3UgbW9yZSBjb250cm9sLlxuICogQHBhcmFtIHBhcmFtZXRlcnNcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIHVzZUxpc3RlblRvKFxuICAuLi5wYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzPFdpdGhCYWNrYm9uZVByb3BzWydsaXN0ZW5UbyddPlxuKSB7XG4gIGNvbnN0IHsgbGlzdGVuVG8sIHN0b3BMaXN0ZW5pbmcgfSA9IHVzZUJhY2tib25lKClcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICBpZiAocGFyYW1ldGVyc1swXSkge1xuICAgICAgbGlzdGVuVG8uYXBwbHkodW5kZWZpbmVkLCBwYXJhbWV0ZXJzKVxuICAgIH1cbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgaWYgKHBhcmFtZXRlcnNbMF0pIHtcbiAgICAgICAgc3RvcExpc3RlbmluZy5hcHBseSh1bmRlZmluZWQsIHBhcmFtZXRlcnMpXG4gICAgICB9XG4gICAgfVxuICB9LCBbcGFyYW1ldGVyc10pXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/selection-interface/hooks.d.ts b/src/main/webapp/component/selection-interface/hooks.d.ts new file mode 100644 index 00000000000..8fdb9b28091 --- /dev/null +++ b/src/main/webapp/component/selection-interface/hooks.d.ts @@ -0,0 +1,19 @@ +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +import { LazyQueryResults } from '../../js/model/LazyQueryResult/LazyQueryResults'; +type useLazyResultsProps = { + selectionInterface: any; +}; +export type LazyResultsType = { + [key: string]: LazyQueryResult; +}; +export declare const useLazyResultsSelectedResultsFromSelectionInterface: ({ selectionInterface, }: useLazyResultsProps) => { + [x: string]: LazyQueryResult; +}; +export declare const useLazyResultsStatusFromSelectionInterface: ({ selectionInterface, }: useLazyResultsProps) => { + status: import("../../js/model/LazyQueryResult/LazyQueryResults").SearchStatus; + isSearching: boolean; + currentAsOf: number; +}; +export declare const useLazyResultsFilterTreeFromSelectionInterface: ({ selectionInterface, }: useLazyResultsProps) => import("../filter-builder/filter.structure").FilterBuilderClass | undefined; +export declare const useLazyResultsFromSelectionInterface: ({ selectionInterface, }: useLazyResultsProps) => LazyQueryResults; +export {}; diff --git a/src/main/webapp/component/selection-interface/hooks.js b/src/main/webapp/component/selection-interface/hooks.js new file mode 100644 index 00000000000..be071c097e1 --- /dev/null +++ b/src/main/webapp/component/selection-interface/hooks.js @@ -0,0 +1,76 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { useBackbone } from '../selection-checkbox/useBackbone.hook'; +import { LazyQueryResults } from '../../js/model/LazyQueryResult/LazyQueryResults'; +import { useStatusOfLazyResults, useSelectedResults, useFilterTreeOfLazyResults, } from '../../js/model/LazyQueryResult/hooks'; +var getLazyResultsFromSelectionInterface = function (_a) { + var selectionInterface = _a.selectionInterface; + var currentSearch = selectionInterface.get('currentQuery'); + if (!currentSearch) { + return new LazyQueryResults(); + } + var result = currentSearch.get('result'); + if (!result) { + return new LazyQueryResults(); + } + return result.get('lazyResults'); +}; +export var useLazyResultsSelectedResultsFromSelectionInterface = function (_a) { + var selectionInterface = _a.selectionInterface; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResults = useSelectedResults({ lazyResults: lazyResults }); + return selectedResults; +}; +export var useLazyResultsStatusFromSelectionInterface = function (_a) { + var selectionInterface = _a.selectionInterface; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var status = useStatusOfLazyResults({ lazyResults: lazyResults }); + return status; +}; +export var useLazyResultsFilterTreeFromSelectionInterface = function (_a) { + var selectionInterface = _a.selectionInterface; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var filterTree = useFilterTreeOfLazyResults({ lazyResults: lazyResults }); + return filterTree; +}; +export var useLazyResultsFromSelectionInterface = function (_a) { + var selectionInterface = _a.selectionInterface; + var _b = useBackbone(), listenToOnce = _b.listenToOnce, stopListening = _b.stopListening; + // @ts-expect-error ts-migrate(6133) FIXME: 'forceRender' is declared but its value is never r... Remove this comment to see the full error message + var _c = __read(React.useState(Math.random()), 2), forceRender = _c[0], setForceRender = _c[1]; + var _d = __read(React.useState(getLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + })), 2), lazyResults = _d[0], setLazyResults = _d[1]; + React.useEffect(function () { + var unsubscribe = lazyResults.subscribeTo({ + subscribableThing: 'filteredResults', + callback: function () { + setForceRender(Math.random()); + }, + }); + return function () { + unsubscribe(); + }; + }, [lazyResults]); + React.useEffect(function () { + setLazyResults(getLazyResultsFromSelectionInterface({ selectionInterface: selectionInterface })); + listenToOnce(selectionInterface, 'change:currentQuery>result', function () { + var currentQuery = selectionInterface.get('currentQuery'); + var result = currentQuery.get('result'); + if (result) { + setLazyResults(getLazyResultsFromSelectionInterface({ selectionInterface: selectionInterface })); + } + }); + return function () { + stopListening(selectionInterface); + }; + }, [selectionInterface]); + return lazyResults; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9va3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3NlbGVjdGlvbi1pbnRlcmZhY2UvaG9va3MudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sd0NBQXdDLENBQUE7QUFFcEUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0saURBQWlELENBQUE7QUFDbEYsT0FBTyxFQUNMLHNCQUFzQixFQUN0QixrQkFBa0IsRUFDb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Jlc3VsdHMnLFxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcbiAgICAgICAgc2V0Rm9yY2VSZW5kZXIoTWF0aC5yYW5kb20oKSlcbiAgICAgIH0sXG4gICAgfSlcbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgdW5zdWJzY3JpYmUoKVxuICAgIH1cbiAgfSwgW2xhenlSZXN1bHRzXSlcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICBzZXRMYXp5UmVzdWx0cyhnZXRMYXp5UmVzdWx0c0Zyb21TZWxlY3Rpb25JbnRlcmZhY2UoeyBzZWxlY3Rpb25JbnRlcmZhY2UgfSkpXG4gICAgbGlzdGVuVG9PbmNlKHNlbGVjdGlvbkludGVyZmFjZSwgJ2NoYW5nZTpjdXJyZW50UXVlcnk+cmVzdWx0JywgKCkgPT4ge1xuICAgICAgY29uc3QgY3VycmVudFF1ZXJ5ID0gc2VsZWN0aW9uSW50ZXJmYWNlLmdldCgnY3VycmVudFF1ZXJ5JylcbiAgICAgIGNvbnN0IHJlc3VsdCA9IGN1cnJlbnRRdWVyeS5nZXQoJ3Jlc3VsdCcpXG4gICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgIHNldExhenlSZXN1bHRzKFxuICAgICAgICAgIGdldExhenlSZXN1bHRzRnJvbVNlbGVjdGlvbkludGVyZmFjZSh7IHNlbGVjdGlvbkludGVyZmFjZSB9KVxuICAgICAgICApXG4gICAgICB9XG4gICAgfSlcbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgc3RvcExpc3RlbmluZyhzZWxlY3Rpb25JbnRlcmZhY2UpXG4gICAgfVxuICB9LCBbc2VsZWN0aW9uSW50ZXJmYWNlXSlcbiAgcmV0dXJuIGxhenlSZXN1bHRzXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/selection-interface/selection-interface.model.d.ts b/src/main/webapp/component/selection-interface/selection-interface.model.d.ts new file mode 100644 index 00000000000..196e4e9b5ab --- /dev/null +++ b/src/main/webapp/component/selection-interface/selection-interface.model.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/selection-interface/selection-interface.model.js b/src/main/webapp/component/selection-interface/selection-interface.model.js new file mode 100644 index 00000000000..232dfdbdce0 --- /dev/null +++ b/src/main/webapp/component/selection-interface/selection-interface.model.js @@ -0,0 +1,122 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import _ from 'underscore'; +import Backbone from 'backbone'; +import Metacard from '../../js/model/Metacard'; +import QueryModel from '../../js/model/Query'; +import QueryResponse from '../../js/model/QueryResponse'; +import QueryResult from '../../js/model/QueryResult'; +export default Backbone.AssociatedModel.extend({ + relations: [ + { + type: Backbone.One, + key: 'currentQuery', + relatedModel: QueryModel, + }, + { + type: Backbone.One, + key: 'currentMetacard', + relatedModel: QueryResponse, + }, + { + type: Backbone.Many, + key: 'selectedResults', + relatedModel: Metacard, + }, + { + type: Backbone.Many, + key: 'activeSearchResults', + relatedModel: QueryResult, + }, + { + type: Backbone.Many, + key: 'completeActiveSearchResults', + relatedModel: QueryResult, + }, + ], + defaults: { + currentQuery: undefined, + currentMetacard: undefined, + selectedResults: [], + activeSearchResults: [], + activeSearchResultsAttributes: [], + }, + initialize: function () { + this.set('currentResult', new QueryResponse()); + this.listenTo(this, 'change:currentMetacard', this.handleUpdate); + this.listenTo(this, 'change:currentMetacard', this.handleCurrentMetacard); + this.listenTo(this, 'change:currentResult', this.handleResultChange); + this.listenTo(this.get('activeSearchResults'), 'update add remove reset', this.updateActiveSearchResultsAttributes); + }, + handleResultChange: function () { + this.listenTo(this.get('currentResult'), 'sync reset:results', this.handleResults); + }, + handleResults: function () { + this.set('currentMetacard', this.get('currentResult').get('results').first()); + }, + updateActiveSearchResultsAttributes: function () { + var availableAttributes = this.get('activeSearchResults') + .reduce(function (currentAvailable, result) { + currentAvailable = _.union(currentAvailable, Object.keys(result.get('metacard').get('properties').toJSON())); + return currentAvailable; + }, []) + .sort(); + this.set('activeSearchResultsAttributes', availableAttributes); + }, + getActiveSearchResultsAttributes: function () { + return this.get('activeSearchResultsAttributes'); + }, + handleUpdate: function () { + this.clearSelectedResults(); + this.setActiveSearchResults(this.get('currentResult').get('results')); + this.addSelectedResult(this.get('currentMetacard')); + }, + handleCurrentMetacard: function () { + if (this.get('currentMetacard') !== undefined) { + this.get('currentQuery').cancelCurrentSearches(); + } + }, + getActiveSearchResults: function () { + return this.get('activeSearchResults'); + }, + setActiveSearchResults: function (results) { + this.get('activeSearchResults').reset(results.models || results); + }, + addToActiveSearchResults: function (results) { + this.get('activeSearchResults').add(results.models || results); + }, + setSelectedResults: function (results) { + this.get('selectedResults').reset(results.models || results); + }, + getSelectedResults: function () { + return this.get('selectedResults'); + }, + clearSelectedResults: function () { + this.getSelectedResults().reset(); + }, + addSelectedResult: function (metacard) { + this.getSelectedResults().add(metacard); + }, + removeSelectedResult: function (metacard) { + this.getSelectedResults().remove(metacard); + }, + setCurrentQuery: function (query) { + this.set('currentQuery', query); + }, + getCurrentQuery: function () { + return this.get('currentQuery'); + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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c3VsdHMubW9kZWxzIHx8IHJlc3VsdHMpXG4gIH0sXG4gIHNldFNlbGVjdGVkUmVzdWx0cyhyZXN1bHRzOiBhbnkpIHtcbiAgICB0aGlzLmdldCgnc2VsZWN0ZWRSZXN1bHRzJykucmVzZXQocmVzdWx0cy5tb2RlbHMgfHwgcmVzdWx0cylcbiAgfSxcbiAgZ2V0U2VsZWN0ZWRSZXN1bHRzKCkge1xuICAgIHJldHVybiB0aGlzLmdldCgnc2VsZWN0ZWRSZXN1bHRzJylcbiAgfSxcbiAgY2xlYXJTZWxlY3RlZFJlc3VsdHMoKSB7XG4gICAgdGhpcy5nZXRTZWxlY3RlZFJlc3VsdHMoKS5yZXNldCgpXG4gIH0sXG4gIGFkZFNlbGVjdGVkUmVzdWx0KG1ldGFjYXJkOiBhbnkpIHtcbiAgICB0aGlzLmdldFNlbGVjdGVkUmVzdWx0cygpLmFkZChtZXRhY2FyZClcbiAgfSxcbiAgcmVtb3ZlU2VsZWN0ZWRSZXN1bHQobWV0YWNhcmQ6IGFueSkge1xuICAgIHRoaXMuZ2V0U2VsZWN0ZWRSZXN1bHRzKCkucmVtb3ZlKG1ldGFjYXJkKVxuICB9LFxuICBzZXRDdXJyZW50UXVlcnkocXVlcnk6IGFueSkge1xuICAgIHRoaXMuc2V0KCdjdXJyZW50UXVlcnknLCBxdWVyeSlcbiAgfSxcbiAgZ2V0Q3VycmVudFF1ZXJ5KCkge1xuICAgIHJldHVybiB0aGlzLmdldCgnY3VycmVudFF1ZXJ5JylcbiAgfSxcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/singletons/TypedUser.d.ts b/src/main/webapp/component/singletons/TypedUser.d.ts new file mode 100644 index 00000000000..a9e3ad1f2a5 --- /dev/null +++ b/src/main/webapp/component/singletons/TypedUser.d.ts @@ -0,0 +1,55 @@ +/// +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +import { SortType } from '../../js/model/Query.shared-types'; +import { FilterBuilderClass } from '../filter-builder/filter.structure'; +export declare const TypedUserInstance: { + getUserInstance: () => any; + getResultsAttributesSummaryShown: () => string[]; + getResultsAttributesShownList: () => string[]; + getResultsAttributesShownTable: () => string[]; + getResultsAttributesPossibleSummaryShown: () => string[]; + getResultsAttributesPossibleTable: (currentAttributes?: string[]) => string[]; + getResultsAttributesPossibleList: (currentAttributes?: string[]) => string[]; + getQuerySettingsJSON: () => QuerySettingsType; + getQuerySettingsModel: () => QuerySettingsModelType; + updateQuerySettings: (newSettings: Partial) => void; + getCoordinateFormat: () => string; + getEphemeralSorts(): undefined | SortType[]; + getEphemeralFilter(): undefined | FilterBuilderClass; + removeEphemeralFilter(): void; + removeEphemeralSorts(): void; + getPreferences(): import("backbone").Model & { + needsUpdate: (update: any) => boolean; + }; + savePreferences(): void; + canWrite: (result: LazyQueryResult) => boolean; + isAdmin: (result: LazyQueryResult) => boolean; + getResultCount: () => number; + getUserReadableDateTime: (val: any) => string; + getMapHome: () => any; + getDecimalPrecision: () => any; + getMomentDate(date: string): string; + getMapLayers: () => Backbone.Collection; + needsUpdate(upToDatePrefs: any): boolean; + sync(upToDatePrefs: any): void; +}; +export declare const useEphemeralFilter: () => FilterBuilderClass | undefined; +type QuerySettingsType = { + type: string; + sources: string[]; + federation: 'selected' | 'enterprise'; + sorts: { + attribute: string; + direction: 'descending' | 'ascending'; + }[]; + template: string; + spellcheck: boolean; + phonetics: boolean; + additionalOptions?: string; +}; +type QuerySettingsModelType = { + get: (attr: string) => any; + set: (attr: any, value?: any) => void; + toJSON: () => QuerySettingsType; +}; +export {}; diff --git a/src/main/webapp/component/singletons/TypedUser.js b/src/main/webapp/component/singletons/TypedUser.js new file mode 100644 index 00000000000..07227682c27 --- /dev/null +++ b/src/main/webapp/component/singletons/TypedUser.js @@ -0,0 +1,171 @@ +import { __read, __spreadArray } from "tslib"; +import React from 'react'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import moment from 'moment'; +import userInstance from './user-instance'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +export var TypedUserInstance = { + getUserInstance: function () { + return userInstance; + }, + getResultsAttributesSummaryShown: function () { + var config = StartupDataStore.Configuration; + var required = config.getRequiredExportAttributes(); + var userchoices = userInstance + .get('user') + .get('preferences') + .get('inspector-summaryShown'); + if (userchoices.length > 0) { + return __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(userchoices), false), __read(required), false))), false); + } + var summary = config.getSummaryShow(); + if (summary.length > 0 || required.length > 0) { + return __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(summary), false), __read(required), false))), false); + } + return ['title', 'created', 'thumbnail']; + }, + getResultsAttributesShownList: function () { + var userchoices = userInstance + .get('user') + .get('preferences') + .get('results-attributesShownList'); + if (userchoices.length > 0) { + return userchoices; + } + if (StartupDataStore.Configuration.getResultShow().length > 0) { + return StartupDataStore.Configuration.getResultShow(); + } + return ['title', 'thumbnail']; + }, + getResultsAttributesShownTable: function () { + var userchoices = userInstance + .get('user') + .get('preferences') + .get('results-attributesShownTable'); + if (userchoices.length > 0) { + return userchoices; + } + if (StartupDataStore.Configuration.getDefaultTableColumns().length > 0) { + return StartupDataStore.Configuration.getDefaultTableColumns(); + } + return ['title', 'thumbnail']; + }, + // basically, what could be shown that currently isn't + getResultsAttributesPossibleSummaryShown: function () { + var currentAttributesShown = TypedUserInstance.getResultsAttributesSummaryShown(); + var allKnownAttributes = StartupDataStore.MetacardDefinitions.getSortedAttributes(); + var searchOnlyAttributes = StartupDataStore.MetacardDefinitions.getSearchOnlyAttributes(); + var attributesPossible = allKnownAttributes.filter(function (attr) { + return (!currentAttributesShown.includes(attr.id) && + !searchOnlyAttributes.includes(attr.id) && + !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attr.id)); + }); + return attributesPossible.map(function (attr) { return attr.id; }); + }, + getResultsAttributesPossibleTable: function (currentAttributes) { + var currentAttributesShown = currentAttributes !== null && currentAttributes !== void 0 ? currentAttributes : TypedUserInstance.getResultsAttributesShownTable(); + var allKnownAttributes = StartupDataStore.MetacardDefinitions.getSortedAttributes(); + var searchOnlyAttributes = StartupDataStore.MetacardDefinitions.getSearchOnlyAttributes(); + var attributesPossible = allKnownAttributes.filter(function (attr) { + return (!currentAttributesShown.includes(attr.id) && + !searchOnlyAttributes.includes(attr.id) && + !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attr.id)); + }); + return attributesPossible.map(function (attr) { return attr.id; }); + }, + // basically, what could be shown that currently isn't + getResultsAttributesPossibleList: function (currentAttributes) { + var currentAttributesShown = currentAttributes !== null && currentAttributes !== void 0 ? currentAttributes : TypedUserInstance.getResultsAttributesShownList(); + var allKnownAttributes = StartupDataStore.MetacardDefinitions.getSortedAttributes(); + var searchOnlyAttributes = StartupDataStore.MetacardDefinitions.getSearchOnlyAttributes(); + var attributesPossible = allKnownAttributes.filter(function (attr) { + return (!currentAttributesShown.includes(attr.id) && + !searchOnlyAttributes.includes(attr.id) && + !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attr.id)); + }); + return attributesPossible.map(function (attr) { return attr.id; }); + }, + getQuerySettingsJSON: function () { + return TypedUserInstance.getQuerySettingsModel().toJSON(); + }, + getQuerySettingsModel: function () { + return userInstance.getQuerySettings(); + }, + updateQuerySettings: function (newSettings) { + var currentSettings = TypedUserInstance.getQuerySettingsModel(); + currentSettings.set(newSettings); + userInstance.savePreferences(); + }, + getCoordinateFormat: function () { + var _a, _b, _c, _d, _e; + var coordFormat = (_b = (_a = userInstance + .get('user')) === null || _a === void 0 ? void 0 : _a.get('preferences')) === null || _b === void 0 ? void 0 : _b.get('coordinateFormat'); + if (!coordFormat) { + var defaultCoordFormat = (_e = (_d = (_c = userInstance + .get('user')) === null || _c === void 0 ? void 0 : _c.defaults()) === null || _d === void 0 ? void 0 : _d.preferences) === null || _e === void 0 ? void 0 : _e.get('coordinateFormat'); + coordFormat = defaultCoordFormat !== null && defaultCoordFormat !== void 0 ? defaultCoordFormat : 'degrees'; + } + return coordFormat; + }, + getEphemeralSorts: function () { + return userInstance.get('user').get('preferences').get('resultSort'); + }, + getEphemeralFilter: function () { + return userInstance.get('user').get('preferences').get('resultFilter'); + }, + removeEphemeralFilter: function () { + userInstance.get('user').get('preferences').set('resultFilter', undefined); + TypedUserInstance.savePreferences(); + }, + removeEphemeralSorts: function () { + userInstance.get('user').get('preferences').set('resultSort', undefined); + TypedUserInstance.savePreferences(); + }, + getPreferences: function () { + return userInstance.get('user').get('preferences'); + }, + savePreferences: function () { + userInstance.get('user').get('preferences').savePreferences(); + }, + canWrite: function (result) { + return userInstance.canWrite(result.plain.metacard.properties); + }, + isAdmin: function (result) { + return userInstance.canShare(result.plain.metacard.properties); + }, + getResultCount: function () { + return userInstance.get('user').get('preferences').get('resultCount'); + }, + getUserReadableDateTime: function (val) { + return userInstance.getUserReadableDateTime(val); + }, + getMapHome: function () { + return TypedUserInstance.getPreferences().get('mapHome'); + }, + getDecimalPrecision: function () { + return TypedUserInstance.getPreferences().get('decimalPrecision'); + }, + getMomentDate: function (date) { + return "".concat(moment(date).fromNow(), " : ").concat(userInstance.getUserReadableDateTime(date)); + }, + getMapLayers: function () { + var mapLayers = TypedUserInstance.getPreferences().get('mapLayers'); + return mapLayers; + }, + needsUpdate: function (upToDatePrefs) { + return this.getPreferences().needsUpdate(upToDatePrefs); + }, + sync: function (upToDatePrefs) { + if (this.needsUpdate(upToDatePrefs)) { + this.getPreferences().set(upToDatePrefs); + } + }, +}; +export var useEphemeralFilter = function () { + var _a = __read(React.useState(TypedUserInstance.getEphemeralFilter()), 2), ephemeralFilter = _a[0], setEphemeralFilter = _a[1]; + useListenTo(TypedUserInstance.getPreferences(), 'change:resultFilter', function () { + setEphemeralFilter(TypedUserInstance.getEphemeralFilter()); + }); + return ephemeralFilter; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHlwZWRVc2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3Jj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GFueVxuICBzZXQ6IChhdHRyOiBhbnksIHZhbHVlPzogYW55KSA9PiB2b2lkXG4gIHRvSlNPTjogKCkgPT4gUXVlcnlTZXR0aW5nc1R5cGVcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/singletons/drawing.d.ts b/src/main/webapp/component/singletons/drawing.d.ts new file mode 100644 index 00000000000..6455f5d4d8c --- /dev/null +++ b/src/main/webapp/component/singletons/drawing.d.ts @@ -0,0 +1,11 @@ +import Backbone from 'backbone'; +type DrawingType = Backbone.Model & { + turnOnDrawing: (model: Backbone.Model) => void; + turnOffDrawing: () => void; + isFuzzyDrawing: () => boolean; + isDrawing: () => boolean; + getDrawModel: () => Backbone.Model; +}; +export declare const Drawing: DrawingType; +export declare const useIsDrawing: () => boolean; +export {}; diff --git a/src/main/webapp/component/singletons/drawing.js b/src/main/webapp/component/singletons/drawing.js new file mode 100644 index 00000000000..e0e559f03c7 --- /dev/null +++ b/src/main/webapp/component/singletons/drawing.js @@ -0,0 +1,49 @@ +import { useRender } from '../hooks/useRender'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import Backbone from 'backbone'; +import wreqr from '../../js/wreqr'; +import $ from 'jquery'; +var lastDrawing = 0; +var DEBOUNCE = 250; +export var Drawing = new (Backbone.Model.extend({ + defaults: { + drawing: false, + drawingModel: undefined, + }, + initialize: function () { + this.listenTo(wreqr.vent, 'search:drawline', this.turnOnDrawing); + this.listenTo(wreqr.vent, 'search:drawcircle', this.turnOnDrawing); + this.listenTo(wreqr.vent, 'search:drawpoly', this.turnOnDrawing); + this.listenTo(wreqr.vent, 'search:drawbbox', this.turnOnDrawing); + this.listenTo(wreqr.vent, 'search:drawcancel', this.turnOffDrawing); + this.listenTo(wreqr.vent, 'search:drawend', this.turnOffDrawing); + }, + turnOnDrawing: function (model) { + this.set('drawing', true); + this.set('drawingModel', model); + $('html').toggleClass('is-drawing', true); + }, + turnOffDrawing: function () { + lastDrawing = Date.now(); + this.set('drawing', false); + $('html').toggleClass('is-drawing', false); + }, + timeSinceLastDrawing: function () { + return Date.now() - lastDrawing; + }, + getDrawModel: function () { + return this.get('drawingModel'); + }, + isFuzzyDrawing: function () { + return this.isDrawing() || this.timeSinceLastDrawing() < DEBOUNCE; + }, + isDrawing: function () { + return this.get('drawing'); + }, +}))(); +export var useIsDrawing = function () { + var render = useRender(); + useListenTo(Drawing, 'change:drawing', render); + return Drawing.isDrawing(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2luZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvc2luZ2xldG9ucy9kcmF3aW5nLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sb0JBQW9CLENBQUE7QUFDOUMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdDQUF3QyxDQUFBO0FBQ3BFLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUMvQixPQUFPLEtBQUssTUFBTSxnQkFBZ0IsQ0FBQTtBQUNsQyxPQUFPLENBQUMsTUFBTSxRQUFRLENBQUE7QUFRdEIsSUFBSSxXQUFXLEdBQUcsQ0FBQyxDQUFBO0FBQ25CLElBQU0sUUFBUSxHQUFHLEdBQUcsQ0FBQTtBQUNwQixNQUFNLENBQUMsSUFBTSxPQUFPLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDO0lBQ2hELFFBQVEsRUFBRTtRQUNSLE9BQU8sRUFBRSxLQUFLO1FBQ2QsWUFBWSxFQUFFLFNBQVM7S0FDeEI7SUFDRCxVQUFVO1FBQ1IsSUFBSSxDQUFDLFFBQVEsQ0FBRSxLQUFhLENBQUMsSUFBSSxFQUFFLGlCQUFp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LmlzRHJhd2luZygpXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/singletons/feature-detection.d.ts b/src/main/webapp/component/singletons/feature-detection.d.ts new file mode 100644 index 00000000000..196e4e9b5ab --- /dev/null +++ b/src/main/webapp/component/singletons/feature-detection.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/singletons/feature-detection.js b/src/main/webapp/component/singletons/feature-detection.js new file mode 100644 index 00000000000..a771c93af66 --- /dev/null +++ b/src/main/webapp/component/singletons/feature-detection.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +//meant to be used for just in time feature detection +import Backbone from 'backbone'; +export default new (Backbone.Model.extend({ + defaults: { + cesium: true, + localStorage: true, + }, + supportsFeature: function (feature) { + return this.get(feature); + }, + addFailure: function (feature) { + this.set(feature, false); + }, +}))(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVhdHVyZS1kZXRlY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi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SBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cblxuLy9tZWFudCB0byBiZSB1c2VkIGZvciBqdXN0IGluIHRpbWUgZmVhdHVyZSBkZXRlY3Rpb25cblxuaW1wb3J0IEJhY2tib25lIGZyb20gJ2JhY2tib25lJ1xuXG5leHBvcnQgZGVmYXVsdCBuZXcgKEJhY2tib25lLk1vZGVsLmV4dGVuZCh7XG4gIGRlZmF1bHRzOiB7XG4gICAgY2VzaXVtOiB0cnVlLFxuICAgIGxvY2FsU3RvcmFnZTogdHJ1ZSxcbiAgfSxcbiAgc3VwcG9ydHNGZWF0dXJlKGZlYXR1cmU6IGFueSkge1xuICAgIHJldHVybiB0aGlzLmdldChmZWF0dXJlKVxuICB9LFxuICBhZGRGYWlsdXJlKGZlYXR1cmU6IGFueSkge1xuICAgIHRoaXMuc2V0KGZlYXR1cmUsIGZhbHNlKVxuICB9LFxufSkpKClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/singletons/overwrites-instance.d.ts b/src/main/webapp/component/singletons/overwrites-instance.d.ts new file mode 100644 index 00000000000..5298df7f0f6 --- /dev/null +++ b/src/main/webapp/component/singletons/overwrites-instance.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/singletons/overwrites-instance.js b/src/main/webapp/component/singletons/overwrites-instance.js new file mode 100644 index 00000000000..7442cc47b46 --- /dev/null +++ b/src/main/webapp/component/singletons/overwrites-instance.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import OverwriteModel from '../../js/model/Overwrite'; +import Backbone from 'backbone'; +export default new (Backbone.Collection.extend({ + model: OverwriteModel, + removeIfUnused: function (id) { + if (!this.get(id).get('sending')) { + this.remove(id); + } + }, +}))(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcndyaXRlcy1pbnN0YW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvc2luZ2xldG9ucy9vdmVyd3JpdGVzLWluc3RhbmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLGNBQWMsTUFBTSwwQkFBMEIsQ0FBQTtBQUNyRCxPQUFPLFFBQVEsTUFBTSxVQUFVLENBQUE7QUFFL0IsZUFBZSxJQUFJLENBQUMsUUFBUSxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUM7SUFDN0MsS0FBSyxFQUFFLGNBQWM7SUFDckIsY0FBYyxZ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9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuaW1wb3J0IE92ZXJ3cml0ZU1vZGVsIGZyb20gJy4uLy4uL2pzL21vZGVsL092ZXJ3cml0ZSdcbmltcG9ydCBCYWNrYm9uZSBmcm9tICdiYWNrYm9uZSdcblxuZXhwb3J0IGRlZmF1bHQgbmV3IChCYWNrYm9uZS5Db2xsZWN0aW9uLmV4dGVuZCh7XG4gIG1vZGVsOiBPdmVyd3JpdGVNb2RlbCxcbiAgcmVtb3ZlSWZVbnVzZWQoaWQ6IGFueSkge1xuICAgIGlmICghdGhpcy5nZXQoaWQpLmdldCgnc2VuZGluZycpKSB7XG4gICAgICB0aGlzLnJlbW92ZShpZClcbiAgICB9XG4gIH0sXG59KSkoKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/singletons/session-auto-renew.d.ts b/src/main/webapp/component/singletons/session-auto-renew.d.ts new file mode 100644 index 00000000000..6cf794549bd --- /dev/null +++ b/src/main/webapp/component/singletons/session-auto-renew.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const sessionAutoRenewModel: any; +export default sessionAutoRenewModel; diff --git a/src/main/webapp/component/singletons/session-auto-renew.js b/src/main/webapp/component/singletons/session-auto-renew.js new file mode 100644 index 00000000000..99c785f7a96 --- /dev/null +++ b/src/main/webapp/component/singletons/session-auto-renew.js @@ -0,0 +1,60 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +//meant to be used for just in time feature detection +import Backbone from 'backbone'; +import fetch from '../../react-component/utils/fetch'; +var sessionExpiryUrl = './internal/session/expiry'; +var sessionAutoRenewModel = new (Backbone.Model.extend({ + defaults: { + sessionRenewDate: undefined, + }, + initialize: function () { + this.initializeSessionRenewDate(); + this.listenTo(this, 'change:sessionRenewDate', this.handleSessionRenewDate); + }, + initializeSessionRenewDate: function () { + fetch(sessionExpiryUrl) + .then(function (response) { return response.json(); }) + .then(this.handleExpiryTimeResponse.bind(this)) + .catch(function () { + console.warn('what do we do on failure'); + }); + }, + handleExpiryTimeResponse: function (response) { + var msUntilTimeout = parseInt(response); + var msUntilAutoRenew = Math.max(msUntilTimeout * 0.7, msUntilTimeout - 60000); // 70% or at least one minute before + this.set('sessionRenewDate', Date.now() + msUntilAutoRenew); + }, + handleSessionRenewDate: function () { + this.clearSessionRenewTimer(); + this.setSessionRenewTimer(); + }, + setSessionRenewTimer: function () { + this.sessionRenewTimer = setTimeout(this.renewSession.bind(this), this.get('sessionRenewDate') - Date.now()); + }, + clearSessionRenewTimer: function () { + clearTimeout(this.sessionRenewTimer); + }, + renewSession: function () { + fetch(sessionExpiryUrl) + .then(function (response) { return response.json(); }) + .then(this.handleExpiryTimeResponse.bind(this)) + .catch(function () { + console.warn('what do we do on a failure'); + }); + }, +}))(); +export default sessionAutoRenewModel; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi1hdXRvLXJlbmV3LmpzIiwic291cmNlUm9vdCI6IiIsInN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lbmV3TW9kZWxcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/singletons/session-timeout.d.ts b/src/main/webapp/component/singletons/session-timeout.d.ts new file mode 100644 index 00000000000..9a4865717d4 --- /dev/null +++ b/src/main/webapp/component/singletons/session-timeout.d.ts @@ -0,0 +1,2 @@ +declare const sessionTimeoutModel: any; +export default sessionTimeoutModel; diff --git a/src/main/webapp/component/singletons/session-timeout.js b/src/main/webapp/component/singletons/session-timeout.js new file mode 100644 index 00000000000..5cdcd76fed3 --- /dev/null +++ b/src/main/webapp/component/singletons/session-timeout.js @@ -0,0 +1,123 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +//meant to be used for just in time feature detection +import Backbone from 'backbone'; +import $ from 'jquery'; +import _ from 'underscore'; +import fetch from '../../react-component/utils/fetch'; +import featureDetection from './feature-detection'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +var invalidateUrl = './internal/session/invalidate?service='; +var idleNoticeDuration = 60000; +// Length of inactivity that will trigger user timeout (15 minutes in ms by default) +// See STIG V-69243 +var idleTimeoutThreshold = StartupDataStore.Configuration.getPlatformUITimeout() > 0 + ? StartupDataStore.Configuration.getPlatformUITimeout() * 60000 + : 900000; +function getIdleTimeoutDate() { + return idleTimeoutThreshold + Date.now(); +} +var sessionTimeoutModel = new (Backbone.Model.extend({ + defaults: { + showPrompt: false, + idleTimeoutDate: 0, + }, + initialize: function () { + $(window).on('storage', this.handleLocalStorageChange.bind(this)); + this.listenTo(this, 'change:idleTimeoutDate', this.handleIdleTimeoutDate); + this.listenTo(this, 'change:showPrompt', this.handleShowPrompt); + this.resetIdleTimeoutDate(); + this.handleShowPrompt(); + }, + handleLocalStorageChange: function () { + this.set('idleTimeoutDate', parseInt(localStorage.getItem('idleTimeoutDate'))); + this.hidePrompt(); + }, + handleIdleTimeoutDate: function () { + this.clearPromptTimer(); + this.setPromptTimer(); + this.clearLogoutTimer(); + this.setLogoutTimer(); + }, + handleShowPrompt: function () { + if (this.get('showPrompt')) { + this.stopListeningForUserActivity(); + } + else { + this.startListeningForUserActivity(); + } + }, + setPromptTimer: function () { + var timeout = this.get('idleTimeoutDate') - idleNoticeDuration - Date.now(); + timeout = Math.max(0, timeout); + this.promptTimer = setTimeout(this.showPrompt.bind(this), timeout); + }, + showPrompt: function () { + this.set('showPrompt', true); + }, + hidePrompt: function () { + this.set('showPrompt', false); + }, + clearPromptTimer: function () { + clearTimeout(this.promptTimer); + }, + setLogoutTimer: function () { + var timeout = this.get('idleTimeoutDate') - Date.now(); + timeout = Math.max(0, timeout); + this.logoutTimer = setTimeout(this.logout.bind(this), timeout); + }, + clearLogoutTimer: function () { + clearTimeout(this.logoutTimer); + }, + resetIdleTimeoutDate: function () { + var idleTimeoutDate = getIdleTimeoutDate(); + if (featureDetection.supportsFeature('localStorage')) { + try { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number' is not assignable to par... Remove this comment to see the full error message + localStorage.setItem('idleTimeoutDate', idleTimeoutDate); + } + catch (e) { + featureDetection.addFailure('localStorage'); + } + } + this.set('idleTimeoutDate', idleTimeoutDate); + }, + startListeningForUserActivity: function () { + $(document).on('keydown.sessionTimeout mousedown.sessionTimeout', _.throttle(this.resetIdleTimeoutDate.bind(this), 5000)); + }, + stopListeningForUserActivity: function () { + $(document).off('keydown.sessionTimeout mousedown.sessionTimeout'); + }, + logout: function () { + if (window.onbeforeunload != null) { + window.onbeforeunload = null; + } + fetch(invalidateUrl + window.location.href, { + redirect: 'manual', + }).finally(function () { + window.location.reload(); + }); + }, + renew: function () { + this.hidePrompt(); + this.resetIdleTimeoutDate(); + }, + getIdleSeconds: function () { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number' is not assignable to par... Remove this comment to see the full error message + return parseInt((this.get('idleTimeoutDate') - Date.now()) / 1000); + }, +}))(); +export default sessionTimeoutModel; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi10aW1lb3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9zaW5nbGV0b25zL3Nlc3Npb24tdGltZW91dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0oscURBQXFEO0FBQ3JELE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUMvQixPQUFPLENBQUMsTUFBTSxRQUFRLENBQUE7QUFDdEIsT0FBTyxDQUFDLE1BQU0sWUFBWSxDQUFBO0FBQzFCLE9BQU8sS0FBSyxNQUFNLG1DQUFtQyxDQUFBO0FBQ3JELE9BQU8sZ0JBQWdCLE1BQU0scUJBQXFCLENBQUE7QUFDbEQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZ0NBQWdDLENBQUE7QUFDakUsSUFBTSxhQUFhLEdBQUcsd0NBQXdDLENBQUE7QUFDOUQsSUFBTSxrQkFBa0IsR0FBRyxLQUFLLENBQUE7QUFDaEMsb0ZBQW9GO0FBQ3BGLG1CQUFtQjtBQUNuQixJQUFNLG9CQUFvQixHQUN4QixnQkFBZ0IsQ0FBQyxhQUFhLENBQUMsb0JBQW9CLEVBQUUsR0FBRyxDQUFDO0lBQ3ZELENBQUMsQ0FBQyxnQkFBZ0IsQ0FBQyxhQUFhLENBQUMsb0JBQW9CLEVBQUUsR0FBRyxLQUFLO0lBQy9ELENBQUMsQ0FBQyxNQUFNLENBQUE7QUFDWixTQUFTLGtCQUFrQjt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gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDIzNDUpIEZJWE1FOiBBcmd1bWVudCBvZiB0eXBlICdudW1iZXInIGlzIG5vdCBhc3NpZ25hYmxlIHRvIHBhci4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgcmV0dXJuIHBhcnNlSW50KCh0aGlzLmdldCgnaWRsZVRpbWVvdXREYXRlJykgLSBEYXRlLm5vdygpKSAvIDEwMDApXG4gIH0sXG59KSkoKVxuZXhwb3J0IGRlZmF1bHQgc2Vzc2lvblRpbWVvdXRNb2RlbFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/singletons/user-instance.d.ts b/src/main/webapp/component/singletons/user-instance.d.ts new file mode 100644 index 00000000000..5298df7f0f6 --- /dev/null +++ b/src/main/webapp/component/singletons/user-instance.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/singletons/user-instance.js b/src/main/webapp/component/singletons/user-instance.js new file mode 100644 index 00000000000..e1930e2192f --- /dev/null +++ b/src/main/webapp/component/singletons/user-instance.js @@ -0,0 +1,19 @@ +var _a; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import User from '../../js/model/User'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +export default new User.Response({ user: (_a = StartupDataStore.data) === null || _a === void 0 ? void 0 : _a.user }); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1pbnN0YW5jZS5qcyIsInNvdXJjZVJvb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SIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmltcG9ydCBVc2VyIGZyb20gJy4uLy4uL2pzL21vZGVsL1VzZXInXG5pbXBvcnQgeyBTdGFydHVwRGF0YVN0b3JlIH0gZnJvbSAnLi4vLi4vanMvbW9kZWwvU3RhcnR1cC9zdGFydHVwJ1xuZXhwb3J0IGRlZmF1bHQgbmV3IChVc2VyIGFzIGFueSkuUmVzcG9uc2UoeyB1c2VyOiBTdGFydHVwRGF0YVN0b3JlLmRhdGE/LnVzZXIgfSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/singletons/user-notifications.d.ts b/src/main/webapp/component/singletons/user-notifications.d.ts new file mode 100644 index 00000000000..5298df7f0f6 --- /dev/null +++ b/src/main/webapp/component/singletons/user-notifications.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/singletons/user-notifications.js b/src/main/webapp/component/singletons/user-notifications.js new file mode 100644 index 00000000000..37ef0d00d5d --- /dev/null +++ b/src/main/webapp/component/singletons/user-notifications.js @@ -0,0 +1,55 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import fetch from '../../react-component/utils/fetch'; +import user from './user-instance'; +import Backbone from 'backbone'; +export default new (Backbone.Collection.extend({ + initialize: function () { + var uploads = user.get('user').get('preferences').get('uploads'); + var alerts = user.get('user').get('preferences').get('alerts'); + this.add(uploads.models); + this.add(alerts.models); + this.listenTo(uploads, 'add', this.add); + this.listenTo(uploads, 'remove', this.remove); + this.listenTo(alerts, 'add', this.add); + this.listenTo(alerts, 'remove', this.remove); + }, + comparator: function (model) { + return -model.getTimeComparator(); + }, + hasUnseen: function () { + return this.some(function (notification) { return notification.get('unseen'); }); + }, + setSeen: function () { + var setSeen = []; + this.forEach(function (notification) { + notification.set('unseen', false); + if (notification.get('queryId')) { + setSeen.push(notification); + } + }); + if (setSeen.length === 0) { + return; + } + fetch('./internal/user/notifications', { + method: 'put', + body: JSON.stringify({ alerts: setSeen }), + headers: { + 'Content-Type': 'application/json', + }, + }); + }, +}))(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1ub3RpZmljYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9zaW5nbGV0b25zL3VzZXItbm90aWZpY2F0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sbUNBQW1DLENBQUE7QUFFckQsT0FBTyxJQUFJLE1BQU0saUJBQWlCLENBQUE7QUFDbEMsT0FBTyxRQUFRLE1BQU0sVUFBVSxDQUFBO0FBRS9CLGVBQWUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDO0lBQzdDLFVBQVU7UUFDUixJQUFNLE9BQU8sR0FBRyxJQUF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0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJyxcbiAgICAgIH0sXG4gICAgfSlcbiAgfSxcbn0pKSgpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/snack/commonProps.d.ts b/src/main/webapp/component/snack/commonProps.d.ts new file mode 100644 index 00000000000..3c34decd25b --- /dev/null +++ b/src/main/webapp/component/snack/commonProps.d.ts @@ -0,0 +1,3 @@ +import { SnackProps } from './snack.provider'; +export declare const CLOSEABLE_ERROR: SnackProps; +export declare const CLOSEABLE_WARNING: SnackProps; diff --git a/src/main/webapp/component/snack/commonProps.js b/src/main/webapp/component/snack/commonProps.js new file mode 100644 index 00000000000..f7922aa204b --- /dev/null +++ b/src/main/webapp/component/snack/commonProps.js @@ -0,0 +1,11 @@ +export var CLOSEABLE_ERROR = { + status: 'error', + closeable: true, + timeout: 10000, +}; +export var CLOSEABLE_WARNING = { + status: 'warning', + closeable: true, + timeout: 10000, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uUHJvcHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3NuYWNrL2NvbW1vblByb3BzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxNQUFNLENBQUMsSUFBTSxlQUFlLEdBQUc7SUFDN0IsTUFBTSxFQUFFLE9BQU87SUFDZixTQUFTLEVBQUUsSUFBSTtJQUNmLE9BQU8sRUFBRSxLQUFLO0NBQ0QsQ0FBQTtBQUVmLE1BQU0sQ0FBQyxJQUFNLGlCQUFpQixHQUFHO0lBQy9CLE1BQU0sRUFBRSxTQUFTO0lBQ2pCLFNBQVMsRUFBRSxJQUFJO0lBQ2YsT0FBTyxFQUFFLEtBQUs7Q0FDRCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU25hY2tQcm9wcyB9IGZyb20gJy4vc25hY2sucHJvdmlkZXInXG5cbmV4cG9ydCBjb25zdCBDTE9TRUFCTEVfRVJST1IgPSB7XG4gIHN0YXR1czogJ2Vycm9yJyxcbiAgY2xvc2VhYmxlOiB0cnVlLFxuICB0aW1lb3V0OiAxMDAwMCxcbn0gYXMgU25hY2tQcm9wc1xuXG5leHBvcnQgY29uc3QgQ0xPU0VBQkxFX1dBUk5JTkcgPSB7XG4gIHN0YXR1czogJ3dhcm5pbmcnLFxuICBjbG9zZWFibGU6IHRydWUsXG4gIHRpbWVvdXQ6IDEwMDAwLFxufSBhcyBTbmFja1Byb3BzXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/snack/snack.provider.d.ts b/src/main/webapp/component/snack/snack.provider.d.ts new file mode 100644 index 00000000000..1d5eb29c048 --- /dev/null +++ b/src/main/webapp/component/snack/snack.provider.d.ts @@ -0,0 +1,16 @@ +import React from 'react'; +import { SnackbarProps } from '@mui/material/Snackbar'; +import { AlertProps } from '@mui/material/Alert'; +export type AddSnack = (message: string, props?: SnackProps) => () => void; +export type SnackProps = { + id?: string; + status?: AlertProps['severity']; + closeable?: boolean; + clickawayCloseable?: boolean; + timeout?: number; + undo?: () => void; + snackBarProps?: SnackbarProps; + alertProps?: AlertProps; +}; +export declare const SnackBarContext: React.Context; +export declare function SnackProvider({ children }: any): JSX.Element; diff --git a/src/main/webapp/component/snack/snack.provider.js b/src/main/webapp/component/snack/snack.provider.js new file mode 100644 index 00000000000..4d79ef2a2af --- /dev/null +++ b/src/main/webapp/component/snack/snack.provider.js @@ -0,0 +1,85 @@ +import { __assign, __read, __spreadArray } from "tslib"; +import React, { createContext, useState, useEffect, useMemo } from 'react'; +import Button from '@mui/material/Button'; +import SnackBar from '@mui/material/Snackbar'; +import Alert from '@mui/material/Alert'; +import IconButton from '@mui/material/IconButton'; +import CloseIcon from '@mui/icons-material/Close'; +import Portal from '@mui/material/Portal'; +var AUTO_DISMISS = 5000; +// Gives the addSnack function the correct type signature +export var SnackBarContext = createContext({}); +export function SnackProvider(_a) { + var children = _a.children; + var _b = __read(useState([]), 2), snacks = _b[0], setSnacks = _b[1]; + var _c = __read(useState({}), 2), currentSnack = _c[0], setCurrentSnack = _c[1]; + var addSnack = function (message, props) { + if (props === void 0) { props = {}; } + var newSnack = __assign({ message: message }, props); + setSnacks(function (snacks) { + if (props.id) { + var snackIndex = snacks.findIndex(function (s) { return s.id === props.id; }); + if (snackIndex >= 0) { + snacks.splice(snackIndex, 1); + } + } + return __spreadArray([newSnack], __read(snacks), false); + }); + var closeSnack = function () { + setSnacks(function (snacks) { return snacks.filter(function (snack) { return snack !== newSnack; }); }); + }; + return closeSnack; + }; + // Set current snack to be displayed + useEffect(function () { + if (snacks.length > 0) { + setCurrentSnack(snacks[snacks.length - 1]); + } + }, [snacks]); + // Remove snack after timeout + useEffect(function () { + if (currentSnack.message) { + var timeout = currentSnack.timeout || AUTO_DISMISS; + var timer_1 = setTimeout(function () { + removeCurrentSnack(); + }, timeout); + return function () { return clearTimeout(timer_1); }; + } + return; + }, [currentSnack]); + var handleClose = function (_e, reason) { + if (reason === 'clickaway' && currentSnack.clickawayCloseable) { + removeCurrentSnack(); + } + else if (reason !== 'clickaway' && currentSnack.closeable) { + removeCurrentSnack(); + } + }; + var handleUndo = function () { + currentSnack.undo && currentSnack.undo(); + removeCurrentSnack(); + }; + var removeCurrentSnack = function () { + setCurrentSnack({}); + setSnacks(function (snacks) { return snacks.slice(0, snacks.length - 1); }); + }; + var value = useMemo(function () { return addSnack; }, []); + var message = currentSnack.message, status = currentSnack.status, closeable = currentSnack.closeable, undo = currentSnack.undo, snackBarProps = currentSnack.snackBarProps, alertProps = currentSnack.alertProps; + return (React.createElement(SnackBarContext.Provider, { value: value }, + children, + message && (React.createElement(Portal, null, + React.createElement(SnackBar, __assign({ key: message, className: "left-0 bottom-0 p-4 max-w-full", anchorOrigin: { + vertical: 'bottom', + horizontal: 'left', + }, open: true, onClose: handleClose }, snackBarProps), + React.createElement(Alert, __assign({ style: { + minWidth: '18rem', + alignItems: 'center', + }, action: React.createElement(React.Fragment, null, + undo && (React.createElement(Button, { color: "inherit", size: "small", style: { fontSize: '.75rem' }, onClick: handleUndo }, "UNDO")), + closeable && ( + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + React.createElement(IconButton, { style: { padding: '3px' }, color: "inherit", onClick: handleClose, size: "large" }, + React.createElement(CloseIcon, { fontSize: "small" })))), severity: status }, alertProps), message)))))); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic25hY2sucHJvdmlkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3NuYWNrL3NuYWNrLnByb3ZpZGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxhQUFhLEVBQUUsUUFBUSxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDMUUsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxRQUEyQixNQUFNLHdCQUF3QixDQUFBO0FBQ2hFLE9BQU8sS0FBcUIsTUFBTSxxQkFBcUIsQ0FBQTtBQUN2RCxPQUFPLFVBQVUsTUFBTSwwQkFBMEIsQ0FBQTtBQUNqRCxPQUFPLFNBQVMsTUFBTSwyQkFBMkIsQ0FBQTtBQUNqRCxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQW1CekMsSUFBTSxZQUFZLEdBQUcsSUFBSSxDQUFBO0FBRXpCLHlEQUF5RDtBQUN6RCxNQUFNLENBQUMsSUFBTSxlQUFlLEdBQUcsYUFBYSxDQUFXLEVBQWMsQ0FBQyxDQUFBO0FBRXRFLE1BQU0sVUFBVSxhQUFhL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sIHNuYWNrQmFyUHJvcHMsIGFsZXJ0UHJvcHMgfSA9XG4gICAgY3VycmVudFNuYWNrXG4gIHJldHVybiAoXG4gICAgPFNuYWNrQmFyQ29udGV4dC5Qcm92aWRlciB2YWx1ZT17dmFsdWV9PlxuICAgICAge2NoaWxkcmVufVxuICAgICAge21lc3NhZ2UgJiYgKFxuICAgICAgICA8UG9ydGFsPlxuICAgICAgICAgIDxTbmFja0JhclxuICAgICAgICAgICAga2V5PXttZXNzYWdlfVxuICAgICAgICAgICAgY2xhc3NOYW1lPVwibGVmdC0wIGJvdHRvbS0wIHAtNCBtYXgtdy1mdWxsXCJcbiAgICAgICAgICAgIGFuY2hvck9yaWdpbj17e1xuICAgICAgICAgICAgICB2ZXJ0aWNhbDogJ2JvdHRvbScsXG4gICAgICAgICAgICAgIGhvcml6b250YWw6ICdsZWZ0JyxcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBvcGVuPXt0cnVlfVxuICAgICAgICAgICAgb25DbG9zZT17aGFuZGxlQ2xvc2V9XG4gICAgICAgICAgICB7Li4uc25hY2tCYXJQcm9wc31cbiAgICAgICAgICA+XG4gICAgICAgICAgICA8QWxlcnRcbiAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICBtaW5XaWR0aDogJzE4cmVtJyxcbiAgICAgICAgICAgICAgICBhbGlnbkl0ZW1zOiAnY2VudGVyJyxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgYWN0aW9uPXtcbiAgICAgICAgICAgICAgICA8PlxuICAgICAgICAgICAgICAgICAge3VuZG8gJiYgKFxuICAgICAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7IGZvbnRTaXplOiAnLjc1cmVtJyB9fVxuICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9e2hhbmRsZVVuZG99XG4gICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICBVTkRPXG4gICAgICAgICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgIHtjbG9zZWFibGUgJiYgKFxuICAgICAgICAgICAgICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoMjc2OSkgRklYTUU6IE5vIG92ZXJsb2FkIG1hdGNoZXMgdGhpcyBjYWxsLlxuICAgICAgICAgICAgICAgICAgICA8SWNvbkJ1dHRvblxuICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7IHBhZGRpbmc6ICczcHgnIH19XG4gICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVDbG9zZX1cbiAgICAgICAgICAgICAgICAgICAgICBzaXplPVwibGFyZ2VcIlxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgPENsb3NlSWNvbiBmb250U2l6ZT1cInNtYWxsXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgPC9JY29uQnV0dG9uPlxuICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICA8Lz5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBzZXZlcml0eT17c3RhdHVzfVxuICAgICAgICAgICAgICB7Li4uYWxlcnRQcm9wc31cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAge21lc3NhZ2V9XG4gICAgICAgICAgICA8L0FsZXJ0PlxuICAgICAgICAgIDwvU25hY2tCYXI+XG4gICAgICAgIDwvUG9ydGFsPlxuICAgICAgKX1cbiAgICA8L1NuYWNrQmFyQ29udGV4dC5Qcm92aWRlcj5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/spellcheck/spellcheck.d.ts b/src/main/webapp/component/spellcheck/spellcheck.d.ts new file mode 100644 index 00000000000..fcd7353e021 --- /dev/null +++ b/src/main/webapp/component/spellcheck/spellcheck.d.ts @@ -0,0 +1,7 @@ +/// +type Props = { + selectionInterface: any; + model: any; +}; +declare const _default: (props: Props) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/component/spellcheck/spellcheck.js b/src/main/webapp/component/spellcheck/spellcheck.js new file mode 100644 index 00000000000..2e584e74427 --- /dev/null +++ b/src/main/webapp/component/spellcheck/spellcheck.js @@ -0,0 +1,103 @@ +import { __makeTemplateObject, __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import styled from 'styled-components'; +import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks'; +var SHOW_MORE_LENGTH = 2; +var ShowingResultsForContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.15rem;\n text-align: center;\n font-size: 0.75rem;\n border: none !important;\n"], ["\n padding: 0.15rem;\n text-align: center;\n font-size: 0.75rem;\n border: none !important;\n"]))); +var ShowMore = styled.a(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 0.15rem;\n font-size: 0.75rem;\n"], ["\n padding: 0.15rem;\n font-size: 0.75rem;\n"]))); +var DidYouMeanContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n text-align: center;\n border: none !important;\n"], ["\n text-align: center;\n border: none !important;\n"]))); +var ResendQuery = styled.a(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 0.15rem;\n text-align: center;\n font-size: 0.75rem;\n text-decoration: none;\n width: 100%;\n"], ["\n padding: 0.15rem;\n text-align: center;\n font-size: 0.75rem;\n text-decoration: none;\n width: 100%;\n"]))); +var Spellcheck = function (props) { + var _a = __read(React.useState(false), 2), expandShowingResultForText = _a[0], setExpandShowingResultForText = _a[1]; + var _b = __read(React.useState(false), 2), expandDidYouMeanFieldText = _b[0], setExpandDidYouMeanFieldText = _b[1]; + var createShowResultText = function (showingResultsForFields) { + var showingResultsFor = 'Showing Results for '; + if (showingResultsForFields !== undefined && + showingResultsForFields !== null && + showingResultsForFields.length > 0) { + if (!expandShowingResultForText && showingResultsForFields.length > 2) { + showingResultsFor += createCondensedResultsForText(showingResultsForFields); + return showingResultsFor; + } + showingResultsFor += createExpandedResultsForText(showingResultsForFields); + return showingResultsFor; + } + return null; + }; + var createDidYouMeanText = function (didYouMeanFields) { + var didYouMean = 'Did you mean '; + if (didYouMeanFields !== undefined && + didYouMeanFields !== null && + didYouMeanFields.length > 0) { + if (!expandDidYouMeanFieldText && didYouMeanFields.length > 2) { + didYouMean += createCondensedResultsForText(didYouMeanFields); + return didYouMean; + } + didYouMean += createExpandedResultsForText(didYouMeanFields); + return didYouMean; + } + return null; + }; + var createCondensedResultsForText = function (showingResultsForFields) { + var copyQuery = __spreadArray([], __read(showingResultsForFields), false); + copyQuery.splice(0, copyQuery.length - SHOW_MORE_LENGTH); + return copyQuery.join(', '); + }; + var createExpandedResultsForText = function (showingResultsForFields) { + return showingResultsForFields.join(', '); + }; + var rerunQuery = function (model) { + model.set('spellcheck', false); + model.startSearchFromFirstPage(); + model.set('spellcheck', true); + }; + var selectionInterface = props.selectionInterface, model = props.model; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var results = Object.values(lazyResults.results); + if (results.length === 0) { + return null; + } + else if (model.get('spellcheck')) { + var showingResultsForFields = lazyResults.showingResultsForFields, didYouMeanFields = lazyResults.didYouMeanFields; + var showingResultsFor = createShowResultText(showingResultsForFields); + var didYouMean = createDidYouMeanText(didYouMeanFields); + return (React.createElement(React.Fragment, null, + showingResultsFor !== null && (React.createElement(ShowingResultsForContainer, null, + showingResultsFor, + showingResultsForFields !== null && + showingResultsForFields !== undefined && + showingResultsForFields.length > 2 && (React.createElement(ShowMore, { onClick: function () { + setExpandShowingResultForText(!expandShowingResultForText); + } }, expandShowingResultForText ? 'less' : 'more')))), + didYouMean !== null && (React.createElement(DidYouMeanContainer, null, + React.createElement(ResendQuery, { onClick: function () { + rerunQuery(model); + } }, didYouMean), + didYouMeanFields !== null && + didYouMeanFields !== undefined && + didYouMeanFields.length > 2 && (React.createElement(ShowMore, { onClick: function () { + setExpandDidYouMeanFieldText(!expandDidYouMeanFieldText); + } }, expandDidYouMeanFieldText ? 'less' : 'more')))))); + } + return null; +}; +export default hot(module)(Spellcheck); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BlbGxjaGVjay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvc3BlbGxjaGVjay9zcGVsbGNoZWNrLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsb0NBQW9DLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQTtBQUVuRixJQUFNLGdCQUFnQixHQUFHLENBQUMsQ0FBQTtBQU8xQixJQUFNLDB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AgICAgICAgICAgICAgc2hvd2luZ1Jlc3VsdHNGb3JGaWVsZHMubGVuZ3RoID4gMiAmJiAoXG4gICAgICAgICAgICAgICAgPFNob3dNb3JlXG4gICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHNldEV4cGFuZFNob3dpbmdSZXN1bHRGb3JUZXh0KCFleHBhbmRTaG93aW5nUmVzdWx0Rm9yVGV4dClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAge2V4cGFuZFNob3dpbmdSZXN1bHRGb3JUZXh0ID8gJ2xlc3MnIDogJ21vcmUnfVxuICAgICAgICAgICAgICAgIDwvU2hvd01vcmU+XG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9TaG93aW5nUmVzdWx0c0ZvckNvbnRhaW5lcj5cbiAgICAgICAgKX1cbiAgICAgICAge2RpZFlvdU1lYW4gIT09IG51bGwgJiYgKFxuICAgICAgICAgIDxEaWRZb3VNZWFuQ29udGFpbmVyPlxuICAgICAgICAgICAgPFJlc2VuZFF1ZXJ5XG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICByZXJ1blF1ZXJ5KG1vZGVsKVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICB7ZGlkWW91TWVhbn1cbiAgICAgICAgICAgIDwvUmVzZW5kUXVlcnk+XG4gICAgICAgICAgICB7ZGlkWW91TWVhbkZpZWxkcyAhPT0gbnVsbCAmJlxuICAgICAgICAgICAgICBkaWRZb3VNZWFuRmllbGRzICE9PSB1bmRlZmluZWQgJiZcbiAgICAgICAgICAgICAgZGlkWW91TWVhbkZpZWxkcy5sZW5ndGggPiAyICYmIChcbiAgICAgICAgICAgICAgICA8U2hvd01vcmVcbiAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2V0RXhwYW5kRGlkWW91TWVhbkZpZWxkVGV4dCghZXhwYW5kRGlkWW91TWVhbkZpZWxkVGV4dClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAge2V4cGFuZERpZFlvdU1lYW5GaWVsZFRleHQgPyAnbGVzcycgOiAnbW9yZSd9XG4gICAgICAgICAgICAgICAgPC9TaG93TW9yZT5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L0RpZFlvdU1lYW5Db250YWluZXI+XG4gICAgICAgICl9XG4gICAgICA8Lz5cbiAgICApXG4gIH1cbiAgcmV0dXJuIG51bGxcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoU3BlbGxjaGVjaylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/swath/swath.d.ts b/src/main/webapp/component/swath/swath.d.ts new file mode 100644 index 00000000000..dde58576c43 --- /dev/null +++ b/src/main/webapp/component/swath/swath.d.ts @@ -0,0 +1,3 @@ +import * as React from 'react'; +declare const _default: (props: React.DetailedHTMLProps, HTMLDivElement>) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/swath/swath.js b/src/main/webapp/component/swath/swath.js new file mode 100644 index 00000000000..1910649a98f --- /dev/null +++ b/src/main/webapp/component/swath/swath.js @@ -0,0 +1,9 @@ +import { __assign, __rest } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +var Swath = function (props) { + var className = props.className, otherProps = __rest(props, ["className"]); + return (React.createElement("div", __assign({ className: "".concat(className ? className : '', " Mui-bg-divider") }, otherProps))); +}; +export default hot(module)(Swath); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3N3YXRoL3N3YXRoL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YXVsdCBob3QobW9kdWxlKShTd2F0aClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/system-usage/system-usage.d.ts b/src/main/webapp/component/system-usage/system-usage.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/component/system-usage/system-usage.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/system-usage/system-usage.js b/src/main/webapp/component/system-usage/system-usage.js new file mode 100644 index 00000000000..4f207c1b6a0 --- /dev/null +++ b/src/main/webapp/component/system-usage/system-usage.js @@ -0,0 +1,93 @@ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import DialogActions from '@mui/material/DialogActions'; +import DialogTitle from '@mui/material/DialogTitle'; +import DialogContent from '@mui/material/DialogContent'; +import Divider from '@mui/material/Divider'; +import user from '../singletons/user-instance'; +import { useDialog } from '../dialog'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +function hasMessage() { + var _a; + return (_a = StartupDataStore.Configuration.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.systemUsageTitle; +} +function hasNotSeenMessage() { + var systemUsage = window.sessionStorage.getItem('systemUsage'); + if (systemUsage === null) { + window.sessionStorage.setItem('systemUsage', '{}'); + return true; + } + else { + return (JSON.parse(systemUsage)[user.get('user').get('username')] === undefined); + } +} +function shownOncePerSession() { + var _a; + return (_a = StartupDataStore.Configuration.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.systemUsageOncePerSession; +} +function shouldDisplayMessage() { + if (hasMessage()) { + if (!shownOncePerSession()) { + return true; + } + else { + return hasNotSeenMessage(); + } + } + else { + return false; + } +} +var SystemUsageModal = function () { + var Configuration = useConfiguration(); + var dialogContext = useDialog(); + React.useEffect(function () { + if (shouldDisplayMessage()) { + openModal(); + } + else { + user.once('sync', function () { + openModal(); + }); + } + }, []); + var openModal = function () { + var _a; + dialogContext.setProps({ + onClose: function (_event, reason) { + if (reason === 'backdropClick') { + return; + } + dialogContext.setProps({ + open: false, + }); + }, + open: true, + children: (React.createElement(React.Fragment, null, + React.createElement(DialogTitle, { style: { textAlign: 'center' } }, (_a = Configuration.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.systemUsageTitle), + React.createElement(Divider, null), + React.createElement(DialogContent, { style: { minHeight: '30em', minWidth: '60vh' } }, + React.createElement("div", { dangerouslySetInnerHTML: { + __html: Configuration.getSystemUsageMessage(), + } })), + React.createElement(Divider, null), + React.createElement(DialogActions, null, + React.createElement(Button, { variant: "contained", color: "primary", onClick: function () { + var _a; + if ((_a = Configuration.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.systemUsageOncePerSession) { + var systemUsage = JSON.parse(window.sessionStorage.getItem('systemUsage')); + systemUsage[user.get('user').get('username')] = 'true'; + window.sessionStorage.setItem('systemUsage', JSON.stringify(systemUsage)); + } + dialogContext.setProps({ + open: false, + }); + } }, "Acknowledge")))), + }); + }; + return React.createElement(React.Fragment, null); +}; +export default hot(module)(SystemUsageModal); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3lzdGVtLXVzYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC9zeXN0ZW0tdXNhZ2Uvc3lzdGVtLXVzYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxhQUFhLE1BQU0sNkJBQTZCLENBQUE7QUFDdkQsT0FBTyxXQUFXLE1BQU0sMkJBQ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HVzZURpYWxvZygpXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgaWYgKHNob3VsZERpc3BsYXlNZXNzYWdlKCkpIHtcbiAgICAgIG9wZW5Nb2RhbCgpXG4gICAgfSBlbHNlIHtcbiAgICAgIHVzZXIub25jZSgnc3luYycsICgpID0+IHtcbiAgICAgICAgb3Blbk1vZGFsKClcbiAgICAgIH0pXG4gICAgfVxuICB9LCBbXSlcbiAgY29uc3Qgb3Blbk1vZGFsID0gKCkgPT4ge1xuICAgIGRpYWxvZ0NvbnRleHQuc2V0UHJvcHMoe1xuICAgICAgb25DbG9zZTogKF9ldmVudCwgcmVhc29uKSA9PiB7XG4gICAgICAgIGlmIChyZWFzb24gPT09ICdiYWNrZHJvcENsaWNrJykge1xuICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG4gICAgICAgIGRpYWxvZ0NvbnRleHQuc2V0UHJvcHMoe1xuICAgICAgICAgIG9wZW46IGZhbHNlLFxuICAgICAgICB9KVxuICAgICAgfSxcbiAgICAgIG9wZW46IHRydWUsXG4gICAgICBjaGlsZHJlbjogKFxuICAgICAgICA8PlxuICAgICAgICAgIDxEaWFsb2dUaXRsZSBzdHlsZT17eyB0ZXh0QWxpZ246ICdjZW50ZXInIH19PlxuICAgICAgICAgICAge0NvbmZpZ3VyYXRpb24ucGxhdGZvcm1VaUNvbmZpZ3VyYXRpb24/LnN5c3RlbVVzYWdlVGl0bGV9XG4gICAgICAgICAgPC9EaWFsb2dUaXRsZT5cbiAgICAgICAgICA8RGl2aWRlciAvPlxuICAgICAgICAgIDxEaWFsb2dDb250ZW50IHN0eWxlPXt7IG1pbkhlaWdodDogJzMwZW0nLCBtaW5XaWR0aDogJzYwdmgnIH19PlxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICBkYW5nZXJvdXNseVNldElubmVySFRNTD17e1xuICAgICAgICAgICAgICAgIF9faHRtbDogQ29uZmlndXJhdGlvbi5nZXRTeXN0ZW1Vc2FnZU1lc3NhZ2UoKSxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC9EaWFsb2dDb250ZW50PlxuICAgICAgICAgIDxEaXZpZGVyIC8+XG4gICAgICAgICAgPERpYWxvZ0FjdGlvbnM+XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIHZhcmlhbnQ9XCJjb250YWluZWRcIlxuICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgQ29uZmlndXJhdGlvbi5wbGF0Zm9ybVVpQ29uZmlndXJhdGlvblxuICAgICAgICAgICAgICAgICAgICA/LnN5c3RlbVVzYWdlT25jZVBlclNlc3Npb25cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IHN5c3RlbVVzYWdlID0gSlNPTi5wYXJzZShcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LnNlc3Npb25TdG9yYWdlLmdldEl0ZW0oJ3N5c3RlbVVzYWdlJykgYXMgYW55XG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBzeXN0ZW1Vc2FnZVt1c2VyLmdldCgndXNlcicpLmdldCgndXNlcm5hbWUnKV0gPSAndHJ1ZSdcbiAgICAgICAgICAgICAgICAgIHdpbmRvdy5zZXNzaW9uU3RvcmFnZS5zZXRJdGVtKFxuICAgICAgICAgICAgICAgICAgICAnc3lzdGVtVXNhZ2UnLFxuICAgICAgICAgICAgICAgICAgICBKU09OLnN0cmluZ2lmeShzeXN0ZW1Vc2FnZSlcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZGlhbG9nQ29udGV4dC5zZXRQcm9wcyh7XG4gICAgICAgICAgICAgICAgICBvcGVuOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICBBY2tub3dsZWRnZVxuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPC9EaWFsb2dBY3Rpb25zPlxuICAgICAgICA8Lz5cbiAgICAgICksXG4gICAgfSlcbiAgfVxuICByZXR1cm4gPD48Lz5cbn1cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFN5c3RlbVVzYWdlTW9kYWwpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/table-export/index.d.ts b/src/main/webapp/component/table-export/index.d.ts new file mode 100644 index 00000000000..9b9bee4d48b --- /dev/null +++ b/src/main/webapp/component/table-export/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default as tableExport, Props, getWarning, getExportBody, } from './table-export'; diff --git a/src/main/webapp/component/table-export/index.js b/src/main/webapp/component/table-export/index.js new file mode 100644 index 00000000000..045546f3adf --- /dev/null +++ b/src/main/webapp/component/table-export/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default as tableExport, getWarning, getExportBody, } from './table-export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ZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7XG4gIGRlZmF1bHQgYXMgdGFibGVFeHBvcnQsXG4gIFByb3BzLFxuICBnZXRXYXJuaW5nLFxuICBnZXRFeHBvcnRCb2R5LFxufSBmcm9tICcuL3RhYmxlLWV4cG9ydCdcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/table-export/table-export.d.ts b/src/main/webapp/component/table-export/table-export.d.ts new file mode 100644 index 00000000000..0ec10fa0f4f --- /dev/null +++ b/src/main/webapp/component/table-export/table-export.d.ts @@ -0,0 +1,29 @@ +/// +import { ExportCountInfo, ExportInfo } from '../../react-component/utils/export'; +export type Props = { + selectionInterface: any; + onClose?: any; + exportSuccessful?: boolean; + setExportSuccessful?: any; +}; +export declare const getWarning: (exportCountInfo: ExportCountInfo) => string; +export declare const getExportBody: (ExportInfo: ExportInfo) => Promise<{ + phonetics: any; + spellcheck: any; + additionalOptions: string; + searches: { + srcs: any; + cql: string; + count: number; + cacheId: any; + }[]; + count: number; + sorts: any; + args: { + hiddenFields: string[]; + columnOrder: string[]; + columnAliasMap: Record | undefined; + }; +}>; +declare const TableExports: ({ selectionInterface, onClose, setExportSuccessful, exportSuccessful, }: Props) => JSX.Element; +export default TableExports; diff --git a/src/main/webapp/component/table-export/table-export.js b/src/main/webapp/component/table-export/table-export.js new file mode 100644 index 00000000000..4e4a444ebad --- /dev/null +++ b/src/main/webapp/component/table-export/table-export.js @@ -0,0 +1,305 @@ +import { __assign, __awaiter, __generator, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import _ from 'underscore'; +import { useEffect, useState } from 'react'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cont... Remove this comment to see the full error message +import contentDisposition from 'content-disposition'; +import LinearProgress from '@mui/material/LinearProgress'; +import Button from '@mui/material/Button'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import useSnack from '../hooks/useSnack'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { getExportOptions, Transformer, OverridableGetColumnOrder, exportResultSet, } from '../../react-component/utils/export'; +import user from '../../component/singletons/user-instance'; +import { DEFAULT_USER_QUERY_OPTIONS } from '../../js/model/TypedQuery'; +import { getResultSetCql } from '../../react-component/utils/cql'; +import SummaryManageAttributes from '../../react-component/summary-manage-attributes/summary-manage-attributes'; +import { OverridableSaveFile } from '../../react-component/utils/save-file/save-file'; +import ProgressButton from '../../react-component/progress-button/progress-button'; +import DialogContent from '@mui/material/DialogContent/DialogContent'; +import DialogActions from '@mui/material/DialogActions/DialogActions'; +import DialogContentText from '@mui/material/DialogContentText'; +import { limitToDeleted, limitToHistoric } from '../../js/model/Query'; +function getSrcs(selectionInterface) { + return selectionInterface.getCurrentQuery().getSelectedSources(); +} +function getHiddenFields() { + return user.get('user').get('preferences').get('columnHide'); +} +function getSorts(selectionInterface) { + return (user.get('user').get('preferences').get('resultSort') || + selectionInterface.getCurrentQuery().get('sorts')); +} +function getHits(sources) { + return sources + .filter(function (source) { return source.id !== 'cache'; }) + .reduce(function (hits, source) { return (source.hits ? hits + source.hits : hits); }, 0); +} +function getExportCount(_a) { + var exportSize = _a.exportSize, selectionInterface = _a.selectionInterface, customExportCount = _a.customExportCount; + if (exportSize === 'custom') { + return customExportCount; + } + var result = selectionInterface.getCurrentQuery().get('result'); + return exportSize === 'all' + ? getHits(Object.values(result.get('lazyResults').status)) + : Object.keys(result.get('lazyResults').results).length; +} +export var getWarning = function (exportCountInfo) { + var exportResultLimit = StartupDataStore.Configuration.getExportLimit(); + var exportCount = getExportCount(exportCountInfo); + var result = exportCountInfo.selectionInterface + .getCurrentQuery() + .get('result'); + var totalHits = getHits(Object.values(result.get('lazyResults').status)); + var limitWarning = "You cannot export more than the administrator configured limit of ".concat(exportResultLimit, "."); + var warningMessage = ''; + if (exportCount > exportResultLimit) { + if (exportCountInfo.exportSize === 'custom') { + return limitWarning; + } + warningMessage = + limitWarning + + " Only ".concat(exportResultLimit, " ").concat(exportResultLimit === 1 ? "result" : "results", " will be exported."); + } + if (exportCountInfo.exportSize === 'custom') { + if (exportCount > totalHits) { + warningMessage = "You are trying to export ".concat(exportCount, " results but there ").concat(totalHits === 1 ? "is" : "are", " only ").concat(totalHits, ". Only ").concat(totalHits, " ").concat(totalHits === 1 ? "result" : "results", " will be exported."); + } + } + if (totalHits > 100 && exportCount > 100 && exportResultLimit > 100) { + warningMessage += " This may take a long time."; + } + return warningMessage; +}; +export var getExportBody = function (ExportInfo) { return __awaiter(void 0, void 0, void 0, function () { + var exportSize, customExportCount, selectionInterface, exportResultLimit, hiddenFields, columnOrder, srcs, sorts, query, cacheId, phonetics, spellcheck, additionalOptions, cqlFilterTree, exportCount, args, searches, queryCount, cql, resultIdSourcePairs, srcMap_1; + var _a; + return __generator(this, function (_b) { + exportSize = ExportInfo.exportSize, customExportCount = ExportInfo.customExportCount, selectionInterface = ExportInfo.selectionInterface; + exportResultLimit = StartupDataStore.Configuration.getExportLimit(); + hiddenFields = getHiddenFields(); + columnOrder = OverridableGetColumnOrder.get()(); + srcs = getSrcs(selectionInterface); + sorts = getSorts(selectionInterface); + query = selectionInterface.getCurrentQuery(); + cacheId = query.get('cacheId'); + phonetics = query.get('phonetics'); + spellcheck = query.get('spellcheck'); + additionalOptions = JSON.parse(query.get('additionalOptions') || '{}'); + cqlFilterTree = query.get('filterTree'); + if (query.options.limitToDeleted) { + cqlFilterTree = limitToDeleted(cqlFilterTree); + } + else if (query.options.limitToHistoric) { + cqlFilterTree = limitToHistoric(cqlFilterTree); + } + if (query.options.additionalOptions) { + additionalOptions = _.extend(additionalOptions, query.options.additionalOptions); + } + exportCount = Math.min(getExportCount({ exportSize: exportSize, selectionInterface: selectionInterface, customExportCount: customExportCount }), exportResultLimit); + args = { + hiddenFields: hiddenFields.length > 0 ? hiddenFields : [], + columnOrder: columnOrder.length > 0 ? columnOrder : [], + columnAliasMap: (_a = StartupDataStore.Configuration.config) === null || _a === void 0 ? void 0 : _a.attributeAliases, + }; + searches = []; + queryCount = exportCount; + cql = DEFAULT_USER_QUERY_OPTIONS.transformFilterTree({ + originalFilterTree: cqlFilterTree, + queryRef: query, + }); + if (ExportInfo.exportSize === 'currentPage') { + resultIdSourcePairs = Object.values(query.get('result').get('lazyResults').results).map(function (result) { return ({ + id: result.plain.metacard.properties['id'], + sourceId: result.plain.metacard.properties['source-id'], + }); }); + srcMap_1 = resultIdSourcePairs.reduce(function (srcMap, curPair) { + if (!srcMap[curPair.sourceId]) { + srcMap[curPair.sourceId] = []; + } + srcMap[curPair.sourceId].push(curPair.id); + return srcMap; + }, {}); + Object.keys(srcMap_1).forEach(function (src) { + searches.push({ + srcs: [src], + cql: getResultSetCql(srcMap_1[src]), + count: srcMap_1[src].length, + cacheId: cacheId, + }); + }); + } + else { + searches.push({ + srcs: srcs, + cql: cql, + count: queryCount, + cacheId: cacheId, + }); + } + return [2 /*return*/, { + phonetics: phonetics, + spellcheck: spellcheck, + additionalOptions: JSON.stringify(additionalOptions), + searches: searches, + count: exportCount, + sorts: sorts, + args: args, + }]; + }); +}); }; +var TableExports = function (_a) { + var selectionInterface = _a.selectionInterface, onClose = _a.onClose, setExportSuccessful = _a.setExportSuccessful, exportSuccessful = _a.exportSuccessful; + var exportLimit = StartupDataStore.Configuration.getExportLimit(); + var _b = __read(useState([]), 2), formats = _b[0], setFormats = _b[1]; + var _c = __read(useState(''), 2), exportFormat = _c[0], setExportFormat = _c[1]; + var _d = __read(useState('all'), 2), exportSize = _d[0], setExportSize = _d[1]; + var _f = __read(useState(''), 2), warning = _f[0], setWarning = _f[1]; + var _g = __read(useState(exportLimit), 2), customExportCount = _g[0], setCustomExportCount = _g[1]; + var _h = __read(useState(false), 2), loading = _h[0], setLoading = _h[1]; + var onExportClick = function (addSnack, ExportInfo) { return __awaiter(void 0, void 0, void 0, function () { + var exportFormat, body, response, data, contentType, filename, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + exportFormat = encodeURIComponent(ExportInfo.exportFormat); + _a.label = 1; + case 1: + _a.trys.push([1, 7, 8, 9]); + setLoading(true); + return [4 /*yield*/, getExportBody(ExportInfo)]; + case 2: + body = _a.sent(); + return [4 /*yield*/, exportResultSet(exportFormat, body)]; + case 3: + response = _a.sent(); + if (!(response.status === 200)) return [3 /*break*/, 5]; + return [4 /*yield*/, response.blob()]; + case 4: + data = _a.sent(); + contentType = response.headers.get('content-type'); + filename = contentDisposition.parse(response.headers.get('content-disposition')).parameters.filename; + OverridableSaveFile.get()(filename, 'data:' + contentType, data); + setExportSuccessful(true); + return [3 /*break*/, 6]; + case 5: + setExportSuccessful(false); + addSnack('Error: Could not export results.', { + alertProps: { severity: 'error' }, + }); + _a.label = 6; + case 6: return [3 /*break*/, 9]; + case 7: + error_1 = _a.sent(); + console.error(error_1); + setExportSuccessful(false); + return [3 /*break*/, 9]; + case 8: + setLoading(false); + return [7 /*endfinally*/]; + case 9: return [2 /*return*/]; + } + }); + }); }; + if (exportSuccessful) { + onClose(); + } + var exportSizes = [ + { + label: 'Current Page', + value: 'currentPage', + }, + { + label: 'All Results', + value: 'all', + }, + { + label: 'Specific Number of Results', + value: 'custom', + }, + ]; + var addSnack = useSnack(); + useEffect(function () { + var fetchFormats = function () { return __awaiter(void 0, void 0, void 0, function () { + var formats; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getExportOptions(Transformer.Query)]; + case 1: + formats = _a.sent(); + setFormats(formats.map(function (exportFormat) { return ({ + label: exportFormat.displayName, + value: exportFormat.id, + }); })); + formats.length && setExportFormat(formats[0].id); + return [2 /*return*/]; + } + }); + }); }; + fetchFormats(); + }, []); + useEffect(function () { + setWarning(getWarning({ + exportSize: exportSize, + selectionInterface: selectionInterface, + customExportCount: customExportCount, + })); + }, [exportSize, customExportCount]); + return formats.length === 0 ? (React.createElement(LinearProgress, { className: "w-full h-2" })) : (React.createElement(React.Fragment, null, + React.createElement(DialogContent, null, + React.createElement(DialogContentText, null, + React.createElement("div", { className: "p-4", style: { minWidth: '400px' } }, + React.createElement("div", { className: "pt-2" }, + React.createElement(Autocomplete, { size: "small", options: exportSizes, onChange: function (_e, newValue) { + setExportSize(newValue.value); + }, isOptionEqualToValue: function (option) { return option.value === exportSize; }, getOptionLabel: function (option) { + return option.label; + }, disableClearable: true, value: exportSizes.find(function (choice) { return choice.value === exportSize; }), renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Export", variant: "outlined" }))); } })), + exportSize === 'custom' ? (React.createElement("div", { className: "pt-2" }, + React.createElement(TextField, { fullWidth: true, size: "small", type: "number", label: "", placeholder: "Enter number of results you would like to export", name: "customExport", value: customExportCount, onChange: function (e) { + setCustomExportCount(Number(e.target.value)); + }, variant: "outlined" }))) : (React.createElement("div", null)), + React.createElement("div", { className: "pt-2 export-format" }, + React.createElement(Autocomplete, { size: "small", options: formats, onChange: function (_e, newValue) { + setExportFormat(newValue.value); + }, isOptionEqualToValue: function (option) { return option.value === exportFormat; }, getOptionLabel: function (option) { + return option.label; + }, disableClearable: true, value: formats.find(function (choice) { return choice.value === exportFormat; }), renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "as", variant: "outlined" }))); } })), + ['csv', 'rtf', 'xlsx'].includes(exportFormat) ? (React.createElement(SummaryManageAttributes, { isExport: true })) : null, + warning && (React.createElement("div", { className: "warning text-center pt-1" }, + React.createElement("i", { className: "fa fa-warning" }), + React.createElement("span", null, warning)))))), + React.createElement(DialogActions, null, + React.createElement("div", { className: "pt-2", style: { display: 'flex', justifyContent: 'flex-end' } }, + React.createElement(Button, { className: "mr-2", disabled: loading, variant: "text", onClick: function () { + onClose(); + } }, "Cancel"), + React.createElement(ProgressButton, { variant: "contained", color: "primary", loading: loading, disabled: loading && + exportSize === 'custom' && + customExportCount > exportLimit, onClick: function () { + onExportClick(addSnack, { + exportFormat: exportFormat, + exportSize: exportSize, + customExportCount: customExportCount, + selectionInterface: selectionInterface, + }); + } }, "Export"))))); +}; +export default TableExports; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUtZXhwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC90YWJsZS1leHBvcnQvdGFibGUtZXhwb3J0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sQ0FBQyxNQUFNLFlBQVksQ0FBQTtBQUMxQixPQUFPLEVBQUUsU0FBUyxFQUFFLFFBQVEsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUMzQyxtSkFBbUo7QUFDbkosT0FBTyxrQkFBa0IsTUFBTSxxQkFBcUIsQ0FBQTtBQUNwRCxPQUFPLGNBQWMsTUFBTSw4QkFBOEIsQ0FBQTtBQUN6RCxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLFlBQVksTUFBTSw0Q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PT4ge1xuICAgICAgICAgICAgICAgICAgc2V0RXhwb3J0U2l6ZShuZXdWYWx1ZS52YWx1ZSlcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIGlzT3B0aW9uRXF1YWxUb1ZhbHVlPXsob3B0aW9uKSA9PiBvcHRpb24udmFsdWUgPT09IGV4cG9ydFNpemV9XG4gICAgICAgICAgICAgICAgZ2V0T3B0aW9uTGFiZWw9eyhvcHRpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBvcHRpb24ubGFiZWxcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIGRpc2FibGVDbGVhcmFibGVcbiAgICAgICAgICAgICAgICB2YWx1ZT17ZXhwb3J0U2l6ZXMuZmluZChcbiAgICAgICAgICAgICAgICAgIChjaG9pY2UpID0+IGNob2ljZS52YWx1ZSA9PT0gZXhwb3J0U2l6ZVxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IChcbiAgICAgICAgICAgICAgICAgIDxUZXh0RmllbGQgey4uLnBhcmFtc30gbGFiZWw9XCJFeHBvcnRcIiB2YXJpYW50PVwib3V0bGluZWRcIiAvPlxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIHtleHBvcnRTaXplID09PSAnY3VzdG9tJyA/IChcbiAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJwdC0yXCI+XG4gICAgICAgICAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICAgICAgdHlwZT1cIm51bWJlclwiXG4gICAgICAgICAgICAgICAgICBsYWJlbD1cIlwiXG4gICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj1cIkVudGVyIG51bWJlciBvZiByZXN1bHRzIHlvdSB3b3VsZCBsaWtlIHRvIGV4cG9ydFwiXG4gICAgICAgICAgICAgICAgICBuYW1lPVwiY3VzdG9tRXhwb3J0XCJcbiAgICAgICAgICAgICAgICAgIHZhbHVlPXtjdXN0b21FeHBvcnRDb3VudH1cbiAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBzZXRDdXN0b21FeHBvcnRDb3VudChOdW1iZXIoZS50YXJnZXQudmFsdWUpKVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICA8ZGl2IC8+XG4gICAgICAgICAgICApfVxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJwdC0yIGV4cG9ydC1mb3JtYXRcIj5cbiAgICAgICAgICAgICAgPEF1dG9jb21wbGV0ZVxuICAgICAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICAgICAgb3B0aW9ucz17Zm9ybWF0c31cbiAgICAgICAgICAgICAgICBvbkNoYW5nZT17KF9lOiBhbnksIG5ld1ZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBzZXRFeHBvcnRGb3JtYXQobmV3VmFsdWUudmFsdWUpXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICBpc09wdGlvbkVxdWFsVG9WYWx1ZT17KG9wdGlvbikgPT4gb3B0aW9uLnZhbHVlID09PSBleHBvcnRGb3JtYXR9XG4gICAgICAgICAgICAgICAgZ2V0T3B0aW9uTGFiZWw9eyhvcHRpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBvcHRpb24ubGFiZWxcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIGRpc2FibGVDbGVhcmFibGVcbiAgICAgICAgICAgICAgICB2YWx1ZT17Zm9ybWF0cy5maW5kKChjaG9pY2UpID0+IGNob2ljZS52YWx1ZSA9PT0gZXhwb3J0Rm9ybWF0KX1cbiAgICAgICAgICAgICAgICByZW5kZXJJbnB1dD17KHBhcmFtcykgPT4gKFxuICAgICAgICAgICAgICAgICAgPFRleHRGaWVsZCB7Li4ucGFyYW1zfSBsYWJlbD1cImFzXCIgdmFyaWFudD1cIm91dGxpbmVkXCIgLz5cbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICB7Wydjc3YnLCAncnRmJywgJ3hsc3gnXS5pbmNsdWRlcyhleHBvcnRGb3JtYXQpID8gKFxuICAgICAgICAgICAgICA8U3VtbWFyeU1hbmFnZUF0dHJpYnV0ZXMgaXNFeHBvcnQ9e3RydWV9IC8+XG4gICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgIHt3YXJuaW5nICYmIChcbiAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJ3YXJuaW5nIHRleHQtY2VudGVyIHB0LTFcIj5cbiAgICAgICAgICAgICAgICA8aSBjbGFzc05hbWU9XCJmYSBmYS13YXJuaW5nXCIgLz5cbiAgICAgICAgICAgICAgICA8c3Bhbj57d2FybmluZ308L3NwYW4+XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9EaWFsb2dDb250ZW50VGV4dD5cbiAgICAgIDwvRGlhbG9nQ29udGVudD5cbiAgICAgIDxEaWFsb2dBY3Rpb25zPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY2xhc3NOYW1lPVwicHQtMlwiXG4gICAgICAgICAgc3R5bGU9e3sgZGlzcGxheTogJ2ZsZXgnLCBqdXN0aWZ5Q29udGVudDogJ2ZsZXgtZW5kJyB9fVxuICAgICAgICA+XG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgY2xhc3NOYW1lPVwibXItMlwiXG4gICAgICAgICAgICBkaXNhYmxlZD17bG9hZGluZ31cbiAgICAgICAgICAgIHZhcmlhbnQ9XCJ0ZXh0XCJcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgb25DbG9zZSgpXG4gICAgICAgICAgICB9fVxuICAgICAgICAgID5cbiAgICAgICAgICAgIENhbmNlbFxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDxQcm9ncmVzc0J1dHRvblxuICAgICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgbG9hZGluZz17bG9hZGluZ31cbiAgICAgICAgICAgIGRpc2FibGVkPXtcbiAgICAgICAgICAgICAgbG9hZGluZyAmJlxuICAgICAgICAgICAgICBleHBvcnRTaXplID09PSAnY3VzdG9tJyAmJlxuICAgICAgICAgICAgICBjdXN0b21FeHBvcnRDb3VudCA+IGV4cG9ydExpbWl0XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgIG9uRXhwb3J0Q2xpY2soYWRkU25hY2ssIHtcbiAgICAgICAgICAgICAgICBleHBvcnRGb3JtYXQsXG4gICAgICAgICAgICAgICAgZXhwb3J0U2l6ZSxcbiAgICAgICAgICAgICAgICBjdXN0b21FeHBvcnRDb3VudCxcbiAgICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2UsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9fVxuICAgICAgICAgID5cbiAgICAgICAgICAgIEV4cG9ydFxuICAgICAgICAgIDwvUHJvZ3Jlc3NCdXR0b24+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9EaWFsb2dBY3Rpb25zPlxuICAgIDwvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IFRhYmxlRXhwb3J0c1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/tabs/metacard/coordinateConverter.d.ts b/src/main/webapp/component/tabs/metacard/coordinateConverter.d.ts new file mode 100644 index 00000000000..3082f54a2f0 --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/coordinateConverter.d.ts @@ -0,0 +1,10 @@ +/** + * Converts wkt to the user's preferred coordinate format. + * Falls back to the wkt if the conversion fails. + */ +export declare const convertWktToPreferredCoordFormat: (wkt: string) => string; +/** + * Converts coordinates from lat lon to a single string in + * the user's preferred format + */ +export declare const convertCoordsToPreferred: (lat: number, lon: number) => string; diff --git a/src/main/webapp/component/tabs/metacard/coordinateConverter.js b/src/main/webapp/component/tabs/metacard/coordinateConverter.js new file mode 100644 index 00000000000..36e3aa885d6 --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/coordinateConverter.js @@ -0,0 +1,52 @@ +import { TypedUserInstance } from '../../singletons/TypedUser'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message +import mtgeo from 'mt-geo'; +import * as usngs from 'usng.js'; +// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. +var converter = new usngs.Converter(); +var usngPrecision = 6; +/** + * Converts wkt to the user's preferred coordinate format. + * Falls back to the wkt if the conversion fails. + */ +export var convertWktToPreferredCoordFormat = function (wkt) { + var coords = wkt.split(/\s/g); + if (coords.length !== 2) { + return wkt; + } + // must be in number format for LLtoUTMUPS converter + var lon = parseFloat(coords[0]); + var lat = parseFloat(coords[1]); + if (isNaN(lon) || isNaN(lat)) { + return wkt; + } + else { + return convertCoordsToPreferred(lat, lon); + } +}; +/** + * Converts coordinates from lat lon to a single string in + * the user's preferred format + */ +export var convertCoordsToPreferred = function (lat, lon) { + var coordFormat = TypedUserInstance.getCoordinateFormat(); + try { + switch (coordFormat) { + case 'degrees': + return "".concat(mtgeo.toLat(lat), " ").concat(mtgeo.toLon(lon)); + case 'decimal': + return "".concat(lat, " ").concat(lon); + case 'mgrs': + return converter.LLtoMGRSUPS(lat, lon, usngPrecision); + case 'utm': + return converter.LLtoUTMUPS(lat, lon); + case 'wkt': + default: + return "".concat(lon, " ").concat(lat); + } + } + catch (e) { + return "".concat(lon, " ").concat(lat); + } +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29vcmRpbmF0ZUNvbnZlcnRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdGFicy9tZXRhY2FyZC9jb29yZGluYXRlQ29udmVydGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQTtBQUM5RCxtSkFBbUo7QUFDbkosT0FBTyxLQUFLLE1BQU0sUUFBUSxDQUFBO0FBQzFCLE9BQU8sS0FBSyxLQUFLLE1BQU0sU0FBUyxDQUFBO0FBQ2hDLDRFQUE0RTtBQUM1RSxJQUFNLFNBQVMsR0FBRyxJQUFJLEtBQUssQ0FBQyxTQUFTLEVBQUUsQ0FBQTtBQUV2QyxJQUFNLGFBQWEsR0FBRyxDQUFDLENBQUE7QUFFdkI7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLElBQU0sZ0NBQWdDLEdBQUcsVUFBQyxHQUFXO0lBQzFELElBQU0sTUFBTSxHQUFHLEdBQUcsQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFL0IsSUFBSSxNQUFNLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtRQUN2QixPQUFPLEdBQUcsQ0FBQTtLQUNYO0lBRUQsb0RBQW9EO0lBQ3BELElBQU0sR0FBRyxHQUFHLFVBQVUsQ0FBQyxNQUFNLENBQUMsQ0F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jYXNlICd3a3QnOlxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuIGAke2xvbn0gJHtsYXR9YFxuICAgIH1cbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiBgJHtsb259ICR7bGF0fWBcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/tabs/metacard/highlightUtil.d.ts b/src/main/webapp/component/tabs/metacard/highlightUtil.d.ts new file mode 100644 index 00000000000..35f4bc4d7b0 --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/highlightUtil.d.ts @@ -0,0 +1,3 @@ +/// +import { AttributeHighlight } from '../../../js/model/LazyQueryResult/LazyQueryResults'; +export declare const displayHighlightedAttrInFull: (highlights: Array, text: string, index: number) => JSX.Element; diff --git a/src/main/webapp/component/tabs/metacard/highlightUtil.js b/src/main/webapp/component/tabs/metacard/highlightUtil.js new file mode 100644 index 00000000000..fa3e3ae58e3 --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/highlightUtil.js @@ -0,0 +1,41 @@ +import * as React from 'react'; +import Typography from '@mui/material/Typography'; +var comparator = function (a, b) { + var aIndex = parseInt(a.startIndex); + var bIndex = parseInt(b.startIndex); + if (aIndex < bIndex) { + return -1; + } + else if (aIndex === bIndex) { + return 0; + } + else if (aIndex > bIndex) { + return 1; + } + return 0; +}; +export var displayHighlightedAttrInFull = function (highlights, text, index) { + //sort these in the order in which they appear + highlights.sort(comparator); + // only use the highlights from this value if multivalued + var filteredHighlights = highlights.filter(function (highlight) { return parseInt(highlight.valueIndex) === index; }); + var textArray = []; + var currentIndex = 0; + filteredHighlights.forEach(function (highlight, index) { + var highlightStart = parseInt(highlight.startIndex); + var highlightEnd = parseInt(highlight.endIndex); + var beforeText = (React.createElement("span", { dangerouslySetInnerHTML: { + __html: text.substring(currentIndex, highlightStart), + } })); + var highlightText = (React.createElement("span", { className: "highlight", "data-id": index }, text.substring(highlightStart, highlightEnd))); + currentIndex = highlightEnd; + textArray.push(beforeText); + textArray.push(highlightText); + }); + var afterText = (React.createElement("span", { dangerouslySetInnerHTML: { + __html: text.substring(currentIndex), + } })); + textArray.push(afterText); + return React.createElement(Typography, null, textArray); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0VXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdGFicy9tZXRhY2FyZC9oaWdobGlnaHRVdGlsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLFVBQVUsTUFBTSwwQkFBMEIsQ0FBQTtBQUdqRCxJQUFNLFVBQVUsR0FBRyxVQUFDLENBQXFCLEVBQUUsQ0FBcUI7SUFDOUQsSUFBTSxNQUFNLEdBQUcsUUFBUSxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQTtJQUNyQyxJQUFNLE1BQU0sR0FBRyxRQUFRLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFBO0lBQ3JDLElBQUksTUFBTSxHQUFHLE1BQU0sRUFBRTtRQUNuQixPQUFPLENBQUMsQ0FBQyxDQUFBO0tBQ1Y7U0FBTSxJQUFJLE1BQU0sS0FBSyxNQUFNLEVBQUU7UUFDNUIsT0FBTyxDQUFDLENBQUE7S0FDVDtTQUFNLElBQUksTUFBTSxHQUFHLE1BQU0sRUFBRTtRQUMxQixPQUFPLENBQUMsQ0FBQTtLQUNUO0lBQ0QsT0FBTyxDQUFDLENBQUE7QUFDVixDQUFDLENBQUE7QUFFRCxNQUFNLENBQUMsSUFBTSw0QkFBNEIsR0FBRyxVQUMxQyxVQUFxQyxFQUNyQyxJQUFZLEVBQ1osS0FBYTtJQUViLDhDQUE4QztJQUM5QyxVQUFVL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9zcGFuPlxuICAgIClcbiAgICBjdXJyZW50SW5kZXggPSBoaWdobGlnaHRFbmRcbiAgICB0ZXh0QXJyYXkucHVzaChiZWZvcmVUZXh0KVxuICAgIHRleHRBcnJheS5wdXNoKGhpZ2hsaWdodFRleHQpXG4gIH0pXG4gIGNvbnN0IGFmdGVyVGV4dCA9IChcbiAgICA8c3BhblxuICAgICAgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUw9e3tcbiAgICAgICAgX19odG1sOiB0ZXh0LnN1YnN0cmluZyhjdXJyZW50SW5kZXgpLFxuICAgICAgfX1cbiAgICAvPlxuICApXG4gIHRleHRBcnJheS5wdXNoKGFmdGVyVGV4dClcbiAgcmV0dXJuIDxUeXBvZ3JhcGh5Pnt0ZXh0QXJyYXl9PC9UeXBvZ3JhcGh5PlxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/tabs/metacard/summary.d.ts b/src/main/webapp/component/tabs/metacard/summary.d.ts new file mode 100644 index 00000000000..2924329fc1f --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/summary.d.ts @@ -0,0 +1,14 @@ +/// +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + result: LazyQueryResult; +}; +export declare const Editor: ({ attr, lazyResult, onCancel, onSave, goBack, }: { + attr: string; + lazyResult: LazyQueryResult; + onCancel?: (() => void) | undefined; + onSave?: (() => void) | undefined; + goBack?: (() => void) | undefined; +}) => JSX.Element; +declare const _default: ({ result: selection }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/tabs/metacard/summary.js b/src/main/webapp/component/tabs/metacard/summary.js new file mode 100644 index 00000000000..cf7ec5a3ff2 --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/summary.js @@ -0,0 +1,549 @@ +import { __assign, __read, __spreadArray } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; +import Button from '@mui/material/Button'; +import user from '../../singletons/user-instance'; +import Autocomplete from '@mui/material/Autocomplete'; +import Checkbox from '@mui/material/Checkbox'; +import Divider from '@mui/material/Divider'; +import DeleteIcon from '@mui/icons-material/Delete'; +import TextField from '@mui/material/TextField'; +import { useDialog } from '../../dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import useSnack from '../../hooks/useSnack'; +import LinearProgress from '@mui/material/LinearProgress'; +import $ from 'jquery'; +import PublishIcon from '@mui/icons-material/Publish'; +import Paper from '@mui/material/Paper'; +import { useTheme } from '@mui/material/styles'; +import { useBackbone } from '../../selection-checkbox/useBackbone.hook'; +import { useCustomReadOnlyCheck } from './transfer-list'; +import KeyboardBackspaceIcon from '@mui/icons-material/KeyboardBackspace'; +import AddIcon from '@mui/icons-material/Add'; +import EditIcon from '@mui/icons-material/Edit'; +import Box from '@mui/material/Box'; +import { Elevations } from '../../theme/theme'; +import { DarkDivider } from '../../dark-divider/dark-divider'; +import { displayHighlightedAttrInFull } from './highlightUtil'; +import DateTimePicker from '../../fields/date-time-picker'; +import { useRerenderOnBackboneSync } from '../../../js/model/LazyQueryResult/hooks'; +import useCoordinateFormat from './useCoordinateFormat'; +import ExtensionPoints from '../../../extension-points'; +import LocationInputReact from '../../location-new/location-new.view'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +import { StartupDataStore } from '../../../js/model/Startup/startup'; +import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks'; +import Common from '../../../js/Common'; +import SummaryManageAttributes from '../../../react-component/summary-manage-attributes/summary-manage-attributes'; +import moment from 'moment-timezone'; +var ThumbnailInput = function (_a) { + var value = _a.value, _b = _a.onChange, onChange = _b === void 0 ? function () { } : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c; + var fileRef = React.useRef(null); + var imgRef = React.useRef(null); + return (React.createElement(Grid, { container: true, direction: "row", alignItems: "stretch", alignContent: "stretch", wrap: "nowrap" }, + React.createElement(Grid, { item: true, style: { overflow: 'hidden' } }, + React.createElement("input", { type: "file", ref: fileRef, style: { display: 'none' }, onChange: function (e) { + if (imgRef.current === null) { + return; + } + var reader = new FileReader(); + reader.onload = function (event) { + try { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + onChange(event.target.result); + } + catch (err) { + console.error('there is something wrong with file type'); + } + }; + reader.onerror = function () { + console.error('error'); + }; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + reader.readAsDataURL(e.target.files[0]); + } }), + React.createElement("img", { src: Common.getImageSrc(value), ref: imgRef, style: { maxWidth: '100%', maxHeight: '50vh' } })), + React.createElement(Grid, { item: true }, + React.createElement(Button, { style: { height: '100%' }, variant: "outlined", disabled: disabled, onClick: function () { + if (fileRef.current !== null) { + fileRef.current.click(); + } + } }, + React.createElement(PublishIcon, null))))); +}; +var Mode; +(function (Mode) { + Mode["Normal"] = "normal"; + Mode["Saving"] = "saving"; + Mode["BadInput"] = "bad-input"; +})(Mode || (Mode = {})); +var handleMetacardUpdate = function (_a) { + var lazyResult = _a.lazyResult, attributes = _a.attributes, onSuccess = _a.onSuccess, onFailure = _a.onFailure; + var payload = [ + { + ids: [lazyResult.plain.metacard.properties.id], + attributes: attributes, + }, + ]; + setTimeout(function () { + $.ajax({ + url: "./internal/metacards?storeId=".concat(lazyResult.plain.metacard.properties['source-id']), + type: 'PATCH', + data: JSON.stringify(payload), + contentType: 'application/json', + }).then(function (response) { + lazyResult.refreshFromEditResponse(response); + onSuccess(); + }, function () { return onFailure(); }); + }, 1000); +}; +export var Editor = function (_a) { + var attr = _a.attr, lazyResult = _a.lazyResult, _b = _a.onCancel, onCancel = _b === void 0 ? function () { } : _b, _c = _a.onSave, onSave = _c === void 0 ? function () { } : _c, goBack = _a.goBack; + var _d = __read(React.useState(Mode.Normal), 2), mode = _d[0], setMode = _d[1]; + var _f = __read(React.useState(Array.isArray(lazyResult.plain.metacard.properties[attr]) + ? lazyResult.plain.metacard.properties[attr].slice(0) + : [lazyResult.plain.metacard.properties[attr]]), 2), values = _f[0], setValues = _f[1]; + var _g = __read(React.useState(-1), 2), dirtyIndex = _g[0], setDirtyIndex = _g[1]; + var _h = useMetacardDefinitions(), getAlias = _h.getAlias, isMulti = _h.isMulti, getType = _h.getType, getEnum = _h.getEnum, getRequired = _h.getRequired; + var label = getAlias(attr); + var isMultiValued = isMulti(attr); + var attrType = getType(attr); + var enumForAttr = getEnum(attr); + var addSnack = useSnack(); + var isRequired = getRequired(lazyResult.plain.metacardType, attr); + function getErrorMessage() { + if (isRequired || attr === 'title') { + var invalidField = !values || values.length < 1 || !values[0]; + return invalidField ? label + ' is required.' : ''; + } + return ''; + } + var errmsg = getErrorMessage(); + return (React.createElement(React.Fragment, null, + goBack && (React.createElement(Button, { variant: "text", color: "primary", startIcon: React.createElement(KeyboardBackspaceIcon, null), onClick: goBack }, "Cancel and return to manage")), + React.createElement("div", { className: "text-2xl text-center px-2 pb-2 pt-4 font-normal truncate" }, + "Editing ", + label, + " of \"", + lazyResult.plain.metacard.properties.title, + "\""), + React.createElement(Divider, null), + React.createElement(DialogContent, { style: { minHeight: '30em', minWidth: '60vh' } }, + React.createElement("div", { key: attr, className: "relative" }, + values.map(function (val, index) { + return (React.createElement(Grid, { container: true, direction: "row", className: "my-2" }, + index !== 0 ? React.createElement(Divider, { style: { margin: '5px 0px' } }) : null, + React.createElement(Grid, { item: true, md: 11 }, (function () { + if (enumForAttr.length > 0) { + return (React.createElement(Autocomplete, { disabled: mode === 'saving', value: val, onChange: function (_e, newValue) { + values[index] = newValue; + setValues(__spreadArray([], __read(values), false)); + }, fullWidth: true, disableClearable: true, size: "small", options: enumForAttr, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { variant: "outlined" }))); } })); + } + switch (attrType) { + case 'DATE': + return (React.createElement(DateTimePicker, { value: val, onChange: function (value) { + values[index] = value; + setValues(__spreadArray([], __read(values), false)); + }, TextFieldProps: { + disabled: mode !== Mode.Normal, + label: label, + variant: 'outlined', + }, BPDateProps: { + disabled: mode !== Mode.Normal, + } })); + case 'BINARY': + return (React.createElement(ThumbnailInput, { disabled: mode !== Mode.Normal, value: val, onChange: function (update) { + values[index] = update; + setValues(__spreadArray([], __read(values), false)); + } })); + case 'BOOLEAN': + return (React.createElement(Checkbox, { disabled: mode !== Mode.Normal, checked: val, onChange: function (e) { + values[index] = e.target.checked; + setValues(__spreadArray([], __read(values), false)); + }, color: "primary" })); + case 'LONG': + case 'DOUBLE': + case 'FLOAT': + case 'INTEGER': + case 'SHORT': + return (React.createElement(TextField, { disabled: mode !== Mode.Normal, value: val, onChange: function (e) { + values[index] = e.target.value; + setValues(__spreadArray([], __read(values), false)); + }, type: "number", fullWidth: true })); + case 'GEOMETRY': + return (React.createElement(LocationInputReact, { onChange: function (location) { + if (location === null || location === 'INVALID') { + setMode(Mode.BadInput); + } + else { + setMode(Mode.Normal); + } + values[index] = location; + setValues(__spreadArray([], __read(values), false)); + }, isStateDirty: dirtyIndex === index, resetIsStateDirty: function () { return setDirtyIndex(-1); }, value: val })); + default: + return (React.createElement(TextField, { disabled: mode !== Mode.Normal, value: val, onChange: function (e) { + values[index] = e.target.value; + setValues(__spreadArray([], __read(values), false)); + }, style: { whiteSpace: 'pre-line', flexGrow: 50 }, fullWidth: true, multiline: true, maxRows: 1000, error: errmsg.length != 0, helperText: errmsg })); + } + })()), + isMultiValued ? (React.createElement(Grid, { item: true, md: 1 }, + React.createElement(Button, { disabled: mode === Mode.Saving, onClick: function () { + values.splice(index, 1); + setDirtyIndex(index); + setValues(__spreadArray([], __read(values), false)); + } }, + React.createElement(DeleteIcon, null)))) : null)); + }), + isMultiValued && (React.createElement(Button, { disabled: mode === Mode.Saving, variant: "text", color: "primary", onClick: function () { + var defaultValue = ''; + switch (attrType) { + case 'DATE': + defaultValue = new Date().toISOString(); + break; + } + setValues(__spreadArray(__spreadArray([], __read(values), false), [defaultValue], false)); + } }, + React.createElement(Box, { color: "text.primary" }, + React.createElement(AddIcon, null)), + "Add New Value")))), + React.createElement(Divider, null), + React.createElement(DialogActions, null, + React.createElement(Button, { disabled: mode === Mode.Saving, variant: "text", onClick: function () { + onCancel(); + } }, "Cancel"), + React.createElement(Button, { disabled: mode !== Mode.Normal, variant: "contained", color: "primary", onClick: function () { + if (errmsg.length != 0) { + addSnack('This attribute is required.', { + status: 'error', + }); + return; + } + setMode(Mode.Saving); + var transformedValues; + if (isMultiValued && values && values.length > 1) { + transformedValues = values.filter(function (val) { return val != null && val !== ''; }); + } + else { + transformedValues = values; + } + try { + switch (attrType) { + case 'BINARY': + transformedValues = transformedValues.map(function (subval) { return subval.split(',')[1]; }); + break; + case 'DATE': + transformedValues = transformedValues.map(function (subval) { + return moment(subval).toISOString(); + }); + break; + case 'GEOMETRY': + transformedValues = values.filter(function (val) { return val != null && val !== ''; }); + break; + } + } + catch (err) { + console.error(err); + } + var attributes = [{ attribute: attr, values: transformedValues }]; + var onSuccess = function () { + return setTimeout(function () { + addSnack('Successfully updated.'); + onSave(); + }, 1000); + }; + var onFailure = function () { + return setTimeout(function () { + addSnack('Failed to update.', { status: 'error' }); + onSave(); + }, 1000); + }; + if (ExtensionPoints.handleMetacardUpdate) { + ExtensionPoints.handleMetacardUpdate({ + lazyResult: lazyResult, + attributesToUpdate: attributes, + }).then(onSuccess, onFailure); + } + else { + handleMetacardUpdate({ + lazyResult: lazyResult, + attributes: attributes, + onSuccess: onSuccess, + onFailure: onFailure, + }); + } + } }, "Save")), + mode === Mode.Saving ? (React.createElement(LinearProgress, { style: { + width: '100%', + height: '10px', + position: 'absolute', + left: '0px', + bottom: '0%', + }, variant: "indeterminate" })) : null)); +}; +var AttributeComponent = function (_a) { + var lazyResult = _a.lazyResult, attr = _a.attr, hideEmpty = _a.hideEmpty, _b = _a.summaryShown, summaryShown = _b === void 0 ? [] : _b, _c = _a.decimalPrecision, decimalPrecision = _c === void 0 ? undefined : _c, _d = _a.filter, filter = _d === void 0 ? '' : _d, forceRender = _a.forceRender; + var value = lazyResult.plain.metacard.properties[attr]; + if (hideEmpty) { + if (value === undefined || value === null) { + return null; + } + else if (typeof value === 'string' && !value.trim()) { + return null; + } + else if (Array.isArray(value) && value.length === 0) { + return null; + } + } + if (value === undefined || value === null) { + value = []; + } + if (value.constructor !== Array) { + value = [value]; + } + var _f = useMetacardDefinitions(), getAlias = _f.getAlias, getType = _f.getType; + var label = getAlias(attr); + var isNotWritable = useCustomReadOnlyCheck().isNotWritable; + var dialogContext = useDialog(); + var convertToFormat = useCoordinateFormat(); + var convertToPrecision = function (value) { + return value && decimalPrecision + ? Number(value).toFixed(decimalPrecision) + : value; + }; + var isUrl = function (value) { + if (value && typeof value === 'string') { + var protocol = value.toLowerCase().split('/')[0]; + return protocol && (protocol === 'http:' || protocol === 'https:'); + } + return false; + }; + var isFiltered = filter !== '' ? !label.toLowerCase().includes(filter.toLowerCase()) : false; + var onCancel = function () { + dialogContext.setProps({ + open: false, + children: null, + }); + }; + var onSave = function () { + dialogContext.setProps({ + open: false, + children: null, + }); + }; + var CustomAttributeEditor = ExtensionPoints.attributeEditor(lazyResult, attr); + var MemoItem = React.useMemo(function () { + return (React.createElement(Grid, { container: true, direction: "row", wrap: 'nowrap', className: "group relative" }, + isNotWritable({ attribute: attr, lazyResult: lazyResult }) ? null : (React.createElement("div", { className: "p-1 hidden group-hover:block absolute right-0 top-0" }, + React.createElement(Button, { onClick: function () { + dialogContext.setProps({ + open: true, + disableEnforceFocus: true, + children: CustomAttributeEditor ? (React.createElement(CustomAttributeEditor, { result: lazyResult, attribute: attr, onCancel: onCancel, onSave: onSave })) : (React.createElement(Editor, { attr: attr, lazyResult: lazyResult, onCancel: onCancel, onSave: onSave })), + }); + } }, + React.createElement(EditIcon, null)))), + React.createElement(Grid, { item: true, xs: 4, style: { + wordBreak: 'break-word', + textOverflow: 'ellipsis', + overflow: 'hidden', + padding: '10px', + }, className: "relative" }, + React.createElement(Typography, null, label), + React.createElement(Divider, { orientation: "vertical", className: "absolute right-0 top-0 w-min h-full" })), + React.createElement(Grid, { item: true, md: 8, style: { + wordBreak: 'break-word', + textOverflow: 'ellipsis', + overflow: 'hidden', + padding: '10px', + } }, + React.createElement(Grid, { container: true, direction: "row" }, + React.createElement(Grid, { "data-id": "".concat(attr, "-value"), item: true }, value.map(function (val, index) { + return (React.createElement(React.Fragment, { key: index }, + index !== 0 ? (React.createElement(Divider, { style: { margin: '5px 0px' } })) : null, + React.createElement("div", null, (function () { + if (attr === 'ext.audio-snippet') { + var mimetype = lazyResult.plain.metacard.properties['ext.audio-snippet-mimetype']; + var src = "data:".concat(mimetype, ";base64,").concat(val); + return React.createElement("audio", { controls: true, src: src }); + } + switch (getType(attr)) { + case 'DATE': + return (React.createElement(Typography, { title: TypedUserInstance.getMomentDate(val) }, user.getUserReadableDateTime(val))); + case 'BINARY': + return (React.createElement("img", { src: Common.getImageSrc(val), style: { + maxWidth: '100%', + maxHeight: '50vh', + } })); + case 'BOOLEAN': + return (React.createElement(Typography, null, val ? 'true' : 'false')); + case 'GEOMETRY': + return (React.createElement(Typography, null, convertToFormat(val))); + case 'LONG': + case 'DOUBLE': + case 'FLOAT': + return (React.createElement(Typography, null, convertToPrecision(val))); + default: + if (lazyResult.highlights[attr]) { + if (attr === 'title') { + //Special case, title highlights don't get truncated + return (React.createElement(Typography, null, + React.createElement("span", { dangerouslySetInnerHTML: { + __html: lazyResult.highlights[attr][0] + .highlight, + } }))); + } + { + return isUrl(val) ? (React.createElement(Typography, null, + React.createElement("span", { className: "highlight" }, + React.createElement("a", { href: val, target: "_blank" }, val)))) : (displayHighlightedAttrInFull(lazyResult.highlights[attr], val, index)); + } + } + else if (isUrl(val)) { + return (React.createElement(Typography, null, + React.createElement("a", { href: val, target: "_blank" }, val))); + } + else { + return React.createElement(Typography, null, val); + } + } + })()))); + })))))); + }, [summaryShown, forceRender, isNotWritable]); + return (React.createElement("div", { style: { display: isFiltered ? 'none' : 'block' } }, MemoItem)); +}; +var persistantFilter = ''; +/* Hidden attributes are simply the opposite of active */ +/* They do not currently exist on the metacard OR are not shown in the summary */ +var getHiddenAttributes = function (selection, activeAttributes) { + return Object.values(StartupDataStore.MetacardDefinitions.getMetacardDefinition(selection.plain.metacardType)) + .filter(function (val) { + if (activeAttributes.includes(val.id)) { + return false; + } + return true; + }) + .filter(function (val) { + return !StartupDataStore.MetacardDefinitions.isHiddenAttribute(val.id); + }); +}; +var globalExpanded = false; // globally track if users want this since they may be clicking between results +var Summary = function (_a) { + var selection = _a.result; + var theme = useTheme(); + var _b = __read(React.useState(false), 2), forceRender = _b[0], setForceRender = _b[1]; + var _c = __read(React.useState(globalExpanded), 2), expanded = _c[0], setExpanded = _c[1]; + /* Special case for when all the attributes are displayed */ + var _d = __read(React.useState(false), 2), fullyExpanded = _d[0], setFullyExpanded = _d[1]; + var _f = __read(React.useState(persistantFilter), 2), filter = _f[0], setFilter = _f[1]; + var _g = __read(React.useState(TypedUserInstance.getDecimalPrecision()), 2), decimalPrecision = _g[0], setDecimalPrecision = _g[1]; + var _h = __read(React.useState(TypedUserInstance.getResultsAttributesSummaryShown()), 2), summaryShown = _h[0], setSummaryShown = _h[1]; + useRerenderOnBackboneSync({ lazyResult: selection }); + var listenTo = useBackbone().listenTo; + var _j = useMetacardDefinitions(), isHiddenAttribute = _j.isHiddenAttribute, getMetacardDefinition = _j.getMetacardDefinition; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:inspector-summaryShown change:dateTimeFormat change:timeZone change:inspector-hideEmpty', function () { + setSummaryShown(__spreadArray([], __read(TypedUserInstance.getResultsAttributesSummaryShown()), false)); + setForceRender(true); + }); + listenTo(user.get('user').get('preferences'), 'change:decimalPrecision', function () { + setDecimalPrecision(TypedUserInstance.getDecimalPrecision()); + }); + }, []); + React.useEffect(function () { + if (selection) { + if (getHiddenAttributes(selection, summaryShown).length === 0) { + setFullyExpanded(true); + } + else { + setFullyExpanded(false); + } + } + }, [summaryShown]); + var everythingElse = React.useMemo(function () { + return selection && expanded + ? Object.keys(selection.plain.metacard.properties) + .filter(function (attr) { + return !isHiddenAttribute(attr); + }) + .filter(function (attr) { + return !summaryShown.includes(attr); + }) + : []; + }, [expanded, summaryShown, isHiddenAttribute]); + var blankEverythingElse = React.useMemo(function () { + return selection + ? Object.values(getMetacardDefinition(selection.plain.metacardType)) + .filter(function (val) { + if (summaryShown.includes(val.id)) { + return false; + } + if (everythingElse.includes(val.id)) { + return false; + } + return true; + }) + .filter(function (val) { + return !isHiddenAttribute(val.id); + }) + : []; + }, [expanded, summaryShown, isHiddenAttribute]); + React.useEffect(function () { + globalExpanded = expanded; + }, [expanded]); + if (!selection) { + return React.createElement("div", null, "No result selected"); + } + var hideEmpty = user + .get('user') + .get('preferences') + .get('inspector-hideEmpty'); + return (React.createElement(Grid, { container: true, direction: "column", wrap: "nowrap", className: "overflow-hidden w-full h-full" }, + React.createElement(Grid, { item: true, className: "shrink-0" }, + React.createElement(Grid, { container: true, direction: "row", alignItems: "center", wrap: "nowrap", justifyContent: "space-between", className: "p-2" }, + React.createElement(Grid, { item: true }, + React.createElement(SummaryManageAttributes, null)), + React.createElement(Grid, { item: true }, + React.createElement(TextField, { "data-id": "summary-filter-input", size: "small", variant: "outlined", label: "Filter", value: filter, inputProps: { + style: filter !== '' + ? { + borderBottom: "1px solid ".concat(theme.palette.warning.main), + } + : {}, + }, onChange: function (e) { + persistantFilter = e.target.value; + setFilter(e.target.value); + } })))), + React.createElement(DarkDivider, { className: "w-full h-min" }), + React.createElement(Grid, { item: true, className: "shrink-1 overflow-auto p-2" }, + React.createElement(Paper, { elevation: Elevations.paper }, + summaryShown.map(function (attr, index) { + return (React.createElement("div", { className: "relative", key: attr }, + React.createElement(AttributeComponent, { lazyResult: selection, attr: attr, hideEmpty: hideEmpty, summaryShown: summaryShown, decimalPrecision: decimalPrecision, filter: filter, forceRender: forceRender }), + index !== 0 ? (React.createElement(Divider, { orientation: "horizontal", className: "absolute top-0 w-full h-min" })) : null)); + }), + expanded ? (React.createElement(React.Fragment, null, + everythingElse.map(function (attr) { + return (React.createElement("div", { key: attr, className: "relative" }, + React.createElement(AttributeComponent, { lazyResult: selection, attr: attr, hideEmpty: hideEmpty, summaryShown: summaryShown, decimalPrecision: decimalPrecision, filter: filter, forceRender: forceRender }), + React.createElement(Divider, { orientation: "horizontal", className: "absolute top-0 w-full h-min" }))); + }), + blankEverythingElse.map(function (attr) { + return (React.createElement("div", { key: attr.id, className: "relative" }, + React.createElement(AttributeComponent, { lazyResult: selection, attr: attr.id, hideEmpty: hideEmpty, summaryShown: summaryShown, decimalPrecision: decimalPrecision, filter: filter, forceRender: forceRender }), + React.createElement(Divider, { orientation: "horizontal", className: "absolute top-0 w-full h-min" }))); + }))) : (React.createElement(React.Fragment, null)))), + !fullyExpanded && (React.createElement(React.Fragment, null, + React.createElement(DarkDivider, { className: "w-full h-min" }), + React.createElement(Grid, { item: true, className: "shrink-0 p-2" }, + React.createElement(Button, { "data-id": "see-all-collapse-button", onClick: function () { + setExpanded(!expanded); + }, size: "small", color: "primary" }, expanded ? 'Collapse' : 'See all')))))); +}; +export default hot(module)(Summary); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VtbWFyeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdGFicy9tZXRhY2FyZC9zdW1tYXJ5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sSUFBSSxNQUFNLG9CQUFvQixDQUFBO0FBQ3JDLE9BQU8sVUFBVSxNQUFNLDBCQUEwQixDQUFBO0FBQ2pELE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sSUFBSSxNQUFNLGdDQU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EhUTUxJbnB1dEVsZW1lbnQ+KG51bGwpXG4gIGNvbnN0IGltZ1JlZiA9IFJlYWN0LnVzZVJlZjxIVE1MSW1hZ2VFbGVtZW50PihudWxsKVxuICByZXR1cm4gKFxuICAgIDxHcmlkXG4gICAgICBjb250YWluZXJcbiAgICAgIGRpcmVjdGlvbj1cInJvd1wiXG4gICAgICBhbGlnbkl0ZW1zPVwic3RyZXRjaFwiXG4gICAgICBhbGlnbkNvbnRlbnQ9XCJzdHJldGNoXCJcbiAgICAgIHdyYXA9XCJub3dyYXBcIlxuICAgID5cbiAgICAgIDxHcmlkIGl0ZW0gc3R5bGU9e3sgb3ZlcmZsb3c6ICdoaWRkZW4nIH19PlxuICAgICAgICA8aW5wdXRcbiAgICAgICAgICB0eXBlPVwiZmlsZVwiXG4gICAgICAgICAgcmVmPXtmaWxlUmVmfVxuICAgICAgICAgIHN0eWxlPXt7IGRpc3BsYXk6ICdub25lJyB9fVxuICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgaWYgKGltZ1JlZi5jdXJyZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgcmVhZGVyID0gbmV3IEZpbGVSZWFkZXIoKVxuICAgICAgICAgICAgcmVhZGVyLm9ubG9hZCA9IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyNTMxKSBGSVhNRTogT2JqZWN0IGlzIHBvc3NpYmx5ICdudWxsJy5cbiAgICAgICAgICAgICAgICBvbkNoYW5nZShldmVudC50YXJnZXQucmVzdWx0KVxuICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCd0aGVyZSBpcyBzb21ldGhpbmcgd3Jvbmcgd2l0aCBmaWxlIHR5cGUnKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIub25lcnJvciA9ICgpID0+IHtcbiAgICAgICAgICAgICAgY29uc29sZS5lcnJvcignZXJyb3InKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDI1MzEpIEZJWE1FOiBPYmplY3QgaXMgcG9zc2libHkgJ251bGwnLlxuICAgICAgICAgICAgcmVhZGVyLnJlYWRBc0RhdGFVUkwoZS50YXJnZXQuZmlsZXNbMF0pXG4gICAgICAgICAgfX1cbiAgICAgICAgLz5cbiAgICAgICAgPGltZ1xuICAgICAgICAgIHNyYz17Q29tbW9uLmdldEltYWdlU3JjKHZhbHVlKX1cbiAgICAgICAgICByZWY9e2ltZ1JlZn1cbiAgICAgICAgICBzdHlsZT17eyBtYXhXaWR0aDogJzEwMCUnLCBtYXhIZWlnaHQ6ICc1MHZoJyB9fVxuICAgICAgICAvPlxuICAgICAgPC9HcmlkPlxuICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgPEJ1dHRvblxuICAgICAgICAgIHN0eWxlPXt7IGhlaWdodDogJzEwMCUnIH19XG4gICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICBkaXNhYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgaWYgKGZpbGVSZWYuY3VycmVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBmaWxlUmVmLmN1cnJlbnQuY2xpY2soKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICA8UHVibGlzaEljb24gLz5cbiAgICAgICAgPC9CdXR0b24+XG4gICAgICA8L0dyaWQ+XG4gICAgPC9HcmlkPlxuICApXG59XG5lbnVtIE1vZGUge1xuICBOb3JtYWwgPSAnbm9ybWFsJyx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dDb250ZW50IHN0eWxlPXt7IG1pbkhlaWdodDogJzMwZW0nLCBtaW5XaWR0aDogJzYwdmgnIH19PlxuICAgICAgICA8ZGl2IGtleT17YXR0cn0gY2xhc3NOYW1lPVwicmVsYXRpdmVcIj5cbiAgICAgICAgICB7dmFsdWVzLm1hcCgodmFsOiBhbnksIGluZGV4OiBudW1iZXIpID0+IHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIDxHcmlkIGNvbnRhaW5lciBkaXJlY3Rpb249XCJyb3dcIiBjbGFzc05hbWU9XCJteS0yXCI+XG4gICAgICAgICAgICAgICAge2luZGV4ICE9PSAwID8gPERpdmlkZXIgc3R5bGU9e3sgbWFyZ2luOiAnNXB4IDBweCcgfX0gLz4gOiBudWxsfVxuICAgICAgICAgICAgICAgIDxHcmlkIGl0ZW0gbWQ9ezExfT5cbiAgICAgICAgICAgICAgICAgIHsoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW51bUZvckF0dHIubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8QXV0b2NvbXBsZXRlXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXttb2RlID09PSAnc2F2aW5nJ31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU9e3ZhbH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U9eyhfZTogYW55LCBuZXdWYWx1ZTogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzW2luZGV4XSA9IG5ld1ZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VmFsdWVzKFsuLi52YWx1ZXNdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZUNsZWFyYWJsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zPXtlbnVtRm9yQXR0cn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8VGV4dEZpZWxkIHsuLi5wYXJhbXN9IHZhcmlhbnQ9XCJvdXRsaW5lZFwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGF0dHJUeXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgY2FzZSAnREFURSc6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICA8RGF0ZVRpbWVQaWNrZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZT17dmFsfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlc1tpbmRleF0gPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VmFsdWVzKFsuLi52YWx1ZXNdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVGV4dEZpZWxkUHJvcHM9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkOiBtb2RlICE9PSBNb2RlLk5vcm1hbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBsYWJlbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhcmlhbnQ6ICdvdXRsaW5lZCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCUERhdGVQcm9wcz17e1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6IG1vZGUgIT09IE1vZGUuTm9ybWFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgY2FzZSAnQklOQVJZJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxUaHVtYm5haWxJbnB1dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXttb2RlICE9PSBNb2RlLk5vcm1hbH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZT17dmFsfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsodXBkYXRlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXNbaW5kZXhdID0gdXBkYXRlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRWYWx1ZXMoWy4uLnZhbHVlc10pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICBjYXNlICdCT09MRUFOJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxDaGVja2JveFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXttb2RlICE9PSBNb2RlLk5vcm1hbH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkPXt2YWx9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U9eyhlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXNbaW5kZXhdID0gZS50YXJnZXQuY2hlY2tlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VmFsdWVzKFsuLi52YWx1ZXNdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICBjYXNlICdMT05HJzpcbiAgICAgICAgICAgICAgICAgICAgICBjYXNlICdET1VCTEUnOlxuICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0ZMT0FUJzpcbiAgICAgICAgICAgICAgICAgICAgICBjYXNlICdJTlRFR0VSJzpcbiAgICAgICAgICAgICAgICAgICAgICBjYXNlICdTSE9SVCc6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ9e21vZGUgIT09IE1vZGUuTm9ybWFsfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlPXt2YWx9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U9eyhlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXNbaW5kZXhdID0gZS50YXJnZXQudmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFZhbHVlcyhbLi4udmFsdWVzXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9XCJudW1iZXJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0dFT01FVFJZJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxMb2NhdGlvbklucHV0UmVhY3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZT17KGxvY2F0aW9uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2NhdGlvbiA9PT0gbnVsbCB8fCBsb2NhdGlvbiA9PT0gJ0lOVkFMSUQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldE1vZGUoTW9kZS5CYWRJbnB1dClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldE1vZGUoTW9kZS5Ob3JtYWwpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXNbaW5kZXhdID0gbG9jYXRpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFZhbHVlcyhbLi4udmFsdWVzXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzU3RhdGVEaXJ0eT17ZGlydHlJbmRleCA9PT0gaW5kZXh9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXRJc1N0YXRlRGlydHk9eygpID0+IHNldERpcnR5SW5kZXgoLTEpfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlPXt2YWx9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxUZXh0RmllbGRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZD17bW9kZSAhPT0gTW9kZS5Ob3JtYWx9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU9e3ZhbH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZT17KGU6IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzW2luZGV4XSA9IGUudGFyZ2V0LnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRWYWx1ZXMoWy4uLnZhbHVlc10pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17eyB3aGl0ZVNwYWNlOiAncHJlLWxpbmUnLCBmbGV4R3JvdzogNTAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aWxpbmU9e3RydWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4Um93cz17MTAwMH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvcj17ZXJybXNnLmxlbmd0aCAhPSAwfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlbHBlclRleHQ9e2Vycm1zZ31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSkoKX1cbiAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAge2lzTXVsdGlWYWx1ZWQgPyAoXG4gICAgICAgICAgICAgICAgICA8R3JpZCBpdGVtIG1kPXsxfT5cbiAgICAgICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXttb2RlID09PSBNb2RlLlNhdmluZ31cbiAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXMuc3BsaWNlKGluZGV4LCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0RGlydHlJbmRleChpbmRleClcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFZhbHVlcyhbLi4udmFsdWVzXSlcbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgPERlbGV0ZUljb24gLz5cbiAgICAgICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIClcbiAgICAgICAgICB9KX1cbiAgICAgICAgICB7aXNNdWx0aVZhbHVlZCAmJiAoXG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIGRpc2FibGVkPXttb2RlID09PSBNb2RlLlNhdmluZ31cbiAgICAgICAgICAgICAgdmFyaWFudD1cInRleHRcIlxuICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IGRlZmF1bHRWYWx1ZSA9ICcnXG4gICAgICAgICAgICAgICAgc3dpdGNoIChhdHRyVHlwZSkge1xuICAgICAgICAgICAgICAgICAgY2FzZSAnREFURSc6XG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZSA9IG5ldyBEYXRlKCkudG9JU09TdHJpbmcoKVxuICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzZXRWYWx1ZXMoWy4uLnZhbHVlcywgZGVmYXVsdFZhbHVlXSlcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPEJveCBjb2xvcj1cInRleHQucHJpbWFyeVwiPlxuICAgICAgICAgICAgICAgIDxBZGRJY29uIC8+XG4gICAgICAgICAgICAgIDwvQm94PlxuICAgICAgICAgICAgICBBZGQgTmV3IFZhbHVlXG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICApfVxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvRGlhbG9nQ29udGVudD5cbiAgICAgIDxEaXZpZGVyIC8+XG4gICAgICA8RGlhbG9nQWN0aW9ucz5cbiAgICAgICAgPEJ1dHRvblxuICAgICAgICAgIGRpc2FibGVkPXttb2RlID09PSBNb2RlLlNhdmluZ31cbiAgICAgICAgICB2YXJpYW50PVwidGV4dFwiXG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgb25DYW5jZWwoKVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICBDYW5jZWxcbiAgICAgICAgPC9CdXR0b24+XG4gICAgICAgIDxCdXR0b25cbiAgICAgICAgICBkaXNhYmxlZD17bW9kZSAhPT0gTW9kZS5Ob3JtYWx9XG4gICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBpZiAoZXJybXNnLmxlbmd0aCAhPSAwKSB7XG4gICAgICAgICAgICAgIGFkZFNuYWNrKCdUaGlzIGF0dHJpYnV0ZSBpcyByZXF1aXJlZC4nLCB7XG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnZXJyb3InLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2V0TW9kZShNb2RlLlNhdmluZylcbiAgICAgICAgICAgIGxldCB0cmFuc2Zvcm1lZFZhbHVlc1xuICAgICAgICAgICAgaWYgKGlzTXVsdGlWYWx1ZWQgJiYgdmFsdWVzICYmIHZhbHVlcy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgIHRyYW5zZm9ybWVkVmFsdWVzID0gdmFsdWVzLmZpbHRlcihcbiAgICAgICAgICAgICAgICAodmFsOiBhbnkpID0+IHZhbCAhPSBudWxsICYmIHZhbCAhPT0gJydcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdHJhbnNmb3JtZWRWYWx1ZXMgPSB2YWx1ZXNcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgc3dpdGNoIChhdHRyVHlwZSkge1xuICAgICAgICAgICAgICAgIGNhc2UgJ0JJTkFSWSc6XG4gICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZFZhbHVlcyA9IHRyYW5zZm9ybWVkVmFsdWVzLm1hcChcbiAgICAgICAgICAgICAgICAgICAgKHN1YnZhbDogYW55KSA9PiBzdWJ2YWwuc3BsaXQoJywnKVsxXVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICBjYXNlICdEQVRFJzpcbiAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybWVkVmFsdWVzID0gdHJhbnNmb3JtZWRWYWx1ZXMubWFwKChzdWJ2YWw6IGFueSkgPT5cbiAgICAgICAgICAgICAgICAgICAgbW9tZW50KHN1YnZhbCkudG9JU09TdHJpbmcoKVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICBjYXNlICdHRU9NRVRSWSc6XG4gICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZFZhbHVlcyA9IHZhbHVlcy5maWx0ZXIoXG4gICAgICAgICAgICAgICAgICAgICh2YWw6IGFueSkgPT4gdmFsICE9IG51bGwgJiYgdmFsICE9PSAnJ1xuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgYXR0cmlidXRlcyA9IFt7IGF0dHJpYnV0ZTogYXR0ciwgdmFsdWVzOiB0cmFuc2Zvcm1lZFZhbHVlcyB9XVxuICAgICAgICAgICAgY29uc3Qgb25TdWNjZXNzID0gKCkgPT5cbiAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgYWRkU25hY2soJ1N1Y2Nlc3NmdWxseSB1cGRhdGVkLicpXG4gICAgICAgICAgICAgICAgb25TYXZlKClcbiAgICAgICAgICAgICAgfSwgMTAwMClcbiAgICAgICAgICAgIGNvbnN0IG9uRmFpbHVyZSA9ICgpID0+XG4gICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgIGFkZFNuYWNrKCdGYWlsZWQgdG8gdXBkYXRlLicsIHsgc3RhdHVzOiAnZXJyb3InIH0pXG4gICAgICAgICAgICAgICAgb25TYXZlKClcbiAgICAgICAgICAgICAgfSwgMTAwMClcbiAgICAgICAgICAgIGlmIChFeHRlbnNpb25Qb2ludHMuaGFuZGxlTWV0YWNhcmRVcGRhdGUpIHtcbiAgICAgICAgICAgICAgRXh0ZW5zaW9uUG9pbnRzLmhhbmRsZU1ldGFjYXJkVXBkYXRlKHtcbiAgICAgICAgICAgICAgICBsYXp5UmVzdWx0LFxuICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXNUb1VwZGF0ZTogYXR0cmlidXRlcyxcbiAgICAgICAgICAgICAgfSkudGhlbihvblN1Y2Nlc3MsIG9uRmFpbHVyZSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGhhbmRsZU1ldGFjYXJkVXBkYXRlKHtcbiAgICAgICAgICAgICAgICBsYXp5UmVzdWx0LFxuICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXMsXG4gICAgICAgICAgICAgICAgb25TdWNjZXNzLFxuICAgICAgICAgICAgICAgIG9uRmFpbHVyZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9fVxuICAgICAgICA+XG4gICAgICAgICAgU2F2ZVxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgIDwvRGlhbG9nQWN0aW9ucz5cbiAgICAgIHttb2RlID09PSBNb2RlLlNhdmluZyA/IChcbiAgICAgICAgPExpbmVhclByb2dyZXNzXG4gICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgIHdpZHRoOiAnMTAwJScsXG4gICAgICAgICAgICBoZWlnaHQ6ICcxMHB4JyxcbiAgICAgICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICAgICAgbGVmdDogJzBweCcsXG4gICAgICAgICAgICBib3R0b206ICcwJScsXG4gICAgICAgICAgfX1cbiAgICAgICAgICB2YXJpYW50PVwiaW5kZXRlcm1pbmF0ZVwiXG4gICAgICAgIC8+XG4gICAgICApIDogbnVsbH1cbiAgICA8Lz5cbiAgKVxufVxuY29uc3QgQXR0cmlidXRlQ29tcG9uZW50ID0gKHtcbiAgbGF6eVJlc3VsdCxcbiAgYXR0cixcbiAgaGlkZUVtcHR5LFxuICBzdW1tYXJ5U2hvd24gPSBbXSxcbiAgZGVjaW1hbFByZWNpc2lvbiA9IHVuZGVmaW5lZCxcbiAgZmlsdGVyID0gJycsXG4gIGZvcmNlUmVuZGVyLFxufToge1xuICBhdHRyOiBzdHJpbmdc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1dGVFZGl0b3IoXG4gICAgbGF6eVJlc3VsdCxcbiAgICBhdHRyXG4gIClcbiAgY29uc3QgTWVtb0l0ZW0gPSBSZWFjdC51c2VNZW1vKCgpID0+IHtcbiAgICByZXR1cm4gKFxuICAgICAgPEdyaWRcbiAgICAgICAgY29udGFpbmVyXG4gICAgICAgIGRpcmVjdGlvbj1cInJvd1wiXG4gICAgICAgIHdyYXA9eydub3dyYXAnfVxuICAgICAgICBjbGFzc05hbWU9XCJncm91cCByZWxhdGl2ZVwiXG4gICAgICA+XG4gICAgICAgIHtpc05vdFdyaXRhYmxlKHsgYXR0cmlidXRlOiBhdHRyLCBsYXp5UmVzdWx0IH0pID8gbnVsbCA6IChcbiAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInAtMSBoaWRkZW4gZ3JvdXAtaG92ZXI6YmxvY2sgYWJzb2x1dGUgcmlnaHQtMCB0b3AtMFwiPlxuICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgZGlhbG9nQ29udGV4dC5zZXRQcm9wcyh7XG4gICAgICAgICAgICAgICAgICBvcGVuOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgZGlzYWJsZUVuZm9yY2VGb2N1czogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgIGNoaWxkcmVuOiBDdXN0b21BdHRyaWJ1dGVFZGl0b3IgPyAoXG4gICAgICAgICAgICAgICAgICAgIDxDdXN0b21BdHRyaWJ1dGVFZGl0b3JcbiAgICAgICAgICAgICAgICAgICAgICByZXN1bHQ9e2xhenlSZXN1bHR9XG4gICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlPXthdHRyfVxuICAgICAgICAgICAgICAgICAgICAgIG9uQ2FuY2VsPXtvbkNhbmNlbH1cbiAgICAgICAgICAgICAgICAgICAgICBvblNhdmU9e29uU2F2ZX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgICAgIDxFZGl0b3JcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyPXthdHRyfVxuICAgICAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHQ9e2xhenlSZXN1bHR9XG4gICAgICAgICAgICAgICAgICAgICAgb25DYW5jZWw9e29uQ2FuY2VsfVxuICAgICAgICAgICAgICAgICAgICAgIG9uU2F2ZT17b25TYXZlfVxuICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8RWRpdEljb24gLz5cbiAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApfVxuXG4gICAgICAgIDxHcmlkXG4gICAgICAgICAgaXRlbVxuICAgICAgICAgIHhzPXs0fVxuICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICB3b3JkQnJlYWs6ICdicmVhay13b3JkJyxcbiAgICAgICAgICAgIHRleHRPdmVyZmxvdzogJ2VsbGlwc2lzJyxcbiAgICAgICAgICAgIG92ZXJmbG93OiAnaGlkZGVuJyxcbiAgICAgICAgICAgIHBhZGRpbmc6ICcxMHB4JyxcbiAgICAgICAgICB9fVxuICAgICAgICAgIGNsYXNzTmFtZT1cInJlbGF0aXZlXCJcbiAgICAgICAgPlxuICAgICAgICAgIDxUeXBvZ3JhcGh5PntsYWJlbH08L1R5cG9ncmFwaHk+XG4gICAgICAgICAgPERpdmlkZXJcbiAgICAgICAgICAgIG9yaWVudGF0aW9uPVwidmVydGljYWxcIlxuICAgICAgICAgICAgY2xhc3NOYW1lPVwiYWJzb2x1dGUgcmlnaHQtMCB0b3AtMCB3LW1pbiBoLWZ1bGxcIlxuICAgICAgICAgIC8+XG4gICAgICAgIDwvR3JpZD5cbiAgICAgICAgPEdyaWRcbiAgICAgICAgICBpdGVtXG4gICAgICAgICAgbWQ9ezh9XG4gICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgIHdvcmRCcmVhazogJ2JyZWFrLXdvcmQnLFxuICAgICAgICAgICAgdGV4dE92ZXJmbG93OiAnZWxsaXBzaXMnLFxuICAgICAgICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgICAgICAgcGFkZGluZzogJzEwcHgnLFxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICA8R3JpZCBjb250YWluZXIgZGlyZWN0aW9uPVwicm93XCI+XG4gICAgICAgICAgICA8R3JpZCBkYXRhLWlkPXtgJHthdHRyfS12YWx1ZWB9IGl0ZW0+XG4gICAgICAgICAgICAgIHt2YWx1ZS5tYXAoKHZhbDogYW55LCBpbmRleDogbnVtYmVyKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIDxSZWFjdC5GcmFnbWVudCBrZXk9e2luZGV4fT5cbiAgICAgICAgICAgICAgICAgICAge2luZGV4ICE9PSAwID8gKFxuICAgICAgICAgICAgICAgICAgICAgIDxEaXZpZGVyIHN0eWxlPXt7IG1hcmdpbjogJzVweCAwcHgnIH19IC8+XG4gICAgICAgICAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICAgICAgICAgIHsoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHIgPT09ICdleHQuYXVkaW8tc25pcHBldCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWltZXR5cGUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHQucGxhaW4ubWV0YWNhcmQucHJvcGVydGllc1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleHQuYXVkaW8tc25pcHBldC1taW1ldHlwZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNyYyA9IGBkYXRhOiR7bWltZXR5cGV9O2Jhc2U2NCwke3ZhbH1gXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiA8YXVkaW8gY29udHJvbHMgc3JjPXtzcmN9IC8+XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGdldFR5cGUoYXR0cikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnREFURSc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxUeXBvZ3JhcGh5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlPXtUeXBlZFVzZXJJbnN0YW5jZS5nZXRNb21lbnREYXRlKHZhbCl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt1c2VyLmdldFVzZXJSZWFkYWJsZURhdGVUaW1lKHZhbCl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L1R5cG9ncmFwaHk+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdCSU5BUlknOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW1nXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyYz17Q29tbW9uLmdldEltYWdlU3JjKHZhbCl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4V2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhIZWlnaHQ6ICc1MHZoJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdCT09MRUFOJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFR5cG9ncmFwaHk+e3ZhbCA/ICd0cnVlJyA6ICdmYWxzZSd9PC9UeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnR0VPTUVUUlknOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8VHlwb2dyYXBoeT57Y29udmVydFRvRm9ybWF0KHZhbCl9PC9UeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnTE9ORyc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0RPVUJMRSc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0ZMT0FUJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFR5cG9ncmFwaHk+e2NvbnZlcnRUb1ByZWNpc2lvbih2YWwpfTwvVHlwb2dyYXBoeT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhenlSZXN1bHQuaGlnaGxpZ2h0c1thdHRyXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHIgPT09ICd0aXRsZScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9TcGVjaWFsIGNhc2UsIHRpdGxlIGhpZ2hsaWdodHMgZG9uJ3QgZ2V0IHRydW5jYXRlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxUeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUw9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX2h0bWw6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0LmhpZ2hsaWdodHNbYXR0cl1bMF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmhpZ2hsaWdodCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9UeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpc1VybCh2YWwpID8gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxUeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwiaGlnaGxpZ2h0XCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9e3ZhbH0gdGFyZ2V0PVwiX2JsYW5rXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3ZhbH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvVHlwb2dyYXBoeT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5SGlnaGxpZ2h0ZWRBdHRySW5GdWxsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdC5oaWdobGlnaHRzW2F0dHJdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlzVXJsKHZhbCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxUeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9e3ZhbH0gdGFyZ2V0PVwiX2JsYW5rXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7dmFsfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9UeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gPFR5cG9ncmFwaHk+e3ZhbH08L1R5cG9ncmFwaHk+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH0pKCl9XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgPC9HcmlkPlxuICAgICAgPC9HcmlkPlxuICAgIClcbiAgfSwgW3N1bW1hcnlTaG93biwgZm9yY2VSZW5kZXIsIGlzTm90V3JpdGFibGVdKVxuICByZXR1cm4gKFxuICAgIDxkaXYgc3R5bGU9e3sgZGlzcGxheTogaXNGaWx0ZXJlZCA/ICdub25lJyA6ICdibG9jaycgfX0+e01lbW9JdGVtfTwvZGl2PlxuICApXG59XG5sZXQgcGVyc2lzdGFudEZpbHRlciA9ICcnXG4vKiBIaWRkZW4gYXR0cmlidXRlcyBhcmUgc2ltcGx5IHRoZSBvcHBvc2l0ZSBvZiBhY3RpdmUgKi9cbi8qIFRoZXkgZG8gbm90IGN1cnJlbnRseSBleGlzdCBvbiB0aGUgbWV0YWNhcmQgT1IgYXJlIG5vdCBzaG93biBpbiB0aGUgc3VtbWFyeSAqL1xuY29uc3QgZ2V0SGlkZGVuQXR0cmlidXRlcyA9IChcbiAgc2VsZWN0aW9uOiBMYXp5UXVlcnlSZXN1bHQsXG4gIGFjdGl2ZUF0dHJpYnV0ZXM6IHN0cmluZ1tdXG4pID0+IHtcbiAgcmV0dXJuIE9iamVjdC52YWx1ZXMoXG4gICAgU3RhcnR1cERhdGFTdG9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gICA8R3JpZFxuICAgICAgY29udGFpbmVyXG4gICAgICBkaXJlY3Rpb249XCJjb2x1bW5cIlxuICAgICAgd3JhcD1cIm5vd3JhcFwiXG4gICAgICBjbGFzc05hbWU9XCJvdmVyZmxvdy1oaWRkZW4gdy1mdWxsIGgtZnVsbFwiXG4gICAgPlxuICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJzaHJpbmstMFwiPlxuICAgICAgICA8R3JpZFxuICAgICAgICAgIGNvbnRhaW5lclxuICAgICAgICAgIGRpcmVjdGlvbj1cInJvd1wiXG4gICAgICAgICAgYWxpZ25JdGVtcz1cImNlbnRlclwiXG4gICAgICAgICAgd3JhcD1cIm5vd3JhcFwiXG4gICAgICAgICAganVzdGlmeUNvbnRlbnQ9XCJzcGFjZS1iZXR3ZWVuXCJcbiAgICAgICAgICBjbGFzc05hbWU9XCJwLTJcIlxuICAgICAgICA+XG4gICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgIDxTdW1tYXJ5TWFuYWdlQXR0cmlidXRlcyAvPlxuICAgICAgICAgIDwvR3JpZD5cblxuICAgICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICAgIGRhdGEtaWQ9XCJzdW1tYXJ5LWZpbHRlci1pbnB1dFwiXG4gICAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICAgIGxhYmVsPVwiRmlsdGVyXCJcbiAgICAgICAgICAgICAgdmFsdWU9e2ZpbHRlcn1cbiAgICAgICAgICAgICAgaW5wdXRQcm9wcz17e1xuICAgICAgICAgICAgICAgIHN0eWxlOlxuICAgICAgICAgICAgICAgICAgZmlsdGVyICE9PSAnJ1xuICAgICAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckJvdHRvbTogYDFweCBzb2xpZCAke3RoZW1lLnBhbGV0dGUud2FybmluZy5tYWlufWAsXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICA6IHt9LFxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBvbkNoYW5nZT17KGUpID0+IHtcbiAgICAgICAgICAgICAgICBwZXJzaXN0YW50RmlsdGVyID0gZS50YXJnZXQudmFsdWVcbiAgICAgICAgICAgICAgICBzZXRGaWx0ZXIoZS50YXJnZXQudmFsdWUpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgPC9HcmlkPlxuICAgICAgPC9HcmlkPlxuICAgICAgPERhcmtEaXZpZGVyIGNsYXNzTmFtZT1cInctZnVsbCBoLW1pblwiIC8+XG4gICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInNocmluay0xIG92ZXJmbG93LWF1dG8gcC0yXCI+XG4gICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMucGFwZXJ9PlxuICAgICAgICAgIHtzdW1tYXJ5U2hvd24ubWFwKChhdHRyLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJyZWxhdGl2ZVwiIGtleT17YXR0cn0+XG4gICAgICAgICAgICAgICAgPEF0dHJpYnV0ZUNvbXBvbmVudFxuICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdD17c2VsZWN0aW9ufVxuICAgICAgICAgICAgICAgICAgYXR0cj17YXR0cn1cbiAgICAgICAgICAgICAgICAgIGhpZGVFbXB0eT17aGlkZUVtcHR5fVxuICAgICAgICAgICAgICAgICAgc3VtbWFyeVNob3duPXtzdW1tYXJ5U2hvd259XG4gICAgICAgICAgICAgICAgICBkZWNpbWFsUHJlY2lzaW9uPXtkZWNpbWFsUHJlY2lzaW9ufVxuICAgICAgICAgICAgICAgICAgZmlsdGVyPXtmaWx0ZXJ9XG4gICAgICAgICAgICAgICAgICBmb3JjZVJlbmRlcj17Zm9yY2VSZW5kZXJ9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICB7aW5kZXggIT09IDAgPyAoXG4gICAgICAgICAgICAgICAgICA8RGl2aWRlclxuICAgICAgICAgICAgICAgICAgICBvcmllbnRhdGlvbj1cImhvcml6b250YWxcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJhYnNvbHV0ZSB0b3AtMCB3LWZ1bGwgaC1taW5cIlxuICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApXG4gICAgICAgICAgfSl9XG5cbiAgICAgICAgICB7ZXhwYW5kZWQgPyAoXG4gICAgICAgICAgICA8PlxuICAgICAgICAgICAgICB7ZXZlcnl0aGluZ0Vsc2UubWFwKChhdHRyKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIDxkaXYga2V5PXthdHRyfSBjbGFzc05hbWU9XCJyZWxhdGl2ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8QXR0cmlidXRlQ29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdD17c2VsZWN0aW9ufVxuICAgICAgICAgICAgICAgICAgICAgIGF0dHI9e2F0dHJ9XG4gICAgICAgICAgICAgICAgICAgICAgaGlkZUVtcHR5PXtoaWRlRW1wdHl9XG4gICAgICAgICAgICAgICAgICAgICAgc3VtbWFyeVNob3duPXtzdW1tYXJ5U2hvd259XG4gICAgICAgICAgICAgICAgICAgICAgZGVjaW1hbFByZWNpc2lvbj17ZGVjaW1hbFByZWNpc2lvbn1cbiAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXI9e2ZpbHRlcn1cbiAgICAgICAgICAgICAgICAgICAgICBmb3JjZVJlbmRlcj17Zm9yY2VSZW5kZXJ9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgIDxEaXZpZGVyXG4gICAgICAgICAgICAgICAgICAgICAgb3JpZW50YXRpb249XCJob3Jpem9udGFsXCJcbiAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJhYnNvbHV0ZSB0b3AtMCB3LWZ1bGwgaC1taW5cIlxuICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAge2JsYW5rRXZlcnl0aGluZ0Vsc2UubWFwKChhdHRyKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIDxkaXYga2V5PXthdHRyLmlkfSBjbGFzc05hbWU9XCJyZWxhdGl2ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8QXR0cmlidXRlQ29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdD17c2VsZWN0aW9ufVxuICAgICAgICAgICAgICAgICAgICAgIGF0dHI9e2F0dHIuaWR9XG4gICAgICAgICAgICAgICAgICAgICAgaGlkZUVtcHR5PXtoaWRlRW1wdHl9XG4gICAgICAgICAgICAgICAgICAgICAgc3VtbWFyeVNob3duPXtzdW1tYXJ5U2hvd259XG4gICAgICAgICAgICAgICAgICAgICAgZGVjaW1hbFByZWNpc2lvbj17ZGVjaW1hbFByZWNpc2lvbn1cbiAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXI9e2ZpbHRlcn1cbiAgICAgICAgICAgICAgICAgICAgICBmb3JjZVJlbmRlcj17Zm9yY2VSZW5kZXJ9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgIDxEaXZpZGVyXG4gICAgICAgICAgICAgICAgICAgICAgb3JpZW50YXRpb249XCJob3Jpem9udGFsXCJcbiAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJhYnNvbHV0ZSB0b3AtMCB3LWZ1bGwgaC1taW5cIlxuICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgIDwvPlxuICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICA8PjwvPlxuICAgICAgICAgICl9XG4gICAgICAgIDwvUGFwZXI+XG4gICAgICA8L0dyaWQ+XG4gICAgICB7LyogSWYgaGlkZGVuIGF0dHJpYnV0ZXMgPT09IDAsIGRvbid0IHNob3cgdGhpcyBidXR0b24gKi99XG4gICAgICB7IWZ1bGx5RXhwYW5kZWQgJiYgKFxuICAgICAgICA8PlxuICAgICAgICAgIDxEYXJrRGl2aWRlciBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1taW5cIiAvPlxuICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwic2hyaW5rLTAgcC0yXCI+XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIGRhdGEtaWQ9XCJzZWUtYWxsLWNvbGxhcHNlLWJ1dHRvblwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICBzZXRFeHBhbmRlZCghZXhwYW5kZWQpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIHtleHBhbmRlZCA/ICdDb2xsYXBzZScgOiAnU2VlIGFsbCd9XG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDwvPlxuICAgICAgKX1cbiAgICA8L0dyaWQ+XG4gIClcbn1cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFN1bW1hcnkpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/tabs/metacard/tabs-metacard.d.ts b/src/main/webapp/component/tabs/metacard/tabs-metacard.d.ts new file mode 100644 index 00000000000..892bdb3f00b --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/tabs-metacard.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +export type TabContentProps = { + result: LazyQueryResult; + selectionInterface?: any; +}; +type TabDefinition = { + content: (({ result }: TabContentProps) => React.ReactNode | any) | React.ComponentClass; + header?: ({ result }: TabContentProps) => React.ReactNode; +}; +export declare const TabNames: { + Details: string; + Preview: string; + History: string; + Quality: string; + Actions: string; +}; +declare const Tabs: { + [key: string]: TabDefinition; +}; +export default Tabs; diff --git a/src/main/webapp/component/tabs/metacard/tabs-metacard.js b/src/main/webapp/component/tabs/metacard/tabs-metacard.js new file mode 100644 index 00000000000..b6f564299c8 --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/tabs-metacard.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import MetacardActions from '../../../react-component/metacard-actions'; +import MetacardQuality from '../../../react-component/metacard-quality'; +import MetacardHistory from '../../../react-component/metacard-history'; +import Summary from './summary'; +import { MetacardPreviewReact } from '../../metacard-preview/metacard-preview.view'; +export var TabNames = { + Details: 'Details', + Preview: 'Preview', + History: 'History', + Quality: 'Quality', + Actions: 'Actions', +}; +var Tabs = { + Details: { content: Summary }, + Preview: { + content: function (_a) { + var result = _a.result; + return React.createElement(MetacardPreviewReact, { result: result }); + }, + }, + History: { content: MetacardHistory }, + Quality: { content: MetacardQuality }, + Actions: { content: MetacardActions }, +}; +export default Tabs; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFicy1tZXRhY2FyZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdGFicy9tZXRhY2FyZC90YWJzLW1ldGFjYXJkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sZUFBZSxNQUFNLDJDQUEyQyxDQUFBO0FBQ3ZFLE9BQU8sZUFBZSxNQUFNLDJDQUEyQyxDQUFBO0FBQ3ZFLE9BQU8sZUFBZSxNQUFNLDJDQUEyQyxDQUFBO0FBQ3ZFLE9BQU8sT0FBTyxNQUFNLFdBQVcsQ0FBQTtBQUUvQixPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQTtBQWNuRixNQUFNLENBQUMsSUFBTSxRQUFRLEdBQUc7SUFDdEIsT0FBTyxFQUFFLFNBQVM7SUFDbEIsT0FBTyxFQUFFLFNBQVM7SUFDbEIsT0FBTyxFQUFFLFNBQVM7SUFDbEIsT0FBTyxFQUFFLF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G4gIHJlc3VsdDogTGF6eVF1ZXJ5UmVzdWx0XG4gIHNlbGVjdGlvbkludGVyZmFjZT86IGFueVxufVxuXG50eXBlIFRhYkRlZmluaXRpb24gPSB7XG4gIGNvbnRlbnQ6XG4gICAgfCAoKHsgcmVzdWx0IH06IFRhYkNvbnRlbnRQcm9wcykgPT4gUmVhY3QuUmVhY3ROb2RlIHwgYW55KVxuICAgIHwgUmVhY3QuQ29tcG9uZW50Q2xhc3M8VGFiQ29udGVudFByb3BzLCBhbnk+XG4gIGhlYWRlcj86ICh7IHJlc3VsdCB9OiBUYWJDb250ZW50UHJvcHMpID0+IFJlYWN0LlJlYWN0Tm9kZVxufVxuXG5leHBvcnQgY29uc3QgVGFiTmFtZXMgPSB7XG4gIERldGFpbHM6ICdEZXRhaWxzJyxcbiAgUHJldmlldzogJ1ByZXZpZXcnLFxuICBIaXN0b3J5OiAnSGlzdG9yeScsXG4gIFF1YWxpdHk6ICdRdWFsaXR5JyxcbiAgQWN0aW9uczogJ0FjdGlvbnMnLFxufVxuXG5jb25zdCBUYWJzID0ge1xuICBEZXRhaWxzOiB7IGNvbnRlbnQ6IFN1bW1hcnkgfSxcbiAgUHJldmlldzoge1xuICAgIGNvbnRlbnQ6ICh7IHJlc3VsdCB9KSA9PiB7XG4gICAgICByZXR1cm4gPE1ldGFjYXJkUHJldmlld1JlYWN0IHJlc3VsdD17cmVzdWx0fSAvPlxuICAgIH0sXG4gIH0sXG4gIEhpc3Rvcnk6IHsgY29udGVudDogTWV0YWNhcmRIaXN0b3J5IH0sXG4gIFF1YWxpdHk6IHsgY29udGVudDogTWV0YWNhcmRRdWFsaXR5IH0sXG4gIEFjdGlvbnM6IHsgY29udGVudDogTWV0YWNhcmRBY3Rpb25zIH0sXG59IGFzIHtcbiAgW2tleTogc3RyaW5nXTogVGFiRGVmaW5pdGlvblxufVxuXG5leHBvcnQgZGVmYXVsdCBUYWJzXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/tabs/metacard/transfer-list.d.ts b/src/main/webapp/component/tabs/metacard/transfer-list.d.ts new file mode 100644 index 00000000000..a2f0d9eefeb --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/transfer-list.d.ts @@ -0,0 +1,18 @@ +/// +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +export declare const useCustomReadOnlyCheck: () => { + loading: boolean; + isNotWritable: ({ attribute, lazyResult, }: { + attribute: string; + lazyResult: LazyQueryResult; + }) => boolean; +}; +declare const _default: ({ startingLeft, requiredAttributes, startingRight, startingHideEmpty, lazyResult, onSave, }: { + startingLeft: string[]; + requiredAttributes?: string[] | undefined; + startingRight: string[]; + startingHideEmpty?: boolean | undefined; + lazyResult?: LazyQueryResult | undefined; + onSave: (arg: string[], hideEmpty: boolean | undefined) => void; +}) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/tabs/metacard/transfer-list.js b/src/main/webapp/component/tabs/metacard/transfer-list.js new file mode 100644 index 00000000000..fec9db769f8 --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/transfer-list.js @@ -0,0 +1,527 @@ +import { __assign, __awaiter, __generator, __read } from "tslib"; +/* https://material-ui.com/components/transfer-list/ */ +import { hot } from 'react-hot-loader'; +import React from 'react'; +import Grid from '@mui/material/Grid'; +import List from '@mui/material/List'; +import Button from '@mui/material/Button'; +import DialogContent from '@mui/material/DialogContent'; +import DialogActions from '@mui/material/DialogActions'; +import TextField from '@mui/material/TextField'; +import Tooltip from '@mui/material/Tooltip'; +import LinearProgress from '@mui/material/LinearProgress'; +import CircularProgress from '@mui/material/CircularProgress'; +import Paper from '@mui/material/Paper'; +import { useDialog } from '../../dialog'; +import EditIcon from '@mui/icons-material/Edit'; +import { Editor } from './summary'; +import { DragDropContext, Droppable, Draggable, } from 'react-beautiful-dnd'; +import extension from '../../../extension-points'; +import { Elevations } from '../../theme/theme'; +import { DarkDivider } from '../../dark-divider/dark-divider'; +import LeftArrowIcon from '@mui/icons-material/ChevronLeft'; +import RightArrowIcon from '@mui/icons-material/ChevronRight'; +import CloseIcon from '@mui/icons-material/Close'; +import CheckBoxIcon from '@mui/icons-material/CheckBox'; +import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; +import IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Switch from '@mui/material/Switch'; +import { AutoVariableSizeList } from 'react-window-components'; +import debounce from 'lodash.debounce'; +import { Memo } from '../../memo/memo'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +import user from '../../singletons/user-instance'; +import ExtensionPoints from '../../../extension-points/extension-points'; +import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks'; +import { StartupDataStore } from '../../../js/model/Startup/startup'; +import { useConfiguration } from '../../../js/model/Startup/configuration.hooks'; +var getAmountChecked = function (items) { + return Object.values(items).filter(function (a) { return a; }).length; +}; +var handleShiftClick = function (_a) { + var _b; + var items = _a.items, filteredItemArray = _a.filteredItemArray, setItems = _a.setItems, item = _a.item; + var defaultMin = filteredItemArray.length; + var defaultMax = -1; + var firstIndex = filteredItemArray.reduce(function (min, filteredItem, index) { + if (items[filteredItem]) { + return Math.min(min, index); + } + return min; + }, defaultMin); + var lastIndex = filteredItemArray.reduce(function (max, filteredItem, index) { + if (items[filteredItem]) { + return Math.max(max, index); + } + return max; + }, defaultMax); + var indexClicked = filteredItemArray.indexOf(item); + if (firstIndex === defaultMin && lastIndex === defaultMax) { + setItems(__assign(__assign({}, items), (_b = {}, _b[item] = true, _b))); + } + else if (indexClicked <= firstIndex) { + // traverse from target to next until firstIndex + var updates = filteredItemArray.slice(indexClicked, firstIndex + 1); + setItems(__assign(__assign({}, items), updates.reduce(function (blob, filteredItem) { + blob[filteredItem] = true; + return blob; + }, {}))); + } + else if (indexClicked >= lastIndex) { + // traverse from target to prev until lastIndex + var updates = filteredItemArray.slice(lastIndex, indexClicked + 1); + setItems(__assign(__assign({}, items), updates.reduce(function (blob, filteredItem) { + blob[filteredItem] = true; + return blob; + }, {}))); + } + else { + // traverse from target to prev until something doesn't change + var closestPreviousIndex = filteredItemArray + .slice(0, indexClicked - 1) + .reduce(function (max, filteredItem, index) { + if (items[filteredItem]) { + return Math.max(max, index); + } + return max; + }, defaultMax); + var updates = filteredItemArray.slice(closestPreviousIndex, indexClicked + 1); + setItems(__assign(__assign({}, items), updates.reduce(function (blob, filteredItem) { + blob[filteredItem] = true; + return blob; + }, {}))); + } +}; +var ItemRow = function (_a) { + var value = _a.value, required = _a.required, lazyResult = _a.lazyResult, startOver = _a.startOver, measure = _a.measure, filter = _a.filter; + var _b = __read(React.useState(false), 2), show = _b[0], setShow = _b[1]; + var MetacardDefinitions = useMetacardDefinitions(); + var dialogContext = useDialog(); + var _c = React.useContext(CustomListContext), setItems = _c.setItems, items = _c.items, filteredItemArray = _c.filteredItemArray; + var isNotWritable = useCustomReadOnlyCheck().isNotWritable; + React.useEffect(function () { + if (measure) + measure(); + }, []); + var alias = MetacardDefinitions.getAlias(value); + var isReadonly = lazyResult + ? isNotWritable({ + attribute: value, + lazyResult: lazyResult, + }) + : true; + if (filter && !alias.toLowerCase().includes(filter.toLowerCase())) { + return null; + } + var CustomAttributeEditor = lazyResult + ? ExtensionPoints.attributeEditor(lazyResult, value) + : null; + return (React.createElement("div", { "data-id": "attribute-container", role: "listitem", className: "p-0 flex w-full" }, + React.createElement(Tooltip, { title: "Attributes required by admin must remain 'Active'.", open: show }, + React.createElement("div", { onMouseEnter: function () { return required && setShow(true); }, onMouseLeave: function () { return setShow(false); } }, + React.createElement(Button, { disabled: required, onClick: function (event) { + var _a, _b; + if (event.shiftKey) { + handleShiftClick({ + items: items, + item: value, + setItems: setItems, + filteredItemArray: filteredItemArray, + }); + } + else if (event.ctrlKey || event.metaKey) { + setItems(__assign(__assign({}, items), (_a = {}, _a[value] = !items[value], _a))); + } + else { + setItems(__assign(__assign({}, items), (_b = {}, _b[value] = !items[value], _b))); + } + }, size: "medium" }, items[value] ? React.createElement(CheckBoxIcon, null) : React.createElement(CheckBoxOutlineBlankIcon, null)))), + React.createElement(Button, { disabled: required, fullWidth: true, size: "medium", className: "justify-start", onClick: function (event) { + var _a, _b; + if (event.shiftKey) { + handleShiftClick({ + items: items, + item: value, + setItems: setItems, + filteredItemArray: filteredItemArray, + }); + } + else if (event.ctrlKey || event.metaKey) { + setItems(__assign(__assign({}, items), (_a = {}, _a[value] = !items[value], _a))); + } + else { + // really the only difference from the checkbox click event, where we turn off everything but this one + setItems(__assign(__assign({}, Object.keys(items).reduce(function (blob, val) { + blob[val] = false; + return blob; + }, {})), (_b = {}, _b[value] = !items[value], _b))); + } + } }, alias), + !isReadonly && lazyResult && (React.createElement(Button, { "data-id": "edit-button", style: { + pointerEvents: 'all', + height: '100%', + }, onClick: function () { + dialogContext.setProps({ + PaperProps: { + style: { + minWidth: 'none', + }, + }, + open: true, + children: CustomAttributeEditor ? (React.createElement(CustomAttributeEditor, { attribute: value, result: lazyResult, onCancel: startOver, onSave: startOver, goBack: startOver })) : (React.createElement("div", { style: { + padding: '10px', + minHeight: '30em', + minWidth: '60vh', + } }, + React.createElement(Editor, { attr: value, lazyResult: lazyResult, + /* Re-open this modal again but with the current state + This maintains the state so that if we haven't saved, + we can come back to where we were working */ + goBack: startOver, onCancel: startOver, onSave: startOver }))), + }); + } }, + React.createElement(EditIcon, null))))); +}; +var CustomListContext = React.createContext({ + items: {}, + setItems: (function () { }), + filteredItemArray: [], +}); +var filterUpdate = function (_a) { + var filter = _a.filter, setItemArray = _a.setItemArray, items = _a.items; + setItemArray(Object.keys(items).filter(function (attr) { + var alias = StartupDataStore.MetacardDefinitions.getAlias(attr); + var isFiltered = filter !== '' + ? !alias.toLowerCase().includes(filter.toLowerCase()) + : false; + return !isFiltered; + })); +}; +var generateDebouncedFilterUpdate = function () { + return debounce(filterUpdate, 500); +}; +/** + * At the moment, we only virtualize the right side since that's likely to be huge whereas the left isn't (it also has DND on left, which makes things diff to virtualize) + */ +var CustomList = function (_a) { + var title = _a.title, items = _a.items, requiredAttributes = _a.requiredAttributes, lazyResult = _a.lazyResult, updateItems = _a.updateItems, isDnD = _a.isDnD, handleToggleAll = _a.handleToggleAll, mode = _a.mode, startOver = _a.startOver, totalPossible = _a.totalPossible; + var itemsRef = React.useRef(items); + itemsRef.current = items; // don't see a performant way besides this to allow us to avoid rerendering DnD but allow it to update the item orders correctly + var _b = __read(React.useState(''), 2), filter = _b[0], setFilter = _b[1]; + var _c = __read(React.useState(Object.keys(items)), 2), unfilteredItemArray = _c[0], setUnfilteredItemArray = _c[1]; + var _d = __read(React.useState(Object.keys(items)), 2), filteredItemArray = _d[0], setFilteredItemArray = _d[1]; + var _e = __read(React.useState(false), 2), isFiltering = _e[0], setIsFiltering = _e[1]; + var debouncedFilterUpdate = React.useRef(generateDebouncedFilterUpdate()); + var numberChecked = getAmountChecked(items); + var total = Object.keys(items).length; + var totalCheckable = requiredAttributes + ? total - requiredAttributes.length + : total; + var isIndeterminate = numberChecked !== totalCheckable && numberChecked !== 0; + var isCompletelySelected = numberChecked === totalCheckable && totalCheckable !== 0; + React.useEffect(function () { + setUnfilteredItemArray(Object.keys(items)); + }, [Object.keys(items).toString()]); + React.useEffect(function () { + setIsFiltering(true); + debouncedFilterUpdate.current({ + items: items, + filter: filter, + setItemArray: setFilteredItemArray, + }); + }, [Object.keys(items).toString(), filter]); + React.useEffect(function () { + setIsFiltering(false); + }, [filteredItemArray]); + // memo this, other wise the creation of the new object each time is seen as a "change" + var memoProviderValue = React.useMemo(function () { + return { items: items, setItems: updateItems, filteredItemArray: filteredItemArray }; + }, [items, updateItems]); + return (React.createElement(CustomListContext.Provider, { value: memoProviderValue }, + React.createElement(Paper, { "data-id": "".concat(title.toLowerCase(), "-container"), elevation: Elevations.paper }, + React.createElement(Grid, { container: true, className: "p-2 text-xl font-normal relative", direction: "row", wrap: "nowrap", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "absolute left-0 top-0 ml-2 mt-min" }, + React.createElement(Button, { "data-id": "".concat(title.toLowerCase(), "-select-all-checkbox"), disabled: Object.keys(items).length === 0, onClick: handleToggleAll(items), color: "primary" }, (function () { + if (isCompletelySelected) { + return (React.createElement(React.Fragment, null, + React.createElement(CheckBoxIcon, null), + numberChecked, + ' ')); + } + else if (isIndeterminate) { + return (React.createElement(React.Fragment, null, + React.createElement(IndeterminateCheckBoxIcon, null), + numberChecked, + ' ')); + } + else { + return React.createElement(CheckBoxOutlineBlankIcon, null); + } + })())), + React.createElement(Grid, { item: true, className: "m-auto " }, + title, + " (", + total, + "/", + totalPossible, + ")")), + React.createElement(DarkDivider, { className: "w-full h-min" }), + React.createElement("div", { className: "p-2" }, + React.createElement(TextField, { "data-id": "filter-input", size: "small", variant: "outlined", label: "Filter by keyword", fullWidth: true, value: filter, onChange: function (e) { + setFilter(e.target.value); + } })), + React.createElement(DarkDivider, { className: "w-full h-min" }), + mode === 'loading' ? (React.createElement(CircularProgress, null)) : (React.createElement(List, { className: "w-common h-common overflow-hidden relative", dense: true, component: "div", role: "list" }, + isFiltering ? (React.createElement(LinearProgress, { className: "w-full h-1 absolute left-0 top-0", variant: "indeterminate" })) : null, + isDnD ? (React.createElement(Memo, { dependencies: [filteredItemArray] }, + React.createElement("div", { className: "flex flex-col flex-nowrap h-full w-full overflow-hidden" }, + React.createElement("div", { className: "italic px-4 text-xs font-normal" }, "Click and drag attributes to reorder."), + React.createElement("div", { className: "w-full h-full" }, + React.createElement(DragDropContext, { onDragEnd: function (result) { + //Put these NO-OPs up front for performance reasons: + //1. If the item is dropped outside the list, do nothing + //2. If the item is moved into the same place, do nothing + if (!result.destination) { + return; + } + if (result.source.index === result.destination.index) { + return; + } + // complicated by the fact that we filter, so we need to find the original and dest index ourselves :( + if (result.reason === 'DROP' && result.destination) { + var shiftedOriginalIndex = unfilteredItemArray.indexOf(result.draggableId); + var shiftedDestIndex = unfilteredItemArray.indexOf(filteredItemArray[result.destination.index]); + var clonedList = unfilteredItemArray.slice(0); + clonedList.splice(shiftedOriginalIndex, 1); + clonedList.splice(shiftedDestIndex, 0, // insert WITHOUT removing anything + result.draggableId); + var newList = clonedList.reduce(function (blob, attr) { + blob[attr] = itemsRef.current[attr]; + return blob; + }, {}); + updateItems(newList); + filterUpdate({ + filter: filter, + setItemArray: setFilteredItemArray, + items: newList, + }); // in this case, we eagerly set in order to avoid flickering + } + } }, + React.createElement("div", { className: "children-h-full children-w-full h-full w-full overflow-hidden" }, + React.createElement(Droppable, { droppableId: "test", mode: "virtual", renderClone: function (provided, _snapshot, rubric) { + return (React.createElement("div", __assign({}, provided.draggableProps, provided.dragHandleProps, { ref: provided.innerRef }), + React.createElement(ItemRow, { value: filteredItemArray[rubric.source.index], required: requiredAttributes === null || requiredAttributes === void 0 ? void 0 : requiredAttributes.includes(filteredItemArray[rubric.source.index]), startOver: startOver, lazyResult: lazyResult, filter: filter }))); + } }, function (provided) { + return (React.createElement(AutoVariableSizeList, { items: filteredItemArray, defaultSize: 39.42, controlledMeasuring: true, overscanCount: 10, outerRef: provided.innerRef, Item: function (_a) { + var itemRef = _a.itemRef, item = _a.item, measure = _a.measure, index = _a.index; + return (React.createElement("div", { ref: itemRef, className: "relative" }, + React.createElement(Draggable, { draggableId: item, index: index, key: item, isDragDisabled: !isDnD, disableInteractiveElementBlocking: true }, function (provided) { + return (React.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps), + React.createElement(ItemRow, { value: item, required: requiredAttributes === null || requiredAttributes === void 0 ? void 0 : requiredAttributes.includes(item), startOver: startOver, lazyResult: lazyResult, + // filter={filter} + measure: measure }))); + }))); + }, Empty: function () { + return React.createElement("div", null); + } })); + }))))))) : (React.createElement(React.Fragment, null, + React.createElement(AutoVariableSizeList, { items: filteredItemArray, defaultSize: 39.42, controlledMeasuring: true, overscanCount: 10, Item: function (_a) { + var itemRef = _a.itemRef, item = _a.item, measure = _a.measure; + return (React.createElement("div", { ref: itemRef, className: "relative" }, + React.createElement(ItemRow, { value: item, required: requiredAttributes === null || requiredAttributes === void 0 ? void 0 : requiredAttributes.includes(item), startOver: startOver, lazyResult: lazyResult, measure: measure }))); + }, Empty: function () { + return React.createElement("div", null); + } })))))))); +}; +export var useCustomReadOnlyCheck = function () { + var Configuration = useConfiguration(); + var _a = __read(React.useState([]), 2), customEditableAttributes = _a[0], setCustomEditableAttributes = _a[1]; + var isMounted = React.useRef(true); + var _b = __read(React.useState(true), 2), loading = _b[0], setLoading = _b[1]; + var initializeCustomEditableAttributes = function () { return __awaiter(void 0, void 0, void 0, function () { + var attrs; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, extension.customEditableAttributes()]; + case 1: + attrs = _a.sent(); + if (isMounted.current) { + if (attrs !== undefined) { + setCustomEditableAttributes(attrs); + } + setLoading(false); + } + return [2 /*return*/]; + } + }); + }); }; + React.useEffect(function () { + initializeCustomEditableAttributes(); + return function () { + isMounted.current = false; + }; + }, []); + return { + loading: loading, + isNotWritable: function (_a) { + var attribute = _a.attribute, lazyResult = _a.lazyResult; + var perm = extension.customCanWritePermission({ + attribute: attribute, + lazyResult: lazyResult, + user: user, + editableAttributes: customEditableAttributes, + }); + if (perm !== undefined) { + return !perm; + } + var determination = lazyResult.isRemote() || + !TypedUserInstance.canWrite(lazyResult) || + Configuration.isReadOnly(attribute); + return determination; + }, + }; +}; +var convertAttrListToMap = function (attrs) { + return attrs.reduce(function (blob, attr) { + blob[attr] = false; + return blob; + }, {}); +}; +var TransferList = function (_a) { + var startingLeft = _a.startingLeft, requiredAttributes = _a.requiredAttributes, startingRight = _a.startingRight, startingHideEmpty = _a.startingHideEmpty, lazyResult = _a.lazyResult, onSave = _a.onSave; + var dialogContext = useDialog(); + var _b = __read(React.useState('loading'), 2), mode = _b[0], setMode = _b[1]; + var _c = __read(React.useState(convertAttrListToMap(startingLeft)), 2), left = _c[0], setLeft = _c[1]; + var _d = __read(React.useState(convertAttrListToMap(startingRight)), 2), right = _d[0], setRight = _d[1]; + var _e = __read(React.useState(startingHideEmpty), 2), hideEmpty = _e[0], setHideEmpty = _e[1]; + var loading = useCustomReadOnlyCheck().loading; + React.useEffect(function () { + if (!loading) { + setMode('normal'); + } + }, [loading]); + var generateHandleToggleAll = function (_a) { + var setState = _a.setState, state = _a.state, _b = _a.disabledAttributes, disabledAttributes = _b === void 0 ? [] : _b; + return function () { return function () { + var allValues = Object.values(state); + var totalCheckable = allValues.length - disabledAttributes.length; + var numberChecked = allValues.filter(function (checked) { return checked; }).length; + var allSelected = numberChecked === totalCheckable && totalCheckable !== 0; + if (!allSelected) { + setState(Object.keys(state).reduce(function (blob, attr) { + if (disabledAttributes.includes(attr)) + blob[attr] = false; + else + blob[attr] = true; + return blob; + }, {})); + } + else { + setState(Object.keys(state).reduce(function (blob, attr) { + blob[attr] = false; + return blob; + }, {})); + } + }; }; + }; + var moveRight = function () { + var checkedLeft = Object.entries(left) + .filter(function (a) { return a[1]; }) + .reduce(function (blob, a) { + blob[a[0]] = false; + return blob; + }, {}); + var nonCheckedLeft = Object.entries(left) + .filter(function (a) { return !a[1]; }) + .reduce(function (blob, a) { + blob[a[0]] = a[1]; + return blob; + }, {}); + setRight(__assign(__assign({}, right), checkedLeft)); + setLeft(nonCheckedLeft); + }; + var moveLeft = function () { + var checkedRight = Object.entries(right) + .filter(function (a) { return a[1]; }) + .reduce(function (blob, a) { + blob[a[0]] = false; + return blob; + }, {}); + var nonCheckedRight = Object.entries(right) + .filter(function (a) { return !a[1]; }) + .reduce(function (blob, a) { + blob[a[0]] = a[1]; + return blob; + }, {}); + setLeft(__assign(__assign({}, left), checkedRight)); + setRight(nonCheckedRight); + }; + var hasLeftChecked = Object.entries(left).find(function (a) { return a[1]; }) !== undefined; + var hasRightChecked = Object.entries(right).find(function (a) { return a[1]; }) !== undefined; + var startOver = function () { + dialogContext.setProps({ + open: true, + children: (React.createElement(TransferList, { startingLeft: Object.keys(left), startingRight: Object.keys(right), startingHideEmpty: hideEmpty, lazyResult: lazyResult, onSave: onSave })), + }); + }; + var totalPossible = startingLeft.length + startingRight.length; + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "text-2xl text-center px-2 pb-2 pt-4 font-normal relative" }, + "Manage Attributes", + React.createElement(Button, { "data-id": "close-button", className: "absolute right-0 top-0 mr-1 mt-1", variant: "text", size: "small", onClick: function () { + dialogContext.setProps({ + open: false, + children: null, + }); + } }, + React.createElement(CloseIcon, null))), + React.createElement(DarkDivider, { className: "w-full h-min" }), + React.createElement(DialogContent, null, + React.createElement(Grid, { container: true, spacing: 2, justifyContent: "center", alignItems: "center", className: "m-auto" }, + React.createElement(Grid, { item: true }, + React.createElement(CustomList, { title: "Active", items: left, requiredAttributes: requiredAttributes, lazyResult: lazyResult, updateItems: setLeft, isDnD: true, startOver: startOver, handleToggleAll: generateHandleToggleAll({ + setState: setLeft, + state: left, + disabledAttributes: requiredAttributes, + }), totalPossible: totalPossible, mode: mode })), + React.createElement(Grid, { item: true }, + React.createElement(Grid, { container: true, direction: "column", alignItems: "center" }, + React.createElement(Button, { "data-id": "move-right-button", variant: "outlined", className: "m-1", onClick: moveRight, disabled: !hasLeftChecked, "aria-label": "move selected right" }, + React.createElement(RightArrowIcon, null)), + React.createElement(Button, { "data-id": "move-left-button", variant: "outlined", className: "m-1", onClick: moveLeft, disabled: !hasRightChecked, "aria-label": "move selected left" }, + React.createElement(LeftArrowIcon, null)))), + React.createElement(Grid, { item: true }, + React.createElement(CustomList, { title: "Hidden", items: right, lazyResult: lazyResult, updateItems: setRight, isDnD: false, startOver: startOver, handleToggleAll: generateHandleToggleAll({ + setState: setRight, + state: right, + }), mode: mode, totalPossible: totalPossible })))), + React.createElement(DarkDivider, { className: "w-full h-min" }), + React.createElement(DialogActions, null, + hideEmpty !== undefined && (React.createElement(React.Fragment, null, + React.createElement(FormControlLabel, { control: React.createElement(Switch, { checked: hideEmpty, onChange: function (e) { return setHideEmpty(e.target.checked); } }), label: "Hide empty attributes in inspector", style: { paddingLeft: '10px' } }), + React.createElement("div", { style: { flex: '1 0 0' } }))), + React.createElement(Button, { "data-id": "dialog-save-button", disabled: mode === 'saving', onClick: function () { + dialogContext.setProps({ + open: false, + children: null, + }); + }, variant: "text", color: "secondary", className: "mr-2" }, "Cancel"), + React.createElement(Button, { className: "ml-2", disabled: mode === 'saving', onClick: function () { + setMode('saving'); + onSave(Object.keys(left), hideEmpty); + dialogContext.setProps({ + open: false, + children: null, + }); + }, variant: "contained", color: "primary" }, "Save")), + mode === 'saving' ? (React.createElement(LinearProgress, { style: { + width: '100%', + height: '10px', + position: 'absolute', + left: '0px', + bottom: '0%', + }, variant: "indeterminate" })) : null)); +}; +export default hot(module)(TransferList); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXItbGlzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdGFicy9tZXRhY2FyZC90cmFuc2Zlci1saXN0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsdURBQXVEO0FBQ3ZELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxJQUFJLE1BQU0sb0JBQW9CLENBQUE7QUFDckMsT0FBTyxJQUFJLE1BQU0sb0JBQW9CLENBQUE7QUFDckMsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxhQUFhLE1BQU0sNkJBQTZCLENBQUE7QUFDdkQsT0FBTyxhQUFhLE1BQU0sNkJBQTZCLENBQUE7QUFDdkQsT0FBTyxTQUFTLE1BQU0seUJBQXlCLENBQUE7QUFDL0MsT0FBTyxPQUFPLE1BQU0sdUJBQXVCLENBQUE7QUFDM0MsT0FBTyxjQUFjLE1BQU0sOEJBQThCLENBQUE7QUFDek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UF0dHJpYnV0ZUVkaXRvciA9IGxhenlSZXN1bHRcbiAgICA/IEV4dGVuc2lvblBvaW50cy5hdHRyaWJ1dGVFZGl0b3IobGF6eVJlc3VsdCwgdmFsdWUpXG4gICAgOiBudWxsXG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgZGF0YS1pZD1cImF0dHJpYnV0ZS1jb250YWluZXJcIlxuICAgICAgcm9sZT1cImxpc3RpdGVtXCJcbiAgICAgIGNsYXNzTmFtZT1cInAtMCBmbGV4IHctZnVsbFwiXG4gICAgPlxuICAgICAgPFRvb2x0aXBcbiAgICAgICAgdGl0bGU9XCJBdHRyaWJ1dGVzIHJlcXVpcmVkIGJ5IGFkbWluIG11c3QgcmVtYWluICdBY3RpdmUnLlwiXG4gICAgICAgIG9wZW49e3Nob3d9XG4gICAgICA+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBvbk1vdXNlRW50ZXI9eygpID0+IHJlcXVpcmVkICYmIHNldFNob3codHJ1ZSl9XG4gICAgICAgICAgb25Nb3VzZUxlYXZlPXsoKSA9PiBzZXRTaG93KGZhbHNlKX1cbiAgICAgICAgPlxuICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgIGRpc2FibGVkPXtyZXF1aXJlZH1cbiAgICAgICAgICAgIG9uQ2xpY2s9eyhldmVudCkgPT4ge1xuICAgICAgICAgICAgICBpZiAoZXZlbnQuc2hpZnRLZXkpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVTaGlmdENsaWNrKHtcbiAgICAgICAgICAgICAgICAgIGl0ZW1zLFxuICAgICAgICAgICAgICAgICAgaXRlbTogdmFsdWUsXG4gICAgICAgICAgICAgICAgICBzZXRJdGVtcyxcbiAgICAgICAgICAgICAgICAgIGZpbHRlcmVkSXRlbUFycmF5LFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXZlbnQuY3RybEtleSB8fCBldmVudC5tZXRhS2V5KSB7XG4gICAgICAgICAgICAgICAgc2V0SXRlbXMoe1xuICAgICAgICAgICAgICAgICAgLi4uaXRlbXMsXG4gICAgICAgICAgICAgICAgICBbdmFsdWVdOiAhaXRlbXNbdmFsdWVdLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc2V0SXRlbXMoe1xuICAgICAgICAgICAgICAgICAgLi4uaXRlbXMsXG4gICAgICAgICAgICAgICAgICBbdmFsdWVdOiAhaXRlbXNbdmFsdWVdLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBzaXplPVwibWVkaXVtXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICB7aXRlbXNbdmFsdWVdID8gPENoZWNrQm94SWNvbiAvPiA6IDxDaGVja0JveE91dGxpbmVCbGFua0ljb24gLz59XG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9Ub29sdGlwPlxuICAgICAgPEJ1dHRvblxuICAgICAgICBkaXNhYmxlZD17cmVxdWlyZWR9XG4gICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICBzaXplPVwibWVkaXVtXCJcbiAgICAgICAgY2xhc3NOYW1lPVwianVzdGlmeS1zdGFydFwiXG4gICAgICAgIG9uQ2xpY2s9eyhldmVudCkgPT4ge1xuICAgICAgICAgIGlmIChldmVudC5zaGlmdEtleSkge1xuICAgICAgICAgICAgaGFuZGxlU2hpZnRDbGljayh7XG4gICAgICAgICAgICAgIGl0ZW1zLFxuICAgICAgICAgICAgICBpdGVtOiB2YWx1ZSxcbiAgICAgICAgICAgICAgc2V0SXRlbXMsXG4gICAgICAgICAgICAgIGZpbHRlcmVkSXRlbUFycmF5LFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGVsc2UgaWYgKGV2ZW50LmN0cmxLZXkgfHwgZXZlbnQubWV0YUtleSkge1xuICAgICAgICAgICAgc2V0SXRlbXMoe1xuICAgICAgICAgICAgICAuLi5pdGVtcyxcbiAgICAgICAgICAgICAgW3ZhbHVlXTogIWl0ZW1zW3ZhbHVlXSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIHJlYWxseSB0aGUgb25seSBkaWZmZXJlbmNlIGZyb20gdGhlIGNoZWNrYm94IGNsaWNrIGV2ZW50LCB3aGVyZSB3ZSB0dXJuIG9mZiBldmVyeXRoaW5nIGJ1dCB0aGlzIG9uZVxuICAgICAgICAgICAgc2V0SXRlbXMoe1xuICAgICAgICAgICAgICAuLi5PYmplY3Qua2V5cyhpdGVtcykucmVkdWNlKChibG9iLCB2YWwpID0+IHtcbiAgICAgICAgICAgICAgICBibG9iW3ZhbF0gPSBmYWxzZVxuICAgICAgICAgICAgICAgIHJldHVybiBibG9iXG4gICAgICAgICAgICAgIH0sIHt9IGFzIENoZWNrZWRUeXBlKSxcbiAgICAgICAgICAgICAgW3ZhbHVlXTogIWl0ZW1zW3ZhbHVlXSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9fVxuICAgICAgPlxuICAgICAgICB7YWxpYXN9XG4gICAgICA8L0J1dHRvbj5cbiAgICAgIHshaXNSZWFkb25seSAmJiBsYXp5UmVzdWx0ICYmIChcbiAgICAgICAgPEJ1dHRvblxuICAgICAgICAgIGRhdGEtaWQ9XCJlZGl0LWJ1dHRvblwiXG4gICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgIHBvaW50ZXJFdmVudHM6ICdhbGwnLFxuICAgICAgICAgICAgaGVpZ2h0OiAnMTAwJScsXG4gICAgICAgICAgfX1cbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBkaWFsb2dDb250ZXh0LnNldFByb3BzKHtcbiAgICAgICAgICAgICAgUGFwZXJQcm9wczoge1xuICAgICAgICAgICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICAgICAgICBtaW5XaWR0aDogJ25vbmUnLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIG9wZW46IHRydWUsXG4gICAgICAgICAgICAgIGNoaWxkcmVuOiBDdXN0b21BdHRyaWJ1dGVFZGl0b3IgPyAoXG4gICAgICAgICAgICAgICAgPEN1c3RvbUF0dHJpYnV0ZUVkaXRvclxuICAgICAgICAgICAgICAgICAgYXR0cmlidXRlPXt2YWx1ZX1cbiAgICAgICAgICAgICAgICAgIHJlc3VsdD17bGF6eVJlc3VsdH1cbiAgICAgICAgICAgICAgICAgIG9uQ2FuY2VsPXtzdGFydE92ZXJ9XG4gICAgICAgICAgICAgICAgICBvblNhdmU9e3N0YXJ0T3Zlcn1cbiAgICAgICAgICAgICAgICAgIGdvQmFjaz17c3RhcnRPdmVyfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogJzEwcHgnLFxuICAgICAgICAgICAgICAgICAgICBtaW5IZWlnaHQ6ICczMGVtJyxcbiAgICAgICAgICAgICAgICAgICAgbWluV2lkdGg6ICc2MHZoJyxcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPEVkaXRvclxuICAgICAgICAgICAgICAgICAgICBhdHRyPXt2YWx1ZX1cbiAgICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdD17bGF6eVJlc3VsdH1cbiAgICAgICAgICAgICAgICAgICAgLyogUmUtb3BlbiB0aGlzIG1vZGFsIGFnYWluIGJ1dCB3aXRoIHRoZSBjdXJyZW50IHN0YXRlXG4gICAgICAgICAgICAgIFRoaXMgbWFpbnRhaW5zIHRoZSBzdGF0ZSBzbyB0aGF0IGlmIHdlIGhhdmVuJ3Qgc2F2ZWQsXG4gICAgICAgICAgICAgIHdlIGNhbiBjb21lIGJhY2sgdG8gd2hlcmUgd2Ugd2VyZSB3b3JraW5nICovXG4gICAgICAgICAgICAgICAgICAgIGdvQmFjaz17c3RhcnRPdmVyfVxuICAgICAgICAgICAgICAgICAgICBvbkNhbmNlbD17c3RhcnRPdmVyfVxuICAgICAgICAgICAgICAgICAgICBvblNhdmU9e3N0YXJ0T3Zlcn1cbiAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICA8RWRpdEljb24gLz5cbiAgICAgICAgPC9CdXR0b24+XG4gICAgICApfVxuICAgIDwvZGl2PlxuICApXG59XG5jb25zdCBDdXN0b21MaXN0Q29udGV4dCA9IFJlYWN0LmNyZWF0ZUNvbnRleHQoe1xuICBpdGVtczoge30gYXMgQ2hlY2tlZFR5cGUsXG4gIHNldEl0ZW1zOiAoKCkgPT4ge30pIGFzIFNldENoZWNrZWRUeXBlLFxuICBmaWx0ZXJlZEl0ZW1BcnJheTogW10gYXMgc3RyaW5nW10sXG59KVxuY29uc3QgZmlsdGVyVXBkYXRlID0gKHtcbiAgZmlsdGVyLFxuICBzZXRJdGVtQXJyYXksXG4gIGl0ZW1zLFxufToge1xuICBpdGVtczoge1xuICAgIFtrZXk6IHN0cmluZ106IGJvb2xlYW5cbiAgfVxuICBmaWx0ZXI6IHN0cmluZ1xuICBzZXRJdGVtQXJyYXk6ICh2YWw6IHN0cmluZ1tdKSA9PiB2b2lkXG59KSA9PiB7XG4gIHNldEl0ZW1BcnJheShcbiAgICBPYmplY3Qua2V5cyhpdGVtcykuZmlsdGVyKChhdHRyKSA9PiB7XG4gICAgICBjb25zdCBhbGlhcyA9IFN0YXJ0dXBEYXRhU3RvcmUuTWV0YWNhcmREZWZpbml0aW9ucy5nZXRBbGlhcyhhdHRyKVxuICAgICAgY29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yPVwicHJpbWFyeVwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIHsoKCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChpc0NvbXBsZXRlbHlTZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICAgICAgICA8Q2hlY2tCb3hJY29uIC8+XG4gICAgICAgICAgICAgICAgICAgICAge251bWJlckNoZWNrZWR9eycgJ31cbiAgICAgICAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpc0luZGV0ZXJtaW5hdGUpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgICAgPEluZGV0ZXJtaW5hdGVDaGVja0JveEljb24gLz5cbiAgICAgICAgICAgICAgICAgICAgICB7bnVtYmVyQ2hlY2tlZH17JyAnfVxuICAgICAgICAgICAgICAgICAgICA8Lz5cbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIDxDaGVja0JveE91dGxpbmVCbGFua0ljb24gLz5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pKCl9XG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJtLWF1dG8gXCI+XG4gICAgICAgICAgICB7dGl0bGV9ICh7dG90YWx9L3t0b3RhbFBvc3NpYmxlfSlcbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDwvR3JpZD5cbiAgICAgICAgPERhcmtEaXZpZGVyIGNsYXNzTmFtZT1cInctZnVsbCBoLW1pblwiIC8+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicC0yXCI+XG4gICAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgICAgZGF0YS1pZD1cImZpbHRlci1pbnB1dFwiXG4gICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICAgIGxhYmVsPVwiRmlsdGVyIGJ5IGtleXdvcmRcIlxuICAgICAgICAgICAgZnVsbFdpZHRoPXt0cnVlfVxuICAgICAgICAgICAgdmFsdWU9e2ZpbHRlcn1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBzZXRGaWx0ZXIoZS50YXJnZXQudmFsdWUpXG4gICAgICAgICAgICB9fVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8RGFya0RpdmlkZXIgY2xhc3NOYW1lPVwidy1mdWxsIGgtbWluXCIgLz5cbiAgICAgICAge21vZGUgPT09ICdsb2FkaW5nJyA/IChcbiAgICAgICAgICA8Q2lyY3VsYXJQcm9ncmVzcyAvPlxuICAgICAgICApIDogKFxuICAgICAgICAgIDxMaXN0XG4gICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWNvbW1vbiBoLWNvbW1vbiBvdmVyZmxvdy1oaWRkZW4gcmVsYXRpdmVcIlxuICAgICAgICAgICAgZGVuc2VcbiAgICAgICAgICAgIGNvbXBvbmVudD1cImRpdlwiXG4gICAgICAgICAgICByb2xlPVwibGlzdFwiXG4gICAgICAgICAgPlxuICAgICAgICAgICAge2lzRmlsdGVyaW5nID8gKFxuICAgICAgICAgICAgICA8TGluZWFyUHJvZ3Jlc3NcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGwgaC0xIGFic29sdXRlIGxlZnQtMCB0b3AtMFwiXG4gICAgICAgICAgICAgICAgdmFyaWFudD1cImluZGV0ZXJtaW5hdGVcIlxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgICB7aXNEbkQgPyAoXG4gICAgICAgICAgICAgIDxNZW1vIGRlcGVuZGVuY2llcz17W2ZpbHRlcmVkSXRlbUFycmF5XX0+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJmbGV4IGZsZXgtY29sIGZsZXgtbm93cmFwIGgtZnVsbCB3LWZ1bGwgb3ZlcmZsb3ctaGlkZGVuXCI+XG4gICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cIml0YWxpYyBweC00IHRleHQteHMgZm9udC1ub3JtYWxcIj5cbiAgICAgICAgICAgICAgICAgICAgQ2xpY2sgYW5kIGRyYWcgYXR0cmlidXRlcyB0byByZW9yZGVyLlxuICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInctZnVsbCBoLWZ1bGxcIj5cbiAgICAgICAgICAgICAgICAgICAgPERyYWdEcm9wQ29udGV4dFxuICAgICAgICAgICAgICAgICAgICAgIG9uRHJhZ0VuZD17KHJlc3VsdDogRHJvcFJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9QdXQgdGhlc2UgTk8tT1BzIHVwIGZyb250IGZvciBwZXJmb3JtYW5jZSByZWFzb25zOlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8xLiBJZiB0aGUgaXRlbSBpcyBkcm9wcGVkIG91dHNpZGUgdGhlIGxpc3QsIGRvIG5vdGhpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vMi4gSWYgdGhlIGl0ZW0gaXMgbW92ZWQgaW50byB0aGUgc2FtZSBwbGFjZSwgZG8gbm90aGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXN1bHQuZGVzdGluYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0LnNvdXJjZS5pbmRleCA9PT0gcmVzdWx0LmRlc3RpbmF0aW9uLmluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29tcGxpY2F0ZWQgYnkgdGhlIGZhY3QgdGhhdCB3ZSBmaWx0ZXIsIHNvIHdlIG5lZWQgdG8gZmluZCB0aGUgb3JpZ2luYWwgYW5kIGRlc3QgaW5kZXggb3Vyc2VsdmVzIDooXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0LnJlYXNvbiA9PT0gJ0RST1AnICYmIHJlc3VsdC5kZXN0aW5hdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdGVkT3JpZ2luYWxJbmRleCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5maWx0ZXJlZEl0ZW1BcnJheS5pbmRleE9mKHJlc3VsdC5kcmFnZ2FibGVJZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRlZERlc3RJbmRleCA9IHVuZmlsdGVyZWRJdGVtQXJyYXkuaW5kZXhPZihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJlZEl0ZW1BcnJheVtyZXN1bHQuZGVzdGluYXRpb24uaW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2xvbmVkTGlzdCA9IHVuZmlsdGVyZWRJdGVtQXJyYXkuc2xpY2UoMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvbmVkTGlzdC5zcGxpY2Uoc2hpZnRlZE9yaWdpbmFsSW5kZXgsIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNsb25lZExpc3Quc3BsaWNlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoaWZ0ZWREZXN0SW5kZXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgLy8gaW5zZXJ0IFdJVEhPVVQgcmVtb3ZpbmcgYW55dGhpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQuZHJhZ2dhYmxlSWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdMaXN0ID0gY2xvbmVkTGlzdC5yZWR1Y2UoKGJsb2IsIGF0dHIpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBibG9iW2F0dHJdID0gaXRlbXNSZWYuY3VycmVudFthdHRyXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBibG9iXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHt9IGFzIENoZWNrZWRUeXBlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtcyhuZXdMaXN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJVcGRhdGUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtQXJyYXk6IHNldEZpbHRlcmVkSXRlbUFycmF5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zOiBuZXdMaXN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICB9KSAvLyBpbiB0aGlzIGNhc2UsIHdlIGVhZ2VybHkgc2V0IGluIG9yZGVyIHRvIGF2b2lkIGZsaWNrZXJpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJjaGlsZHJlbi1oLWZ1bGwgY2hpbGRyZW4tdy1mdWxsIGgtZnVsbCB3LWZ1bGwgb3ZlcmZsb3ctaGlkZGVuXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8RHJvcHBhYmxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRyb3BwYWJsZUlkPVwidGVzdFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGU9XCJ2aXJ0dWFsXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyQ2xvbmU9eyhwcm92aWRlZCwgX3NuYXBzaG90LCBydWJyaWMpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Li4uKHByb3ZpZGVkLmRyYWdnYWJsZVByb3BzIGFzIGFueSl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsuLi4ocHJvdmlkZWQuZHJhZ0hhbmRsZVByb3BzIGFzIGFueSl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZj17cHJvdmlkZWQuaW5uZXJSZWYgYXMgYW55fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8SXRlbVJvd1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlPXtmaWx0ZXJlZEl0ZW1BcnJheVtydWJyaWMuc291cmNlLmluZGV4XX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlZD17cmVxdWlyZWRBdHRyaWJ1dGVzPy5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmVkSXRlbUFycmF5W3J1YnJpYy5zb3VyY2UuaW5kZXhdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydE92ZXI9e3N0YXJ0T3Zlcn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0PXtsYXp5UmVzdWx0fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcj17ZmlsdGVyfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICB7KHByb3ZpZGVkKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxBdXRvVmFyaWFibGVTaXplTGlzdDxzdHJpbmcsIEhUTUxEaXZFbGVtZW50PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcz17ZmlsdGVyZWRJdGVtQXJyYXl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRTaXplPXszOS40Mn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbGxlZE1lYXN1cmluZz17dHJ1ZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcnNjYW5Db3VudD17MTB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dGVyUmVmPXtwcm92aWRlZC5pbm5lclJlZn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSXRlbT17KHsgaXRlbVJlZiwgaXRlbSwgbWVhc3VyZSwgaW5kZXggfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IHJlZj17aXRlbVJlZn0gY2xhc3NOYW1lPVwicmVsYXRpdmVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPERyYWdnYWJsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyYWdnYWJsZUlkPXtpdGVtfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4PXtpbmRleH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk9e2l0ZW19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNEcmFnRGlzYWJsZWQ9eyFpc0RuRH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlSW50ZXJhY3RpdmVFbGVtZW50QmxvY2tpbmdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsocHJvdmlkZWQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWY9e3Byb3ZpZGVkLmlubmVyUmVmIGFzIGFueX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Li4uKHByb3ZpZGVkLmRyYWdnYWJsZVByb3BzIGFzIGFueSl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgey4uLihwcm92aWRlZC5kcmFnSGFuZGxlUHJvcHMgYXMgYW55KX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxJdGVtUm93XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZT17aXRlbX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkPXtyZXF1aXJlZEF0dHJpYnV0ZXM/LmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRPdmVyPXtzdGFydE92ZXJ9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0PXtsYXp5UmVzdWx0fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZmlsdGVyPXtmaWx0ZXJ9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZWFzdXJlPXttZWFzdXJlfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvRHJhZ2dhYmxlPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbXB0eT17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiA8ZGl2PjwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICA8L0Ryb3BwYWJsZT5cbiAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPC9EcmFnRHJvcENvbnRleHQ+XG4gICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgPC9NZW1vPlxuICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICA8QXV0b1ZhcmlhYmxlU2l6ZUxpc3Q8c3RyaW5nLCBIVE1MRGl2RWxlbWVudD5cbiAgICAgICAgICAgICAgICAgIGl0ZW1zPXtmaWx0ZXJlZEl0ZW1BcnJheX1cbiAgICAgICAgICAgICAgICAgIGRlZmF1bHRTaXplPXszOS40Mn1cbiAgICAgICAgICAgICAgICAgIGNvbnRyb2xsZWRNZWFzdXJpbmc9e3RydWV9XG4gICAgICAgICAgICAgICAgICBvdmVyc2NhbkNvdW50PXsxMH1cbiAgICAgICAgICAgICAgICAgIEl0ZW09eyh7IGl0ZW1SZWYsIGl0ZW0sIG1lYXN1cmUgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgIDxkaXYgcmVmPXtpdGVtUmVmfSBjbGFzc05hbWU9XCJyZWxhdGl2ZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPEl0ZW1Sb3dcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU9e2l0ZW19XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkPXtyZXF1aXJlZEF0dHJpYnV0ZXM/LmluY2x1ZGVzKGl0ZW0pfVxuICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydE92ZXI9e3N0YXJ0T3Zlcn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdD17bGF6eVJlc3VsdH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgbWVhc3VyZT17bWVhc3VyZX1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICBFbXB0eT17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gPGRpdj48L2Rpdj5cbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICApfVxuICAgICAgICAgIDwvTGlzdD5cbiAgICAgICAgKX1cbiAgICAgIDwvUGFwZXI+XG4gICAgPC9DdXN0b21MaXN0Q29udGV4dC5Qcm92aWRlcj5cbiAgKVxufVxuZXhwb3J0IGNvbnN0IHVzZUN1c3RvbVJlYWRPbmx5Q2hlY2sgPSAoKSA9PiB7XG4gIGNvbnN0IENvbmZpZ3VyYXRpb24gPSB1c2VDb25maWd1cmF0aW9uKClcbiAgY29uc3QgW2N1c3RvbUVkaXRhYmxlQXR0cmlidXRlcywgc2V0Q3VzdG9tRWRpdGFibGVBdHRyaWJ1dGVzXSA9XG4gICAgUmVhY3QudXNlU3RhdGUoW10gYXMgc3RyaW5nW10pXG4gIGNvbnN0IGlzTW91bnRlZCA9IFJlYWN0LnVzZVJlZjxib29sZWFuPih0cnVlKVxuICBjb25zdCBbbG9hZGluZywgc2V0TG9hZGluZ10gPSBSZWFjdC51c2VTdGF0ZSh0cnVlKVxuICBjb25zdCBpbml0aWFsaXplQ3VzdG9tRWRpd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RvblxuICAgICAgICAgIGRhdGEtaWQ9XCJjbG9zZS1idXR0b25cIlxuICAgICAgICAgIGNsYXNzTmFtZT1cImFic29sdXRlIHJpZ2h0LTAgdG9wLTAgbXItMSBtdC0xXCJcbiAgICAgICAgICB2YXJpYW50PVwidGV4dFwiXG4gICAgICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBkaWFsb2dDb250ZXh0LnNldFByb3BzKHtcbiAgICAgICAgICAgICAgb3BlbjogZmFsc2UsXG4gICAgICAgICAgICAgIGNoaWxkcmVuOiBudWxsLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9fVxuICAgICAgICA+XG4gICAgICAgICAgPENsb3NlSWNvbiAvPlxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgIDwvZGl2PlxuICAgICAgPERhcmtEaXZpZGVyIGNsYXNzTmFtZT1cInctZnVsbCBoLW1pblwiIC8+XG4gICAgICA8RGlhbG9nQ29udGVudD5cbiAgICAgICAgPEdyaWRcbiAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICBzcGFjaW5nPXsyfVxuICAgICAgICAgIGp1c3RpZnlDb250ZW50PVwiY2VudGVyXCJcbiAgICAgICAgICBhbGlnbkl0ZW1zPVwiY2VudGVyXCJcbiAgICAgICAgICBjbGFzc05hbWU9XCJtLWF1dG9cIlxuICAgICAgICA+XG4gICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgIDxDdXN0b21MaXN0XG4gICAgICAgICAgICAgIHRpdGxlPVwiQWN0aXZlXCJcbiAgICAgICAgICAgICAgaXRlbXM9e2xlZnR9XG4gICAgICAgICAgICAgIHJlcXVpcmVkQXR0cmlidXRlcz17cmVxdWlyZWRBdHRyaWJ1dGVzfVxuICAgICAgICAgICAgICBsYXp5UmVzdWx0PXtsYXp5UmVzdWx0fVxuICAgICAgICAgICAgICB1cGRhdGVJdGVtcz17c2V0TGVmdH1cbiAgICAgICAgICAgICAgaXNEbkQ9e3RydWV9XG4gICAgICAgICAgICAgIHN0YXJ0T3Zlcj17c3RhcnRPdmVyfVxuICAgICAgICAgICAgICBoYW5kbGVUb2dnbGVBbGw9e2dlbmVyYXRlSGFuZGxlVG9nZ2xlQWxsKHtcbiAgICAgICAgICAgICAgICBzZXRTdGF0ZTogc2V0TGVmdCxcbiAgICAgICAgICAgICAgICBzdGF0ZTogbGVmdCxcbiAgICAgICAgICAgICAgICBkaXNhYmxlZEF0dHJpYnV0ZXM6IHJlcXVpcmVkQXR0cmlidXRlcyxcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgIHRvdGFsUG9zc2libGU9e3RvdGFsUG9zc2libGV9XG4gICAgICAgICAgICAgIG1vZGU9e21vZGV9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICA8R3JpZCBpdGVtPlxuICAgICAgICAgICAgPEdyaWQgY29udGFpbmVyIGRpcmVjdGlvbj1cImNvbHVtblwiIGFsaWduSXRlbXM9XCJjZW50ZXJcIj5cbiAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJtb3ZlLXJpZ2h0LWJ1dHRvblwiXG4gICAgICAgICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJtLTFcIlxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9e21vdmVSaWdodH1cbiAgICAgICAgICAgICAgICBkaXNhYmxlZD17IWhhc0xlZnRDaGVja2VkfVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJtb3ZlIHNlbGVjdGVkIHJpZ2h0XCJcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxSaWdodEFycm93SWNvbiAvPlxuICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJtb3ZlLWxlZnQtYnV0dG9uXCJcbiAgICAgICAgICAgICAgICB2YXJpYW50PVwib3V0bGluZWRcIlxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cIm0tMVwiXG4gICAgICAgICAgICAgICAgb25DbGljaz17bW92ZUxlZnR9XG4gICAgICAgICAgICAgICAgZGlzYWJsZWQ9eyFoYXNSaWdodENoZWNrZWR9XG4gICAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cIm1vdmUgc2VsZWN0ZWQgbGVmdFwiXG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8TGVmdEFycm93SWNvbiAvPlxuICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgIDxDdXN0b21MaXN0XG4gICAgICAgICAgICAgIHRpdGxlPVwiSGlkZGVuXCJcbiAgICAgICAgICAgICAgaXRlbXM9e3JpZ2h0fVxuICAgICAgICAgICAgICBsYXp5UmVzdWx0PXtsYXp5UmVzdWx0fVxuICAgICAgICAgICAgICB1cGRhdGVJdGVtcz17c2V0UmlnaHR9XG4gICAgICAgICAgICAgIGlzRG5EPXtmYWxzZX1cbiAgICAgICAgICAgICAgc3RhcnRPdmVyPXtzdGFydE92ZXJ9XG4gICAgICAgICAgICAgIGhhbmRsZVRvZ2dsZUFsbD17Z2VuZXJhdGVIYW5kbGVUb2dnbGVBbGwoe1xuICAgICAgICAgICAgICAgIHNldFN0YXRlOiBzZXRSaWdodCxcbiAgICAgICAgICAgICAgICBzdGF0ZTogcmlnaHQsXG4gICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICBtb2RlPXttb2RlfVxuICAgICAgICAgICAgICB0b3RhbFBvc3NpYmxlPXt0b3RhbFBvc3NpYmxlfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDwvR3JpZD5cbiAgICAgIDwvRGlhbG9nQ29udGVudD5cbiAgICAgIDxEYXJrRGl2aWRlciBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1taW5cIiAvPlxuICAgICAgPERpYWxvZ0FjdGlvbnM+XG4gICAgICAgIHtoaWRlRW1wdHkgIT09IHVuZGVmaW5lZCAmJiAoXG4gICAgICAgICAgPD5cbiAgICAgICAgICAgIDxGb3JtQ29udHJvbExhYmVsXG4gICAgICAgICAgICAgIGNvbnRyb2w9e1xuICAgICAgICAgICAgICAgIDxTd2l0Y2hcbiAgICAgICAgICAgICAgICAgIGNoZWNrZWQ9e2hpZGVFbXB0eX1cbiAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4gc2V0SGlkZUVtcHR5KGUudGFyZ2V0LmNoZWNrZWQpfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgbGFiZWw9XCJIaWRlIGVtcHR5IGF0dHJpYnV0ZXMgaW4gaW5zcGVjdG9yXCJcbiAgICAgICAgICAgICAgc3R5bGU9e3sgcGFkZGluZ0xlZnQ6ICcxMHB4JyB9fVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDxkaXYgc3R5bGU9e3sgZmxleDogJzEgMCAwJyB9fSAvPlxuICAgICAgICAgIDwvPlxuICAgICAgICApfVxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgZGF0YS1pZD1cImRpYWxvZy1zYXZlLWJ1dHRvblwiXG4gICAgICAgICAgZGlzYWJsZWQ9e21vZGUgPT09ICdzYXZpbmcnfVxuICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgIGRpYWxvZ0NvbnRleHQuc2V0UHJvcHMoe1xuICAgICAgICAgICAgICBvcGVuOiBmYWxzZSxcbiAgICAgICAgICAgICAgY2hpbGRyZW46IG51bGwsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH19XG4gICAgICAgICAgdmFyaWFudD1cInRleHRcIlxuICAgICAgICAgIGNvbG9yPVwic2Vjb25kYXJ5XCJcbiAgICAgICAgICBjbGFzc05hbWU9XCJtci0yXCJcbiAgICAgICAgPlxuICAgICAgICAgIENhbmNlbFxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgPEJ1dHRvblxuICAgICAgICAgIGNsYXNzTmFtZT1cIm1sLTJcIlxuICAgICAgICAgIGRpc2FibGVkPXttb2RlID09PSAnc2F2aW5nJ31cbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBzZXRNb2RlKCdzYXZpbmcnKVxuICAgICAgICAgICAgb25TYXZlKE9iamVjdC5rZXlzKGxlZnQpLCBoaWRlRW1wdHkpXG4gICAgICAgICAgICBkaWFsb2dDb250ZXh0LnNldFByb3BzKHtcbiAgICAgICAgICAgICAgb3BlbjogZmFsc2UsXG4gICAgICAgICAgICAgIGNoaWxkcmVuOiBudWxsLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9fVxuICAgICAgICAgIHZhcmlhbnQ9XCJjb250YWluZWRcIlxuICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgID5cbiAgICAgICAgICBTYXZlXG4gICAgICAgIDwvQnV0dG9uPlxuICAgICAgPC9EaWFsb2dBY3Rpb25zPlxuICAgICAge21vZGUgPT09ICdzYXZpbmcnID8gKFxuICAgICAgICA8TGluZWFyUHJvZ3Jlc3NcbiAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgIGhlaWdodDogJzEwcHgnLFxuICAgICAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICAgICAgICBsZWZ0OiAnMHB4JyxcbiAgICAgICAgICAgIGJvdHRvbTogJzAlJyxcbiAgICAgICAgICB9fVxuICAgICAgICAgIHZhcmlhbnQ9XCJpbmRldGVybWluYXRlXCJcbiAgICAgICAgLz5cbiAgICAgICkgOiBudWxsfVxuICAgIDwvPlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShUcmFuc2Zlckxpc3QpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/tabs/metacard/useCoordinateFormat.d.ts b/src/main/webapp/component/tabs/metacard/useCoordinateFormat.d.ts new file mode 100644 index 00000000000..601fd1e726c --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/useCoordinateFormat.d.ts @@ -0,0 +1,6 @@ +/** + * Provides a hook for converting wkts to the user's preferred + * coordinate format + */ +declare const useCoordinateFormat: () => (value: string) => string; +export default useCoordinateFormat; diff --git a/src/main/webapp/component/tabs/metacard/useCoordinateFormat.js b/src/main/webapp/component/tabs/metacard/useCoordinateFormat.js new file mode 100644 index 00000000000..d4ec682d67e --- /dev/null +++ b/src/main/webapp/component/tabs/metacard/useCoordinateFormat.js @@ -0,0 +1,28 @@ +import { __read } from "tslib"; +import { useState, useEffect } from 'react'; +import { convertWktToPreferredCoordFormat } from './coordinateConverter'; +import { useBackbone } from '../../selection-checkbox/useBackbone.hook'; +import user from '../../singletons/user-instance'; +var FLOATING_POINT_PAIR_REGEX = /[-+]?\d*\.?\d+\s[-+]?\d*\.?\d+/g; +/** + * Returns a function responsible for converting wkts to the user's preferred + * coordinate format + */ +var conversionHigherOrderFunction = function () { return function (value) { + return value.replace(FLOATING_POINT_PAIR_REGEX, convertWktToPreferredCoordFormat); +}; }; +/** + * Provides a hook for converting wkts to the user's preferred + * coordinate format + */ +var useCoordinateFormat = function () { + var _a = __read(useState(conversionHigherOrderFunction), 2), convert = _a[0], setConverter = _a[1]; + var listenTo = useBackbone().listenTo; + useEffect(function () { + var callback = function () { return setConverter(conversionHigherOrderFunction); }; + listenTo(user.get('user').get('preferences'), 'change:coordinateFormat', callback); + }, []); + return convert; +}; +export default useCoordinateFormat; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQ29vcmRpbmF0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cgd2t0cyB0byB0aGUgdXNlcidzIHByZWZlcnJlZFxuICogY29vcmRpbmF0ZSBmb3JtYXRcbiAqL1xuY29uc3QgdXNlQ29vcmRpbmF0ZUZvcm1hdCA9ICgpID0+IHtcbiAgY29uc3QgW2NvbnZlcnQsIHNldENvbnZlcnRlcl0gPSB1c2VTdGF0ZShjb252ZXJzaW9uSGlnaGVyT3JkZXJGdW5jdGlvbilcbiAgY29uc3QgeyBsaXN0ZW5UbyB9ID0gdXNlQmFja2JvbmUoKVxuXG4gIHVzZUVmZmVjdCgoKSA9PiB7XG4gICAgY29uc3QgY2FsbGJhY2sgPSAoKSA9PiBzZXRDb252ZXJ0ZXIoY29udmVyc2lvbkhpZ2hlck9yZGVyRnVuY3Rpb24pXG5cbiAgICBsaXN0ZW5UbyhcbiAgICAgIHVzZXIuZ2V0KCd1c2VyJykuZ2V0KCdwcmVmZXJlbmNlcycpLFxuICAgICAgJ2NoYW5nZTpjb29yZGluYXRlRm9ybWF0JyxcbiAgICAgIGNhbGxiYWNrXG4gICAgKVxuICB9LCBbXSlcblxuICByZXR1cm4gY29udmVydFxufVxuXG5leHBvcnQgZGVmYXVsdCB1c2VDb29yZGluYXRlRm9ybWF0XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/theme/background-inheriting-div.d.ts b/src/main/webapp/component/theme/background-inheriting-div.d.ts new file mode 100644 index 00000000000..dde58576c43 --- /dev/null +++ b/src/main/webapp/component/theme/background-inheriting-div.d.ts @@ -0,0 +1,3 @@ +import * as React from 'react'; +declare const _default: (props: React.DetailedHTMLProps, HTMLDivElement>) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/theme/background-inheriting-div.js b/src/main/webapp/component/theme/background-inheriting-div.js new file mode 100644 index 00000000000..32acf36bb17 --- /dev/null +++ b/src/main/webapp/component/theme/background-inheriting-div.js @@ -0,0 +1,27 @@ +import { __assign, __read, __rest } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +/** + * CSS is a bit lacking when it comes to inheriting backgrounds, so this let's the dev do so a bit easier + */ +var BackgroundInheritingDiv = function (props) { + var style = props.style, otherProps = __rest(props, ["style"]); + var divRef = React.useRef(null); + var _a = __read(React.useState(null), 2), background = _a[0], setBackground = _a[1]; + React.useEffect(function () { + if (divRef.current) { + var parentColor = divRef.current; + while (typeof parentColor !== 'string' && + !parentColor.classList.contains('MuiPaper-root')) { + if (parentColor.parentElement) + parentColor = parentColor.parentElement; + } + if (typeof parentColor !== 'string') { + setBackground(getComputedStyle(parentColor).backgroundColor); + } + } + }, []); + return (React.createElement("div", __assign({}, otherProps, { ref: divRef, style: __assign(__assign({}, style), (background ? { background: background } : {})) }))); +}; +export default hot(module)(BackgroundInheritingDiv); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFja2dyb3VuZC1pbmhlcml0aW5nLWRpdi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdGhlbWUvYmFja2dyb3VuZC1pbmhlcml0aW5nLWRpdi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUV0Qzs7R0FFRztBQUNILElBQU0sdUJBQXVCLEdBQUcsVUFBQyxLQUFrQztJQUN6RCxJQUFBLEtBQUssR0FBb0IsS0FBSyxNQUF6QixFQUFLLFVBQVUsVUFBSyxLQUFLLEVBQWhDLFNBQXdCLENBQUYsQ0FBVTtJQUN0QyxJQUFNLE1BQU0sR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFpQixJQUFJLENBQUMsQ0FBQTtJQUMzQyxJQUFBLEtBQUEsT0FBOEIsS0FBSyxDQUFDLFFBQVEsQ0FBQyxJQUF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KFxuICAgIDxkaXZcbiAgICAgIHsuLi5vdGhlclByb3BzfVxuICAgICAgcmVmPXtkaXZSZWZ9XG4gICAgICBzdHlsZT17e1xuICAgICAgICAuLi5zdHlsZSxcbiAgICAgICAgLi4uKGJhY2tncm91bmQgPyB7IGJhY2tncm91bmQgfSA6IHt9KSxcbiAgICAgIH19XG4gICAgLz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShCYWNrZ3JvdW5kSW5oZXJpdGluZ0RpdilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/theme/theme.d.ts b/src/main/webapp/component/theme/theme.d.ts new file mode 100644 index 00000000000..36af39f59dd --- /dev/null +++ b/src/main/webapp/component/theme/theme.d.ts @@ -0,0 +1,30 @@ +/// +type Theme = { + primary: string; + secondary: string; + background: string; + navbar: string; + panels: string; + overlays: string; + paper: string; + tabs: string; +}; +export declare const dark: Theme; +export declare const light: Theme; +export declare const Elevations: { + navbar: number; + background: number; + paper: number; + panels: number; + overlays: number; +}; +export declare const MuiOutlinedInputBorderClasses = "px-[14px] py-[8.5px] border rounded dark:border-white/20 border-black/20 dark:hover:border-white hover:border-black"; +declare module '@mui/material' { + interface ButtonPropsColorOverrides { + grey: true; + } +} +export declare const Provider: ({ children }: { + children: any; +}) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/theme/theme.js b/src/main/webapp/component/theme/theme.js new file mode 100644 index 00000000000..90aa9e3472b --- /dev/null +++ b/src/main/webapp/component/theme/theme.js @@ -0,0 +1,319 @@ +import { __assign, __makeTemplateObject } from "tslib"; +import * as React from 'react'; +import { createTheme, ThemeProvider, StyledEngineProvider, darken, lighten, alpha, } from '@mui/material/styles'; +import { ThemeContext } from 'styled-components'; +import { createGlobalStyle } from 'styled-components'; +import { meetsContrastGuidelines } from 'polished'; +import { useRemoveFocusStyle } from '../app/blueprint.adjust'; +// // octo colors +// export const dark: Theme = { +// background: '#F38832', +// navbar: '#2B3A49', +// panels: '#3A4A54', +// overlays: '#475A66', +// paper: '#213137', +// primary: '#589dd5', +// secondary: '#589dd5', +// } +export var dark = { + background: '#0B1821', + navbar: darken('#365160', 0.2), + panels: '#243540', + overlays: darken('#365160', 0.1), + paper: darken('#365160', 0.2), + tabs: darken('#243540', 0.3), + primary: '#69E1E8', + secondary: '#2196f3', +}; +export var light = { + primary: '#3c6dd5', + secondary: '#2196f3', + background: '#E5E5E5', + navbar: '#fafbfc', + panels: '#FCFCFC', + tabs: darken('#FCFCFC', 0.05), + overlays: '#FCFCFC', + paper: '#FCFCFC', +}; +export var Elevations = { + navbar: 8, + background: 0, + paper: 2, + panels: 6, + overlays: 16, +}; +export var MuiOutlinedInputBorderClasses = 'px-[14px] py-[8.5px] border rounded dark:border-white/20 border-black/20 dark:hover:border-white hover:border-black'; +var GlobalStyles = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .ol-overlaycontainer-stopevent {\n display: none;\n }\n a {\n color: inherit !important;\n }\n *.outline-none, a.outline-none, a, button{\n outline: none !important; \n }\n span.highlight {\n background-color: rgba(66, 110, 203, 0.40);\n }\n .MuiToolbar-root a,\n .MuiToolbar-root .MuiBreadcrumbs-separator {\n color: ", ";\n }\n .MuiDrawer-root a {\n color: ", ";\n }\n .MuiTooltip-tooltip {\n max-width: 50vw;\n padding: 0px;\n background-color: none;\n }\n .MuiFormControlLabel-labelPlacementStart {\n margin-left: 0px;\n }\n @media (min-width: 600px) {\n .MuiListItemIcon-root {\n margin-left: 8px;\n }\n }\n .lm_goldenlayout, .lm_content {\n background: inherit;\n }\n .lm_splitter {\n background: ", ";\n opacity: 1;\n }\n .lm_splitter:hover {\n background: ", " !important;\n }\n .lm_stack{\n box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12);\n background: ", " !important;\n border-radius: 4px;\n transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n .lm_header {\n z-index: 0 !important;\n background: ", " !important;\n }\n .lm_tab.lm_active {\n background: ", " !important;\n box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12) !important;\n }\n .lm_tab, lm_tabs {\n border-radius: 4px !important;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: 0px !important;\n }\n .lm_tab:not(.lm_active) {\n color: ", " !important;\n background: ", " !important;\n button {\n visibility: hidden;\n }\n }\n .lm_tabs .lm_tab {\n border: 1px solid fade(@contrastColor, 10%);\n margin-right: 8px !important;\n box-shadow: none !important;\n padding: 0px !important;\n height: 44px !important;\n minWidth: 44px !important;\n }\n .lm_tabs .lm_tab:hover {\n color: ", " !important;\n }\n .lm_header,\n .lm_tabs .lm_tab,\n .lm_tabdropdown:before {\n color: ", " !important;\n }\n .is-drawing [role=\"tooltip\"], .is-drawing .MuiPopover-root {\n display: none!important;\n }\n [role=\"tooltip\"] {\n z-index: 101 !important;\n pointer-events: all !important;\n }\n .bp3-portal {\n z-index: 101 !important;\n }\n .bp3-popover-wrapper,.bp3-popover-target, .bp3-control-group {\n width: 100%;\n }\n .bp3-control-group {\n flex-wrap: wrap;\n }\n .bp3-control-group > div:first-of-type::after {\n content: 'and';\n display:block;\n position: absolute;\n left: 14px;\n bottom: -25px;\n }\n .bp3-control-group > div:nth-of-type(2) {\n margin-top: 30px;\n }\n .bp3-input-group input {\n background: transparent !important; \n box-shadow: none !important;\n font-size: 1.1428571428571428rem !important;\n padding: 0px !important;\n height: 1.3125rem !important;\n line-height: 1.15 !important;\n }\n .bp3-popover .bp3-popover-content, .bp3-popover .bp3-popover-content, .bp3-datepicker, .bp3-menu{\n background: ", " !important;\n }\n .bp3-popover-arrow {\n display: none !important;\n }\n .bp3-datepicker .DayPicker-Day.DayPicker-Day--selected, .bp3-active {\n background-color: ", " !important;\n }\n .bp3-table-quadrant, .bp3-table-cell-client, .bp3-table-row-headers {\n background: inherit !important;\n }\n // for whatever reason they have a height of 0 sometimes, maybe MUI will fix this in v5\n textarea.MuiInputBase-input {\n min-height: 21px;\n }\n .MuiPaper-box-shadow {\n box-shadow: 0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12);\n }\n .MuiPaper-elevation0 {\n background-color: ", ";\n }\n .MuiPaper-elevation8 {\n background-color: ", ";\n }\n .MuiPaper-elevation6 {\n background-color: ", ";\n }\n .MuiPaper-elevation16 {\n background-color: ", ";\n }\n .MuiPaper-elevation2 {\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n background-color: ", ";\n }\n [data-behavior-dropdown] {\n background-color: ", ";\n }\n .font-awesome-span {\n && {\n font-size: 1.4rem;\n font-family: 'Open Sans', arial, sans-serif;\n }\n /* stylelint-disable */\n &::before {\n font-family: 'FontAwesome';\n margin-left: 2px;\n margin-right: 5px;\n }\n }\n ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n ::-webkit-scrollbar-track {\n background: ", ";\n }\n ::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n // fix an issue where focus is applied because of blueprint to popover papers\n .MuiPaper-root:focus { \n outline: none;\n }\n // Fix Mui styles \n .MuiButton-endIcon {\n margin-left: 0px;\n margin-right: 0px;\n }\n .MuiButton-iconSizeSmall > svg {\n font-size: 18px;\n margin-top: 1px;\n }\n // Mui tailwind style\n .Mui-icon-size-small {\n font-size: 18px;\n }\n [disabled] .Mui-text-text-primary,\n [disabled] .Mui-text-primary,\n [disabled] .Mui-text-secondary {\n color: ", ";\n }\n .Mui-text-text-primary {\n color: ", ";\n }\n .Mui-text-primary {\n color: ", ";\n }\n .Mui-text-secondary {\n color: ", ";\n }\n .Mui-text-warning {\n color: ", ";\n }\n .Mui-text-error {\n color: ", ";\n }\n .Mui-bg-default {\n background-color: ", ";\n }\n .Mui-bg-primary {\n background-color: ", ";\n }\n .Mui-bg-secondary {\n background-color: ", ";\n }\n .Mui-bg-divider {\n background-color: ", ";\n }\n .Mui-border-divider {\n border-color: ", ";\n }\n .Mui-bg-button:hover,\n .Mui-bg-button:focus-within {\n background: ", ";\n }\n .theme-bg-overlays {\n background: ", ";\n }\n .children-max-h-full {\n > * {\n max-height: 100%;\n }\n }\n .children-h-full {\n > * {\n height: 100%;\n }\n }\n .children-block {\n > * {\n display: block;\n }\n }\n .children-p-0 {\n > * {\n padding: 0px;\n }\n }\n // idea is to have this track with subtracting margin / padding\n .max-w-full-1 {\n max-width: calc(100% - 2*0.25rem);\n }\n .max-w-full-2 {\n max-width: calc(100% - 2*0.5rem);\n }\n .max-w-full-3 {\n max-width: calc(100% - 2*0.75rem);\n }\n .max-w-full-4 {\n max-width: calc(100% - 2*1rem);\n }\n .min-w-32 {\n min-width: 8rem;\n }\n .min-w-16\t{\n min-width: 4rem;\n }\n "], ["\n .ol-overlaycontainer-stopevent {\n display: none;\n }\n a {\n color: inherit !important;\n }\n *.outline-none, a.outline-none, a, button{\n outline: none !important; \n }\n span.highlight {\n background-color: rgba(66, 110, 203, 0.40);\n }\n .MuiToolbar-root a,\n .MuiToolbar-root .MuiBreadcrumbs-separator {\n color: ", ";\n }\n .MuiDrawer-root a {\n color: ", ";\n }\n .MuiTooltip-tooltip {\n max-width: 50vw;\n padding: 0px;\n background-color: none;\n }\n .MuiFormControlLabel-labelPlacementStart {\n margin-left: 0px;\n }\n @media (min-width: 600px) {\n .MuiListItemIcon-root {\n margin-left: 8px;\n }\n }\n .lm_goldenlayout, .lm_content {\n background: inherit;\n }\n .lm_splitter {\n background: ", ";\n opacity: 1;\n }\n .lm_splitter:hover {\n background: ", " !important;\n }\n .lm_stack{\n box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12);\n background: ", " !important;\n border-radius: 4px;\n transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n .lm_header {\n z-index: 0 !important;\n background: ", " !important;\n }\n .lm_tab.lm_active {\n background: ", " !important;\n box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12) !important;\n }\n .lm_tab, lm_tabs {\n border-radius: 4px !important;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: 0px !important;\n }\n .lm_tab:not(.lm_active) {\n color: ", " !important;\n background: ", " !important;\n button {\n visibility: hidden;\n }\n }\n .lm_tabs .lm_tab {\n border: 1px solid fade(@contrastColor, 10%);\n margin-right: 8px !important;\n box-shadow: none !important;\n padding: 0px !important;\n height: 44px !important;\n minWidth: 44px !important;\n }\n .lm_tabs .lm_tab:hover {\n color: ", " !important;\n }\n .lm_header,\n .lm_tabs .lm_tab,\n .lm_tabdropdown:before {\n color: ", " !important;\n }\n .is-drawing [role=\"tooltip\"], .is-drawing .MuiPopover-root {\n display: none!important;\n }\n [role=\"tooltip\"] {\n z-index: 101 !important;\n pointer-events: all !important;\n }\n .bp3-portal {\n z-index: 101 !important;\n }\n .bp3-popover-wrapper,.bp3-popover-target, .bp3-control-group {\n width: 100%;\n }\n .bp3-control-group {\n flex-wrap: wrap;\n }\n .bp3-control-group > div:first-of-type::after {\n content: 'and';\n display:block;\n position: absolute;\n left: 14px;\n bottom: -25px;\n }\n .bp3-control-group > div:nth-of-type(2) {\n margin-top: 30px;\n }\n .bp3-input-group input {\n background: transparent !important; \n box-shadow: none !important;\n font-size: 1.1428571428571428rem !important;\n padding: 0px !important;\n height: 1.3125rem !important;\n line-height: 1.15 !important;\n }\n .bp3-popover .bp3-popover-content, .bp3-popover .bp3-popover-content, .bp3-datepicker, .bp3-menu{\n background: ", " !important;\n }\n .bp3-popover-arrow {\n display: none !important;\n }\n .bp3-datepicker .DayPicker-Day.DayPicker-Day--selected, .bp3-active {\n background-color: ", " !important;\n }\n .bp3-table-quadrant, .bp3-table-cell-client, .bp3-table-row-headers {\n background: inherit !important;\n }\n // for whatever reason they have a height of 0 sometimes, maybe MUI will fix this in v5\n textarea.MuiInputBase-input {\n min-height: 21px;\n }\n .MuiPaper-box-shadow {\n box-shadow: 0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12);\n }\n .MuiPaper-elevation0 {\n background-color: ", ";\n }\n .MuiPaper-elevation8 {\n background-color: ", ";\n }\n .MuiPaper-elevation6 {\n background-color: ", ";\n }\n .MuiPaper-elevation16 {\n background-color: ", ";\n }\n .MuiPaper-elevation2 {\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n background-color: ", ";\n }\n [data-behavior-dropdown] {\n background-color: ", ";\n }\n .font-awesome-span {\n && {\n font-size: 1.4rem;\n font-family: 'Open Sans', arial, sans-serif;\n }\n /* stylelint-disable */\n &::before {\n font-family: 'FontAwesome';\n margin-left: 2px;\n margin-right: 5px;\n }\n }\n ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n ::-webkit-scrollbar-track {\n background: ", ";\n }\n ::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n // fix an issue where focus is applied because of blueprint to popover papers\n .MuiPaper-root:focus { \n outline: none;\n }\n // Fix Mui styles \n .MuiButton-endIcon {\n margin-left: 0px;\n margin-right: 0px;\n }\n .MuiButton-iconSizeSmall > svg {\n font-size: 18px;\n margin-top: 1px;\n }\n // Mui tailwind style\n .Mui-icon-size-small {\n font-size: 18px;\n }\n [disabled] .Mui-text-text-primary,\n [disabled] .Mui-text-primary,\n [disabled] .Mui-text-secondary {\n color: ", ";\n }\n .Mui-text-text-primary {\n color: ", ";\n }\n .Mui-text-primary {\n color: ", ";\n }\n .Mui-text-secondary {\n color: ", ";\n }\n .Mui-text-warning {\n color: ", ";\n }\n .Mui-text-error {\n color: ", ";\n }\n .Mui-bg-default {\n background-color: ", ";\n }\n .Mui-bg-primary {\n background-color: ", ";\n }\n .Mui-bg-secondary {\n background-color: ", ";\n }\n .Mui-bg-divider {\n background-color: ", ";\n }\n .Mui-border-divider {\n border-color: ", ";\n }\n .Mui-bg-button:hover,\n .Mui-bg-button:focus-within {\n background: ", ";\n }\n .theme-bg-overlays {\n background: ", ";\n }\n .children-max-h-full {\n > * {\n max-height: 100%;\n }\n }\n .children-h-full {\n > * {\n height: 100%;\n }\n }\n .children-block {\n > * {\n display: block;\n }\n }\n .children-p-0 {\n > * {\n padding: 0px;\n }\n }\n // idea is to have this track with subtracting margin / padding\n .max-w-full-1 {\n max-width: calc(100% - 2*0.25rem);\n }\n .max-w-full-2 {\n max-width: calc(100% - 2*0.5rem);\n }\n .max-w-full-3 {\n max-width: calc(100% - 2*0.75rem);\n }\n .max-w-full-4 {\n max-width: calc(100% - 2*1rem);\n }\n .min-w-32 {\n min-width: 8rem;\n }\n .min-w-16\t{\n min-width: 4rem;\n }\n "])), function (props) { + return props.palette.getContrastText(props.palette.primary.main); +}, function (props) { + return props.palette.getContrastText(props.palette.background.paper); +}, function (props) { return props.palette.background.default; }, function (props) { return props.palette.primary.main; }, function (props) { + return props.palette.mode === 'dark' + ? dark.panels + : light.panels; +}, function (props) { + return props.palette.mode === 'dark' + ? dark.background + : light.background; +}, function (props) { + return props.palette.mode === 'dark' + ? dark.panels + : light.panels; +}, function (props) { + return props.palette.mode === 'dark' + ? props.palette.text.secondary + : props.palette.text.secondary; +}, function (props) { + return props.palette.mode === 'dark' ? dark.tabs : light.tabs; +}, function (props) { return props.palette.text.primary; }, function (props) { return props.palette.text.primary; }, function (props) { return props.palette.background.paper; }, function (props) { return props.palette.primary.dark; }, function (props) { + return props.palette.mode === 'dark' ? dark.background : light.background; +}, function (props) { + return props.palette.mode === 'dark' ? dark.navbar : light.navbar; +}, function (props) { + return props.palette.mode === 'dark' ? dark.panels : light.panels; +}, function (props) { + return props.palette.mode === 'dark' ? dark.overlays : light.overlays; +}, function (props) { + return props.palette.mode === 'dark' + ? props.palette.divider + : props.palette.divider; +}, function (props) { + return props.palette.mode === 'dark' ? dark.paper : light.paper; +}, function (props) { + return props.palette.mode === 'dark' ? dark.overlays : light.overlays; +}, function (props) { + return props.palette.mode === 'dark' + ? 'rgb(30, 44, 53)' + : 'rgb(229, 229, 229)'; +}, function (props) { + return props.palette.mode === 'dark' + ? 'linear-gradient(-180deg, rgb(229, 229, 229) 0%, rgb(206, 206, 206) 100%)' + : 'linear-gradient(-180deg, rgb(153, 153, 153) 0%, rgb(187, 187, 187) 100%)'; +}, function (props) { + return props.palette.mode === 'dark' + ? 'rgba(255, 255, 255, 0.3)' + : 'rgba(0, 0, 0, 0.26)'; +}, function (props) { return props.palette.text.primary; }, function (props) { return props.palette.primary.main; }, function (props) { return props.palette.secondary.main; }, function (props) { return props.palette.warning.main; }, function (props) { return props.palette.error.main; }, function (props) { return props.palette.background.default; }, function (props) { return props.palette.primary.main; }, function (props) { return props.palette.secondary.main; }, function (props) { return props.palette.divider; }, function (props) { return props.palette.divider; }, function (props) { + return props.palette.mode === 'dark' + ? 'rgba(255, 255, 255, 0.08)' + : 'rgba(0, 0, 0, 0.04)'; +}, function (props) { + return props.palette.mode === 'dark' ? dark.overlays : light.overlays; +}); +var lightenUntilContrasting = function (color, background) { + var passes = meetsContrastGuidelines(color, background); + if (passes.AA) { + return color; + } + return lightenUntilContrasting(lighten(color, 0.1), background); +}; +var darkenUntilContrasting = function (color, background) { + var passes = meetsContrastGuidelines(color, background); + if (passes.AA) { + return color; + } + return darkenUntilContrasting(darken(color, 0.1), background); +}; +export var Provider = function (_a) { + var children = _a.children; + var styledTheme = React.useContext(ThemeContext); + var darkMode = styledTheme.theme === 'dark'; + var paperColor = darkMode ? dark.paper : light.paper; + var backgroundColor = darkMode ? dark.background : light.background; + var customPalette = styledTheme.palette === 'custom' && + styledTheme.primary && + styledTheme.secondary; + var primaryMain = customPalette + ? styledTheme.primary + : darkMode + ? dark.primary + : light.primary; + var secondaryMain = customPalette + ? styledTheme.secondary + : darkMode + ? dark.secondary + : light.secondary; + var primaryContrastScores = meetsContrastGuidelines(paperColor, primaryMain); + var secondaryContrastScores = meetsContrastGuidelines(paperColor, secondaryMain); + var failedContrastPrimaryReplacement = darkMode + ? lightenUntilContrasting(primaryMain, paperColor) + : darkenUntilContrasting(primaryMain, paperColor); + var failedContrastSecondaryReplacement = darkMode + ? lightenUntilContrasting(secondaryMain, paperColor) + : darkenUntilContrasting(secondaryMain, paperColor); + /** + * Specify theme settings that don't need variables from theme + * + * We do things like the typography here because otherwise the defaults get applied to each individual typography component, + * meaning we'd have to specify overrides for each one. + */ + var initialTheme = createTheme({ + palette: { + mode: darkMode ? 'dark' : 'light', + primary: { + main: primaryMain, + }, + secondary: { + main: secondaryMain, + }, + background: { + default: backgroundColor, + paper: paperColor, + }, + grey: { + // We do this to emulate v4 MUI behavior for default button color + // @ts-ignore + main: '#fff', + }, + }, + // Typography must be set here to ensure all components use the same font + typography: { + fontFamily: "'Open Sans', arial, sans-serif", + button: { + textTransform: 'none', + }, + }, + zIndex: { + mobileStepper: 101, + appBar: 101, + drawer: 101, + modal: 101, + snackbar: 101, + tooltip: 101, + fab: 101, + speedDial: 101, + }, + }); + /** + * We split these out to so that we can access theme variables within our custom theme + */ + var themeBasedTheme = { + components: { + MuiChip: { + styleOverrides: { + root: { + fontSize: '1rem', + }, + }, + }, + MuiButton: { + defaultProps: { + size: 'small', + color: 'grey', + }, + variants: [ + { + props: { variant: 'contained', color: 'grey' }, + style: { + color: initialTheme.palette.getContrastText(initialTheme.palette.grey[300]), + }, + }, + { + props: { variant: 'outlined', color: 'grey' }, + style: { + color: initialTheme.palette.text.primary, + borderColor: initialTheme.palette.mode === 'light' + ? 'rgba(0, 0, 0, 0.23)' + : 'rgba(255, 255, 255, 0.23)', + '&.Mui-disabled': { + border: "1px solid ".concat(initialTheme.palette.action.disabledBackground), + }, + '&:hover': { + borderColor: initialTheme.palette.mode === 'light' + ? 'rgba(0, 0, 0, 0.23)' + : 'rgba(255, 255, 255, 0.23)', + backgroundColor: alpha(initialTheme.palette.text.primary, initialTheme.palette.action.hoverOpacity), + }, + }, + }, + { + props: { color: 'grey', variant: 'text' }, + style: { + color: initialTheme.palette.text.primary, + '&:hover': { + backgroundColor: alpha(initialTheme.palette.text.primary, initialTheme.palette.action.hoverOpacity), + }, + }, + }, + ], + styleOverrides: __assign(__assign({ root: { + lineHeight: 'inherit', + minWidth: '0px', // usually more annoying than not + } }, (primaryContrastScores.AA + ? { textPrimary: {} } // weird requirement due to types, need textPrimary here but empty + : { + textPrimary: { + color: failedContrastPrimaryReplacement, + '&:hover': { + backgroundColor: alpha(failedContrastPrimaryReplacement, 0.1), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent', + }, + }, + }, + })), (secondaryContrastScores.AA + ? { textSecondary: {} } // weird requirement due to types, need textPrimary here but empty + : { + textSecondary: { + color: failedContrastSecondaryReplacement, + '&:hover': { + backgroundColor: alpha(failedContrastSecondaryReplacement, 0.1), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent', + }, + }, + }, + })), + }, + MuiCardActionArea: { + styleOverrides: { + root: { + height: 'auto', + }, + }, + }, + MuiCardHeader: { + styleOverrides: { + content: { + minWidth: '0px', + }, + }, + }, + MuiPaper: { + styleOverrides: { + root: { backgroundImage: 'unset' }, + }, + }, + MuiTooltip: { + styleOverrides: { + tooltip: { + fontSize: '1rem', + }, + }, + }, + }, + }; + var theme = createTheme(initialTheme, themeBasedTheme); + React.useEffect(function () { + var htmlElement = document.querySelector('html'); + if (styledTheme.theme === 'dark') { + htmlElement.classList.add('bp3-dark'); + htmlElement.classList.add('theme-dark'); + htmlElement.classList.add('dark'); + } + else { + htmlElement.classList.remove('bp3-dark'); + htmlElement.classList.remove('theme-dark'); + htmlElement.classList.remove('dark'); + } + }, [styledTheme.theme]); + useRemoveFocusStyle(); + return (React.createElement(React.Fragment, null, + React.createElement(GlobalStyles, __assign({}, theme)), + React.createElement(StyledEngineProvider, { injectFirst: true }, + React.createElement(ThemeProvider, { theme: theme }, children)))); +}; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3RoZW1lL3RoZW1lLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUNMLFdBQVcsRUFDWCxhQUFhLEVBQ2Isb0JBQW9CLEVBQ3BCLE1BQU0sRUFJTixPQUFPLEVBQ1AsS0FBSyxHQUVOLE1BQU0sc0JBQXNCLENBQUE7QUFDN0IsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBQ2hELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBQ3JELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUNsRCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQTtBQWE3RCxpQkFBaUI7QUFDakIsK0JBQStCO0FBQy9CLDJCQUEyQjtBQUMzQix1QkFBdUI7QUFDdkIsdUJBQXVCO0FBQ3ZCLHlCQUF5QjtBQUN6QixzQkFBc0I7QUFDdEIsd0JBQXdCO0FBQ3hCLDBCQUEwQjtBQUMxQixJQUFJO0FBRUosTUFBTSxDQUFDLElBQU0sSUFBSSxHQUFVO0lBQ3pCLFVBQVUsRUFBRSxTQUFTO0lBQ3JCLE1BQU0sRUFBRSxNQUFNLENBQUMsU0FBUyxFQUFFLEdBQUcsQ0FBQztJQUM5QixNQUFNLEVBQUUsU0FBUztJQUNqQixRQUFRLEVBQUU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gICAgIHByb3BzLnBhbGV0dGUuZ2V0Q29udHJhc3RUZXh0KHByb3BzLnBhbGV0dGUuYmFja2dyb3VuZC5wYXBlcil9O1xuICAgICAgfVxuICAgICAgLk11aVRvb2x0aXAtdG9vbHRpcCB7XG4gICAgICAgIG1heC13aWR0aDogNTB2dztcbiAgICAgICAgcGFkZGluZzogMHB4O1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiBub25lO1xuICAgICAgfVxuICAgICAgLk11aUZvcm1Db250cm9sTGFiZWwtbGFiZWxQbGFjZW1lbnRTdGFydCB7XG4gICAgICAgIG1hcmdpbi1sZWZ0OiAwcHg7XG4gICAgICB9XG4gICAgICBAbWVkaWEgKG1pbi13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgLk11aUxpc3RJdGVtSWNvbi1yb290IHtcbiAgICAgICAgICBtYXJnaW4tbGVmdDogOHB4O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAubG1fZ29sZGVubGF5b3V0LCAubG1fY29udGVudCB7XG4gICAgICAgIGJhY2tncm91bmQ6IGluaGVyaXQ7XG4gICAgICB9XG4gICAgICAubG1fc3BsaXR0ZXIgIHtcbiAgICAgICAgYmFja2dyb3VuZDogJHsocHJvcHMpID0+IHByb3BzLnBhbGV0dGUuYmFja2dyb3VuZC5kZWZhdWx0fTtcbiAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgIH1cbiAgICAgIC5sbV9zcGxpdHRlcjpob3ZlciAge1xuICAgICAgICBiYWNrZ3JvdW5kOiAkeyhwcm9wcykgPT4gcHJvcHMucGFsZXR0ZS5wcmltYXJ5Lm1haW59ICFpbXBvcnRhbnQ7XG4gICAgICB9XG4gICAgICAubG1fc3RhY2t7XG4gICAgICAgIGJveC1zaGFkb3c6IDBweCAycHggMXB4IC0xcHggcmdiYSgwLDAsMCwwLjIpLCAwcHggMXB4IDFweCAwcHggcmdiYSgwLDAsMCwwLjE0KSwgMHB4IDFweCAzcHggMHB4IHJnYmEoMCwwLDAsMC4xMik7XG4gICAgICAgIGJhY2tncm91bmQ6ICR7KHByb3BzKSA9PlxuICAgICAgICAgIHByb3BzLnBhbGV0dGUubW9kZSA9PT0gJ2RhcmsnXG4gICAgICAgICAgICA/IGRhcmsucGFuZWxzXG4gICAgICAgICAgICA6IGxpZ2h0LnBhbmVsc30gIWltcG9ydGFudDtcbiAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xuICAgICAgICB0cmFuc2l0aW9uOiBib3gtc2hhZG93IDMwMG1zIGN1YmljLWJlemllcigwLjQsIDAsIDAuMiwgMSkgMG1zO1xuICAgICAgfVxuICAgICAgLmxtX2hlYWRlciB7XG4gICAgICAgIHotaW5kZXg6IDAgIWltcG9ydGFudDtcbiAgICAgICAgYmFja2dyb3VuZDogJHsocHJvcHMpID0+XG4gICAgICAgICAgcHJvcHMucGFsZXR0ZS5tb2RlID09PSAnZGFyaydcbiAgICAgICAgICAgID8gZGFyay5iYWNrZ3JvdW5kXG4gICAgICAgICAgICA6IGxpZ2h0LmJhY2tncm91bmR9ICFpbXBvcnRhbnQ7XG4gICAgICB9XG4gICAgICAubG1fdGFiLmxtX2FjdGl2ZSB7XG4gICAgICAgIGJhY2tncm91bmQ6ICR7KHByb3BzKSA9PlxuICAgICAgICAgIHByb3BzLnBhbGV0dGUubW9kZSA9PT0gJ2RhcmsnXG4gICAgICAgICAgICA/IGRhcmsucGFuZWxzXG4gICAgICAgICAgICA6IGxpZ2h0LnBhbmVsc30gIWltcG9ydGFudDtcbiAgICAgICAgICAgIGJveC1zaGFkb3c6IDBweCAycHggMXB4IC0xcHggcmdiYSgwLDAsMCwwLjIpLCAwcHggMXB4IDFweCAwcHggcmdiYSgwLDAsMCwwLjE0KSwgMHB4IDFweCAzcHggMHB4IHJnYmEoMCwwLDAsMC4xMikgIWltcG9ydGFudDtcbiAgICAgIH1cbiAgICAgIC5sbV90YWIsIGxtX3RhYnMge1xuICAgICAgICBib3JkZXItcmFkaXVzOiA0cHggIWltcG9ydGF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sZXR0ZS50ZXh0LnByaW1hcnl9ICFpbXBvcnRhbnQ7XG4gICAgICB9XG4gICAgICAubG1faGVhZGVyLFxuICAgICAgLmxtX3RhYnMgLmxtX3RhYixcbiAgICAgIC5sbV90YWJkcm9wZG93bjpiZWZvcmUge1xuICAgICAgICBjb2xvcjogJHsocHJvcHMpID0+IHByb3BzLnBhbGV0dGUudGV4dC5wcmltYXJ5fSAhaW1wb3J0YW50O1xuICAgICAgfVxuICAgICAgLmlzLWRyYXdpbmcgW3JvbGU9XCJ0b29sdGlwXCJdLCAuaXMtZHJhd2luZyAuTXVpUG9wb3Zlci1yb290IHtcbiAgICAgICAgZGlzcGxheTogbm9uZSFpbXBvcnRhbnQ7XG4gICAgICB9XG4gICAgICBbcm9sZT1cInRvb2x0aXBcIl0ge1xuICAgICAgICB6LWluZGV4OiAxMDEgIWltcG9ydGFudDtcbiAgICAgICAgcG9pbnRlci1ldmVudHM6IGFsbCAhaW1wb3J0YW50O1xuICAgICAgfVxuICAgICAgLmJwMy1wb3J0YWwge1xuICAgICAgICB6LWluZGV4OiAxMDEgIWltcG9ydGFudDtcbiAgICAgIH1cbiAgICAgIC5icDMtcG9wb3Zlci13cmFwcGVyLC5icDMtcG9wb3Zlci10YXJnZXQsIC5icDMtY29udHJvbC1ncm91cCB7XG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgfVxuICAgICAgLmJwMy1jb250cm9sLWdyb3VwIHtcbiAgICAgICAgZmxleC13cmFwOiB3cmFwO1xuICAgICAgfVxuICAgICAgLmJwMy1jb250cm9sLWdyb3VwID4gZGl2OmZpcnN0LW9mLXR5cGU6OmFmdGVyIHtcbiAgICAgICAgY29udGVudDogJ2FuZCc7XG4gICAgICAgIGRpc3BsYXk6YmxvY2s7XG4gICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICAgICAgbGVmdDogMTRweDtcbiAgICAgICAgYm90dG9tOiAtMjVweDtcbiAgICAgIH1cbiAgICAgIC5icDMtY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ycgPyBkYXJrLnBhbmVscyA6IGxpZ2h0LnBhbmVsc307XG4gICAgICB9XG4gICAgICAuTXVpUGFwZXItZWxldmF0aW9uMTYge1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAkeyhwcm9wcykgPT5cbiAgICAgICAgICBwcm9wcy5wYWxldHRlLm1vZGUgPT09ICdkYXJrJyA/IGRhcmsub3ZlcmxheXMgOiBsaWdodC5vdmVybGF5c307XG4gICAgICB9XG4gICAgICAuTXVpUGFwZXItZWxldmF0aW9uMiB7XG4gICAgICAgIGJvcmRlci13aWR0aDogMXB4O1xuICAgICAgICBib3JkZXItc3R5bGU6IHNvbGlkO1xuICAgICAgICBib3JkZXItY29sb3I6ICR7KHByb3BzKSA9PlxuICAgICAgICAgIHByb3BzLnBhbGV0dGUubW9kZSA9PT0gJ2RhcmsnXG4gICAgICAgICAgICA/IHByb3BzLnBhbGV0dGUuZGl2aWRlclxuICAgICAgICAgICAgOiBwcm9wcy5wYWxldHRlLmRpdmlkZXJ9O1xuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICR7KHByb3BzKSA9PlxuICAgICAgICAgICAgcHJvcHMucGFsZXR0ZS5tb2RlID09PSAnZGFyaycgPyBkYXJrLnBhcGVyIDogbGlnaHQucGFwZXJ9O1xuICAgICAgfVxuICAgICAgW2RhdGEtYmVoYXZpb3ItZHJvcGRvd25dIHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHsocHJvcHMpID0+XG4gICAgICAgICAgcHJvcHMucGFsZXR0ZS5tb2RlID09PSAnZGFyaycgPyBkYXJrLm92ZXJsYXlzIDogbGlnaHQub3ZlcmxheXN9O1xuICAgICAgfVxuICAgICAgLmZvbnQtYXdlc29tZS1zcGFuIHtcbiAgICAgICAgJiYge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICAgIGZvbnQtZmFtaWx5OiAnT3BlbiBTYW5zJywgYXJpYWwsIHNhbnMtc2VyaWY7XG4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gIC5NdWktYmctYnV0dG9uOmhvdmVyLFxuICAgICAgLk11aS1iZy1idXR0b246Zm9jdXMtd2l0aGluIHtcbiAgICAgICAgYmFja2dyb3VuZDogJHsocHJvcHMpID0+XG4gICAgICAgICAgcHJvcHMucGFsZXR0ZS5tb2RlID09PSAnZGFyaydcbiAgICAgICAgICAgID8gJ3JnYmEoMjU1LCAyNTUsIDI1NSwgMC4wOCknXG4gICAgICAgICAgICA6ICdyZ2JhKDAsIDAsIDAsIDAuMDQpJ307XG4gICAgICB9XG4gICAgICAudGhlbWUtYmctb3ZlcmxheXMge1xuICAgICAgICBiYWNrZ3JvdW5kOiAkeyhwcm9wcykgPT5cbiAgICAgICAgICBwcm9wcy5wYWxldHRlLm1vZGUgPT09ICdkYXJrJyA/IGRhcmsub3ZlcmxheXMgOiBsaWdodC5vdmVybGF5c307XG4gICAgICB9XG4gICAgICAuY2hpbGRyZW4tbWF4LWgtZnVsbCB7XG4gICAgICAgID4gKiB7XG4gICAgICAgICAgbWF4LWhlaWdodDogMTAwJTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgLmNoaWxkcmVuLWgtZnVsbCB7XG4gICAgICAgID4gKiB7XG4gICAgICAgICAgaGVpZ2h0OiAxMDAlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAuY2hpbGRyZW4tYmxvY2sge1xuICAgICAgICA+ICoge1xuICAgICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAuY2hpbGRyZW4tcC0wIHtcbiAgICAgICAgPiAqIHtcbiAgICAgICAgICBwYWRkaW5nOiAwcHg7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIGlkZWEgaXMgdG8gaGF2ZSB0aGlzIHRyYWNrIHdpdGggc3VidHJhY3RpbmcgbWFyZ2luIC8gcGFkZGluZ1xuICAgICAgLm1heC13LWZ1bGwtMSB7XG4gICAgICAgIG1heC13aWR0aDogY2FsYygxMDAlIC0gMiow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AgYXBwQmFyOiAxMDEsXG4gICAgICBkcmF3ZXI6IDEwMSxcbiAgICAgIG1vZGFsOiAxMDEsXG4gICAgICBzbmFja2JhcjogMTAxLFxuICAgICAgdG9vbHRpcDogMTAxLFxuICAgICAgZmFiOiAxMDEsXG4gICAgICBzcGVlZERpYWw6IDEwMSxcbiAgICB9LFxuICB9KVxuXG4gIC8qKlxuICAgKiAgV2Ugc3BsaXQgdGhlc2Ugb3V0IHRvIHNvIHRoYXQgd2UgY2FuIGFjY2VzcyB0aGVtZSB2YXJpYWJsZXMgd2l0aGluIG91ciBjdXN0b20gdGhlbWVcbiAgICovXG4gIGNvbnN0IHRoZW1lQmFzZWRUaGVtZTogVGhlbWVPcHRpb25zID0ge1xuICAgIGNvbXBvbmVudHM6IHtcbiAgICAgIE11aUNoaXA6IHtcbiAgICAgICAgc3R5bGVPdmVycmlkZXM6IHtcbiAgICAgICAgICByb290OiB7XG4gICAgICAgICAgICBmb250U2l6ZTogJzFyZW0nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgTXVpQnV0dG9uOiB7XG4gICAgICAgIGRlZmF1bHRQcm9wczoge1xuICAgICAgICAgIHNpemU6ICdzbWFsbCcsXG4gICAgICAgICAgY29sb3I6ICdncmV5JyxcbiAgICAgICAgfSxcbiAgICAgICAgdmFyaWFudHM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBwcm9wczogeyB2YXJpYW50OiAnY29udGFpbmVkJywgY29sb3I6ICdncmV5JyB9LFxuICAgICAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgICAgY29sb3I6IGluaXRpYWxUaGVtZS5wYWxldHRlLmdldENvbnRyYXN0VGV4dChcbiAgICAgICAgICAgICAgICBpbml0aWFsVGhlbWUucGFsZXR0ZS5ncmV5WzMwMF1cbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBwcm9wczogeyB2YXJpYW50OiAnb3V0bGluZWQnLCBjb2xvcjogJ2dyZXknIH0sXG4gICAgICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgICBjb2xvcjogaW5pdGlhbFRoZW1lLnBhbGV0dGUudGV4dC5wcmltYXJ5LFxuICAgICAgICAgICAgICBib3JkZXJDb2xvcjpcbiAgICAgICAgICAgICAgICBpbml0aWFsVGhlbWUucGFsZXR0ZS5tb2RlID09PSAnbGlnaHQnXG4gICAgICAgICAgICAgICAgICA/ICdyZ2JhKDAsIDAsIDAsIDAuMjMpJ1xuICAgICAgICAgICAgICAgICAgOiAncmdiYSgyNTUsIDI1NSwgMjU1LCAwLjIzKScsXG4gICAgICAgICAgICAgICcmLk11aS1kaXNhYmxlZCc6IHtcbiAgICAgICAgICAgICAgICBib3JkZXI6IGAxcHggc29saWQgJHtpbml0aWFsVGhlbWUucGFsZXR0ZS5hY3Rpb24uZGlzYWJsZWRCYWNrZ3JvdW5kfWAsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOlxuICAgICAgICAgICAgICAgICAgaW5pdGlhbFRoZW1lLnBhbGV0dGUubW9kZSA9PT0gJ2xpZ2h0J1xuICAgICAgICAgICAgICAgICAgICA/ICdyZ2JhKDAsIDAsIDAsIDAuMjMpJ1xuICAgICAgICAgICAgICAgICAgICA6ICdyZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMjMpJyxcbiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IGFscGhhKFxuICAgICAgICAgICAgICAgICAgaW5pdGlhbFRoZW1lLnBhbGV0dGUudGV4dC5wcmltYXJ5LFxuICAgICAgICAgICAgICAgICAgaW5pdGlhbFRoZW1lLnBhbGV0dGUuYWN0aW9uLmhvdmVyT3BhY2l0eVxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgcHJvcHM6IHsgY29sb3I6ICdncmV5JywgdmFyaWFudDogJ3RleHQnIH0sXG4gICAgICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgICBjb2xvcjogaW5pdGlhbFRoZW1lLnBhbGV0dGUudGV4dC5wcmltYXJ5LFxuICAgICAgICAgICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IGFscGhhKFxuICAgICAgICAgICAgICAgICAgaW5pdGlhbFRoZW1lLnBhbGV0dGUudGV4dC5wcmltYXJ5LFxuICAgICAgICAgICAgICAgICAgaW5pdGlhbFRoZW1lLnBhbGV0dGUuYWN0aW9uLmhvdmVyT3BhY2l0eVxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIHN0eWxlT3ZlcnJpZGVzOiB7XG4gICAgICAgICAgcm9vdDoge1xuICAgICAgICAgICAgbGluZUhlaWdodDogJ2luaGVyaXQnLCAvLyBtYXliZSBvcGVuIGEgdGlja2V0IG9uIE1VSSwgc2VlbXMgbGlrZSB0aGUgZGVmYXVsdCB0aGV5IHVzZSBkb2Vzbid0IGNlbnRlciB0ZXh0IHF1aXRlIHJpZ2h0IHdpdGggaWNvbnNcbiAgICAgICAgICAgIG1pbldpZHRoOiAnMHB4JywgLy8gdXN1YWxseSBtb3JlIGFubm95aW5nIHRoYW4gbm90XG4gICAgICAgICAgfSxcbiAgICAgICAgICAuLi4ocHJpbWFyeUNvbnRyYXN0U2NvcmVzLkFBXG4gICAgICAgICAgICA/IHsgdGV4dFByaW1hcnk6IHt9IH0gLy8gd2VpcmQgcmVxdWlyZW1lbnQgZHVlIHRvIHR5cGVzLCBuZWVkIHRleHRQcmltYXJ5IGhlcmUgYnV0IGVtcHR5XG4gICAgICAgICAgICA6IHtcbiAgICAgICAgICAgICAgICB0ZXh0UHJpbWFyeToge1xuICAgICAgICAgICAgICAgICAgY29sb3I6IGZhaWxlZENvbnRyYXN0UHJpbWFyeVJlcGxhY2VtZW50LFxuICAgICAgICAgICAgICAgICAgJyY6aG92ZXInOiB7XG4gICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogYWxwaGEoXG4gICAgICAgICAgICAgICAgICAgICAgZmFpbGVkQ29udHJhc3RQcmltYXJ5UmVwbGFjZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgMC4xXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgIC8vIFJlc2V0IG9uIHRvdWNoIGRldmljZXMsIGl0IGRvZXNuJ3QgYWRkIHNwZWNpZmljaXR5XG4gICAgICAgICAgICAgICAgICAgICdAbWVkaWEgKGhvdmVyOiBub25lKSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgIC4uLihzZWNvbmRhcnlDb250cmFzdFNjb3Jlcy5BQVxuICAgICAgICAgICAgPyB7IHRleHRTZWNvbmRhcnk6IHt9IH0gLy8gd2VpcmQgcmVxdWlyZW1lbnQgZHVlIHRvIHR5cGVzLCBuZWVkIHRleHRQcmltYXJ5IGhlcmUgYnV0IGVtcHR5XG4gICAgICAgICAgICA6IHtcbiAgICAgICAgICAgICAgICB0ZXh0U2Vjb25kYXJ5OiB7XG4gICAgICAgICAgICAgICAgICBjb2xvcjogZmFpbGVkQ29udHJhc3RTZWNvbmRhcnlSZXBsYWNlbWVudCxcbiAgICAgICAgICAgICAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IGFscGhhKFxuICAgICAgICAgICAgICAgICAgICAgIGZhaWxlZENvbnRyYXN0U2Vjb25kYXJ5UmVwbGFjZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgMC4xXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgIC8vIFJlc2V0IG9uIHRvdWNoIGRldmljZXMsIGl0IGRvZXNuJ3QgYWRkIHNwZWNpZmljaXR5XG4gICAgICAgICAgICAgICAgICAgICdAbWVkaWEgKGhvdmVyOiBub25lKSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIE11aUNhcmRBY3Rpb25BcmVhOiB7XG4gICAgICAgIHN0eWxlT3ZlcnJpZGVzOiB7XG4gICAgICAgICAgcm9vdDoge1xuICAgICAgICAgICAgaGVpZ2h0OiAnYXV0bycsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBNdWlDYXJkSGVhZGVyOiB7XG4gICAgICAgIHN0eWxlT3ZlcnJpZGVzOiB7XG4gICAgICAgICAgY29udGVudDoge1xuICAgICAgICAgICAgbWluV2lkdGg6ICcwcHgnLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgTXVpUGFwZXI6IHtcbiAgICAgICAgc3R5bGVPdmVycmlkZXM6IHtcbiAgICAgICAgICByb290OiB7IGJhY2tncm91bmRJbWFnZTogJ3Vuc2V0JyB9LFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIE11aVRvb2x0aXA6IHtcbiAgICAgICAgc3R5bGVPdmVycmlkZXM6IHtcbiAgICAgICAgICB0b29sdGlwOiB7XG4gICAgICAgICAgICBm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lz5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/timeline/hooks.d.ts b/src/main/webapp/component/timeline/hooks.d.ts new file mode 100644 index 00000000000..aebf058cc2e --- /dev/null +++ b/src/main/webapp/component/timeline/hooks.d.ts @@ -0,0 +1,3 @@ +import moment, { Moment } from 'moment-timezone'; +import { Timescale } from './types'; +export declare const useSelectionRange: (defaultValues: Moment[], timescale: Timescale) => [moment.Moment[], (newValue: Moment[]) => void]; diff --git a/src/main/webapp/component/timeline/hooks.js b/src/main/webapp/component/timeline/hooks.js new file mode 100644 index 00000000000..82b4f6da1e8 --- /dev/null +++ b/src/main/webapp/component/timeline/hooks.js @@ -0,0 +1,29 @@ +import { __read } from "tslib"; +import moment from 'moment-timezone'; +import { useState } from 'react'; +var withinTimeScale = function (newValues, timescale) { + var domain = timescale.domain().map(function (value) { return moment(value); }); + if (newValues.length === 0) { + return true; + } + else if (newValues.length === 1) { + return domain[0] < newValues[0] && newValues[0] < domain[1]; + } + else if (newValues.length === 2) { + return domain[0] < newValues[0] && newValues[1] < domain[1]; + } + else { + console.debug('selectionRange can have a maximum of two elements.'); + return false; + } +}; +export var useSelectionRange = function (defaultValues, timescale) { + var _a = __read(useState(defaultValues), 2), values = _a[0], setValues = _a[1]; + var setSelectionRange = function (newValues) { + if (withinTimeScale(newValues, timescale)) { + setValues(newValues); + } + }; + return [values, setSelectionRange]; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9va3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3RpbWVsaW5lL2hvb2tzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxNQUFrQixNQUFNLGlCQUFpQixDQUFBO0FBQ2hELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxPQUFPL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d28gZWxlbWVudHMuJylcbiAgICByZXR1cm4gZmFsc2VcbiAgfVxufVxuXG5leHBvcnQgY29uc3QgdXNlU2VsZWN0aW9uUmFuZ2UgPSAoXG4gIGRlZmF1bHRWYWx1ZXM6IE1vbWVudFtdLFxuICB0aW1lc2NhbGU6IFRpbWVzY2FsZVxuKTogW01vbWVudFtdLCAobmV3VmFsdWU6IE1vbWVudFtdKSA9PiB2b2lkXSA9PiB7XG4gIGNvbnN0IFt2YWx1ZXMsIHNldFZhbHVlc10gPSB1c2VTdGF0ZTxNb21lbnRbXT4oZGVmYXVsdFZhbHVlcylcbiAgY29uc3Qgc2V0U2VsZWN0aW9uUmFuZ2UgPSAobmV3VmFsdWVzOiBNb21lbnRbXSkgPT4ge1xuICAgIGlmICh3aXRoaW5UaW1lU2NhbGUobmV3VmFsdWVzLCB0aW1lc2NhbGUpKSB7XG4gICAgICBzZXRWYWx1ZXMobmV3VmFsdWVzKVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBbdmFsdWVzLCBzZXRTZWxlY3Rpb25SYW5nZV1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/timeline/index.d.ts b/src/main/webapp/component/timeline/index.d.ts new file mode 100644 index 00000000000..6b258a7517f --- /dev/null +++ b/src/main/webapp/component/timeline/index.d.ts @@ -0,0 +1 @@ +export { default } from './timeline'; diff --git a/src/main/webapp/component/timeline/index.js b/src/main/webapp/component/timeline/index.js new file mode 100644 index 00000000000..79c7f103293 --- /dev/null +++ b/src/main/webapp/component/timeline/index.js @@ -0,0 +1,2 @@ +export { default } from './timeline'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3RpbWVsaW5lL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sWUFBWSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vdGltZWxpbmUnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/timeline/timeline.d.ts b/src/main/webapp/component/timeline/timeline.d.ts new file mode 100644 index 00000000000..e92a8e91c78 --- /dev/null +++ b/src/main/webapp/component/timeline/timeline.d.ts @@ -0,0 +1,68 @@ +/// +import { Moment } from 'moment-timezone'; +export type TimelineItem = { + id: string; + selected: boolean; + data?: any; + attributes: { + [key: string]: Moment[]; + }; +}; +export interface TimelineProps { + /** + * Height in pixels. + */ + height: number; + /** + * Mode that the timeline should be in. + */ + mode?: 'single' | 'range'; + /** + * Timezone to use when displaying times. + */ + timezone: string; + /** + * Date format to use when displaying times. + */ + format: string; + /** + * TimelineItem points + */ + data?: TimelineItem[]; + /** + * Alias Map for date attributes + */ + dateAttributeAliases?: { + [key: string]: string; + }; + /** + * Called when the done button is clicked, providing the current selection range. + */ + onDone?: (selectionRange: Moment[]) => void; + /** + * Called when the a selection is made. + */ + onSelect?: (data: TimelineItem[]) => void; + /** + * Render function for tooltips + */ + renderTooltip?: (data: TimelineItem[]) => any; + /** + * Height offset to combat issues with dynamic heights when rendering the timeline. + */ + heightOffset?: number; + /** + * Called when a date is copied to the clipboard. + */ + onCopy?: (copiedValue: string) => void; + /** + * Minimum date bounds to render items between. + */ + min?: Moment; + /** + * Maximum date bounds to render items between. + */ + max?: Moment; +} +export declare const Timeline: (props: TimelineProps) => JSX.Element; +export default Timeline; diff --git a/src/main/webapp/component/timeline/timeline.js b/src/main/webapp/component/timeline/timeline.js new file mode 100644 index 00000000000..099a3839fd5 --- /dev/null +++ b/src/main/webapp/component/timeline/timeline.js @@ -0,0 +1,642 @@ +import { __makeTemplateObject, __read, __spreadArray } from "tslib"; +import * as d3 from 'd3'; +import * as React from 'react'; +import { useEffect, useRef, useState } from 'react'; +import { Tooltip } from './tooltip'; +import { range, formatDate, dateWithinRange, convertToDisplayable, multiFormat, } from './util'; +import { useSelectionRange } from './hooks'; +import _ from 'lodash'; +import styled from 'styled-components'; +import Select from '@mui/material/Select'; +import MenuItem from '@mui/material/MenuItem'; +import Button from '@mui/material/Button'; +import { lighten } from 'polished'; +import { readableColor } from 'polished'; +import moment from 'moment-timezone'; +// Constants +var AXIS_MARGIN = 20; +var AXIS_HEIGHT = 15; +// Color Theme +var ContextRow = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin-top: 10px;\n"], ["\n display: flex;\n justify-content: space-between;\n margin-top: 10px;\n"]))); +var HoverLineText = styled.text(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n fill: ", ";\n font-family: 'Open Sans', sans-serif;\n pointer-events: none;\n"], ["\n fill: ", ";\n font-family: 'Open Sans', sans-serif;\n pointer-events: none;\n"])), function (_a) { + var theme = _a.theme; + return readableColor(theme.backgroundContent); +}); +var HoverLine = styled.line(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n stroke: ", ";\n stroke-width: 3;\n pointer-events: none;\n"], ["\n stroke: ", ";\n stroke-width: 3;\n pointer-events: none;\n"])), function (_a) { + var theme = _a.theme; + return theme.primaryColor; +}); +var MarkerHover = styled.g(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n :hover {\n cursor: ew-resize;\n }\n"], ["\n :hover {\n cursor: ew-resize;\n }\n"]))); +var MarkerLine = styled.line(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n stroke: ", ";\n stroke-width: ", ";\n"], ["\n stroke: ", ";\n stroke-width: ", ";\n"])), function (props) { + return !props.hidden + ? lighten(0.1, props.theme.primaryColor) + : 'rgba(0, 0, 0, 0)'; +}, function (props) { return (!props.hidden ? 2 : 18); }); +var TimelineButton = styled(Button)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n font-family: 'Open Sans', sans-serif;\n min-width: 3rem;\n height: 3rem;\n\n ", " :hover {\n }\n\n :focus {\n outline: none;\n }\n"], ["\n display: flex;\n justify-content: center;\n font-family: 'Open Sans', sans-serif;\n min-width: 3rem;\n height: 3rem;\n\n ", " :hover {\n }\n\n :focus {\n outline: none;\n }\n"])), function (_a) { + var icon = _a.icon; + return !icon && + "\n font-size: 1rem;\n padding: 0px 20px;\n margin-left: 15px !important;\n "; +}); +var DateAttributeSelect = styled(Select)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin: 10px;\n visibility: ", ";\n"], ["\n margin: 10px;\n visibility: ", ";\n"])), function (props) { return (props.visible ? 'visible' : 'hidden'); }); +var ButtonArea = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n margin: 10px;\n display: flex;\n justify-content: flex-end;\n margin-right: 20px;\n\n button {\n margin-left: 5px;\n }\n"], ["\n margin: 10px;\n display: flex;\n justify-content: flex-end;\n margin-right: 20px;\n\n button {\n margin-left: 5px;\n }\n"]))); +var Root = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n .brushBar {\n /* This will let you select/hover records behind area, but can't brush-drag area if it's set. */\n pointer-events: none;\n opacity: 0.5;\n\n /* If it's discovered that brush dragging is wanted more than hovering behind the highlighted brush area, \n simply comment the above lines and uncomment this opacity */\n /* opacity: 0.1; */\n fill: ", ";\n display: none;\n\n :hover {\n cursor: move;\n fill: ", ";\n opacity: 0.5;\n }\n }\n\n .axis {\n color: ", ";\n font-size: 0.9rem;\n :hover {\n cursor: ew-resize;\n }\n }\n\n .selected {\n fill: ", " !important;\n }\n\n .data {\n fill: ", ";\n fill-opacity: 0.7;\n :hover {\n stroke-width: 2px;\n stroke: ", ";\n }\n }\n"], ["\n display: flex;\n flex-direction: column;\n\n .brushBar {\n /* This will let you select/hover records behind area, but can't brush-drag area if it's set. */\n pointer-events: none;\n opacity: 0.5;\n\n /* If it's discovered that brush dragging is wanted more than hovering behind the highlighted brush area, \n simply comment the above lines and uncomment this opacity */\n /* opacity: 0.1; */\n fill: ", ";\n display: none;\n\n :hover {\n cursor: move;\n fill: ", ";\n opacity: 0.5;\n }\n }\n\n .axis {\n color: ", ";\n font-size: 0.9rem;\n :hover {\n cursor: ew-resize;\n }\n }\n\n .selected {\n fill: ", " !important;\n }\n\n .data {\n fill: ", ";\n fill-opacity: 0.7;\n :hover {\n stroke-width: 2px;\n stroke: ", ";\n }\n }\n"])), function (_a) { + var theme = _a.theme; + return theme.primaryColor; +}, function (_a) { + var theme = _a.theme; + return theme.primaryColor; +}, function (_a) { + var theme = _a.theme; + return readableColor(theme.backgroundContent); +}, function (_a) { + var theme = _a.theme; + return theme.primaryColor; +}, function (_a) { + var theme = _a.theme.theme; + return theme === 'dark' ? lighten(0.7, 'black') : lighten(0.3, 'black'); +}, function (_a) { + var theme = _a.theme; + return theme.primaryColor; +}); +var TimeText = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n margin: 10px;\n font-family: 'Open Sans', sans-serif;\n text-align: center;\n\n br {\n line-height: 150%;\n }\n"], ["\n margin: 10px;\n font-family: 'Open Sans', sans-serif;\n text-align: center;\n\n br {\n line-height: 150%;\n }\n"]))); +var Message = styled.span(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-family: 'Open Sans', sans-serif;\n margin: 10px;\n color: ", ";\n"], ["\n font-family: 'Open Sans', sans-serif;\n margin: 10px;\n color: ", ";\n" + // Helper Methods +])), function (_a) { + var theme = _a.theme; + return readableColor(theme.backgroundContent); +}); +// Helper Methods +var generateTooltipMessage = function (data) { + var titles = data.slice(0, 5).map(function (d) { + return (React.createElement(React.Fragment, null, + React.createElement("span", null, d), + React.createElement("br", null))); + }); + var otherResults = (React.createElement(React.Fragment, null, + React.createElement("br", null), "+".concat(data.length - 5, " other results"))); + return (React.createElement(React.Fragment, null, + titles, + data.length > 5 && otherResults)); +}; +/** + * Given a d3 selection, set the display to none. + */ +var hideElement = function (element) { + return element.attr('style', 'display: none'); +}; +/** + * Given a d3 selection, set the display to block. + */ +var showElement = function (element) { + return element.attr('style', 'display: block'); +}; +/** + * Domain is the minimum and maximum values that the scale contains. + */ +var getTimescaleFromWidth = function (width, min, max) { + if (min === void 0) { min = moment('1980-01-01:00:00.000z'); } + if (max === void 0) { max = moment(); } + var timeScale = d3.scaleUtc().domain([min, max]).nice(); + timeScale.range([AXIS_MARGIN, width - AXIS_MARGIN]); + return timeScale; +}; +var getPossibleDateAttributes = function (timelineItems) { + return _(timelineItems) + .map(function (d) { return d.attributes; }) //{created: {display: "Created", value: new Date()}} + .flatMap(function (o) { return Object.keys(o); }) //[created] + .uniq() + .value(); +}; +/* + * TODOS + * -------------------- + * + * 1. On hover should work when the on hover is behind the area marker while still letting you brush drag (if possible) + */ +// Please see https://alignedleft.com/tutorials/d3/scales for more information about d3 scales. +export var Timeline = function (props) { + /** + * The useRef Hook creates a variable that "holds on" to a value across rendering + * passes. In this case it will hold our component's SVG DOM element. It's + * initialized null and React will assign it later (see the return statement) + */ + var rootRef = useRef(null); + var d3ContainerRef = useRef(null); + var hoverLineRef = useRef(null); + var hoverLineTextRef = useRef(null); + var leftMarkerRef = useRef(null); + var rightMarkerRef = useRef(null); + var brushBarRef = useRef(null); + var min = props.min, max = props.max; + var _a = __read(useState(0), 2), width = _a[0], setWidth = _a[1]; + var height = props.height; + var heightOffset = props.heightOffset ? props.heightOffset : 0; + var possibleDateAttributes = getPossibleDateAttributes(props.data || []); + var timescale = getTimescaleFromWidth(width, min, max); + var _b = __read(useState(function () { return timescale; }), 2), xScale = _b[0], setXScale = _b[1]; + var _c = __read(useState(function () { + return d3.axisBottom(xScale).tickSize(AXIS_HEIGHT).tickFormat(multiFormat); + }), 2), xAxis = _c[0], setXAxis = _c[1]; + var _d = __read(useState([]), 2), dataBuckets = _d[0], setDataBuckets = _d[1]; + var _e = __read(useState(), 2), tooltip = _e[0], setTooltip = _e[1]; + var _f = __read(useState(''), 2), selectedDateAttribute = _f[0], setSelectedDateAttribute = _f[1]; + useEffect(function () { + if (selectedDateAttribute === '' && possibleDateAttributes.length > 0) { + setSelectedDateAttribute(possibleDateAttributes[0]); + } + }, [possibleDateAttributes]); + var _g = __read(useState(false), 2), isDragging = _g[0], setIsDragging = _g[1]; + var _h = __read(useSelectionRange([], timescale), 2), selectionRange = _h[0], setSelectionRange = _h[1]; + useEffect(function () { + if (width != 0) { + console.debug("Width updated to ".concat(width)); + setXScale(function () { return timescale; }); + } + }, [width]); + useEffect(function () { + console.debug("xScale updated to ".concat(xScale.range())); + var _a = __read(xScale.range(), 2), left = _a[0], right = _a[1]; + if (left < right) { + var newXAxis_1 = xAxis.scale(xScale); + setXAxis(function () { return newXAxis_1; }); + d3.select('.axis--x').call(newXAxis_1); + } + }, [xScale, props.timezone, props.format]); + useEffect(function () { + if (rootRef.current) { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + var rect = rootRef.current.getBoundingClientRect(); + setWidth(rect.width); + } + }, [rootRef]); + /** + * Every 100 ms, poll to see the new parent rect width. + * If the new parent rect width is different than current width, update the width. + */ + useEffect(function () { + var interval = setInterval(function () { + if (rootRef.current) { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + var rect = rootRef.current.getBoundingClientRect(); + if (rect.width !== width) { + setWidth(rect.width); + clearInterval(interval); + } + } + }, 100); + }, [rootRef, width]); + useEffect(function () { + zoomBehavior.scaleTo(d3.select(d3ContainerRef.current).transition().duration(0), 1); + }, [width]); + var markerHeight = height - 70 - AXIS_HEIGHT - heightOffset; + /** + * When a zoom event is triggered, use the transform event to create a new xScale, + * then create a new xAxis using the scale and update existing xAxis + */ + var handleZoom = function () { + // Tooltip sticks around without this. + setTooltip(null); + var transform = d3.event.transform; + if (width != 0) { + var newXScale_1 = transform.rescaleX(timescale); + setXScale(function () { return newXScale_1; }); + var newXAxis_2 = xAxis.scale(newXScale_1); + setXAxis(function () { return newXAxis_2; }); + // Apply the new xAxis + d3.select('.axis--x').call(xAxis); + } + }; + var zoomBehavior = d3 + .zoom() + .scaleExtent([1, 24 * 60 * 60]) // Allows selections down to the minute at full zoom + .translateExtent([ + [0, 0], + [width, height], + ]) + .extent([ + [0, 0], + [width, height], + ]) + .filter(function () { + // If event triggered below xAxis, let default zoom behavior handle it (allows panning by dragging on axis) + console.debug('Click/Drag Event: ', d3.event); + var axisOffset = heightOffset ? heightOffset - 50 : -10; + if (d3.event.layerY > height + AXIS_MARGIN - AXIS_HEIGHT - axisOffset) { + console.debug('Drag below xAxis, ignore'); + return true; + } + else { + console.debug("Drag above xAxis, don't ignore"); + } + var shouldFilterEvent = d3.event.type !== 'mousedown'; + if (!shouldFilterEvent) { + console.debug('Ignoring event type: ', d3.event.type); + } + return shouldFilterEvent; + }) + .on('zoom', handleZoom); + var zoomIn = function () { + zoomBehavior.scaleBy(d3.select(d3ContainerRef.current).transition().duration(750), 2); + }; + var zoomOut = function () { + zoomBehavior.scaleBy(d3.select(d3ContainerRef.current).transition().duration(750), 0.5); + }; + useEffect(function () { + /** + * Range is the range of possible output values used in display. + * Domain maps to Range + * i.e. Dates map to Pixels + */ + var renderInitialXAxis = function () { + var svg = d3 + .select(d3ContainerRef.current) + .attr('width', width) + .attr('height', height); + svg + .select('.axis--x') + .attr('transform', "translate(0 ".concat(height - (AXIS_MARGIN + AXIS_HEIGHT + heightOffset), ")")) + .call(xAxis); + }; + if (d3ContainerRef.current) { + renderInitialXAxis(); + var container = d3.select(d3ContainerRef.current); + container.call(zoomBehavior); + } + }, [height, width]); + // Add mouse handlers to listen to d3 mouse events + useEffect(function () { + // When the d3Container mousemove event triggers, show the hover line + d3.select(d3ContainerRef.current).on('mousemove', function () { + var coord = d3.mouse(this); + d3.select(hoverLineRef.current) + .attr('transform', "translate(".concat(coord[0], ", ").concat(markerHeight, ")")) + .attr('style', 'display: block'); + var hoverDate = moment.tz(xScale.invert(coord[0]), props.timezone); + var formattedDate = formatDate(hoverDate, props.format); + var widthBuffer = 150; + var maxX = width - widthBuffer; + var xPos = coord[0]; + if (xPos < widthBuffer) + xPos = widthBuffer; + if (xPos > maxX) + xPos = maxX; + var yPos = 20; + d3.select(hoverLineTextRef.current) + .attr('transform', "translate(".concat(xPos, ", ").concat(yPos, ")")) + .attr('style', 'display: block') + .attr('text-anchor', 'middle') + .text(formattedDate); + }); + // When the d3Container mouseleave event triggers, set the hoverValue to null and hide the hoverLine line + d3.select(d3ContainerRef.current).on('mouseleave', function () { + hideElement(d3.select(hoverLineRef.current)); + hideElement(d3.select(hoverLineTextRef.current)); + }); + }, [xScale, props.timezone, props.format, props.height]); + // Render rectangles + useEffect(function () { + var min = xScale.range()[0]; + var max = xScale.range()[1]; + var NUM_BUCKETS = Math.round(width / 30); // 30 is just a constant that I found to look good. + var bucketWidth = (max - min) / NUM_BUCKETS; + var buckets = range(NUM_BUCKETS).map(function (i) { return ({ + x1: min + bucketWidth * i, + x2: min + bucketWidth * (i + 1), + items: [], + selected: false, + }); }); + if (props.data && selectedDateAttribute !== undefined) { + d3.selectAll('.data').remove(); + props.data.forEach(function (d) { + var date = d.attributes[selectedDateAttribute]; + if (date == null) { + return; + } + var scaledDates = date.map(function (d) { return xScale(d); }); + scaledDates.forEach(function (scaledDate) { + for (var i = 0; i < buckets.length; i++) { + var b = buckets[i]; + if (b.x1 < scaledDate && scaledDate < b.x2) { + b.items.push(d); + if (d.selected) { + b.selected = true; + } + break; + } + } + }); + }); + var mostItemsInABucket = Math.max.apply(Math, __spreadArray([], __read(buckets.map(function (b) { return b.items.length; })), false)); + var heightPerItem_1 = (height - (heightOffset + 75)) / mostItemsInABucket; + setDataBuckets(buckets); + buckets.forEach(function (b, i) { + var rectangleHeight = b.items.length * heightPerItem_1; + var x = (b.x1 + b.x2) / 2 - 15; + var y = height - rectangleHeight - (AXIS_MARGIN + AXIS_HEIGHT + heightOffset); + d3.select('.data-holder') + .append('rect') + .attr('class', "data ".concat(b.selected ? 'selected' : '')) + .attr('width', bucketWidth - 5) + .attr('height', rectangleHeight) + .attr('id', i) + .attr('transform', "translate(".concat(x, ", ").concat(y, ")")) + .append('rect'); + }); + } + }, [props.data, xScale, selectedDateAttribute, width, height]); + useEffect(function () { + d3.select('.data-holder') + .selectAll('.data') + .on('mouseleave', function () { + setTooltip(null); + }) + .on('mousemove', function () { + var id = d3.select(this).node().id; + var x = d3.event.layerX; + var y = d3.event.layerY; + var tooltipInBounds = x <= width * 0.75; + setTooltip({ + // If the tooltip will overflow off the timeline, set x to left of the cursor instead of right. + x: tooltipInBounds ? x + 25 : x - width * 0.25, + y: y - 20, + message: props.renderTooltip + ? props.renderTooltip(dataBuckets[id].items) + : generateTooltipMessage(dataBuckets[id].items.map(function (d) { return d.id; })), + }); + }); + }, [dataBuckets]); + // If dragging is finished, update selected results. + useEffect(function () { + if (!isDragging && + props.data && + selectedDateAttribute !== undefined && + !props.mode) { + if (selectionRange.length == 2) { + var x1_1 = xScale(selectionRange[0]); + var x2_1 = xScale(selectionRange[1]); + // Prefilter to only buckets we care about + var bucketsContainingRelevantData = dataBuckets.filter(function (b) { + return (x1_1 < b.x1 && b.x2 < x2_1) || + (b.x1 < x1_1 && x1_1 < b.x2) || + (b.x1 < x2_1 && x2_1 < b.x2); + }); + // Get the data inside those buckets that falls within the selection + var dataToSelect = _.flatMap(bucketsContainingRelevantData, function (b) { return b.items; }).filter(function (d) { + return d.attributes[selectedDateAttribute].some(function (moment) { + return dateWithinRange(moment, selectionRange); + }); + }); + props.onSelect && props.onSelect(dataToSelect); + } + } + }, [isDragging]); + useEffect(function () { + /** + * + * Selection Drag does two things: + * 1. When the user drags across the timeline, a range selection will be created. + * 2. If the drag event is only 5 pixels or less from start to finish AND ends on a rect object, + * assume that the user meant to click instead of drag, and properly trigger a click action on the rect. + */ + var getSelectionDrag = function () { + var clickStart; + return d3 + .drag() + .on('start', function () { + clickStart = d3.event.x; + var newLeftDate = moment.tz(xScale.invert(clickStart), props.timezone); + if (props.mode === 'single') { + setSelectionRange([newLeftDate]); + } + else { + setIsDragging(true); + hideElement(d3.select(hoverLineRef.current)); + hideElement(d3.select(hoverLineTextRef.current)); + setSelectionRange([newLeftDate]); + } + }) + // Set isDragging to false to trigger a selection update, additionally check if user meant to click. + .on('end', function () { + if (!props.mode) { + showElement(d3.select(hoverLineRef.current)); + setIsDragging(false); + var clickDistance = clickStart - d3.event.x; + var sourceEvent = d3.event.sourceEvent; + if (Math.abs(clickDistance) < 5) { + var nodeName = sourceEvent.srcElement.nodeName; + setSelectionRange([]); + if (nodeName === 'rect' || nodeName === 'line') { + var x_1 = d3.event.x; + var bucket = dataBuckets.find(function (b) { return b.x1 < x_1 && x_1 <= b.x2; }); + bucket && props.onSelect && props.onSelect(bucket.items); + } + } + } + }) + .on('drag', function () { + if (props.mode !== 'single') { + var diff = d3.event.x - d3.event.subject.x; + var initialDate = moment.tz(xScale.invert(clickStart), props.timezone); + var dragCurrent = clickStart + diff; + var dragDate = moment.tz(xScale.invert(dragCurrent), props.timezone); + if (diff > 0) { + setSelectionRange([initialDate, dragDate]); + } + else { + setSelectionRange([dragDate, initialDate]); + } + } + }); + }; + d3.select(d3ContainerRef.current).call(getSelectionDrag()); + }, [dataBuckets, selectionRange, xScale, props.timezone, props.format]); + useEffect(function () { + /** + * Creates the drag behavior used when selecting the left or right slider. + * + * Validation for sliders: + * - Left slider cannot be within 10 pixels of the right slider. + * - Right slider cannot be within 10 pixels of the left slider. + * + * @param slider - Which slider the drag behavior should affect. + */ + var getEdgeDrag = function (slider) { + return d3 + .drag() + .on('start', function () { + hideElement(d3.select(hoverLineRef.current)); + hideElement(d3.select(hoverLineTextRef.current)); + setIsDragging(true); + }) + .on('end', function () { return setIsDragging(false); }) + .on('drag', function () { + var dragValue = xScale.invert(d3.event.x); + var dateWithTimezone = moment.tz(dragValue, props.timezone); + var BUFFER = 10; // Buffer in pixels to keep sliders from overlapping/crossing + if (slider === 'LEFT') { + var maximumX = xScale(selectionRange[1]) - BUFFER; + if (d3.event.x <= maximumX) { + setSelectionRange([dateWithTimezone, selectionRange[1]]); + } + } + else if (slider === 'RIGHT') { + var minimumX = xScale(selectionRange[0]) + BUFFER; + if (d3.event.x >= minimumX) { + setSelectionRange([selectionRange[0], dateWithTimezone]); + } + } + }); + }; + d3.select(leftMarkerRef.current).call(getEdgeDrag('LEFT')); + d3.select(rightMarkerRef.current).call(getEdgeDrag('RIGHT')); + }, [xScale, selectionRange, props.timezone]); + useEffect(function () { + /** + * Create the drag behavior used when selecting the middle area between a range. + * + * NOTE: This will not be used if .brushBar class has 'pointer-events: none' set, as the events will never be hit. + */ + var getBrushDrag = function () { + return d3 + .drag() + .on('start', function () { + setIsDragging(true); + hideElement(d3.select(hoverLineRef.current)); + hideElement(d3.select(hoverLineTextRef.current)); + }) + .on('end', function () { return setIsDragging(false); }) + .on('drag', function () { + var value = d3.event.x - d3.event.subject.x; + var currentLeft = xScale(selectionRange[0]); + var currentRight = xScale(selectionRange[1]); + var newLeft = currentLeft + value; + var newRight = currentRight + value; + var newLeftDate = moment.tz(xScale.invert(newLeft), props.timezone); + var newRightDate = moment.tz(xScale.invert(newRight), props.timezone); + setSelectionRange([newLeftDate, newRightDate]); + }); + }; + d3.select(brushBarRef.current).call(getBrushDrag()); + }, [xScale, selectionRange, props.timezone]); + // When the selection range is changed or the scale changes update the left, right, and brush markers + useEffect(function () { + if (leftMarkerRef.current && + rightMarkerRef.current && + brushBarRef.current) { + var leftMarker = d3.select(leftMarkerRef.current); + var rightMarker = d3.select(rightMarkerRef.current); + var brushBar = d3.select(brushBarRef.current); + if (props.mode === 'single' && selectionRange.length === 1) { + var leftMarker_1 = d3.select(leftMarkerRef.current); + var leftValue = selectionRange[0]; + leftMarker_1 + .attr('transform', "translate(".concat(xScale(leftValue), ", ").concat(markerHeight, ")")) + .attr('style', 'display: block'); + } + else if (props.mode !== 'single' && selectionRange.length == 2) { + var _a = __read(selectionRange, 2), leftValue = _a[0], rightValue = _a[1]; + leftMarker + .attr('transform', "translate(".concat(xScale(leftValue), ", ").concat(markerHeight, ")")) + .attr('style', 'display: block'); + rightMarker + .attr('transform', "translate(".concat(xScale(rightValue), ", ").concat(markerHeight, ")")) + .attr('style', 'display: block'); + brushBar + .attr('transform', "translate(".concat(xScale(leftValue), ",").concat(markerHeight, ")")) + .attr('width', xScale(rightValue) - xScale(leftValue)) + .attr('height', '50') + .attr('style', 'display: block'); + } + else { + hideElement(leftMarker); + hideElement(rightMarker); + hideElement(brushBar); + } + } + }, [xScale, selectionRange, props.mode, props.height, props.timezone]); + var renderCopyableDate = function (date) { + var formattedDate = convertToDisplayable(date, props.timezone, props.format); + return (React.createElement(React.Fragment, null, + React.createElement("br", null), + React.createElement(Button, { variant: "contained", onClick: function () { + var hiddenTextArea = document.createElement('textarea'); + hiddenTextArea.innerText = formattedDate; + document.body.appendChild(hiddenTextArea); + hiddenTextArea.select(); + document.execCommand('copy'); + document.body.removeChild(hiddenTextArea); + props.onCopy && props.onCopy(formattedDate); + } }, formattedDate))); + }; + var renderContext = function () { + var renderStartAndEnd = function () { return (React.createElement(React.Fragment, null, + React.createElement(TimeText, null, + React.createElement("b", null, "Start"), + selectionRange[0] && renderCopyableDate(selectionRange[0])), + React.createElement(TimeText, null, + React.createElement("b", null, "End"), + selectionRange[1] && renderCopyableDate(selectionRange[1])))); }; + // Single States - Empty, Single Time + if (props.mode === 'single') { + if (!selectionRange[0]) { + return (React.createElement(Message, null, "Click to select a time. Zoom with the scroll wheel.")); + } + return (React.createElement(TimeText, null, + React.createElement("b", null, "Time"), + selectionRange[0] && renderCopyableDate(selectionRange[0]))); + // Range States - Empty, Range of Times + } + else if (props.mode === 'range') { + if (!selectionRange[0]) { + return (React.createElement(Message, null, "Drag to select a range. Zoom with the scroll wheel.")); + } + return renderStartAndEnd(); + // Selection States - Empty, Start Time, Start + End Times + } + else { + if (!selectionRange[0]) { + return (React.createElement(Message, null, "Click to select a cluster of results. Zoom with the scroll wheel.")); + } + return renderStartAndEnd(); + } + }; + var lookupAlias = function (attribute) { + var dateAttributeAliases = props.dateAttributeAliases; + if (dateAttributeAliases && dateAttributeAliases[attribute]) { + return dateAttributeAliases[attribute]; + } + else { + return attribute; + } + }; + return (React.createElement(Root, { ref: rootRef, style: { height: '100%' } }, + React.createElement("div", null, + React.createElement(DateAttributeSelect, { visible: props.data && props.data.length > 0, variant: "outlined", onChange: function (e) { return setSelectedDateAttribute(e.target.value); }, value: selectedDateAttribute }, possibleDateAttributes.map(function (dateAttribute) { return (React.createElement(MenuItem, { value: dateAttribute }, lookupAlias(dateAttribute))); }))), + tooltip && (React.createElement(Tooltip, { message: tooltip.message, x: tooltip.x, y: tooltip.y })), + React.createElement("svg", { ref: d3ContainerRef }, + React.createElement("g", { className: "data-holder" }), + React.createElement("rect", { ref: brushBarRef, className: "brushBar" }), + React.createElement("g", { ref: hoverLineRef, style: { display: 'none' } }, + React.createElement(HoverLine, { x1: "0", y1: "0", x2: "0", y2: "50" })), + React.createElement(HoverLineText, { x: "0", y: "0", style: { display: 'none' }, ref: hoverLineTextRef }), + React.createElement(MarkerHover, { ref: leftMarkerRef }, + React.createElement(MarkerLine, { x1: "0", y1: "0", x2: "0", y2: "50" }), + React.createElement(MarkerLine, { x1: "0", y1: "0", x2: "0", y2: "50", hidden: true })), + React.createElement(MarkerHover, { ref: rightMarkerRef }, + React.createElement(MarkerLine, { x1: "0", y1: "0", x2: "0", y2: "50" }), + React.createElement(MarkerLine, { x1: "0", y1: "0", x2: "0", y2: "50", hidden: true })), + React.createElement("g", { className: "axis axis--x", id: "axis" }, + React.createElement("rect", { width: width, height: AXIS_HEIGHT + AXIS_MARGIN, fillOpacity: "0", fill: "black" }))), + React.createElement(ContextRow, null, + renderContext(), + React.createElement(ButtonArea, null, + React.createElement(TimelineButton, { variant: "contained", onClick: function () { return zoomOut(); }, icon: true }, "-"), + React.createElement(TimelineButton, { variant: "contained", onClick: function () { return zoomIn(); }, icon: true }, "+"), + props.onDone && props.mode && (React.createElement(TimelineButton, { color: "primary", variant: "contained", onClick: function () { + props.onDone && props.onDone(selectionRange); + setSelectionRange([]); + } }, "Done")))))); +}; +export default Timeline; +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxpbmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3RpbWVsaW5lL3RpbWVsaW5lLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDeEIsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ25ELE9BQU8sRUFBRSxPQUFPLEVBQWdCLE1BQU0sV0FBVyxDQUFBO0FBQ2pELE9BQU8sRUFDTCxLQUFLLEVBQ0wsVUFBVSxFQUNWLGVBQWUsRUFDZixvQkFBb0IsRUFDcEIsV0FBVyxHQUNaLE1BQU0sUUFBUSxDQUFBO0FBQ2YsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sU0FBUyxDQUFBO0FBQzNDLE9BQU8sQ0FBQyxNQUFNLFFBQVEsQ0FBQTtBQUV0QixPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLFFBQVEsTUFBTSx3QkFBd0IsQ0FBQTtBQUM3QyxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBQ2xDLE9BQU8sRUFBRSxh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9wZXJseSB0cmlnZ2VyIGEgY2xpY2sgYWN0aW9uIG9uIHRoZSByZWN0LlxuICAgICAqL1xuICAgIGNvbnN0IGdldFNlbGVjdGlvbkRyYWcgPSAoKSA9PiB7XG4gICAgICBsZXQgY2xpY2tTdGFydDogbnVtYmVyXG4gICAgICByZXR1cm4gKFxuICAgICAgICBkM1xuICAgICAgICAgIC5kcmFnKClcbiAgICAgICAgICAub24oJ3N0YXJ0JywgKCkgPT4ge1xuICAgICAgICAgICAgY2xpY2tTdGFydCA9IGQzLmV2ZW50LnhcbiAgICAgICAgICAgIGNvbnN0IG5ld0xlZnREYXRlID0gbW9tZW50LnR6KFxuICAgICAgICAgICAgICB4U2NhbGUuaW52ZXJ0KGNsaWNrU3RhcnQpLFxuICAgICAgICAgICAgICBwcm9wcy50aW1lem9uZVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgaWYgKHByb3BzLm1vZGUgPT09ICdzaW5nbGUnKSB7XG4gICAgICAgICAgICAgIHNldFNlbGVjdGlvblJhbmdlKFtuZXdMZWZ0RGF0ZV0pXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzZXRJc0RyYWdnaW5nKHRydWUpXG4gICAgICAgICAgICAgIGhpZGVFbGVtZW50KGQzLnNlbGVjdChob3ZlckxpbmVSZWYuY3VycmVudCkpXG4gICAgICAgICAgICAgIGhpZGVFbGVtZW50KGQzLnNlbGVjdChob3ZlckxpbmVUZXh0UmVmLmN1cnJlbnQpKVxuICAgICAgICAgICAgICBzZXRTZWxlY3Rpb25SYW5nZShbbmV3TGVmdERhdGVdKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLy8gU2V0IGlzRHJhZ2dpbmcgdG8gZmFsc2UgdG8gdHJpZ2dlciBhIHNlbGVjdGlvbiB1cGRhdGUsIGFkZGl0aW9uYWxseSBjaGVjayBpZiB1c2VyIG1lYW50IHRvIGNsaWNrLlxuICAgICAgICAgIC5vbignZW5kJywgKCkgPT4ge1xuICAgICAgICAgICAgaWYgKCFwcm9wcy5tb2RlKSB7XG4gICAgICAgICAgICAgIHNob3dFbGVtZW50KGQzLnNlbGVjdChob3ZlckxpbmVSZWYuY3VycmVudCkpXG4gICAgICAgICAgICAgIHNldElzRHJhZ2dpbmcoZmFsc2UpXG4gICAgICAgICAgICAgIGNvbnN0IGNsaWNrRGlzdGFuY2UgPSBjbGlja1N0YXJ0IC0gZDMuZXZlbnQueFxuICAgICAgICAgICAgICBjb25zdCBzb3VyY2VFdmVudCA9IGQzLmV2ZW50LnNvdXJjZUV2ZW50XG4gICAgICAgICAgICAgIGlmIChNYXRoLmFicyhjbGlja0Rpc3RhbmNlKSA8IDUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBub2RlTmFtZSA9IHNvdXJjZUV2ZW50LnNyY0VsZW1lbnQubm9kZU5hbWVcbiAgICAgICAgICAgICAgICBzZXRTZWxlY3Rpb25SYW5nZShbXSlcbiAgICAgICAgICAgICAgICBpZiAobm9kZU5hbWUgPT09ICdyZWN0JyB8fCBub2RlTmFtZSA9PT0gJ2xpbmUnKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCB4ID0gZDMuZXZlbnQueFxuICAgICAgICAgICAgICAgICAgY29uc3QgYnVja2V0ID0gZGF0YUJ1Y2tldHMuZmluZCgoYikgPT4gYi54MSA8IHggJiYgeCA8PSBiLngyKVxuICAgICAgICAgICAgICAgICAgYnVja2V0ICYmIHByb3BzLm9uU2VsZWN0ICYmIHByb3BzLm9uU2VsZWN0KGJ1Y2tldC5pdGVtcylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICAgIC5vbignZHJhZycsICgpID0+IHtcbiAgICAgICAgICAgIGlmIChwcm9wcy5tb2RlICE9PSAnc2luZ2xlJykge1xuICAgICAgICAgICAgICBjb25zdCBkaWZmID0gZDMuZXZlbnQueCAtIGQzLmV2ZW50LnN1YmplY3QueFxuICAgICAgICAgICAgICBjb25zdCBpbml0aWFsRGF0ZSA9IG1vbWVudC50eihcbiAgICAgICAgICAgICAgICB4U2NhbGUuaW52ZXJ0KGNsaWNrU3RhcnQpLFxuICAgICAgICAgICAgICAgIHByb3BzLnRpbWV6b25lXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgbGV0IGRyYWdDdXJyZW50ID0gY2xpY2tTdGFydCArIGRpZmZcbiAgICAgICAgICAgICAgY29uc3QgZHJhZ0RhdGUgPSBtb21lbnQudHooXG4gICAgICAgICAgICAgICAgeFNjYWxlLmludmVydChkcmFnQ3VycmVudCksXG4gICAgICAgICAgICAgICAgcHJvcHMudGltZXpvbmVcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICBpZiAoZGlmZiA+IDApIHtcbiAgICAgICAgICAgICAgICBzZXRTZWxlY3Rpb25SYW5nZShbaW5pdGlhbERhdGUsIGRyYWdEYXRlXSlcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzZXRTZWxlY3Rpb25SYW5nZShbZHJhZ0RhdGUsIGluaXRpYWxEYXRlXSlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pIGFzIGFueVxuICAgICAgKVxuICAgIH1cbiAgICBkMy5zZWxlY3QoZDNDb250YWluZXJSZWYuY3VycmVudCkuY2FsbChnZXRTZWxlY3Rpb25EcmFnKCkpXG4gIH0sIFtkYXRhQnVja2V0cywgc2VsZWN0aW9uUmFuZ2UsIHhTY2FsZSwgcHJvcHMudGltZXpvbmUsIHByb3BzLmZvcm1hdF0pXG4gIHVzZUVmZmVjdCgoKSA9PiB7XG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyB0aGUgZHJhZyBiZWhhdmlvciB1c2VkIHdoZW4gc2VsZWN0aW5nIHRoZSBsZWZ0IG9yIHJpZ2h0IHNsaWRlci5cbiAgICAgKlxuICAgICAqIFZhbGlkYXRpb24g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3Zlcj5cblxuICAgICAgICA8ZyBjbGFzc05hbWU9XCJheGlzIGF4aXMtLXhcIiBpZD1cImF4aXNcIj5cbiAgICAgICAgICA8cmVjdFxuICAgICAgICAgICAgd2lkdGg9e3dpZHRofVxuICAgICAgICAgICAgaGVpZ2h0PXtBWElTX0hFSUdIVCArIEFYSVNfTUFSR0lOfVxuICAgICAgICAgICAgZmlsbE9wYWNpdHk9XCIwXCJcbiAgICAgICAgICAgIGZpbGw9XCJibGFja1wiXG4gICAgICAgICAgLz5cbiAgICAgICAgPC9nPlxuICAgICAgPC9zdmc+XG4gICAgICA8Q29udGV4dFJvdz5cbiAgICAgICAge3JlbmRlckNvbnRleHQoKX1cbiAgICAgICAgPEJ1dHRvbkFyZWE+XG4gICAgICAgICAgPFRpbWVsaW5lQnV0dG9uIHZhcmlhbnQ9XCJjb250YWluZWRcIiBvbkNsaWNrPXsoKSA9PiB6b29tT3V0KCl9IGljb24+XG4gICAgICAgICAgICAtXG4gICAgICAgICAgPC9UaW1lbGluZUJ1dHRvbj5cbiAgICAgICAgICA8VGltZWxpbmVCdXR0b24gdmFyaWFudD1cImNvbnRhaW5lZFwiIG9uQ2xpY2s9eygpID0+IHpvb21JbigpfSBpY29uPlxuICAgICAgICAgICAgK1xuICAgICAgICAgIDwvVGltZWxpbmVCdXR0b24+XG4gICAgICAgICAge3Byb3BzLm9uRG9uZSAmJiBwcm9wcy5tb2RlICYmIChcbiAgICAgICAgICAgIDxUaW1lbGluZUJ1dHRvblxuICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICB2YXJpYW50PVwiY29udGFpbmVkXCJcbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgIHByb3BzLm9uRG9uZSAmJiBwcm9wcy5vbkRvbmUoc2VsZWN0aW9uUmFuZ2UpXG4gICAgICAgICAgICAgICAgc2V0U2VsZWN0aW9uUmFuZ2UoW10pXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIERvbmVcbiAgICAgICAgICAgIDwvVGltZWxpbmVCdXR0b24+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9CdXR0b25BcmVhPlxuICAgICAgPC9Db250ZXh0Um93PlxuICAgIDwvUm9vdD5cbiAgKVxufVxuZXhwb3J0IGRlZmF1bHQgVGltZWxpbmVcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/timeline/tooltip.d.ts b/src/main/webapp/component/timeline/tooltip.d.ts new file mode 100644 index 00000000000..0c70af342f1 --- /dev/null +++ b/src/main/webapp/component/timeline/tooltip.d.ts @@ -0,0 +1,7 @@ +/// +export type TooltipProps = { + x: number; + y: number; + message: string | any; +}; +export declare const Tooltip: (props: TooltipProps) => JSX.Element; diff --git a/src/main/webapp/component/timeline/tooltip.js b/src/main/webapp/component/timeline/tooltip.js new file mode 100644 index 00000000000..cafe2566225 --- /dev/null +++ b/src/main/webapp/component/timeline/tooltip.js @@ -0,0 +1,11 @@ +import { __makeTemplateObject } from "tslib"; +import * as React from 'react'; +import styled from 'styled-components'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n color: white;\n background-color: rgba(0, 0, 0, 0.7);\n max-width: 30%;\n border-radius: 8px;\n padding: 10px;\n z-index: 1;\n pointer-events: none;\n"], ["\n position: absolute;\n top: ", "px;\n left: ", "px;\n color: white;\n background-color: rgba(0, 0, 0, 0.7);\n max-width: 30%;\n border-radius: 8px;\n padding: 10px;\n z-index: 1;\n pointer-events: none;\n"])), function (props) { return props.pos.y; }, function (props) { return props.pos.x; }); +export var Tooltip = function (props) { + var x = props.x, y = props.y, message = props.message; + return (React.createElement(Root, { pos: { x: x, y: y } }, + React.createElement("span", null, message))); +}; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9vbHRpcC5qcyIsInNvdXJjZVJvb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tYmVyIH0gfT5gXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAkeyhwcm9wczogYW55KSA9PiBwcm9wcy5wb3MueX1weDtcbiAgbGVmdDogJHsocHJvcHM6IGFueSkgPT4gcHJvcHMucG9zLnh9cHg7XG4gIGNvbG9yOiB3aGl0ZTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgwLCAwLCAwLCAwLjcpO1xuICBtYXgtd2lkdGg6IDMwJTtcbiAgYm9yZGVyLXJhZGl1czogOHB4O1xuICBwYWRkaW5nOiAxMHB4O1xuICB6LWluZGV4OiAxO1xuICBwb2ludGVyLWV2ZW50czogbm9uZTtcbmBcblxuZXhwb3J0IHR5cGUgVG9vbHRpcFByb3BzID0ge1xuICB4OiBudW1iZXJcbiAgeTogbnVtYmVyXG4gIG1lc3NhZ2U6IHN0cmluZyB8IGFueVxufVxuXG5leHBvcnQgY29uc3QgVG9vbHRpcCA9IChwcm9wczogVG9vbHRpcFByb3BzKSA9PiB7XG4gIGNvbnN0IHsgeCwgeSwgbWVzc2FnZSB9ID0gcHJvcHNcbiAgcmV0dXJuIChcbiAgICA8Um9vdCBwb3M9e3sgeCwgeSB9fT5cbiAgICAgIDxzcGFuPnttZXNzYWdlfTwvc3Bhbj5cbiAgICA8L1Jvb3Q+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/timeline/types.d.ts b/src/main/webapp/component/timeline/types.d.ts new file mode 100644 index 00000000000..7f81a6dd362 --- /dev/null +++ b/src/main/webapp/component/timeline/types.d.ts @@ -0,0 +1 @@ +export type Timescale = d3.ScaleTime; diff --git a/src/main/webapp/component/timeline/types.js b/src/main/webapp/component/timeline/types.js new file mode 100644 index 00000000000..5df850a62d6 --- /dev/null +++ b/src/main/webapp/component/timeline/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3RpbWVsaW5lL3R5cGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgVGltZXNjYWxlID0gZDMuU2NhbGVUaW1lPG51bWJlciwgbnVtYmVyPlxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/timeline/util.d.ts b/src/main/webapp/component/timeline/util.d.ts new file mode 100644 index 00000000000..231286cf925 --- /dev/null +++ b/src/main/webapp/component/timeline/util.d.ts @@ -0,0 +1,9 @@ +import { Moment } from 'moment-timezone'; +import { TimelineItem } from './timeline'; +/** Python's "range" function */ +export declare const range: (n: number) => number[]; +export declare const createTestData: (n: number) => TimelineItem[]; +export declare const formatDate: (value: Moment, format: string) => string; +export declare const convertToDisplayable: (value: Moment, timezone: string, format: string) => string; +export declare const dateWithinRange: (date: Moment, range: Moment[]) => boolean; +export declare const multiFormat: (date: Date) => string; diff --git a/src/main/webapp/component/timeline/util.js b/src/main/webapp/component/timeline/util.js new file mode 100644 index 00000000000..4b16ab7506f --- /dev/null +++ b/src/main/webapp/component/timeline/util.js @@ -0,0 +1,83 @@ +import * as d3 from 'd3'; +import moment from 'moment-timezone'; +import user from '../singletons/user-instance'; +/** Python's "range" function */ +export var range = function (n) { return Array.from(Array(n).keys()); }; +var getDataPoint = function (num, createdYear, modifiedYear, publishedYear) { + var month = Math.floor(Math.random() * 12); + var year = Math.floor(Math.random() * 40); + var day = Math.floor(Math.random() * 28); + return { + id: "Result ".concat((num + 1).toString()), + selected: false, + attributes: { + created: [ + moment(new Date(createdYear + year, 0, 1)) + .add(month, 'months') + .add(day, 'days'), + ], + modified: [moment(new Date(modifiedYear + year, 0, 1))], + published_date: [ + moment(new Date(publishedYear + year, 0, 1)).add(day, 'days'), + ], + }, + }; +}; +export var createTestData = function (n) { + if (typeof n !== 'number' || n < 1) { + return []; + } + return range(n).map(function (num) { return getDataPoint(num, 1980, 1983, 1987); }); +}; +export var formatDate = function (value, format) { + return value.format(format); +}; +export var convertToDisplayable = function (value, timezone, format) { return moment(value).tz(timezone).format(format); }; +export var dateWithinRange = function (date, range) { + return range[0] < date && date < range[1]; +}; +var is12HourFormat = function (format) { return format.includes('h'); }; +var timeFormat = function (format) { + return function (date) { return moment(date).tz(user.getTimeZone()).format(format); }; +}; +var formatMillisecond = timeFormat(':SSS'); +var formatSecond = timeFormat(':ss'); +var formatDay = timeFormat('ddd DD'); +var formatWeek = timeFormat('MMM DD'); +var formatMonth = timeFormat('MMMM'); +var formatYear = timeFormat('YYYY'); +export var multiFormat = function (date) { + if (d3.utcSecond(date) < date) { + return formatMillisecond(date); // milliseconds :259 + } + else if (d3.utcMinute(date) < date) { + return formatSecond(date); // seconds :59 + } + else if (d3.utcHour(date) < date) { + var formatMinute = is12HourFormat(user.getDateTimeFormat()) + ? timeFormat('hh:mm') + : timeFormat('HH:mm'); + return formatMinute(date); // 12:00 + } + else if (d3.utcDay(date) < date) { + var formatHour = is12HourFormat(user.getDateTimeFormat()) + ? timeFormat('hh A') + : timeFormat('HH:mm'); + return formatHour(date); // 12 AM or 12:00 + } + else if (d3.utcMonth(date) < date) { + if (d3.utcWeek(date) < date) { + return formatDay(date); // Wed 08 + } + else { + return formatWeek(date); // Feb 08 + } + } + else if (d3.utcYear(date) < date) { + return formatMonth(date); // February + } + else { + return formatYear(date); // 2003 + } +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdGltZWxpbmUvdXRpbC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSx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yMDAzXG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/upload-batch-item/upload-batch-item.view.d.ts b/src/main/webapp/component/upload-batch-item/upload-batch-item.view.d.ts new file mode 100644 index 00000000000..a8f1811f577 --- /dev/null +++ b/src/main/webapp/component/upload-batch-item/upload-batch-item.view.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +export declare const UploadBatchItemViewReact: ({ model }: { + model: any; +}) => JSX.Element; diff --git a/src/main/webapp/component/upload-batch-item/upload-batch-item.view.js b/src/main/webapp/component/upload-batch-item/upload-batch-item.view.js new file mode 100644 index 00000000000..3fb3cf24296 --- /dev/null +++ b/src/main/webapp/component/upload-batch-item/upload-batch-item.view.js @@ -0,0 +1,54 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __read } from "tslib"; +import user from '../singletons/user-instance'; +import { UploadSummaryViewReact } from '../upload-summary/upload-summary.view'; +import { Link } from 'react-router-dom'; +import * as React from 'react'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import Button from '@mui/material/Button'; +import Paper from '@mui/material/Paper'; +import CloseIcon from '@mui/icons-material/Close'; +import Common from '../../js/Common'; +import { TypedUserInstance } from '../singletons/TypedUser'; +export var UploadBatchItemViewReact = function (_a) { + var model = _a.model; + var _b = __read(React.useState(model.toJSON()), 2), modelJson = _b[0], setModelJson = _b[1]; + useListenTo(model, 'change:finished', function () { + setModelJson(model.toJSON()); + }); + var id = modelJson.id, finished = modelJson.finished, sentAt = modelJson.sentAt, interrupted = modelJson.interrupted; + var when = Common.getRelativeDate(sentAt); + var specificWhen = TypedUserInstance.getMomentDate(sentAt); + return (React.createElement(Paper, { className: "".concat(finished ? 'is-finished' : '', " flex flex-row items-stretch flex-nowrap w-full justify-between p-2") }, + React.createElement(Link, { to: "/uploads/".concat(id), style: { display: 'block', padding: '0px' }, className: "w-full shrink no-underline", title: specificWhen }, + React.createElement("div", { className: "upload-details" }, + React.createElement("div", { className: "details-date is-medium-font" }, + React.createElement("span", { className: "fa fa-upload p-2" }), + React.createElement("span", null, when)), + React.createElement("div", { className: "details-summary mt-2" }, + React.createElement(UploadSummaryViewReact, { model: model })))), + React.createElement("div", { className: "upload-actions shrink-0 " }, finished || interrupted ? (React.createElement(React.Fragment, null, + React.createElement(Button, { className: " h-full w-12", onClick: function () { + model.collection.remove(model); + user.get('user').get('preferences').savePreferences(); + } }, + React.createElement(CloseIcon, null)))) : (React.createElement(React.Fragment, null, + React.createElement(Button, { className: " h-full w-12", onClick: function () { + model.cancel(); + } }, + React.createElement("span", { className: "fa fa-stop" }))))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkLWJhdGNoLWl0ZW0udmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdXBsb2FkLWJhdGNoLWl0ZW0vdXBsb2FkLWJhdGNoLWl0ZW0udmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7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AgICAgICAgIDxzcGFuIGNsYXNzTmFtZT1cImZhIGZhLXVwbG9hZCBwLTJcIiAvPlxuICAgICAgICAgICAgPHNwYW4+e3doZW59PC9zcGFuPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZGV0YWlscy1zdW1tYXJ5IG10LTJcIj5cbiAgICAgICAgICAgIDxVcGxvYWRTdW1tYXJ5Vmlld1JlYWN0IG1vZGVsPXttb2RlbH0gLz5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L0xpbms+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cInVwbG9hZC1hY3Rpb25zIHNocmluay0wIFwiPlxuICAgICAgICB7ZmluaXNoZWQgfHwgaW50ZXJydXB0ZWQgPyAoXG4gICAgICAgICAgPD5cbiAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiIGgtZnVsbCB3LTEyXCJcbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgIG1vZGVsLmNvbGxlY3Rpb24ucmVtb3ZlKG1vZGVsKVxuICAgICAgICAgICAgICAgIHVzZXIuZ2V0KCd1c2VyJykuZ2V0KCdwcmVmZXJlbmNlcycpLnNhdmVQcmVmZXJlbmNlcygpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxDbG9zZUljb24gLz5cbiAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDwvPlxuICAgICAgICApIDogKFxuICAgICAgICAgIDw+XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cIiBoLWZ1bGwgdy0xMlwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICBtb2RlbC5jYW5jZWwoKVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9XCJmYSBmYS1zdG9wXCIgLz5cbiAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDwvPlxuICAgICAgICApfVxuICAgICAgPC9kaXY+XG4gICAgPC9QYXBlcj5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/upload-item/upload-item.collection.view.d.ts b/src/main/webapp/component/upload-item/upload-item.collection.view.d.ts new file mode 100644 index 00000000000..d6e04d3b46f --- /dev/null +++ b/src/main/webapp/component/upload-item/upload-item.collection.view.d.ts @@ -0,0 +1,6 @@ +/// +type UploadItemCollectionType = { + collection: any; +}; +export declare const UploadItemCollection: ({ collection, }: UploadItemCollectionType) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/upload-item/upload-item.collection.view.js b/src/main/webapp/component/upload-item/upload-item.collection.view.js new file mode 100644 index 00000000000..2f004e543b6 --- /dev/null +++ b/src/main/webapp/component/upload-item/upload-item.collection.view.js @@ -0,0 +1,29 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import UploadItemViewReact from './upload-item.view'; +export var UploadItemCollection = function (_a) { + var collection = _a.collection; + var _b = __read(React.useState(Math.random()), 2), setForceRender = _b[1]; + useListenTo(collection, 'add remove reset', function () { + setForceRender(Math.random()); + }); + return (React.createElement("div", { className: " overflow-hidden flex flex-col space-y-2" }, collection.models.map(function (model) { + return React.createElement(UploadItemViewReact, { key: model.cid, model: model }); + }))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0IHsgdXNlTGlzdGVuVG8gfSBmcm9tICcuLi9zZWxlY3Rpb24tY2hlY2tib3gvdXNlQmFja2JvbmUuaG9vaydcbmltcG9ydCBVcGxvYWRJdGVtVmlld1JlYWN0IGZyb20gJy4vdXBsb2FkLWl0ZW0udmlldydcblxudHlwZSBVcGxvYWRJdGVtQ29sbGVjdGlvblR5cGUgPSB7XG4gIGNvbGxlY3Rpb246IGFueVxufVxuXG5leHBvcnQgY29uc3QgVXBsb2FkSXRlbUNvbGxlY3Rpb24gPSAoe1xuICBjb2xsZWN0aW9uLFxufTogVXBsb2FkSXRlbUNvbGxlY3Rpb25UeXBlKSA9PiB7XG4gIGNvbnN0IFssIHNldEZvcmNlUmVuZGVyXSA9IFJlYWN0LnVzZVN0YXRlKE1hdGgucmFuZG9tKCkpXG4gIHVzZUxpc3RlblRvKGNvbGxlY3Rpb24sICdhZGQgcmVtb3ZlIHJlc2V0JywgKCkgPT4ge1xuICAgIHNldEZvcmNlUmVuZGVyKE1hdGgucmFuZG9tKCkpXG4gIH0pXG4gIHJldHVybiAoXG4gICAgPGRpdiBjbGFzc05hbWU9XCIgb3ZlcmZsb3ctaGlkZGVuIGZsZXggZmxleC1jb2wgc3BhY2UteS0yXCI+XG4gICAgICB7Y29sbGVjdGlvbi5tb2RlbHMubWFwKChtb2RlbDogYW55KSA9PiB7XG4gICAgICAgIHJldHVybiA8VXBsb2FkSXRlbVZpZXdSZWFjdCBrZXk9e21vZGVsLmNpZH0gbW9kZWw9e21vZGVsfSAvPlxuICAgICAgfSl9XG4gICAgPC9kaXY+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/upload-item/upload-item.view.d.ts b/src/main/webapp/component/upload-item/upload-item.view.d.ts new file mode 100644 index 00000000000..5cc61e91345 --- /dev/null +++ b/src/main/webapp/component/upload-item/upload-item.view.d.ts @@ -0,0 +1,7 @@ +/// +type UploadItemViewReactType = { + model: any; +}; +export declare const UploadItemViewReact: ({ model }: UploadItemViewReactType) => JSX.Element; +declare const _default: ({ model }: UploadItemViewReactType) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/upload-item/upload-item.view.js b/src/main/webapp/component/upload-item/upload-item.view.js new file mode 100644 index 00000000000..d0c135c86fd --- /dev/null +++ b/src/main/webapp/component/upload-item/upload-item.view.js @@ -0,0 +1,86 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import LinearProgress from '@mui/material/LinearProgress'; +import { useHistory } from 'react-router-dom'; +var modelToJSON = function (model) { + var modelJSON = model.toJSON(); + modelJSON.file = { + name: modelJSON.file.name, + size: (modelJSON.file.size / 1000000).toFixed(2) + 'MB, ', + type: modelJSON.file.type, + }; + return modelJSON; +}; +export var UploadItemViewReact = function (_a) { + var model = _a.model; + var history = useHistory(); + var _b = __read(React.useState(modelToJSON(model)), 2), modelJson = _b[0], setModelJson = _b[1]; + var _c = __read(React.useState(false), 2), cancel = _c[0], setCancel = _c[1]; + useListenTo(model, 'change:percentage change:sending change:success change:error change:validating change:issues', function () { + setModelJson(modelToJSON(model)); + }); + React.useEffect(function () { + if (cancel && model) { + model.cancel(); + } + }, [cancel, model]); + var isSending = modelJson.sending; + var hasError = modelJson.error; + var hasSuccess = modelJson.success; + var hasIssues = modelJson.issues; + var isValidating = modelJson.validating; + return (React.createElement("div", { className: "flex flex-row items-center flex-nowrap w-full p-4 border-gray-600/25 border", onClick: function () { + if (model.get('success') && !model.hasChildren()) { + history.push({ + pathname: "/metacards/".concat(model.get('id')), + }); + } + } }, + React.createElement("div", { className: "w-full shrink" }, + React.createElement("div", { className: "text-center" }, + React.createElement("div", null, + React.createElement("span", { className: "top-filename" }, modelJson.file.name)), + React.createElement("div", null, + React.createElement("div", null, + React.createElement("span", { className: "bottom-filesize" }, modelJson.file.size), + React.createElement("span", { className: "bottom-filetype" }, modelJson.file.type)), + React.createElement("div", null, Math.floor(modelJson.percentage) + '%'))), + !hasSuccess && !hasError && isSending ? (React.createElement(LinearProgress, { className: "h-2 w-full", value: modelJson.percentage, variant: "determinate" })) : null, + hasSuccess ? (React.createElement("div", { className: "info-success text-center" }, + React.createElement("div", { className: "success-message" }, + hasIssues ? (React.createElement("span", null, "Uploaded, but quality issues were found ")) : (React.createElement(React.Fragment, null)), + isValidating ? (React.createElement("span", { className: "success-validate fa fa-refresh fa-spin is-critical-animation" })) : (React.createElement(React.Fragment, null)), + hasIssues ? React.createElement("span", { className: "message-text" }) : React.createElement(React.Fragment, null)))) : null, + hasError ? (React.createElement("div", { className: "info-error text-center" }, + React.createElement("div", { className: "error-message" }, modelJson.message))) : null), + React.createElement("div", { className: "upload-actions shrink-0" }, + !isSending ? (React.createElement(Button, { onClick: function () { + setCancel(true); + } }, "Remove")) : null, + hasSuccess ? (React.createElement(Button, { onClick: function () { + history.push({ + pathname: "/metacards/".concat(model.get('id')), + }); + } }, "Success")) : (React.createElement(React.Fragment, null)), + hasError ? (React.createElement(React.Fragment, null, + React.createElement("div", null, "Failures"))) : (React.createElement(React.Fragment, null))))); +}; +export default hot(module)(UploadItemViewReact); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkLWl0ZW0udmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdXBsb2FkLWl0ZW0vdXBsb2FkLWl0ZW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1dHRvblxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICBzZXRDYW5jZWwodHJ1ZSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgUmVtb3ZlXG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICkgOiBudWxsfVxuXG4gICAgICAgIHtoYXNTdWNjZXNzID8gKFxuICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgaGlzdG9yeS5wdXNoKHtcbiAgICAgICAgICAgICAgICBwYXRobmFtZTogYC9tZXRhY2FyZHMvJHttb2RlbC5nZXQoJ2lkJyl9YCxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgU3VjY2Vzc1xuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICApIDogKFxuICAgICAgICAgIDw+PC8+XG4gICAgICAgICl9XG5cbiAgICAgICAge2hhc0Vycm9yID8gKFxuICAgICAgICAgIDw+XG4gICAgICAgICAgICA8ZGl2PkZhaWx1cmVzPC9kaXY+XG4gICAgICAgICAgPC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPD48Lz5cbiAgICAgICAgKX1cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShVcGxvYWRJdGVtVmlld1JlYWN0KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/upload-summary/upload-summary.view.d.ts b/src/main/webapp/component/upload-summary/upload-summary.view.d.ts new file mode 100644 index 00000000000..21e14f7ce52 --- /dev/null +++ b/src/main/webapp/component/upload-summary/upload-summary.view.d.ts @@ -0,0 +1,6 @@ +/// +type UploadSummaryViewReactType = { + model: any; +}; +export declare const UploadSummaryViewReact: ({ model, }: UploadSummaryViewReactType) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/upload-summary/upload-summary.view.js b/src/main/webapp/component/upload-summary/upload-summary.view.js new file mode 100644 index 00000000000..b07e8617d04 --- /dev/null +++ b/src/main/webapp/component/upload-summary/upload-summary.view.js @@ -0,0 +1,48 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { useListenTo } from '../selection-checkbox/useBackbone.hook'; +import LinearProgress from '@mui/material/LinearProgress'; +import Button from '@mui/material/Button'; +import { useHistory } from 'react-router-dom'; +export var UploadSummaryViewReact = function (_a) { + var model = _a.model; + var history = useHistory(); + var _b = __read(React.useState(model.toJSON()), 2), modelJson = _b[0], setModelJson = _b[1]; + useListenTo(model, 'change:amount change:errors change:complete change:percentage change:sending change:issues', function () { + setModelJson(model.toJSON()); + }); + var amount = modelJson.amount, complete = modelJson.complete, percentage = modelJson.percentage, success = modelJson.success, sending = modelJson.sending, error = modelJson.error, issues = modelJson.issues, interrupted = modelJson.interrupted, finished = modelJson.finished; + var isSending = sending; + var hasError = error; + var hasSuccess = success; + var hasIssues = issues > 0; + var wasInterrupted = interrupted; + return (React.createElement(Button, { className: "".concat(isSending ? 'show-progress' : '', " ").concat(hasError ? 'has-error' : '', " ").concat(hasSuccess ? 'has-success' : '', " ").concat(hasIssues ? 'has-issues' : '', " ").concat(wasInterrupted ? 'was-interrupted' : ''), fullWidth: true, onClick: function () { + history.push({ + pathname: "/uploads/".concat(model.id), + }); + } }, + React.createElement("div", { className: "upload-summary is-medium-font" }, + React.createElement("div", { className: "summary-info flex flex-col justify-start items-center" }, + React.createElement("div", { className: "info-files" }, + React.createElement("span", { className: "files-issues fa fa-exclamation-triangle mr-2" }), + React.createElement("span", { className: "files-text" }, "".concat(complete + ' / ' + amount + ' Completed'))), + !finished && !wasInterrupted ? (React.createElement(React.Fragment, null, + React.createElement("div", { className: "info-percentage" }, Math.floor(percentage) + '%'), + React.createElement(LinearProgress, { className: "w-full h-2", variant: "determinate", value: percentage }))) : (React.createElement(React.Fragment, null)))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkLXN1bW1hcnkudmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdXBsb2FkLXN1bW1hcnkvdXBsb2FkLXN1bW1hcnkudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdDQUF3QyxDQUFBO0FBQ3BFLE9BQU8sY0FBYyxNQUFNLDhCQUE4QixDQUFBO0FBQ3pELE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUk3QyxNQUFNLENBQUMsSUFBTSxzQkFBc0IsR0FBRyxVQUFDLEVBRVY7UUFEM0IsS0FBSyxXQUFBO0lBRUwsSUFBTSxPQUFPLEdBQUcsVUFBVSxFQUFFLENBQUE7SUFDdEIsSUFBQSxLQUFBLE9BQTRCLEtBQUssQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLElBQUEsRUFBekQsU0FBUyxRQUFBLEVBQUUsWUFBWSxRQUFrQyxDQUFBO0lBQ2hFLFdBQVcsQ0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kICYmICF3YXNJbnRlcnJ1cHRlZCA/IChcbiAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiaW5mby1wZXJjZW50YWdlXCI+XG4gICAgICAgICAgICAgICAge01hdGguZmxvb3IocGVyY2VudGFnZSkgKyAnJSd9XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICA8TGluZWFyUHJvZ3Jlc3NcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ3LWZ1bGwgaC0yXCJcbiAgICAgICAgICAgICAgICB2YXJpYW50PVwiZGV0ZXJtaW5hdGVcIlxuICAgICAgICAgICAgICAgIHZhbHVlPXtwZXJjZW50YWdlfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC8+XG4gICAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDw+PC8+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L0J1dHRvbj5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/user/utils.d.ts b/src/main/webapp/component/user/utils.d.ts new file mode 100644 index 00000000000..3143b48b894 --- /dev/null +++ b/src/main/webapp/component/user/utils.d.ts @@ -0,0 +1,2 @@ +export declare const DEFAULT_DATE_TIME_FORMAT = "DD MMMM YYYY h:mm a Z"; +export declare const getDateTimeFormat: () => any; diff --git a/src/main/webapp/component/user/utils.js b/src/main/webapp/component/user/utils.js new file mode 100644 index 00000000000..73ec483cfba --- /dev/null +++ b/src/main/webapp/component/user/utils.js @@ -0,0 +1,16 @@ +import userInstance from '../singletons/user-instance'; +export var DEFAULT_DATE_TIME_FORMAT = 'DD MMMM YYYY h:mm a Z'; +export var getDateTimeFormat = function () { + try { + var dateTimeFormat = userInstance + .get('user') + .get('preferences') + .get('dateTimeFormat').datetimefmt; + return dateTimeFormat || DEFAULT_DATE_TIME_FORMAT; + } + catch (err) { + console.error("Unable to retrieve user's prefered datetime format. Retrieving default datetime format.", err); + return DEFAULT_DATE_TIME_FORMAT; + } +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3VzZXIvdXRpbHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sWUFBWSxNQUFNLDZCQUE2QixDQUFBO0FBRXRELE1BQU0sQ0FBQyxJQUFNLHdCQUF3QixHQUFHLHVCQUF1QixDQUFBO0FBRS9ELE1BQU0sQ0FBQyxJQUFNLGlCQUFpQixHQUFHO0lBQy9CLElBQUk7UUFDRixJQUFNLGNBQWMsR0FBRyxZQUFZO2FBQ2hDLEdBQUcsQ0FBQyxNQUFNLENBQUM7YUFDWCxHQUFHLENBQUMsYUFBYSxDQUFDO2FBQ2xCLEdBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLFdBQVcsQ0FBQTtRQUVwQyxPQUFPLGNBQWMsSUFBSSx3QkFBd0IsQ0FBQTtLQUNsRDtJQUFDLE9BQU8sR0FBRyxFQUFFO1FBQ1osT0FBTyxDQUFDLEtBQUssQ0FDWCx5RkFBeUYsRUFDekYsR0FBRyxDQUNKLENBQUE7UUFDRCxPQUFPLHdCQUF3QixDQUFBO0tBQ2hDO0FBQ0gsQ0FBQyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHVzZXJJbnN0YW5jZSBmcm9tICcuLi9zaW5nbGV0b25zL3VzZXItaW5zdGFuY2UnXG5cbmV4cG9ydCBjb25zdCBERUZBVUxUX0RBVEVfVElNRV9GT1JNQVQgPSAnREQgTU1NTSBZWVlZIGg6bW0gYSBaJ1xuXG5leHBvcnQgY29uc3QgZ2V0RGF0ZVRpbWVGb3JtYXQgPSAoKSA9PiB7XG4gIHRyeSB7XG4gICAgY29uc3QgZGF0ZVRpbWVGb3JtYXQgPSB1c2VySW5zdGFuY2VcbiAgICAgIC5nZXQoJ3VzZXInKVxuICAgICAgLmdldCgncHJlZmVyZW5jZXMnKVxuICAgICAgLmdldCgnZGF0ZVRpbWVGb3JtYXQnKS5kYXRldGltZWZtdFxuXG4gICAgcmV0dXJuIGRhdGVUaW1lRm9ybWF0IHx8IERFRkFVTFRfREFURV9USU1FX0ZPUk1BVFxuICB9IGNhdGNoIChlcnIpIHtcbiAgICBjb25zb2xlLmVycm9yKFxuICAgICAgXCJVbmFibGUgdG8gcmV0cmlldmUgdXNlcidzIHByZWZlcmVkIGRhdGV0aW1lIGZvcm1hdC4gUmV0cmlldmluZyBkZWZhdWx0IGRhdGV0aW1lIGZvcm1hdC5cIixcbiAgICAgIGVyclxuICAgIClcbiAgICByZXR1cm4gREVGQVVMVF9EQVRFX1RJTUVfRk9STUFUXG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/histogram/add-on-helpers.d.ts b/src/main/webapp/component/visualization/histogram/add-on-helpers.d.ts new file mode 100644 index 00000000000..bac7a09ed1c --- /dev/null +++ b/src/main/webapp/component/visualization/histogram/add-on-helpers.d.ts @@ -0,0 +1,19 @@ +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +export type CustomHover = { + text: string; + bgColor: string; + fontColor: string; +}; +export declare const getCustomHover: (results: LazyQueryResult[], defaultHoverlabel: { + bgcolor: string; + font: { + color: string; + }; +}) => CustomHover; +export declare const getCustomHoverTemplates: (name: string, customHoverArray: CustomHover[]) => string[]; +export declare const getCustomHoverLabels: (customHoverArray: CustomHover[]) => { + bgcolor: string[]; + font: { + color: string[]; + }; +}; diff --git a/src/main/webapp/component/visualization/histogram/add-on-helpers.js b/src/main/webapp/component/visualization/histogram/add-on-helpers.js new file mode 100644 index 00000000000..ac9a49bf9c1 --- /dev/null +++ b/src/main/webapp/component/visualization/histogram/add-on-helpers.js @@ -0,0 +1,27 @@ +import extension from '../../../extension-points'; +export var getCustomHover = function (results, defaultHoverlabel) { + var defaultHover = { + text: '', + bgColor: defaultHoverlabel.bgcolor, + fontColor: defaultHoverlabel.font.color, + }; + if (!extension.customHistogramHover) + return defaultHover; + return (extension.customHistogramHover({ + results: results, + }) || defaultHover); +}; +export var getCustomHoverTemplates = function (name, customHoverArray) { + return customHoverArray.map(function (customHover) { + return "%{y} ".concat(name).concat(customHover.text, ""); + }); +}; +export var getCustomHoverLabels = function (customHoverArray) { + return { + bgcolor: customHoverArray.map(function (customHover) { return customHover.bgColor; }), + font: { + color: customHoverArray.map(function (customHover) { return customHover.fontColor; }), + }, + }; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLW9uLWhlbHBlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vaGlzdG9ncmFtL2FkZC1vbi1oZWxwZXJzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLFNBQVMsTUFBTSwyQkFBMkIsQ0FBQTtBQVNqRCxNQUFNLENBQUMsSUFBTSxjQUFjLEdBQUcsVUFDNUIsT0FBMEIsRUFDMUIsaUJBQStEO0lBRS9ELElBQU0sWUFBWSxHQUFHO1FBQ25CLElBQUksRUFBRSxFQUFFO1FBQ1IsT0FBTyxFQUFFLGlCQUFpQixDQUFDLE9BQU87UUFDbEMsU0FBUyxFQUFFLGlCQUFpQixDQUFDLElBQUksQ0FBQyxLQUFLO0tBQ3hDLENBQUE7SUFFRCxJQUFJLENBQUMsU0FBUyxDQUFDLG9CQUFvQjtRQUFFLE9BQU8sWUFBWSxDQUFBO0lBRXhELE9BQU8sQ0FDTCxTQUFTLENBQUMsb0JBQW9CLENBQUM7UUFDN0IsT0FBTyxT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Ib3Zlci5iZ0NvbG9yKSxcbiAgICBmb250OiB7XG4gICAgICBjb2xvcjogY3VzdG9tSG92ZXJBcnJheS5tYXAoKGN1c3RvbUhvdmVyKSA9PiBjdXN0b21Ib3Zlci5mb250Q29sb3IpLFxuICAgIH0sXG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/histogram/histogram.d.ts b/src/main/webapp/component/visualization/histogram/histogram.d.ts new file mode 100644 index 00000000000..48e33c91da4 --- /dev/null +++ b/src/main/webapp/component/visualization/histogram/histogram.d.ts @@ -0,0 +1,7 @@ +/// +type Props = { + selectionInterface: any; +}; +export declare const Histogram: ({ selectionInterface }: Props) => JSX.Element; +declare const _default: ({ selectionInterface }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/histogram/histogram.js b/src/main/webapp/component/visualization/histogram/histogram.js new file mode 100644 index 00000000000..79e38171b25 --- /dev/null +++ b/src/main/webapp/component/visualization/histogram/histogram.js @@ -0,0 +1,553 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks'; +import { useBackbone } from '../../selection-checkbox/useBackbone.hook'; +import { useSelectedResults } from '../../../js/model/LazyQueryResult/hooks'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import _cloneDeep from 'lodash.clonedeep'; +import wreqr from '../../../js/wreqr'; +import $ from 'jquery'; +import _ from 'underscore'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'plot... Remove this comment to see the full error message +import Plotly from 'plotly.js/dist/plotly'; +import moment from 'moment'; +import extension from '../../../extension-points'; +import { useTheme } from '@mui/material/styles'; +import { getCustomHoverLabels, getCustomHoverTemplates, getCustomHover, } from './add-on-helpers'; +import { StartupDataStore } from '../../../js/model/Startup/startup'; +var zeroWidthSpace = '\u200B'; +var plotlyDateFormat = 'YYYY-MM-DD HH:mm:ss.SS'; +function getPlotlyDate(date) { + return moment(date).format(plotlyDateFormat); +} +function calculateAvailableAttributes(results) { + var availableAttributes = []; + results.forEach(function (result) { + availableAttributes = _.union(availableAttributes, Object.keys(result.plain.metacard.properties)); + }); + return availableAttributes + .filter(function (attribute) { + return !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attribute); + }) + .map(function (attribute) { return ({ + label: StartupDataStore.MetacardDefinitions.getAlias(attribute), + value: attribute, + }); }); +} +function calculateAttributeArray(_a) { + var results = _a.results, attribute = _a.attribute; + var values = []; + results.forEach(function (result) { + if (StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] + .multivalued) { + var resultValues = result.plain.metacard.properties[attribute]; + if (resultValues && resultValues.forEach) { + resultValues.forEach(function (value) { + addValueForAttributeToArray({ valueArray: values, attribute: attribute, value: value }); + }); + } + else { + addValueForAttributeToArray({ + valueArray: values, + attribute: attribute, + value: resultValues, + }); + } + } + else { + addValueForAttributeToArray({ + valueArray: values, + attribute: attribute, + value: result.plain.metacard.properties[attribute], + }); + } + }); + return values; +} +function findMatchesForAttributeValues(results, attribute, values) { + return results.filter(function (result) { + if (StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] + .multivalued) { + var resultValues = result.plain.metacard.properties[attribute]; + if (resultValues && resultValues.forEach) { + for (var i = 0; i < resultValues.length; i++) { + if (checkIfValueIsValid(values, attribute, resultValues[i])) { + return true; + } + } + return false; + } + else { + return checkIfValueIsValid(values, attribute, resultValues); + } + } + else { + return checkIfValueIsValid(values, attribute, result.plain.metacard.properties[attribute]); + } + }); +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +function checkIfValueIsValid(values, attribute, value) { + if (value !== undefined) { + switch (StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute].type) { + case 'DATE': + var plotlyDate = getPlotlyDate(value); + return plotlyDate >= values[0] && plotlyDate <= values[1]; + case 'BOOLEAN': + case 'STRING': + case 'GEOMETRY': + return values.indexOf(value.toString() + zeroWidthSpace) >= 0; + default: + return value >= values[0] && value <= values[1]; + } + } +} +function addValueForAttributeToArray(_a) { + var valueArray = _a.valueArray, attribute = _a.attribute, value = _a.value; + if (value !== undefined) { + switch (StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute].type) { + case 'DATE': + valueArray.push(getPlotlyDate(value)); + break; + case 'BOOLEAN': + case 'STRING': + case 'GEOMETRY': + valueArray.push(value.toString() + zeroWidthSpace); + break; + default: + valueArray.push(parseFloat(value)); + break; + } + } +} +function getIndexClicked(data) { + return Math.max.apply(undefined, data.points.map(function (point) { return point.pointNumber; })); +} +function getValueFromClick(data, categories) { + switch (data.points[0].xaxis.type) { + case 'category': + return [data.points[0].x]; + case 'date': + var currentDate_1 = moment(data.points[0].x).format(plotlyDateFormat); + return _.find(categories, function (category) { + return currentDate_1 >= category[0] && currentDate_1 <= category[1]; + }); + default: + return _.find(categories, function (category) { + return (data.points[0].x >= category[0] && data.points[0].x <= category[1]); + }); + } +} +function getLayout(fontColor, plot) { + var baseLayout = { + autosize: true, + paper_bgcolor: 'rgba(0,0,0,0)', + plot_bgcolor: 'rgba(0,0,0,0)', + font: { + family: '"Open Sans Light","Helvetica Neue",Helvetica,Arial,sans-serif', + size: 16, + color: 'inherit', + fill: 'inherit', + }, + margin: { + t: 10, + l: 50, + r: 115, + b: 140, + pad: 0, + autoexpand: true, + }, + barmode: 'overlay', + xaxis: { + fixedrange: true, + color: fontColor, + }, + yaxis: { + fixedrange: true, + color: fontColor, + }, + showlegend: true, + legend: { + font: { color: fontColor }, + }, + }; + if (plot) { + baseLayout.xaxis.autorange = false; + baseLayout.xaxis.range = plot._fullLayout.xaxis.range; + baseLayout.yaxis.range = plot._fullLayout.yaxis.range; + baseLayout.yaxis.autorange = false; + } + return baseLayout; +} +var getAutocompleteState = function (_a) { + var lazyResults = _a.lazyResults, attributeToBin = _a.attributeToBin; + return { + choices: calculateAvailableAttributes(Object.values(lazyResults.results)), + value: attributeToBin, + }; +}; +export var Histogram = function (_a) { + var selectionInterface = _a.selectionInterface; + var listenTo = useBackbone().listenTo; + var theme = useTheme(); + var isDarkTheme = theme.palette.mode === 'dark'; + var _b = __read(React.useState(false), 2), noMatchingData = _b[0], setNoMatchingData = _b[1]; + var plotlyRef = React.useRef(); + var plotlyReadyForUpdatesRef = React.useRef(false); + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResults = useSelectedResults({ lazyResults: lazyResults }); + var _c = __read(React.useState(''), 2), attributeToBin = _c[0], setAttributeToBin = _c[1]; + var _d = __read(React.useState(getAutocompleteState({ lazyResults: lazyResults, attributeToBin: attributeToBin })), 2), autocompleteState = _d[0], setAutocompleteState = _d[1]; + var results = Object.values(lazyResults.results); + React.useEffect(function () { + setNoMatchingData(false); + }, [lazyResults.results, attributeToBin]); + React.useEffect(function () { + setAutocompleteState(getAutocompleteState({ lazyResults: lazyResults, attributeToBin: attributeToBin })); + }, [lazyResults.results]); + React.useEffect(function () { + showHistogram(); + }, [lazyResults.results, attributeToBin, theme]); + React.useEffect(function () { + if (plotlyReadyForUpdatesRef.current) { + // avoid updating the histogram if it's not ready yet + updateHistogram(); + } + }, [selectedResults]); + var defaultFontColor = isDarkTheme ? 'white' : 'black'; + var defaultHoverLabel = { + bgcolor: isDarkTheme ? 'black' : 'white', + font: { + color: defaultFontColor, + }, + }; + var getCustomHoverArray = function (categories, results) { + var customArray = []; + categories.forEach(function (category) { + var matchedResults = findMatchesForAttributeValues(results, attributeToBin, category.constructor === Array ? category : [category]); + if ((matchedResults && matchedResults.length > 0) || + customArray.length > 0) { + customArray.push(getCustomHover(matchedResults, defaultHoverLabel)); + } + }); + return customArray.length > 0 ? customArray : undefined; + }; + var determineInitialData = function () { + return [ + { + x: calculateAttributeArray({ + results: results, + attribute: attributeToBin, + }), + opacity: 1, + type: 'histogram', + name: 'Hits', + marker: { + color: 'rgba(120, 120, 120, .05)', + line: { + color: 'rgba(120,120,120,.2)', + width: '2', + }, + }, + hovertemplate: '%{y} Hits', + hoverlabel: defaultHoverLabel, + }, + ]; + }; + var determineData = function (plot) { + var activeResults = results; + var xbins = _cloneDeep(plot._fullData[0].xbins); + var categories = retrieveCategoriesFromPlotly(); + var customHoverArray = undefined; + var selectedCustomHoverArray = undefined; + if (extension.customHistogramHover) { + customHoverArray = getCustomHoverArray(categories, results); + selectedCustomHoverArray = getCustomHoverArray(categories, Object.values(selectedResults)); + } + return [ + { + x: calculateAttributeArray({ + results: activeResults, + attribute: attributeToBin, + }), + opacity: 1, + type: 'histogram', + name: 'Hits', + marker: { + color: 'rgba(120, 120, 120, .05)', + line: { + color: 'rgba(120,120,120,.2)', + width: '2', + }, + }, + hoverlabel: customHoverArray + ? getCustomHoverLabels(customHoverArray) + : defaultHoverLabel, + hovertemplate: customHoverArray + ? getCustomHoverTemplates('Hits', customHoverArray) + : '%{y} Hits', + autobinx: false, + xbins: xbins, + }, + { + x: calculateAttributeArray({ + results: Object.values(selectedResults), + attribute: attributeToBin, + }), + opacity: 1, + type: 'histogram', + name: 'Selected', + marker: { + color: 'rgba(120, 120, 120, .2)', + line: { + color: 'rgba(120,120,120,.5)', + width: '2', + }, + }, + hoverlabel: selectedCustomHoverArray + ? getCustomHoverLabels(selectedCustomHoverArray) + : defaultHoverLabel, + hovertemplate: selectedCustomHoverArray + ? getCustomHoverTemplates('Selected', selectedCustomHoverArray) + : '%{y} Selected', + autobinx: false, + xbins: xbins, + }, + ]; + }; + var handleResize = function () { + if (plotlyRef.current) { + var histogramElement = plotlyRef.current; + $(histogramElement).find('rect.drag').off('mousedown'); + if (histogramElement._context) { + Plotly.Plots.resize(histogramElement); + } + $(histogramElement) + .find('rect.drag') + .on('mousedown', function (event) { + shiftKey.current = event.shiftKey; + metaKey.current = event.metaKey; + ctrlKey.current = event.ctrlKey; + }); + } + }; + React.useEffect(function () { + var id = (Math.random() * 100).toFixed(0).toString(); + listenTo(wreqr.vent, 'resize', handleResize); + $(window).on("resize.".concat(id), handleResize); + return function () { + $(window).off("resize.".concat(id)); + }; + }, []); + var showHistogram = function () { + plotlyReadyForUpdatesRef.current = false; + if (plotlyRef.current) { + if (results.length > 0 && attributeToBin) { + var histogramElement_1 = plotlyRef.current; + var initialData = determineInitialData(); + if (initialData[0].x.length === 0) { + setNoMatchingData(true); + } + else { + Plotly.newPlot(histogramElement_1, initialData, getLayout(defaultFontColor), { + displayModeBar: false, + }).then(function (plot) { + Plotly.newPlot(histogramElement_1, determineData(plot), getLayout(defaultFontColor, plot), { + displayModeBar: false, + }); + handleResize(); + listenToHistogram(); + plotlyReadyForUpdatesRef.current = true; + }); + } + } + else { + plotlyRef.current.innerHTML = ''; + } + } + }; + var updateHistogram = function () { + if (plotlyRef.current) { + var histogramElement = plotlyRef.current; + if (histogramElement !== null && + histogramElement.children.length !== 0 && + attributeToBin && + results.length > 0) { + try { + Plotly.deleteTraces(histogramElement, 1); + } + catch (err) { + console.error('Unable to delete trace', err); + } + Plotly.addTraces(histogramElement, determineData(histogramElement)[1]); + handleResize(); + } + else { + histogramElement.innerHTML = ''; + } + } + }; + var selectBetween = function (firstIndex, lastIndex) { + for (var i = firstIndex; i <= lastIndex; i++) { + if (pointsSelected.current.indexOf(i) === -1) { + pointsSelected.current.push(i); + } + } + var attributeToCheck = attributeToBin; + var categories = retrieveCategoriesFromPlotly(); + var validCategories = categories.slice(firstIndex, lastIndex); + var activeSearchResults = results; + var validResults = validCategories.reduce(function (results, category) { + results = results.concat(findMatchesForAttributeValues(activeSearchResults, attributeToCheck, category.constructor === Array ? category : [category])); + return results; + }, []); + validResults.forEach(function (result) { + result.setSelected(true); + }); + }; + // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. + var retrieveCategoriesFromPlotlyForDates = function () { + if (plotlyRef.current) { + var histogramElement = plotlyRef.current; + var categories = []; + var xbins = histogramElement._fullData[0].xbins; + var min = xbins.start; + var max = parseInt(moment(xbins.end).format('x')); + var start = parseInt(moment(min).format('x')); + var inMonths = xbins.size.constructor === String; + var binSize = inMonths ? parseInt(xbins.size.substring(1)) : xbins.size; + while (start < max) { + var startDate = moment(start).format(plotlyDateFormat); + var endDate = inMonths + ? moment(start).add(binSize, 'months').format(plotlyDateFormat) + : moment(start).add(binSize, 'ms').format(plotlyDateFormat); + categories.push([startDate, endDate]); + start = parseInt(inMonths + ? moment(start).add(binSize, 'months').format('x') + : moment(start).add(binSize, 'ms').format('x')); + } + return categories; + } + }; + // This is an internal variable for Plotly, so it might break if we update Plotly in the future. + // Regardless, there was no other way to reliably get the categories. + var retrieveCategoriesFromPlotly = function () { + if (plotlyRef.current) { + var histogramElement = plotlyRef.current; + var xaxis = histogramElement._fullLayout.xaxis; + switch (xaxis.type) { + case 'category': + return xaxis._categories; + case 'date': + return retrieveCategoriesFromPlotlyForDates(); + default: + var xbins = histogramElement._fullData[0].xbins; + var min = xbins.start; + var max = xbins.end; + var binSize = xbins.size; + var categories = []; + var start = min; + while (start < max) { + categories.push([start, start + binSize]); + start += binSize; + } + return categories; + } + } + }; + var handleControlClick = function (data, alreadySelected) { + var attributeToCheck = attributeToBin; + var categories = retrieveCategoriesFromPlotly(); + var matchedResults = findMatchesForAttributeValues(results, attributeToCheck, getValueFromClick(data, categories)); + if (alreadySelected) { + matchedResults.forEach(function (result) { + result.setSelected(false); + }); + pointsSelected.current.splice(pointsSelected.current.indexOf(getIndexClicked(data)), 1); + } + else { + matchedResults.forEach(function (result) { + result.setSelected(true); + }); + pointsSelected.current.push(getIndexClicked(data)); + } + }; + var handleShiftClick = function (data) { + var indexClicked = getIndexClicked(data); + var firstIndex = pointsSelected.current.length === 0 + ? -1 + : pointsSelected.current.reduce(function (currentMin, point) { return Math.min(currentMin, point); }, pointsSelected.current[0]); + var lastIndex = pointsSelected.current.length === 0 + ? -1 + : pointsSelected.current.reduce(function (currentMin, point) { return Math.max(currentMin, point); }, pointsSelected.current[0]); + if (firstIndex === -1 && lastIndex === -1) { + lazyResults.deselect(); + handleControlClick(data, false); + } + else if (indexClicked <= firstIndex) { + selectBetween(indexClicked, firstIndex); + } + else if (indexClicked >= lastIndex) { + selectBetween(lastIndex, indexClicked + 1); + } + else { + selectBetween(firstIndex, indexClicked + 1); + } + }; + var plotlyClickHandler = function (data) { + var indexClicked = getIndexClicked(data); + var alreadySelected = pointsSelected.current.indexOf(indexClicked) >= 0; + if (shiftKey.current) { + handleShiftClick(data); + } + else if (ctrlKey.current || metaKey.current) { + handleControlClick(data, alreadySelected); + } + else { + lazyResults.deselect(); + resetPointSelection(); + handleControlClick(data, alreadySelected); + } + resetKeyTracking(); + }; + var listenToHistogram = function () { + if (plotlyRef.current) { + var histogramElement = plotlyRef.current; + histogramElement._ev.addListener('plotly_click', plotlyClickHandler); + } + }; + var shiftKey = React.useRef(false); + var metaKey = React.useRef(false); + var ctrlKey = React.useRef(false); + var pointsSelected = React.useRef([]); + var resetKeyTracking = function () { + shiftKey.current = false; + metaKey.current = false; + ctrlKey.current = false; + }; + var resetPointSelection = function () { + pointsSelected.current = []; + }; + if (Object.keys(lazyResults.results).length === 0) { + return React.createElement("div", { style: { padding: '20px' } }, "No results found"); + } + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "p-2" }, + React.createElement(Autocomplete, { size: "small", options: autocompleteState.choices, onChange: function (_e, newValue) { + setAttributeToBin(newValue.value); + }, isOptionEqualToValue: function (option) { return option.value === attributeToBin; }, getOptionLabel: function (option) { + return option.label; + }, disableClearable: true, value: autocompleteState.choices.find(function (choice) { return choice.value === attributeToBin; }), renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Group by", variant: "outlined" }))); } })), + React.createElement("div", { className: "plotly-histogram", ref: plotlyRef, style: { + height: 'calc(100% - 135px)', + width: '100%', + display: noMatchingData ? 'none' : 'block', + } }), + noMatchingData ? (React.createElement("div", { style: { padding: '20px' } }, "No data in this result set has that attribute")) : null)); +}; +export default hot(module)(Histogram); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlzdG9ncmFtLmpzIiwic291cmNlUm9vd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nRcbiAgICAgICAgY29uc3QgaW5pdGlhbERhdGEgPSBkZXRlcm1pbmVJbml0aWFsRGF0YSgpXG4gICAgICAgIGlmIChpbml0aWFsRGF0YVswXS54Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgIHNldE5vTWF0Y2hpbmdEYXRhKHRydWUpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgUGxvdGx5Lm5ld1Bsb3QoXG4gICAgICAgICAgICBoaXN0b2dyYW1FbGVtZW50LFxuICAgICAgICAgICAgaW5pdGlhbERhdGEsXG4gICAgICAgICAgICBnZXRMYXlvdXQoZGVmYXVsdEZvbnRDb2xvciksXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGRpc3BsYXlNb2RlQmFyOiBmYWxzZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApLnRoZW4oKHBsb3Q6IGFueSkgPT4ge1xuICAgICAgICAgICAgUGxvdGx5Lm5ld1Bsb3QoXG4gICAgICAgICAgICAgIGhpc3RvZ3JhbUVsZW1lbnQsXG4gICAgICAgICAgICAgIGRldGVybWluZURhdGEocGxvdCksXG4gICAgICAgICAgICAgIGdldExheW91dChkZWZhdWx0Rm9udENvbG9yLCBwbG90KSxcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGRpc3BsYXlNb2RlQmFyOiBmYWxzZSxcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgaGFuZGxlUmVzaXplKClcbiAgICAgICAgICAgIGxpc3RlblRvSGlzdG9ncmFtKClcbiAgICAgICAgICAgIHBsb3RseVJlYWR5Rm9yVXBkYXRlc1JlZi5jdXJyZW50ID0gdHJ1ZVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBsb3RseVJlZi5jdXJyZW50LmlubmVySFRNTCA9ICcnXG4gICAgICB9XG4gICAgfVxuICB9XG4gIGNvbnN0IHVwZGF0ZUhpc3RvZ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aWNlKFxuICAgICAgICBwb2ludHNTZWxlY3RlZC5jdXJyZW50LmluZGV4T2YoZ2V0SW5kZXhDbGlja2VkKGRhdGEpKSxcbiAgICAgICAgMVxuICAgICAgKVxuICAgIH0gZWxzZSB7XG4gICAgICBtYXRjaGVkUmVzdWx0cy5mb3JFYWNoKChyZXN1bHQpID0+IHtcbiAgICAgICAgcmVzdWx0LnNldFNlbGVjdGVkKHRydWUpXG4gICAgICB9KVxuICAgICAgcG9pbnRzU2VsZWN0ZWQuY3VycmVudC5wdXNoKGdldEluZGV4Q2xpY2tlZChkYXRhKSlcbiAgICB9XG4gIH1cbiAgY29uc3QgaGFuZGxlU2hpZnRDbGljayA9IChkYXRhOiBhbnkpID0+IHtcbiAgICBjb25zdCBpbmRleENsaWNrZWQgPSBnZXRJbmRleENsaWNrZWQoZGF0YSlcbiAgICBjb25zdCBmaXJzdEluZGV4ID1cbiAgICAgIHBvaW50c1NlbGVjdGVkLmN1cnJlbnQubGVuZ3RoID09PSAwXG4gICAgICAgID8gLTFcbiAgICAgICAgOiBwb2ludHNTZWxlY3RlZC5jdXJyZW50LnJlZHVjZShcbiAgICAgICAgICAgIChjdXJyZW50TWluLCBwb2ludCkgPT4gTWF0aC5taW4oY3VycmVudE1pbiwgcG9pbnQpLFxuICAgICAgICAgICAgcG9pbnRzU2VsZWN0ZWQuY3VycmVudFswXVxuICAgICAgICAgIClcbiAgICBjb25zdCBsYXN0SW5kZXggPVxuICAgICAgcG9pbnRzU2VsZWN0ZWQuY3VycmVudC5sZW5ndGggPT09IDBcbiAgICAgICAgPyAtMVxuICAgICAgICA6IHBvaW50c1NlbGVjdGVkLmN1cnJlbnQucmVkdWNlKFxuICAgICAgICAgICAgKGN1cnJlbnRNaW4sIHBvaW50KSA9PiBNYXRoLm1heChjdXJyZW50TWluLCBwb2ludCksXG4gICAgICAgICAgICBwb2ludHNTZWxlY3RlZC5jdXJyZW50WzBdXG4gICAgICAgICAgKVxuICAgIGlmIChmaXJzdEluZGV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VwicC0yXCI+XG4gICAgICAgIDxBdXRvY29tcGxldGVcbiAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgIG9wdGlvbnM9e2F1dG9jb21wbGV0ZVN0YXRlLmNob2ljZXN9XG4gICAgICAgICAgb25DaGFuZ2U9eyhfZTogYW55LCBuZXdWYWx1ZSkgPT4ge1xuICAgICAgICAgICAgc2V0QXR0cmlidXRlVG9CaW4obmV3VmFsdWUudmFsdWUpXG4gICAgICAgICAgfX1cbiAgICAgICAgICBpc09wdGlvbkVxdWFsVG9WYWx1ZT17KG9wdGlvbikgPT4gb3B0aW9uLnZhbHVlID09PSBhdHRyaWJ1dGVUb0Jpbn1cbiAgICAgICAgICBnZXRPcHRpb25MYWJlbD17KG9wdGlvbikgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIG9wdGlvbi5sYWJlbFxuICAgICAgICAgIH19XG4gICAgICAgICAgZGlzYWJsZUNsZWFyYWJsZVxuICAgICAgICAgIHZhbHVlPXthdXRvY29tcGxldGVTdGF0ZS5jaG9pY2VzLmZpbmQoXG4gICAgICAgICAgICAoY2hvaWNlKSA9PiBjaG9pY2UudmFsdWUgPT09IGF0dHJpYnV0ZVRvQmluXG4gICAgICAgICAgKX1cbiAgICAgICAgICByZW5kZXJJbnB1dD17KHBhcmFtcykgPT4gKFxuICAgICAgICAgICAgPFRleHRGaWVsZCB7Li4ucGFyYW1zfSBsYWJlbD1cIkdyb3VwIGJ5XCIgdmFyaWFudD1cIm91dGxpbmVkXCIgLz5cbiAgICAgICAgICApfVxuICAgICAgICAvPlxuICAgICAgPC9kaXY+XG4gICAgICA8ZGl2XG4gICAgICAgIGNsYXNzTmFtZT1cInBsb3RseS1oaXN0b2dyYW1cIlxuICAgICAgICByZWY9e3Bsb3RseVJlZiBhcyBhbnl9XG4gICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgaGVpZ2h0OiAnY2FsYygxMDAlIC0gMTM1cHgpJyxcbiAgICAgICAgICB3aWR0aDogJzEwMCUnLFxuICAgICAgICAgIGRpc3BsYXk6IG5vTWF0Y2hpbmdEYXRhID8gJ25vbmUnIDogJ2Jsb2NrJyxcbiAgICAgICAgfX1cbiAgICAgIC8+XG4gICAgICB7bm9NYXRjaGluZ0RhdGEgPyAoXG4gICAgICAgIDxkaXYgc3R5bGU9e3sgcGFkZGluZzogJzIwcHgnIH19PlxuICAgICAgICAgIE5vIGRhdGEgaW4gdGhpcyByZXN1bHQgc2V0IGhhcyB0aGF0IGF0dHJpYnV0ZVxuICAgICAgICA8L2Rpdj5cbiAgICAgICkgOiBudWxsfVxuICAgIDwvPlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShIaXN0b2dyYW0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/inspector/audited-inspector.d.ts b/src/main/webapp/component/visualization/inspector/audited-inspector.d.ts new file mode 100644 index 00000000000..8ea46cddefb --- /dev/null +++ b/src/main/webapp/component/visualization/inspector/audited-inspector.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +export declare const AuditedInspector: ({ selectionInterface, }: { + selectionInterface: any; +}) => JSX.Element; diff --git a/src/main/webapp/component/visualization/inspector/audited-inspector.js b/src/main/webapp/component/visualization/inspector/audited-inspector.js new file mode 100644 index 00000000000..278623dac9a --- /dev/null +++ b/src/main/webapp/component/visualization/inspector/audited-inspector.js @@ -0,0 +1,24 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { AuditComponent } from './inspector.audit'; +import Inspector from './inspector'; +export var AuditedInspector = function (_a) { + var selectionInterface = _a.selectionInterface; + return (React.createElement(React.Fragment, null, + React.createElement(AuditComponent, { selectionInterface: selectionInterface }), + React.createElement(Inspector, { selectionInterface: selectionInterface }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXVkaXRlZC1pbnNwZWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vaW5zcGVjdG9yL2F1ZGl0ZWQtaW5zcGVjdG9yLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBRUosT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFOUIsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBQ2xELE9BQU8sU0FBUyxNQUFNLGFBQWEsQ0FBQTtBQUVuQyxNQUFNLENBQUMsSUFBTSxnQkFBZ0IsR0FBRyxVQUFDLEVBSWhDO1FBSEMsa0JBQWtCLHdCQUFBO0lBSWxCLE9BQU8sQ0FDTCxvQkFBQyxLQUFLLENBQUMsUUFBUTtRQUNiLG9CQUFDLGNBQWMsSUFBQyxrQkFBa0IsRUFBRSxrQkFBa0IsR0FBSTtRQUMxRCxvQkFBQyxTQUFTLElBQUMsa0JBQWtCLEVBQUUsa0JBQWtCLEdBQUksQ0FDdEMsQ0FDb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XRDb21wb25lbnQgfSBmcm9tICcuL2luc3BlY3Rvci5hdWRpdCdcbmltcG9ydCBJbnNwZWN0b3IgZnJvbSAnLi9pbnNwZWN0b3InXG5cbmV4cG9ydCBjb25zdCBBdWRpdGVkSW5zcGVjdG9yID0gKHtcbiAgc2VsZWN0aW9uSW50ZXJmYWNlLFxufToge1xuICBzZWxlY3Rpb25JbnRlcmZhY2U6IGFueVxufSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxSZWFjdC5GcmFnbWVudD5cbiAgICAgIDxBdWRpdENvbXBvbmVudCBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX0gLz5cbiAgICAgIDxJbnNwZWN0b3Igc2VsZWN0aW9uSW50ZXJmYWNlPXtzZWxlY3Rpb25JbnRlcmZhY2V9IC8+XG4gICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/inspector/inspector.audit.d.ts b/src/main/webapp/component/visualization/inspector/inspector.audit.d.ts new file mode 100644 index 00000000000..f2613c17638 --- /dev/null +++ b/src/main/webapp/component/visualization/inspector/inspector.audit.d.ts @@ -0,0 +1,6 @@ +export declare const useSelectionAuditing: ({ selectionInterface, }: { + selectionInterface: any; +}) => void; +export declare const AuditComponent: ({ selectionInterface, }: { + selectionInterface: any; +}) => null; diff --git a/src/main/webapp/component/visualization/inspector/inspector.audit.js b/src/main/webapp/component/visualization/inspector/inspector.audit.js new file mode 100644 index 00000000000..7c2adf7e80d --- /dev/null +++ b/src/main/webapp/component/visualization/inspector/inspector.audit.js @@ -0,0 +1,59 @@ +import { __read } from "tslib"; +import React from 'react'; +import { useEffect } from 'react'; +import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks'; +import { useSelectedResults } from '../../../js/model/LazyQueryResult/hooks'; +import { postAuditLog, } from '../../../react-component/utils/audit/audit-endpoint'; +export var useSelectionAuditing = function (_a) { + var selectionInterface = _a.selectionInterface; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResults = useSelectedResults({ + lazyResults: lazyResults, + }); + var _b = __read(React.useState(new Set()), 2), selectedIds = _b[0], setSelectedIds = _b[1]; + var getAuditItems = function (ids) { + var items = []; + ids.forEach(function (id) { + var _a, _b, _c; + var properties = (_c = (_b = (_a = lazyResults === null || lazyResults === void 0 ? void 0 : lazyResults.results[id]) === null || _a === void 0 ? void 0 : _a.plain) === null || _b === void 0 ? void 0 : _b.metacard) === null || _c === void 0 ? void 0 : _c.properties; + if (properties) { + items.push({ id: properties.id, 'source-id': properties['source-id'] }); + } + }); + return items; + }; + useEffect(function () { + var newSelectedIds = new Set(Object.keys(selectedResults)); + var unselectedIds = new Set(); + selectedIds.forEach(function (id) { + if (!newSelectedIds.has(id)) { + unselectedIds.add(id); + } + }); + var newSelectedItems = getAuditItems(newSelectedIds); + var unselectedItems = getAuditItems(unselectedIds); + if (unselectedItems.length > 0) { + postAuditLog({ + action: 'unselected', + component: 'resource', + items: unselectedItems, + }); + } + if (newSelectedItems.length > 0) { + postAuditLog({ + action: 'selected', + component: 'resource', + items: newSelectedItems, + }); + setSelectedIds(newSelectedIds); + } + }, [selectedResults]); +}; +export var AuditComponent = function (_a) { + var selectionInterface = _a.selectionInterface; + useSelectionAuditing({ selectionInterface: selectionInterface }); + return null; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zcGVjdG9yLmF1ZGl0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92aXN1YWxpemF0aW9uL2luc3BlY3Rvci9pbnNwZWN0b3IuYXVkaXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxFQUFFLF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nNlbGVjdGVkSXRlbXMgPSBnZXRBdWRpdEl0ZW1zKHVuc2VsZWN0ZWRJZHMpXG5cbiAgICBpZiAodW5zZWxlY3RlZEl0ZW1zLmxlbmd0aCA+IDApIHtcbiAgICAgIHBvc3RBdWRpdExvZyh7XG4gICAgICAgIGFjdGlvbjogJ3Vuc2VsZWN0ZWQnLFxuICAgICAgICBjb21wb25lbnQ6ICdyZXNvdXJjZScsXG4gICAgICAgIGl0ZW1zOiB1bnNlbGVjdGVkSXRlbXMsXG4gICAgICB9KVxuICAgIH1cblxuICAgIGlmIChuZXdTZWxlY3RlZEl0ZW1zLmxlbmd0aCA+IDApIHtcbiAgICAgIHBvc3RBdWRpdExvZyh7XG4gICAgICAgIGFjdGlvbjogJ3NlbGVjdGVkJyxcbiAgICAgICAgY29tcG9uZW50OiAncmVzb3VyY2UnLFxuICAgICAgICBpdGVtczogbmV3U2VsZWN0ZWRJdGVtcyxcbiAgICAgIH0pXG4gICAgICBzZXRTZWxlY3RlZElkcyhuZXdTZWxlY3RlZElkcylcbiAgICB9XG4gIH0sIFtzZWxlY3RlZFJlc3VsdHNdKVxufVxuXG5leHBvcnQgY29uc3QgQXVkaXRDb21wb25lbnQgPSAoe1xuICBzZWxlY3Rpb25JbnRlcmZhY2UsXG59OiB7XG4gIHNlbGVjdGlvbkludGVyZmFjZTogYW55XG59KSA9PiB7XG4gIHVzZVNlbGVjdGlvbkF1ZGl0aW5nKHsgc2VsZWN0aW9uSW50ZXJmYWNlIH0pXG4gIHJldHVybiBudWxsXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/inspector/inspector.d.ts b/src/main/webapp/component/visualization/inspector/inspector.d.ts new file mode 100644 index 00000000000..58a6220700f --- /dev/null +++ b/src/main/webapp/component/visualization/inspector/inspector.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +type InspectorType = { + selectionInterface: any; +}; +type TitleViewType = { + lazyResult: LazyQueryResult; +}; +export declare const TitleView: ({ lazyResult }: TitleViewType) => JSX.Element; +declare const _default: ({ selectionInterface }: InspectorType) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/inspector/inspector.js b/src/main/webapp/component/visualization/inspector/inspector.js new file mode 100644 index 00000000000..29224c212e4 --- /dev/null +++ b/src/main/webapp/component/visualization/inspector/inspector.js @@ -0,0 +1,162 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign, __read } from "tslib"; +import Button from '@mui/material/Button'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useLazyResultsSelectedResultsFromSelectionInterface } from '../../selection-interface/hooks'; +import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft'; +import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; +import { getIconClassName } from '../results-visual/result-item'; +import LazyMetacardInteractions from '../results-visual/lazy-metacard-interactions'; +import MoreVertIcon from '@mui/icons-material/MoreVert'; +import { useMenuState } from '../../menu-state/menu-state'; +import Popover from '@mui/material/Popover'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../../theme/theme'; +import OverflowTooltip from '../../overflow-tooltip/overflow-tooltip'; +import Tabs from '@mui/material/Tabs'; +import MaterialTab from '@mui/material/Tab'; +import MetacardTabs, { TabNames } from '../../tabs/metacard/tabs-metacard'; +import { useRerenderOnBackboneSync } from '../../../js/model/LazyQueryResult/hooks'; +import Extensions from '../../../extension-points'; +var useSelectedResultsArrayFromSelectionInterface = function (_a) { + var selectionInterface = _a.selectionInterface; + var _b = __read(React.useState([]), 2), selectedResultsArray = _b[0], setSelectedResultsArray = _b[1]; + var selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + React.useEffect(function () { + setSelectedResultsArray(Object.values(selectedResults)); + }, [selectedResults]); + return selectedResultsArray; +}; +export var TitleView = function (_a) { + var lazyResult = _a.lazyResult; + var menuState = useMenuState(); + useRerenderOnBackboneSync({ lazyResult: lazyResult }); + return (React.createElement("div", { className: "flex flex-row items-center justify-center flex-nowrap p-2" }, + React.createElement("span", { className: "".concat(getIconClassName({ lazyResult: lazyResult }), " font-awesome-span") }), + React.createElement(Extensions.resultTitleIconAddOn, { lazyResult: lazyResult }), + React.createElement(OverflowTooltip, { className: 'truncate' }, lazyResult.plain.metacard.properties.title), + React.createElement(Button, __assign({}, menuState.MuiButtonProps), + React.createElement(MoreVertIcon, null)), + React.createElement(Popover, __assign({}, menuState.MuiPopoverProps, { keepMounted: true }), + React.createElement(Paper, { elevation: Elevations.overlays }, + React.createElement(LazyMetacardInteractions, { lazyResults: [lazyResult], onClose: menuState.handleClose }))))); +}; +var defaultActiveTab = 'Details'; +var useLastAsDefaultActiveTab = function (tabIndex) { + React.useEffect(function () { + defaultActiveTab = tabIndex; + }, [tabIndex]); +}; +var useIndexForSelectedResults = function (selectedResults) { + var _a = __read(React.useState(0), 2), index = _a[0], setIndex = _a[1]; + React.useEffect(function () { + setIndex(0); + }, [selectedResults]); + return [index, setIndex]; +}; +var usePossibleMetacardTabs = function (_a) { + var result = _a.result; + var _b = __read(React.useState(MetacardTabs), 2), possibleMetacardTabs = _b[0], setPossibleMetacardTabs = _b[1]; + React.useEffect(function () { + if (result) { + var copyOfMetacardTabs = __assign({}, MetacardTabs); + if (result.isRevision()) { + delete copyOfMetacardTabs[TabNames.History]; + delete copyOfMetacardTabs[TabNames.Actions]; + } + if (result.isDeleted()) { + delete copyOfMetacardTabs[TabNames.History]; + delete copyOfMetacardTabs[TabNames.Actions]; + } + if (result.isRemote()) { + delete copyOfMetacardTabs[TabNames.History]; + delete copyOfMetacardTabs[TabNames.Quality]; + } + if (!result.hasPreview()) { + delete copyOfMetacardTabs[TabNames.Preview]; + } + setPossibleMetacardTabs(copyOfMetacardTabs); + } + else { + setPossibleMetacardTabs({}); + } + }, [result]); + return possibleMetacardTabs; +}; +var useMetacardTabs = function (_a) { + var _b; + var result = _a.result; + var possibleMetacardTabs = usePossibleMetacardTabs({ result: result }); + var _c = __read(React.useState(defaultActiveTab), 2), activeTab = _c[0], setActiveTab = _c[1]; + useLastAsDefaultActiveTab(activeTab); + React.useEffect(function () { + if (Object.keys(possibleMetacardTabs).length > 0 && + !possibleMetacardTabs[activeTab]) { + setActiveTab(TabNames.Details); + } + }, [possibleMetacardTabs]); + return { + possibleMetacardTabs: possibleMetacardTabs, + activeTab: activeTab, + setActiveTab: setActiveTab, + TabContent: ((_b = possibleMetacardTabs[activeTab]) === null || _b === void 0 ? void 0 : _b.content) || (function () { return null; }), + }; +}; +var Inspector = function (_a) { + var selectionInterface = _a.selectionInterface; + var selectedResults = useSelectedResultsArrayFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var _b = __read(useIndexForSelectedResults(selectedResults), 2), index = _b[0], setIndex = _b[1]; + var amountSelected = selectedResults.length; + var currentResult = selectedResults[index]; + var _c = useMetacardTabs({ result: currentResult }), possibleMetacardTabs = _c.possibleMetacardTabs, activeTab = _c.activeTab, setActiveTab = _c.setActiveTab, TabContent = _c.TabContent; + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "flex flex-col flex-nowrap h-full overflow-hidden" }, + amountSelected > 1 ? (React.createElement("div", { className: "flex flex-row items-center justify-center flex-nowrap shrink-0 grow-0" }, + React.createElement(Button, { onClick: function () { + setIndex(index - 1); + }, disabled: index === 0 }, + React.createElement(KeyboardArrowLeftIcon, { color: "inherit", className: "Mui-text-text-primary Mui-icon-size-small" }), + React.createElement(KeyboardArrowLeftIcon, { color: "inherit", className: "-ml-3 Mui-text-text-primary Mui-icon-size-small" })), + "Item ", + index + 1, + " / ", + amountSelected, + React.createElement(Button, { onClick: function () { + setIndex(index + 1); + }, disabled: index === amountSelected - 1 }, + React.createElement(KeyboardArrowRightIcon, { color: "inherit", className: "Mui-text-text-primary" }), + React.createElement(KeyboardArrowRightIcon, { color: "inherit", className: "-ml-5 Mui-text-text-primary" })))) : null, + currentResult ? (React.createElement(React.Fragment, null, + React.createElement(TitleView, { lazyResult: currentResult }), + React.createElement("div", { className: "flex flex-col flex-nowrap shrink overflow-hidden h-full" }, + React.createElement(Tabs, { value: activeTab, onChange: function (_e, newValue) { + setActiveTab(newValue); + }, className: "shrink-0 w-full", scrollButtons: "auto", variant: "scrollable" }, Object.entries(possibleMetacardTabs).map(function (_a) { + var _b; + var _c = __read(_a, 2), tabName = _c[0], tabDefinition = _c[1]; + return (React.createElement(MaterialTab, { key: tabName, value: tabName, label: ((_b = tabDefinition.header) === null || _b === void 0 ? void 0 : _b.call(tabDefinition, { result: currentResult })) || + tabName })); + })), + React.createElement("div", { className: "h-full w-full shrink overflow-hidden" }, + React.createElement(TabContent, { result: currentResult, selectionInterface: selectionInterface, key: currentResult.plain.id }))))) : (React.createElement("div", { className: "p-2 text-center" }, "Please select result(s) to display in the inspector."))))); +}; +export default hot(module)(Inspector); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zcGVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2Nv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sIHNldEFjdGl2ZVRhYiwgVGFiQ29udGVudCB9ID1cbiAgICB1c2VNZXRhY2FyZFRhYnMoeyByZXN1bHQ6IGN1cnJlbnRSZXN1bHQgfSlcblxuICByZXR1cm4gKFxuICAgIDw+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cImZsZXggZmxleC1jb2wgZmxleC1ub3dyYXAgaC1mdWxsIG92ZXJmbG93LWhpZGRlblwiPlxuICAgICAgICB7YW1vdW50U2VsZWN0ZWQgPiAxID8gKFxuICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LXJvdyBpdGVtcy1jZW50ZXIganVzdGlmeS1jZW50ZXIgZmxleC1ub3dyYXAgc2hyaW5rLTAgZ3Jvdy0wXCI+XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICBzZXRJbmRleChpbmRleCAtIDEpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIGRpc2FibGVkPXtpbmRleCA9PT0gMH1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPEtleWJvYXJkQXJyb3dMZWZ0SWNvblxuICAgICAgICAgICAgICAgIGNvbG9yPVwiaW5oZXJpdFwiXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiTXVpLXRleHQtdGV4dC1wcmltYXJ5IE11aS1pY29uLXNpemUtc21hbGxcIlxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8S2V5Ym9hcmRBcnJvd0xlZnRJY29uXG4gICAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCItbWwtMyBNdWktdGV4dC10ZXh0LXByaW1hcnkgTXVpLWljb24tc2l6ZS1zbWFsbFwiXG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgIEl0ZW0ge2luZGV4ICsgMX0gLyB7YW1vdW50U2VsZWN0ZWR9XG4gICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICBzZXRJbmRleChpbmRleCArIDEpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIGRpc2FibGVkPXtpbmRleCA9PT0gYW1vdW50U2VsZWN0ZWQgLSAxfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8S2V5Ym9hcmRBcnJvd1JpZ2h0SWNvblxuICAgICAgICAgICAgICAgIGNvbG9yPVwiaW5oZXJpdFwiXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiTXVpLXRleHQtdGV4dC1wcmltYXJ5XCJcbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPEtleWJvYXJkQXJyb3dSaWdodEljb25cbiAgICAgICAgICAgICAgICBjb2xvcj1cImluaGVyaXRcIlxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cIi1tbC01IE11aS10ZXh0LXRleHQtcHJpbWFyeVwiXG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIHtjdXJyZW50UmVzdWx0ID8gKFxuICAgICAgICAgIDw+XG4gICAgICAgICAgICA8VGl0bGVWaWV3IGxhenlSZXN1bHQ9e2N1cnJlbnRSZXN1bHR9IC8+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImZsZXggZmxleC1jb2wgZmxleC1ub3dyYXAgc2hyaW5rIG92ZXJmbG93LWhpZGRlbiBoLWZ1bGxcIj5cbiAgICAgICAgICAgICAgPFRhYnNcbiAgICAgICAgICAgICAgICB2YWx1ZT17YWN0aXZlVGFifVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoX2UsIG5ld1ZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBzZXRBY3RpdmVUYWIobmV3VmFsdWUpXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJzaHJpbmstMCB3LWZ1bGxcIlxuICAgICAgICAgICAgICAgIHNjcm9sbEJ1dHRvbnM9XCJhdXRvXCJcbiAgICAgICAgICAgICAgICB2YXJpYW50PVwic2Nyb2xsYWJsZVwiXG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICB7T2JqZWN0LmVudHJpZXMocG9zc2libGVNZXRhY2FyZFRhYnMpLm1hcChcbiAgICAgICAgICAgICAgICAgIChbdGFiTmFtZSwgdGFiRGVmaW5pdGlvbl0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgICA8TWF0ZXJpYWxUYWJcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleT17dGFiTmFtZX1cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlPXt0YWJOYW1lfVxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw9e1xuICAgICAgICAgICAgICAgICAgICAgICAgICB0YWJEZWZpbml0aW9uLmhlYWRlcj8uKHsgcmVzdWx0OiBjdXJyZW50UmVzdWx0IH0pIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHRhYk5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgPC9UYWJzPlxuXG4gICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiaC1mdWxsIHctZnVsbCBzaHJpbmsgb3ZlcmZsb3ctaGlkZGVuXCI+XG4gICAgICAgICAgICAgICAgPFRhYkNvbnRlbnRcbiAgICAgICAgICAgICAgICAgIHJlc3VsdD17Y3VycmVudFJlc3VsdH1cbiAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbkludGVyZmFjZT17c2VsZWN0aW9uSW50ZXJmYWNlfVxuICAgICAgICAgICAgICAgICAga2V5PXtjdXJyZW50UmVzdWx0LnBsYWluLmlkfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJwLTIgdGV4dC1jZW50ZXJcIj5cbiAgICAgICAgICAgIFBsZWFzZSBzZWxlY3QgcmVzdWx0KHMpIHRvIGRpc3BsYXkgaW4gdGhlIGluc3BlY3Rvci5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKX1cbiAgICAgIDwvZGl2PlxuICAgIDwvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKEluc3BlY3RvcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/Clustering.d.ts b/src/main/webapp/component/visualization/maps/Clustering.d.ts new file mode 100644 index 00000000000..2cdcde3e766 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/Clustering.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: { + calculateClusters(results: any, map: any): any; +}; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/Clustering.js b/src/main/webapp/component/visualization/maps/Clustering.js new file mode 100644 index 00000000000..82a1b3ceba1 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/Clustering.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'dens... Remove this comment to see the full error message +import clustering from 'density-clustering'; +var dbscan = new clustering.DBSCAN(); +function removeInvalidCenters(results, centers) { + for (var i = centers.length - 1; i >= 0; i--) { + if (!centers[i]) { + results.splice(i, 1); + centers.splice(i, 1); + } + } +} +function convertIndicesToResults(results, cluster) { + return cluster.map(function (index) { return results[index]; }); +} +export default { + /* + Takes in a list of geometries and a view height and returns a list of clusters + */ + calculateClusters: function (results, map) { + var centers = map.getWindowLocationsOfResults(results); + removeInvalidCenters(results, centers); + return dbscan + .run(centers, 44, 2) + .map(function (cluster) { return convertIndicesToResults(results, cluster); }); + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2x1c3RlcmluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL0NsdXN0ZXJpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUVKLG1KQUFtSjtBQUNuSixPQUFPLFVBQVUsTUFBTSxvQkFBb0IsQ0FBQTtBQUUzQyxJQUFNLE1BQU0sR0FBRyxJQUFJLFVBQVUsQ0FBQyxNQUFNLEVBQUUsQ0FBQTtBQUV0QyxTQUFT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W5kaWNlc1RvUmVzdWx0cyhyZXN1bHRzLCBjbHVzdGVyKSlcbiAgfSxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/DrawingUtility.d.ts b/src/main/webapp/component/visualization/maps/DrawingUtility.d.ts new file mode 100644 index 00000000000..5d433de51a4 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/DrawingUtility.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: { + getCircle(options: any): HTMLCanvasElement; + getCircleWithText(options: any): HTMLCanvasElement; + getCircleWithIcon(options: any): HTMLCanvasElement; + getPin(options: any): HTMLCanvasElement; + addBadge(canvas: HTMLCanvasElement, options: any): HTMLCanvasElement; +}; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/DrawingUtility.js b/src/main/webapp/component/visualization/maps/DrawingUtility.js new file mode 100644 index 00000000000..2462fda615f --- /dev/null +++ b/src/main/webapp/component/visualization/maps/DrawingUtility.js @@ -0,0 +1,216 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +//allows us to get around svg security restrictions in IE11 (see using svg in opengl) +//make our own image and manually set dimensions because of IE: https://github.com/openlayers/openlayers/issues/3939 +import _ from 'underscore'; +var defaultColor = '#3c6dd5'; +export default { + getCircle: function (options) { + _.defaults(options, { + diameter: 22, + fillColor: defaultColor, + strokeWidth: 2, + strokeColor: 'white', + badgeOptions: undefined, + }); + var badgeOffset = options.badgeOptions ? 8 : 0; + var radius = options.diameter / 2; + var canvas = document.createElement('canvas'); + canvas.width = options.diameter + badgeOffset; + canvas.height = options.diameter + badgeOffset; + var ctx = canvas.getContext('2d'); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.beginPath(); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.strokeStyle = options.strokeColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.lineWidth = options.strokeWidth; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = options.fillColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.arc(radius, radius + badgeOffset, radius - options.strokeWidth / 2, 0, 2 * Math.PI, false); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fill(); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.stroke(); + if (options.badgeOptions) { + return this.addBadge(canvas, { + width: options.diameter + badgeOffset, + color: options.badgeOptions.color, + text: options.badgeOptions.text, + }); + } + return canvas; + }, + getCircleWithText: function (options) { + _.defaults(options, { + diameter: 44, + fillColor: defaultColor, + strokeWidth: 2, + strokeColor: 'white', + text: '', + textColor: 'white', + badgeOptions: undefined, + }); + var badgeOffset = options.badgeOptions ? 8 : 0; + var canvas = this.getCircle(options); + var ctx = canvas.getContext('2d'); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.font = '16pt Helvetica'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = options.textColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textAlign = 'center'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textBaseline = 'middle'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillText(options.text, options.diameter / 2, options.diameter / 2 + badgeOffset); + return canvas; + }, + getCircleWithIcon: function (options) { + _.defaults(options, { + diameter: 24, + fillColor: defaultColor, + strokeWidth: 2, + strokeColor: 'white', + text: '', + textColor: 'white', + }); + var canvas = this.getCircle(options); + var ctx = canvas.getContext('2d'); + var style = options.icon.style; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.font = style.size + ' ' + style.font; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = options.textColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textAlign = 'center'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textBaseline = 'middle'; + if (style.code) { + var icon = String.fromCharCode(parseInt(style.code, 16)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillText(icon, options.diameter / 2, options.diameter / 2); + } + return canvas; + }, + getPin: function (options) { + _.defaults(options, { + width: 39, + height: 40, + fillColor: defaultColor, + strokeWidth: 2, + strokeColor: 'white', + textColor: 'white', + badgeOptions: undefined, + }); + var badgeOffset = options.badgeOptions ? 8 : 0; + var getValWithOffset = function (val) { + return val + badgeOffset; + }; + var canvas = document.createElement('canvas'); + canvas.width = options.width + badgeOffset; + canvas.height = options.height + badgeOffset; + var ctx = canvas.getContext('2d'); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.strokeStyle = options.strokeColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.lineWidth = options.strokeWidth; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = options.fillColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.beginPath(); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.moveTo(19.36, getValWithOffset(2)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.bezierCurveTo(11.52, getValWithOffset(2), 4.96, getValWithOffset(6.64), 4.96, getValWithOffset(14.64)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.bezierCurveTo(4.96, getValWithOffset(17.92), 6.08, getValWithOffset(20.96), 7.84, getValWithOffset(23.44)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.lineTo(19.52, getValWithOffset(38.96)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.lineTo(31.2, getValWithOffset(23.44)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.bezierCurveTo(33.04, getValWithOffset(20.96), 34.08, getValWithOffset(17.92), 34.08, getValWithOffset(14.64)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.bezierCurveTo(34.08, getValWithOffset(6.64), 27.6, getValWithOffset(2), 19.52, getValWithOffset(2)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = options.fillColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fill(); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.stroke(); + var style = options.icon.style; + if (style.code) { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.font = style.size + ' ' + style.font; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = options.textColor; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textAlign = 'center'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textBaseline = 'middle'; + var icon = String.fromCharCode(parseInt(style.code, 16)); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillText(icon, options.width / 2, options.height / 2 - 5 + badgeOffset); + } + if (options.badgeOptions) { + return this.addBadge(canvas, { + width: options.width + badgeOffset, + color: options.badgeOptions.color, + text: options.badgeOptions.text, + }); + } + return canvas; + }, + addBadge: function (canvas, options) { + _.defaults(options, { + width: 48, + color: '#fff59d', + }); + var ctx = canvas.getContext('2d'); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.beginPath(); + var radius = 10; + var badgeX = options.width - (radius + 2); + var badgeY = radius + 2; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.arc(badgeX, badgeY, radius, 0, 2 * Math.PI, false); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = options.color; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.strokeStyle = '#000000'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.lineWidth = 1; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fill(); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.stroke(); + if (options.text) { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.font = '10pt Helvetica'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillStyle = '#000000'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textAlign = 'center'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.textBaseline = 'middle'; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + ctx.fillText(options.text, badgeX, badgeY); + } + return canvas; + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRHJhd2luZ1V0aWxpdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpb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Jhc2VsaW5lID0gJ21pZGRsZSdcblxuICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDI1MzEpIEZJWE1FOiBPYmplY3QgaXMgcG9zc2libHkgJ251bGwnLlxuICAgICAgY3R4LmZpbGxUZXh0KG9wdGlvbnMudGV4dCwgYmFkZ2VYLCBiYWRnZVkpXG4gICAgfVxuXG4gICAgcmV0dXJuIGNhbnZhc1xuICB9LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/bbox-display.d.ts b/src/main/webapp/component/visualization/maps/cesium/bbox-display.d.ts new file mode 100644 index 00000000000..34e7829d978 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/bbox-display.d.ts @@ -0,0 +1,16 @@ +/// +import { Translation } from '../interactions.provider'; +type BBox = { + north: number; + south: number; + east: number; + west: number; +}; +export declare const CesiumBboxDisplay: ({ map, model, onDraw, translation, isInteractive, }: { + map: any; + model: any; + onDraw?: ((newBbox: BBox) => void) | undefined; + translation?: Translation | undefined; + isInteractive?: boolean | undefined; +}) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/visualization/maps/cesium/bbox-display.js b/src/main/webapp/component/visualization/maps/cesium/bbox-display.js new file mode 100644 index 00000000000..52524e54cb2 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/bbox-display.js @@ -0,0 +1,269 @@ +import { __read, __values } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import _ from 'underscore'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { useRender } from '../../../hooks/useRender'; +import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper'; +import DistanceUtils from '../../../../js/DistanceUtils'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +var toDeg = Cesium.Math.toDegrees; +var CAMERA_MAGNITUDE_THRESHOLD = 8000000; +var getCurrentMagnitudeFromMap = function (_a) { + var map = _a.map; + return map.getMap().camera.getMagnitude(); +}; +var needsRedraw = function (_a) { + var map = _a.map, drawnMagnitude = _a.drawnMagnitude; + var currentMagnitude = getCurrentMagnitudeFromMap({ map: map }); + if (currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + if (currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + return false; +}; +var modelToRectangle = function (_a) { + var model = _a.model; + var toRad = Cesium.Math.toRadians; + var obj = model.toJSON(); + _.each(obj, function (val, key) { + obj[key] = toRad(val); + }); + var rectangle = new Cesium.Rectangle(); + if (obj.north === undefined || + isNaN(obj.north) || + obj.south === undefined || + isNaN(obj.south) || + obj.east === undefined || + isNaN(obj.east) || + obj.west === undefined || + isNaN(obj.west)) { + return null; + } + rectangle.north = obj.mapNorth; + rectangle.south = obj.mapSouth; + rectangle.east = obj.mapEast; + rectangle.west = obj.mapWest; + return rectangle; +}; +var rectangleToBbox = function (rectangle) { + var north = toDeg(rectangle.north); + var south = toDeg(rectangle.south); + var east = toDeg(rectangle.east); + var west = toDeg(rectangle.west); + return { + north: DistanceUtils.coordinateRound(north), + south: DistanceUtils.coordinateRound(south), + east: DistanceUtils.coordinateRound(east), + west: DistanceUtils.coordinateRound(west), + }; +}; +var drawGeometry = function (_a) { + var e_1, _b; + var model = _a.model, map = _a.map, id = _a.id, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + var rectangle = modelToRectangle({ model: model }); + if (!rectangle || + [rectangle.north, rectangle.south, rectangle.west, rectangle.east].some(function (coordinate) { return isNaN(coordinate); }) || + rectangle.north <= rectangle.south || + rectangle.east === rectangle.west) { + return; + } + var coordinates = [ + [rectangle.east, rectangle.north], + [rectangle.west, rectangle.north], + [rectangle.west, rectangle.south], + [rectangle.east, rectangle.south], + [rectangle.east, rectangle.north], + ]; + if (translation) { + var longitudeRadians = Cesium.Math.toRadians(translation.longitude); + var latitudeRadians = Cesium.Math.toRadians(translation.latitude); + try { + for (var coordinates_1 = __values(coordinates), coordinates_1_1 = coordinates_1.next(); !coordinates_1_1.done; coordinates_1_1 = coordinates_1.next()) { + var coord = coordinates_1_1.value; + coord[0] += longitudeRadians; + coord[1] += latitudeRadians; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (coordinates_1_1 && !coordinates_1_1.done && (_b = coordinates_1.return)) _b.call(coordinates_1); + } + finally { if (e_1) throw e_1.error; } + } + } + removeOrLockOldDrawing(Boolean(isInteractive), id, map, model); + var primitive; + if (onDraw) { + primitive = new DrawHelper.ExtentPrimitive({ + extent: rectangle, + height: 0, + id: id, + material: Cesium.Material.fromType('Color', { + color: Cesium.Color.fromAlpha(contrastingColor, 0.2), + }), + }); + primitive.setEditable(); + primitive.addListener('onEdited', function (event) { + var rectangle = event.extent; + var bbox = rectangleToBbox(rectangle); + onDraw(bbox); + }); + } + else { + var color = model.get('color'); + primitive = new Cesium.PolylineCollection(); + primitive.add({ + width: isInteractive ? 12 : 8, + material: Cesium.Material.fromType('PolylineOutline', { + color: isInteractive + ? Cesium.Color.fromCssColorString(contrastingColor) + : color + ? Cesium.Color.fromCssColorString(color) + : Cesium.Color.KHAKI, + outlineColor: Cesium.Color.WHITE, + outlineWidth: isInteractive ? 6 : 4, + }), + id: 'userDrawing', + positions: Cesium.Cartesian3.fromRadiansArray(_.flatten(coordinates)), + }); + } + primitive.id = id; + primitive.locationId = model.attributes.locationId; + map.getMap().scene.primitives.add(primitive); + map.getMap().scene.requestRender(); +}; +var useCameraMagnitude = function (_a) { + var map = _a.map; + var _b = __read(React.useState(0), 2), cameraMagnitude = _b[0], setCameraMagnitude = _b[1]; + var _c = __read(React.useState(false), 2), isMoving = _c[0], setIsMoving = _c[1]; + var render = useRender(); + React.useEffect(function () { + var startListener = function () { return setIsMoving(true); }; + var endListener = function () { return setIsMoving(false); }; + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.addEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.addEventListener(endListener); + return function () { + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.removeEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.removeEventListener(endListener); + }; + }, [map]); + React.useEffect(function () { + if (isMoving) { + var animationId_1 = window.requestAnimationFrame(function () { + setCameraMagnitude(getCurrentMagnitudeFromMap({ map: map })); + }); + return function () { + window.cancelAnimationFrame(animationId_1); + }; + } + return function () { }; + }, [isMoving, render]); + return [cameraMagnitude, setCameraMagnitude]; +}; +var useListenToModel = function (_a) { + var model = _a.model, map = _a.map, onDraw = _a.onDraw, newBbox = _a.newBbox, translation = _a.translation, isInteractive = _a.isInteractive; + var _b = __read(useCameraMagnitude({ map: map }), 1), cameraMagnitude = _b[0]; + var _c = __read(React.useState(0), 2), drawnMagnitude = _c[0], setDrawnMagnitude = _c[1]; + var callback = React.useMemo(function () { + return function () { + if (map) { + if (newBbox) { + // Clone the model to display the new bbox drawn because we don't + // want to update the existing model unless the user clicks Apply. + var newModel = model.clone(); + newModel.set(newBbox); + drawGeometry({ + map: map, + model: newModel, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + }); + } + else if (model) { + drawGeometry({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + translation: translation, + isInteractive: isInteractive, + }); + } + } + }; + }, [model, map, newBbox, translation, isInteractive]); + useListenTo(model, 'change:mapNorth change:mapSouth change:mapEast change:mapWest', callback); + React.useEffect(function () { + if (map && needsRedraw({ map: map, drawnMagnitude: drawnMagnitude })) { + callback(); + } + }, [cameraMagnitude, drawnMagnitude, callback, map]); + React.useEffect(function () { + callback(); + }, [callback]); +}; +var useStartMapDrawing = function (_a) { + var map = _a.map, model = _a.model, setNewBbox = _a.setNewBbox, onDraw = _a.onDraw; + React.useEffect(function () { + if (map && model) { + map.getMap().drawHelper["startDrawingExtent"]({ + callback: function (extent) { + var bbox = rectangleToBbox(extent); + setNewBbox(bbox); + onDraw(bbox); + }, + material: Cesium.Material.fromType('Color', { + color: Cesium.Color.fromAlpha(contrastingColor, 0.2), + }), + }); + } + }, [map, model]); +}; +export var CesiumBboxDisplay = function (_a) { + var map = _a.map, model = _a.model, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + // Use state to store the bbox drawn by the user before they click Apply or Cancel. + // When the user clicks Draw, they are allowed to edit the existing bbox (if it + // exists), or draw a new bbox. If they draw a new bbox, save it to state then show + // it instead of the draw model because we don't want to update the draw model + // unless the user clicks Apply. + var _b = __read(React.useState(null), 2), newBbox = _b[0], setNewBbox = _b[1]; + if (onDraw) { + useStartMapDrawing({ map: map, model: model, onDraw: onDraw, setNewBbox: setNewBbox }); + } + useListenToModel({ map: map, model: model, onDraw: onDraw, newBbox: newBbox, translation: translation, isInteractive: isInteractive }); + React.useEffect(function () { + return function () { + if (model && map) { + removeOldDrawing({ map: map, id: getIdFromModelForDisplay({ model: model }) }); + map.getMap().drawHelper.stopDrawing(); + } + }; + }, [map, model]); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaW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ZWFjdC51c2VTdGF0ZSgwKVxuICBjb25zdCBjYWxsYmFjayA9IFJlYWN0LnVzZU1lbW8oKCkgPT4ge1xuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBpZiAobWFwKSB7XG4gICAgICAgIGlmIChuZXdCYm94KSB7XG4gICAgICAgICAgLy8gQ2xvbmUgdGhlIG1vZGVsIHRvIGRpc3BsYXkgdGhlIG5ldyBiYm94IGRyYXduIGJlY2F1c2Ugd2UgZG9uJ3RcbiAgICAgICAgICAvLyB3YW50IHRvIHVwZGF0ZSB0aGUgZXhpc3RpbmcgbW9kZWwgdW5sZXNzIHRoZSB1c2VyIGNsaWNrcyBBcHBseS5cbiAgICAgICAgICBjb25zdCBuZXdNb2RlbCA9IG1vZGVsLmNsb25lKClcbiAgICAgICAgICBuZXdNb2RlbC5zZXQobmV3QmJveClcbiAgICAgICAgICBkcmF3R2VvbWV0cnkoe1xuICAgICAgICAgICAgbWFwLFxuICAgICAgICAgICAgbW9kZWw6IG5ld01vZGVsLFxuICAgICAgICAgICAgaWQ6IGdldElkRnJvbU1vZGVsRm9yRGlzcGxheSh7IG1vZGVsIH0pLFxuICAgICAgICAgICAgc2V0RHJhd25NYWduaXR1ZGUsXG4gICAgICAgICAgICBvbkRyYXcsXG4gICAgICAgICAgfSlcbiAgICAgICAgfSBlbHNlIGlmIChtb2RlbCkge1xuICAgICAgICAgIGRyYXdHZW9tZXRyeSh7XG4gICAgICAgICAgICBtYXAsXG4gICAgICAgICAgICBtb2RlbCxcbiAgICAgICAgICAgIGlkOiBnZXRJZEZyb21Nb2RlbEZvckRpc3BsYXkoeyBtb2RlbCB9KSxcbiAgICAgICAgICAgIHNldERyYXduTWFnbml0dWRlLFxuICAgICAgICAgICAgb25EcmF3LFxuICAgICAgICAgICAgdHJhbnNsYXRpb24sXG4gICAgICAgICAgICBpc0ludGVyYWN0aXZlLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIFttb2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B3YW50IHRvIHVwZGF0ZSB0aGUgZHJhdyBtb2RlbFxuICAvLyB1bmxlc3MgdGhlIHVzZXIgY2xpY2tzIEFwcGx5LlxuICBjb25zdCBbbmV3QmJveCwgc2V0TmV3QmJveF0gPSBSZWFjdC51c2VTdGF0ZTxCQm94IHwgbnVsbD4obnVsbClcbiAgaWYgKG9uRHJhdykge1xuICAgIHVzZVN0YXJ0TWFwRHJhd2luZyh7IG1hcCwgbW9kZWwsIG9uRHJhdywgc2V0TmV3QmJveCB9KVxuICB9XG4gIHVzZUxpc3RlblRvTW9kZWwoeyBtYXAsIG1vZGVsLCBvbkRyYXcsIG5ld0Jib3gsIHRyYW5zbGF0aW9uLCBpc0ludGVyYWN0aXZlIH0pXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIGlmIChtb2RlbCAmJiBtYXApIHtcbiAgICAgICAgcmVtb3ZlT2xkRHJhd2luZyh7IG1hcCwgaWQ6IGdldElkRnJvbU1vZGVsRm9yRGlzcGxheSh7IG1vZGVsIH0pIH0pXG4gICAgICAgIG1hcC5nZXRNYXAoKS5kcmF3SGVscGVyLnN0b3BEcmF3aW5nKClcbiAgICAgIH1cbiAgICB9XG4gIH0sIFttYXAsIG1vZGVsXSlcbiAgcmV0dXJuIDw+PC8+XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/cesium.view.d.ts b/src/main/webapp/component/visualization/maps/cesium/cesium.view.d.ts new file mode 100644 index 00000000000..e741179ffdb --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/cesium.view.d.ts @@ -0,0 +1,7 @@ +/// +import { CesiumStateType } from '../../../golden-layout/golden-layout.types'; +export declare const CesiumMapViewReact: ({ selectionInterface, setMap: outerSetMap, componentState, }: { + setMap?: ((map: any) => void) | undefined; + selectionInterface: any; + componentState: CesiumStateType; +}) => JSX.Element | null; diff --git a/src/main/webapp/component/visualization/maps/cesium/cesium.view.js b/src/main/webapp/component/visualization/maps/cesium/cesium.view.js new file mode 100644 index 00000000000..3e294e3fb46 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/cesium.view.js @@ -0,0 +1,118 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Button from '@mui/material/Button'; +import React from 'react'; +import { Memo } from '../../../memo/memo'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { MapViewReact } from '../map.view'; +import { OpenlayersMapViewReact } from '../openlayers/openlayers.view'; +import { CesiumDrawings } from './drawing-and-display'; +//You typically don't want to use this view directly. Instead, use the combined-map component which will handle falling back to openlayers. +import $ from 'jquery'; +import featureDetection from '../../../singletons/feature-detection'; +import { InteractionsProvider } from '../interactions.provider'; +import { LayoutContext } from '../../../golden-layout/visual-settings.provider'; +import User from '../../../../js/model/User'; +import { useBackbone } from '../../../selection-checkbox/useBackbone.hook'; +import { MAP_LAYERS } from '../../settings-helpers'; +var useSupportsCesium = function () { + var _a = __read(React.useState(Math.random()), 2), setForceRender = _a[1]; + useListenTo(featureDetection, 'change:cesium', function () { + setForceRender(Math.random()); + }); + return featureDetection.supportsFeature('cesium'); +}; +var useCountdown = function (_a) { + var start = _a.start, length = _a.length; + var _b = __read(React.useState(false), 2), finished = _b[0], setFinished = _b[1]; + React.useEffect(function () { + if (start && length) { + var timeoutId_1 = window.setTimeout(function () { + setFinished(true); + }, length); + return function () { + window.clearTimeout(timeoutId_1); + }; + } + return function () { }; + }, [start, length]); + return finished; +}; +export var CesiumMapViewReact = function (_a) { + var selectionInterface = _a.selectionInterface, outerSetMap = _a.setMap, componentState = _a.componentState; + var supportsCesium = useSupportsCesium(); + var countdownFinished = useCountdown({ + start: !supportsCesium, + length: 10000, + }); + var _b = __read(React.useState(false), 2), swap = _b[0], setSwap = _b[1]; + var _c = __read(React.useState(null), 2), map = _c[0], setMap = _c[1]; + var _d = __read(React.useState(null), 2), mapLayers = _d[0], setMapLayers = _d[1]; + var listenTo = useBackbone().listenTo; + var _e = React.useContext(LayoutContext), getValue = _e.getValue, setValue = _e.setValue; + React.useEffect(function () { + var layerSettings = getValue(MAP_LAYERS, componentState.mapLayers); + var layerModels = layerSettings.map(function (layer) { + return new User.MapLayer(layer, { parse: true }); + }); + var layerCollection = new User.MapLayers(layerModels); + listenTo(layerCollection, 'add remove', function () { + return setValue(MAP_LAYERS, layerCollection.toJSON()); + }); + layerCollection.validate(); + setMapLayers(layerCollection); + }, []); + React.useEffect(function () { + var callback = function () { + setValue(MAP_LAYERS, mapLayers.toJSON()); + }; + if (mapLayers) { + listenTo(mapLayers, 'change', callback); + } + }, [mapLayers]); + React.useEffect(function () { + if (outerSetMap) { + outerSetMap(map); + } + }, [map]); + if (!mapLayers) { + return null; + } + if (supportsCesium) { + return (React.createElement(InteractionsProvider, null, + React.createElement(Memo, null, + React.createElement(MapViewReact, { loadMap: function () { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var deferred = new $.Deferred(); + import('./map.cesium').then(function (CesiumMap) { + deferred.resolve(CesiumMap.default); + }); + return deferred; + }, setMap: setMap, selectionInterface: selectionInterface, mapLayers: mapLayers })), + React.createElement(CesiumDrawings, { map: map, selectionInterface: selectionInterface }))); + } + if (countdownFinished || swap) { + return (React.createElement(OpenlayersMapViewReact, { setMap: setMap, selectionInterface: selectionInterface, componentState: componentState })); + } + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "not-supported p-4 flex flex-col items-center space-y-4" }, + React.createElement("h3", { className: " text-center" }, "The 3D Map is not supported by your browser."), + React.createElement(Button, { variant: "contained", color: "primary", onClick: function () { + setSwap(true); + } }, "2D Map"), + React.createElement("h3", { className: " text-center" }, "2D Map will automatically load after 10 seconds.")))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VzaXVtLnZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9jZXNpdW0vY2VzaXVtLnZpZXcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQTtBQUN6QyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sOENBQThDLENBQUE7QUFDMUUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGFBQWEsQ0FBQTtBQUMxQyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQTtBQUN0RSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sdUJBQXVCLENBQUE7QUFFdEQsNElBQTRJO0FBRTVJLE9BQU8sQ0FBQyxNQUFNLFFBQVEsQ0FBQTtBQUN0QixPQUFPLGdCQUFnQixNQUFNLHVDQUF1QyxDQUFBO0FBQ3BFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBCQUEwQixDQUFBO0FBQy9ELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpREFBaUQsQ0FBQTtBQUMvRSxPQUFPLElBQUksTUFBTSwyQkFBMkIsQ0FBQTtBQU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NvbmRzLlxuICAgICAgICA8L2gzPlxuICAgICAgPC9kaXY+XG4gICAgPC8+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/circle-display.d.ts b/src/main/webapp/component/visualization/maps/cesium/circle-display.d.ts new file mode 100644 index 00000000000..855f7955142 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/circle-display.d.ts @@ -0,0 +1,16 @@ +/// +import { Translation } from '../interactions.provider'; +type Circle = { + lon: number; + lat: number; + radius: number; + radiusUnits: string; +}; +export declare const CesiumCircleDisplay: ({ map, model, onDraw, translation, isInteractive, }: { + map: any; + model: any; + onDraw?: ((newCircle: Circle) => void) | undefined; + translation?: Translation | undefined; + isInteractive?: boolean | undefined; +}) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/visualization/maps/cesium/circle-display.js b/src/main/webapp/component/visualization/maps/cesium/circle-display.js new file mode 100644 index 00000000000..f67dd85a0b9 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/circle-display.js @@ -0,0 +1,252 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import DistanceUtils from '../../../../js/DistanceUtils'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import _ from 'underscore'; +import * as Turf from '@turf/turf'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { useRender } from '../../../hooks/useRender'; +import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import TurfCircle from '@turf/circle'; +import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +var toDeg = Cesium.Math.toDegrees; +var CAMERA_MAGNITUDE_THRESHOLD = 8000000; +var getCurrentMagnitudeFromMap = function (_a) { + var map = _a.map; + return map.getMap().camera.getMagnitude(); +}; +var needsRedraw = function (_a) { + var map = _a.map, drawnMagnitude = _a.drawnMagnitude; + var currentMagnitude = getCurrentMagnitudeFromMap({ map: map }); + if (currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + if (currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + return false; +}; +var defaultAttrs = ['lat', 'lon', 'radius']; +var isModelReset = function (_a) { + var modelProp = _a.modelProp; + if (_.every(defaultAttrs, function (val) { return _.isUndefined(modelProp[val]); }) || + _.isEmpty(modelProp)) { + return true; + } + return false; +}; +var cartesian3ToCircle = function (center, radius, ellipsoid) { + var latLon = ellipsoid.cartesianToCartographic(center); + var lon = toDeg(latLon.longitude); + var lat = toDeg(latLon.latitude); + var radiusUnits = 'meters'; + if (radius >= 1000) { + radius /= 1000; + radiusUnits = 'kilometers'; + } + return { + lon: DistanceUtils.coordinateRound(lon), + lat: DistanceUtils.coordinateRound(lat), + radius: radius, + radiusUnits: radiusUnits, + }; +}; +var drawGeometry = function (_a) { + // if model has been reset + var model = _a.model, map = _a.map, id = _a.id, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + var modelProp = model.toJSON(); + if (isModelReset({ modelProp: modelProp })) { + map.getMap().scene.requestRender(); + return; + } + modelProp.lat = parseFloat(modelProp.lat); + modelProp.lon = parseFloat(modelProp.lon); + if (Number.isNaN(modelProp.lat) || Number.isNaN(modelProp.lon)) { + map.getMap().scene.requestRender(); + return; + } + if (translation) { + modelProp.lon += translation.longitude; + modelProp.lat += translation.latitude; + } + removeOrLockOldDrawing(Boolean(isInteractive), id, map, model); + var primitive; + if (onDraw) { + primitive = new DrawHelper.CirclePrimitive({ + center: Cesium.Cartesian3.fromDegrees(modelProp.lon, modelProp.lat), + radius: DistanceUtils.getDistanceInMeters(modelProp.radius, modelProp.radiusUnits), + height: 0, + id: id, + material: Cesium.Material.fromType('Color', { + color: Cesium.Color.fromAlpha(contrastingColor, 0.2), + }), + }); + primitive.setEditable(); + primitive.addListener('onEdited', function (event) { + var circle = cartesian3ToCircle(event.center, event.radius, map.getMap().scene.globe.ellipsoid); + onDraw(circle); + }); + } + else { + var color = model.get('color'); + var centerPt = Turf.point([modelProp.lon, modelProp.lat]); + var circleToCheck = TurfCircle(centerPt, DistanceUtils.getDistanceInMeters(modelProp.radius, modelProp.radiusUnits), { units: 'meters', steps: 64 }); + primitive = new Cesium.PolylineCollection(); + primitive.add({ + width: isInteractive ? 12 : 8, + material: Cesium.Material.fromType('PolylineOutline', { + color: isInteractive + ? Cesium.Color.fromCssColorString(contrastingColor) + : color + ? Cesium.Color.fromCssColorString(color) + : Cesium.Color.KHAKI, + outlineColor: Cesium.Color.WHITE, + outlineWidth: isInteractive ? 6 : 4, + }), + id: 'userDrawing', + positions: Cesium.Cartesian3.fromDegreesArray(_.flatten(circleToCheck.geometry.coordinates)), + }); + } + primitive.id = id; + primitive.locationId = modelProp.locationId; + map.getMap().scene.primitives.add(primitive); + map.getMap().scene.requestRender(); +}; +var useCameraMagnitude = function (_a) { + var map = _a.map; + var _b = __read(React.useState(0), 2), cameraMagnitude = _b[0], setCameraMagnitude = _b[1]; + var _c = __read(React.useState(false), 2), isMoving = _c[0], setIsMoving = _c[1]; + var render = useRender(); + React.useEffect(function () { + var startListener = function () { return setIsMoving(true); }; + var endListener = function () { return setIsMoving(false); }; + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.addEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.addEventListener(endListener); + return function () { + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.removeEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.removeEventListener(endListener); + }; + }, [map]); + React.useEffect(function () { + if (isMoving) { + var animationId_1 = window.requestAnimationFrame(function () { + setCameraMagnitude(getCurrentMagnitudeFromMap({ map: map })); + }); + return function () { + window.cancelAnimationFrame(animationId_1); + }; + } + return function () { }; + }, [isMoving, render]); + return [cameraMagnitude, setCameraMagnitude]; +}; +var useListenToModel = function (_a) { + var model = _a.model, map = _a.map, newCircle = _a.newCircle, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + var _b = __read(useCameraMagnitude({ map: map }), 1), cameraMagnitude = _b[0]; + var _c = __read(React.useState(0), 2), drawnMagnitude = _c[0], setDrawnMagnitude = _c[1]; + var callback = React.useMemo(function () { + return function () { + if (map) { + if (newCircle) { + // Clone the model to display the new circle drawn because we don't + // want to update the existing model unless the user clicks Apply. + var newModel = model.clone(); + newModel.set(newCircle); + drawGeometry({ + map: map, + model: newModel, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + }); + } + else if (model) { + drawGeometry({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + translation: translation, + isInteractive: isInteractive, + }); + } + } + }; + }, [model, map, newCircle, translation, isInteractive]); + useListenTo(model, 'change:lat change:lon change:radius', callback); + React.useEffect(function () { + if (map && needsRedraw({ map: map, drawnMagnitude: drawnMagnitude })) { + callback(); + } + }, [cameraMagnitude, drawnMagnitude, callback, map]); + React.useEffect(function () { + callback(); + }, [callback]); +}; +var useStartMapDrawing = function (_a) { + var map = _a.map, model = _a.model, setNewCircle = _a.setNewCircle, onDraw = _a.onDraw; + React.useEffect(function () { + if (map && model) { + map.getMap().drawHelper["startDrawingCircle"]({ + callback: function (center, radius) { + var circle = cartesian3ToCircle(center, radius, map.getMap().scene.globe.ellipsoid); + setNewCircle(circle); + onDraw(circle); + }, + material: Cesium.Material.fromType('Color', { + color: Cesium.Color.fromAlpha(contrastingColor, 0.2), + }), + }); + } + }, [map, model]); +}; +export var CesiumCircleDisplay = function (_a) { + var map = _a.map, model = _a.model, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + // Use state to store the circle drawn by the user before they click Apply or Cancel. + // When the user clicks Draw, they are allowed to edit the existing circle (if it + // exists), or draw a new circle. If they draw a new circle, save it to state then show + // it instead of the draw model because we don't want to update the draw model + // unless the user clicks Apply. + var _b = __read(React.useState(null), 2), newCircle = _b[0], setNewCircle = _b[1]; + if (onDraw) { + useStartMapDrawing({ map: map, model: model, setNewCircle: setNewCircle, onDraw: onDraw }); + } + useListenToModel({ + map: map, + model: model, + newCircle: newCircle, + onDraw: onDraw, + translation: translation, + isInteractive: isInteractive, + }); + React.useEffect(function () { + return function () { + if (model && map) { + removeOldDrawing({ map: map, id: getIdFromModelForDisplay({ model: model }) }); + map.getMap().drawHelper.stopDrawing(); + } + }; + }, [map, model]); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2lyY2xlLWRpc3BsYXkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9jZXNpdW0vY2lyY2xlLWRpc3BsYXkudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sYUFBYSxNQUFNLDhCQUE4QixDQUFBO0FBQ3hELG1KQUFtS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luZyh7IG1hcCwgaWQ6IGdldElkRnJvbU1vZGVsRm9yRGlzcGxheSh7IG1vZGVsIH0pIH0pXG4gICAgICAgIG1hcC5nZXRNYXAoKS5kcmF3SGVscGVyLnN0b3BEcmF3aW5nKClcbiAgICAgIH1cbiAgICB9XG4gIH0sIFttYXAsIG1vZGVsXSlcbiAgcmV0dXJuIDw+PC8+XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.d.ts b/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.d.ts new file mode 100644 index 00000000000..a37c4960cbb --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.d.ts @@ -0,0 +1,10 @@ +/// +export declare const removeOldDrawing: ({ map, id }: { + map: any; + id: string; +}) => void; +export declare const removeOrLockOldDrawing: (isInteractive: boolean, id: any, map: any, model: any) => void; +export declare const CesiumDrawings: ({ map, selectionInterface, }: { + map: any; + selectionInterface: any; +}) => JSX.Element; diff --git a/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.js b/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.js new file mode 100644 index 00000000000..b45bd2afc95 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.js @@ -0,0 +1,296 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { useState, useEffect } from 'react'; +import { getDrawModeFromModel, getShapeFromDrawMode, getDrawModeFromShape, useDrawingAndDisplayModels, } from '../drawing-and-display'; +import { CesiumBboxDisplay } from './bbox-display'; +import { CesiumCircleDisplay } from './circle-display'; +import { CesiumLineDisplay } from './line-display'; +import { CesiumPolygonDisplay } from './polygon-display'; +import { Editor } from '../draw-menu'; +import { menu } from 'geospatialdraw'; +import { DRAWING_STYLE } from '../openlayers/draw-styles'; +import wreqr from '../../../../js/wreqr'; +import _ from 'lodash'; +import { InteractionsContext } from '../interactions.provider'; +var DrawingMenu = menu.DrawingMenu; +var SHAPES = [ + 'Bounding Box', + 'Line', + 'Point', + 'Point Radius', + 'Polygon', +]; +var DEFAULT_SHAPE = 'Polygon'; +export var removeOldDrawing = function (_a) { + var map = _a.map, id = _a.id; + var relevantPrimitives = map + .getMap() + .scene.primitives._primitives.filter(function (prim) { + return prim.id === id; + }); + relevantPrimitives.forEach(function (relevantPrimitive) { + if (typeof relevantPrimitive.setEditMode === 'function') { + // Need to call this to remove the editing billboards and click handlers + relevantPrimitive.setEditMode(false); + } + map.getMap().scene.primitives.remove(relevantPrimitive); + }); + relevantPrimitives.length > 0 && map.getMap().scene.requestRender(); +}; +var makeOldDrawingNonEditable = function (_a) { + var map = _a.map, id = _a.id; + var relevantPrimitives = map + .getMap() + .scene.primitives._primitives.filter(function (prim) { + return prim.id === id; + }); + relevantPrimitives.forEach(function (relevantPrimitive) { + if (typeof relevantPrimitive.setEditMode === 'function') { + relevantPrimitive.setEditMode(false); + } + if (typeof relevantPrimitive.setEditable === 'function') { + relevantPrimitive.setEditable(false); + } + }); + relevantPrimitives.length > 0 && map.getMap().scene.requestRender(); +}; +var nestedArraysOverlap = function (arrayA, arrayB) { + return arrayA.some(function (elemA) { + return arrayB.some(function (elemB) { return JSON.stringify(elemA) === JSON.stringify(elemB); }); + }); +}; +var isNewShape = function (model) { + var mode = model.get('mode'); + switch (mode) { + case 'bbox': + var box = { + north: model.get('north'), + east: model.get('east'), + west: model.get('west'), + south: model.get('south'), + }; + var prevModel = model.previousAttributes(); + if (box.north && prevModel) { + var prevBox = { + north: prevModel['north'], + east: prevModel['east'], + west: prevModel['west'], + south: prevModel['south'], + }; + if (prevBox.north) { + return !(box.north === prevBox.north || + box.east === prevBox.east || + box.west === prevBox.west || + box.south === prevBox.south); + } + } + case 'circle': + var circle = { lon: model.get('lon'), lat: model.get('lat') }; + prevModel = model.previousAttributes(); + if (circle && prevModel) { + var prevCircle = { lon: prevModel['lon'], lat: prevModel['lat'] }; + if (prevCircle.lat && prevCircle.lon) { + return !(circle.lat === prevCircle.lat || circle.lon === prevCircle.lon); + } + } + case 'line': + var line = model.get('line'); + prevModel = model.previousAttributes(); + if (line && prevModel) { + var prevLine = prevModel['line']; + if (prevLine) { + return !nestedArraysOverlap(line, prevLine); + } + } + case 'poly': + var poly = model.get('polygon'); + prevModel = model.previousAttributes(); + if (prevModel) { + var prevPoly = prevModel['polygon']; + if (prevPoly) { + return !nestedArraysOverlap(poly, prevPoly); + } + } + default: + return false; + } +}; +export var removeOrLockOldDrawing = function (isInteractive, id, map, model) { + var canChange = [ + 'isInteractive', + 'polygonBufferWidth', + 'lineWidth', + 'line', + 'polygon', + 'usng', + 'bbox', + ]; + // remove previous shape from map after updating attributes, dragging shape, or exiting interactive mode + if (isInteractive || + (!isInteractive && + Object.keys(model.changed).some(function (change) { return canChange.includes(change); }) && + !isNewShape(model))) { + removeOldDrawing({ map: map, id: id }); + } + else { + makeOldDrawingNonEditable({ map: map, id: id }); + } +}; +var drawingLocation; +var updateDrawingLocation = function (newDrawingLocation) { + drawingLocation = newDrawingLocation; +}; +var ensurePolygonIsClosed = function (polygon) { + var points = polygon === null || polygon === void 0 ? void 0 : polygon.polygon; + if (Array.isArray(points) && points.length > 0) { + var first = points[0]; + var last = points[points.length - 1]; + if (!_.isEqual(first, last)) { + points.push(first); + } + } +}; +var pickLocation = function (model) { + var mode = getDrawModeFromModel({ model: model }); + switch (mode) { + case 'bbox': + return _.pick(model.attributes, 'north', 'south', 'east', 'west'); + case 'circle': + return _.pick(model.attributes, 'lat', 'lon'); + case 'line': + return _.pick(model.attributes, 'line'); + case 'poly': + return _.pick(model.attributes, 'polygon'); + default: + return {}; + } +}; +export var CesiumDrawings = function (_a) { + var map = _a.map, selectionInterface = _a.selectionInterface; + var _b = useDrawingAndDisplayModels({ + selectionInterface: selectionInterface, + map: map, + }), models = _b.models, filterModels = _b.filterModels, drawingModels = _b.drawingModels; + var _c = __read(drawingModels.length > 0 ? drawingModels.slice(-1) : [undefined], 1), drawingModel = _c[0]; + var _d = __read(useState(false), 2), isDrawing = _d[0], setIsDrawing = _d[1]; + var _e = __read(useState(DEFAULT_SHAPE), 2), drawingShape = _e[0], setDrawingShape = _e[1]; + var _f = React.useContext(InteractionsContext), interactiveGeo = _f.interactiveGeo, translation = _f.translation, setInteractiveModels = _f.setInteractiveModels; + var nonDrawingModels = models.concat(filterModels); + useEffect(function () { + var models = nonDrawingModels.filter(function (m) { return m.get('locationId') === interactiveGeo; }); + setInteractiveModels(models); + }, [interactiveGeo, models, filterModels]); + var handleKeydown = React.useCallback(function (e) { + if (e.key === 'Enter') { + e.preventDefault(); + if (drawingLocation) + finishDrawing(); + } + if (e.key === 'Escape') { + cancelDrawing(); + } + }, [drawingModel, drawingShape, drawingLocation]); + useEffect(function () { + setIsDrawing(!!drawingModel); + if (drawingModel) { + window.addEventListener('keydown', handleKeydown); + setDrawingShape(getShapeFromDrawMode(getDrawModeFromModel({ model: drawingModel }))); + } + else { + window.removeEventListener('keydown', handleKeydown); + } + return function () { return window.removeEventListener('keydown', handleKeydown); }; + }, [drawingModel]); + var cancelDrawing = function () { + drawingModel.set('drawing', false); + // the listener for this calls Drawing.turnOffDrawing() + wreqr.vent.trigger('search:drawcancel', drawingModel); + setIsDrawing(false); + drawingLocation = null; + }; + var finishDrawing = function () { + if (!drawingLocation) { + cancelDrawing(); + return; + } + wreqr.vent.trigger("search:".concat(getDrawModeFromShape(drawingShape), "-end"), drawingModel); + wreqr.vent.trigger("search:drawend", drawingModel); + if (drawingShape === 'Polygon') { + ensurePolygonIsClosed(drawingLocation); + } + drawingModel.set(__assign(__assign({}, drawingLocation), { drawing: false })); + setIsDrawing(false); + drawingLocation = null; + }; + var isNotBeingEdited = function (model) { + return !drawingModel || !_.isEqual(pickLocation(model), pickLocation(drawingModel)); + }; + /* + When editing a shape, don't display the other models that correspond to that shape. Because + we don't display shapes on the surface of the globe, we can't use Cesium's APIs to force the + shape being edited to the top. If the corresponding models were shown, then multiple overlapping + shapes would be drawn on the map, and the sole editable shape is not guaranteed to be visible + or able to be interacted with. + Note that we cannot compare the filterModel IDs to that of the drawingModel, because while a + filterModel and a drawingModel may represent the same shape, they are different model object + instances and have different IDs. Instead, we check for equivalent location attributes on the + models. + The models array is a different story, since it can contain the same model object instances + as drawingModels, but we use the non-ID-based comparison method described above for it, too, + to ensure consistent behavior. + */ + return (React.createElement(React.Fragment, null, + nonDrawingModels.filter(isNotBeingEdited).map(function (model) { + var drawMode = getDrawModeFromModel({ model: model }); + var isInteractive = model.get('locationId') === interactiveGeo; + var shapeTranslation = translation && isInteractive ? translation : undefined; + switch (drawMode) { + case 'bbox': + return (React.createElement(CesiumBboxDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + case 'circle': + return (React.createElement(CesiumCircleDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + case 'line': + return (React.createElement(CesiumLineDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + case 'poly': + return (React.createElement(CesiumPolygonDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + default: + return React.createElement(React.Fragment, null); + } + }), + drawingModels.map(function (model) { + var drawMode = getDrawModeFromModel({ model: model }); + switch (drawMode) { + case 'bbox': + return (React.createElement(CesiumBboxDisplay, { key: model.cid, model: model, map: map, onDraw: updateDrawingLocation })); + case 'circle': + return (React.createElement(CesiumCircleDisplay, { key: model.cid, model: model, map: map, onDraw: updateDrawingLocation })); + case 'line': + return (React.createElement(CesiumLineDisplay, { key: model.cid, model: model, map: map, onDraw: updateDrawingLocation })); + case 'poly': + return (React.createElement(CesiumPolygonDisplay, { key: model.cid, model: model, map: map, onDraw: updateDrawingLocation })); + default: + return React.createElement(React.Fragment, null); + } + }), + drawingModel && (React.createElement(Editor, { "data-id": "map-draw-menu" }, + React.createElement(DrawingMenu, { shape: drawingShape, map: { + addLayer: function () { }, + removeInteraction: function () { }, + addInteraction: function () { }, + }, isActive: isDrawing, geometry: null, onCancel: cancelDrawing, onOk: finishDrawing, onSetShape: function () { }, disabledShapes: SHAPES.filter(function (shape) { return shape !== drawingShape; }), onUpdate: function () { }, saveAndContinue: false, mapStyle: DRAWING_STYLE }))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2luZy1hbmQtZGlzcGxheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL2Nlc2l1bS9kcmF3aW5nLWFuZC1kaXNwbGF5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUN6QixPQUFPLEVBQUUsUUFBUSxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUMzQyxPQUFPLEVBQ0wsb0JBQW9CLEVBQ3BCLG9CQUFvQixFQUNwQixvQkFBb0IsRUFDcEIsMEJBQTBCLEdBQzNCLE1BQU0sd0JBQXdCLENBQUE7QUFDL0IsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUE7QUFDbEQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZ0JB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lndlc3QgfHxcbiAgICAgICAgICAgIGJveC5zb3V0aCA9PT0gcHJldkJveC5zb3V0aFxuICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGNhc2UgJ2NpcmNsZSc6XG4gICAgICBjb25zdCBjaXJjbGUgPSB7IGxvbjogbW9kZWwuZ2V0KCdsb24nKSwgbGF0OiBtb2RlbC5nZXQoJ2xhdCcpIH1cbiAgICAgIHByZXZNb2RlbCA9IG1vZGVsLnByZXZpb3VzQXR0cmlidXRlcygpXG4gICAgICBpZiAoY2lyY2xlICYmIHByZXZNb2RlbCkge1xuICAgICAgICBjb25zdCBwcmV2Q2lyY2xlID0geyBsb246IHByZXZNb2RlbFsnbG9uJ10sIGxhdDogcHJldk1vZGVsWydsYXQnXSB9XG4gICAgICAgIGlmIChwcmV2Q2lyY2xlLmxhdCAmJiBwcmV2Q2lyY2xlLmxvbikge1xuICAgICAgICAgIHJldHVybiAhKFxuICAgICAgICAgICAgY2lyY2xlLmxhdCA9PT0gcHJldkNpcmNsZS5sYXQgfHwgY2lyY2xlLmxvbiA9PT0gcHJldkNpcmNsZS5sb25cbiAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBjYXNlICdsaW5lJzpcbiAgICAgIGNvbnN0IGxpbmUgPSBtb2RlbC5nZXQoJ2xpbmUnKVxuICAgICAgcHJldk1vZGVsID0gbW9kZWwucHJldmlvdXNBdHRyaWJ1dGVzKClcbiAgICAgIGlmIChsaW5lICYmIHByZXZNb2RlbCkge1xuICAgICAgICBjb25zdCBwcmV2TGluZSA9IHByZXZNb2RlbFsnbGluZSddXG4gICAgICAgIGlmIChwcmV2TGluZSkge1xuICAgICAgICAgIHJldHVybiAhbmVzdGVkQXJyYXlzT3ZlcmxhcChsaW5lLCBwcmV2TGluZSlcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGNhc2UgJ3BvbHknOlxuICAgICAgY29uc3QgcG9seSA9IG1vZGVsLmdldCgncG9seWdvbicpXG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AgICAgaXNJbnRlcmFjdGl2ZT17aXNJbnRlcmFjdGl2ZX1cbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbj17c2hhcGVUcmFuc2xhdGlvbn1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIClcbiAgICAgICAgICBjYXNlICdjaXJjbGUnOlxuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPENlc2l1bUNpcmNsZURpc3BsYXlcbiAgICAgICAgICAgICAgICBrZXk9e21vZGVsLmNpZH1cbiAgICAgICAgICAgICAgICBtb2RlbD17bW9kZWx9XG4gICAgICAgICAgICAgICAgbWFwPXttYXB9XG4gICAgICAgICAgICAgICAgaXNJbnRlcmFjdGl2ZT17aXNJbnRlcmFjdGl2ZX1cbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbj17c2hhcGVUcmFuc2xhdGlvbn1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIClcbiAgICAgICAgICBjYXNlICdsaW5lJzpcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIDxDZXNpdW1MaW5lRGlzcGxheVxuICAgICAgICAgICAgICAgIGtleT17bW9kZWwuY2lkfVxuICAgICAgICAgICAgICAgIG1vZGVsPXttb2RlbH1cbiAgICAgICAgICAgICAgICBtYXA9e21hcH1cbiAgICAgICAgICAgICAgICBpc0ludGVyYWN0aXZlPXtpc0ludGVyYWN0aXZlfVxuICAgICAgICAgICAgICAgIHRyYW5zbGF0aW9uPXtzaGFwZVRyYW5zbGF0aW9ufVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKVxuICAgICAgICAgIGNhc2UgJ3BvbHknOlxuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPENlc2l1bVBvbHlnb25EaXNwbGF5XG4gICAgICAgICAgICAgICAga2V5PXttb2RlbC5jaWR9XG4gICAgICAgICAgICAgICAgbW9kZWw9e21vZGVsfVxuICAgICAgICAgICAgICAgIG1hcD17bWFwfVxuICAgICAgICAgICAgICAgIGlzSW50ZXJhY3RpdmU9e2lzSW50ZXJhY3RpdmV9XG4gICAgICAgICAgICAgICAgdHJhbnNsYXRpb249e3NoYXBlVHJhbnNsYXRpb259XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiA8PjwvPlxuICAgICAgICB9XG4gICAgICB9KX1cbiAgICAgIHtkcmF3aW5nTW9kZWxzLm1hcCgobW9kZWwpID0+IHtcbiAgICAgICAgY29uc3QgZHJhd01vZGUgPSBnZXREcmF3TW9kZUZyb21Nb2RlbCh7IG1vZGVsIH0pXG4gICAgICAgIHN3aXRjaCAoZHJhd01vZGUpIHtcbiAgICAgICAgICBjYXNlICdiYm94JzpcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIDxDZXNpdW1CYm94RGlzcGxheVxuICAgICAgICAgICAgICAgIGtleT17bW9kZWwuY2lkfVxuICAgICAgICAgICAgICAgIG1vZGVsPXttb2RlbH1cbiAgICAgICAgICAgICAgICBtYXA9e21hcH1cbiAgICAgICAgICAgICAgICBvbkRyYXc9e3VwZGF0ZURyYXdpbmdMb2NhdGlvbn1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIClcbiAgICAgICAgICBjYXNlICdjaXJjbGUnOlxuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPENlc2l1bUNpcmNsZURpc3BsYXlcbiAgICAgICAgICAgICAgICBrZXk9e21vZGVsLmNpZH1cbiAgICAgICAgICAgICAgICBtb2RlbD17bW9kZWx9XG4gICAgICAgICAgICAgICAgbWFwPXttYXB9XG4gICAgICAgICAgICAgICAgb25EcmF3PXt1cGRhdGVEcmF3aW5nTG9jYXRpb259XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgY2FzZSAnbGluZSc6XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICA8Q2VzaXVtTGluZURpc3BsYXlcbiAgICAgICAgICAgICAgICBrZXk9e21vZGVsLmNpZH1cbiAgICAgICAgICAgICAgICBtb2RlbD17bW9kZWx9XG4gICAgICAgICAgICAgICAgbWFwPXttYXB9XG4gICAgICAgICAgICAgICAgb25EcmF3PXt1cGRhdGVEcmF3aW5nTG9jYXRpb259XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgY2FzZSAncG9seSc6XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICA8Q2VzaXVtUG9seWdvbkRpc3BsYXlcbiAgICAgICAgICAgICAgICBrZXk9e21vZGVsLmNpZH1cbiAgICAgICAgICAgICAgICBtb2RlbD17bW9kZWx9XG4gICAgICAgICAgICAgICAgbWFwPXttYXB9XG4gICAgICAgICAgICAgICAgb25EcmF3PXt1cGRhdGVEcmF3aW5nTG9jYXRpb259XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiA8PjwvPlxuICAgICAgICB9XG4gICAgICB9KX1cblxuICAgICAgey8qXG4gICAgICAgIFVzZSBnZW9zcGF0aWFsZHJhdydzIHRvb2xiYXIgZXZlbiB0aG91Z2ggZ2Vvc3BhdGlhbGRyYXcgZG9lcyBub3Qgc3VwcG9ydCBDZXNpdW0uXG4gICAgICAgIFdlIGRvbid0IGFjdHVhbGx5IHVzZSB0aGUgbGlicmFyeSBmb3IgZHJhd2luZywgYnV0IHdlIHdhbnQgdGhlIGRyYXdpbmcgZXhwZXJpZW5jZVxuICAgICAgICBvbiB0aGUgM0QgbWFwIHRvIGxvb2sgbGlrZSBpdCBkb2VzIG9uIHRoZSAyRCBtYXAuIFRoaXMgaXMgd2h5IHdlIG9ubHkgY2FyZSBhYm91dFxuICAgICAgICB0aGUgc2hhcGUgaWNvbiBkaXNwbGF5ZWQgb24gdGhlIHRvb2xiYXIgYW5kIHRoZSBhcHBseS9jYW5jZWwgaGFuZGxlcnM7IGV2ZXJ5dGhpbmdcbiAgICAgICAgZWxzZSBpcyBqdXN0IG5vLW9wcy5cbiAgICAgICovfVxuICAgICAge2RyYXdpbmdNb2RlbCAmJiAoXG4gICAgICAgIDxFZGl0b3IgZGF0YS1pZD1cIm1hcC1kcmF3LW1lbnVcIj5cbiAgICAgICAgICA8RHJhd2luZ01lbnVcbiAgICAgICAgICAgIHNoYXBlPXtkcmF3aW5nU2hhcGV9XG4gICAgICAgICAgICBtYXA9e3tcbiAgICAgICAgICAgICAgYWRkTGF5ZXI6ICgpID0+IHt9LFxuICAgICAgICAgICAgICByZW1vdmVJbnRlcmFjdGlvbjogKCkgPT4ge30sXG4gICAgICAgICAgICAgIGFkZEludGVyYWN0aW9uOiAoKSA9PiB7fSxcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBpc0FjdGl2ZT17aXNEcmF3aW5nfVxuICAgICAgICAgICAgZ2VvbWV0cnk9e251bGx9XG4gICAgICAgICAgICBvbkNhbmNlbD17Y2FuY2VsRHJhd2luZ31cbiAgICAgICAgICAgIG9uT2s9e2ZpbmlzaERyYXdpbmd9XG4gICAgICAgICAgICBvblNldFNoYXBlPXsoKSA9PiB7fX1cbiAgICAgICAgICAgIGRpc2FibGVkU2hhcGVzPXtTSEFQRVMuZmlsdGVyKChzaGFwZSkgPT4gc2hhcGUgIT09IGRyYXdpbmdTaGFwZSl9XG4gICAgICAgICAgICBvblVwZGF0ZT17KCkgPT4ge319XG4gICAgICAgICAgICBzYXZlQW5kQ29udGludWU9e2ZhbHNlfVxuICAgICAgICAgICAgbWFwU3R5bGU9e0RSQVdJTkdfU1RZTEV9XG4gICAgICAgICAgLz5cbiAgICAgICAgPC9FZGl0b3I+XG4gICAgICApfVxuICAgIDwvPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/line-display.d.ts b/src/main/webapp/component/visualization/maps/cesium/line-display.d.ts new file mode 100644 index 00000000000..be0dcdbc568 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/line-display.d.ts @@ -0,0 +1,51 @@ +/// +import { Translation } from '../interactions.provider'; +type Line = { + line: [number, number][]; +}; +export declare const constructSolidLinePrimitive: ({ coordinates, model, id, color, buffer, isInteractive, }: { + coordinates: any; + model: any; + id: string; + color?: string | undefined; + buffer?: number | undefined; + isInteractive?: boolean | undefined; +}) => { + width: number; + material: any; + id: string; + positions: any; + buffer: number | undefined; +}; +export declare const constructOutlinedLinePrimitive: ({ coordinates, model, id, color, buffer, isInteractive, }: { + coordinates: any; + model: any; + id: string; + color?: string | undefined; + buffer?: number | undefined; + isInteractive?: boolean | undefined; +}) => { + width: number; + material: any; + id: string; + positions: any; + buffer: number | undefined; +}; +export declare const constructDottedLinePrimitive: ({ coordinates, model, isInteractive, }: { + coordinates: any; + model: any; + isInteractive?: boolean | undefined; +}) => { + width: number; + material: any; + id: string; + positions: any; +}; +export declare const CesiumLineDisplay: ({ map, model, onDraw, translation, isInteractive, }: { + map: any; + model: any; + onDraw?: ((newLine: Line) => void) | undefined; + translation?: Translation | undefined; + isInteractive?: boolean | undefined; +}) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/visualization/maps/cesium/line-display.js b/src/main/webapp/component/visualization/maps/cesium/line-display.js new file mode 100644 index 00000000000..1e66e47fa26 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/line-display.js @@ -0,0 +1,319 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import DistanceUtils from '../../../../js/DistanceUtils'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import _ from 'underscore'; +import _cloneDeep from 'lodash/cloneDeep'; +import * as Turf from '@turf/turf'; +import { validateGeo } from '../../../../react-component/utils/validation'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { useRender } from '../../../hooks/useRender'; +import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper'; +import utility from './utility'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +var toDeg = Cesium.Math.toDegrees; +var CAMERA_MAGNITUDE_THRESHOLD = 8000000; +var getCurrentMagnitudeFromMap = function (_a) { + var map = _a.map; + return map.getMap().camera.getMagnitude(); +}; +var needsRedraw = function (_a) { + var map = _a.map, drawnMagnitude = _a.drawnMagnitude; + var currentMagnitude = getCurrentMagnitudeFromMap({ map: map }); + if (currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + if (currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + return false; +}; +export var constructSolidLinePrimitive = function (_a) { + var coordinates = _a.coordinates, model = _a.model, id = _a.id, color = _a.color, buffer = _a.buffer, isInteractive = _a.isInteractive; + var _color = color || model.get('color'); + return { + width: isInteractive ? 6 : 4, + material: Cesium.Material.fromType('Color', { + color: isInteractive + ? Cesium.Color.fromCssColorString(contrastingColor) + : _color + ? Cesium.Color.fromCssColorString(_color) + : Cesium.Color.KHAKI, + }), + id: id, + positions: Cesium.Cartesian3.fromDegreesArray(_.flatten(coordinates)), + buffer: buffer, + }; +}; +export var constructOutlinedLinePrimitive = function (_a) { + var coordinates = _a.coordinates, model = _a.model, id = _a.id, color = _a.color, buffer = _a.buffer, isInteractive = _a.isInteractive; + var _color = color || model.get('color'); + return __assign(__assign({}, constructSolidLinePrimitive({ + coordinates: coordinates, + model: model, + id: id, + color: color, + buffer: buffer, + isInteractive: isInteractive, + })), { width: isInteractive ? 12 : 8, material: Cesium.Material.fromType('PolylineOutline', { + color: isInteractive + ? Cesium.Color.fromCssColorString(contrastingColor) + : _color + ? Cesium.Color.fromCssColorString(_color) + : Cesium.Color.KHAKI, + outlineColor: Cesium.Color.WHITE, + outlineWidth: isInteractive ? 6 : 4, + }) }); +}; +export var constructDottedLinePrimitive = function (_a) { + var coordinates = _a.coordinates, model = _a.model, isInteractive = _a.isInteractive; + var color = model.get('color'); + return { + width: isInteractive ? 3 : 2, + material: Cesium.Material.fromType('PolylineDash', { + color: isInteractive + ? Cesium.Color.fromCssColorString(contrastingColor) + : color + ? Cesium.Color.fromCssColorString(color) + : Cesium.Color.KHAKI, + dashLength: 20, + dashPattern: 255, + }), + id: 'userDrawing', + positions: Cesium.Cartesian3.fromDegreesArray(_.flatten(coordinates)), + }; +}; +var positionsToLine = function (positions, ellipsoid) { + return { + line: positions.map(function (cartPos) { + var latLon = ellipsoid.cartesianToCartographic(cartPos); + var lon = toDeg(latLon.longitude); + var lat = toDeg(latLon.latitude); + return [ + DistanceUtils.coordinateRound(lon), + DistanceUtils.coordinateRound(lat), + ]; + }), + }; +}; +var drawGeometry = function (_a) { + var _b; + var model = _a.model, map = _a.map, id = _a.id, setDrawnMagnitude = _a.setDrawnMagnitude, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + var json = model.toJSON(); + var linePoints = json.line; + if (linePoints === undefined || + ((_b = validateGeo('line', JSON.stringify(linePoints))) === null || _b === void 0 ? void 0 : _b.error)) { + map.getMap().scene.requestRender(); + return; + } + // Create a deep copy since we may modify some of these positions for display purposes + linePoints = _cloneDeep(json.line); + linePoints.forEach(function (point) { + if (translation) { + point[0] += translation.longitude; + point[1] += translation.latitude; + } + point[0] = DistanceUtils.coordinateRound(point[0]); + point[1] = DistanceUtils.coordinateRound(point[1]); + }); + var setArr = _.uniq(linePoints); + if (setArr.length < 2) { + return; + } + var turfLine = Turf.lineString(setArr); + var lineWidth = DistanceUtils.getDistanceInMeters(json.lineWidth, model.get('lineUnits')); + var cameraMagnitude = map.getMap().camera.getMagnitude(); + setDrawnMagnitude(cameraMagnitude); + removeOrLockOldDrawing(Boolean(isInteractive), id, map, model); + var primitive; + if (onDraw) { + primitive = new DrawHelper.PolylinePrimitive(constructSolidLinePrimitive({ + coordinates: turfLine.geometry.coordinates, + model: model, + id: id, + color: contrastingColor, + buffer: lineWidth, + })); + primitive.setEditable(); + primitive.addListener('onEdited', function (event) { + var line = positionsToLine(event.positions, map.getMap().scene.globe.ellipsoid); + onDraw(line); + }); + } + else { + var bufferedLine = turfLine; + var isBuffered = lineWidth > 0; + if (isBuffered) { + utility.adjustGeoCoords(turfLine); + bufferedLine = Turf.buffer(turfLine, Math.max(lineWidth, 1), { + units: 'meters', + }); + if (!bufferedLine) { + return; + } + // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments + utility.adjustGeoCoords(bufferedLine); + } + primitive = new Cesium.PolylineCollection(); + primitive.id = id; + primitive.locationId = json.locationId; + primitive.add(constructOutlinedLinePrimitive({ + coordinates: bufferedLine.geometry.coordinates, + model: model, + id: id, + isInteractive: isInteractive, + })); + primitive.add(constructDottedLinePrimitive({ + coordinates: turfLine.geometry.coordinates, + model: model, + isInteractive: isInteractive, + })); + } + map.getMap().scene.primitives.add(primitive); + map.getMap().scene.requestRender(); +}; +var useCameraMagnitude = function (_a) { + var map = _a.map; + var _b = __read(React.useState(0), 2), cameraMagnitude = _b[0], setCameraMagnitude = _b[1]; + var _c = __read(React.useState(false), 2), isMoving = _c[0], setIsMoving = _c[1]; + var render = useRender(); + React.useEffect(function () { + var startListener = function () { return setIsMoving(true); }; + var endListener = function () { return setIsMoving(false); }; + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.addEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.addEventListener(endListener); + return function () { + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.removeEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.removeEventListener(endListener); + }; + }, [map]); + React.useEffect(function () { + if (isMoving) { + var animationId_1 = window.requestAnimationFrame(function () { + setCameraMagnitude(getCurrentMagnitudeFromMap({ map: map })); + }); + return function () { + window.cancelAnimationFrame(animationId_1); + }; + } + return function () { }; + }, [isMoving, render]); + return [cameraMagnitude, setCameraMagnitude]; +}; +var useListenToLineModel = function (_a) { + var model = _a.model, map = _a.map, onDraw = _a.onDraw, newLine = _a.newLine, translation = _a.translation, isInteractive = _a.isInteractive; + var _b = __read(useCameraMagnitude({ map: map }), 1), cameraMagnitude = _b[0]; + var _c = __read(React.useState(0), 2), drawnMagnitude = _c[0], setDrawnMagnitude = _c[1]; + var callback = React.useMemo(function () { + return function () { + if (map) { + if (newLine) { + // Clone the model to display the new line drawn because we don't + // want to update the existing model unless the user clicks Apply. + var newModel = model.clone(); + newModel.set(newLine); + drawGeometry({ + map: map, + model: newModel, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + }); + } + else if (model) { + drawGeometry({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + translation: translation, + isInteractive: isInteractive, + }); + } + } + }; + }, [model, map, newLine, translation, isInteractive]); + useListenTo(model, 'change:line change:lineWidth change:lineUnits', callback); + React.useEffect(function () { + if (map && needsRedraw({ map: map, drawnMagnitude: drawnMagnitude })) { + callback(); + } + }, [cameraMagnitude, drawnMagnitude, callback, map]); + React.useEffect(function () { + callback(); + }, [callback]); +}; +var useStartMapDrawing = function (_a) { + var map = _a.map, model = _a.model, setNewLine = _a.setNewLine, onDraw = _a.onDraw; + React.useEffect(function () { + if (map && model) { + map.getMap().drawHelper["startDrawingPolyline"]({ + callback: function (positions) { + var drawnLine = positionsToLine(positions, map.getMap().scene.globe.ellipsoid); + var line = drawnLine.line; + //this shouldn't ever get hit because the draw library should protect against it, but just in case it does, remove the point + if (line.length > 3 && + line[line.length - 1][0] === line[line.length - 2][0] && + line[line.length - 1][1] === line[line.length - 2][1]) { + line.pop(); + } + setNewLine(drawnLine); + onDraw(drawnLine); + }, + material: Cesium.Material.fromType('Color', { + color: Cesium.Color.fromCssColorString(contrastingColor), + }), + }); + } + }, [map, model]); +}; +export var CesiumLineDisplay = function (_a) { + var map = _a.map, model = _a.model, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + // Use state to store the line drawn by the user before they click Apply or Cancel. + // When the user clicks Draw, they are allowed to edit the existing line (if it + // exists), or draw a new line. If they draw a new line, save it to state then show + // it instead of the draw model because we don't want to update the draw model + // unless the user clicks Apply. + var _b = __read(React.useState(null), 2), newLine = _b[0], setNewLine = _b[1]; + if (onDraw) { + useStartMapDrawing({ map: map, model: model, onDraw: onDraw, setNewLine: setNewLine }); + } + useListenToLineModel({ + map: map, + model: model, + onDraw: onDraw, + newLine: newLine, + translation: translation, + isInteractive: isInteractive, + }); + React.useEffect(function () { + return function () { + if (model && map) { + removeOldDrawing({ map: map, id: getIdFromModelForDisplay({ model: model }) }); + map.getMap().drawHelper.stopDrawing(); + } + }; + }, [map, model]); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS1kaXNwbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92aXN1YWxpemF0aW9uL21hcHMvY2VzaXVtL2xpbmUtZGlzcGxheS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUF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FxuICAgIG9uRHJhdyxcbiAgICBuZXdMaW5lLFxuICAgIHRyYW5zbGF0aW9uLFxuICAgIGlzSW50ZXJhY3RpdmUsXG4gIH0pXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIGlmIChtb2RlbCAmJiBtYXApIHtcbiAgICAgICAgcmVtb3ZlT2xkRHJhd2luZyh7IG1hcCwgaWQ6IGdldElkRnJvbU1vZGVsRm9yRGlzcGxheSh7IG1vZGVsIH0pIH0pXG4gICAgICAgIG1hcC5nZXRNYXAoKS5kcmF3SGVscGVyLnN0b3BEcmF3aW5nKClcbiAgICAgIH1cbiAgICB9XG4gIH0sIFttYXAsIG1vZGVsXSlcbiAgcmV0dXJuIDw+PC8+XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/map.cesium.d.ts b/src/main/webapp/component/visualization/maps/cesium/map.cesium.d.ts new file mode 100644 index 00000000000..91c312d7b2c --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/map.cesium.d.ts @@ -0,0 +1,79 @@ +import Cesium from 'cesium/Build/Cesium/Cesium'; +import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult'; +import { ClusterType } from '../react/geometries'; +export declare const LookingStraightDownOrientation: { + heading: number; + pitch: number; + roll: number; +}; +export default function CesiumMap(insertionElement: any, selectionInterface: any, _notificationEl: any, componentElement: any, mapModel: any, mapLayers: any): { + onLeftClick(callback: any): void; + onLeftClickMapAPI(callback: any): void; + clearLeftClickMapAPI(): void; + onRightClick(callback: any): void; + clearRightClick(): void; + onDoubleClick(): void; + clearDoubleClick(): void; + onMouseTrackingForGeoDrag({ moveFrom, down, move, up, }: { + moveFrom?: any; + down: any; + move: any; + up: any; + }): void; + clearMouseTrackingForGeoDrag(): void; + onMouseTrackingForPopup(downCallback: any, moveCallback: any, upCallback: any): void; + onMouseMove(callback: any): void; + clearMouseMove(): void; + timeoutIds: number[]; + onCameraMoveStart(callback: any): void; + offCameraMoveStart(callback: any): void; + onCameraMoveEnd(callback: any): void; + offCameraMoveEnd(callback: any): void; + doPanZoom(coords: any): void; + panToResults(results: any): void; + panToCoordinate(coords: any, duration?: number): void; + panToExtent(): void; + panToShapesExtent({ duration, }?: { + duration?: number | undefined; + }): boolean; + getCenterPositionOfPrimitiveIds(primitiveIds: string[]): any; + zoomToIds({ ids, duration, }: { + ids: string[]; + duration?: number | undefined; + }): void; + panToRectangle(rectangle: any, opts?: { + duration: number; + correction: number; + }): void; + getShapes(): any; + zoomToExtent(): void; + zoomToBoundingBox({ north, south, east, west }: any): void; + getBoundingBox(): { + [x: string]: any; + }; + overlayImage(model: LazyQueryResult): void; + removeOverlay(metacardId: any): void; + removeAllOverlays(): void; + getCartographicCenterOfClusterInDegrees(cluster: ClusterType): any[]; + getWindowLocationsOfResults(results: LazyQueryResult[]): (any[] | undefined)[]; + addRulerPoint(coordinates: any): any; + removeRulerPoint(billboardRef: any): void; + addRulerLine(point: any): any; + setRulerLine(point: any): void; + removeRulerLine(polyline: any): void; + addPointWithText(point: any, options: any): any; + addPoint(point: any, options: any): any; + addLabel(point: any, options: any): any; + addLine(line: any, options: any): any; + addPolygon(polygon: any, options: any): any[]; + updateCluster(geometry: any, options: any): void; + updateGeometry(geometry: any, options: any): void; + hideGeometry(geometry: any): void; + showGeometry(geometry: any): void; + removeGeometry(geometry: any): void; + destroyShapes(): void; + getMap(): any; + zoomIn(): void; + zoomOut(): void; + destroy(): void; +}; diff --git a/src/main/webapp/component/visualization/maps/cesium/map.cesium.js b/src/main/webapp/component/visualization/maps/cesium/map.cesium.js new file mode 100644 index 00000000000..547fa484658 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/map.cesium.js @@ -0,0 +1,1074 @@ +import { __assign, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import $ from 'jquery'; +import _ from 'underscore'; +import utility from './utility'; +import DrawingUtility from '../DrawingUtility'; +import wreqr from '../../../../js/wreqr'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper'; +import { CesiumImageryProviderTypes, CesiumLayers, } from '../../../../js/controllers/cesium.layers'; +import { Drawing } from '../../../singletons/drawing'; +import { StartupDataStore } from '../../../../js/model/Startup/startup'; +var defaultColor = '#3c6dd5'; +var eyeOffset = new Cesium.Cartesian3(0, 0, 0); +var pixelOffset = new Cesium.Cartesian2(0.0, 0); +var rulerColor = new Cesium.Color(0.31, 0.43, 0.52); +var rulerPointColor = '#506f85'; +var rulerLineHeight = 0; +Cesium.BingMapsApi.defaultKey = StartupDataStore.Configuration.getBingKey() || 0; +var imageryProviderTypes = CesiumImageryProviderTypes; +function setupTerrainProvider(viewer, terrainProvider) { + if (terrainProvider == null || terrainProvider === undefined) { + console.info("Unknown terrain provider configuration.\n Default Cesium terrain provider will be used."); + return; + } + var type = terrainProvider.type, terrainConfig = __rest(terrainProvider, ["type"]); + var TerrainProvider = imageryProviderTypes[type]; + if (TerrainProvider === undefined) { + console.warn("\n Unknown terrain provider type: ".concat(type, ".\n Default Cesium terrain provider will be used.\n ")); + return; + } + var defaultCesiumTerrainProvider = viewer.scene.terrainProvider; + var customTerrainProvider = new TerrainProvider(terrainConfig); + customTerrainProvider.errorEvent.addEventListener(function () { + console.warn("\n Issue using terrain provider: ".concat(JSON.stringify(__assign({ type: type }, terrainConfig)), "\n Falling back to default Cesium terrain provider.\n ")); + viewer.scene.terrainProvider = defaultCesiumTerrainProvider; + }); + viewer.scene.terrainProvider = customTerrainProvider; +} +function createMap(insertionElement, mapLayers) { + var layerCollectionController = new CesiumLayers({ + collection: mapLayers, + }); + var viewer = layerCollectionController.makeMap({ + element: insertionElement, + cesiumOptions: { + sceneMode: Cesium.SceneMode.SCENE3D, + creditContainer: document.createElement('div'), + animation: false, + fullscreenButton: false, + timeline: false, + geocoder: false, + homeButton: false, + navigationHelpButton: false, + sceneModePicker: false, + selectionIndicator: false, + infoBox: false, + //skyBox: false, + //skyAtmosphere: false, + baseLayerPicker: false, + imageryProvider: false, + mapMode2D: 0, + }, + }); + var requestRender = function () { + viewer.scene.requestRender(); + }; + wreqr.vent.on('map:requestRender', requestRender); + // disable right click drag to zoom (context menu instead); + viewer.scene.screenSpaceCameraController.zoomEventTypes = [ + Cesium.CameraEventType.WHEEL, + Cesium.CameraEventType.PINCH, + ]; + viewer.screenSpaceEventHandler.setInputAction(function () { + if (!Drawing.isDrawing()) { + $('body').mousedown(); + } + }, Cesium.ScreenSpaceEventType.LEFT_DOWN); + viewer.screenSpaceEventHandler.setInputAction(function () { + if (!Drawing.isDrawing()) { + $('body').mousedown(); + } + }, Cesium.ScreenSpaceEventType.RIGHT_DOWN); + setupTerrainProvider(viewer, StartupDataStore.Configuration.getTerrainProvider()); + return { + map: viewer, + requestRenderHandler: requestRender, + }; +} +function determineIdsFromPosition(position, map) { + var _a; + var id, locationId; + var pickedObject = map.scene.pick(position); + if (pickedObject) { + id = pickedObject.id; + if (id && id.constructor === Cesium.Entity) { + id = id.resultId; + } + locationId = (_a = pickedObject.collection) === null || _a === void 0 ? void 0 : _a.locationId; + } + return { id: id, locationId: locationId }; +} +function expandRectangle(rectangle) { + var scalingFactor = 0.05; + var widthGap = Math.abs(rectangle.east) - Math.abs(rectangle.west); + var heightGap = Math.abs(rectangle.north) - Math.abs(rectangle.south); + //ensure rectangle has some size + if (widthGap === 0) { + widthGap = 1; + } + if (heightGap === 0) { + heightGap = 1; + } + rectangle.east = rectangle.east + Math.abs(scalingFactor * widthGap); + rectangle.north = rectangle.north + Math.abs(scalingFactor * heightGap); + rectangle.south = rectangle.south - Math.abs(scalingFactor * heightGap); + rectangle.west = rectangle.west - Math.abs(scalingFactor * widthGap); + return rectangle; +} +function getDestinationForVisiblePan(rectangle, map) { + var destinationForZoom = expandRectangle(rectangle); + if (map.scene.mode === Cesium.SceneMode.SCENE3D) { + destinationForZoom = + map.camera.getRectangleCameraCoordinates(destinationForZoom); + } + return destinationForZoom; +} +function determineCesiumColor(color) { + return !_.isUndefined(color) + ? Cesium.Color.fromCssColorString(color) + : Cesium.Color.fromCssColorString(defaultColor); +} +function convertPointCoordinate(coordinate) { + return { + latitude: coordinate[1], + longitude: coordinate[0], + altitude: coordinate[2], + }; +} +function isNotVisible(cartesian3CenterOfGeometry, occluder) { + return !occluder.isPointVisible(cartesian3CenterOfGeometry); +} +// https://cesium.com/learn/cesiumjs/ref-doc/Camera.html +export var LookingStraightDownOrientation = { + heading: 0, + pitch: -Cesium.Math.PI_OVER_TWO, + roll: 0, // No roll - like a level from left to right +}; +export default function CesiumMap(insertionElement, selectionInterface, _notificationEl, componentElement, mapModel, mapLayers) { + var overlays = {}; + var shapes = []; + var _a = createMap(insertionElement, mapLayers), map = _a.map, requestRenderHandler = _a.requestRenderHandler; + var drawHelper = new DrawHelper(map); + map.drawHelper = drawHelper; + var billboardCollection = setupBillboardCollection(); + var labelCollection = setupLabelCollection(); + setupTooltip(map, selectionInterface); + function updateCoordinatesTooltip(position) { + var cartesian = map.camera.pickEllipsoid(position, map.scene.globe.ellipsoid); + if (Cesium.defined(cartesian)) { + var cartographic = Cesium.Cartographic.fromCartesian(cartesian); + mapModel.updateMouseCoordinates({ + lat: cartographic.latitude * Cesium.Math.DEGREES_PER_RADIAN, + lon: cartographic.longitude * Cesium.Math.DEGREES_PER_RADIAN, + }); + } + else { + mapModel.clearMouseCoordinates(); + } + } + // @ts-expect-error ts-migrate(6133) FIXME: 'selectionInterface' is declared but its value is ... Remove this comment to see the full error message + function setupTooltip(map, selectionInterface) { + var handler = new Cesium.ScreenSpaceEventHandler(map.scene.canvas); + handler.setInputAction(function (movement) { + $(componentElement).removeClass('has-feature'); + if (map.scene.mode === Cesium.SceneMode.MORPHING) { + return; + } + updateCoordinatesTooltip(movement.endPosition); + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + } + function setupBillboardCollection() { + var billboardCollection = new Cesium.BillboardCollection(); + map.scene.primitives.add(billboardCollection); + return billboardCollection; + } + function setupLabelCollection() { + var labelCollection = new Cesium.LabelCollection(); + map.scene.primitives.add(labelCollection); + return labelCollection; + } + /* + * Returns a visible label that is in the same location as the provided label (geometryInstance) if one exists. + * If findSelected is true, the function will also check for hidden labels in the same location but are selected. + */ + function findOverlappingLabel(findSelected, geometry) { + return _.find(mapModel.get('labels'), function (label) { + return label.position.x === geometry.position.x && + label.position.y === geometry.position.y && + ((findSelected && label.isSelected) || label.show); + }); + } + /* + Only shows one label if there are multiple labels in the same location. + + Show the label in the following importance: + - it is selected and the existing label is not + - there is no other label displayed at the same location + - it is the label that was found by findOverlappingLabel + + Arguments are: + - the label to show/hide + - if the label is selected + - if the search for overlapping label should include hidden selected labels + */ + function showHideLabel(_a) { + var geometry = _a.geometry, _b = _a.findSelected, findSelected = _b === void 0 ? false : _b; + var isSelected = geometry.isSelected; + var labelWithSamePosition = findOverlappingLabel(findSelected, geometry); + if (isSelected && + labelWithSamePosition && + !labelWithSamePosition.isSelected) { + labelWithSamePosition.show = false; + } + var otherLabelNotSelected = labelWithSamePosition + ? !labelWithSamePosition.isSelected + : true; + geometry.show = + (isSelected && otherLabelNotSelected) || + !labelWithSamePosition || + geometry.id === labelWithSamePosition.id; + } + /* + Shows a hidden label. Used when deleting a label that is shown. + */ + function showHiddenLabel(geometry) { + if (!geometry.show) { + return; + } + var hiddenLabel = _.find(mapModel.get('labels'), function (label) { + return label.position.x === geometry.position.x && + label.position.y === geometry.position.y && + label.id !== geometry.id && + !label.show; + }); + if (hiddenLabel) { + hiddenLabel.show = true; + } + } + var minimumHeightAboveTerrain = 2; + var exposedMethods = { + onLeftClick: function (callback) { + $(map.scene.canvas).on('click', function (e) { + var boundingRect = map.scene.canvas.getBoundingClientRect(); + var id = determineIdsFromPosition({ + x: e.clientX - boundingRect.left, + y: e.clientY - boundingRect.top, + }, map).id; + callback(e, { mapTarget: id }); + }); + }, + onLeftClickMapAPI: function (callback) { + var lastClickTime = 0; + var clickTimeout = 0; + map.clickEventHandler = new Cesium.ScreenSpaceEventHandler(map.canvas); + map.clickEventHandler.setInputAction(function (e) { + // On a double-click, Cesium will fire 2 left-click events, too. We will only handle a + // click if 1) another click did not happen in the last 250 ms, and 2) another click + // does not happen in the next 250 ms. + if (clickTimeout > 0) { + clearTimeout(clickTimeout); + } + var currentClickTime = Date.now(); + if (currentClickTime - lastClickTime > 250) { + clickTimeout = window.setTimeout(function () { + var locationId = determineIdsFromPosition(e.position, map).locationId; + callback(locationId); + }, 250); + } + lastClickTime = currentClickTime; + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); + }, + clearLeftClickMapAPI: function () { + var _a; + (_a = map.clickEventHandler) === null || _a === void 0 ? void 0 : _a.destroy(); + }, + onRightClick: function (callback) { + $(map.scene.canvas).on('contextmenu', function (e) { + callback(e); + }); + }, + clearRightClick: function () { + $(map.scene.canvas).off('contextmenu'); + }, + onDoubleClick: function () { + map.doubleClickEventHandler = new Cesium.ScreenSpaceEventHandler(map.canvas); + map.doubleClickEventHandler.setInputAction(function (e) { + var locationId = determineIdsFromPosition(e.position, map).locationId; + if (locationId) { + ; + wreqr.vent.trigger('location:doubleClick', locationId); + } + }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK); + }, + clearDoubleClick: function () { + var _a; + (_a = map.doubleClickEventHandler) === null || _a === void 0 ? void 0 : _a.destroy(); + }, + onMouseTrackingForGeoDrag: function (_a) { + var moveFrom = _a.moveFrom, down = _a.down, move = _a.move, up = _a.up; + map.scene.screenSpaceCameraController.enableRotate = false; + map.dragAndDropEventHandler = new Cesium.ScreenSpaceEventHandler(map.canvas); + map.dragAndDropEventHandler.setInputAction(function (e) { + var locationId = determineIdsFromPosition(e.position, map).locationId; + var cartesian = map.scene.camera.pickEllipsoid(e.position, map.scene.globe.ellipsoid); + var cartographic = Cesium.Cartographic.fromCartesian(cartesian, map.scene.globe.ellipsoid); + down({ position: cartographic, mapLocationId: locationId }); + }, Cesium.ScreenSpaceEventType.LEFT_DOWN); + map.dragAndDropEventHandler.setInputAction(function (e) { + var locationId = determineIdsFromPosition(e.endPosition, map).locationId; + var cartesian = map.scene.camera.pickEllipsoid(e.endPosition, map.scene.globe.ellipsoid); + var cartographic = Cesium.Cartographic.fromCartesian(cartesian, map.scene.globe.ellipsoid); + var translation = moveFrom + ? { + longitude: Cesium.Math.toDegrees(cartographic.longitude - moveFrom.longitude), + latitude: Cesium.Math.toDegrees(cartographic.latitude - moveFrom.latitude), + } + : null; + move({ translation: translation, mapLocationId: locationId }); + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + map.dragAndDropEventHandler.setInputAction(up, Cesium.ScreenSpaceEventType.LEFT_UP); + }, + clearMouseTrackingForGeoDrag: function () { + var _a; + map.scene.screenSpaceCameraController.enableRotate = true; + (_a = map.dragAndDropEventHandler) === null || _a === void 0 ? void 0 : _a.destroy(); + }, + onMouseTrackingForPopup: function (downCallback, moveCallback, upCallback) { + map.screenSpaceEventHandlerForPopupPreview = + new Cesium.ScreenSpaceEventHandler(map.canvas); + map.screenSpaceEventHandlerForPopupPreview.setInputAction(function () { + downCallback(); + }, Cesium.ScreenSpaceEventType.LEFT_DOWN); + map.screenSpaceEventHandlerForPopupPreview.setInputAction(function () { + moveCallback(); + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + this.onLeftClick(upCallback); + }, + onMouseMove: function (callback) { + $(map.scene.canvas).on('mousemove', function (e) { + var boundingRect = map.scene.canvas.getBoundingClientRect(); + var position = { + x: e.clientX - boundingRect.left, + y: e.clientY - boundingRect.top, + }; + var _a = determineIdsFromPosition(position, map), id = _a.id, locationId = _a.locationId; + callback(e, { + mapTarget: id, + mapLocationId: locationId, + }); + }); + }, + clearMouseMove: function () { + $(map.scene.canvas).off('mousemove'); + }, + timeoutIds: [], + onCameraMoveStart: function (callback) { + this.timeoutIds.forEach(function (timeoutId) { + window.clearTimeout(timeoutId); + }); + this.timeoutIds = []; + map.scene.camera.moveStart.addEventListener(callback); + }, + offCameraMoveStart: function (callback) { + map.scene.camera.moveStart.removeEventListener(callback); + }, + onCameraMoveEnd: function (callback) { + var _this = this; + var timeoutCallback = function () { + _this.timeoutIds.push(window.setTimeout(function () { + callback(); + }, 300)); + }; + map.scene.camera.moveEnd.addEventListener(timeoutCallback); + }, + offCameraMoveEnd: function (callback) { + map.scene.camera.moveEnd.removeEventListener(callback); + }, + doPanZoom: function (coords) { + if (coords.length === 0) { + return; + } + var cartArray = coords.map(function (coord) { + return Cesium.Cartographic.fromDegrees(coord[0], coord[1], map.camera._positionCartographic.height); + }); + if (cartArray.length === 1) { + var point = Cesium.Ellipsoid.WGS84.cartographicToCartesian(cartArray[0]); + this.panToCoordinate(point, 2.0); + } + else { + var rectangle = Cesium.Rectangle.fromCartographicArray(cartArray); + this.panToRectangle(rectangle, { + duration: 2.0, + correction: 1.0, + }); + } + }, + panToResults: function (results) { + var rectangle, cartArray, point; + cartArray = _.flatten(results + .filter(function (result) { return result.hasGeometry(); }) + .map(function (result) { + return _.map(result.getPoints('location'), function (coordinate) { + return Cesium.Cartographic.fromDegrees(coordinate[0], coordinate[1], map.camera._positionCartographic.height); + }); + }, true)); + if (cartArray.length > 0) { + if (cartArray.length === 1) { + point = Cesium.Ellipsoid.WGS84.cartographicToCartesian(cartArray[0]); + this.panToCoordinate(point); + } + else { + rectangle = Cesium.Rectangle.fromCartographicArray(cartArray); + this.panToRectangle(rectangle); + } + } + }, + panToCoordinate: function (coords, duration) { + if (duration === void 0) { duration = 0.5; } + map.scene.camera.flyTo({ + duration: duration, + destination: coords, + }); + }, + panToExtent: function () { }, + panToShapesExtent: function (_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.duration, duration = _c === void 0 ? 500 : _c; + var currentPrimitives = map.scene.primitives._primitives.filter(function (prim) { return prim.id; }); + var actualPositions = currentPrimitives.reduce(function (blob, prim) { + return blob.concat(prim._polylines.reduce(function (subblob, polyline) { + return subblob.concat(polyline._actualPositions); + }, [])); + }, []); + if (actualPositions.length > 0) { + map.scene.camera.flyTo({ + duration: duration / 1000, + destination: Cesium.Rectangle.fromCartesianArray(actualPositions), + orientation: LookingStraightDownOrientation, + }); + return true; + } + return false; + }, + getCenterPositionOfPrimitiveIds: function (primitiveIds) { + var primitives = map.scene.primitives; + var positions = []; + // Iterate over primitives and compute bounding spheres + for (var i = 0; i < primitives.length; i++) { + var primitive = primitives.get(i); + if (primitiveIds.includes(primitive.id)) { + for (var j = 0; j < primitive.length; j++) { + var point = primitive.get(j); + positions = positions.concat(point.positions); + } + } + } + var boundingSphere = Cesium.BoundingSphere.fromPoints(positions); + if (Cesium.BoundingSphere.equals(boundingSphere, Cesium.BoundingSphere.fromPoints([]) // empty + )) { + throw new Error('No positions to zoom to'); + } + // here, notice we use flyTo instead of flyToBoundingSphere, as with the latter the orientation can't be controlled in this version and ends up tilted + // Calculate the position above the center of the bounding sphere + var radius = boundingSphere.radius; + var center = boundingSphere.center; + var up = Cesium.Cartesian3.clone(center); // Get the up direction from the center of the Earth to the position + Cesium.Cartesian3.normalize(up, up); + var position = Cesium.Cartesian3.multiplyByScalar(up, radius * 2, new Cesium.Cartesian3()); // Adjust multiplier for desired altitude + Cesium.Cartesian3.add(center, position, position); // Move position above the center + return position; + }, + zoomToIds: function (_a) { + var ids = _a.ids, _b = _a.duration, duration = _b === void 0 ? 500 : _b; + // use flyTo instead of flyToBoundingSphere, as with the latter the orientation can't be controlled in this version and it ends up tilted + map.camera.flyTo({ + destination: this.getCenterPositionOfPrimitiveIds(ids), + orientation: LookingStraightDownOrientation, + duration: duration / 1000, // change to seconds + }); + }, + panToRectangle: function (rectangle, opts) { + if (opts === void 0) { opts = { + duration: 0.5, + correction: 0.25, + }; } + map.scene.camera.flyTo({ + duration: opts.duration, + destination: getDestinationForVisiblePan(rectangle, map), + complete: function () { + map.scene.camera.flyTo({ + duration: opts.correction, + destination: getDestinationForVisiblePan(rectangle, map), + }); + }, + }); + }, + getShapes: function () { + return shapes; + }, + zoomToExtent: function () { }, + zoomToBoundingBox: function (_a) { + var north = _a.north, south = _a.south, east = _a.east, west = _a.west; + map.scene.camera.flyTo({ + duration: 0.5, + destination: Cesium.Rectangle.fromDegrees(west, south, east, north), + }); + }, + getBoundingBox: function () { + var viewRectangle = map.scene.camera.computeViewRectangle(); + return _.mapObject(viewRectangle, function (val) { return Cesium.Math.toDegrees(val); }); + }, + overlayImage: function (model) { + var metacardId = model.plain.id; + this.removeOverlay(metacardId); + var coords = model.getPoints('location'); + var cartographics = _.map(coords, function (coord) { + coord = convertPointCoordinate(coord); + return Cesium.Cartographic.fromDegrees(coord.longitude, coord.latitude, coord.altitude); + }); + var rectangle = Cesium.Rectangle.fromCartographicArray(cartographics); + var overlayLayer = map.scene.imageryLayers.addImageryProvider(new Cesium.SingleTileImageryProvider({ + url: model.currentOverlayUrl, + rectangle: rectangle, + })); + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + overlays[metacardId] = overlayLayer; + }, + removeOverlay: function (metacardId) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (overlays[metacardId]) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + map.scene.imageryLayers.remove(overlays[metacardId]); + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + delete overlays[metacardId]; + } + }, + removeAllOverlays: function () { + for (var overlay in overlays) { + if (overlays.hasOwnProperty(overlay)) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + map.scene.imageryLayers.remove(overlays[overlay]); + } + } + overlays = {}; + }, + getCartographicCenterOfClusterInDegrees: function (cluster) { + return utility.calculateCartographicCenterOfGeometriesInDegrees(cluster.results); + }, + getWindowLocationsOfResults: function (results) { + var occluder; + if (map.scene.mode === Cesium.SceneMode.SCENE3D) { + occluder = new Cesium.EllipsoidalOccluder(Cesium.Ellipsoid.WGS84, map.scene.camera.position); + } + return results.map(function (result) { + var cartesian3CenterOfGeometry = utility.calculateCartesian3CenterOfGeometry(result); + if (occluder && isNotVisible(cartesian3CenterOfGeometry, occluder)) { + return undefined; + } + var center = utility.calculateWindowCenterOfGeometry(cartesian3CenterOfGeometry, map); + if (center) { + return [center.x, center.y]; + } + else { + return undefined; + } + }); + }, + /* + * Draws a marker on the map designating a start/end point for the ruler measurement. The given + * coordinates should be an object with 'lat' and 'lon' keys with degrees values. The given + * marker label should be a single character or digit that is displayed on the map marker. + */ + addRulerPoint: function (coordinates) { + var lat = coordinates.lat, lon = coordinates.lon; + // a point requires an altitude value so just use 0 + var point = [lon, lat, 0]; + var options = { + id: ' ', + title: "Selected ruler coordinate", + image: DrawingUtility.getCircle({ + fillColor: rulerPointColor, + icon: null, + }), + view: this, + }; + return this.addPoint(point, options); + }, + /* + * Removes the given Billboard from the map. + */ + removeRulerPoint: function (billboardRef) { + billboardCollection.remove(billboardRef); + map.scene.requestRender(); + }, + /* + * Draws a line on the map between the points in the given array of points. + */ + addRulerLine: function (point) { + var startingCoordinates = mapModel.get('startingCoordinates'); + // creates an array of Cartesian3 points + // a PolylineGeometry allows the line to follow the curvature of the surface + map.coordArray = [ + startingCoordinates['lon'], + startingCoordinates['lat'], + rulerLineHeight, + point['lon'], + point['lat'], + rulerLineHeight, + ]; + return map.entities.add({ + polyline: { + positions: new Cesium.CallbackProperty(function () { + return Cesium.Cartesian3.fromDegreesArrayHeights(map.coordArray); + }, false), + width: 5, + show: true, + material: rulerColor, + }, + }); + }, + /* + * Update the position of the ruler line + */ + setRulerLine: function (point) { + var startingCoordinates = mapModel.get('startingCoordinates'); + map.coordArray = [ + startingCoordinates['lon'], + startingCoordinates['lat'], + rulerLineHeight, + point['lon'], + point['lat'], + rulerLineHeight, + ]; + map.scene.requestRender(); + }, + /* + * Removes the given polyline entity from the map. + */ + removeRulerLine: function (polyline) { + map.entities.remove(polyline); + map.scene.requestRender(); + }, + /* + Adds a billboard point utilizing the passed in point and options. + Options are a view to relate to, and an id, and a color. + */ + addPointWithText: function (point, options) { + var pointObject = convertPointCoordinate(point); + var cartographicPosition = Cesium.Cartographic.fromDegrees(pointObject.longitude, pointObject.latitude, pointObject.altitude); + var cartesianPosition = map.scene.globe.ellipsoid.cartographicToCartesian(cartographicPosition); + var billboardRef = billboardCollection.add({ + image: undefined, + position: cartesianPosition, + id: options.id, + eyeOffset: eyeOffset, + }); + billboardRef.unselectedImage = DrawingUtility.getCircleWithText({ + fillColor: options.color, + text: options.id.length, + strokeColor: 'white', + textColor: 'white', + badgeOptions: options.badgeOptions, + }); + billboardRef.partiallySelectedImage = DrawingUtility.getCircleWithText({ + fillColor: options.color, + text: options.id.length, + strokeColor: 'black', + textColor: 'white', + badgeOptions: options.badgeOptions, + }); + billboardRef.selectedImage = DrawingUtility.getCircleWithText({ + fillColor: 'orange', + text: options.id.length, + strokeColor: 'white', + textColor: 'white', + badgeOptions: options.badgeOptions, + }); + switch (options.isSelected) { + case 'selected': + billboardRef.image = billboardRef.selectedImage; + break; + case 'partially': + billboardRef.image = billboardRef.partiallySelectedImage; + break; + case 'unselected': + billboardRef.image = billboardRef.unselectedImage; + break; + } + //if there is a terrain provider and no altitude has been specified, sample it from the configured terrain provider + if (!pointObject.altitude && map.scene.terrainProvider) { + var promise = Cesium.sampleTerrain(map.scene.terrainProvider, 5, [ + cartographicPosition, + ]); + Cesium.when(promise, function (updatedCartographic) { + if (updatedCartographic[0].height && !options.view.isDestroyed) { + cartesianPosition = + map.scene.globe.ellipsoid.cartographicToCartesian(updatedCartographic[0]); + billboardRef.position = cartesianPosition; + } + }); + } + map.scene.requestRender(); + return billboardRef; + }, + /* + Adds a billboard point utilizing the passed in point and options. + Options are a view to relate to, and an id, and a color. + */ + addPoint: function (point, options) { + var pointObject = convertPointCoordinate(point); + var cartographicPosition = Cesium.Cartographic.fromDegrees(pointObject.longitude, pointObject.latitude, pointObject.altitude); + var cartesianPosition = map.scene.globe.ellipsoid.cartographicToCartesian(cartographicPosition); + var billboardRef = billboardCollection.add({ + image: undefined, + position: cartesianPosition, + id: options.id, + eyeOffset: eyeOffset, + pixelOffset: pixelOffset, + verticalOrigin: options.useVerticalOrigin + ? Cesium.VerticalOrigin.BOTTOM + : undefined, + horizontalOrigin: options.useHorizontalOrigin + ? Cesium.HorizontalOrigin.CENTER + : undefined, + view: options.view, + }); + billboardRef.unselectedImage = DrawingUtility.getPin({ + fillColor: options.color, + icon: options.icon, + badgeOptions: options.badgeOptions, + }); + billboardRef.selectedImage = DrawingUtility.getPin({ + fillColor: 'orange', + icon: options.icon, + badgeOptions: options.badgeOptions, + }); + billboardRef.image = options.isSelected + ? billboardRef.selectedImage + : billboardRef.unselectedImage; + //if there is a terrain provider and no altitude has been specified, sample it from the configured terrain provider + if (!pointObject.altitude && map.scene.terrainProvider) { + var promise = Cesium.sampleTerrain(map.scene.terrainProvider, 5, [ + cartographicPosition, + ]); + Cesium.when(promise, function (updatedCartographic) { + if (updatedCartographic[0].height && !options.view.isDestroyed) { + billboardRef.position = + map.scene.globe.ellipsoid.cartographicToCartesian(updatedCartographic[0]); + } + }); + } + map.scene.requestRender(); + return billboardRef; + }, + /* + Adds a label utilizing the passed in point and options. + Options are a view to an id and text. + */ + addLabel: function (point, options) { + var pointObject = convertPointCoordinate(point); + var cartographicPosition = Cesium.Cartographic.fromDegrees(pointObject.longitude, pointObject.latitude, pointObject.altitude); + var cartesianPosition = map.scene.globe.ellipsoid.cartographicToCartesian(cartographicPosition); + // X, Y offset values for the label + var offset = new Cesium.Cartesian2(20, -15); + // Cesium measurement for determining how to render the size of the label based on zoom + var scaleZoom = new Cesium.NearFarScalar(1.5e4, 1.0, 8.0e6, 0.0); + // Cesium measurement for determining how to render the translucency of the label based on zoom + var translucencyZoom = new Cesium.NearFarScalar(1.5e6, 1.0, 8.0e6, 0.0); + var labelRef = labelCollection.add({ + text: options.text, + position: cartesianPosition, + id: options.id, + pixelOffset: offset, + scale: 1.0, + scaleByDistance: scaleZoom, + translucencyByDistance: translucencyZoom, + fillColor: Cesium.Color.BLACK, + outlineColor: Cesium.Color.WHITE, + outlineWidth: 10, + style: Cesium.LabelStyle.FILL_AND_OUTLINE, + }); + mapModel.addLabel(labelRef); + return labelRef; + }, + /* + Adds a polyline utilizing the passed in line and options. + Options are a view to relate to, and an id, and a color. + */ + addLine: function (line, options) { + var lineObject = line.map(function (coordinate) { + return convertPointCoordinate(coordinate); + }); + var cartPoints = _.map(lineObject, function (point) { + return Cesium.Cartographic.fromDegrees(point.longitude, point.latitude, point.altitude); + }); + var cartesian = map.scene.globe.ellipsoid.cartographicArrayToCartesianArray(cartPoints); + var polylineCollection = new Cesium.PolylineCollection(); + polylineCollection.unselectedMaterial = Cesium.Material.fromType('PolylineOutline', { + color: determineCesiumColor(options.color), + outlineColor: Cesium.Color.WHITE, + outlineWidth: 4, + }); + polylineCollection.selectedMaterial = Cesium.Material.fromType('PolylineOutline', { + color: determineCesiumColor(options.color), + outlineColor: Cesium.Color.BLACK, + outlineWidth: 4, + }); + var polyline = polylineCollection.add({ + width: 8, + material: options.isSelected + ? polylineCollection.selectedMaterial + : polylineCollection.unselectedMaterial, + id: options.id, + positions: cartesian, + }); + if (map.scene.terrainProvider) { + var promise = Cesium.sampleTerrain(map.scene.terrainProvider, 5, cartPoints); + Cesium.when(promise, function (updatedCartographic) { + var positions = map.scene.globe.ellipsoid.cartographicArrayToCartesianArray(updatedCartographic); + if (updatedCartographic[0].height && !options.view.isDestroyed) { + polyline.positions = positions; + } + }); + } + map.scene.primitives.add(polylineCollection); + return polylineCollection; + }, + /* + Adds a polygon fill utilizing the passed in polygon and options. + Options are a view to relate to, and an id. + */ + addPolygon: function (polygon, options) { + var polygonObject = polygon.map(function (coordinate) { + return convertPointCoordinate(coordinate); + }); + var cartPoints = _.map(polygonObject, function (point) { + return Cesium.Cartographic.fromDegrees(point.longitude, point.latitude, point.altitude); + }); + var cartesian = map.scene.globe.ellipsoid.cartographicArrayToCartesianArray(cartPoints); + var unselectedPolygonRef = map.entities.add({ + polygon: { + hierarchy: cartesian, + material: new Cesium.GridMaterialProperty({ + color: Cesium.Color.WHITE, + cellAlpha: 0.0, + lineCount: new Cesium.Cartesian2(2, 2), + lineThickness: new Cesium.Cartesian2(2.0, 2.0), + lineOffset: new Cesium.Cartesian2(0.0, 0.0), + }), + perPositionHeight: true, + }, + show: true, + resultId: options.id, + showWhenSelected: false, + }); + var selectedPolygonRef = map.entities.add({ + polygon: { + hierarchy: cartesian, + material: new Cesium.GridMaterialProperty({ + color: Cesium.Color.BLACK, + cellAlpha: 0.0, + lineCount: new Cesium.Cartesian2(2, 2), + lineThickness: new Cesium.Cartesian2(2.0, 2.0), + lineOffset: new Cesium.Cartesian2(0.0, 0.0), + }), + perPositionHeight: true, + }, + show: false, + resultId: options.id, + showWhenSelected: true, + }); + if (map.scene.terrainProvider) { + var promise = Cesium.sampleTerrain(map.scene.terrainProvider, 5, cartPoints); + Cesium.when(promise, function (updatedCartographic) { + cartesian = + map.scene.globe.ellipsoid.cartographicArrayToCartesianArray(updatedCartographic); + if (updatedCartographic[0].height && !options.view.isDestroyed) { + unselectedPolygonRef.polygon.hierarchy.setValue(cartesian); + selectedPolygonRef.polygon.hierarchy.setValue(cartesian); + } + }); + } + return [unselectedPolygonRef, selectedPolygonRef]; + }, + /* + Updates a passed in geometry to reflect whether or not it is selected. + Options passed in are color and isSelected. + */ + updateCluster: function (geometry, options) { + var _this = this; + if (geometry.constructor === Array) { + geometry.forEach(function (innerGeometry) { + _this.updateCluster(innerGeometry, options); + }); + } + if (geometry.constructor === Cesium.Billboard) { + switch (options.isSelected) { + case 'selected': + geometry.image = geometry.selectedImage; + break; + case 'partially': + geometry.image = geometry.partiallySelectedImage; + break; + case 'unselected': + geometry.image = geometry.unselectedImage; + break; + } + var isSelected = options.isSelected !== 'unselected'; + geometry.eyeOffset = new Cesium.Cartesian3(0, 0, isSelected ? -1 : 0); + } + else if (geometry.constructor === Cesium.PolylineCollection) { + geometry._polylines.forEach(function (polyline) { + polyline.material = Cesium.Material.fromType('PolylineOutline', { + color: determineCesiumColor('rgba(0,0,0, .1)'), + outlineColor: determineCesiumColor('rgba(255,255,255, .1)'), + outlineWidth: 4, + }); + }); + } + else if (geometry.showWhenSelected) { + geometry.show = options.isSelected; + } + else { + geometry.show = !options.isSelected; + } + map.scene.requestRender(); + }, + /* + Updates a passed in geometry to reflect whether or not it is selected. + Options passed in are color and isSelected. + */ + updateGeometry: function (geometry, options) { + var _this = this; + if (geometry.constructor === Array) { + geometry.forEach(function (innerGeometry) { + _this.updateGeometry(innerGeometry, options); + }); + } + if (geometry.constructor === Cesium.Billboard) { + geometry.image = options.isSelected + ? geometry.selectedImage + : geometry.unselectedImage; + geometry.eyeOffset = new Cesium.Cartesian3(0, 0, options.isSelected ? -1 : 0); + } + else if (geometry.constructor === Cesium.Label) { + geometry.isSelected = options.isSelected; + showHideLabel({ + geometry: geometry, + }); + } + else if (geometry.constructor === Cesium.PolylineCollection) { + geometry._polylines.forEach(function (polyline) { + polyline.material = options.isSelected + ? geometry.selectedMaterial + : geometry.unselectedMaterial; + }); + } + else if (geometry.showWhenSelected) { + geometry.show = options.isSelected; + } + else { + geometry.show = !options.isSelected; + } + map.scene.requestRender(); + }, + /* + Updates a passed in geometry to be hidden + */ + hideGeometry: function (geometry) { + if (geometry.constructor === Cesium.Billboard || + geometry.constructor === Cesium.Label) { + geometry.show = false; + } + else if (geometry.constructor === Cesium.PolylineCollection) { + geometry._polylines.forEach(function (polyline) { + polyline.show = false; + }); + } + }, + /* + Updates a passed in geometry to be shown + */ + showGeometry: function (geometry) { + if (geometry.constructor === Cesium.Billboard) { + geometry.show = true; + } + else if (geometry.constructor === Cesium.Label) { + showHideLabel({ + geometry: geometry, + findSelected: true, + }); + } + else if (geometry.constructor === Cesium.PolylineCollection) { + geometry._polylines.forEach(function (polyline) { + polyline.show = true; + }); + } + map.scene.requestRender(); + }, + removeGeometry: function (geometry) { + billboardCollection.remove(geometry); + labelCollection.remove(geometry); + map.scene.primitives.remove(geometry); + //unminified cesium chokes if you feed a geometry with id as an Array + if (geometry.constructor === Cesium.Entity) { + map.entities.remove(geometry); + } + if (geometry.constructor === Cesium.Label) { + mapModel.removeLabel(geometry); + showHiddenLabel(geometry); + } + map.scene.requestRender(); + }, + destroyShapes: function () { + // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'shape' implicitly has an 'any' type. + shapes.forEach(function (shape) { + shape.destroy(); + }); + shapes = []; + if (map && map.scene) { + map.scene.requestRender(); + } + }, + getMap: function () { + return map; + }, + zoomIn: function () { + var cameraPositionCartographic = map.scene.globe.ellipsoid.cartesianToCartographic(map.scene.camera.position); + var terrainHeight = map.scene.globe.getHeight(cameraPositionCartographic); + var heightAboveGround = cameraPositionCartographic.height - terrainHeight; + var zoomAmount = heightAboveGround / 2; // basically double the current zoom + var maxZoomAmount = heightAboveGround - minimumHeightAboveTerrain; + // if the zoom amount is greater than the max zoom amount, zoom to the max zoom amount + map.scene.camera.zoomIn(Math.min(maxZoomAmount, zoomAmount)); + }, + zoomOut: function () { + var cameraPositionCartographic = map.scene.globe.ellipsoid.cartesianToCartographic(map.scene.camera.position); + var terrainHeight = map.scene.globe.getHeight(cameraPositionCartographic); + var heightAboveGround = cameraPositionCartographic.height - terrainHeight; + map.scene.camera.zoomOut(heightAboveGround); + }, + destroy: function () { + ; + wreqr.vent.off('map:requestRender', requestRenderHandler); + map.destroy(); + }, + }; + return exposedMethods; +} +//# sourceMappingURL=data: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WNrOiBhbnkpIHtcbiAgICAgIGNvbnN0IHRpbWVvdXRDYWxsYmFjayA9ICgpID0+IHtcbiAgICAgICAgdGhpcy50aW1lb3V0SWRzLnB1c2goXG4gICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgY2FsbGJhY2soKVxuICAgICAgICAgIH0sIDMwMClcbiAgICAgICAgKVxuICAgICAgfVxuICAgICAgbWFwLnNjZW5lLmNhbWVyYS5tb3ZlRW5kLmFkZEV2ZW50TGlzdGVuZXIodGltZW91dENhbGxiYWNrKVxuICAgIH0sXG4gICAgb2ZmQ2FtZXJhTW92ZUVuZChjYWxsYmFjazogYW55KSB7XG4gICAgICBtYXAuc2NlbmUuY2FtZXJhLm1vdmVFbmQucmVtb3ZlRXZlbnRMaXN0ZW5lcihjYWxsYmFjaylcbiAgICB9LFxuICAgIGRvUGFuWm9vbShjb29yZHM6IGFueSkge1xuICAgICAgaWYgKGNvb3Jkcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgcmV0dXJuXG4gICAgICB9XG4gICAgICBjb25zdCBjYXJ0QXJyYXkgPSBjb29yZHMubWFwKChjb29yZDogYW55KSA9PlxuICAgICAgICBDZXNpdW0uQ2FydG9ncmFwaGljLmZyb21EZWdyZWVzKFxuICAgICAgICAgIGNvb3JkWzBdLFxuICAgICAgICAgIGNvb3JkWzFdLFxuICAgICAgICAgIG1hcC5jYW1lcmEuX3Bvc2l0aW9uQ2FydG9ncmFwaGljLmhlaWdodFxuICAgICAgICApXG4gICAgICApXG4gICAgICBpZiAoY2FydEFycmF5Lmxlbmd0aCA9PT0gMSkge1xuICAgICAgICBjb25zdCBwb2ludCA9IENlc2l1bS5FbGxpcHNvaWQuV0dTODQuY2FydG9ncmFwaGljVG9DYXJ0ZXNpYW4oXG4gICAgICAgICAgY2FydEFycmF5WzBdXG4gICAgICAgIClcbiAgICAgICAgdGhpcy5wYW5Ub0Nvb3JkaW5hdGUocG9pbnQsIDIuMClcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbnN0IHJlY3RhbmdsZSA9IENlc2l1bS5SZWN0YW5nbGUuZnJvbUNhcnRvZ3JhcGhpY0FycmF5KGNhcnRBcnJheSlcbiAgICAgICAgdGhpcy5wYW5Ub1JlY3RhbmdsZShyZWN0YW5nbGUsIHtcbiAgICAgICAgICBkdXJhdGlvbjogMi4wLFxuICAgICAgICAgIGNvcnJlY3Rpb246IDEuMCxcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICB9LFxuICAgIHBhblRvUmVzdWx0cyhyZXN1bHRzOiBhbnkpIHtcbiAgICAgIGxldCByZWN0YW5nbGUsIGNhcnRBcnJheSwgcG9pbnRcbiAgICAgIGNhcnRBcnJheSA9IF8uZmxhdHRlbihcbiAgICAgICAgcmVzdWx0c1xuICAgICAgICAgIC5maWx0ZXIoKHJlc3VsdDogYW55KSA9PiByZXN1bHQuaGFzR2VvbWV0cnkoKSlcbiAgICAgICAgICAubWFwKFxuICAgICAgICAgICAgKHJlc3VsdDogYW55KSA9PlxuICAgICAgICAgICAgICBfLm1hcChyZXN1bHQuZ2V0UG9pbnRzKCdsb2NhdGlvbicpLCAoY29vcmRpbmF0ZSkgPT5cbiAgICAgICAgICAgICAgICBDZXNpdW0uQ2FydG9ncmFwaGljLmZyb21EZWdyZWVzKFxuICAgICAgICAgICAgICAgICAgY29vcmRpbmF0ZVswXSxcbiAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVbMV0sXG4gICAgICAgICAgICAgICAgICBtYXAuY2FtZXJhLl9wb3NpdGlvbkNhcnRvZ3JhcGhpYy5oZWlnaHRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICB0cnVlXG4gICAgICAgICAgKVxuICAgICAgKVxuICAgICAgaWYgKGNhcnRBcnJheS5sZW5ndGggPiAwKSB7XG4gICAgICAgIGlmIChjYXJ0QXJyYXkubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAg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WxsaXBzb2lkLmNhcnRlc2lhblRvQ2FydG9ncmFwaGljKFxuICAgICAgICAgIG1hcC5zY2VuZS5jYW1lcmEucG9zaXRpb25cbiAgICAgICAgKVxuXG4gICAgICBjb25zdCB0ZXJyYWluSGVpZ2h0ID0gbWFwLnNjZW5lLmdsb2JlLmdldEhlaWdodChcbiAgICAgICAgY2FtZXJhUG9zaXRpb25DYXJ0b2dyYXBoaWNcbiAgICAgIClcblxuICAgICAgY29uc3QgaGVpZ2h0QWJvdmVHcm91bmQgPVxuICAgICAgICBjYW1lcmFQb3NpdGlvbkNhcnRvZ3JhcGhpYy5oZWlnaHQgLSB0ZXJyYWluSGVpZ2h0XG4gICAgICBtYXAuc2NlbmUuY2FtZXJhLnpvb21PdXQoaGVpZ2h0QWJvdmVHcm91bmQpXG4gICAgfSxcbiAgICBkZXN0cm95KCkge1xuICAgICAgOyh3cmVxciBhcyBhbnkpLnZlbnQub2ZmKCdtYXA6cmVxdWVzdFJlbmRlcicsIHJlcXVlc3RSZW5kZXJIYW5kbGVyKVxuICAgICAgbWFwLmRlc3Ryb3koKVxuICAgIH0sXG4gIH1cbiAgcmV0dXJuIGV4cG9zZWRNZXRob2RzXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/polygon-display.d.ts b/src/main/webapp/component/visualization/maps/cesium/polygon-display.d.ts new file mode 100644 index 00000000000..d3125f7a386 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/polygon-display.d.ts @@ -0,0 +1,13 @@ +/// +import { Translation } from '../interactions.provider'; +type Polygon = { + polygon: [number, number][]; +}; +export declare const CesiumPolygonDisplay: ({ map, model, onDraw, translation, isInteractive, }: { + map: any; + model: any; + onDraw?: ((newPoly: Polygon) => void) | undefined; + translation?: Translation | undefined; + isInteractive?: boolean | undefined; +}) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/visualization/maps/cesium/polygon-display.js b/src/main/webapp/component/visualization/maps/cesium/polygon-display.js new file mode 100644 index 00000000000..b9ea0eaf27c --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/polygon-display.js @@ -0,0 +1,309 @@ +import { __read, __values } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import DistanceUtils from '../../../../js/DistanceUtils'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import { validateGeo } from '../../../../react-component/utils/validation'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { useRender } from '../../../hooks/useRender'; +import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display'; +import ShapeUtils from '../../../../js/ShapeUtils'; +import { constructSolidLinePrimitive, constructOutlinedLinePrimitive, constructDottedLinePrimitive, } from './line-display'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import * as Turf from '@turf/turf'; +import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper'; +import utility from './utility'; +var toDeg = Cesium.Math.toDegrees; +var polygonFillColor = 'rgba(153,102,0,0.2)'; +var CAMERA_MAGNITUDE_THRESHOLD = 8000000; +var getCurrentMagnitudeFromMap = function (_a) { + var map = _a.map; + return map.getMap().camera.getMagnitude(); +}; +var needsRedraw = function (_a) { + var map = _a.map, drawnMagnitude = _a.drawnMagnitude; + var currentMagnitude = getCurrentMagnitudeFromMap({ map: map }); + if (currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + if (currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && + drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD) { + return true; + } + return false; +}; +var positionsToPolygon = function (positions, ellipsoid) { + return { + polygon: positions.map(function (cartPos) { + var latLon = ellipsoid.cartesianToCartographic(cartPos); + var lon = toDeg(latLon.longitude); + var lat = toDeg(latLon.latitude); + return [ + DistanceUtils.coordinateRound(lon), + DistanceUtils.coordinateRound(lat), + ]; + }), + }; +}; +var validateAndFixPolygon = function (polygonPoints) { + var _a; + if (!polygonPoints || polygonPoints.length < 3) { + return false; + } + if (polygonPoints[0].toString() !== + polygonPoints[polygonPoints.length - 1].toString()) { + polygonPoints.push(polygonPoints[0]); + } + if ((_a = validateGeo('polygon', JSON.stringify(polygonPoints))) === null || _a === void 0 ? void 0 : _a.error) { + return false; + } + polygonPoints.forEach(function (point) { + point[0] = DistanceUtils.coordinateRound(point[0]); + point[1] = DistanceUtils.coordinateRound(point[1]); + }); + return true; +}; +var drawGeometry = function (_a) { + var model = _a.model, map = _a.map, id = _a.id, setDrawnMagnitude = _a.setDrawnMagnitude, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + var json = model.toJSON(); + if (!Array.isArray(json.polygon)) { + map.getMap().scene.requestRender(); + return; + } + var isMultiPolygon = ShapeUtils.isArray3D(json.polygon); + // Create a deep copy since we may modify some of these positions for display purposes + var polygons = JSON.parse(JSON.stringify(isMultiPolygon ? json.polygon : [json.polygon])); + var cameraMagnitude = map.getMap().camera.getMagnitude(); + setDrawnMagnitude(cameraMagnitude); + removeOrLockOldDrawing(Boolean(isInteractive), id, map, model); + var buffer = DistanceUtils.getDistanceInMeters(json.polygonBufferWidth, model.get('polygonBufferUnits')); + if (onDraw) { + polygons.forEach(function (polygonPoints) { + if (!validateAndFixPolygon(polygonPoints)) { + return; + } + var drawPrimitive = new DrawHelper.PolygonPrimitive(constructSolidLinePrimitive({ + coordinates: polygonPoints, + model: model, + id: id, + color: polygonFillColor, + buffer: buffer, + })); + drawPrimitive.setEditable(); + drawPrimitive.addListener('onEdited', function (event) { + var polygon = positionsToPolygon(event.positions, map.getMap().scene.globe.ellipsoid); + onDraw(polygon); + }); + map.getMap().scene.primitives.add(drawPrimitive); + }); + } + else { + var pc_1 = new Cesium.PolylineCollection(); + pc_1.id = id; + pc_1.locationId = json.locationId; + polygons.forEach(function (polygonPoints) { + var e_1, _a; + if (!validateAndFixPolygon(polygonPoints)) { + return; + } + if (translation) { + try { + for (var polygonPoints_1 = __values(polygonPoints), polygonPoints_1_1 = polygonPoints_1.next(); !polygonPoints_1_1.done; polygonPoints_1_1 = polygonPoints_1.next()) { + var point = polygonPoints_1_1.value; + point[0] += translation.longitude; + point[1] += translation.latitude; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (polygonPoints_1_1 && !polygonPoints_1_1.done && (_a = polygonPoints_1.return)) _a.call(polygonPoints_1); + } + finally { if (e_1) throw e_1.error; } + } + } + if (buffer > 0) { + var adjustedPolygon = Turf.polygon([polygonPoints]); + utility.adjustGeoCoords(adjustedPolygon); + var bufferedPolygonPoints = Turf.buffer(adjustedPolygon, Math.max(buffer, 1), { + units: 'meters', + }); + if (!bufferedPolygonPoints) { + return; + } + // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments + utility.adjustGeoCoords(bufferedPolygonPoints); + var bufferedPolygons = bufferedPolygonPoints.geometry.coordinates.map(function (set) { return Turf.polygon([set]); }); + var bufferedPolygon = bufferedPolygons.reduce(function (a, b) { return Turf.union(a, b); }, bufferedPolygons[0]); + bufferedPolygon === null || bufferedPolygon === void 0 ? void 0 : bufferedPolygon.geometry.coordinates.forEach(function (coords) { + return pc_1.add(constructOutlinedLinePrimitive({ + coordinates: coords, + model: model, + id: id, + isInteractive: isInteractive, + })); + }); + pc_1.add(constructDottedLinePrimitive({ + coordinates: polygonPoints, + model: model, + isInteractive: isInteractive, + })); + } + else { + pc_1.add(constructOutlinedLinePrimitive({ + coordinates: polygonPoints, + model: model, + id: id, + isInteractive: isInteractive, + })); + } + }); + map.getMap().scene.primitives.add(pc_1); + } + map.getMap().scene.requestRender(); +}; +var useCameraMagnitude = function (_a) { + var map = _a.map; + var _b = __read(React.useState(0), 2), cameraMagnitude = _b[0], setCameraMagnitude = _b[1]; + var _c = __read(React.useState(false), 2), isMoving = _c[0], setIsMoving = _c[1]; + var render = useRender(); + React.useEffect(function () { + var startListener = function () { return setIsMoving(true); }; + var endListener = function () { return setIsMoving(false); }; + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.addEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.addEventListener(endListener); + return function () { + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveStart.removeEventListener(startListener); + map === null || map === void 0 ? void 0 : map.getMap().scene.camera.moveEnd.removeEventListener(endListener); + }; + }, [map]); + React.useEffect(function () { + if (isMoving) { + var animationId_1 = window.requestAnimationFrame(function () { + setCameraMagnitude(getCurrentMagnitudeFromMap({ map: map })); + }); + return function () { + window.cancelAnimationFrame(animationId_1); + }; + } + return function () { }; + }, [isMoving, render]); + return [cameraMagnitude, setCameraMagnitude]; +}; +var useListenToLineModel = function (_a) { + var model = _a.model, map = _a.map, onDraw = _a.onDraw, newPoly = _a.newPoly, translation = _a.translation, isInteractive = _a.isInteractive; + var _b = __read(useCameraMagnitude({ map: map }), 1), cameraMagnitude = _b[0]; + var _c = __read(React.useState(0), 2), drawnMagnitude = _c[0], setDrawnMagnitude = _c[1]; + var callback = React.useMemo(function () { + return function () { + if (map) { + if (newPoly) { + // Clone the model to display the new polygon drawn because we don't + // want to update the existing model unless the user clicks Apply. + var newModel = model.clone(); + newModel.set(newPoly); + drawGeometry({ + map: map, + model: newModel, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + }); + } + else if (model) { + drawGeometry({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + setDrawnMagnitude: setDrawnMagnitude, + onDraw: onDraw, + translation: translation, + isInteractive: isInteractive, + }); + } + } + }; + }, [model, map, newPoly, translation, isInteractive]); + useListenTo(model, 'change:polygon change:polygonBufferWidth change:polygonBufferUnits', callback); + React.useEffect(function () { + if (map && needsRedraw({ map: map, drawnMagnitude: drawnMagnitude })) { + callback(); + } + }, [cameraMagnitude, drawnMagnitude, callback, map]); + React.useEffect(function () { + callback(); + }, [callback]); +}; +var useStartMapDrawing = function (_a) { + var map = _a.map, model = _a.model, setNewPoly = _a.setNewPoly, onDraw = _a.onDraw; + React.useEffect(function () { + if (map && model) { + var material = Cesium.Material.fromType('Color', { + color: Cesium.Color.fromCssColorString(polygonFillColor), + }); + map.getMap().drawHelper["startDrawingPolygon"]({ + callback: function (positions) { + var drawnPolygon = positionsToPolygon(positions, map.getMap().scene.globe.ellipsoid); + var polygon = drawnPolygon.polygon; + //this shouldn't ever get hit because the draw library should protect against it, but just in case it does, remove the point + if (polygon.length > 3 && + polygon[polygon.length - 1][0] === polygon[polygon.length - 2][0] && + polygon[polygon.length - 1][1] === polygon[polygon.length - 2][1]) { + polygon.pop(); + } + setNewPoly(drawnPolygon); + onDraw(drawnPolygon); + }, + appearance: new Cesium.MaterialAppearance({ + material: material, + }), + material: material, + }); + } + }, [map, model]); +}; +export var CesiumPolygonDisplay = function (_a) { + var map = _a.map, model = _a.model, onDraw = _a.onDraw, translation = _a.translation, isInteractive = _a.isInteractive; + // Use state to store the polygon drawn by the user before they click Apply or Cancel. + // When the user clicks Draw, they are allowed to edit the existing polygon (if it + // exists), or draw a new polygon. If they draw a new polygon, save it to state then show + // it instead of the draw model because we don't want to update the draw model + // unless the user clicks Apply. + var _b = __read(React.useState(null), 2), newPoly = _b[0], setNewPoly = _b[1]; + if (onDraw) { + useStartMapDrawing({ map: map, model: model, setNewPoly: setNewPoly, onDraw: onDraw }); + } + useListenToLineModel({ + map: map, + model: model, + newPoly: newPoly, + onDraw: onDraw, + translation: translation, + isInteractive: isInteractive, + }); + React.useEffect(function () { + return function () { + if (model && map) { + removeOldDrawing({ map: map, id: getIdFromModelForDisplay({ model: model }) }); + map.getMap().drawHelper.stopDrawing(); + } + }; + }, [map, model]); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9seWdvbi1kaXNwbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92aXN1YWxpemF0aW9uL21hcHMvY2VzaXVtL3BvbHlnb24tZGlzcGxheS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxhQUFhLE1BQU0sOEJBQThCLENBQUE7QUFDeEQsbUpBQW1KO0FBQ25KLE9BQU8sTUFBTSxNQUFNLDRCQUE0QixDQUFBO0FBQy9DLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQTtBQUMxRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sOENBQThDLENBQUE7QUFDMUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFBO0FBQ3BELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHVCQUF1QixDQUFBO0FBQ2hGLE9BQU8sVUFBVSxNQUFNLDJCQUEyQixDQUFBO0FBQ2xELE9BQU8sRUFDTCwyQkFBMkIsRUFDM0IsOEJBQThCLEVBQzlCLDRCQUE0QixHQUM3QixNQUFNLGdCQUFnQixDQUFBO0FBQ3ZCLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ2pFLE9BQU8sS0FBSyxJQUFJLE1BQU0sWUFBWSxDQUFB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mdldERpc3RhbmNlSW5NZXRlcnMoXG4gICAganNvbi5wb2x5Z29uQnVmZmVyV2lkdGgsXG4gICAgbW9kZWwuZ2V0KCdwb2x5Z29uQnVmZmVyVW5pdHMnKVxuICApXG5cbiAgaWYgKG9uRHJhdykge1xuICAgIHBvbHlnb25zLmZvckVhY2goKHBvbHlnb25Qb2ludHMpID0+IHtcbiAgICAgIGlmICghdmFsaWRhdGVBbmRGaXhQb2x5Z29uKHBvbHlnb25Qb2ludHMpKSB7XG4gICAgICAgIHJldHVyblxuICAgICAgfVxuXG4gICAgICBjb25zdCBkcmF3UHJpbWl0aXZlID0gbmV3IChEcmF3SGVscGVyLlBvbHlnb25QcmltaXRpdmUgYXMgYW55KShcbiAgICAgICAgY29uc3RydWN0U29saWRMaW5lUHJpbWl0aXZlKHtcbiAgICAgICAgICBjb29yZGluYXRlczogcG9seWdvblBvaW50cyxcbiAgICAgICAgICBtb2RlbCxcbiAgICAgICAgICBpZCxcbiAgICAgICAgICBjb2xvcjogcG9seWdvbkZpbGxDb2xvcixcbiAgICAgICAgICBidWZmZXIsXG4gICAgICAgIH0pXG4gICAgICApXG4gICAgICBkcmF3UHJpbWl0aXZlLnNldEVkaXRhYmxlKClcbiAgICAgIGRyYXdQcmltaXRpdmUuYWRkTGlzdGVuZXIoJ29uRWRpdGVkJywgZnVuY3Rpb24gKGV2ZW50OiBhbnkpIHtcbiAgICAgICAgY29uc3QgcG9seWdvbiA9IHBvc2l0aW9uc1RvUG9seWdvbihcbiAgICAgICAgICBldmVudC5wb3NpdGlvbnMsXG4gICAgICAgICAgbWFwLmdldE1hcCgpLnNjZW5lLmdsb2JlLmVsbGlwc29pZFxuICAgICAgICApXG4gICAgICAgIG9uRHJhdyhwb2x5Z29uKVxuICAgICAgfSlcbiAgICAgIG1hcC5nZXRNYXAoKS5zY2VuZS5wcmltaXRpdmVzLmFkZChkcmF3UHJpbWl0aXZlKVxuICAgIH0pXG4gIH0gZWxzZSB7XG4gICAgY29uc3QgcG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ZXJpbmcsIHNpbmNlIGJ1ZmZlcmluZyB1bmRvZXMgdGhlIGFudGltZXJpZGlhbiBhZGp1c3RtZW50c1xuICAgICAgICB1dGlsaXR5LmFkanVzdEdlb0Nvb3JkcyhidWZmZXJlZFBvbHlnb25Qb2ludHMpXG5cbiAgICAgICAgY29uc3QgYnVmZmVyZWRQb2x5Z29ucyA9IGJ1ZmZlcmVkUG9seWdvblBvaW50cy5nZW9tZXRyeS5jb29yZGluYXRlcy5tYXAoXG4gICAgICAgICAgKHNldCkgPT4gVHVyZi5wb2x5Z29uKFtzZXRdKVxuICAgICAgICApXG5cbiAgICAgICAgY29uc3QgYnVmZmVyZWRQb2x5Z29uID0gYnVmZmVyZWRQb2x5Z29ucy5yZWR1Y2UoXG4gICAgICAgICAgKGEsIGIpID0+IFR1cmYudW5pb24oYSwgYiksXG4gICAgICAgICAgYnVmZmVyZWRQb2x5Z29uc1swXVxuICAgICAgICApXG5cbiAgICAgICAgYnVmZmVyZWRQb2x5Z29uPy5nZW9tZXRyeS5jb29yZGluYXRlcy5mb3JFYWNoKChjb29yZHM6IGFueSkgPT5cbiAgICAgICAgICBwYy5hZGQoXG4gICAgICAgICAgICBjb25zdHJ1Y3RPdXRsaW5lZExpbmVQcmltaXRpdmUoe1xuICAgICAgICAgICAgICBjb29yZGluYXRlczogY29vcmRzLFxuICAgICAgICAgICAgICBtb2RlbCxcbiAgICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICAgIGlzSW50ZXJhY3RpdmUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIClcbiAgICAgICAgKVxuICAgICAgICBwYy5hZGQoXG4gICAgICAgICAgY29uc3RydWN0RG90dGVkTGluZVByaW1pdGl2ZSh7XG4gICAgICAgICAgICBjb29yZGluYXRlczogcG9seWdvblBvaW50cyxcbiAgICAgICAgICAgIG1vZGVsLFxuICAgICAgICAgICAgaXNJbnRlcmFjdGl2ZSxcbiAgICAgICAgICB9KVxuICAgICAgICApXG4gICAgICB9IGV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ZXcgcG9seWdvbiwgc2F2ZSBpdCB0byBzdGF0ZSB0aGVuIHNob3dcbiAgLy8gaXQgaW5zdGVhZCBvZiB0aGUgZHJhdyBtb2RlbCBiZWNhdXNlIHdlIGRvbid0IHdhbnQgdG8gdXBkYXRlIHRoZSBkcmF3IG1vZGVsXG4gIC8vIHVubGVzcyB0aGUgdXNlciBjbGlja3MgQXBwbHkuXG4gIGNvbnN0IFtuZXdQb2x5LCBzZXROZXdQb2x5XSA9IFJlYWN0LnVzZVN0YXRlPFBvbHlnb24gfCBudWxsPihudWxsKVxuICBpZiAob25EcmF3KSB7XG4gICAgdXNlU3RhcnRNYXBEcmF3aW5nKHsgbWFwLCBtb2RlbCwgc2V0TmV3UG9seSwgb25EcmF3IH0pXG4gIH1cbiAgdXNlTGlzdGVuVG9MaW5lTW9kZWwoe1xuICAgIG1hcCxcbiAgICBtb2RlbCxcbiAgICBuZXdQb2x5LFxuICAgIG9uRHJhdyxcbiAgICB0cmFuc2xhdGlvbixcbiAgICBpc0ludGVyYWN0aXZlLFxuICB9KVxuICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBpZiAobW9kZWwgJiYgbWFwKSB7XG4gICAgICAgIHJlbW92ZU9sZERyYXdpbmcoeyBtYXAsIGlkOiBnZXRJZEZyb21Nb2RlbEZvckRpc3BsYXkoeyBtb2RlbCB9KSB9KVxuICAgICAgICBtYXAuZ2V0TWFwKCkuZHJhd0hlbHBlci5zdG9wRHJhd2luZygpXG4gICAgICB9XG4gICAgfVxuICB9LCBbbWFwLCBtb2RlbF0pXG4gIHJldHVybiA8PjwvPlxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/cesium/utility.d.ts b/src/main/webapp/component/visualization/maps/cesium/utility.d.ts new file mode 100644 index 00000000000..0f07dabe4aa --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/utility.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as Turf from '@turf/turf'; +import { Feature, Geometry } from '@turf/turf'; +interface FeatureWithCoords extends GeoJSON.Feature { + geometry: Exclude; +} +declare const _default: { + calculateCartesian3CenterOfGeometry(propertyModel: any): any; + calculateCartographicCenterOfGeometryInRadians(propertyModel: any): any; + calculateCartographicCenterOfGeometryInDegrees(propertyModel: any): any[]; + calculateWindowCenterOfGeometry(geometry: any, map: any): any; + calculateCartesian3CenterOfGeometries(propertyModels: any): any; + calculateCartographicCenterOfGeometriesInRadians(propertyModels: any): any; + calculateCartographicCenterOfGeometriesInDegrees(propertyModels: any): any[]; + featureFromShape(shape: any): Turf.helpers.Feature | Turf.helpers.Feature | Turf.helpers.Feature | null; + featureIsValid(feature: FeatureWithCoords): number; + adjustGeoCoords(geo: Feature): void; +}; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/cesium/utility.js b/src/main/webapp/component/visualization/maps/cesium/utility.js new file mode 100644 index 00000000000..3df800676b1 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/cesium/utility.js @@ -0,0 +1,141 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import _ from 'underscore'; +import DistanceUtils from '../../../../js/DistanceUtils'; +import ShapeUtils from '../../../../js/ShapeUtils'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import * as Turf from '@turf/turf'; +var METERS = 'meters'; +/* + A variety of helpful functions for dealing with Cesium +*/ +export default { + /* + Calculates the center of given a geometry (WKT) + */ + calculateCartesian3CenterOfGeometry: function (propertyModel) { + return Cesium.BoundingSphere.fromPoints(Cesium.Cartesian3.fromDegreesArray(_.flatten(propertyModel.getPoints()))).center; + }, + /* + Calculates the center of given a geometry (WKT) + */ + calculateCartographicCenterOfGeometryInRadians: function (propertyModel) { + return Cesium.Cartographic.fromCartesian(this.calculateCartesian3CenterOfGeometry(propertyModel)); + }, + /* + Calculates the center of given a geometry (WKT) + */ + calculateCartographicCenterOfGeometryInDegrees: function (propertyModel) { + var cartographicCenterInRadians = this.calculateCartographicCenterOfGeometryInRadians(propertyModel); + return [ + Cesium.Math.toDegrees(cartographicCenterInRadians.longitude), + Cesium.Math.toDegrees(cartographicCenterInRadians.latitude), + ]; + }, + calculateWindowCenterOfGeometry: function (geometry, map) { + var cartesian3position = geometry; + if (cartesian3position.constructor !== Cesium.Cartesian3) { + cartesian3position = + this.calculateCartesian3CenterOfGeometry(cartesian3position); + } + return Cesium.SceneTransforms.wgs84ToWindowCoordinates(map.scene, cartesian3position); + }, + /* + Calculates the center of given geometries (WKT) + */ + calculateCartesian3CenterOfGeometries: function (propertyModels) { + var allPoints = propertyModels.map(function (propertyModel) { + return propertyModel.getPoints(); + }); + return Cesium.BoundingSphere.fromPoints(Cesium.Cartesian3.fromDegreesArray(_.flatten(allPoints))).center; + }, + /* + Calculates the center of given geometries (WKT) + */ + calculateCartographicCenterOfGeometriesInRadians: function (propertyModels) { + return Cesium.Cartographic.fromCartesian(this.calculateCartesian3CenterOfGeometries(propertyModels)); + }, + /* + Calculates the center of given geometries (WKT) + */ + calculateCartographicCenterOfGeometriesInDegrees: function (propertyModels) { + var cartographicCenterInRadians = this.calculateCartographicCenterOfGeometriesInRadians(propertyModels); + return [ + Cesium.Math.toDegrees(cartographicCenterInRadians.longitude), + Cesium.Math.toDegrees(cartographicCenterInRadians.latitude), + ]; + }, + featureFromShape: function (shape) { + var attrs = shape.model.attributes; + switch (attrs.type) { + case 'LINE': + var line = Turf.lineString(attrs.line); + var lineMeters = DistanceUtils.getDistanceInMeters(attrs.lineWidth, attrs.lineUnits); + return lineMeters + ? Turf.buffer(line, lineMeters, { units: METERS }) + : line; + case 'POLYGON': + var polygon = Turf.polygon([attrs.polygon]); + var polygonMeters = DistanceUtils.getDistanceInMeters(attrs.polygonBufferWidth, attrs.polygonBufferUnits); + return polygonMeters + ? Turf.buffer(polygon, polygonMeters, { units: METERS }) + : polygon; + case 'MULTIPOLYGON': + var isMultiPolygon = ShapeUtils.isArray3D(attrs.polygon); + var multiPolygon = isMultiPolygon + ? Turf.polygon(attrs.polygon) + : Turf.polygon([attrs.polygon]); + var multiPolygonMeters = DistanceUtils.getDistanceInMeters(attrs.polygonBufferWidth, attrs.polygonBufferUnits); + return multiPolygonMeters + ? Turf.buffer(multiPolygon, multiPolygonMeters, { units: METERS }) + : multiPolygon; + case 'BBOX': + return Turf.bboxPolygon([ + attrs.west, + attrs.south, + attrs.east, + attrs.north, + ]); + case 'POINTRADIUS': + var point = Turf.point([attrs.lon, attrs.lat]); + var pointRadiusMeters = DistanceUtils.getDistanceInMeters(attrs.radius, attrs.radiusUnits); + return pointRadiusMeters + ? Turf.buffer(point, pointRadiusMeters, { units: METERS }) + : point; + default: + return null; + } + }, + featureIsValid: function (feature) { + var _a, _b; + return (_b = (_a = feature === null || feature === void 0 ? void 0 : feature.geometry) === null || _a === void 0 ? void 0 : _a.coordinates) === null || _b === void 0 ? void 0 : _b.length; + }, + adjustGeoCoords: function (geo) { + var geometry = geo.geometry; + var bbox = geo.bbox || Turf.bbox(geometry); + var width = Math.abs(bbox[0] - bbox[2]); + var crossesAntimeridian = width > 180; + if (crossesAntimeridian && + ['LineString', 'MultiLineString', 'Polygon', 'MultiPolygon'].includes(geometry.type)) { + Turf.coordEach(geo, function (coord) { + if (coord[0] < 0) { + coord[0] += 360; + } + }); + } + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbGl0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL2Nlc2l1bS91dGlsaXR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFFSixPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFDMUIsT0FBTyxhQUFhLE1BQU0sOEJBQThCLENBQUE7QUFDeEQsT0FBTyxVQUFVLE1BQU0sMkJBQTJCLENBQUE7QUFDbEQsbUpBQW1KO0FBQ25KLE9BQU8sTUFBTSxNQUFNLDRCQUE0QixDQUFBO0FBQy9DLE9BQU8sS0FBSyxJQUFJLE1BQU0sWUFBWSxDQUFBO0FBR2xDLElBQU0sTUFBTSxHQUFHLFFBQVEsQ0FBQTtBQU12Qjs7RUFFRTtBQUNGLGVBQWU7SUFDYjs7UUFFSTtJQUNKLG1DQUFtQyxZQUFDLGFBQWtCO1FBQ3BELE9BQU8sTUFBTSxDQUFDLGNBQWMsQ0FBQyxVQUFVLENBQ3JDLE1BQU0sQ0FBQyxVQUFVLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUMsU0FBUyxFQUFFLENBQUMsQ0FBQyxDQUN6RSxDQUFDLE1BQU0sQ0FBQTtJQUNWLENBQUM7SUFDRDs7UUFFSTtJQUNKLDhDQUE4QyxZQUFDLGFBQWtCO1FBQy9ELE9BQU8sTUFBTSxDQUFD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pYW4gPSB3aWR0aCA+IDE4MFxuICAgIGlmIChcbiAgICAgIGNyb3NzZXNBbnRpbWVyaWRpYW4gJiZcbiAgICAgIFsnTGluZVN0cmluZycsICdNdWx0aUxpbmVTdHJpbmcnLCAnUG9seWdvbicsICdNdWx0aVBvbHlnb24nXS5pbmNsdWRlcyhcbiAgICAgICAgZ2VvbWV0cnkudHlwZVxuICAgICAgKVxuICAgICkge1xuICAgICAgVHVyZi5jb29yZEVhY2goZ2VvLCAoY29vcmQpID0+IHtcbiAgICAgICAgaWYgKGNvb3JkWzBdIDwgMCkge1xuICAgICAgICAgIGNvb3JkWzBdICs9IDM2MFxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH1cbiAgfSxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/draw-menu.d.ts b/src/main/webapp/component/visualization/maps/draw-menu.d.ts new file mode 100644 index 00000000000..cbca66b1c45 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/draw-menu.d.ts @@ -0,0 +1 @@ +export declare const Editor: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>; diff --git a/src/main/webapp/component/visualization/maps/draw-menu.js b/src/main/webapp/component/visualization/maps/draw-menu.js new file mode 100644 index 00000000000..076823b9cef --- /dev/null +++ b/src/main/webapp/component/visualization/maps/draw-menu.js @@ -0,0 +1,19 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import styled from 'styled-components'; +export var Editor = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 38px;\n z-index: 1;\n > div:first-of-type {\n flex-wrap: wrap;\n > div:nth-of-type(2) {\n flex-wrap: wrap;\n width: 100%;\n background: inherit;\n }\n }\n"], ["\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 38px;\n z-index: 1;\n > div:first-of-type {\n flex-wrap: wrap;\n > div:nth-of-type(2) {\n flex-wrap: wrap;\n width: 100%;\n background: inherit;\n }\n }\n"]))); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhdy1tZW51LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92aXN1YWxpemF0aW9uL21hcHMvZHJhdy1tZW51LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBRXRDLE1BQU0sQ0FBQyxJQUFNLE1BQU0sR0FBRyxNQUFNLENBQUMsR0FBRyx1VUFBQSxvUUFlL0IsSUFBQSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ3N0eWxlZC1jb21wb25lbnRzJ1xuXG5leHBvcnQgY29uc3QgRWRpdG9yID0gc3R5bGVkLmRpdmBcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB0b3A6IDBweDtcbiAgbGVmdDogMHB4O1xuICByaWdodDogMHB4O1xuICBoZWlnaHQ6IDM4cHg7XG4gIHotaW5kZXg6IDE7XG4gID4gZGl2OmZpcnN0LW9mLXR5cGUge1xuICAgIGZsZXgtd3JhcDogd3JhcDtcbiAgICA+IGRpdjpudGgtb2YtdHlwZSgyKSB7XG4gICAgICBmbGV4LXdyYXA6IHdyYXA7XG4gICAgICB3aWR0aDogMTAwJTtcbiAgICAgIGJhY2tncm91bmQ6IGluaGVyaXQ7XG4gICAgfVxuICB9XG5gXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/drawing-and-display.d.ts b/src/main/webapp/component/visualization/maps/drawing-and-display.d.ts new file mode 100644 index 00000000000..414c93ce875 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/drawing-and-display.d.ts @@ -0,0 +1,27 @@ +import { Shape } from 'geospatialdraw/target/webapp/shape-utils'; +export declare const SHAPE_ID_PREFIX = "shape"; +export declare const getIdFromModelForDisplay: ({ model }: { + model: any; +}) => string; +export declare const getIdFromModelForDrawing: ({ model }: { + model: any; +}) => string; +export type DrawModeType = 'line' | 'poly' | 'circle' | 'bbox' | 'keyword'; +type LocationTypeType = 'LINE' | 'POLYGON' | 'MULTIPOLYGON' | 'BBOX' | 'POINTRADIUS' | 'POINT'; +export declare const getLocationTypeFromModel: ({ model }: { + model: any; +}) => LocationTypeType; +export declare const getDrawModeFromModel: ({ model, }: { + model: any; +}) => DrawModeType; +export declare const getShapeFromDrawMode: (drawMode: DrawModeType) => Shape; +export declare const getDrawModeFromShape: (shape: Shape) => DrawModeType; +export declare const useDrawingAndDisplayModels: ({ selectionInterface, map, }: { + selectionInterface: any; + map: any; +}) => { + models: any[]; + drawingModels: any[]; + filterModels: any[]; +}; +export {}; diff --git a/src/main/webapp/component/visualization/maps/drawing-and-display.js b/src/main/webapp/component/visualization/maps/drawing-and-display.js new file mode 100644 index 00000000000..c65963cbb15 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/drawing-and-display.js @@ -0,0 +1,293 @@ +import { __read, __spreadArray, __values } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import wreqr from '../../../js/wreqr'; +import { useBackbone, useListenTo, } from '../../selection-checkbox/useBackbone.hook'; +import { useIsDrawing } from '../../singletons/drawing'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +import { zoomToHome } from './home'; +import LocationModel from '../../location-old/location-old'; +import { useLazyResultsFilterTreeFromSelectionInterface } from '../../selection-interface/hooks'; +export var SHAPE_ID_PREFIX = 'shape'; +export var getIdFromModelForDisplay = function (_a) { + var model = _a.model; + return "".concat(SHAPE_ID_PREFIX, "-").concat(model.cid, "-display"); +}; +export var getIdFromModelForDrawing = function (_a) { + var model = _a.model; + return "".concat(SHAPE_ID_PREFIX, "-").concat(model.cid, "-drawing"); +}; +// from these all other drawings are constructed +var BasicDrawModeTypes = [ + 'bbox', + 'circle', + 'line', + 'poly', +]; +export var getLocationTypeFromModel = function (_a) { + var model = _a.model; + var type = model.get('type'); + return type; +}; +export var getDrawModeFromModel = function (_a) { + var model = _a.model; + var mode = model.get('mode'); + if (BasicDrawModeTypes.includes(mode)) { + return mode; + } + var fallbackType = getLocationTypeFromModel({ model: model }); + switch (fallbackType) { + case 'BBOX': + return 'bbox'; + case 'LINE': + return 'line'; + case 'MULTIPOLYGON': + return 'poly'; + case 'POINTRADIUS': + return 'circle'; + case 'POINT': + return 'circle'; + case 'POLYGON': + return 'poly'; + default: + return 'poly'; + } +}; +export var getShapeFromDrawMode = function (drawMode) { + switch (drawMode) { + case 'bbox': + return 'Bounding Box'; + case 'circle': + return 'Point Radius'; + case 'line': + return 'Line'; + case 'poly': + default: + return 'Polygon'; + } +}; +export var getDrawModeFromShape = function (shape) { + switch (shape) { + case 'Bounding Box': + return 'bbox'; + case 'Point': + case 'Point Radius': + return 'circle'; + case 'Line': + return 'line'; + case 'Polygon': + default: + return 'poly'; + } +}; +var extractModelsFromFilter = function (_a) { + var _b, _c; + var filter = _a.filter, extractedModels = _a.extractedModels, listenTo = _a.listenTo, onChange = _a.onChange; + if (filter.filters) { + filter.filters.forEach(function (subfilter) { + extractModelsFromFilter({ + filter: subfilter, + extractedModels: extractedModels, + listenTo: listenTo, + onChange: onChange, + }); + }); + } + else { + if (filter.type === 'GEOMETRY') { + if ((_c = (_b = filter.value) === null || _b === void 0 ? void 0 : _b.areaDetails) === null || _c === void 0 ? void 0 : _c.locations) { + filter.value.areaDetails.locations.map(function (location) { + var newLocationModel = new LocationModel(location); + newLocationModel.set('locationId', undefined); + extractedModels.push(newLocationModel); + }); + } + else { + var newLocationModel = new LocationModel(filter.value); + if (newLocationModel.get('hasKeyword')) { + newLocationModel.set('locationId', undefined); + } + else { + listenTo === null || listenTo === void 0 ? void 0 : listenTo(newLocationModel, 'change:mapNorth change:mapSouth change:mapEast change:mapWest change:lat change:lon change:line change:polygon', function (model) { + filter.value = model.toJSON(); + onChange === null || onChange === void 0 ? void 0 : onChange(); + }); + } + extractedModels.push(newLocationModel); + } + } + } +}; +function useOnceIsNearFirstRender(_a) { + var _b = _a.howNear, howNear = _b === void 0 ? 1000 : _b, callback = _a.callback; + var _c = __read(React.useState(true), 2), firstRender = _c[0], setFirstRender = _c[1]; + var _d = __read(React.useState(false), 2), hasFired = _d[0], setHasFired = _d[1]; + React.useEffect(function () { + setFirstRender(false); + }, []); + React.useEffect(function () { + if (!firstRender && !hasFired) { + var timeoutId_1 = window.setTimeout(function () { + callback(); + setHasFired(true); + }, howNear); + return function () { + window.clearTimeout(timeoutId_1); + }; + } + return function () { }; + }, [firstRender, howNear, hasFired, callback]); +} +export var useDrawingAndDisplayModels = function (_a) { + var selectionInterface = _a.selectionInterface, map = _a.map; + // All of these arrays hold different sets of the same models, but where they come from differs + // models are from geometry inputs that are in the dom aka textfields etc. (aka, someone is editing a geo input) + var _b = __read(React.useState([]), 2), models = _b[0], setModels = _b[1]; + // filter models are grabbed from the filter tree on a search + var _c = __read(React.useState([]), 2), filterModels = _c[0], setFilterModels = _c[1]; + // drawing models are when the user is actively drawing / editing a shape on the maps themselves (aka the draw tools) + var _d = __read(React.useState([]), 2), drawingModels = _d[0], setDrawingModels = _d[1]; + var isDrawing = useIsDrawing(); + var filterTree = useLazyResultsFilterTreeFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var _e = useBackbone(), listenTo = _e.listenTo, stopListening = _e.stopListening; + useListenTo(wreqr.vent, 'search:linedisplay search:polydisplay search:bboxdisplay search:circledisplay search:keyworddisplay search:areadisplay', function (model) { + setModels(function (currentModels) { + var newModels = currentModels; + if (Array.isArray(model)) { + newModels = currentModels.concat(model.filter(function (newModel) { return !currentModels.includes(newModel); })); + } + else if (!currentModels.includes(model)) { + newModels = __spreadArray(__spreadArray([], __read(currentModels), false), [model], false); + } + return newModels; + }); + }); + useListenTo(wreqr.vent, 'search:removedisplay', function (model) { + setModels(function (currentModels) { + var newModels; + if (Array.isArray(model)) { + newModels = currentModels.filter(function (m) { return !model.includes(m); }); + } + else { + newModels = currentModels.filter(function (m) { return m !== model; }); + } + return newModels; + }); + }); + React.useEffect(function () { + ; + wreqr.vent.trigger('search:requestlocationmodels'); + }, []); + var updateFilterModels = React.useCallback(function () { + var e_1, _a; + try { + for (var filterModels_1 = __values(filterModels), filterModels_1_1 = filterModels_1.next(); !filterModels_1_1.done; filterModels_1_1 = filterModels_1.next()) { + var model = filterModels_1_1.value; + stopListening(model); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (filterModels_1_1 && !filterModels_1_1.done && (_a = filterModels_1.return)) _a.call(filterModels_1); + } + finally { if (e_1) throw e_1.error; } + } + var resultFilter = TypedUserInstance.getEphemeralFilter(); + var extractedModels = []; + if (filterTree) { + extractModelsFromFilter({ + filter: filterTree, + extractedModels: extractedModels, + }); + } + if (resultFilter) { + // We have to use this alternate method of updating the filter when dealing with + // the resultFilter. When the location input is unmounted, it resets its location + // model and removes it from here via the search:removedisplay event, so we can't + // use it to update the filter. The location input is unmounted when the result + // filter menu is closed, which it usually is. So, we update the filter in the + // prefs model ourselves, which causes this function to be run again with the new + // filter, and we can display it correctly. + extractModelsFromFilter({ + filter: resultFilter, + extractedModels: extractedModels, + listenTo: listenTo, + onChange: function () { + TypedUserInstance.getPreferences().set('resultFilter', JSON.parse(JSON.stringify(resultFilter))); + TypedUserInstance.savePreferences(); + }, + }); + } + // If we have a model for a particular locationId in both models and filterModels, + // then keep only the one in models, since that is the source of truth. Removing + // the one in filterModels prevents some flickering when releasing the mouse on a + // move operation. + var locationIds = new Set(models.map(function (m) { return m.get('locationId'); })); + var dedupedModels = extractedModels.filter(function (m) { return !locationIds.has(m.get('locationId')); }); + setFilterModels(dedupedModels); + }, [filterTree, models]); + React.useEffect(function () { + updateFilterModels(); + }, [updateFilterModels]); + useListenTo(selectionInterface, 'change:currentQuery', updateFilterModels); + useListenTo(TypedUserInstance.getPreferences(), 'change:resultFilter', updateFilterModels); + useListenTo(wreqr.vent, 'search:drawline search:drawpoly search:drawbbox search:drawcircle', function (model) { + if (!drawingModels.includes(model)) { + setDrawingModels(__spreadArray(__spreadArray([], __read(drawingModels), false), [model], false)); + } + }); + useListenTo(wreqr.vent, 'search:line-end search:poly-end search:bbox-end search:circle-end search:drawcancel search:drawend', function (model) { + if (!Array.isArray(model)) { + model = [model]; + } + model.forEach(function (submodel) { + if (drawingModels.includes(submodel)) { + setDrawingModels(drawingModels.filter(function (drawingModel) { return drawingModel !== submodel; })); + } + }); + }); + React.useEffect(function () { + if (map && isDrawing) { + ; + wreqr.vent.trigger('search:requestdrawingmodels'); + } + }, [map]); + React.useEffect(function () { + if (!isDrawing) { + setDrawingModels([]); + } + }, [isDrawing]); + var callback = React.useMemo(function () { + return function () { + if (map) { + var shapesExist = map.panToShapesExtent(); + if (!shapesExist) { + zoomToHome({ map: map }); + } + } + }; + }, [filterModels, models, map]); + useOnceIsNearFirstRender({ callback: callback }); + return { + models: models, + drawingModels: drawingModels, + filterModels: filterModels, + }; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2luZy1hbmQtZGlzcGxheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL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AmJiBpc0RyYXdpbmcpIHtcbiAgICAgIDsod3JlcXIgYXMgYW55KS52ZW50LnRyaWdnZXIoJ3NlYXJjaDpyZXF1ZXN0ZHJhd2luZ21vZGVscycpXG4gICAgfVxuICB9LCBbbWFwXSlcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICBpZiAoIWlzRHJhd2luZykge1xuICAgICAgc2V0RHJhd2luZ01vZGVscyhbXSlcbiAgICB9XG4gIH0sIFtpc0RyYXdpbmddKVxuICBjb25zdCBjYWxsYmFjayA9IFJlYWN0LnVzZU1lbW8oKCkgPT4ge1xuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBpZiAobWFwKSB7XG4gICAgICAgIGNvbnN0IHNoYXBlc0V4aXN0ID0gbWFwLnBhblRvU2hhcGVzRXh0ZW50KClcbiAgICAgICAgaWYgKCFzaGFwZXNFeGlzdCkge1xuICAgICAgICAgIHpvb21Ub0hvbWUoeyBtYXAgfSlcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwgW2ZpbHRlck1vZGVscywgbW9kZWxzLCBtYXBdKVxuICB1c2VPbmNlSXNOZWFyRmlyc3RSZW5kZXIoeyBjYWxsYmFjayB9KVxuICByZXR1cm4ge1xuICAgIG1vZGVscyxcbiAgICBkcmF3aW5nTW9kZWxzLFxuICAgIGZpbHRlck1vZGVscyxcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/home.d.ts b/src/main/webapp/component/visualization/maps/home.d.ts new file mode 100644 index 00000000000..f0a797e0833 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/home.d.ts @@ -0,0 +1,4 @@ +export declare const getHome: () => any; +export declare const zoomToHome: ({ map }: { + map: any; +}) => void; diff --git a/src/main/webapp/component/visualization/maps/home.js b/src/main/webapp/component/visualization/maps/home.js new file mode 100644 index 00000000000..7c7452d9c2d --- /dev/null +++ b/src/main/webapp/component/visualization/maps/home.js @@ -0,0 +1,119 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { StartupDataStore } from '../../../js/model/Startup/startup'; +import wrapNum from '../../../react-component/utils/wrap-num/wrap-num'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +var homeBoundingBox = getBoundingBox(getHomeCoordinates()); +var defaultHomeBoundingBox = { + west: -128, + south: 24, + east: -63, + north: 52, +}; +export var getHome = function () { + return [ + TypedUserInstance.getMapHome(), + homeBoundingBox, + defaultHomeBoundingBox, + ].find(function (element) { return element !== undefined; }); +}; +export var zoomToHome = function (_a) { + var map = _a.map; + var home = getHome(); + map.zoomToBoundingBox(home); +}; +function findExtreme(_a) { + var objArray = _a.objArray, property = _a.property, comparator = _a.comparator; + if (objArray.length === 0) { + return undefined; + } + return objArray.reduce(function (extreme, coordinateObj) { + return (extreme = comparator(extreme, coordinateObj[property])); + }, objArray[0][property]); +} +function getBoundingBox(coordinates) { + var north = findExtreme({ + objArray: coordinates, + property: 'lat', + comparator: Math.max, + }); + var south = findExtreme({ + objArray: coordinates, + property: 'lat', + comparator: Math.min, + }); + var east = findExtreme({ + objArray: coordinates, + property: 'lon', + comparator: Math.max, + }); + var west = findExtreme({ + objArray: coordinates, + property: 'lon', + comparator: Math.min, + }); + if (north === undefined || + south === undefined || + east === undefined || + west === undefined) { + return undefined; + } + return { + north: north, + east: east, + south: south, + west: west, + }; +} +function getHomeCoordinates() { + if (StartupDataStore.Configuration.getMapHome() !== '' && + StartupDataStore.Configuration.getMapHome() !== undefined) { + var separateCoordinates_1 = StartupDataStore.Configuration.getMapHome() + .replace(/\s/g, '') + .split(','); + if (separateCoordinates_1.length % 2 === 0) { + return separateCoordinates_1 + .reduce(function (coordinates, coordinate, index) { + if (index % 2 === 0) { + coordinates.push({ + lon: coordinate, + lat: separateCoordinates_1[index + 1], + }); + } + return coordinates; + }, []) + .map(function (coordinateObj) { + var lon = parseFloat(coordinateObj.lon); + var lat = parseFloat(coordinateObj.lat); + if (isNaN(lon) || isNaN(lat)) { + return undefined; + } + lon = wrapNum(lon, -180, 180); + lat = wrapNum(lat, -90, 90); + return { + lon: lon, + lat: lat, + }; + }) + .filter(function (coordinateObj) { + return coordinateObj !== undefined; + }); + } + } + else { + return []; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL2hvbWUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQTtBQUNwRSxPQUFPLE9BQU8sTUFBTSxrREFBa0QsQ0FBQTtBQUN0RSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQTtBQUM5RCxJQUFNLGVBQWUsR0FBRyxjQUFjLENBQUMsa0JBQWtCLEVBQUUsQ0FBQyxDQUFBO0FBQzVELElBQU0sc0JBQXNCLEdBQUc7SUFDN0IsSUFBSSxFQUFFLENBQUMsR0FBRztJQUNWLEtBQUssRUFBRSxFQUFFO0lBQ1QsSUFBSSxFQUFFLENBQUMsRUFBRTtJQUNULEtBQUssRUFBRSxFQUFFO0NBQ1YsQ0FBQTtBQUNELE1BQU0sQ0FBQyxJQUFNLE9BQU8sR0FBRztJQUNyQixPQUFPO1FBQ0wsaUJ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3QgPT09IHVuZGVmaW5lZFxuICApIHtcbiAgICByZXR1cm4gdW5kZWZpbmVkXG4gIH1cbiAgcmV0dXJuIHtcbiAgICBub3J0aCxcbiAgICBlYXN0LFxuICAgIHNvdXRoLFxuICAgIHdlc3QsXG4gIH1cbn1cbmZ1bmN0aW9uIGdldEhvbWVDb29yZGluYXRlcygpIHtcbiAgaWYgKFxuICAgIFN0YXJ0dXBEYXRhU3RvcmUuQ29uZmlndXJhdGlvbi5nZXRNYXBIb21lKCkgIT09ICcnICYmXG4gICAgU3RhcnR1cERhdGFTdG9yZS5Db25maWd1cmF0aW9uLmdldE1hcEhvbWUoKSAhPT0gdW5kZWZpbmVkXG4gICkge1xuICAgIGNvbnN0IHNlcGFyYXRlQ29vcmRpbmF0ZXMgPSBTdGFydHVwRGF0YVN0b3JlLkNvbmZpZ3VyYXRpb24uZ2V0TWFwSG9tZSgpXG4gICAgICAucmVwbGFjZSgvXFxzL2csICcnKVxuICAgICAgLnNwbGl0KCcsJylcbiAgICBpZiAoc2VwYXJhdGVDb29yZGluYXRlcy5sZW5ndGggJSAyID09PSAwKSB7XG4gICAgICByZXR1cm4gc2VwYXJhdGVDb29yZGluYXRlc1xuICAgICAgICAucmVkdWNlKChjb29yZGluYXRlczogYW55LCBjb29yZGluYXRlOiBhbnksIGluZGV4OiBhbnkpID0+IHtcbiAgICAgICAgICBpZiAoaW5kZXggJSAyID09PSAwKSB7XG4gICAgICAgICAgICBjb29yZGluYXRlcy5wdXNoKHtcbiAgICAgICAgICAgICAgbG9uOiBjb29yZGluYXRlLFxuICAgICAgICAgICAgICBsYXQ6IHNlcGFyYXRlQ29vcmRpbmF0ZXNbaW5kZXggKyAxXSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBjb29yZGluYXRlc1xuICAgICAgICB9LCBbXSlcbiAgICAgICAgLm1hcCgoY29vcmRpbmF0ZU9iajogYW55KSA9PiB7XG4gICAgICAgICAgbGV0IGxvbiA9IHBhcnNlRmxvYXQoY29vcmRpbmF0ZU9iai5sb24pXG4gICAgICAgICAgbGV0IGxhdCA9IHBhcnNlRmxvYXQoY29vcmRpbmF0ZU9iai5sYXQpXG4gICAgICAgICAgaWYgKGlzTmFOKGxvbikgfHwgaXNOYU4obGF0KSkge1xuICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZFxuICAgICAgICAgIH1cbiAgICAgICAgICBsb24gPSB3cmFwTnVtKGxvbiwgLTE4MCwgMTgwKVxuICAgICAgICAgIGxhdCA9IHdyYXBOdW0obGF0LCAtOTAsIDkwKVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBsb24sXG4gICAgICAgICAgICBsYXQsXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgICAuZmlsdGVyKChjb29yZGluYXRlT2JqOiBhbnkpID0+IHtcbiAgICAgICAgICByZXR1cm4gY29vcmRpbmF0ZU9iaiAhPT0gdW5kZWZpbmVkXG4gICAgICAgIH0pXG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHJldHVybiBbXVxuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/interactions.provider.d.ts b/src/main/webapp/component/visualization/maps/interactions.provider.d.ts new file mode 100644 index 00000000000..ed4d98eb4e0 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/interactions.provider.d.ts @@ -0,0 +1,18 @@ +import React from 'react'; +import Backbone from 'backbone'; +export type Translation = { + longitude: number; + latitude: number; +}; +export type InteractionsContextType = { + interactiveGeo: number | null; + setInteractiveGeo: (interactiveGeo: number | null) => void; + interactiveModels: Backbone.Model[]; + setInteractiveModels: (models: Backbone.Model[]) => void; + moveFrom: any; + setMoveFrom: (moveFrom: any) => void; + translation: Translation | null; + setTranslation: (translation: Translation | null) => void; +}; +export declare const InteractionsContext: React.Context; +export declare function InteractionsProvider({ children }: any): JSX.Element; diff --git a/src/main/webapp/component/visualization/maps/interactions.provider.js b/src/main/webapp/component/visualization/maps/interactions.provider.js new file mode 100644 index 00000000000..17a0d9c6bfc --- /dev/null +++ b/src/main/webapp/component/visualization/maps/interactions.provider.js @@ -0,0 +1,49 @@ +import { __read } from "tslib"; +/* Copyright (c) Connexta, LLC */ +import React, { useState } from 'react'; +export var InteractionsContext = React.createContext({ + interactiveGeo: null, + setInteractiveGeo: function () { }, + interactiveModels: [], + setInteractiveModels: function () { }, + moveFrom: null, + setMoveFrom: function () { }, + translation: null, + setTranslation: function () { }, +}); +/** + * Doing this to save time for now. In the future we should remove the interactions provider and the logic around it, solely using the models themselves and + * this isInteractive being set to do drag / drop. + */ +function useUpdateModelsSoTheyAreInteractive(_a) { + var interactiveModels = _a.interactiveModels; + React.useEffect(function () { + interactiveModels.forEach(function (model) { + model.set('isInteractive', true); + }); + return function () { + interactiveModels.forEach(function (model) { + model.set('isInteractive', false); + }); + }; + }, [interactiveModels]); +} +export function InteractionsProvider(_a) { + var children = _a.children; + var _b = __read(useState(null), 2), interactiveGeo = _b[0], setInteractiveGeo = _b[1]; + var _c = __read(useState([]), 2), interactiveModels = _c[0], setInteractiveModels = _c[1]; + var _d = __read(useState(null), 2), moveFrom = _d[0], setMoveFrom = _d[1]; + var _e = __read(useState(null), 2), translation = _e[0], setTranslation = _e[1]; + useUpdateModelsSoTheyAreInteractive({ interactiveModels: interactiveModels }); + return (React.createElement(InteractionsContext.Provider, { value: { + interactiveGeo: interactiveGeo, + setInteractiveGeo: setInteractiveGeo, + interactiveModels: interactiveModels, + setInteractiveModels: setInteractiveModels, + moveFrom: moveFrom, + setMoveFrom: setMoveFrom, + translation: translation, + setTranslation: setTranslation, + } }, children)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJhY3Rpb25zLnByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92a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ZGVsc10gPSB1c2VTdGF0ZTxCYWNrYm9uZS5Nb2RlbFtdPihcbiAgICBbXVxuICApXG4gIGNvbnN0IFttb3ZlRnJvbSwgc2V0TW92ZUZyb21dID0gdXNlU3RhdGU8YW55PihudWxsKVxuICBjb25zdCBbdHJhbnNsYXRpb24sIHNldFRyYW5zbGF0aW9uXSA9IHVzZVN0YXRlPFRyYW5zbGF0aW9uIHwgbnVsbD4obnVsbClcblxuICB1c2VVcGRhdGVNb2RlbHNTb1RoZXlBcmVJbnRlcmFjdGl2ZSh7IGludGVyYWN0aXZlTW9kZWxzIH0pXG5cbiAgcmV0dXJuIChcbiAgICA8SW50ZXJhY3Rpb25zQ29udGV4dC5Qcm92aWRlclxuICAgICAgdmFsdWU9e3tcbiAgICAgICAgaW50ZXJhY3RpdmVHZW8sXG4gICAgICAgIHNldEludGVyYWN0aXZlR2VvLFxuICAgICAgICBpbnRlcmFjdGl2ZU1vZGVscyxcbiAgICAgICAgc2V0SW50ZXJhY3RpdmVNb2RlbHMsXG4gICAgICAgIG1vdmVGcm9tLFxuICAgICAgICBzZXRNb3ZlRnJvbSxcbiAgICAgICAgdHJhbnNsYXRpb24sXG4gICAgICAgIHNldFRyYW5zbGF0aW9uLFxuICAgICAgfX1cbiAgICA+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgPC9JbnRlcmFjdGlvbnNDb250ZXh0LlByb3ZpZGVyPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/map-toolbar.d.ts b/src/main/webapp/component/visualization/maps/map-toolbar.d.ts new file mode 100644 index 00000000000..f4951edc628 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/map-toolbar.d.ts @@ -0,0 +1,14 @@ +/// +type Props = { + toggleClustering: () => void; + isClustering: boolean; + zoomToHome: () => void; + saveAsHome: () => void; + map: { + doPanZoom: (polygon: any) => void; + }; + mapLayers: Array; +}; +export declare const MapToolbar: (props: Props) => JSX.Element; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/map-toolbar.js b/src/main/webapp/component/visualization/maps/map-toolbar.js new file mode 100644 index 00000000000..5987021994a --- /dev/null +++ b/src/main/webapp/component/visualization/maps/map-toolbar.js @@ -0,0 +1,57 @@ +import { __assign, __read } from "tslib"; +import Button from '@mui/material/Button'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import MapSettings from '../../../react-component/map-settings'; +import ZoomToHomeButton from '../../../react-component/button/split-button/zoomToHome'; +import Gazetteer from '../../../react-component/location/gazetteer'; +import { LayersDropdown } from '../../layers/layers-dropdown'; +import CheckBoxIcon from '@mui/icons-material/CheckBox'; +import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; +import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft'; +import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../../theme/theme'; +var ClusteringButton = function (_a) { + var toggleClustering = _a.toggleClustering, isClustering = _a.isClustering; + return (React.createElement(Button, { "data-id": "cluster-button", onClick: function () { + toggleClustering(); + }, size: "small", color: "primary" }, + React.createElement("div", { className: "flex flex-row items-center" }, + isClustering ? (React.createElement(CheckBoxIcon, { className: "Mui-text-text-primary" })) : (React.createElement(CheckBoxOutlineBlankIcon, { className: "Mui-text-text-primary" })), + React.createElement("span", { className: "pr-2" }, "Cluster")))); +}; +export var MapToolbar = function (props) { + var _a = __read(React.useState(false), 2), expanded = _a[0], setExpanded = _a[1]; + return (React.createElement(Paper, { className: "absolute z-10 right-0 m-4 max-w-full-4 truncate", elevation: Elevations.overlays }, + React.createElement("div", { className: "flex flex-row items-center overflow-auto w-full flex-nowrap px-2" }, + React.createElement("div", { className: "py-2" }, expanded ? (React.createElement(Button, { size: "small", color: "primary", onClick: function () { + setExpanded(false); + }, className: "shrink-0" }, + React.createElement(KeyboardArrowRightIcon, { color: "inherit", className: "Mui-text-text-primary Mui-icon-size-small" }), + React.createElement(KeyboardArrowRightIcon, { color: "inherit", className: "-ml-3 Mui-text-text-primary Mui-icon-size-small" }))) : (React.createElement(Button, { size: "small", color: "primary", onClick: function () { + setExpanded(true); + }, "data-id": "expand-map-tools-button" }, + React.createElement(KeyboardArrowLeftIcon, { color: "inherit", className: "Mui-text-text-primary Mui-icon-size-small" }), + React.createElement(KeyboardArrowLeftIcon, { color: "inherit", className: "-ml-3 Mui-text-text-primary Mui-icon-size-small" }), + "Map Tools"))), + expanded ? (React.createElement(React.Fragment, null, + React.createElement("div", { className: "w-64 min-w-32 py-2 shrink-1 truncate" }, + React.createElement(Gazetteer, { variant: "outlined", placeholder: "Go to a location", setState: function (_a) { + var polygon = _a.polygon; + return props.map.doPanZoom(polygon); + } })), + React.createElement("div", { className: "py-2 pr-2 shrink-0" }, + React.createElement(ClusteringButton, __assign({}, props))), + React.createElement("div", { className: "Mui-bg-default w-min self-stretch shrink-0" }), + React.createElement("div", { className: "py-2 px-2 shrink-0" }, + React.createElement(LayersDropdown, { layers: props.mapLayers })), + React.createElement("div", { className: "Mui-bg-default w-min self-stretch shrink-0" }), + React.createElement("div", { className: "py-2 px-2 shrink-0" }, + React.createElement(ZoomToHomeButton, { goHome: function () { return props.zoomToHome(); }, saveHome: function () { return props.saveAsHome(); } })), + React.createElement("div", { className: "Mui-bg-default w-min self-stretch shrink-0" }), + React.createElement("div", { className: "py-2 pl-2 shrink-0" }, + React.createElement(MapSettings, null)))) : null))); +}; +export default hot(module)(MapToolbar); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLXRvb2xiYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9tYXAtdG9vbGJhci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBL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VxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJzaHJpbmstMFwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxLZXlib2FyZEFycm93UmlnaHRJY29uXG4gICAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJNdWktdGV4dC10ZXh0LXByaW1hcnkgTXVpLWljb24tc2l6ZS1zbWFsbFwiXG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIDxLZXlib2FyZEFycm93UmlnaHRJY29uXG4gICAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCItbWwtMyBNdWktdGV4dC10ZXh0LXByaW1hcnkgTXVpLWljb24tc2l6ZS1zbWFsbFwiXG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICApIDogKFxuICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0RXhwYW5kZWQodHJ1ZSlcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgZGF0YS1pZD1cImV4cGFuZC1tYXAtdG9vbHMtYnV0dG9uXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPEtleWJvYXJkQXJyb3dMZWZ0SWNvblxuICAgICAgICAgICAgICAgIGNvbG9yPVwiaW5oZXJpdFwiXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiTXVpLXRleHQtdGV4dC1wcmltYXJ5IE11aS1pY29uLXNpemUtc21hbGxcIlxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICA8S2V5Ym9hcmRBcnJvd0xlZnRJY29uXG4gICAgICAgICAgICAgICAgY29sb3I9XCJpbmhlcml0XCJcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCItbWwtMyBNdWktdGV4dC10ZXh0LXByaW1hcnkgTXVpLWljb24tc2l6ZS1zbWFsbFwiXG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIE1hcCBUb29sc1xuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIHtleHBhbmRlZCA/IChcbiAgICAgICAgICA8PlxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJ3LTY0IG1pbi13LTMyIHB5LTIgc2hyaW5rLTEgdHJ1bmNhdGVcIj5cbiAgICAgICAgICAgICAgPEdhemV0dGVlclxuICAgICAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9XCJHbyB0byBhIGxvY2F0aW9uXCJcbiAgICAgICAgICAgICAgICBzZXRTdGF0ZT17KHsgcG9seWdvbiB9OiBhbnkpID0+IHByb3BzLm1hcC5kb1Bhblpvb20ocG9seWdvbil9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHktMiBwci0yIHNocmluay0wXCI+XG4gICAgICAgICAgICAgIDxDbHVzdGVyaW5nQnV0dG9uIHsuLi5wcm9wc30gLz5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJNdWktYmctZGVmYXVsdCB3LW1pbiBzZWxmLXN0cmV0Y2ggc2hyaW5rLTBcIj48L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHktMiBweC0yIHNocmluay0wXCI+XG4gICAgICAgICAgICAgIDxMYXllcnNEcm9wZG93biBsYXllcnM9e3Byb3BzLm1hcExheWVyc30gLz5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJNdWktYmctZGVmYXVsdCB3LW1pbiBzZWxmLXN0cmV0Y2ggc2hyaW5rLTBcIj48L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHktMiBweC0yIHNocmluay0wXCI+XG4gICAgICAgICAgICAgIDxab29tVG9Ib21lQnV0dG9uXG4gICAgICAgICAgICAgICAgZ29Ib21lPXsoKSA9PiBwcm9wcy56b29tVG9Ib21lKCl9XG4gICAgICAgICAgICAgICAgc2F2ZUhvbWU9eygpID0+IHByb3BzLnNhdmVBc0hvbWUoKX1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJNdWktYmctZGVmYXVsdCB3LW1pbiBzZWxmLXN0cmV0Y2ggc2hyaW5rLTBcIj48L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicHktMiBwbC0yIHNocmluay0wXCI+XG4gICAgICAgICAgICAgIDxNYXBTZXR0aW5ncyAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC8+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgPC9kaXY+XG4gICAgPC9QYXBlcj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShNYXBUb29sYmFyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/map.model.d.ts b/src/main/webapp/component/visualization/maps/map.model.d.ts new file mode 100644 index 00000000000..196e4e9b5ab --- /dev/null +++ b/src/main/webapp/component/visualization/maps/map.model.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/map.model.js b/src/main/webapp/component/visualization/maps/map.model.js new file mode 100644 index 00000000000..679bb848d77 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/map.model.js @@ -0,0 +1,160 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __read, __spreadArray } from "tslib"; +import wrapNum from '../../../react-component/utils/wrap-num/wrap-num'; +import _ from 'lodash'; +import Backbone from 'backbone'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message +import mtgeo from 'mt-geo'; +import * as usngs from 'usng.js'; +// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. +var converter = new usngs.Converter(); +var usngPrecision = 6; +export default Backbone.AssociatedModel.extend({ + defaults: { + mouseLat: undefined, + mouseLon: undefined, + coordinateValues: { + dms: '', + lat: '', + lon: '', + mgrs: '', + utmUps: '', + }, + target: undefined, + targetMetacard: undefined, + measurementState: 'NONE', + currentDistance: 0, + points: [], + labels: [], + line: undefined, + distanceInfo: { + left: 0, + top: 0, + }, + startingCoordinates: undefined, + }, + /* + * Sets the measurement state to the given new state. + * Valid measurement states are: + * - NONE + * - START + * - END + */ + changeMeasurementState: function (state) { + // the current distance should be 0 when in the NONE or START state + if (state === 'NONE' || state === 'START') { + this.set({ + measurementState: state, + currentDistance: 0, + }); + } + else { + this.set({ measurementState: state }); + } + }, + /* + * Appends the given point to the array of points being tracked. + */ + addPoint: function (point) { + this.set({ + points: __spreadArray(__spreadArray([], __read(this.get('points')), false), [point], false), + }); + }, + addLabel: function (label) { + this.set({ + labels: __spreadArray(__spreadArray([], __read(this.get('labels')), false), [label], false), + }); + }, + removeLabel: function (label) { + _.remove(this.get('labels'), function (e) { return e === label; }); + }, + /* + * Sets the line to the given new line. This represents the line on the map + * being used for the ruler measurement. + */ + setLine: function (line) { + this.set({ line: line }); + }, + /* + * Resets the model's line and returns the old one. + */ + removeLine: function () { + var line = this.get('line'); + this.set({ line: undefined }); + return line; + }, + /* + * Resets the model's array of points. + */ + clearPoints: function () { + this.set({ points: [] }); + }, + /* + * Set coordinates of the ruler measurements starting point + */ + setStartingCoordinates: function (coordinates) { + this.set({ startingCoordinates: coordinates }); + }, + /* + * Sets the current distance to the new given distance (in meters). + */ + setCurrentDistance: function (distance) { + this.set({ currentDistance: distance }); + }, + addDistanceInfo: function (distanceInfo) { + this.set({ distanceInfo: distanceInfo }); + }, + /* + * set the position of DistanceInfo in px relative to the top left of the Cesium component + */ + setDistanceInfoPosition: function (left, top) { + this.set({ distanceInfo: { left: left, top: top } }); + }, + isOffMap: function () { + return this.get('mouseLat') === undefined; + }, + clearMouseCoordinates: function () { + this.set({ + mouseLat: undefined, + mouseLon: undefined, + }); + }, + updateMouseCoordinates: function (coordinates) { + this.set({ + mouseLat: Number(coordinates.lat.toFixed(6)), + mouseLon: Number(wrapNum(coordinates.lon, -180, 180).toFixed(6)), + }); + }, + updateClickCoordinates: function () { + var lat = this.get('mouseLat'); + var lon = this.get('mouseLon'); + var dms = "".concat(mtgeo.toLat(lat), " ").concat(mtgeo.toLon(lon)); + var mgrs = converter.isInUPSSpace(lat) + ? undefined + : converter.LLtoUSNG(lat, lon, usngPrecision); + var utmUps = converter.LLtoUTMUPS(lat, lon); + this.set({ + coordinateValues: { + lat: lat, + lon: lon, + dms: dms, + mgrs: mgrs, + utmUps: utmUps,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VWYWx1ZXM6IHtcbiAgICAgICAgbGF0LFxuICAgICAgICBsb24sXG4gICAgICAgIGRtcyxcbiAgICAgICAgbWdycyxcbiAgICAgICAgdXRtVXBzLFxuICAgICAgfSxcbiAgICB9KVxuICB9LFxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/map.view.d.ts b/src/main/webapp/component/visualization/maps/map.view.d.ts new file mode 100644 index 00000000000..67a3341f134 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/map.view.d.ts @@ -0,0 +1,9 @@ +/// +type MapViewReactType = { + setMap: (map: any) => void; + loadMap: () => any; + selectionInterface: any; + mapLayers: any; +}; +export declare const MapViewReact: (props: MapViewReactType) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/visualization/maps/map.view.js b/src/main/webapp/component/visualization/maps/map.view.js new file mode 100644 index 00000000000..93cc3326bc1 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/map.view.js @@ -0,0 +1,736 @@ +import { __assign, __read, __values } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import wreqr from '../../../js/wreqr'; +import user from '../../singletons/user-instance'; +import MapModel from './map.model'; +import MapInfo from '../../../react-component/map-info'; +import DistanceInfo from '../../../react-component/distance-info'; +import getDistance from 'geolib/es/getDistance'; +import { Drawing } from '../../singletons/drawing'; +import MapToolbar from './map-toolbar'; +import MapContextDropdown from '../../map-context-menu/map-context-menu.view'; +import { useListenTo } from '../../selection-checkbox/useBackbone.hook'; +import Geometries from './react/geometries'; +import LinearProgress from '@mui/material/LinearProgress'; +import PopupPreview from '../../../react-component/popup-preview'; +import { SHAPE_ID_PREFIX, getDrawModeFromModel } from './drawing-and-display'; +import useSnack from '../../hooks/useSnack'; +import { zoomToHome } from './home'; +import featureDetection from '../../singletons/feature-detection'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../../theme/theme'; +import Button from '@mui/material/Button'; +import PlusIcon from '@mui/icons-material/Add'; +import MinusIcon from '@mui/icons-material/Remove'; +import { InteractionsContext } from './interactions.provider'; +import _ from 'lodash'; +import ShapeUtils from '../../../js/ShapeUtils'; +var useMapCode = function (props) { + var _a = __read(React.useState(null), 2), mapCode = _a[0], setMapCode = _a[1]; + React.useEffect(function () { + props.loadMap().then(function (Map) { + setMapCode({ createMap: Map }); + }); + }, [props.loadMap]); + return mapCode; +}; +var useMap = function (props) { + var _a = __read(React.useState(null), 2), map = _a[0], setMap = _a[1]; + var mapCode = useMapCode(props); + React.useEffect(function () { + if (props.mapElement && mapCode) { + try { + setMap(mapCode.createMap(props.mapElement, props.selectionInterface, props.mapDrawingPopupElement, props.containerElement, props.mapModel, props.mapLayers)); + } + catch (err) { + featureDetection.addFailure('cesium'); + } + } + return function () { + if (props.mapElement && mapCode && map) { + map.destroy(); + } + }; + }, [props.mapElement, mapCode]); + return map; +}; +var useMapModel = function () { + var _a = __read(React.useState(new MapModel()), 1), mapModel = _a[0]; + return mapModel; +}; +/* + Handles drawing or clearing the ruler as needed by the measurement state. + + START indicates that a starting point should be drawn, + so the map clears any previous points drawn and draws a new start point. + + END indicates that an ending point should be drawn, + so the map draws an end point and a line, and calculates the distance. + + NONE indicates that the ruler should be cleared. + */ +var handleMeasurementStateChange = function (_a) { + var map = _a.map, mapModel = _a.mapModel; + var state = mapModel.get('measurementState'); + var point = null; + switch (state) { + case 'START': + clearRuler({ map: map, mapModel: mapModel }); + point = map.addRulerPoint(mapModel.get('coordinateValues')); + mapModel.addPoint(point); + mapModel.setStartingCoordinates({ + lat: mapModel.get('coordinateValues')['lat'], + lon: mapModel.get('coordinateValues')['lon'], + }); + var polyline = map.addRulerLine(mapModel.get('coordinateValues')); + mapModel.setLine(polyline); + break; + case 'END': + point = map.addRulerPoint(mapModel.get('coordinateValues')); + mapModel.addPoint(point); + map.setRulerLine({ + lat: mapModel.get('coordinateValues')['lat'], + lon: mapModel.get('coordinateValues')['lon'], + }); + break; + case 'NONE': + clearRuler({ map: map, mapModel: mapModel }); + break; + default: + break; + } +}; +/* + Handles tasks for clearing the ruler, which include removing all points + (endpoints of the line) and the line. + */ +var clearRuler = function (_a) { + var map = _a.map, mapModel = _a.mapModel; + var points = mapModel.get('points'); + points.forEach(function (point) { + map.removeRulerPoint(point); + }); + mapModel.clearPoints(); + var line = mapModel.removeLine(); + map.removeRulerLine(line); +}; +/* + * Redraw and recalculate the ruler line and distanceInfo tooltip. Will not redraw while the menu is currently + * displayed updateOnMenu allows updating while the menu is up + */ +var updateDistance = function (_a) { + var map = _a.map, mapModel = _a.mapModel, _b = _a.updateOnMenu, updateOnMenu = _b === void 0 ? false : _b; + if (mapModel.get('measurementState') === 'START') { + var openMenu = true; // TODO: investigate this + var lat = mapModel.get('mouseLat'); + var lon = mapModel.get('mouseLon'); + if ((updateOnMenu === true || !openMenu) && lat && lon) { + // redraw ruler line + var mousePoint = { lat: lat, lon: lon }; + map.setRulerLine(mousePoint); + // update distance info + var startingCoordinates = mapModel.get('startingCoordinates'); + var dist = getDistance({ latitude: lat, longitude: lon }, { + latitude: startingCoordinates['lat'], + longitude: startingCoordinates['lon'], + }); + mapModel.setDistanceInfoPosition(event.clientX, event.clientY); + mapModel.setCurrentDistance(dist); + } + } +}; +var useWreqrMapListeners = function (_a) { + var map = _a.map; + useListenTo(map ? wreqr.vent : undefined, 'metacard:overlay', function () { + map.overlayImage.bind(map)(); + }); + useListenTo(map ? wreqr.vent : undefined, 'metacard:overlay:remove', function () { + map.removeOverlay.bind(map)(); + }); + useListenTo(map ? wreqr.vent : undefined, 'search:maprectanglefly', function () { + map.zoomToExtent.bind(map)(); + }); + React.useEffect(function () { + if (map) { + } + }, [map]); +}; +var useSelectionInterfaceMapListeners = function (_a) { + var map = _a.map, selectionInterface = _a.selectionInterface; + useListenTo(map ? selectionInterface : undefined, 'reset:activeSearchResults', function () { + map.removeAllOverlays.bind(map)(); + }); +}; +var useListenToMapModel = function (_a) { + var map = _a.map, mapModel = _a.mapModel; + useListenTo(map && mapModel ? mapModel : undefined, 'change:measurementState', function () { + handleMeasurementStateChange({ map: map, mapModel: mapModel }); + }); + useListenTo(map && mapModel ? mapModel : undefined, 'change:mouseLat change:mouseLon', function () { + updateDistance({ map: map, mapModel: mapModel }); + }); +}; +var updateTarget = function (_a) { + var mapModel = _a.mapModel, metacard = _a.metacard; + var target; + var targetMetacard; + if (metacard) { + target = metacard.plain.metacard.properties.title; + targetMetacard = metacard; + } + mapModel.set({ + target: target, + targetMetacard: targetMetacard, + }); +}; +var handleMapHover = function (_a) { + var mapModel = _a.mapModel, selectionInterface = _a.selectionInterface, mapEvent = _a.mapEvent, setIsHoveringResult = _a.setIsHoveringResult, setHoverGeo = _a.setHoverGeo; + var isHoveringOverGeo = Boolean(mapEvent.mapTarget && + mapEvent.mapTarget.constructor === String && + (mapEvent.mapTarget.startsWith(SHAPE_ID_PREFIX) || + mapEvent.mapTarget === 'userDrawing')); + if (isHoveringOverGeo) { + setHoverGeo({ + id: mapEvent.mapLocationId, + interactive: Boolean(mapEvent.mapLocationId), + }); + } + else { + setHoverGeo({}); + } + if (!selectionInterface) { + return; + } + var currentQuery = selectionInterface.get('currentQuery'); + if (!currentQuery) { + return; + } + var result = currentQuery.get('result'); + if (!result) { + return; + } + var metacard = result.get('lazyResults').results[mapEvent.mapTarget]; + updateTarget({ metacard: metacard, mapModel: mapModel }); + setIsHoveringResult(Boolean(mapEvent.mapTarget && + mapEvent.mapTarget !== 'userDrawing' && + (mapEvent.mapTarget.constructor === Array || + (mapEvent.mapTarget.constructor === String && + !mapEvent.mapTarget.startsWith(SHAPE_ID_PREFIX))))); +}; +var getLocation = function (model, translation) { + var locationType = getDrawModeFromModel({ model: model }); + switch (locationType) { + case 'bbox': + var bbox = _.pick(model.attributes, 'mapNorth', 'mapSouth', 'mapEast', 'mapWest', 'north', 'south', 'east', 'west'); + if (translation) { + var translatedBbox = translateBbox(bbox, translation); + return translatedBbox; + } + return bbox; + case 'circle': + var point = _.pick(model.attributes, 'lat', 'lon'); + if (translation) { + var translatedPoint = translatePoint(point.lon, point.lat, translation); + return translatedPoint; + } + return point; + case 'line': + var line = JSON.parse(JSON.stringify(model.get('line'))); + if (translation) { + translateLine(line, translation); + } + return { line: line }; + case 'poly': + var polygon = JSON.parse(JSON.stringify(model.get('polygon'))); + if (translation) { + var multiPolygon = ShapeUtils.isArray3D(polygon) ? polygon : [polygon]; + translatePolygon(multiPolygon, translation); + } + return { polygon: polygon }; + default: + return {}; + } +}; +var translatePolygon = function (polygon, translation) { + var e_1, _a, e_2, _b, e_3, _c, e_4, _d; + // odd things happen when latitude is exactly or very close to either 90 or -90 + var northPole = 89.99; + var southPole = -89.99; + var maxLat = 0; + var minLat = 0; + var diff = 0; + try { + for (var polygon_1 = __values(polygon), polygon_1_1 = polygon_1.next(); !polygon_1_1.done; polygon_1_1 = polygon_1.next()) { + var ring = polygon_1_1.value; + try { + for (var ring_1 = (e_2 = void 0, __values(ring)), ring_1_1 = ring_1.next(); !ring_1_1.done; ring_1_1 = ring_1.next()) { + var coord = ring_1_1.value; + var _e = __read(translateCoordinates(coord[0], coord[1], translation), 2), lon = _e[0], lat = _e[1]; + coord[0] = lon; + coord[1] = lat; + maxLat = Math.max(lat, maxLat); + minLat = Math.min(lat, minLat); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (ring_1_1 && !ring_1_1.done && (_b = ring_1.return)) _b.call(ring_1); + } + finally { if (e_2) throw e_2.error; } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (polygon_1_1 && !polygon_1_1.done && (_a = polygon_1.return)) _a.call(polygon_1); + } + finally { if (e_1) throw e_1.error; } + } + if (maxLat > northPole) { + diff = Math.abs(maxLat - northPole); + } + else if (minLat < southPole) { + diff = -Math.abs(minLat - southPole); + } + if (diff !== 0) { + try { + for (var polygon_2 = __values(polygon), polygon_2_1 = polygon_2.next(); !polygon_2_1.done; polygon_2_1 = polygon_2.next()) { + var ring = polygon_2_1.value; + try { + for (var ring_2 = (e_4 = void 0, __values(ring)), ring_2_1 = ring_2.next(); !ring_2_1.done; ring_2_1 = ring_2.next()) { + var coord = ring_2_1.value; + coord[1] -= diff; + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (ring_2_1 && !ring_2_1.done && (_d = ring_2.return)) _d.call(ring_2); + } + finally { if (e_4) throw e_4.error; } + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (polygon_2_1 && !polygon_2_1.done && (_c = polygon_2.return)) _c.call(polygon_2); + } + finally { if (e_3) throw e_3.error; } + } + } +}; +var translateLine = function (line, translation) { + var e_5, _a, e_6, _b; + // odd things happen when latitude is exactly or very close to either 90 or -90 + var northPole = 89.99; + var southPole = -89.99; + var maxLat = 0; + var minLat = 0; + var diff = 0; + try { + for (var line_1 = __values(line), line_1_1 = line_1.next(); !line_1_1.done; line_1_1 = line_1.next()) { + var coord = line_1_1.value; + var _c = __read(translateCoordinates(coord[0], coord[1], translation), 2), lon = _c[0], lat = _c[1]; + maxLat = Math.max(lat, maxLat); + minLat = Math.min(lat, minLat); + coord[0] = lon; + coord[1] = lat; + } + } + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (line_1_1 && !line_1_1.done && (_a = line_1.return)) _a.call(line_1); + } + finally { if (e_5) throw e_5.error; } + } + // prevent polar crossing + if (maxLat > northPole) { + diff = Math.abs(maxLat - northPole); + } + else if (minLat < southPole) { + diff = -Math.abs(minLat - southPole); + } + if (diff !== 0) { + try { + for (var line_2 = __values(line), line_2_1 = line_2.next(); !line_2_1.done; line_2_1 = line_2.next()) { + var coord = line_2_1.value; + coord[1] -= diff; + } + } + catch (e_6_1) { e_6 = { error: e_6_1 }; } + finally { + try { + if (line_2_1 && !line_2_1.done && (_b = line_2.return)) _b.call(line_2); + } + finally { if (e_6) throw e_6.error; } + } + } +}; +var translateBbox = function (bbox, translation) { + var translated = __assign({}, bbox); + var _a = __read(translateCoordinates(bbox.mapEast, bbox.mapNorth, translation), 2), east = _a[0], north = _a[1]; + var _b = __read(translateCoordinates(bbox.mapWest, bbox.mapSouth, translation), 2), west = _b[0], south = _b[1]; + var northPole = 90; + var southPole = -90; + // prevent polar crossing + var diff; + if (north > northPole) { + diff = Math.abs(north - northPole); + north = northPole; + south = south - diff; + } + if (south < southPole) { + diff = Math.abs(southPole - south); + south = southPole; + north = north + diff; + } + translated.mapNorth = north; + translated.mapEast = east; + translated.mapSouth = south; + translated.mapWest = west; + translated.north = north; + translated.east = east; + translated.south = south; + translated.west = west; + return translated; +}; +var translatePoint = function (lon, lat, translation) { + var _a = __read(translateCoordinates(lon, lat, translation), 2), updatedLon = _a[0], updatedLat = _a[1]; + var northPole = 89.99; + var southPole = -89.99; + if (updatedLat > northPole) { + updatedLat = northPole; + } + else if (updatedLat < southPole) { + updatedLat = southPole; + } + return { lon: updatedLon, lat: updatedLat }; +}; +var translateCoordinates = function (longitude, latitude, translation) { + var translatedLon = longitude + translation.longitude; + var translatedLat = latitude + translation.latitude; + // normalize longitude + if (translatedLon > 180) { + translatedLon -= 360; + } + if (translatedLon < -180) { + translatedLon += 360; + } + return [translatedLon, translatedLat]; +}; +var useMapListeners = function (_a) { + var map = _a.map, mapModel = _a.mapModel, selectionInterface = _a.selectionInterface; + var _b = __read(React.useState(false), 2), isHoveringResult = _b[0], setIsHoveringResult = _b[1]; + var _c = __read(React.useState({}), 2), hoverGeo = _c[0], setHoverGeo = _c[1]; + var _d = React.useContext(InteractionsContext), moveFrom = _d.moveFrom, setMoveFrom = _d.setMoveFrom, interactiveGeo = _d.interactiveGeo, setInteractiveGeo = _d.setInteractiveGeo, interactiveModels = _d.interactiveModels, setInteractiveModels = _d.setInteractiveModels, translation = _d.translation, setTranslation = _d.setTranslation; + var addSnack = useSnack(); + var upCallbackRef = React.useRef(); + React.useEffect(function () { + upCallbackRef.current = function () { + var e_7, _a; + if (interactiveModels.length > 0 && translation) { + var undoFns_1 = []; + var _loop_1 = function (model) { + var originalLocation = getLocation(model); + var newLocation = getLocation(model, translation); + model.set(newLocation); + undoFns_1.push(function () { return model.set(originalLocation); }); + }; + try { + for (var interactiveModels_1 = __values(interactiveModels), interactiveModels_1_1 = interactiveModels_1.next(); !interactiveModels_1_1.done; interactiveModels_1_1 = interactiveModels_1.next()) { + var model = interactiveModels_1_1.value; + _loop_1(model); + } + } + catch (e_7_1) { e_7 = { error: e_7_1 }; } + finally { + try { + if (interactiveModels_1_1 && !interactiveModels_1_1.done && (_a = interactiveModels_1.return)) _a.call(interactiveModels_1); + } + finally { if (e_7) throw e_7.error; } + } + addSnack('Location updated. You may still need to save the item that uses it.', { + id: "".concat(interactiveGeo, ".move"), + undo: function () { + var e_8, _a; + try { + for (var undoFns_2 = __values(undoFns_1), undoFns_2_1 = undoFns_2.next(); !undoFns_2_1.done; undoFns_2_1 = undoFns_2.next()) { + var undoFn = undoFns_2_1.value; + undoFn(); + } + } + catch (e_8_1) { e_8 = { error: e_8_1 }; } + finally { + try { + if (undoFns_2_1 && !undoFns_2_1.done && (_a = undoFns_2.return)) _a.call(undoFns_2); + } + finally { if (e_8) throw e_8.error; } + } + }, + }); + } + setMoveFrom(null); + setTranslation(null); + }; + }, [interactiveModels, translation]); + React.useEffect(function () { + if (interactiveGeo) { + // This handler might disable dragging to move the map, so only set it up + // when the user has started interacting with a geo. + map.onMouseTrackingForGeoDrag({ + moveFrom: moveFrom, + down: function (_a) { + var position = _a.position, mapLocationId = _a.mapLocationId; + if (mapLocationId === interactiveGeo && !Drawing.isDrawing()) { + setMoveFrom(position); + } + }, + move: function (_a) { + var translation = _a.translation, mapLocationId = _a.mapLocationId; + if (mapLocationId === interactiveGeo) { + setHoverGeo({ + id: mapLocationId, + }); + } + else { + setHoverGeo({}); + } + setTranslation(translation !== null && translation !== void 0 ? translation : null); + }, + up: function () { var _a; return (_a = upCallbackRef.current) === null || _a === void 0 ? void 0 : _a.call(upCallbackRef); }, + }); + } + return function () { return map === null || map === void 0 ? void 0 : map.clearMouseTrackingForGeoDrag(); }; + }, [map, interactiveGeo, moveFrom]); + var handleKeydown = React.useCallback(function (e) { + if (e.key === 'Escape') { + setInteractiveGeo(null); + setInteractiveModels([]); + setMoveFrom(null); + setTranslation(null); + } + }, []); + React.useEffect(function () { + if (interactiveGeo) { + window.addEventListener('keydown', handleKeydown); + } + else { + window.removeEventListener('keydown', handleKeydown); + } + return function () { return window.removeEventListener('keydown', handleKeydown); }; + }, [interactiveGeo]); + React.useEffect(function () { + if (map && !moveFrom) { + var handleLeftClick = function (mapLocationId) { + if (mapLocationId && !interactiveGeo && !Drawing.isDrawing()) { + setInteractiveGeo(mapLocationId); + } + else { + setInteractiveGeo(null); + setInteractiveModels([]); + setMoveFrom(null); + setTranslation(null); + } + }; + map.onLeftClickMapAPI(handleLeftClick); + } + if (map && !interactiveGeo) { + if (!Drawing.isDrawing()) { + // Clicks used in drawing on the 3D map, so let's ignore them here + // while drawing. + map.onDoubleClick(); + map.onRightClick(function (event, _mapEvent) { + event.preventDefault(); + mapModel.set({ + mouseX: event.offsetX, + mouseY: event.offsetY, + open: true, + }); + mapModel.updateClickCoordinates(); + updateDistance({ map: map, mapModel: mapModel, updateOnMenu: true }); + }); + } + if (mapModel) { + map.onMouseMove(function (_event, mapEvent) { + handleMapHover({ + map: map, + mapEvent: mapEvent, + mapModel: mapModel, + selectionInterface: selectionInterface, + setIsHoveringResult: setIsHoveringResult, + setHoverGeo: setHoverGeo, + }); + }); + } + } + return function () { + map === null || map === void 0 ? void 0 : map.clearMouseMove(); + map === null || map === void 0 ? void 0 : map.clearDoubleClick(); + map === null || map === void 0 ? void 0 : map.clearRightClick(); + map === null || map === void 0 ? void 0 : map.clearLeftClickMapAPI(); + }; + }, [map, mapModel, selectionInterface, interactiveGeo, moveFrom]); + return { + isHoveringResult: isHoveringResult, + hoverGeo: hoverGeo, + interactiveGeo: interactiveGeo, + setInteractiveGeo: setInteractiveGeo, + moveFrom: moveFrom, + }; +}; +var useOnMouseLeave = function (_a) { + var mapElement = _a.mapElement, mapModel = _a.mapModel; + React.useEffect(function () { + if (mapElement && mapModel) { + mapElement.addEventListener('mouseleave', function () { + mapModel.clearMouseCoordinates(); + }); + } + }, [mapElement, mapModel]); +}; +var useListenToDrawing = function () { + var _a = __read(React.useState(false), 2), isDrawing = _a[0], setIsDrawing = _a[1]; + useListenTo(Drawing, 'change:drawing', function () { + setIsDrawing(Drawing.isDrawing()); + }); + return isDrawing; +}; +var useChangeCursorOnHover = function (_a) { + var mapElement = _a.mapElement, isHoveringResult = _a.isHoveringResult, hoverGeo = _a.hoverGeo, interactiveGeo = _a.interactiveGeo, moveFrom = _a.moveFrom, isDrawing = _a.isDrawing; + React.useEffect(function () { + if (mapElement) { + var canvas = mapElement.querySelector('canvas'); + if (canvas && !isDrawing) { + if (interactiveGeo) { + // If the user is in 'interactive mode' with a geo, only show a special cursor + // when hovering over that geo. + if (hoverGeo.id === interactiveGeo) { + canvas.style.cursor = moveFrom ? 'grabbing' : 'grab'; + } + else { + canvas.style.cursor = ''; + } + } + else if (hoverGeo.interactive || isHoveringResult) { + canvas.style.cursor = 'pointer'; + } + else if (hoverGeo.interactive === false) { + canvas.style.cursor = 'not-allowed'; + } + else { + canvas.style.cursor = ''; + } + } + } + }, [mapElement, isHoveringResult, hoverGeo, interactiveGeo, moveFrom]); +}; +var useChangeCursorOnDrawing = function (_a) { + var mapElement = _a.mapElement, isDrawing = _a.isDrawing; + React.useEffect(function () { + if (mapElement) { + var canvas = mapElement.querySelector('canvas'); + if (canvas) { + if (isDrawing) { + canvas.style.cursor = 'crosshair'; + } + else { + canvas.style.cursor = ''; + } + } + } + }, [mapElement, isDrawing]); +}; +export var MapViewReact = function (props) { + var _a = __read(React.useState(false), 2), isClustering = _a[0], setIsClustering = _a[1]; + var mapModel = useMapModel(); + var _b = __read(React.useState(null), 2), mapDrawingPopupElement = _b[0], setMapDrawingPopupElement = _b[1]; + var _c = __read(React.useState(null), 2), containerElement = _c[0], setContainerElement = _c[1]; + var _d = __read(React.useState(null), 2), mapElement = _d[0], setMapElement = _d[1]; + var map = useMap(__assign(__assign({}, props), { mapElement: mapElement, mapModel: mapModel, containerElement: containerElement, mapDrawingPopupElement: mapDrawingPopupElement })); + React.useEffect(function () { + props.setMap(map); // allow outside access to map + }, [map]); + useWreqrMapListeners({ map: map }); + useSelectionInterfaceMapListeners({ + map: map, + selectionInterface: props.selectionInterface, + }); + useListenToMapModel({ map: map, mapModel: mapModel }); + var _e = useMapListeners({ + map: map, + mapModel: mapModel, + selectionInterface: props.selectionInterface, + }), isHoveringResult = _e.isHoveringResult, hoverGeo = _e.hoverGeo, interactiveGeo = _e.interactiveGeo, moveFrom = _e.moveFrom; + useOnMouseLeave({ mapElement: mapElement, mapModel: mapModel }); + var isDrawing = useListenToDrawing(); + useChangeCursorOnDrawing({ mapElement: mapElement, isDrawing: isDrawing }); + useChangeCursorOnHover({ + isHoveringResult: isHoveringResult, + hoverGeo: hoverGeo, + interactiveGeo: interactiveGeo, + moveFrom: moveFrom, + isDrawing: isDrawing, + mapElement: mapElement, + }); + var addSnack = useSnack(); + return (React.createElement("div", { ref: setContainerElement, className: "w-full h-full bg-inherit relative p-2" }, + !map ? (React.createElement(React.Fragment, null, + React.createElement(LinearProgress, { className: "absolute left-0 w-full h-2 transform -translate-y-1/2", style: { + top: '50%', + } }))) : (React.createElement(React.Fragment, null)), + React.createElement("div", { id: "mapDrawingPopup", ref: setMapDrawingPopupElement }), + React.createElement("div", { className: "map-context-menu" }), + React.createElement("div", { id: "mapTools" }, + map ? (React.createElement(Geometries, { selectionInterface: props.selectionInterface, map: map, isClustering: isClustering })) : null, + map ? (React.createElement(MapToolbar, { map: map, mapLayers: props.mapLayers, zoomToHome: function () { + zoomToHome({ map: map }); + }, saveAsHome: function () { + var boundingBox = map.getBoundingBox(); + var userPreferences = user.get('user').get('preferences'); + userPreferences.set('mapHome', boundingBox); + addSnack('Success! New map home location set.', { + alertProps: { + severity: 'success', + }, + }); + }, isClustering: isClustering, toggleClustering: function () { + setIsClustering(!isClustering); + } })) : null, + map ? (React.createElement(React.Fragment, null, + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2 z-10 absolute right-0 bottom-0 mr-4 mb-4" }, + React.createElement("div", null, + React.createElement(Button, { size: "small", onClick: function () { + map.zoomIn(); + } }, + React.createElement(PlusIcon, { className: " h-5 w-5" }))), + React.createElement("div", null, + React.createElement(Button, { size: "small", onClick: function () { + map.zoomOut(); + } }, + React.createElement(MinusIcon, { className: " h-5 w-5" })))))) : null), + React.createElement("div", { "data-id": "map-container", id: "mapContainer", className: "h-full", ref: setMapElement }), + React.createElement("div", { className: "mapInfo" }, mapModel ? React.createElement(MapInfo, { map: mapModel }) : null), + React.createElement("div", { className: "distanceInfo" }, mapModel ? React.createElement(DistanceInfo, { map: mapModel }) : null), + React.createElement("div", { className: "popupPreview" }, map && mapModel && props.selectionInterface ? (React.createElement(React.Fragment, null, + React.createElement(PopupPreview, { map: map, mapModel: mapModel, selectionInterface: props.selectionInterface }))) : null), + mapModel ? React.createElement(MapContextDropdown, { mapModel: mapModel }) : null)); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLnZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9tYXAudmlldy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0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ICdtYXBFYXN0JyxcbiAgICAgICAgJ21hcFdlc3QnLFxuICAgICAgICAnbm9ydGgnLFxuICAgICAgICAnc291dGgnLFxuICAgICAgICAnZWFzdCcsXG4gICAgICAgICd3ZXN0J1xuICAgICAgKVxuICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgIGNvbnN0IHRyYW5zbGF0ZWRCYm94ID0gdHJhbnNsYXRlQmJveChiYm94LCB0cmFuc2xhdGlvbilcbiAgICAgICAgcmV0dXJuIHRyYW5zbGF0ZWRCYm94XG4gICAgICB9XG4gICAgICByZXR1cm4gYmJveFxuICAgIGNhc2UgJ2NpcmNsZSc6XG4gICAgICBjb25zdCBwb2ludCA9IF8ucGljayhtb2RlbC5hdHRyaWJ1dGVzLCAnbGF0JywgJ2xvbicpXG4gICAgICBpZiAodHJhbnNsYXRpb24pIHtcbiAgICAgICAgY29uc3QgdHJhbnNsYXRlZFBvaW50ID0gdHJhbnNsYXRlUG9pbnQoXG4gICAgICAgICAgcG9pbnQubG9uLFxuICAgICAgICAgIHBvaW50LmxhdCxcbiAgICAgICAgICB0cmFuc2xhdGlvblxuICAgICAgICApXG4gICAgICAgIHJldHVybiB0cmFuc2xhdGVkUG9pbnRcbiAgICAgIH1cbiAgICAgIHJldHVybiBwb2ludFxuICAgIGNhc2UgJ2xpbmUnOlxuICAgICAgY29uc3QgbGluZSA9IEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkobW9kZWwuZ2V0KCdsaW5lJykpKVxuICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgIHRyYW5zbGF0ZUxpbmUobGluZSwgdHJhbnNsYXRpb24pXG4gICAgICB9XG4gICAgICByZXR1cm4geyBsaW5lIH1cbiAgICBjYXNlICdwb2x5JzpcbiAgICAgIGNvbnN0IHBvbHlnb24gPSBKU09OLnBhcnNlKEpTT04uc3RyaW5naWZ5KG1vZGVsLmdldCgncG9seWdvbicpKSlcbiAgICAgIGlmICh0cmFuc2x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xuICAgICAgICAgIGlmIChtYXBMb2NhdGlvbklkID09PSBpbnRlcmFjdGl2ZUdlbyAmJiAhRHJhd2luZy5pc0RyYXdpbmcoKSkge1xuICAgICAgICAgICAgc2V0TW92ZUZyb20ocG9zaXRpb24pXG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBtb3ZlOiAoe1xuICAgICAgICAgIHRyYW5zbGF0aW9uLFxuICAgICAgICAgIG1hcExvY2F0aW9uSWQsXG4gICAgICAgIH06IHtcbiAgICAgICAgICB0cmFuc2xhdGlvbj86IFRyYW5zbGF0aW9uXG4gICAgICAgICAgbWFwTG9jYXRpb25JZDogbnVtYmVyXG4gICAgICAgIH0pID0+IHtcbiAgICAgICAgICBpZiAobWFwTG9jYXRpb25JZCA9PT0gaW50ZXJhY3RpdmVHZW8pIHtcbiAgICAgICAgICAgIHNldEhvdmVyR2VvKHtcbiAgICAgICAgICAgICAgaWQ6IG1hcExvY2F0aW9uSWQsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzZXRIb3Zlckdlbyh7fSlcbiAgICAgICAgICB9XG4gICAgICAgICAgc2V0VHJhbnNsYXRpb24odHJhbnNsYXRpb24gPz8gbnVsbClcbiAgICAgICAgfSxcbiAgICAgICAgdXA6ICgpID0+IHVwQ2FsbGJhY2tSZWYuY3VycmVudD8uKCksXG4gICAgICB9KVxuICAgIH1cbiAgICByZXR1cm4gKCkgPT4gbWFwPy5jbGVhck1vdXNlVHJhY2tpbmdGb3JHZW9EcmFnKClcbiAgfSwgW21hcCwgaW50ZXJhY3RpdmVHZW8sIG1vdmVGcm9tXSlcblxuICBjb25zdCBoYW5kbGVLZXlkb3duID0gUmVhY3QudXNlQ2FsbGJhY2soKGU6IGFueSkgPT4ge1xuICAgIGlmIChlLmtleSA9PT0gJ0VzY2FwZScpIHtcbiAgICAgIHNldEludGVyYWN0aXZlR2VvKG51bGwpXG4gICAgICBzZXRJbnRlcmFjdGl2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VmPXtzZXRNYXBEcmF3aW5nUG9wdXBFbGVtZW50fT48L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwibWFwLWNvbnRleHQtbWVudVwiPjwvZGl2PlxuICAgICAgPGRpdiBpZD1cIm1hcFRvb2xzXCI+XG4gICAgICAgIHttYXAgPyAoXG4gICAgICAgICAgPEdlb21ldHJpZXNcbiAgICAgICAgICAgIHNlbGVjdGlvbkludGVyZmFjZT17cHJvcHMuc2VsZWN0aW9uSW50ZXJmYWNlfVxuICAgICAgICAgICAgbWFwPXttYXB9XG4gICAgICAgICAgICBpc0NsdXN0ZXJpbmc9e2lzQ2x1c3RlcmluZ31cbiAgICAgICAgICAvPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgICAge21hcCA/IChcbiAgICAgICAgICA8TWFwVG9vbGJhclxuICAgICAgICAgICAgbWFwPXttYXB9XG4gICAgICAgICAgICBtYXBMYXllcnM9e3Byb3BzLm1hcExheWVyc31cbiAgICAgICAgICAgIHpvb21Ub0hvbWU9eygpID0+IHtcbiAgICAgICAgICAgICAgem9vbVRvSG9tZSh7IG1hcCB9KVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIHNhdmVBc0hvbWU9eygpID0+IHtcbiAgICAgICAgICAgICAgY29uc3QgYm91bmRpbmdCb3ggPSBtYXAuZ2V0Qm91bmRpbmdCb3goKVxuICAgICAgICAgICAgICBjb25zdCB1c2VyUHJlZmVyZW5jZXMgPSB1c2VyLmdldCgndXNlcicpLmdldCgncHJlZmVyZW5jZXMnKVxuICAgICAgICAgICAgICB1c2VyUHJlZmVyZW5jZXMuc2V0KCdtYXBIb21lJywgYm91bmRpbmdCb3gpXG4gICAgICAgICAgICAgIGFkZFNuYWNrKCdTdWNjZXNzISBOZXcgbWFwIGhvbWUgbG9jYXRpb24gc2V0LicsIHtcbiAgICAgICAgICAgICAgICBhbGVydFByb3BzOiB7XG4gICAgICAgICAgICAgICAgICBzZXZlcml0eTogJ3N1Y2Nlc3MnLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgaXNDbHVzdGVyaW5nPXtpc0NsdXN0ZXJpbmd9XG4gICAgICAgICAgICB0b2dnbGVDbHVzdGVyaW5nPXsoKSA9PiB7XG4gICAgICAgICAgICAgIHNldElzQ2x1c3RlcmluZyghaXNDbHVzdGVyaW5nKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgICAge21hcCA/IChcbiAgICAgICAgICA8PlxuICAgICAgICAgICAgPFBhcGVyXG4gICAgICAgICAgICAgIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c31cbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwicC0yIHotMTAgYWJzb2x1dGUgcmlnaHQtMCBib3R0b20tMCBtci00IG1iLTRcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIG1hcC56b29tSW4oKVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICA8UGx1c0ljb24gY2xhc3NOYW1lPVwiICBoLTUgdy01XCIgLz5cbiAgICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbWFwLnpvb21PdXQoKVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICA8TWludXNJY29uIGNsYXNzTmFtZT1cIiAgaC01IHctNVwiIC8+XG4gICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9QYXBlcj5cbiAgICAgICAgICA8Lz5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXZcbiAgICAgICAgZGF0YS1pZD1cIm1hcC1jb250YWluZXJcIlxuICAgICAgICBpZD1cIm1hcENvbnRhaW5lclwiXG4gICAgICAgIGNsYXNzTmFtZT1cImgtZnVsbFwiXG4gICAgICAgIHJlZj17c2V0TWFwRWxlbWVudH1cbiAgICAgID48L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwibWFwSW5mb1wiPlxuICAgICAgICB7bWFwTW9kZWwgPyA8TWFwSW5mbyBtYXA9e21hcE1vZGVsfSAvPiA6IG51bGx9XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZGlzdGFuY2VJbmZvXCI+XG4gICAgICAgIHttYXBNb2RlbCA/IDxEaXN0YW5jZUluZm8gbWFwPXttYXBNb2RlbH0gLz4gOiBudWxsfVxuICAgICAgPC9kaXY+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cInBvcHVwUHJldmlld1wiPlxuICAgICAgICB7bWFwICYmIG1hcE1vZGVsICYmIHByb3BzLnNlbGVjdGlvbkludGVyZmFjZSA/IChcbiAgICAgICAgICA8PlxuICAgICAgICAgICAgPFBvcHVwUHJldmlld1xuICAgICAgICAgICAgICBtYXA9e21hcH1cbiAgICAgICAgICAgICAgbWFwTW9kZWw9e21hcE1vZGVsfVxuICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e3Byb3BzLnNlbGVjdGlvbkludGVyZmFjZX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC8+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgPC9kaXY+XG4gICAgICB7bWFwTW9kZWwgPyA8TWFwQ29udGV4dERyb3Bkb3duIG1hcE1vZGVsPXttYXBNb2RlbH0gLz4gOiBudWxsfVxuICAgIDwvZGl2PlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/bbox-display.d.ts b/src/main/webapp/component/visualization/maps/openlayers/bbox-display.d.ts new file mode 100644 index 00000000000..72e39566757 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/bbox-display.d.ts @@ -0,0 +1,16 @@ +/// +import { Translation } from '../interactions.provider'; +export declare const drawBbox: ({ map, model, rectangle, id, isInteractive, translation, }: { + map: any; + model: any; + rectangle: any; + id: string; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => void; +export declare const OpenlayersBboxDisplay: ({ map, model, isInteractive, translation, }: { + map: any; + model: any; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => JSX.Element; diff --git a/src/main/webapp/component/visualization/maps/openlayers/bbox-display.js b/src/main/webapp/component/visualization/maps/openlayers/bbox-display.js new file mode 100644 index 00000000000..69f1e7b8a14 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/bbox-display.js @@ -0,0 +1,157 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import ol from 'openlayers'; +import _ from 'underscore'; +import { validateGeo } from '../../../../react-component/utils/validation'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { removeOldDrawing } from './drawing-and-display'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import { StartupDataStore } from '../../../../js/model/Startup/startup'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +var modelToRectangle = function (model) { + var _a; + //ensure that the values are numeric + //so that the openlayer projections + //do not fail + var north = parseFloat(model.get('mapNorth')); + var south = parseFloat(model.get('mapSouth')); + var east = parseFloat(model.get('mapEast')); + var west = parseFloat(model.get('mapWest')); + if (isNaN(north) || isNaN(south) || isNaN(east) || isNaN(west)) { + // this.destroyPrimitive() + return; + } + // If south is greater than north, + // remove shape from map + if (south > north) { + // this.destroyPrimitive() + return; + } + if ((_a = validateGeo('polygon', JSON.stringify([ + [west, north], + [east, north], + [west, south], + [east, south], + [west, north], + ]))) === null || _a === void 0 ? void 0 : _a.error) { + return; + } + // If we are crossing the date line, we must go outside [-180, 180] + // for openlayers to draw correctly. This means we can't draw boxes + // that encompass more than half the world. This actually matches + // how the backend searches anyway. + if (east - west < -180) { + east += 360; + } + else if (east - west > 180) { + west += 360; + } + var northWest = ol.proj.transform([west, north], 'EPSG:4326', StartupDataStore.Configuration.getProjection()); + var northEast = ol.proj.transform([east, north], 'EPSG:4326', StartupDataStore.Configuration.getProjection()); + var southWest = ol.proj.transform([west, south], 'EPSG:4326', StartupDataStore.Configuration.getProjection()); + var southEast = ol.proj.transform([east, south], 'EPSG:4326', StartupDataStore.Configuration.getProjection()); + var coords = []; + coords.push(northWest); + coords.push(northEast); + coords.push(southEast); + coords.push(southWest); + coords.push(northWest); + var rectangle = new ol.geom.LineString(coords); + return rectangle; +}; +export var drawBbox = function (_a) { + var map = _a.map, model = _a.model, rectangle = _a.rectangle, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + if (!rectangle) { + // handles case where model changes to empty vars and we don't want to draw anymore + return; + } + if (translation) { + rectangle.translate(translation.longitude, translation.latitude); + } + var billboard = new ol.Feature({ + geometry: rectangle, + }); + billboard.setId(id); + billboard.set('locationId', model.get('locationId')); + var color = model.get('color'); + var iconStyle = new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: isInteractive ? contrastingColor : color ? color : '#914500', + width: isInteractive ? 6 : 4, + }), + }); + billboard.setStyle(iconStyle); + var vectorSource = new ol.source.Vector({ + features: [billboard], + }); + var vectorLayer = new ol.layer.Vector({ + source: vectorSource, + }); + vectorLayer.set('id', id); + var mapRef = map.getMap(); + removeOldDrawing({ map: mapRef, id: id }); + mapRef.addLayer(vectorLayer); +}; +var updatePrimitive = function (_a) { + var map = _a.map, model = _a.model, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + var rectangle = modelToRectangle(model); + // make sure the current model has width and height before drawing + if (rectangle && + !_.isUndefined(rectangle) && + model.get('north') !== model.get('south') && + model.get('east') !== model.get('west')) { + drawBbox({ rectangle: rectangle, map: map, model: model, id: id, isInteractive: isInteractive, translation: translation }); + //only call this if the mouse button isn't pressed, if we try to draw the border while someone is dragging + //the filled in shape won't show up + // if (!this.buttonPressed) { + // drawBorderedRectangle(rectangle) + // } + } +}; +var useListenToBboxModel = function (_a) { + var model = _a.model, map = _a.map, isInteractive = _a.isInteractive, translation = _a.translation; + var callback = React.useMemo(function () { + return function () { + if (model && map) { + updatePrimitive({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + isInteractive: isInteractive, + translation: translation, + }); + } + }; + }, [model, map, isInteractive, translation]); + useListenTo(model, 'change:mapNorth change:mapSouth change:mapEast change:mapWest', callback); + callback(); +}; +export var OpenlayersBboxDisplay = function (_a) { + var map = _a.map, model = _a.model, isInteractive = _a.isInteractive, translation = _a.translation; + useListenToBboxModel({ map: map, model: model, isInteractive: isInteractive, translation: translation }); + React.useEffect(function () { + return function () { + if (map && model) { + removeOldDrawing({ + map: map.getMap(), + id: getIdFromModelForDisplay({ model: model }), + }); + } + }; + }, [map, model]); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmJveC1kaXNwbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvd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aGFuZ2U6bWFwV2VzdCcsXG4gICAgY2FsbGJhY2tcbiAgKVxuICBjYWxsYmFjaygpXG59XG5leHBvcnQgY29uc3QgT3BlbmxheWVyc0Jib3hEaXNwbGF5ID0gKHtcbiAgbWFwLFxuICBtb2RlbCxcbiAgaXNJbnRlcmFjdGl2ZSxcbiAgdHJhbnNsYXRpb24sXG59OiB7XG4gIG1hcDogYW55XG4gIG1vZGVsOiBhbnlcbiAgaXNJbnRlcmFjdGl2ZT86IGJvb2xlYW5cbiAgdHJhbnNsYXRpb24/OiBUcmFuc2xhdGlvblxufSkgPT4ge1xuICB1c2VMaXN0ZW5Ub0Jib3hNb2RlbCh7IG1hcCwgbW9kZWwsIGlzSW50ZXJhY3RpdmUsIHRyYW5zbGF0aW9uIH0pXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIGlmIChtYXAgJiYgbW9kZWwpIHtcbiAgICAgICAgcmVtb3ZlT2xkRHJhd2luZyh7XG4gICAgICAgICAgbWFwOiBtYXAuZ2V0TWFwKCksXG4gICAgICAgICAgaWQ6IGdldElkRnJvbU1vZGVsRm9yRGlzcGxheSh7IG1vZGVsIH0pLFxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH1cbiAgfSwgW21hcCwgbW9kZWxdKVxuICByZXR1cm4gPD48Lz5cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/circle-display.d.ts b/src/main/webapp/component/visualization/maps/openlayers/circle-display.d.ts new file mode 100644 index 00000000000..0bba1ba59ed --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/circle-display.d.ts @@ -0,0 +1,18 @@ +/// +import ol from 'openlayers'; +import { Translation } from '../interactions.provider'; +export declare function translateFromOpenlayersCoordinate(coord: any): ol.Coordinate; +export declare const drawCircle: ({ map, model, rectangle, id, isInteractive, translation, }: { + map: any; + model: any; + rectangle: any; + id: string; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => void; +export declare const OpenlayersCircleDisplay: ({ map, model, isInteractive, translation, }: { + map: any; + model: any; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => JSX.Element; diff --git a/src/main/webapp/component/visualization/maps/openlayers/circle-display.js b/src/main/webapp/component/visualization/maps/openlayers/circle-display.js new file mode 100644 index 00000000000..749957baa4b --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/circle-display.js @@ -0,0 +1,132 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import ol from 'openlayers'; +import _ from 'underscore'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { removeOldDrawing } from './drawing-and-display'; +import DistanceUtils from '../../../../js/DistanceUtils'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import * as Turf from '@turf/turf'; +import TurfCircle from '@turf/circle'; +import { StartupDataStore } from '../../../../js/model/Startup/startup'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +export function translateFromOpenlayersCoordinate(coord) { + return ol.proj.transform([Number(coord[0]), Number(coord[1])], StartupDataStore.Configuration.getProjection(), 'EPSG:4326'); +} +function translateToOpenlayersCoordinate(coord) { + return ol.proj.transform([Number(coord[0]), Number(coord[1])], 'EPSG:4326', StartupDataStore.Configuration.getProjection()); +} +function translateToOpenlayersCoordinates(coords) { + var coordinates = []; + coords.forEach(function (item) { + coordinates.push(translateToOpenlayersCoordinate(item)); + }); + return coordinates; +} +var modelToCircle = function (_a) { + var model = _a.model, map = _a.map; + if (model.get('lon') === undefined || model.get('lat') === undefined) { + return undefined; + } + var rectangle = new ol.geom.Circle(translateToOpenlayersCoordinate([model.get('lon'), model.get('lat')]), DistanceUtils.getDistanceInMeters(model.get('radius'), model.get('radiusUnits')) / map.getMap().getView().getProjection().getMetersPerUnit()); + return rectangle; +}; +export var drawCircle = function (_a) { + var map = _a.map, model = _a.model, rectangle = _a.rectangle, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + if (!rectangle) { + // handles case where model changes to empty vars and we don't want to draw anymore + return; + } + if (translation) { + rectangle.translate(translation.longitude, translation.latitude); + } + var point = Turf.point(translateFromOpenlayersCoordinate(rectangle.getCenter())); + var turfCircle = TurfCircle(point, rectangle.getRadius() * + map.getMap().getView().getProjection().getMetersPerUnit(), { steps: 64, units: 'meters' }); + var geometryRepresentation = new ol.geom.LineString(translateToOpenlayersCoordinates(turfCircle.geometry.coordinates[0])); + var billboard = new ol.Feature({ + geometry: geometryRepresentation, + }); + billboard.setId(id); + billboard.set('locationId', model.get('locationId')); + var color = model.get('color'); + var iconStyle = new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: isInteractive ? contrastingColor : color ? color : '#914500', + width: isInteractive ? 6 : 4, + }), + }); + billboard.setStyle(iconStyle); + var vectorSource = new ol.source.Vector({ + features: [billboard], + }); + var vectorLayer = new ol.layer.Vector({ + source: vectorSource, + }); + vectorLayer.set('id', id); + var mapRef = map.getMap(); + removeOldDrawing({ map: mapRef, id: id }); + mapRef.addLayer(vectorLayer); +}; +var updatePrimitive = function (_a) { + var map = _a.map, model = _a.model, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + var circle = modelToCircle({ model: model, map: map }); + // make sure the current model has width and height before drawing + if (circle && !_.isUndefined(circle)) { + drawCircle({ + model: model, + rectangle: circle, + map: map, + id: id, + isInteractive: isInteractive, + translation: translation, + }); + } +}; +var useListenToBboxModel = function (_a) { + var model = _a.model, map = _a.map, isInteractive = _a.isInteractive, translation = _a.translation; + var callback = React.useMemo(function () { + return function () { + if (model && map) { + updatePrimitive({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + isInteractive: isInteractive, + translation: translation, + }); + } + }; + }, [model, map, isInteractive, translation]); + useListenTo(model, 'change:lat change:lon change:radius', callback); + callback(); +}; +export var OpenlayersCircleDisplay = function (_a) { + var map = _a.map, model = _a.model, isInteractive = _a.isInteractive, translation = _a.translation; + useListenToBboxModel({ map: map, model: model, isInteractive: isInteractive, translation: translation }); + React.useEffect(function () { + return function () { + if (map && model) { + removeOldDrawing({ + map: map.getMap(), + id: getIdFromModelForDisplay({ model: model }), + }); + } + }; + }, [map, model]); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2lyY2xlLWRpc3BsYXkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9vcGVubGF5ZXJzL2NpcmNsZS1kaXNwbGF5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sRUFBRSxNQUFNLFlBQVksQ0FBQTtBQUMzQixPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFDMUIsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLDhDQUE4QyxDQUFBO0FBQzFFLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHVCQUF1QixDQUFBO0FBQ3hELE9BQU8sYUFBYSxNQUFNLDhCQUE4QixDQUFBO0FBQ3hELE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ2pFLE9BQU8sS0FBSyxJQUFJLE1BQU0sWUFBWSxDQUFBO0FBQ2xDLE9BQ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gfVxuICAgIH1cbiAgfSwgW21vZGVsLCBtYXAsIGlzSW50ZXJhY3RpdmUsIHRyYW5zbGF0aW9uXSlcbiAgdXNlTGlzdGVuVG8obW9kZWwsICdjaGFuZ2U6bGF0IGNoYW5nZTpsb24gY2hhbmdlOnJhZGl1cycsIGNhbGxiYWNrKVxuICBjYWxsYmFjaygpXG59XG5leHBvcnQgY29uc3QgT3BlbmxheWVyc0NpcmNsZURpc3BsYXkgPSAoe1xuICBtYXAsXG4gIG1vZGVsLFxuICBpc0ludGVyYWN0aXZlLFxuICB0cmFuc2xhdGlvbixcbn06IHtcbiAgbWFwOiBhbnlcbiAgbW9kZWw6IGFueVxuICBpc0ludGVyYWN0aXZlPzogYm9vbGVhblxuICB0cmFuc2xhdGlvbj86IFRyYW5zbGF0aW9uXG59KSA9PiB7XG4gIHVzZUxpc3RlblRvQmJveE1vZGVsKHsgbWFwLCBtb2RlbCwgaXNJbnRlcmFjdGl2ZSwgdHJhbnNsYXRpb24gfSlcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgaWYgKG1hcCAmJiBtb2RlbCkge1xuICAgICAgICByZW1vdmVPbGREcmF3aW5nKHtcbiAgICAgICAgICBtYXA6IG1hcC5nZXRNYXAoKSxcbiAgICAgICAgICBpZDogZ2V0SWRGcm9tTW9kZWxGb3JEaXNwbGF5KHsgbW9kZWwgfSksXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgfVxuICB9LCBbbWFwLCBtb2RlbF0pXG4gIHJldHVybiA8PjwvPlxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/draw-styles.d.ts b/src/main/webapp/component/visualization/maps/openlayers/draw-styles.d.ts new file mode 100644 index 00000000000..bf1f8e4a62d --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/draw-styles.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as ol from 'openlayers'; +declare const RENDERER_STYLE: (feature: ol.Feature) => ol.style.Style; +declare const DRAWING_STYLE: (feature: ol.Feature) => ol.style.Style[] | ol.style.Style; +export { RENDERER_STYLE, DRAWING_STYLE }; diff --git a/src/main/webapp/component/visualization/maps/openlayers/draw-styles.js b/src/main/webapp/component/visualization/maps/openlayers/draw-styles.js new file mode 100644 index 00000000000..71b83585456 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/draw-styles.js @@ -0,0 +1,121 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as ol from 'openlayers'; +import { transparentize } from 'polished'; +import { geometry } from 'geospatialdraw'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +var CIRCLE_BUFFER_PROPERTY_VALUE = geometry.CIRCLE_BUFFER_PROPERTY_VALUE, POLYGON_LINE_BUFFER_PROPERTY_VALUE = geometry.POLYGON_LINE_BUFFER_PROPERTY_VALUE, BUFFER_SHAPE_PROPERTY = geometry.BUFFER_SHAPE_PROPERTY; +var LINE_WIDTH = 2.5; +var POINT_SIZE = 4.5; +var SCALE_FACTOR = 1.5; +var RENDERER_STYLE = function (feature) { + return new ol.style.Style(__assign({ stroke: new ol.style.Stroke({ + color: feature.get('color'), + width: LINE_WIDTH, + }), fill: new ol.style.Fill({ + color: 'rgba(0, 0, 0, 0)', + }) }, (feature.get(BUFFER_SHAPE_PROPERTY) === CIRCLE_BUFFER_PROPERTY_VALUE + ? {} + : { + image: new ol.style.Circle({ + radius: POINT_SIZE, + fill: new ol.style.Fill({ + color: feature.get('color'), + }), + }), + }))); +}; +var CIRCLE_DRAWING_STYLE = function (feature) { + return new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: 'rgba(0, 0, 0, 0)', + }), + fill: new ol.style.Fill({ + color: 'rgba(0, 0, 0, 0)', + }), + image: new ol.style.Circle({ + radius: POINT_SIZE, + fill: new ol.style.Fill({ + color: feature.get('color'), + }), + }), + }); +}; +var CIRCLE_BUFFER_PROPERTY_VALUE_DRAWING_STYLE = function (feature) { + return new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: feature.get('color'), + width: LINE_WIDTH * SCALE_FACTOR, + }), + fill: new ol.style.Fill({ + color: transparentize(0.95, feature.get('color') || contrastingColor), + }), + }); +}; +var GENERIC_DRAWING_STYLE = function (feature) { return [ + new ol.style.Style(__assign({ stroke: new ol.style.Stroke({ + color: feature.get('color'), + width: LINE_WIDTH * SCALE_FACTOR, + }), fill: new ol.style.Fill({ + color: transparentize(0.95, feature.get('color') || contrastingColor), + }) }, (feature.getGeometry().getType() === 'Point' && feature.get('buffer') > 0 + ? {} + : { + image: new ol.style.Circle({ + radius: POINT_SIZE * SCALE_FACTOR, + fill: new ol.style.Fill({ + color: feature.get('color'), + }), + }), + }))), + new ol.style.Style({ + image: new ol.style.Circle({ + radius: POINT_SIZE, + fill: new ol.style.Fill({ + color: feature.get('color'), + }), + }), + geometry: function (feature) { + var geometry = feature.getGeometry(); + var coordinates = []; + if (geometry.getType() === 'Polygon') { + coordinates = geometry.getCoordinates()[0]; + } + else if (geometry.getType() === 'LineString') { + coordinates = geometry.getCoordinates(); + } + return new ol.geom.MultiPoint(coordinates); + }, + }), +]; }; +var DRAWING_STYLE = function (feature) { + if (feature.getGeometry().getType() === 'Circle') { + return CIRCLE_DRAWING_STYLE(feature); + } + else { + var bufferShape = feature.get(BUFFER_SHAPE_PROPERTY); + switch (bufferShape) { + case POLYGON_LINE_BUFFER_PROPERTY_VALUE: + return RENDERER_STYLE(feature); + case CIRCLE_BUFFER_PROPERTY_VALUE: + return CIRCLE_BUFFER_PROPERTY_VALUE_DRAWING_STYLE(feature); + default: + return GENERIC_DRAWING_STYLE(feature); + } + } +}; +export { RENDERER_STYLE, DRAWING_STYLE }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhdy1zdHlsZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9vcGVubGF5ZXJzL2RyYXctc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDekMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBQ3pDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDhEQUE4RCxDQUFBO0FBRzdGLElBQUEsNEJBQTRCLEdBRzFCLFFBQVEsNkJBSGtCLEVBQzVCLGtDQUFrQyxHQUVoQyxRQUFRLG1DQUZ3QixFQUNsQyxxQkFBcUIsR0FDbkIsUUFBUSxzQkFEVyxDQUNYO0FBRVosSUFBTSxVQUFVLEdBQUcsR0FBRyxDQUFBO0FBQ3RCLElBQU0sVUFBVSxHQUFHLEdBQUcsQ0FB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SX1BST1BFUlRZX1ZBTFVFOlxuICAgICAgICByZXR1cm4gQ0lSQ0xFX0JVRkZFUl9QUk9QRVJUWV9WQUxVRV9EUkFXSU5HX1NUWUxFKGZlYXR1cmUpXG4gICAgICBkZWZhdWx0OlxuICAgICAgICByZXR1cm4gR0VORVJJQ19EUkFXSU5HX1NUWUxFKGZlYXR1cmUpXG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCB7IFJFTkRFUkVSX1NUWUxFLCBEUkFXSU5HX1NUWUxFIH1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.d.ts b/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.d.ts new file mode 100644 index 00000000000..b3d07bb0f38 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.d.ts @@ -0,0 +1,21 @@ +/// +import { Shape } from 'geospatialdraw/target/webapp/shape-utils'; +import { GeometryJSON } from 'geospatialdraw/target/webapp/geometry'; +import * as ol from 'openlayers'; +import { Model } from 'backbone'; +export declare const removeOldDrawing: ({ map, id }: { + map: ol.Map; + id: string; +}) => void; +export declare const getDrawingGeometryFromModel: (model: any) => GeometryJSON | null; +export declare const convertToModel: ({ geo, shape, existingModel, }: { + geo: GeometryJSON; + shape: Shape; + existingModel?: Model | undefined; +}) => { + [key: string]: any; +}; +export declare const OpenlayersDrawings: ({ map, selectionInterface, }: { + map: any; + selectionInterface: any; +}) => JSX.Element; diff --git a/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.js b/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.js new file mode 100644 index 00000000000..5ebf21e606b --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.js @@ -0,0 +1,393 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { useState, useEffect } from 'react'; +import { v4 } from 'uuid'; +import { getDrawModeFromModel, getShapeFromDrawMode, getDrawModeFromShape, useDrawingAndDisplayModels, } from '../drawing-and-display'; +import { OpenlayersBboxDisplay } from './bbox-display'; +import { OpenlayersCircleDisplay } from './circle-display'; +import { OpenlayersLineDisplay } from './line-display'; +import { OpenlayersPolygonDisplay } from './polygon-display'; +import { Editor } from '../draw-menu'; +import { DRAWING_STYLE } from './draw-styles'; +import { menu, geometry } from 'geospatialdraw'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { makeGeometry, makePointRadiusGeo, makeLineGeo, makeBBoxGeo, } from 'geospatialdraw/target/webapp/geometry'; +import Common from '../../../../js/Common'; +import wreqr from '../../../../js/wreqr'; +import * as Turf from '@turf/turf'; +import { validateGeo } from '../../../../react-component/utils/validation'; +import ShapeUtils from '../../../../js/ShapeUtils'; +import utility from './utility'; +import { locationColors, contrastingColor, } from '../../../../react-component/location/location-color-selector'; +import { InteractionsContext } from '../interactions.provider'; +var DrawingMenu = menu.DrawingMenu; +var makeEmptyGeometry = geometry.makeEmptyGeometry; +var SHAPES = [ + 'Bounding Box', + 'Line', + 'Point', + 'Point Radius', + 'Polygon', +]; +var DEFAULT_SHAPE = 'Polygon'; +var DRAWING_COLOR = 'blue'; +export var removeOldDrawing = function (_a) { + var map = _a.map, id = _a.id; + var oldLayers = map + .getLayers() + .getArray() + .filter(function (layer) { + return layer.get('id') === id; + }); + oldLayers.forEach(function (layer) { + map.removeLayer(layer); + }); +}; +// see generateAnyGeoFilter in CQLUtils.ts for types +var getGeoType = function (geo) { + switch (geo.properties.shape) { + case 'Line': + return 'LINE'; + case 'Point': + return 'POINT'; + case 'Point Radius': + return 'POINTRADIUS'; + default: + return 'POLYGON'; + } +}; +var createPolygonModel = function (geo) { + var _a; + // Ignore Z coordinate if exists + var polygon = geo.geometry.coordinates[0].map(function (position) { + return position.length > 2 ? position.slice(0, 2) : position; + }); + return { + polygon: Common.wrapMapCoordinatesArray(polygon).map(function (coords) { + return coords.map(function (coord) { return Number(coord.toFixed(6)); }); + }), + polygonBufferWidth: ((_a = geo.properties.buffer) === null || _a === void 0 ? void 0 : _a.toString()) || '0', + polygonBufferUnits: geo.properties.bufferUnit, + }; +}; +var createLineStringModel = function (geo) { + var _a; + // Ignore Z coordinate if exists + var line = geo.geometry.coordinates.map(function (position) { + return position.length > 2 ? position.slice(0, 2) : position; + }); + return { + line: Common.wrapMapCoordinatesArray(line).map(function (coords) { + return coords.map(function (coord) { return Number(coord.toFixed(6)); }); + }), + lineWidth: ((_a = geo.properties.buffer) === null || _a === void 0 ? void 0 : _a.toString()) || '0', + lineUnits: geo.properties.bufferUnit, + }; +}; +var createPointRadiusModel = function (geo) { + var _a; + var wrapped = Common.wrapMapCoordinatesArray([ + geo.geometry.coordinates, + ]); + return { + lon: Number(wrapped[0][0].toFixed(6)), + lat: Number(wrapped[0][1].toFixed(6)), + radius: ((_a = geo.properties.buffer) === null || _a === void 0 ? void 0 : _a.toString()) || '1', + radiusUnits: geo.properties.bufferUnit, + }; +}; +var createBoundingBoxModel = function (geo) { + // bbox order: west, south, east, north + var wrapped = Common.wrapMapCoordinatesArray([ + [geo.bbox[0], geo.bbox[1]], + [geo.bbox[2], geo.bbox[3]], + ]); + var west = Number(wrapped[0][0].toFixed(6)); + var south = Number(wrapped[0][1].toFixed(6)); + var east = Number(wrapped[1][0].toFixed(6)); + var north = Number(wrapped[1][1].toFixed(6)); + return { + west: west, + mapWest: west, + south: south, + mapSouth: south, + east: east, + mapEast: east, + north: north, + mapNorth: north, + }; +}; +var createGeoModel = function (geo) { + switch (geo.properties.shape) { + case 'Polygon': + return createPolygonModel(geo); + case 'Line': + return createLineStringModel(geo); + case 'Point': + case 'Point Radius': + return createPointRadiusModel(geo); + case 'Bounding Box': + return createBoundingBoxModel(geo); + default: + return {}; + } +}; +var createDefaultPolygon = function (buffer, bufferUnit, color) { + return { + type: 'Feature', + properties: { + id: '', + color: color, + shape: 'Polygon', + buffer: buffer, + bufferUnit: bufferUnit, + }, + geometry: { + type: 'Polygon', + coordinates: [[]], + }, + bbox: [0, 0, 0, 0], + }; +}; +var modelToPolygon = function (model) { + var _a; + var coords = model.get('polygon'); + var polygonBufferWidth = Number(model.get('polygonBufferWidth')); + var buffer = Number.isNaN(polygonBufferWidth) ? 0 : polygonBufferWidth; + var bufferUnit = model.get('polygonBufferUnits') || undefined; + if (coords === undefined || + ((_a = validateGeo('polygon', JSON.stringify(coords))) === null || _a === void 0 ? void 0 : _a.error)) { + return createDefaultPolygon(buffer, bufferUnit, DRAWING_COLOR); + } + var isMultiPolygon = ShapeUtils.isArray3D(coords); + var polygon = isMultiPolygon ? coords : [coords]; + return makeGeometry(v4(), Turf.polygon(polygon).geometry, DRAWING_COLOR, 'Polygon', Number.isNaN(buffer) ? 0 : buffer, bufferUnit); +}; +var modelToLine = function (model) { + var _a; + var lineWidth = Number(model.get('lineWidth')); + var buffer = Number.isNaN(lineWidth) ? 0 : lineWidth; + var bufferUnit = model.get('lineUnits') || 'meters'; + var coords = model.get('line'); + if (coords === undefined || + ((_a = validateGeo('line', JSON.stringify(coords))) === null || _a === void 0 ? void 0 : _a.error)) { + coords = []; + } + return makeLineGeo(v4(), coords, buffer, bufferUnit); +}; +var modelToPointRadius = function (model) { + var lon = model.get('lon'); + var lat = model.get('lat'); + if (lon === undefined || lat === undefined) { + return null; + } + var radius = Number(model.get('radius')); + var radiusUnits = model.get('radiusUnits'); + return makePointRadiusGeo(v4(), lat, lon, Number.isNaN(radius) ? 1 : radius, radiusUnits || 'meters'); +}; +var isAnyNaN = function (numbers) { + return numbers.some(function (n) { return n === undefined || n === null || Number.isNaN(n); }); +}; +var modelToBoundingBox = function (model) { + var west = model.get('west'); + var south = model.get('south'); + var east = model.get('east'); + var north = model.get('north'); + if (isAnyNaN([west, south, east, north])) { + return null; + } + return makeBBoxGeo(v4(), [west, south, east, north]); +}; +export var getDrawingGeometryFromModel = function (model) { + var _a; + var mode = model.get('mode'); + var geo; + switch (mode) { + case 'bbox': + geo = modelToBoundingBox(model); + break; + case 'circle': + geo = modelToPointRadius(model); + break; + case 'line': + geo = modelToLine(model); + break; + case 'poly': + geo = modelToPolygon(model); + break; + default: + return null; + } + if (geo) { + utility.adjustGeoCoords(geo); + if ((_a = geo.properties) === null || _a === void 0 ? void 0 : _a.color) { + geo.properties.color = contrastingColor; + } + } + return geo; +}; +export var convertToModel = function (_a) { + var _b, _c; + var geo = _a.geo, shape = _a.shape, existingModel = _a.existingModel; + var properties = __assign(__assign({}, createGeoModel(geo)), { type: getGeoType(geo), mode: getDrawModeFromShape(shape) }); + // if the model is being updated, we want to keep the id, otherwise use the geo properties id to recreate the model + if (!existingModel) { + properties.id = geo.properties.id; + } + // geo.properties?.color will have a value when in drawing mode, + // but we dont want to render the drawing's contrastingColor after saving. + // So, we only want to set the default if no color is already set + if (((_b = geo.properties) === null || _b === void 0 ? void 0 : _b.color) !== contrastingColor) { + properties.color = ((_c = geo.properties) === null || _c === void 0 ? void 0 : _c.color) || Object.values(locationColors)[0]; + } + return properties; +}; +// This is not a piece of state because the geospatialdraw +// library rerenders bounding boxes unnecessarily +// If this was state, the resulting rerenders would +// break bounding boxes in the updateGeo method +var drawingLocation = makeEmptyGeometry(v4(), DEFAULT_SHAPE); +var preserveBuffer = function (drawingModel, drawingLocation, drawingShape) { + var updatedDrawingLocation = drawingLocation; + if (drawingShape === 'Line') { + var lineWidth = drawingModel.get('lineWidth'); + var lineUnits = drawingModel.get('lineUnits'); + if (lineWidth) { + updatedDrawingLocation.properties.buffer = lineWidth; + } + if (lineUnits) { + updatedDrawingLocation.properties.bufferUnit = lineUnits; + } + } + if (drawingShape === 'Polygon') { + var polygonWidth = drawingModel.get('polygonBufferWidth'); + var polygonUnits = drawingModel.get('polygonBufferUnits'); + if (polygonWidth) { + updatedDrawingLocation.properties.buffer = polygonWidth; + } + if (polygonUnits) { + updatedDrawingLocation.properties.bufferUnit = polygonUnits; + } + } + return updatedDrawingLocation; +}; +export var OpenlayersDrawings = function (_a) { + var map = _a.map, selectionInterface = _a.selectionInterface; + var _b = useDrawingAndDisplayModels({ + selectionInterface: selectionInterface, + map: map, + }), models = _b.models, filterModels = _b.filterModels, drawingModels = _b.drawingModels; + var _c = __read(drawingModels.length > 0 ? drawingModels.slice(-1) : [undefined], 1), drawingModel = _c[0]; + var _d = __read(useState(false), 2), isDrawing = _d[0], setIsDrawing = _d[1]; + var _e = __read(useState(DEFAULT_SHAPE), 2), drawingShape = _e[0], setDrawingShape = _e[1]; + var _f = __read(useState(null), 2), drawingGeometry = _f[0], setDrawingGeometry = _f[1]; + var _g = __read(useState(), 2), updatedBuffer = _g[0], setUpdatedBuffer = _g[1]; + var _h = __read(useState(), 2), updatedBufferUnit = _h[0], setUpdatedBufferUnit = _h[1]; + var _j = React.useContext(InteractionsContext), interactiveGeo = _j.interactiveGeo, translation = _j.translation, setInteractiveModels = _j.setInteractiveModels; + var nonDrawingModels = models.concat(filterModels); + useEffect(function () { + var models = nonDrawingModels.filter(function (model) { return model.get('locationId') === interactiveGeo; }); + setInteractiveModels(models); + }, [interactiveGeo, models, filterModels]); + var handleKeydown = React.useCallback(function (e) { + if (e.key === 'Enter') { + e.preventDefault(); + if (drawingLocation) + finishDrawing(); + } + if (e.key === 'Escape') { + cancelDrawing(); + } + }, [drawingModel, drawingShape, drawingLocation]); + useEffect(function () { + setIsDrawing(!!drawingModel); + if (drawingModel) { + window.addEventListener('keydown', handleKeydown); + setDrawingShape(getShapeFromDrawMode(getDrawModeFromModel({ model: drawingModel }))); + setDrawingGeometry(getDrawingGeometryFromModel(drawingModel)); + } + else { + window.removeEventListener('keydown', handleKeydown); + } + return function () { return window.removeEventListener('keydown', handleKeydown); }; + }, [drawingModel]); + var lineBufferChangedCallback = React.useCallback(function () { + setUpdatedBuffer(drawingModel.attributes.lineWidth); + setUpdatedBufferUnit(drawingModel.attributes.lineUnits); + }, [drawingModel]); + useListenTo(drawingModel, 'change:lineWidth change:lineUnits', lineBufferChangedCallback); + var polygonBufferChangedCallback = React.useCallback(function () { + setUpdatedBuffer(drawingModel.attributes.polygonBufferWidth); + setUpdatedBufferUnit(drawingModel.attributes.polygonBufferUnits); + }, [drawingModel]); + useListenTo(drawingModel, 'change:polygonBufferWidth change:polygonBufferUnits', polygonBufferChangedCallback); + var cancelDrawing = function () { + drawingModel.set('drawing', false); + // the listener for this calls Drawing.turnOffDrawing() + wreqr.vent.trigger('search:drawcancel', drawingModel); + setIsDrawing(false); + setDrawingShape(DEFAULT_SHAPE); + setDrawingGeometry(null); + setUpdatedBuffer(undefined); + drawingLocation = null; + }; + // called when the user clicks apply during geo drawing + var finishDrawing = function () { + if (drawingLocation === null) { + cancelDrawing(); + return; + } + wreqr.vent.trigger("search:".concat(getDrawModeFromShape(drawingShape), "-end"), drawingModel); + wreqr.vent.trigger("search:drawend", drawingModel); + drawingModel.set('drawing', false); + // preserve buffer set by user + var updatedDrawingLocation = preserveBuffer(drawingModel, drawingLocation, drawingShape); + drawingModel.set(convertToModel({ + geo: updatedDrawingLocation, + shape: drawingShape, + existingModel: drawingModel, + })); + setIsDrawing(false); + setDrawingGeometry(updatedDrawingLocation); + drawingLocation = null; + }; + // called during drawing at random intervals + var updateGeo = function (geo) { + drawingLocation = geo; + }; + return (React.createElement(React.Fragment, null, + nonDrawingModels.map(function (model) { + var drawMode = getDrawModeFromModel({ model: model }); + var isInteractive = model.get('locationId') === interactiveGeo; + var shapeTranslation = translation && isInteractive ? translation : undefined; + switch (drawMode) { + case 'bbox': + return (React.createElement(OpenlayersBboxDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + case 'circle': + return (React.createElement(OpenlayersCircleDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + case 'line': + return (React.createElement(OpenlayersLineDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + case 'poly': + return (React.createElement(OpenlayersPolygonDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + default: + return (React.createElement(OpenlayersPolygonDisplay, { key: model.cid, model: model, map: map, isInteractive: isInteractive, translation: shapeTranslation })); + } + }), + drawingModel && (React.createElement(Editor, { "data-id": "map-draw-menu" }, + React.createElement(DrawingMenu, { shape: drawingShape, map: map.getMap(), isActive: isDrawing, geometry: isDrawing ? drawingGeometry : null, updatedBuffer: updatedBuffer, updatedBufferUnit: updatedBufferUnit, onCancel: cancelDrawing, onOk: finishDrawing, onSetShape: function () { }, disabledShapes: SHAPES.filter(function (shape) { return shape !== drawingShape; }), onUpdate: updateGeo, saveAndContinue: false, mapStyle: DRAWING_STYLE }))))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2luZy1hbmQtZGlzcGxheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL29wZW5sYXllcnMvZHJhd2luZy1hbmQtZGlzcGxheS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDM0MsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUN6QixPQUFPLEVBQ0wsb0JBQW9CLEVBQ3BCLG9CQUFvQixFQUNwQixvQkFBb0Is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BlVHJhbnNsYXRpb24gPVxuICAgICAgICAgIHRyYW5zbGF0aW9uICYmIGlzSW50ZXJhY3RpdmUgPyB0cmFuc2xhdGlvbiA6IHVuZGVmaW5lZFxuICAgICAgICBzd2l0Y2ggKGRyYXdNb2RlKSB7XG4gICAgICAgICAgY2FzZSAnYmJveCc6XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICA8T3BlbmxheWVyc0Jib3hEaXNwbGF5XG4gICAgICAgICAgICAgICAga2V5PXttb2RlbC5jaWR9XG4gICAgICAgICAgICAgICAgbW9kZWw9e21vZGVsfVxuICAgICAgICAgICAgICAgIG1hcD17bWFwfVxuICAgICAgICAgICAgICAgIGlzSW50ZXJhY3RpdmU9e2lzSW50ZXJhY3RpdmV9XG4gICAgICAgICAgICAgICAgdHJhbnNsYXRpb249e3NoYXBlVHJhbnNsYXRpb259XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgY2FzZSAnY2lyY2xlJzpcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIDxPcGVubGF5ZXJzQ2lyY2xlRGlzcGxheVxuICAgICAgICAgICAgICAgIGtleT17bW9kZWwuY2lkfVxuICAgICAgICAgICAgICAgIG1vZGVsPXttb2RlbH1cbiAgICAgICAgICAgICAgICBtYXA9e21hcH1cbiAgICAgICAgICAgICAgICBpc0ludGVyYWN0aXZlPXtpc0ludGVyYWN0aXZlfVxuICAgICAgICAgICAgICAgIHRyYW5zbGF0aW9uPXtzaGFwZVRyYW5zbGF0aW9ufVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKVxuICAgICAgICAgIGNhc2UgJ2xpbmUnOlxuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPE9wZW5sYXllcnNMaW5lRGlzcGxheVxuICAgICAgICAgICAgICAgIGtleT17bW9kZWwuY2lkfVxuICAgICAgICAgICAgICAgIG1vZGVsPXttb2RlbH1cbiAgICAgICAgICAgICAgICBtYXA9e21hcH1cbiAgICAgICAgICAgICAgICBpc0ludGVyYWN0aXZlPXtpc0ludGVyYWN0aXZlfVxuICAgICAgICAgICAgICAgIHRyYW5zbGF0aW9uPXtzaGFwZVRyYW5zbGF0aW9ufVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKVxuICAgICAgICAgIGNhc2UgJ3BvbHknOlxuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPE9wZW5sYXllcnNQb2x5Z29uRGlzcGxheVxuICAgICAgICAgICAgICAgIGtleT17bW9kZWwuY2lkfVxuICAgICAgICAgICAgICAgIG1vZGVsPXttb2RlbH1cbiAgICAgICAgICAgICAgICBtYXA9e21hcH1cbiAgICAgICAgICAgICAgICBpc0ludGVyYWN0aXZlPXtpc0ludGVyYWN0aXZlfVxuICAgICAgICAgICAgICAgIHRyYW5zbGF0aW9uPXtzaGFwZVRyYW5zbGF0aW9ufVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKVxuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICA8T3BlbmxheWVyc1BvbHlnb25EaXNwbGF5XG4gICAgICAgICAgICAgICAga2V5PXttb2RlbC5jaWR9XG4gICAgICAgICAgICAgICAgbW9kZWw9e21vZGVsfVxuICAgICAgICAgICAgICAgIG1hcD17bWFwfVxuICAgICAgICAgICAgICAgIGlzSW50ZXJhY3RpdmU9e2lzSW50ZXJhY3RpdmV9XG4gICAgICAgICAgICAgICAgdHJhbnNsYXRpb249e3NoYXBlVHJhbnNsYXRpb259XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgIH0pfVxuICAgICAge2RyYXdpbmdNb2RlbCAmJiAoXG4gICAgICAgIDxFZGl0b3IgZGF0YS1pZD1cIm1hcC1kcmF3LW1lbnVcIj5cbiAgICAgICAgICA8RHJhd2luZ01lbnVcbiAgICAgICAgICAgIHNoYXBlPXtkcmF3aW5nU2hhcGV9XG4gICAgICAgICAgICBtYXA9e21hcC5nZXRNYXAoKX1cbiAgICAgICAgICAgIGlzQWN0aXZlPXtpc0RyYXdpbmd9XG4gICAgICAgICAgICBnZW9tZXRyeT17aXNEcmF3aW5nID8gZHJhd2luZ0dlb21ldHJ5IDogbnVsbH1cbiAgICAgICAgICAgIHVwZGF0ZWRCdWZmZXI9e3VwZGF0ZWRCdWZmZXJ9XG4gICAgICAgICAgICB1cGRhdGVkQnVmZmVyVW5pdD17dXBkYXRlZEJ1ZmZlclVuaXR9XG4gICAgICAgICAgICBvbkNhbmNlbD17Y2FuY2VsRHJhd2luZ31cbiAgICAgICAgICAgIG9uT2s9e2ZpbmlzaERyYXdpbmd9XG4gICAgICAgICAgICBvblNldFNoYXBlPXsoKSA9PiB7fX1cbiAgICAgICAgICAgIGRpc2FibGVkU2hhcGVzPXtTSEFQRVMuZmlsdGVyKChzaGFwZSkgPT4gc2hhcGUgIT09IGRyYXdpbmdTaGFwZSl9XG4gICAgICAgICAgICBvblVwZGF0ZT17dXBkYXRlR2VvfVxuICAgICAgICAgICAgc2F2ZUFuZENvbnRpbnVlPXtmYWxzZX1cbiAgICAgICAgICAgIG1hcFN0eWxlPXtEUkFXSU5HX1NUWUxFfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvRWRpdG9yPlxuICAgICAgKX1cbiAgICA8Lz5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/line-display.d.ts b/src/main/webapp/component/visualization/maps/openlayers/line-display.d.ts new file mode 100644 index 00000000000..2e7b0d602df --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/line-display.d.ts @@ -0,0 +1,22 @@ +/// +import ol from 'openlayers'; +import { Translation } from '../interactions.provider'; +type CoordinateType = [number, number]; +type CoordinatesType = Array; +export declare function translateFromOpenlayersCoordinates(coords: CoordinatesType): CoordinatesType; +export declare function translateToOpenlayersCoordinates(coords: CoordinatesType): CoordinatesType; +export declare const drawLine: ({ map, model, line, id, isInteractive, translation, }: { + map: any; + model: any; + line: ol.geom.LineString; + id: string; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => void; +export declare const OpenlayersLineDisplay: ({ map, model, isInteractive, translation, }: { + map: any; + model: any; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => JSX.Element; +export {}; diff --git a/src/main/webapp/component/visualization/maps/openlayers/line-display.js b/src/main/webapp/component/visualization/maps/openlayers/line-display.js new file mode 100644 index 00000000000..5f748a21f72 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/line-display.js @@ -0,0 +1,181 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import DistanceUtils from '../../../../js/DistanceUtils'; +import ol from 'openlayers'; +import _ from 'underscore'; +import * as Turf from '@turf/turf'; +import { validateGeo } from '../../../../react-component/utils/validation'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { removeOldDrawing } from './drawing-and-display'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import { StartupDataStore } from '../../../../js/model/Startup/startup'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +export function translateFromOpenlayersCoordinates(coords) { + var coordinates = []; + coords.forEach(function (point) { + point = ol.proj.transform([ + DistanceUtils.coordinateRound(point[0]), + DistanceUtils.coordinateRound(point[1]), + ], StartupDataStore.Configuration.getProjection(), 'EPSG:4326'); + if (point[1] > 90) { + point[1] = 89.9; + } + else if (point[1] < -90) { + point[1] = -89.9; + } + coordinates.push(point); + }); + return coordinates; +} +export function translateToOpenlayersCoordinates(coords) { + var coordinates = []; + coords.forEach(function (item) { + if (item[0].constructor === Array) { + coordinates.push(translateToOpenlayersCoordinates(item)); + } + else { + coordinates.push(ol.proj.transform([item[0], item[1]], 'EPSG:4326', StartupDataStore.Configuration.getProjection())); + } + }); + return coordinates; +} +var modelToLineString = function (model) { + var line = model.get('line'); + var setArr = _.uniq(line); + if (setArr.length < 2) { + return; + } + return new ol.geom.LineString(translateToOpenlayersCoordinates(setArr)); +}; +var adjustLinePoints = function (line) { + var extent = line.getExtent(); + var lon1 = extent[0]; + var lon2 = extent[2]; + var width = Math.abs(lon2 - lon1); + if (width > 180) { + var adjusted = line.getCoordinates(); + adjusted.forEach(function (coord) { + if (coord[0] < 0) { + coord[0] += 360; + } + }); + line.setCoordinates(adjusted); + } +}; +var adjustMultiLinePoints = function (lines) { + var adjusted = []; + lines.getLineStrings().forEach(function (line) { + adjustLinePoints(line); + adjusted.push(line.getCoordinates()); + }); + lines.setCoordinates(adjusted); +}; +export var drawLine = function (_a) { + var map = _a.map, model = _a.model, line = _a.line, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + if (!line) { + // Handles case where model changes to empty vars and we don't want to draw anymore + return; + } + var lineWidth = DistanceUtils.getDistanceInMeters(model.get('lineWidth'), model.get('lineUnits')) || 1; + if (translation) { + line.translate(translation.longitude, translation.latitude); + } + adjustLinePoints(line); + var turfLine = Turf.lineString(translateFromOpenlayersCoordinates(line.getCoordinates())); + var bufferedLine = Turf.buffer(turfLine, lineWidth, { units: 'meters' }); + var geometryRepresentation = new ol.geom.MultiLineString(translateToOpenlayersCoordinates(bufferedLine.geometry.coordinates)); + var drawnGeometryRepresentation = new ol.geom.LineString(translateToOpenlayersCoordinates(turfLine.geometry.coordinates)); + // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments + adjustMultiLinePoints(geometryRepresentation); + var billboard = new ol.Feature({ + geometry: geometryRepresentation, + }); + billboard.setId(id); + billboard.set('locationId', model.get('locationId')); + var drawnLineFeature = new ol.Feature({ + geometry: drawnGeometryRepresentation, + }); + var color = model.get('color'); + var iconStyle = new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: isInteractive ? contrastingColor : color ? color : '#914500', + width: isInteractive ? 6 : 4, + }), + }); + var drawnLineIconStyle = new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: isInteractive ? contrastingColor : color ? color : '#914500', + width: 2, + lineDash: [10, 5], + }), + }); + billboard.setStyle(iconStyle); + drawnLineFeature.setStyle(drawnLineIconStyle); + var vectorSource = new ol.source.Vector({ + features: [billboard, drawnLineFeature], + }); + var vectorLayer = new ol.layer.Vector({ + source: vectorSource, + }); + vectorLayer.set('id', id); + var mapRef = map.getMap(); + removeOldDrawing({ map: mapRef, id: id }); + map.getMap().addLayer(vectorLayer); +}; +var updatePrimitive = function (_a) { + var _b; + var map = _a.map, model = _a.model, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + var line = modelToLineString(model); + // Make sure the current model has width and height before drawing + if (line !== undefined && + !((_b = validateGeo('line', JSON.stringify(line.getCoordinates()))) === null || _b === void 0 ? void 0 : _b.error)) { + drawLine({ map: map, model: model, line: line, id: id, isInteractive: isInteractive, translation: translation }); + } +}; +var useListenToLineModel = function (_a) { + var model = _a.model, map = _a.map, isInteractive = _a.isInteractive, translation = _a.translation; + var callback = React.useMemo(function () { + return function () { + if (model && map) { + updatePrimitive({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + isInteractive: isInteractive, + translation: translation, + }); + } + }; + }, [model, map, isInteractive, translation]); + useListenTo(model, 'change:line change:lineWidth change:lineUnits', callback); + callback(); +}; +export var OpenlayersLineDisplay = function (_a) { + var map = _a.map, model = _a.model, isInteractive = _a.isInteractive, translation = _a.translation; + useListenToLineModel({ map: map, model: model, isInteractive: isInteractive, translation: translation }); + React.useEffect(function () { + return function () { + if (map && model) { + removeOldDrawing({ + map: map.getMap(), + id: getIdFromModelForDisplay({ model: model }), + }); + } + };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FjdGl2ZSxcbiAgICAgICAgICB0cmFuc2xhdGlvbixcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICB9XG4gIH0sIFttb2RlbCwgbWFwLCBpc0ludGVyYWN0aXZlLCB0cmFuc2xhdGlvbl0pXG4gIHVzZUxpc3RlblRvKG1vZGVsLCAnY2hhbmdlOmxpbmUgY2hhbmdlOmxpbmVXaWR0aCBjaGFuZ2U6bGluZVVuaXRzJywgY2FsbGJhY2spXG4gIGNhbGxiYWNrKClcbn1cbmV4cG9ydCBjb25zdCBPcGVubGF5ZXJzTGluZURpc3BsYXkgPSAoe1xuICBtYXAsXG4gIG1vZGVsLFxuICBpc0ludGVyYWN0aXZlLFxuICB0cmFuc2xhdGlvbixcbn06IHtcbiAgbWFwOiBhbnlcbiAgbW9kZWw6IGFueVxuICBpc0ludGVyYWN0aXZlPzogYm9vbGVhblxuICB0cmFuc2xhdGlvbj86IFRyYW5zbGF0aW9uXG59KSA9PiB7XG4gIHVzZUxpc3RlblRvTGluZU1vZGVsKHsgbWFwLCBtb2RlbCwgaXNJbnRlcmFjdGl2ZSwgdHJhbnNsYXRpb24gfSlcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgaWYgKG1hcCAmJiBtb2RlbCkge1xuICAgICAgICByZW1vdmVPbGREcmF3aW5nKHtcbiAgICAgICAgICBtYXA6IG1hcC5nZXRNYXAoKSxcbiAgICAgICAgICBpZDogZ2V0SWRGcm9tTW9kZWxGb3JEaXNwbGF5KHsgbW9kZWwgfSksXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgfVxuICB9LCBbbWFwLCBtb2RlbF0pXG4gIHJldHVybiA8PjwvPlxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.d.ts b/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.d.ts new file mode 100644 index 00000000000..76e58fa5bc2 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.d.ts @@ -0,0 +1,83 @@ +import Openlayers from 'openlayers'; +import { ClusterType } from '../react/geometries'; +import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult'; +export default function (insertionElement: any, _selectionInterface: any, _notificationEl: any, _componentElement: any, mapModel: any, mapLayers: any): { + onMouseTrackingForGeoDrag({ moveFrom, down, move, up, }: { + moveFrom?: any; + down: any; + move: any; + up: any; + }): void; + clearMouseTrackingForGeoDrag(): void; + onLeftClickMapAPI(callback: any): void; + clearLeftClickMapAPI(): void; + onLeftClick(callback: any): void; + onRightClick(callback: any): void; + clearRightClick(): void; + onDoubleClick(): void; + clearDoubleClick(): void; + onMouseTrackingForPopup(downCallback: any, moveCallback: any, upCallback: any): void; + onMouseMove(callback: any): void; + clearMouseMove(): void; + timeoutIds: number[]; + onCameraMoveStart(callback: any): void; + offCameraMoveStart(callback: any): void; + onCameraMoveEnd(callback: any): void; + offCameraMoveEnd(callback: any): void; + doPanZoom(coords: [number, number][]): void; + panZoomOut(_opts: any, next: any): void; + panToResults(results: any): void; + panToExtent(coords: [number, number][]): void; + getExtentOfIds(ids: string[]): Openlayers.Extent; + zoomToIds({ ids, duration }: { + ids: string[]; + duration?: number | undefined; + }): void; + panToShapesExtent({ duration }?: { + duration?: number | undefined; + }): void; + getShapes(): any; + zoomToExtent(coords: [number, number][], opts?: {}): void; + zoomToBoundingBox({ north, east, south, west }: any): void; + limit(value: any, min: any, max: any): number; + getBoundingBox(): { + north: number; + east: number; + south: number; + west: number; + }; + overlayImage(model: LazyQueryResult): void; + removeOverlay(metacardId: any): void; + removeAllOverlays(): void; + getCartographicCenterOfClusterInDegrees(cluster: ClusterType): Openlayers.Coordinate; + getWindowLocationsOfResults(results: any): any; + calculateDistanceBetweenPositions(coords: any): number; + addRulerPoint(coordinates: any, markerLabel: any): Openlayers.layer.Vector; + removeRulerPoint(pointLayer: any): void; + rulerLine: Openlayers.layer.Vector | null; + addRulerLine(point: any): Openlayers.layer.Vector; + setRulerLine(point: any): void; + removeRulerLine(): void; + addPointWithText(point: any, options: any): Openlayers.layer.Vector; + addPoint(point: any, options: any): Openlayers.layer.Vector; + addLabel(point: any, options: any): Openlayers.layer.Vector; + addLine(line: any, options: any): Openlayers.layer.Vector; + addPolygon(): void; + updateCluster(geometry: any, options: any): void; + updateGeometry(geometry: any, options: any): void; + setGeometryStyle(geometry: any, options: any, feature: any): void; + createTextStyle(feature: any, resolution: any): Openlayers.style.Text; + getText(feature: any, resolution: any): any; + trunc(str: any, n: any): any; + hideGeometry(geometry: any): void; + showGeometry(geometry: any): void; + removeGeometry(geometry: any): void; + showMultiLineShape(locationModel: any): Openlayers.layer.Vector | undefined; + createVectorLayer(locationModel: any, feature: any): Openlayers.layer.Vector; + destroyShape(cid: any): void; + destroyShapes(): void; + getMap(): any; + zoomIn(): void; + zoomOut(): void; + destroy(): void; +}; diff --git a/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.js b/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.js new file mode 100644 index 00000000000..c45acd25e4b --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.js @@ -0,0 +1,998 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* global require, window */ +import wrapNum from '../../../../react-component/utils/wrap-num/wrap-num'; +import $ from 'jquery'; +import _ from 'underscore'; +import utility from './utility'; +import DrawingUtility from '../DrawingUtility'; +import Openlayers from 'openlayers'; +import { OpenlayersLayers } from '../../../../js/controllers/openlayers.layers'; +import wreqr from '../../../../js/wreqr'; +import { validateGeo } from '../../../../react-component/utils/validation'; +import { StartupDataStore } from '../../../../js/model/Startup/startup'; +import _debounce from 'lodash.debounce'; +var defaultColor = '#3c6dd5'; +var rulerColor = '#506f85'; +function createMap(insertionElement, mapLayers) { + var layerCollectionController = new OpenlayersLayers({ + collection: mapLayers, + }); + var map = layerCollectionController.makeMap({ + zoom: 2.7, + minZoom: 2.3, + center: [0, 0], + element: insertionElement, + }); + return map; +} +function determineIdFromPosition(position, map) { + var features = []; + map.forEachFeatureAtPixel(position, function (feature) { + features.push(feature); + }); + if (features.length > 0) { + return features[0].getId(); + } +} +function determineIdsFromPosition(position, map) { + var features = []; + var id, locationId; + map.forEachFeatureAtPixel(position, function (feature) { + features.push(feature); + }); + if (features.length > 0) { + id = features[0].getId(); + locationId = features[0].get('locationId'); + } + return { id: id, locationId: locationId }; +} +function convertPointCoordinate(point) { + var coords = [point[0], point[1]]; + return Openlayers.proj.transform(coords, 'EPSG:4326', StartupDataStore.Configuration.getProjection()); +} +function unconvertPointCoordinate(point) { + return Openlayers.proj.transform(point, StartupDataStore.Configuration.getProjection(), 'EPSG:4326'); +} +// @ts-expect-error ts-migrate(6133) FIXME: 'longitude' is declared but its value is never rea... Remove this comment to see the full error message +function offMap(_a) { + var _b = __read(_a, 2), longitude = _b[0], latitude = _b[1]; + return latitude < -90 || latitude > 90; +} +// The extension argument is a function used in panToExtent +// It allows for customization of the way the map pans to results +export default function (insertionElement, _selectionInterface, _notificationEl, _componentElement, mapModel, mapLayers) { + var overlays = {}; + var shapes = []; + var map = createMap(insertionElement, mapLayers); + setupTooltip(map); + function setupTooltip(map) { + map.on('pointermove', function (e) { + var point = unconvertPointCoordinate(e.coordinate); + if (!offMap(point)) { + mapModel.updateMouseCoordinates({ + lat: point[1], + lon: point[0], + }); + } + else { + mapModel.clearMouseCoordinates(); + } + }); + } + function resizeMap() { + map.updateSize(); + } + var debouncedResizeMap = _debounce(resizeMap, 250); + function listenToResize() { + ; + wreqr.vent.on('resize', debouncedResizeMap); + window.addEventListener('resize', debouncedResizeMap); + } + function unlistenToResize() { + ; + wreqr.vent.off('resize', debouncedResizeMap); + window.removeEventListener('resize', debouncedResizeMap); + } + listenToResize(); + /* + * Returns a visible label that is in the same location as the provided label (geometryInstance) if one exists. + * If findSelected is true, the function will also check for hidden labels in the same location but are selected. + */ + function findOverlappingLabel(findSelected, geometryInstance) { + return _.find(mapModel.get('labels'), function (label) { + return label.getSource().getFeatures()[0].getGeometry().getCoordinates()[0] === + geometryInstance.getCoordinates()[0] && + label.getSource().getFeatures()[0].getGeometry().getCoordinates()[1] === + geometryInstance.getCoordinates()[1] && + ((findSelected && label.get('isSelected')) || label.getVisible()); + }); + } + /* + Only shows one label if there are multiple labels in the same location. + + Show the label in the following importance: + - it is selected + - there is no other label displayed at the same location + - it is the label that was found by findOverlappingLabel + + Arguments are: + - the label to show/hide (geometry, feature) + - if the label is selected + - if the search for overlapping label should include hidden selected labels + */ + function showHideLabel(_a) { + var geometry = _a.geometry, feature = _a.feature, _b = _a.findSelected, findSelected = _b === void 0 ? false : _b; + var isSelected = geometry.get('isSelected'); + var geometryInstance = feature.getGeometry(); + var labelWithSamePosition = findOverlappingLabel(findSelected, geometryInstance); + if (isSelected && + labelWithSamePosition && + !labelWithSamePosition.get('isSelected')) { + labelWithSamePosition.setVisible(false); + } + var otherLabelNotSelected = labelWithSamePosition + ? !labelWithSamePosition.get('isSelected') + : true; + var visible = (isSelected && otherLabelNotSelected) || + !labelWithSamePosition || + geometry.get('id') === labelWithSamePosition.get('id'); + geometry.setVisible(visible); + } + /* + Shows a hidden label. Used when deleting a label that is shown. + */ + function showHiddenLabel(geometry) { + if (!geometry.getVisible()) { + return; + } + var geometryInstance = geometry.getSource().getFeatures()[0].getGeometry(); + var hiddenLabel = _.find(mapModel.get('labels'), function (label) { + return label.getSource().getFeatures()[0].getGeometry().getCoordinates()[0] === + geometryInstance.getCoordinates()[0] && + label.getSource().getFeatures()[0].getGeometry().getCoordinates()[1] === + geometryInstance.getCoordinates()[1] && + label.get('id') !== geometry.get('id') && + !label.getVisible(); + }); + if (hiddenLabel) { + hiddenLabel.setVisible(true); + } + } + var geoDragDownListener; + var geoDragMoveListener; + var geoDragUpListener; + var leftClickMapAPIListener; + var exposedMethods = { + onMouseTrackingForGeoDrag: function (_a) { + var moveFrom = _a.moveFrom, down = _a.down, move = _a.move, up = _a.up; + // disable panning of the map + map.getInteractions().forEach(function (interaction) { + if (interaction instanceof Openlayers.interaction.DragPan) { + interaction.setActive(false); + } + }); + // enable dragging individual features + geoDragDownListener = function (event) { + var locationId = determineIdsFromPosition(event.pixel, map).locationId; + var coordinates = map.getCoordinateFromPixel(event.pixel); + var position = { latitude: coordinates[1], longitude: coordinates[0] }; + down({ position: position, mapLocationId: locationId }); + }; + map.on('pointerdown', geoDragDownListener); + geoDragMoveListener = function (event) { + var locationId = determineIdsFromPosition(event.pixel, map).locationId; + var coordinates = map.getCoordinateFromPixel(event.pixel); + var translation = moveFrom + ? { + latitude: coordinates[1] - moveFrom.latitude, + longitude: coordinates[0] - moveFrom.longitude, + } + : null; + move({ translation: translation, mapLocationId: locationId }); + }; + map.on('pointerdrag', geoDragMoveListener); + geoDragUpListener = up; + map.on('pointerup', geoDragUpListener); + }, + clearMouseTrackingForGeoDrag: function () { + // re-enable panning + map.getInteractions().forEach(function (interaction) { + if (interaction instanceof Openlayers.interaction.DragPan) { + interaction.setActive(true); + } + }); + map.un('pointerdown', geoDragDownListener); + map.un('pointerdrag', geoDragMoveListener); + map.un('pointerup', geoDragUpListener); + }, + onLeftClickMapAPI: function (callback) { + leftClickMapAPIListener = function (event) { + var locationId = determineIdsFromPosition(event.pixel, map).locationId; + callback(locationId); + }; + map.on('singleclick', leftClickMapAPIListener); + }, + clearLeftClickMapAPI: function () { + map.un('singleclick', leftClickMapAPIListener); + }, + onLeftClick: function (callback) { + $(map.getTargetElement()).on('click', function (e) { + var boundingRect = map.getTargetElement().getBoundingClientRect(); + callback(e, { + mapTarget: determineIdFromPosition([e.clientX - boundingRect.left, e.clientY - boundingRect.top], map), + }); + }); + }, + onRightClick: function (callback) { + $(map.getTargetElement()).on('contextmenu', function (e) { + callback(e); + }); + }, + clearRightClick: function () { + $(map.getTargetElement()).off('contextmenu'); + }, + onDoubleClick: function () { + $(map.getTargetElement()).on('dblclick', function (e) { + var boundingRect = map.getTargetElement().getBoundingClientRect(); + var locationId = determineIdsFromPosition([e.clientX - boundingRect.left, e.clientY - boundingRect.top], map).locationId; + if (locationId) { + ; + wreqr.vent.trigger('location:doubleClick', locationId); + } + }); + }, + clearDoubleClick: function () { + $(map.getTargetElement()).off('dblclick'); + }, + onMouseTrackingForPopup: function (downCallback, moveCallback, upCallback) { + $(map.getTargetElement()).on('mousedown', function () { + downCallback(); + }); + $(map.getTargetElement()).on('mousemove', function () { + moveCallback(); + }); + this.onLeftClick(upCallback); + }, + onMouseMove: function (callback) { + $(map.getTargetElement()).on('mousemove', function (e) { + var boundingRect = map.getTargetElement().getBoundingClientRect(); + var position = [ + e.clientX - boundingRect.left, + e.clientY - boundingRect.top, + ]; + var locationId = determineIdsFromPosition(position, map).locationId; + callback(e, { + mapTarget: determineIdFromPosition(position, map), + mapLocationId: locationId, + }); + }); + }, + clearMouseMove: function () { + $(map.getTargetElement()).off('mousemove'); + }, + timeoutIds: [], + onCameraMoveStart: function (callback) { + this.timeoutIds.forEach(function (timeoutId) { + window.clearTimeout(timeoutId); + }); + this.timeoutIds = []; + map.addEventListener('movestart', callback); + }, + offCameraMoveStart: function (callback) { + map.removeEventListener('movestart', callback); + }, + onCameraMoveEnd: function (callback) { + var _this = this; + var timeoutCallback = function () { + _this.timeoutIds.push(window.setTimeout(function () { + callback(); + }, 300)); + }; + map.addEventListener('moveend', timeoutCallback); + }, + offCameraMoveEnd: function (callback) { + map.removeEventListener('moveend', callback); + }, + doPanZoom: function (coords) { + var that = this; + that.panZoomOut({ duration: 1000 }, function () { + setTimeout(function () { + that.zoomToExtent(coords, { duration: 2000 }); + }, 0); + }); + }, + panZoomOut: function (_opts, next) { + next(); + }, + panToResults: function (results) { + var coordinates = _.flatten(results.map(function (result) { return result.getPoints('location'); }), true); + this.panToExtent(coordinates); + }, + panToExtent: function (coords) { + if (coords.constructor === Array && coords.length > 0) { + var lineObject = coords.map(function (coordinate) { + return convertPointCoordinate(coordinate); + }); + var extent = Openlayers.extent.boundingExtent(lineObject); + map.getView().fit(extent, { + size: map.getSize(), + maxZoom: map.getView().getZoom(), + duration: 500, + }); + } + }, + getExtentOfIds: function (ids) { + var extent = Openlayers.extent.createEmpty(); + map.getLayers().forEach(function (layer) { + // might need to handle groups later, but no reason to yet + if (layer instanceof Openlayers.layer.Vector && + ids.includes(layer.get('id'))) { + Openlayers.extent.extend(extent, layer.getSource().getExtent()); + } + }); + if (extent[0] === Infinity) { + throw new Error('No extent found for ids'); + } + return extent; + }, + zoomToIds: function (_a) { + var ids = _a.ids, _b = _a.duration, duration = _b === void 0 ? 500 : _b; + map.getView().fit(this.getExtentOfIds(ids), { + duration: duration, + }); + }, + panToShapesExtent: function (_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.duration, duration = _c === void 0 ? 500 : _c; + var extent = Openlayers.extent.createEmpty(); + map.getLayers().forEach(function (layer) { + if (layer instanceof Openlayers.layer.Group) { + layer.getLayers().forEach(function (groupLayer) { + //If this is a vector layer, add it to our extent + if (layer instanceof Openlayers.layer.Vector) + Openlayers.extent.extend(extent, groupLayer.getSource().getExtent()); + }); + } + else if (layer instanceof Openlayers.layer.Vector && + layer.get('id')) { + Openlayers.extent.extend(extent, layer.getSource().getExtent()); + } + }); + if (extent[0] !== Infinity) { + map.getView().fit(extent, { + duration: duration, + }); + } + }, + getShapes: function () { + return shapes; + }, + zoomToExtent: function (coords, opts) { + if (opts === void 0) { opts = {}; } + var lineObject = coords.map(function (coordinate) { + return convertPointCoordinate(coordinate); + }); + var extent = Openlayers.extent.boundingExtent(lineObject); + map.getView().fit(extent, __assign({ size: map.getSize(), maxZoom: map.getView().getZoom(), duration: 500 }, opts)); + }, + zoomToBoundingBox: function (_a) { + var north = _a.north, east = _a.east, south = _a.south, west = _a.west; + this.zoomToExtent([ + [west, south], + [east, north], + ]); + }, + limit: function (value, min, max) { + return Math.min(Math.max(value, min), max); + }, + getBoundingBox: function () { + var extent = map.getView().calculateExtent(map.getSize()); + var longitudeEast = wrapNum(extent[2], -180, 180); + var longitudeWest = wrapNum(extent[0], -180, 180); + //add 360 degrees to longitudeEast to accommodate bounding boxes that span across the anti-meridian + if (longitudeEast < longitudeWest) { + longitudeEast += 360; + } + return { + north: this.limit(extent[3], -90, 90), + east: longitudeEast, + south: this.limit(extent[1], -90, 90), + west: longitudeWest, + }; + }, + overlayImage: function (model) { + var metacardId = model.plain.id; + this.removeOverlay(metacardId); + var coords = model.getPoints('location'); + var array = _.map(coords, function (coord) { return convertPointCoordinate(coord); }); + var polygon = new Openlayers.geom.Polygon([array]); + var extent = polygon.getExtent(); + var projection = Openlayers.proj.get(StartupDataStore.Configuration.getProjection()); + var overlayLayer = new Openlayers.layer.Image({ + source: new Openlayers.source.ImageStatic({ + // @ts-expect-error ts-migrate(2322) FIXME: Type 'string | undefined' is not assignable to typ... Remove this comment to see the full error message + url: model.currentOverlayUrl, + projection: projection, + imageExtent: extent, + }), + }); + map.addLayer(overlayLayer); + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + overlays[metacardId] = overlayLayer; + }, + removeOverlay: function (metacardId) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (overlays[metacardId]) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + map.removeLayer(overlays[metacardId]); + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + delete overlays[metacardId]; + } + }, + removeAllOverlays: function () { + for (var overlay in overlays) { + if (overlays.hasOwnProperty(overlay)) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + map.removeLayer(overlays[overlay]); + } + } + overlays = {}; + }, + getCartographicCenterOfClusterInDegrees: function (cluster) { + return utility.calculateCartographicCenterOfGeometriesInDegrees(cluster.results); + }, + getWindowLocationsOfResults: function (results) { + return results.map(function (result) { + var openlayersCenterOfGeometry = utility.calculateOpenlayersCenterOfGeometry(result); + var center = map.getPixelFromCoordinate(openlayersCenterOfGeometry); + if (center) { + return center; + } + else { + return undefined; + } + }); + }, + /* + * Calculates the distance (in meters) between the two positions in the given array of + * Coordinates. + */ + calculateDistanceBetweenPositions: function (coords) { + var line = new Openlayers.geom.LineString(coords); + var sphereLength = Openlayers.Sphere.getLength(line); + return sphereLength; + }, + /* + * Draws a marker on the map designating a start/end point for the ruler measurement. The given + * coordinates should be an object with 'lat' and 'lon' keys with degrees values. The given + * marker label should be a single character or digit that is displayed on the map marker. + */ + addRulerPoint: function (coordinates, markerLabel) { + var lat = coordinates.lat, lon = coordinates.lon; + var point = [lon, lat]; + var options = { + id: markerLabel, + color: rulerColor, + }; + return this.addPoint(point, options); + }, + /* + * Removes the given point Layer from the map. + */ + removeRulerPoint: function (pointLayer) { + map.removeLayer(pointLayer); + }, + rulerLine: null, + /* + * Draws a line on the map between the points in the given array of point Vectors. + */ + addRulerLine: function (point) { + var options = { + id: 'ruler-line', + title: 'Line for ruler measurement', + color: '#506F85', + }; + var startingCoordinates = mapModel.get('startingCoordinates'); + var linePoints = [ + [startingCoordinates['lon'], startingCoordinates['lat']], + [point['lon'], point['lat']], + ]; + this.rulerLine = this.addLine(linePoints, options); + return this.rulerLine; + }, + /* + * Update the position of the ruler line + */ + setRulerLine: function (point) { + this.removeRulerLine(); + this.addRulerLine(point); + }, + /* + * Removes the given line Layer from the map. + */ + removeRulerLine: function () { + map.removeLayer(this.rulerLine); + }, + /* + Adds a billboard point utilizing the passed in point and options. + Options are a view to relate to, and an id, and a color. + */ + addPointWithText: function (point, options) { + var pointObject = convertPointCoordinate(point); + var feature = new Openlayers.Feature({ + geometry: new Openlayers.geom.Point(pointObject), + }); + var badgeOffset = options.badgeOptions ? 8 : 0; + var imgWidth = 44 + badgeOffset; + var imgHeight = 44 + badgeOffset; + feature.setId(options.id); + feature.unselectedStyle = new Openlayers.style.Style({ + image: new Openlayers.style.Icon({ + img: DrawingUtility.getCircleWithText({ + fillColor: options.color, + text: options.id.length, + badgeOptions: options.badgeOptions, + }), + imgSize: [imgWidth, imgHeight], + }), + }); + feature.partiallySelectedStyle = new Openlayers.style.Style({ + image: new Openlayers.style.Icon({ + img: DrawingUtility.getCircleWithText({ + fillColor: options.color, + text: options.id.length, + strokeColor: 'black', + textColor: 'white', + badgeOptions: options.badgeOptions, + }), + imgSize: [imgWidth, imgHeight], + }), + }); + feature.selectedStyle = new Openlayers.style.Style({ + image: new Openlayers.style.Icon({ + img: DrawingUtility.getCircleWithText({ + fillColor: 'orange', + text: options.id.length, + strokeColor: 'white', + textColor: 'white', + badgeOptions: options.badgeOptions, + }), + imgSize: [imgWidth, imgHeight], + }), + }); + switch (options.isSelected) { + case 'selected': + feature.setStyle(feature.selectedStyle); + break; + case 'partially': + feature.setStyle(feature.partiallySelectedStyle); + break; + case 'unselected': + feature.setStyle(feature.unselectedStyle); + break; + } + var vectorSource = new Openlayers.source.Vector({ + features: [feature], + }); + var vectorLayer = new Openlayers.layer.Vector({ + source: vectorSource, + zIndex: 1, + }); + map.addLayer(vectorLayer); + return vectorLayer; + }, + /* + Adds a billboard point utilizing the passed in point and options. + Options are a view to relate to, and an id, and a color. + */ + addPoint: function (point, options) { + var pointObject = convertPointCoordinate(point); + var feature = new Openlayers.Feature({ + geometry: new Openlayers.geom.Point(pointObject), + name: options.title, + }); + feature.setId(options.id); + var badgeOffset = options.badgeOptions ? 8 : 0; + var x = 39 + badgeOffset, y = 40 + badgeOffset; + if (options.size) { + x = options.size.x; + y = options.size.y; + } + ; + feature.unselectedStyle = new Openlayers.style.Style({ + image: new Openlayers.style.Icon({ + img: DrawingUtility.getPin({ + fillColor: options.color, + icon: options.icon, + badgeOptions: options.badgeOptions, + }), + imgSize: [x, y], + anchor: [x / 2 - badgeOffset / 2, 0], + anchorOrigin: 'bottom-left', + anchorXUnits: 'pixels', + anchorYUnits: 'pixels', + }), + }); + feature.selectedStyle = new Openlayers.style.Style({ + image: new Openlayers.style.Icon({ + img: DrawingUtility.getPin({ + fillColor: 'orange', + icon: options.icon, + badgeOptions: options.badgeOptions, + }), + imgSize: [x, y], + anchor: [x / 2 - badgeOffset / 2, 0], + anchorOrigin: 'bottom-left', + anchorXUnits: 'pixels', + anchorYUnits: 'pixels', + }), + }); + feature.setStyle(options.isSelected + ? feature.selectedStyle + : feature.unselectedStyle); + var vectorSource = new Openlayers.source.Vector({ + features: [feature], + }); + var vectorLayer = new Openlayers.layer.Vector({ + source: vectorSource, + zIndex: 1, + }); + map.addLayer(vectorLayer); + return vectorLayer; + }, + /* + Adds a label utilizing the passed in point and options. + Options are an id and text. + */ + addLabel: function (point, options) { + var pointObject = convertPointCoordinate(point); + var feature = new Openlayers.Feature({ + geometry: new Openlayers.geom.Point(pointObject), + name: options.text, + isLabel: true, + }); + feature.setId(options.id); + feature.setStyle(new Openlayers.style.Style({ + text: new Openlayers.style.Text({ + text: options.text, + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ text: any; overflow: boolean; ... Remove this comment to see the full error message + overflow: true, + }), + })); + var vectorSource = new Openlayers.source.Vector({ + features: [feature], + }); + var vectorLayer = new Openlayers.layer.Vector({ + source: vectorSource, + zIndex: 1, + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ source: Openlayers.source.Vect... Remove this comment to see the full error message + id: options.id, + isSelected: false, + }); + map.addLayer(vectorLayer); + mapModel.addLabel(vectorLayer); + return vectorLayer; + }, + /* + Adds a polyline utilizing the passed in line and options. + Options are a view to relate to, and an id, and a color. + */ + addLine: function (line, options) { + var lineObject = line.map(function (coordinate) { + return convertPointCoordinate(coordinate); + }); + var feature = new Openlayers.Feature({ + geometry: new Openlayers.geom.LineString(lineObject), + name: options.title, + }); + feature.setId(options.id); + var commonStyle = new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: options.color || defaultColor, + width: 4, + }), + }); + feature.unselectedStyle = [ + new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: 'white', + width: 8, + }), + }), + commonStyle, + ]; + feature.selectedStyle = [ + new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: 'black', + width: 8, + }), + }), + commonStyle, + ]; + feature.setStyle(options.isSelected + ? feature.selectedStyle + : feature.unselectedStyle); + var vectorSource = new Openlayers.source.Vector({ + features: [feature], + }); + var vectorLayer = new Openlayers.layer.Vector({ + source: vectorSource, + }); + map.addLayer(vectorLayer); + return vectorLayer; + }, + /* + Adds a polygon fill utilizing the passed in polygon and options. + Options are a view to relate to, and an id. + */ + addPolygon: function () { }, + /* + Updates a passed in geometry to reflect whether or not it is selected. + Options passed in are color and isSelected. + */ + updateCluster: function (geometry, options) { + var _this = this; + if (geometry.constructor === Array) { + geometry.forEach(function (innerGeometry) { + _this.updateCluster(innerGeometry, options); + }); + } + else { + var feature = geometry.getSource().getFeatures()[0]; + var geometryInstance = feature.getGeometry(); + if (geometryInstance.constructor === Openlayers.geom.Point) { + geometry.setZIndex(options.isSelected ? 2 : 1); + switch (options.isSelected) { + case 'selected': + feature.setStyle(feature.selectedStyle); + break; + case 'partially': + feature.setStyle(feature.partiallySelectedStyle); + break; + case 'unselected': + feature.setStyle(feature.unselectedStyle); + break; + } + } + else if (geometryInstance.constructor === Openlayers.geom.LineString) { + var styles = [ + new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: 'rgba(255,255,255, .1)', + width: 8, + }), + }), + new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: 'rgba(0,0,0, .1)', + width: 4, + }), + }), + ]; + feature.setStyle(styles); + } + } + }, + /* + Updates a passed in geometry to reflect whether or not it is selected. + Options passed in are color and isSelected. + */ + updateGeometry: function (geometry, options) { + var _this = this; + if (geometry.constructor === Array) { + geometry.forEach(function (innerGeometry) { + _this.updateGeometry(innerGeometry, options); + }); + } + else { + var feature = geometry.getSource().getFeatures()[0]; + var geometryInstance = feature.getGeometry(); + if (geometryInstance.constructor === Openlayers.geom.Point) { + geometry.setZIndex(options.isSelected ? 2 : 1); + feature.setStyle(options.isSelected ? feature.selectedStyle : feature.unselectedStyle); + } + else if (geometryInstance.constructor === Openlayers.geom.LineString) { + feature.setStyle(options.isSelected ? feature.selectedStyle : feature.unselectedStyle); + } + } + }, + setGeometryStyle: function (geometry, options, feature) { + var geometryInstance = feature.getGeometry(); + if (geometryInstance.getType() === 'Point') { + var pointWidth = 39; + var pointHeight = 40; + if (options.size) { + pointWidth = options.size.x; + pointHeight = options.size.y; + } + geometry.setZIndex(options.isSelected ? 2 : 1); + if (!feature.getProperties().isLabel) { + feature.setStyle(new Openlayers.style.Style({ + image: new Openlayers.style.Icon({ + img: DrawingUtility.getPin({ + fillColor: options.isSelected ? 'orange' : options.color, + strokeColor: 'white', + icon: options.icon, + }), + imgSize: [pointWidth, pointHeight], + anchor: [pointWidth / 2, 0], + anchorOrigin: 'bottom-left', + anchorXUnits: 'pixels', + anchorYUnits: 'pixels', + }), + })); + } + else { + feature.setStyle(new Openlayers.style.Style({ + text: this.createTextStyle(feature, map.getView().getResolution()), + })); + geometry.set('isSelected', options.isSelected); + showHideLabel({ + geometry: geometry, + feature: feature, + }); + } + } + else if (geometryInstance.getType() === 'LineString') { + var styles = [ + new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: 'white', + width: 8, + }), + }), + new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: options.color || defaultColor, + width: 4, + }), + }), + ]; + feature.setStyle(styles); + } + }, + createTextStyle: function (feature, resolution) { + var fillColor = '#000000'; + var outlineColor = '#ffffff'; + var outlineWidth = 3; + return new Openlayers.style.Text({ + text: this.getText(feature, resolution), + fill: new Openlayers.style.Fill({ color: fillColor }), + stroke: new Openlayers.style.Stroke({ + color: outlineColor, + width: outlineWidth, + }), + offsetX: 20, + offsetY: -15, + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ text: any; fill: Openlayers.st... Remove this comment to see the full error message + placement: 'point', + maxAngle: 45, + overflow: true, + rotation: 0, + textAlign: 'left', + padding: [5, 5, 5, 5], + }); + }, + getText: function (feature, resolution) { + var maxResolution = 1200; + var text = resolution > maxResolution ? '' : this.trunc(feature.get('name'), 20); + return text; + }, + trunc: function (str, n) { + return str.length > n ? str.substr(0, n - 1) + '...' : str.substr(0); + }, + /* + Updates a passed in geometry to be hidden + */ + hideGeometry: function (geometry) { + geometry.setVisible(false); + }, + /* + Updates a passed in geometry to be shown + */ + showGeometry: function (geometry) { + var feature = geometry.getSource().getFeatures()[0]; + if (feature.getProperties().isLabel) { + showHideLabel({ + geometry: geometry, + feature: feature, + findSelected: true, + }); + } + else { + geometry.setVisible(true); + } + }, + removeGeometry: function (geometry) { + var feature = geometry.getSource().getFeatures()[0]; + if (feature.getProperties().isLabel) { + mapModel.removeLabel(geometry); + showHiddenLabel(geometry); + } + map.removeLayer(geometry); + }, + showMultiLineShape: function (locationModel) { + var lineObject = locationModel.get('multiline'); + // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + if (validateGeo('multiline', JSON.stringify(lineObject)).error) { + return; + } + lineObject = lineObject.map(function (line) { + return line.map(function (coords) { return convertPointCoordinate(coords); }); + }); + var feature = new Openlayers.Feature({ + geometry: new Openlayers.geom.MultiLineString(lineObject), + }); + feature.setId(locationModel.cid); + var styles = [ + new Openlayers.style.Style({ + stroke: new Openlayers.style.Stroke({ + color: locationModel.get('color') || defaultColor, + width: 4, + }), + }), + ]; + feature.setStyle(styles); + return this.createVectorLayer(locationModel, feature); + }, + createVectorLayer: function (locationModel, feature) { + var vectorSource = new Openlayers.source.Vector({ + features: [feature], + }); + var vectorLayer = new Openlayers.layer.Vector({ + source: vectorSource, + }); + map.addLayer(vectorLayer); + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + overlays[locationModel.cid] = vectorLayer; + return vectorLayer; + }, + destroyShape: function (cid) { + // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'shape' implicitly has an 'any' type. + var shapeIndex = shapes.findIndex(function (shape) { return cid === shape.model.cid; }); + if (shapeIndex >= 0) { + shapes[shapeIndex].destroy(); + shapes.splice(shapeIndex, 1); + } + }, + destroyShapes: function () { + // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'shape' implicitly has an 'any' type. + shapes.forEach(function (shape) { + shape.destroy(); + }); + shapes = []; + }, + getMap: function () { + return map; + }, + zoomIn: function () { + var view = map.getView(); + var zoom = view.getZoom(); + view.setZoom(zoom + 1); + }, + zoomOut: function () { + var view = map.getView(); + var zoom = view.getZoom(); + view.setZoom(zoom - 1); + }, + destroy: function () { + unlistenToResize(); + }, + }; + return exposedMethods; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLm9wZW5sYXllcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9vcGVubGF5ZXJzL21hcC5vcGVubGF5ZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osNEJBQTRCO0FBQzVCLE9BQU8sT0FBTyxNQUFNLHFEQUFxRCxDQUFBO0FBQ3pFLE9BQU8sQ0FBQyxNQUFNLFFBQVEsQ0FBQTtBQUN0QixPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFDMUIsT0FBTyxPQUFPLE1BQU0sV0FBVyxDQUFBO0FBQy9CLE9BQU8sY0FBYyxNQUF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QobWFwLmdldFRhcmdldEVsZW1lbnQoKSkub24oJ2RibGNsaWNrJywgKGUpID0+IHtcbiAgICAgICAgY29uc3QgYm91bmRpbmdSZWN0ID0gbWFwLmdldFRhcmdldEVsZW1lbnQoKS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKVxuICAgICAgICBjb25zdCB7IGxvY2F0aW9uSWQgfSA9IGRldGVybWluZUlkc0Zyb21Qb3NpdGlvbihcbiAgICAgICAgICBbZS5jbGllbnRYIC0gYm91bmRpbmdSZWN0LmxlZnQsIGUuY2xpZW50WSAtIGJvdW5kaW5nUmVjdC50b3BdLFxuICAgICAgICAgIG1hcFxuICAgICAgICApXG4gICAgICAgIGlmIChsb2NhdGlvbklkKSB7XG4gICAgICAgICAgOyh3cmVxciBhcyBhbnkpLnZlbnQudHJpZ2dlcignbG9jYXRpb246ZG91YmxlQ2xpY2snLCBsb2NhdGlvbklkKVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH0sXG4gICAgY2xlYXJEb3VibGVDbGljaygpIHtcbiAgICAgICQobWFwLmdldFRhcmdldEVsZW1lbnQoKSkub2ZmKCdkYmxjbGljaycpXG4gICAgfSxcbiAgICBvbk1vdXNlVHJhY2tpbmdGb3JQb3B1cChcbiAgICAgIGRvd25DYWxsYmFjazogYW55LFxuICAgICAgbW92ZUNhbGxiYWNrOiBhbnksXG4gICAgICB1cENhbGxiYWNrOiBhbnlcbiAgICApIHtcbiAgICAgICQobWFwLmdldFRhcmdldEVsZW1lbnQoKSkub24oJ21vdXNlZG93bicsICgpID0+IHtcbiAgICAgICAgZG93bkNhbGxiYWNrKClcbiAgICAgIH0pXG4gICAgICAkKG1hcC5nZXRUYXJnZXRFbGVtZW50KCkpLm9uKCdtb3VzZW1vdmUnLCAoKSA9PiB7XG4gICAgICAgIG1vdmVDYWxsYmFjaygpXG4gICAgICB9KVxuICAgICAgdGhpcy5vbkxlZnRDbGljayh1cENhbGxiYWNrKVxuICAgIH0sXG4gICAgb25Nb3VzZU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iAgICAgICAgaWYgKFxuICAgICAgICAgIGxheWVyIGluc3RhbmNlb2YgT3BlbmxheWVycy5sYXllci5WZWN0b3IgJiZcbiAgICAgICAgICBpZHMuaW5jbHVkZXMobGF5ZXIuZ2V0KCdpZCcpKVxuICAgICAgICApIHtcbiAgICAgICAgICBPcGVubGF5ZXJzLmV4dGVudC5leHRlbmQoZXh0ZW50LCBsYXllci5nZXRTb3VyY2UoKS5nZXRFeHRlbnQoKSlcbiAgICAgICAgfVxuICAgICAgfSlcbiAgICAgIGlmIChleHRlbnRbMF0gPT09IEluZmluaXR5KSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignTm8gZXh0ZW50IGZvdW5kIGZvciBpZHMnKVxuICAgICAgfVxuICAgICAgcmV0dXJuIGV4dGVudFxuICAgIH0sXG4gICAgem9vbVRvSWRzKHsgaWRzLCBkdXJhdGlvbiA9IDUwMCB9OiB7IGlkczogc3RyaW5nW107IGR1cmF0aW9uPzogbnVtYmVyIH0pIHtcbiAgICAgIG1hcC5nZXRWaWV3KCkuZml0KHRoaXMuZ2V0RXh0ZW50T2ZJZHMoaWRzKSwge1xuICAgICAgICBkdXJhdGlvbixcbiAgICAgIH0pXG4gICAgfSxcbiAgICBwYW5Ub1NoYXBlc0V4dGVudCh7IGR1cmF0aW9uID0gNTAwIH06IHsgZHVyYXRpb24/OiBudW1iZXIgfSA9IHt9KSB7XG4gICAgICB2YXIgZXh0ZW50ID0gT3BlbmxheWVycy5leHRlbnQuY3JlYXRlRW1wdHkoKVxuICAgICAgbWFwLmdldExheWVycygpLmZvckVhY2goKGxheWVyOiBhbnkpID0+IHtcbiAgICAgICAgaWYgKGxheWVyIGluc3RhbmNlb2YgT3BlbmxheWVycy5sYXllci5Hcm91cCkge1xuICAgICAgICAgIGxheWVyLmdldExheWVycygpLmZvckVhY2goZnVuY3Rpb24gKGdyb3VwTGF5ZXIpIHtcbiAgICAgICAgICAgIC8vSWYgdGhpcyBpcyBhIHZlY3RvciBsYXllciwgYWRkIGl0IHRvIG91ciBleHRlbnRcbiAgICAgICAgICAgIGlmIChsYXllciBpbnN0YW5jZW9mIE9wZW5sYXllcnMubGF5ZXIuVmVjdG9yKVxuICAgICAgICAgICAgICBPcGVubGF5ZXJzLmV4dGVudC5leHRlbmQoXG4gICAgICAgICAgICAgICAgZXh0ZW50LFxuICAgICAgICAgICAgICAgIChncm91cExheWVyIGFzIGFueSkuZ2V0U291cmNlKCkuZ2V0RXh0ZW50KClcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgIH0pXG4gICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgbGF5ZXIgaW5zdGFuY2VvZiBPcGVubGF5ZXJzLmxheWVyLlZlY3RvciAmJlxuICAgICAgICAgIGxheWVyLmdldCgnaWQnKVxuICAgICAgICApIHtcbiAgICAgICAgICBPcGVubGF5ZXJzLmV4dGVudC5leHRlbmQoZXh0ZW50LCBsYXllci5nZXRTb3VyY2UoKS5nZXRFeHRlbnQoKSlcbiAgICAgICAgfVxuICAgICAgfSlcbiAgICAgIGlmIChleHRlbnRbMF0gIT09IEluZmluaXR5KSB7XG4gICAgICAgIG1hcC5nZXRWaWV3KCkuZml0KGV4dGVudCwge1xuICAgICAgICAgIGR1cmF0aW9uLFxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH0sXG4gICAgZ2V0U2hhcGVzKCkge1xuICAgICAgcmV0dXJuIHNoYXBlc1xuICAgIH0sXG4gICAgem9vbVRvRXh0ZW50KGNvb3JkczogW251bWJlciwgbnVtYmVyXVtdLCBvcHRzID0ge30pIHtcbiAgICAgIGNvbnN0IGxpbmVPYmplY3QgPSBjb29yZHMubWFwKChjb29yZGluYXRlOiBhbnkpID0+XG4gICAgICAgIGNvbnZlcnRQb2ludENvb3JkaW5hdGUoY29vcmRpbmF0ZSlcbiAgICAgIClcbiAgICAgIGNvbnN0IGV4dGVudCA9IE9wZW5sYXllcnMuZXh0ZW50LmJvdW5kaW5nRXh0ZW50KGxpbmVPYmplY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BjYXNlICdzZWxlY3RlZCc6XG4gICAgICAgICAgICAgIGZlYXR1cmUuc2V0U3R5bGUoZmVhdHVyZS5zZWxlY3RlZFN0eWxlKVxuICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgY2FzZSAncGFydGlhbGx5JzpcbiAgICAgICAgICAgICAgZmVhdHVyZS5zZXRTdHlsZShmZWF0dXJlLnBhcnRpYWxseVNlbGVjdGVkU3R5bGUpXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlICd1bnNlbGVjdGVkJzpcbiAgICAgICAgICAgICAgZmVhdHVyZS5zZXRTdHlsZShmZWF0dXJlLnVuc2VsZWN0ZWRTdHlsZSlcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgZ2VvbWV0cnlJbnN0YW5jZS5jb25zdHJ1Y3RvciA9PT0gT3BlbmxheWVycy5nZW9tLkxpbmVTdHJpbmdcbiAgICAgICAgKSB7XG4gICAgICAgICAgY29uc3Qgc3R5bGVzID0gW1xuICAgICAgICAgICAgbmV3IE9wZW5sYXllcnMuc3R5bGUuU3R5bGUoe1xuICAgICAgICAgICAgICBzdHJva2U6IG5ldyBPcGVubGF5ZXJzLnN0eWxlLlN0cm9rZSh7XG4gICAgICAgICAgICAgICAgY29sb3I6ICdyZ2JhKDI1NSwyNTUsMjU1LCAuMSknLFxuICAgICAgICAgICAgICAgIHdpZHRoOiA4LFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgbmV3IE9wZW5sYXllcnMuc3R5bGUuU3R5bGUoe1xuICAgICAgICAgICAgICBzdHJva2U6IG5ldyBPcGVubGF5ZXJzLnN0eWxlLlN0cm9rZSh7XG4gICAgICAgICAgICAgICAgY29sb3I6ICdyZ2JhKDAsMCwwLCAuMSknLFxuICAgICAgICAgICAgICAgIHdpZHRoOiA0LFxuICAgICAgICAgICAgICB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bmV3IE9wZW5sYXllcnMuc3R5bGUuSWNvbih7XG4gICAgICAgICAgICAgICAgaW1nOiBEcmF3aW5nVXRpbGl0eS5nZXRQaW4oe1xuICAgICAgICAgICAgICAgICAgZmlsbENvbG9yOiBvcHRpb25zLmlzU2VsZWN0ZWQgPyAnb3JhbmdlJyA6IG9wdGlvbnMuY29sb3IsXG4gICAgICAgICAgICAgICAgICBzdHJva2VDb2xvcjogJ3doaXRlJyxcbiAgICAgICAgICAgICAgICAgIGljb246IG9wdGlvbnMuaWNvbixcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICBpbWdTaXplOiBbcG9pbnRXaWR0aCwgcG9pbnRIZWlnaHRdLFxuICAgICAgICAgICAgICAgIGFuY2hvcjogW3BvaW50V2lkdGggLyAyLCAwXSxcbiAgICAgICAgICAgICAgICBhbmNob3JPcmlnaW46ICdib3R0b20tbGVmdCcsXG4gICAgICAgICAgICAgICAgYW5jaG9yWFVuaXRzOiAncGl4ZWxzJyxcbiAgICAgICAgICAgICAgICBhbmNob3JZVW5pdHM6ICdwaXhlbHMnLFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGZlYXR1cmUuc2V0U3R5bGUoXG4gICAgICAgICAgICBuZXcgT3BlbmxheWVycy5zdHlsZS5TdHlsZSh7XG4gICAgICAgICAgICAgIHRleHQ6IHRoaXMuY3JlYXRlVGV4dFN0eWxlKFxuICAgICAgICAgICAgICAgIGZlYXR1cmUsXG4gICAgICAgICAgICAgICAgbWFwLmdldFZpZXcoKS5nZXRSZXNvbHV0aW9uKClcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgKVxuICAgICAgICAgIGdlb21ldHJ5LnNldCgnaXNTZWxlY3RlZCcsIG9wdGlvbnMuaXNTZWxlY3RlZClcbiAgICAgICAgICBzaG93SGlkZUxhYmVsKHtcbiAgICAgICAgICAgIGdlb21ldHJ5LFxuICAgICAgICAgICAgZmVhdHVyZSxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKGdlb21ldHJ5SW5zdGFuY2UuZ2V0VHlwZSgpID09PSAnTGluZVN0cmluZycpIHtcbiAgICAgICAgY29uc3Qgc3R5bGVzID0gW1xuICAgICAgICAgIG5ldyBPcGVubGF5ZXJzLnN0eWxlLlN0eWxlKHtcbiAgICAgICAgICAgIHN0cm9rZTogbmV3IE9wZW5sYXllcnMuc3R5bGUuU3Ryb2tlKHtcbiAgICAgICAgICAgICAgY29sb3I6ICd3aGl0ZScsXG4gICAgICAgICAgICAgIHdpZHRoOiA4LFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgfSksXG4gICAgICAgICAgbmV3IE9wZW5sYXllcnMuc3R5bGUuU3R5bGUoe1xuICAgICAgICAgICAgc3Ryb2tlOiBuZXcgT3BlbmxheWVycy5zdHlsZS5TdHJva2Uoe1xuICAgICAgICAgICAgICBjb2xvcjogb3B0aW9ucy5jb2xvciB8fCBkZWZhdWx0Q29sb3IsXG4gICAgICAgICAgICAgIHdpZHRoOiA0LFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgfSksXG4gICAgICAgIF1cbiAgICAgICAgZmVhdHVyZS5zZXRTdHlsZShzdHlsZXMpXG4gICAgICB9XG4gICAgfSxcbiAgICBjcmVhdGVUZXh0U3R5bGUoZmVhdHVyZTogYW55LCByZXNvbHV0aW9uOiBhbnkpIHtcbiAgICAgIGNvbnN0IGZpbGxDb2xvciA9ICcjMDAwMDAwJ1xuICAgICAgY29uc3Qgb3V0bGluZUNvbG9yID0gJyNmZmZmZmYnXG4gICAgICBjb25zdCBvdXRsaW5lV2lkdGggPSAzXG4gICAgICByZXR1cm4gbmV3IE9wZW5sYXllcnMuc3R5bGUuVGV4dCh7XG4gICAgICAgIHRleHQ6IHRoaXMuZ2V0VGV4dChmZWF0dXJlLCByZXNvbHV0a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V4ID0gc2hhcGVzLmZpbmRJbmRleCgoc2hhcGUpID0+IGNpZCA9PT0gc2hhcGUubW9kZWwuY2lkKVxuICAgICAgaWYgKHNoYXBlSW5kZXggPj0gMCkge1xuICAgICAgICBzaGFwZXNbc2hhcGVJbmRleF0uZGVzdHJveSgpXG4gICAgICAgIHNoYXBlcy5zcGxpY2Uoc2hhcGVJbmRleCwgMSlcbiAgICAgIH1cbiAgICB9LFxuICAgIGRlc3Ryb3lTaGFwZXMoKSB7XG4gICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoNzAwNikgRklYTUU6IFBhcmFtZXRlciAnc2hhcGUnIGltcGxpY2l0bHkgaGFzIGFuICdhbnknIHR5cGUuXG4gICAgICBzaGFwZXMuZm9yRWFjaCgoc2hhcGUpID0+IHtcbiAgICAgICAgc2hhcGUuZGVzdHJveSgpXG4gICAgICB9KVxuICAgICAgc2hhcGVzID0gW11cbiAgICB9LFxuICAgIGdldE1hcCgpIHtcbiAgICAgIHJldHVybiBtYXBcbiAgICB9LFxuICAgIHpvb21JbigpIHtcbiAgICAgIGNvbnN0IHZpZXcgPSBtYXAuZ2V0VmlldygpXG4gICAgICBjb25zdCB6b29tID0gdmlldy5nZXRab29tKClcbiAgICAgIHZpZXcuc2V0Wm9vbSh6b29tICsgMSlcbiAgICB9LFxuICAgIHpvb21PdXQoKSB7XG4gICAgICBjb25zdCB2aWV3ID0gbWFwLmdldFZpZXcoKVxuICAgICAgY29uc3Qgem9vbSA9IHZpZXcuZ2V0Wm9vbSgpXG4gICAgICB2aWV3LnNldFpvb20oem9vbSAtIDEpXG4gICAgfSxcbiAgICBkZXN0cm95KCkge1xuICAgICAgdW5saXN0ZW5Ub1Jlc2l6ZSgpXG4gICAgfSxcbiAgfVxuICByZXR1cm4gZXhwb3NlZE1ldGhvZHNcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.d.ts b/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.d.ts new file mode 100644 index 00000000000..a3f8b7f960f --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.d.ts @@ -0,0 +1,7 @@ +/// +import { OpenlayersStateType } from '../../../golden-layout/golden-layout.types'; +export declare const OpenlayersMapViewReact: ({ selectionInterface, setMap: outerSetMap, componentState, }: { + selectionInterface: any; + setMap?: ((map: any) => void) | undefined; + componentState: OpenlayersStateType; +}) => JSX.Element | null; diff --git a/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.js b/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.js new file mode 100644 index 00000000000..81b8e020c5e --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.js @@ -0,0 +1,81 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { Memo } from '../../../memo/memo'; +import { MapViewReact } from '../map.view'; +import { OpenlayersDrawings } from './drawing-and-display'; +import $ from 'jquery'; +import { InteractionsProvider } from '../interactions.provider'; +import { LayoutContext } from '../../../golden-layout/visual-settings.provider'; +import user from '../../../singletons/user-instance'; +import User from '../../../../js/model/User'; +import { useBackbone } from '../../../selection-checkbox/useBackbone.hook'; +import { MAP_LAYERS } from '../../settings-helpers'; +var loadOpenLayersCode = function () { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var deferred = new $.Deferred(); + import('./map.openlayers').then(function (OpenlayersMap) { + deferred.resolve(OpenlayersMap.default); + }); + return deferred; +}; +export var OpenlayersMapViewReact = function (_a) { + var selectionInterface = _a.selectionInterface, outerSetMap = _a.setMap, componentState = _a.componentState; + var _b = __read(React.useState(null), 2), map = _b[0], setMap = _b[1]; + var _c = __read(React.useState(null), 2), mapLayers = _c[0], setMapLayers = _c[1]; + var listenTo = useBackbone().listenTo; + var _d = React.useContext(LayoutContext), getValue = _d.getValue, setValue = _d.setValue, hasLayoutContext = _d.hasLayoutContext; + var saveLayers = function (layers) { + if (hasLayoutContext) { + setValue(MAP_LAYERS, layers.toJSON()); + } + else { + user.get('user>preferences').savePreferences(); + } + }; + React.useEffect(function () { + var userDefaultLayers = user.get('user>preferences>mapLayers'); + var layerCollection = userDefaultLayers; + if (hasLayoutContext) { + var layerSettings = getValue(MAP_LAYERS, componentState.mapLayers); + var layerModels = layerSettings.map(function (layer) { + return new User.MapLayer(layer, { parse: true }); + }); + layerCollection = new User.MapLayers(layerModels); + } + listenTo(layerCollection, 'add remove', function () { return saveLayers(layerCollection); }); + layerCollection.validate(); + setMapLayers(layerCollection); + }, []); + React.useEffect(function () { + if (mapLayers) { + listenTo(mapLayers, 'change', function () { return saveLayers(mapLayers); }); + } + }, [mapLayers]); + React.useEffect(function () { + if (outerSetMap) { + outerSetMap(map); + } + }, [map]); + if (!mapLayers) { + return null; + } + return (React.createElement(InteractionsProvider, null, + React.createElement(Memo, null, + React.createElement(MapViewReact, { selectionInterface: selectionInterface, mapLayers: mapLayers, loadMap: loadOpenLayersCode, setMap: setMap })), + React.createElement(OpenlayersDrawings, { map: map, selectionInterface: selectionInterface }))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlbmxheWVycy52aWV3LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92aXN1YWxpemF0aW9uL21hcHMvb3BlbmxheWVycy9vcGVubGF5ZXJzLnZpZXcudHN4Il0sIm5h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24pXG4gIH0sIFtdKVxuXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgaWYgKG1hcExheWVycykge1xuICAgICAgbGlzdGVuVG8obWFwTGF5ZXJzLCAnY2hhbmdlJywgKCkgPT4gc2F2ZUxheWVycyhtYXBMYXllcnMpKVxuICAgIH1cbiAgfSwgW21hcExheWVyc10pXG5cbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICBpZiAob3V0ZXJTZXRNYXApIHtcbiAgICAgIG91dGVyU2V0TWFwKG1hcClcbiAgICB9XG4gIH0sIFttYXBdKVxuXG4gIGlmICghbWFwTGF5ZXJzKSB7XG4gICAgcmV0dXJuIG51bGxcbiAgfVxuXG4gIHJldHVybiAoXG4gICAgPEludGVyYWN0aW9uc1Byb3ZpZGVyPlxuICAgICAgPE1lbW8+XG4gICAgICAgIDxNYXBWaWV3UmVhY3RcbiAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX1cbiAgICAgICAgICBtYXBMYXllcnM9e21hcExheWVyc31cbiAgICAgICAgICBsb2FkTWFwPXtsb2FkT3BlbkxheWVyc0NvZGV9XG4gICAgICAgICAgc2V0TWFwPXtzZXRNYXB9XG4gICAgICAgIC8+XG4gICAgICA8L01lbW8+XG4gICAgICA8T3BlbmxheWVyc0RyYXdpbmdzIG1hcD17bWFwfSBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX0gLz5cbiAgICA8L0ludGVyYWN0aW9uc1Byb3ZpZGVyPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/polygon-display.d.ts b/src/main/webapp/component/visualization/maps/openlayers/polygon-display.d.ts new file mode 100644 index 00000000000..8c969903102 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/polygon-display.d.ts @@ -0,0 +1,18 @@ +/// +import ol from 'openlayers'; +import { Translation } from '../interactions.provider'; +export declare const translateFromOpenlayersCoordinates: (coords: any) => any; +export declare const drawPolygon: ({ map, model, polygon, id, isInteractive, translation, }: { + map: any; + model: any; + polygon: ol.geom.MultiPolygon; + id: string; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => void; +export declare const OpenlayersPolygonDisplay: ({ map, model, isInteractive, translation, }: { + map: any; + model: any; + isInteractive?: boolean | undefined; + translation?: Translation | undefined; +}) => JSX.Element; diff --git a/src/main/webapp/component/visualization/maps/openlayers/polygon-display.js b/src/main/webapp/component/visualization/maps/openlayers/polygon-display.js new file mode 100644 index 00000000000..6b0ad1e5f9e --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/polygon-display.js @@ -0,0 +1,229 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import DistanceUtils from '../../../../js/DistanceUtils'; +import ol from 'openlayers'; +import _ from 'underscore'; +import * as Turf from '@turf/turf'; +import { validateGeo } from '../../../../react-component/utils/validation'; +import { useListenTo } from '../../../selection-checkbox/useBackbone.hook'; +import { removeOldDrawing } from './drawing-and-display'; +import ShapeUtils from '../../../../js/ShapeUtils'; +import { getIdFromModelForDisplay } from '../drawing-and-display'; +import { StartupDataStore } from '../../../../js/model/Startup/startup'; +import { contrastingColor } from '../../../../react-component/location/location-color-selector'; +export var translateFromOpenlayersCoordinates = function (coords) { + return coords + .map(function (value) { + return value.map(function (point) { + var mappedPoint = ol.proj.transform([ + DistanceUtils.coordinateRound(point[0]), + DistanceUtils.coordinateRound(point[1]), + ], StartupDataStore.Configuration.getProjection(), 'EPSG:4326'); + if (mappedPoint[1] > 90) { + mappedPoint[1] = 89.9; + } + else if (mappedPoint[1] < -90) { + mappedPoint[1] = -89.9; + } + return mappedPoint; + }); + }) + .flatten(); +}; +var coordsToLineString = function (rawCoords) { + var setArr = _.uniq(rawCoords); + if (setArr.length < 3) { + return; + } + var coords = setArr.map(function (item) { + return ol.proj.transform([item[0], item[1]], 'EPSG:4326', StartupDataStore.Configuration.getProjection()); + }); + // Ensure that the first and last coordinate are the same + if (!_.isEqual(coords[0], coords[coords.length - 1])) { + coords.push(coords[0]); + } + return [coords]; +}; +var modelToPolygon = function (model) { + var _a; + var coords = model.get('polygon'); + if (coords && coords.length === 0) { + return new ol.geom.MultiPolygon([]); + } + if (coords && + coords.length > 0 && + coords[0].toString() !== coords[coords.length - 1].toString()) { + coords.push(coords[0]); + } + if (coords === undefined || + ((_a = validateGeo('polygon', JSON.stringify(coords))) === null || _a === void 0 ? void 0 : _a.error)) { + return; + } + var isMultiPolygon = ShapeUtils.isArray3D(coords); + var multiPolygon = isMultiPolygon ? coords : [coords]; + var polygons = []; + multiPolygon.forEach(function (polygon) { + var lineString = coordsToLineString(polygon); + if (lineString) { + polygons.push(lineString); + } + }); + return new ol.geom.MultiPolygon(polygons); +}; +var adjustPolygonPoints = function (polygon) { + var extent = polygon.getExtent(); + var lon1 = extent[0]; + var lon2 = extent[2]; + var width = Math.abs(lon1 - lon2); + if (width > 180) { + var adjusted = polygon.getCoordinates(); + adjusted.forEach(function (ring) { + ring.forEach(function (coord) { + if (coord[0] < 0) { + coord[0] += 360; + } + }); + }); + polygon.setCoordinates(adjusted); + } +}; +var adjustMultiPolygonPoints = function (polygons) { + var adjusted = []; + polygons.getPolygons().forEach(function (polygon) { + adjustPolygonPoints(polygon); + adjusted.push(polygon.getCoordinates()); + }); + polygons.setCoordinates(adjusted); +}; +export var drawPolygon = function (_a) { + var map = _a.map, model = _a.model, polygon = _a.polygon, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + if (!polygon) { + // Handles case where model changes to empty vars and we don't want to draw anymore + return; + } + if (translation) { + polygon.translate(translation.longitude, translation.latitude); + } + adjustMultiPolygonPoints(polygon); + var coordinates = polygon.getCoordinates(); + var bufferWidth = DistanceUtils.getDistanceInMeters(model.get('polygonBufferWidth'), model.get('polygonBufferUnits')) || 1; + var drawnPolygonSegments = coordinates.map(function (set) { + return Turf.multiLineString([translateFromOpenlayersCoordinates(set)]) + .geometry.coordinates; + }); + var bufferPolygonSegments = coordinates.map(function (set) { + var _a; + var polySegment = Turf.multiLineString([ + translateFromOpenlayersCoordinates(set), + ]); + var bufferedSegment = Turf.buffer(polySegment, bufferWidth, { + units: 'meters', + }); + var extent = Turf.bbox(bufferedSegment); + var width = Math.abs(extent[0] - extent[2]); + // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments + if (width > 180) { + Turf.coordEach(bufferedSegment, function (coord) { + if (coord[0] < 0) { + coord[0] += 360; + } + }); + } + var bufferPolygons = bufferedSegment.geometry.coordinates.map(function (set) { + return Turf.polygon([set]); + }); + return (_a = bufferPolygons.reduce(function (a, b) { return Turf.union(a, b); }, bufferPolygons[0])) === null || _a === void 0 ? void 0 : _a.geometry.coordinates; + }); + var bufferGeometryRepresentation = new ol.geom.MultiPolygon(bufferPolygonSegments); + var drawnGeometryRepresentation = new ol.geom.MultiPolygon(drawnPolygonSegments); + var billboard = new ol.Feature({ + geometry: bufferGeometryRepresentation, + }); + billboard.setId(id); + billboard.set('locationId', model.get('locationId')); + var drawnPolygonFeature = new ol.Feature({ + geometry: drawnGeometryRepresentation, + }); + var color = model.get('color'); + var bufferPolygonIconStyle = new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: isInteractive ? contrastingColor : color ? color : '#914500', + width: isInteractive ? 6 : 4, + }), + zIndex: 1, + }); + var drawnPolygonIconStyle = new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: isInteractive ? contrastingColor : color ? color : '#914500', + width: isInteractive ? 5 : 3, + lineDash: [10, 5], + }), + zIndex: 0, + }); + billboard.setStyle(bufferPolygonIconStyle); + drawnPolygonFeature.setStyle(drawnPolygonIconStyle); + var vectorSource = new ol.source.Vector({ + features: [billboard, drawnPolygonFeature], + }); + var vectorLayer = new ol.layer.Vector({ + source: vectorSource, + }); + var mapRef = map.getMap(); + removeOldDrawing({ map: mapRef, id: id }); + vectorLayer.set('id', id); + mapRef.addLayer(vectorLayer); +}; +var updatePrimitive = function (_a) { + var map = _a.map, model = _a.model, id = _a.id, isInteractive = _a.isInteractive, translation = _a.translation; + var polygon = modelToPolygon(model); + if (polygon !== undefined) { + drawPolygon({ map: map, model: model, polygon: polygon, id: id, isInteractive: isInteractive, translation: translation }); + } +}; +var useListenToPolygonModel = function (_a) { + var model = _a.model, map = _a.map, isInteractive = _a.isInteractive, translation = _a.translation; + var callback = React.useMemo(function () { + return function () { + if (model && map) { + updatePrimitive({ + map: map, + model: model, + id: getIdFromModelForDisplay({ model: model }), + isInteractive: isInteractive, + translation: translation, + }); + } + }; + }, [model, map, isInteractive, translation]); + useListenTo(model, 'change:polygon change:polygonBufferWidth change:polygonBufferUnits', callback); + callback(); +}; +export var OpenlayersPolygonDisplay = function (_a) { + var map = _a.map, model = _a.model, isInteractive = _a.isInteractive, translation = _a.translation; + useListenToPolygonModel({ map: map, model: model, isInteractive: isInteractive, translation: translation }); + React.useEffect(function () { + return function () { + if (map && model) { + removeOldDrawing({ + map: map.getMap(), + id: getIdFromModelForDisplay({ model: model }), + }); + } + }; + }, [map, model]); + return React.createElement(React.Fragment, null); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9seWdvbi1kaXNwbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92aXN1YWxpemF0aW9uL21hcHMvb3BlbmxheWVycy9wb2x5Z29uLWRpc3BsYXkudHN4Il0sIm5hbWVzIj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xhdGlvbj86IFRyYW5zbGF0aW9uXG59KSA9PiB7XG4gIHVzZUxpc3RlblRvUG9seWdvbk1vZGVsKHsgbWFwLCBtb2RlbCwgaXNJbnRlcmFjdGl2ZSwgdHJhbnNsYXRpb24gfSlcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgaWYgKG1hcCAmJiBtb2RlbCkge1xuICAgICAgICByZW1vdmVPbGREcmF3aW5nKHtcbiAgICAgICAgICBtYXA6IG1hcC5nZXRNYXAoKSxcbiAgICAgICAgICBpZDogZ2V0SWRGcm9tTW9kZWxGb3JEaXNwbGF5KHsgbW9kZWwgfSksXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgfVxuICB9LCBbbWFwLCBtb2RlbF0pXG4gIHJldHVybiA8PjwvPlxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/openlayers/utility.d.ts b/src/main/webapp/component/visualization/maps/openlayers/utility.d.ts new file mode 100644 index 00000000000..8965dabb661 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/utility.d.ts @@ -0,0 +1,13 @@ +import Openlayers from 'openlayers'; +import * as Turf from '@turf/turf'; +import { Position } from '@turf/turf'; +import { GeometryJSON } from 'geospatialdraw/target/webapp/geometry'; +declare const _default: { + calculateOpenlayersCenterOfGeometry(propertyModel: any): Openlayers.Coordinate; + calculateCartographicCenterOfGeometryInDegrees(propertyModel: any): Openlayers.Coordinate; + calculateOpenlayersCenterOfGeometries(propertyModels: any): Openlayers.Coordinate; + calculateCartographicCenterOfGeometriesInDegrees(propertyModels: any): Openlayers.Coordinate; + convertCoordsToDisplay(coordinates: Position[]): Turf.helpers.Position[]; + adjustGeoCoords(geo: GeometryJSON): void; +}; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/openlayers/utility.js b/src/main/webapp/component/visualization/maps/openlayers/utility.js new file mode 100644 index 00000000000..f4e3c911bb2 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/openlayers/utility.js @@ -0,0 +1,89 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import _ from 'lodash'; +import Openlayers from 'openlayers'; +import * as Turf from '@turf/turf'; +import { StartupDataStore } from '../../../../js/model/Startup/startup'; +function convertPointCoordinate(point) { + var coords = [point[0], point[1]]; + return Openlayers.proj.transform(coords, 'EPSG:4326', StartupDataStore.Configuration.getProjection()); +} +function unconvertPointCoordinate(point) { + return Openlayers.proj.transform(point, StartupDataStore.Configuration.getProjection(), 'EPSG:4326'); +} +/* + A variety of helpful functions for dealing with Openlayers +*/ +export default { + /* + Calculates the center of given a geometry (WKT) + */ + calculateOpenlayersCenterOfGeometry: function (propertyModel) { + var lineObject = propertyModel + .getPoints() + .map(function (coordinate) { return convertPointCoordinate(coordinate); }); + var extent = Openlayers.extent.boundingExtent(lineObject); + return Openlayers.extent.getCenter(extent); + }, + /* + Calculates the center of given a geometry (WKT) + */ + calculateCartographicCenterOfGeometryInDegrees: function (propertyModel) { + var openlayersCenter = this.calculateOpenlayersCenterOfGeometry(propertyModel); + return unconvertPointCoordinate(openlayersCenter); + }, + /* + Calculates the center of given geometries (WKT) + */ + calculateOpenlayersCenterOfGeometries: function (propertyModels) { + var allPoints = _.flatten(propertyModels.map(function (propertyModel) { return propertyModel.getPoints(); })).map(function (coordinate) { return convertPointCoordinate(coordinate); }); + var extent = Openlayers.extent.boundingExtent(allPoints); + return Openlayers.extent.getCenter(extent); + }, + /* + Calculates the center of given geometries (WKT) + */ + calculateCartographicCenterOfGeometriesInDegrees: function (propertyModels) { + var openlayersCenter = this.calculateOpenlayersCenterOfGeometries(propertyModels); + return unconvertPointCoordinate(openlayersCenter); + }, + convertCoordsToDisplay: function (coordinates) { + var coords = _.cloneDeep(coordinates); + coords.forEach(function (coord) { + if (coord[0] < 0) { + coord[0] += 360; + } + }); + return coords; + }, + adjustGeoCoords: function (geo) { + var geometry = geo.geometry; + var bbox = geo.bbox || Turf.bbox(geo.geometry); + var width = Math.abs(bbox[0] - bbox[2]); + var crossesAntiMeridian = width > 180; + if (crossesAntiMeridian) { + if (geo.properties.shape === 'Line') { + var lineStringCoords = geometry.coordinates; + geometry.coordinates = this.convertCoordsToDisplay(lineStringCoords); + } + else if (geo.properties.shape === 'Bounding Box' || + geo.properties.shape === 'Polygon') { + var coords = geometry.coordinates[0]; + geometry.coordinates[0] = this.convertCoordsToDisplay(coords); + } + } + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbGl0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL29wZW5sYXllcnMvdXRpbGl0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxDQUFDLE1BQU0sUUFBUSxDQUFBO0FBQ3RCLE9BQU8sVUFBVSxNQUFNLFlBQVksQ0FBQTtBQUNuQyxPQUFPLEtBQUssSUFBSSxNQUFNLFlBQVksQ0FBQTtBQUdsQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQTtBQUV2RSxTQUFTLHNCQUFzQixDQUFDLEtBQVU7SUFDeEMsSUFBTSxNQUFNLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLEVBQUUsS0FBSyxDQUFDLENBQUMsQ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KVxuICAgIGNvbnN0IGNyb3NzZXNBbnRpTWVyaWRpYW4gPSB3aWR0aCA+IDE4MFxuICAgIGlmIChjcm9zc2VzQW50aU1lcmlkaWFuKSB7XG4gICAgICBpZiAoZ2VvLnByb3BlcnRpZXMuc2hhcGUgPT09ICdMaW5lJykge1xuICAgICAgICBjb25zdCBsaW5lU3RyaW5nQ29vcmRzID0gKGdlb21ldHJ5IGFzIExpbmVTdHJpbmcpLmNvb3JkaW5hdGVzXG4gICAgICAgIGdlb21ldHJ5LmNvb3JkaW5hdGVzID0gdGhpcy5jb252ZXJ0Q29vcmRzVG9EaXNwbGF5KGxpbmVTdHJpbmdDb29yZHMpXG4gICAgICB9IGVsc2UgaWYgKFxuICAgICAgICBnZW8ucHJvcGVydGllcy5zaGFwZSA9PT0gJ0JvdW5kaW5nIEJveCcgfHxcbiAgICAgICAgZ2VvLnByb3BlcnRpZXMuc2hhcGUgPT09ICdQb2x5Z29uJ1xuICAgICAgKSB7XG4gICAgICAgIGNvbnN0IGNvb3JkcyA9IChnZW9tZXRyeSBhcyBQb2x5Z29uKS5jb29yZGluYXRlc1swXVxuICAgICAgICBnZW9tZXRyeS5jb29yZGluYXRlc1swXSA9IHRoaXMuY29udmVydENvb3Jkc1RvRGlzcGxheShjb29yZHMpXG4gICAgICB9XG4gICAgfVxuICB9LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/react/calculate-clusters.d.ts b/src/main/webapp/component/visualization/maps/react/calculate-clusters.d.ts new file mode 100644 index 00000000000..52793d514c1 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/calculate-clusters.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { ClusterType } from './geometries'; +import { LazyResultsType } from '../../../selection-interface/hooks'; +type Props = { + isClustering: boolean; + map: any; + setClusters: React.Dispatch>; + lazyResults: LazyResultsType; +}; +declare const _default: ({ map, setClusters, isClustering, lazyResults, }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/react/calculate-clusters.js b/src/main/webapp/component/visualization/maps/react/calculate-clusters.js new file mode 100644 index 00000000000..d87b7bbba5a --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/calculate-clusters.js @@ -0,0 +1,65 @@ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import _ from 'underscore'; +import Clustering from '../Clustering'; +var CalculateClusters = function (_a) { + var map = _a.map, setClusters = _a.setClusters, isClustering = _a.isClustering, lazyResults = _a.lazyResults; + var clusteringAnimationFrameId = React.useRef(undefined); + var getResultsWithGeometry = function () { + return Object.values(lazyResults).filter(function (lazyResult) { + return lazyResult.hasGeometry(); + }); + }; + var calculateClusters = _.debounce(function () { + if (isClustering) { + // const now = Date.now() look into trying to boost perf here + var calculatedClusters = Clustering.calculateClusters(getResultsWithGeometry(), map); + // console.log(`Time to cluster: ${Date.now() - now}`) + setClusters(calculatedClusters.map(function (calculatedCluster) { + return { + results: calculatedCluster, + id: calculatedCluster + .map(function (result) { return result['metacard.id']; }) + .sort() + .toString(), + }; + })); + } + }, 500); + var handleResultsChange = function () { + setClusters([]); + calculateClusters(); + }; + var startClusterAnimating = function () { + if (isClustering) { + clusteringAnimationFrameId.current = window.requestAnimationFrame(function () { + calculateClusters(); + startClusterAnimating(); + }); + } + }; + var stopClusterAnimating = function () { + window.cancelAnimationFrame(clusteringAnimationFrameId.current); + calculateClusters(); + }; + React.useEffect(function () { + handleResultsChange(); + }, [lazyResults]); + React.useEffect(function () { + if (isClustering) { + calculateClusters(); + } + else { + setClusters([]); + } + map.onCameraMoveStart(startClusterAnimating); + map.onCameraMoveEnd(stopClusterAnimating); + return function () { + map.offCameraMoveStart(startClusterAnimating); + map.offCameraMoveEnd(stopClusterAnimating); + }; + }, [isClustering, lazyResults]); + return React.createElement(React.Fragment, null); +}; +export default hot(module)(CalculateClusters); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsY3VsYXRlLWNsdXN0ZXJzLmp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JyZW50IGFzIG51bWJlcilcbiAgICBjYWxjdWxhdGVDbHVzdGVycygpXG4gIH1cblxuICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xuICAgIGhhbmRsZVJlc3VsdHNDaGFuZ2UoKVxuICB9LCBbbGF6eVJlc3VsdHNdKVxuXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgaWYgKGlzQ2x1c3RlcmluZykge1xuICAgICAgY2FsY3VsYXRlQ2x1c3RlcnMoKVxuICAgIH0gZWxzZSB7XG4gICAgICBzZXRDbHVzdGVycyhbXSlcbiAgICB9XG4gICAgbWFwLm9uQ2FtZXJhTW92ZVN0YXJ0KHN0YXJ0Q2x1c3RlckFuaW1hdGluZylcbiAgICBtYXAub25DYW1lcmFNb3ZlRW5kKHN0b3BDbHVzdGVyQW5pbWF0aW5nKVxuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBtYXAub2ZmQ2FtZXJhTW92ZVN0YXJ0KHN0YXJ0Q2x1c3RlckFuaW1hdGluZylcbiAgICAgIG1hcC5vZmZDYW1lcmFNb3ZlRW5kKHN0b3BDbHVzdGVyQW5pbWF0aW5nKVxuICAgIH1cbiAgfSwgW2lzQ2x1c3RlcmluZywgbGF6eVJlc3VsdHNdKVxuXG4gIHJldHVybiA8PjwvPlxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShDYWxjdWxhdGVDbHVzdGVycylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/react/cluster.d.ts b/src/main/webapp/component/visualization/maps/react/cluster.d.ts new file mode 100644 index 00000000000..e8cca28347a --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/cluster.d.ts @@ -0,0 +1,8 @@ +/// +import { ClusterType } from './geometries'; +type Props = { + cluster: ClusterType; + map: any; +}; +declare const _default: ({ cluster, map }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/react/cluster.js b/src/main/webapp/component/visualization/maps/react/cluster.js new file mode 100644 index 00000000000..38e5dd4fe3c --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/cluster.js @@ -0,0 +1,86 @@ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useSelectionOfLazyResults } from '../../../../js/model/LazyQueryResult/hooks'; +import _ from 'underscore'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'geo-... Remove this comment to see the full error message +import calculateConvexHull from 'geo-convex-hull'; +import extension from '../../../../extension-points'; +var Cluster = function (_a) { + var cluster = _a.cluster, map = _a.map; + var geometries = React.useRef([]); + var isSelected = useSelectionOfLazyResults({ lazyResults: cluster.results }); + React.useEffect(function () { + switch (isSelected) { + case 'selected': + map.updateCluster(geometries.current, { + color: 'orange', + isSelected: isSelected, + count: cluster.results.length, + outline: 'white', + textFill: 'white', + }); + break; + case 'partially': + map.updateCluster(geometries.current, { + color: cluster.results[0].getColor(), + isSelected: isSelected, + count: cluster.results.length, + outline: 'black', + textFill: 'white', + }); + break; + case 'unselected': + map.updateCluster(geometries.current, { + color: cluster.results[0].getColor(), + isSelected: isSelected, + count: cluster.results.length, + outline: 'white', + textFill: 'white', + }); + break; + } + }, [isSelected]); + var handleCluster = function () { + var center = map.getCartographicCenterOfClusterInDegrees(cluster); + var badgeOptions = extension.customMapBadge({ + results: cluster.results, + isCluster: true, + }); + geometries.current.push(map.addPointWithText(center, { + id: cluster.results.map(function (result) { return result['metacard.id']; }), + color: cluster.results[0].getColor(), + isSelected: isSelected, + badgeOptions: badgeOptions, + })); + }; + var addConvexHull = function () { + var points = cluster.results.map(function (result) { return result.getPoints(); }); + var data = _.flatten(points, true).map(function (coord) { return ({ + longitude: coord[0], + latitude: coord[1], + }); }); + var convexHull = calculateConvexHull(data).map(function (coord) { return [ + coord.longitude, + coord.latitude, + ]; }); + convexHull.push(convexHull[0]); + var geometry = map.addLine(convexHull, { + id: cluster.results.map(function (result) { return result['metacard.id']; }), + color: cluster.results[0].getColor(), + }); + map.hideGeometry(geometry); + geometries.current.push(geometry); + }; + React.useEffect(function () { + handleCluster(); + addConvexHull(); + return function () { + geometries.current.forEach(function (geometry) { + map.removeGeometry(geometry); + }); + }; + }, []); + return React.createElement(React.Fragment, null); +}; +export default hot(module)(Cluster); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL3JlYWN0L2NsdXN0ZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUV0QyxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSw0Q0FBNEMsQ0FBQTtBQUN0RixPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFDMUIsbUpBQW1KO0FBQ25KLE9BQU8sbUJBQW1CLE1BQU0saUJBQWlCLENBQUE7QUFDakQsT0FBTyxTQUFTLE1BQU0sOEJBQThCLENBQUE7QUFPcEQsSUFBTSxPQUFPLEdBQUcsVUFBQyxFQUF1QjtRQUFyQixPQUFPLGFBQUEsRUFBRSxHQUFHLFNBQUE7SUFDN0IsSUFBTSxVQUFVLEdBQUcsS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFXLENBQUMsQ0FBQTtJQUM1QyxJQUFNLFVBQVUsR0FBRyx5QkFBeUIsQ0FBQyxFQUFFLFdBQVcsRUFBRSxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQTtJQUU5RSxLQUFLLENBQUMsU0FBUyxDQUFDO1FBQ2QsUUFBUSxVQUFVLEVBQUU7WUFDbEIsS0FBSyxV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QgY29udmV4SHVsbCA9IGNhbGN1bGF0ZUNvbnZleEh1bGwoZGF0YSkubWFwKChjb29yZDogYW55KSA9PiBbXG4gICAgICBjb29yZC5sb25naXR1ZGUsXG4gICAgICBjb29yZC5sYXRpdHVkZSxcbiAgICBdKVxuICAgIGNvbnZleEh1bGwucHVzaChjb252ZXhIdWxsWzBdKVxuICAgIGNvbnN0IGdlb21ldHJ5ID0gbWFwLmFkZExpbmUoY29udmV4SHVsbCwge1xuICAgICAgaWQ6IGNsdXN0ZXIucmVzdWx0cy5tYXAoKHJlc3VsdCkgPT4gcmVzdWx0WydtZXRhY2FyZC5pZCddKSxcbiAgICAgIGNvbG9yOiBjbHVzdGVyLnJlc3VsdHNbMF0uZ2V0Q29sb3IoKSxcbiAgICB9KVxuICAgIG1hcC5oaWRlR2VvbWV0cnkoZ2VvbWV0cnkpXG4gICAgZ2VvbWV0cmllcy5jdXJyZW50LnB1c2goZ2VvbWV0cnkpXG4gIH1cblxuICBSZWFjdC51c2VFZmZlY3QoKCkgPT4ge1xuICAgIGhhbmRsZUNsdXN0ZXIoKVxuICAgIGFkZENvbnZleEh1bGwoKVxuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBnZW9tZXRyaWVzLmN1cnJlbnQuZm9yRWFjaCgoZ2VvbWV0cnkpID0+IHtcbiAgICAgICAgbWFwLnJlbW92ZUdlb21ldHJ5KGdlb21ldHJ5KVxuICAgICAgfSlcbiAgICB9XG4gIH0sIFtdKVxuICByZXR1cm4gPD48Lz5cbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoQ2x1c3RlcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/react/geometries.d.ts b/src/main/webapp/component/visualization/maps/react/geometries.d.ts new file mode 100644 index 00000000000..be19d94f09b --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/geometries.d.ts @@ -0,0 +1,13 @@ +/// +import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + selectionInterface: any; + map: any; + isClustering: boolean; +}; +export type ClusterType = { + results: LazyQueryResult[]; + id: string; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/react/geometries.js b/src/main/webapp/component/visualization/maps/react/geometries.js new file mode 100644 index 00000000000..f8c23308f73 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/geometries.js @@ -0,0 +1,96 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { Drawing } from '../../../singletons/drawing'; +import { useLazyResultsFromSelectionInterface } from '../../../selection-interface/hooks'; +import Geometry from './geometry'; +import CalculateClusters from './calculate-clusters'; +import Cluster from './cluster'; +import ZoomToSelection from './zoom-to-selection'; +import { SHAPE_ID_PREFIX } from '../drawing-and-display'; +var Geometries = function (props) { + var map = props.map, selectionInterface = props.selectionInterface, isClustering = props.isClustering; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var lazyResultsRef = React.useRef(lazyResults); + lazyResultsRef.current = lazyResults; + var _a = __read(React.useState([]), 2), clusters = _a[0], setClusters = _a[1]; + // possible since we debounce + if (isClustering === false && clusters.length > 0) { + setClusters([]); + } + React.useEffect(function () { + var handleCtrlClick = function (id) { + if (id.constructor === String) { + lazyResultsRef.current.results[id].controlSelect(); + } + else { + ; + id.map(function (subid) { + return lazyResultsRef.current.results[subid].controlSelect(); + }); + } + }; + var handleClick = function (id) { + if (id.constructor === String) { + lazyResultsRef.current.results[id].select(); + } + else { + var resultIds = id; + var shouldJustDeselect = resultIds.some(function (subid) { return lazyResultsRef.current.results[subid].isSelected; }); + lazyResultsRef.current.deselect(); + if (!shouldJustDeselect) { + resultIds.map(function (subid) { + return lazyResultsRef.current.results[subid].controlSelect(); + }); + } + } + }; + var handleLeftClick = function (event, mapEvent) { + if (mapEvent.mapTarget && + mapEvent.mapTarget !== 'userDrawing' && + !Drawing.isDrawing()) { + // we get click events on normal drawn features from the location drawing + if (mapEvent.mapTarget.constructor === String && + mapEvent.mapTarget.startsWith(SHAPE_ID_PREFIX)) { + return; + } + if (event.shiftKey) { + handleCtrlClick(mapEvent.mapTarget); + } + else if (event.ctrlKey || event.metaKey) { + handleCtrlClick(mapEvent.mapTarget); + } + else { + handleClick(mapEvent.mapTarget); + } + } + }; + map.onLeftClick(handleLeftClick); + return function () { }; + }, []); + var IndividualGeometries = React.useMemo(function () { + return Object.values(lazyResults.results).map(function (lazyResult) { + return (React.createElement(Geometry, { key: lazyResult['metacard.id'], lazyResult: lazyResult, map: map, clusters: clusters })); + }); + }, [lazyResults.results, clusters]); + var Clusters = React.useMemo(function () { + return clusters.map(function (cluster) { + return React.createElement(Cluster, { key: cluster.id, cluster: cluster, map: map }); + }); + }, [clusters, lazyResults.results]); + var CalculateClustersMemo = React.useMemo(function () { + return (React.createElement(CalculateClusters, { key: "clusters", isClustering: isClustering, map: map, lazyResults: lazyResults.results, setClusters: setClusters })); + }, [lazyResults.results, isClustering]); + var ZoomToSelectionMemo = React.useMemo(function () { + return React.createElement(ZoomToSelection, { map: map, lazyResults: lazyResults }); + }, [lazyResults]); + return (React.createElement(React.Fragment, null, + ZoomToSelectionMemo, + CalculateClustersMemo, + Clusters, + IndividualGeometries)); +}; +export default hot(module)(Geometries); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbWV0cmllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9tYXBzL3JlYWN0L2dlb21ldHJpZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENB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gICAgc2V0Q2x1c3RlcnM9e3NldENsdXN0ZXJzfVxuICAgICAgLz5cbiAgICApXG4gIH0sIFtsYXp5UmVzdWx0cy5yZXN1bHRzLCBpc0NsdXN0ZXJpbmddKVxuXG4gIGNvbnN0IFpvb21Ub1NlbGVjdGlvbk1lbW8gPSBSZWFjdC51c2VNZW1vKCgpID0+IHtcbiAgICByZXR1cm4gPFpvb21Ub1NlbGVjdGlvbiBtYXA9e21hcH0gbGF6eVJlc3VsdHM9e2xhenlSZXN1bHRzfSAvPlxuICB9LCBbbGF6eVJlc3VsdHNdKVxuXG4gIHJldHVybiAoXG4gICAgPD5cbiAgICAgIHtab29tVG9TZWxlY3Rpb25NZW1vfVxuICAgICAge0NhbGN1bGF0ZUNsdXN0ZXJzTWVtb31cbiAgICAgIHtDbHVzdGVyc31cbiAgICAgIHtJbmRpdmlkdWFsR2VvbWV0cmllc31cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShHZW9tZXRyaWVzKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/react/geometry.d.ts b/src/main/webapp/component/visualization/maps/react/geometry.d.ts new file mode 100644 index 00000000000..5af88a4e885 --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/geometry.d.ts @@ -0,0 +1,9 @@ +import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult'; +import { ClusterType } from './geometries'; +type Props = { + lazyResult: LazyQueryResult; + map: any; + clusters: ClusterType[]; +}; +declare const _default: ({ lazyResult, map, clusters }: Props) => null; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/react/geometry.js b/src/main/webapp/component/visualization/maps/react/geometry.js new file mode 100644 index 00000000000..ffc2aa1ec5d --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/geometry.js @@ -0,0 +1,196 @@ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import _ from 'underscore'; +import _debounce from 'lodash/debounce'; +import wkx from 'wkx'; +import iconHelper from '../../../../js/IconHelper'; +import { useUpdateEffect } from 'react-use'; +import { useSelectionOfLazyResult } from '../../../../js/model/LazyQueryResult/hooks'; +import extension from '../../../../extension-points'; +import { useMetacardDefinitions } from '../../../../js/model/Startup/metacard-definitions.hooks'; +var determineIfClustered = function (_a) { + var clusters = _a.clusters, result = _a.result; + return Boolean(clusters.find(function (cluster) { + return Boolean(cluster.results.find(function (clusteredResult) { + return clusteredResult['metacard.id'] === result['metacard.id']; + })); + })); +}; +var Geometry = function (_a) { + var lazyResult = _a.lazyResult, map = _a.map, clusters = _a.clusters; + var MetacardDefinitions = useMetacardDefinitions(); + var isClustered = React.useRef(false); + var geometries = React.useRef([]); + var isSelected = useSelectionOfLazyResult({ lazyResult: lazyResult }); + useUpdateEffect(function () { + updateDisplay(isSelected); + }, [isSelected, lazyResult.plain]); + React.useEffect(function () { + checkIfClustered(); + }, [clusters, lazyResult.plain]); + React.useEffect(function () { + updateGeometries(); + return function () { + // cleanup + destroyGeometries(); + }; + }, [lazyResult.plain]); + var handlePoint = React.useMemo(function () { + var badgeOptions = extension.customMapBadge({ + results: [lazyResult], + isCluster: false, + }); + return function (point) { + geometries.current.push(map.addPoint(point, { + id: lazyResult['metacard.id'], + title: lazyResult.plain.metacard.properties.title, + color: color, + icon: icon, + isSelected: isSelected, + badgeOptions: badgeOptions, + })); + }; + }, [lazyResult.plain]); + var handleLine = React.useMemo(function () { + return function (line) { + geometries.current.push(map.addLine(line, { + id: lazyResult['metacard.id'], + title: lazyResult.plain.metacard.properties.title, + color: color, + isSelected: isSelected, + })); + }; + }, [lazyResult.plain]); + var handleGeometry = React.useMemo(function () { + return function (geometry) { + switch (geometry.type) { + case 'Point': + handlePoint(geometry.coordinates); + break; + case 'Polygon': + geometry.coordinates.forEach(function (polygon) { + handlePoint(polygon[0]); + handleLine(polygon); + }); + break; + case 'LineString': + handlePoint(geometry.coordinates[0]); + handleLine(geometry.coordinates); + break; + case 'MultiLineString': + geometry.coordinates.forEach(function (line) { + handlePoint(line[0]); + handleLine(line); + }); + break; + case 'MultiPoint': + geometry.coordinates.forEach(function (point) { + handlePoint(point); + }); + break; + case 'MultiPolygon': + geometry.coordinates.forEach(function (multipolygon) { + multipolygon.forEach(function (polygon) { + handlePoint(polygon[0]); + handleLine(polygon); + }); + }); + break; + case 'GeometryCollection': + geometry.geometries.forEach(function (subgeometry) { + handleGeometry(subgeometry); + }); + break; + } + }; + }, []); + var checkIfClustered = React.useMemo(function () { + return function () { + var updateIsClustered = determineIfClustered({ + clusters: clusters, + result: lazyResult, + }); + if (isClustered.current !== updateIsClustered) { + isClustered.current = updateIsClustered; + if (isClustered.current) { + hideGeometries(); + } + else { + showGeometries(); + } + } + }; + }, [clusters, lazyResult.plain]); + var color = React.useMemo(function () { + return lazyResult.getColor(); + }, []); + var icon = React.useMemo(function () { + return iconHelper.getFullByMetacardObject(lazyResult.plain); + }, [lazyResult.plain]); + var updateDisplay = React.useMemo(function () { + return _debounce(function (updateIsSelected) { + geometries.current.forEach(function (geometry) { + map.updateGeometry(geometry, { + color: color, + icon: icon, + isSelected: updateIsSelected, + }); + }); + }, 100, { + leading: false, + trailing: true, + }); + }, []); + var updateGeometries = React.useMemo(function () { + return function (propertiesModel) { + if (propertiesModel && + _.find(Object.keys(propertiesModel.changedAttributes()), function (attribute) { + return (MetacardDefinitions.getAttributeMap()[attribute] && + MetacardDefinitions.getAttributeMap()[attribute].type === + 'GEOMETRY') || + attribute === 'id'; + }) === undefined) { + return; + } + destroyGeometries(); + isClustered.current = false; + var lazyResultGeometries = _.flatten(lazyResult.getGeometries()); + if (lazyResultGeometries.length > 0) { + geometries.current = []; + _.forEach(lazyResultGeometries, function (property) { + try { + handleGeometry(wkx.Geometry.parse(property).toGeoJSON()); + } + catch (err) { + console.error(err); + } + }); + checkIfClustered(); + } + }; + }, [lazyResult.plain, MetacardDefinitions]); + var destroyGeometries = React.useMemo(function () { + return function () { + geometries.current.forEach(function (geometry) { + map.removeGeometry(geometry); + }); + }; + }, []); + var showGeometries = React.useMemo(function () { + return function () { + geometries.current.forEach(function (geometry) { + map.showGeometry(geometry); + }); + }; + }, []); + var hideGeometries = React.useMemo(function () { + return function () { + geometries.current.forEach(function (geometry) { + map.hideGeometry(geometry); + }); + }; + }, []); + return null; +}; +export default hot(module)(Geometry); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbWV0cnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9yZWFjdC9nZW9tZXRyeS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBR3RDLE9BQU8sQ0FBQyxNQUFNLFlBQVksQ0FBQTtBQUMxQixPQUFPLFNBQVMsTUFBTSxpQkFBaUIsQ0FBQTtBQUN2QyxPQUFPLEdBQUcsTUFBTSxLQUFLLENBQUE7QUFDckIsT0FBTyxVQUFVLE1BQU0sMkJBQTJCLENBQUE7QUFDbEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUMzQyxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSw0Q0FBNEMsQ0FBQTtBQUNyRixPQUFPLFNBQVMsTUFBTSw4QkFBOEIsQ0FBQTtBQUNwRCxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSx5REFBeUQsQ0FBQTtBQVFoRyxJQUFNLG9CQUFvQixHQUFHLFVBQUMsRUFNN0I7UUFMQyxRQUFRLGNBQUEsRUFDUixNQUFNLFlBQUE7SUFLTixPQUFPLE9BQU8sQ0FDWixRQUFRLENBQUMsSUFBS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mFkZExpbmUobGluZSwge1xuICAgICAgICAgIGlkOiBsYXp5UmVzdWx0WydtZXRhY2FyZC5pZCddLFxuICAgICAgICAgIHRpdGxlOiBsYXp5UmVzdWx0LnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMudGl0bGUsXG4gICAgICAgICAgY29sb3IsXG4gICAgICAgICAgaXNTZWxlY3RlZCxcbiAgICAgICAgfSlcbiAgICAgIClcbiAgICB9XG4gIH0sIFtsYXp5UmVzdWx0LnBsYWluXSlcblxuICBjb25zdCBoYW5kbGVHZW9tZXRyeSA9IFJlYWN0LnVzZU1lbW8oKCkgPT4ge1xuICAgIHJldHVybiAoZ2VvbWV0cnk6IGFueSkgPT4ge1xuICAgICAgc3dpdGNoIChnZW9tZXRyeS50eXBlKSB7XG4gICAgICAgIGNhc2UgJ1BvaW50JzpcbiAgICAgICAgICBoYW5kbGVQb2ludChnZW9tZXRyeS5jb29yZGluYXRlcylcbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICdQb2x5Z29uJzpcbiAgICAgICAgICBnZW9tZXRyeS5jb29yZGluYXRlcy5mb3JFYWNoKChwb2x5Z29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgIGhhbmRsZVBvaW50KHBvbHlnb25bMF0pXG4gICAgICAgICAgICBoYW5kbGVMaW5lKHBvbHlnb24pXG4gICAgICAgICAgfSlcbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICdMaW5lU3RyaW5nJzpcbiAgICAgICAgICBoYW5kbGVQb2ludChnZW9tZXRyeS5jb29yZGluYXRlc1swXSlcbiAgICAgICAgICBoYW5kbGVMaW5lKGdlb21ldHJ5LmNvb3JkaW5hdGVzKVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgJ011bHRpTGluZVN0cmluZyc6XG4gICAgICAgICAgZ2VvbWV0cnkuY29vcmRpbmF0ZXMuZm9yRWFjaCgobGluZTogYW55KSA9PiB7XG4gICAgICAgICAgICBoYW5kbGVQb2ludChsaW5lWzBdKVxuICAgICAgICAgICAgaGFuZGxlTGluZShsaW5lKVxuICAgICAgICAgIH0pXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSAnTXVsdGlQb2ludCc6XG4gICAgICAgICAgZ2VvbWV0cnkuY29vcmRpbmF0ZXMuZm9yRWFjaCgocG9pbnQ6IGFueSkgPT4ge1xuICAgICAgICAgICAgaGFuZGxlUG9pbnQocG9pbnQpXG4gICAgICAgICAgfSlcbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICdNdWx0aVBvbHlnb24nOlxuICAgICAgICAgIGdlb21ldHJ5LmNvb3JkaW5hdGVzLmZvckVhY2goKG11bHRpcG9seWdvbjogYW55KSA9PiB7XG4gICAgICAgICAgICBtdWx0aXBvbHlnb24uZm9yRWFjaCgocG9seWdvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIGhhbmRsZVBvaW50KHBvbHlnb25bMF0pXG4gICAgICAgICAgICAgIGhhbmRsZUxpbmUocG9seWdvbilcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSlcbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICdHZW9tZXRyeUNvbGxlY3Rpb24nOlxuICAgICAgICAgIGdlb21ldHJ5Lmdlb21ldHJpZXMuZm9yRWFjaCgoc3ViZ2VvbWV0cnk6IGFueSkgPT4ge1xuICAgICAgICAgICAgaGFuZGxlR2VvbWV0cnkoc3ViZ2VvbWV0cnkpXG4gICAgICAgICAgfSlcbiAgICAgICAgICBicmVha1xuICAgICAgfVxuICAgIH1cbiAgfSwgW10pXG5cbiAgY29uc3QgY2hlY2tJZkNsdXN0ZXJlZCA9IFJlYWN0LnVzZU1lbW8oKCkgPT4ge1xuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBjb25zdCB1cGRhdGVJc0NsdXN0ZXJlZCA9IGRldGVybWluZUlmQ2x1c3RlcmVkKHtcbiAgICAgICAgY2x1c3RlcnMsXG4gICAgICAgIHJlc3VsdDogbGF6eV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C5oaWRlR2VvbWV0cnkoZ2VvbWV0cnkpXG4gICAgICB9KVxuICAgIH1cbiAgfSwgW10pXG5cbiAgcmV0dXJuIG51bGxcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoR2VvbWV0cnkpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/maps/react/zoom-to-selection.d.ts b/src/main/webapp/component/visualization/maps/react/zoom-to-selection.d.ts new file mode 100644 index 00000000000..9d640265bbe --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/zoom-to-selection.d.ts @@ -0,0 +1,7 @@ +import { LazyQueryResults } from '../../../../js/model/LazyQueryResult/LazyQueryResults'; +type Props = { + lazyResults: LazyQueryResults; + map: any; +}; +declare const _default: ({ lazyResults, map }: Props) => null; +export default _default; diff --git a/src/main/webapp/component/visualization/maps/react/zoom-to-selection.js b/src/main/webapp/component/visualization/maps/react/zoom-to-selection.js new file mode 100644 index 00000000000..971462c06fb --- /dev/null +++ b/src/main/webapp/component/visualization/maps/react/zoom-to-selection.js @@ -0,0 +1,18 @@ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { useSelectedResults } from '../../../../js/model/LazyQueryResult/hooks'; +var ZoomToSelection = function (_a) { + var lazyResults = _a.lazyResults, map = _a.map; + var selectedResults = useSelectedResults({ lazyResults: lazyResults }); + React.useEffect(function () { + var arrayForm = Object.values(selectedResults); + if (arrayForm.length > 0) { + setTimeout(function () { + map.panToResults(Object.values(selectedResults)); + }, 0); + } + }, [selectedResults]); + return null; +}; +export default hot(module)(ZoomToSelection); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiem9vbS10by1zZWxlY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vbWFwcy9yZWFjdC96b29tLXR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gJy4uLy4uLy4uLy4uL2pzL21vZGVsL0xhenlRdWVyeVJlc3VsdC9ob29rcydcbmltcG9ydCB7IExhenlRdWVyeVJlc3VsdHMgfSBmcm9tICcuLi8uLi8uLi8uLi9qcy9tb2RlbC9MYXp5UXVlcnlSZXN1bHQvTGF6eVF1ZXJ5UmVzdWx0cydcblxudHlwZSBQcm9wcyA9IHtcbiAgbGF6eVJlc3VsdHM6IExhenlRdWVyeVJlc3VsdHNcbiAgbWFwOiBhbnlcbn1cblxuY29uc3QgWm9vbVRvU2VsZWN0aW9uID0gKHsgbGF6eVJlc3VsdHMsIG1hcCB9OiBQcm9wcykgPT4ge1xuICBjb25zdCBzZWxlY3RlZFJlc3VsdHMgPSB1c2VTZWxlY3RlZFJlc3VsdHMoeyBsYXp5UmVzdWx0cyB9KVxuXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgY29uc3QgYXJyYXlGb3JtID0gT2JqZWN0LnZhbHVlcyhzZWxlY3RlZFJlc3VsdHMpXG4gICAgaWYgKGFycmF5Rm9ybS5sZW5ndGggPiAwKSB7XG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgbWFwLnBhblRvUmVzdWx0cyhPYmplY3QudmFsdWVzKHNlbGVjdGVkUmVzdWx0cykpXG4gICAgICB9LCAwKVxuICAgIH1cbiAgfSwgW3NlbGVjdGVkUmVzdWx0c10pXG4gIHJldHVybiBudWxsXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFpvb21Ub1NlbGVjdGlvbilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/index.d.ts b/src/main/webapp/component/visualization/results-visual/index.d.ts new file mode 100644 index 00000000000..9e215ce60b8 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/index.d.ts @@ -0,0 +1 @@ +export { default } from './results-visual'; diff --git a/src/main/webapp/component/visualization/results-visual/index.js b/src/main/webapp/component/visualization/results-visual/index.js new file mode 100644 index 00000000000..28210410701 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/index.js @@ -0,0 +1,2 @@ +export { default } from './results-visual'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vcmVzdWx0cy12aXN1YWwvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL3Jlc3VsdHMtdmlzdWFsJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.d.ts b/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.d.ts new file mode 100644 index 00000000000..21a9fdc6a64 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + lazyResults: LazyQueryResult[]; + onClose: () => void; +}; +declare const _default: ({ lazyResults, onClose }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.js b/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.js new file mode 100644 index 00000000000..d90e48992a0 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.js @@ -0,0 +1,24 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import MetacardInteractions from '../../../react-component/metacard-interactions'; +var LazyMetacardInteractions = function (_a) { + var lazyResults = _a.lazyResults, onClose = _a.onClose; + return (React.createElement("div", { className: "py-3" }, + React.createElement(MetacardInteractions, { model: lazyResults, onClose: onClose }))); +}; +export default hot(module)(LazyMetacardInteractions); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS1tZXRhY2FyZC1pbnRlcmFjdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vcmVzdWx0cy12aXN1YWwvbGF6eS1tZXRhY2FyZC1pbnRlcmFjdGlvbnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFFSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxvQkFBb0IsTUFBTSxnREFBZ0QsQ0FBQTtBQVFqRixJQUFNLHdCQU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NvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cblxuaW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBob3QgfSBmcm9tICdyZWFjdC1ob3QtbG9hZGVyJ1xuaW1wb3J0IE1ldGFjYXJkSW50ZXJhY3Rpb25zIGZyb20gJy4uLy4uLy4uL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1pbnRlcmFjdGlvbnMnXG5pbXBvcnQgeyBMYXp5UXVlcnlSZXN1bHQgfSBmcm9tICcuLi8uLi8uLi9qcy9tb2RlbC9MYXp5UXVlcnlSZXN1bHQvTGF6eVF1ZXJ5UmVzdWx0J1xuXG50eXBlIFByb3BzID0ge1xuICBsYXp5UmVzdWx0czogTGF6eVF1ZXJ5UmVzdWx0W11cbiAgb25DbG9zZTogKCkgPT4gdm9pZFxufVxuXG5jb25zdCBMYXp5TWV0YWNhcmRJbnRlcmFjdGlvbnMgPSAoeyBsYXp5UmVzdWx0cywgb25DbG9zZSB9OiBQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXYgY2xhc3NOYW1lPVwicHktM1wiPlxuICAgICAgPE1ldGFjYXJkSW50ZXJhY3Rpb25zIG1vZGVsPXtsYXp5UmVzdWx0c30gb25DbG9zZT17b25DbG9zZX0gLz5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShMYXp5TWV0YWNhcmRJbnRlcmFjdGlvbnMpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/result-item-row.d.ts b/src/main/webapp/component/visualization/results-visual/result-item-row.d.ts new file mode 100644 index 00000000000..529bbeb4949 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/result-item-row.d.ts @@ -0,0 +1,18 @@ +/// +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +type ResultItemFullProps = { + lazyResult: LazyQueryResult; + measure: () => void; + index: number; + results: LazyQueryResult[]; + selectionInterface: any; + headerColWidth: Map; + actionWidth: number; + setMaxActionWidth: (width: number) => void; + addOnWidth: number; + setMaxAddOnWidth: (width: number) => void; +}; +export declare function clearSelection(): void; +export declare function hasSelection(): boolean; +declare const _default: ({ lazyResult, measure: originalMeasure, index, results, selectionInterface, headerColWidth, actionWidth, setMaxActionWidth, addOnWidth, setMaxAddOnWidth, }: ResultItemFullProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/results-visual/result-item-row.js b/src/main/webapp/component/visualization/results-visual/result-item-row.js new file mode 100644 index 00000000000..4af09c5342d --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/result-item-row.js @@ -0,0 +1,227 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Button from '@mui/material/Button'; +import Grid from '@mui/material/Grid'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { CellComponent } from './table-header'; +import { useRerenderOnBackboneSync, useSelectionOfLazyResult, } from '../../../js/model/LazyQueryResult/hooks'; +import user from '../../singletons/user-instance'; +import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; +import CheckBoxIcon from '@mui/icons-material/CheckBox'; +import { SelectionBackground } from './result-item'; +import { useBackbone } from '../../selection-checkbox/useBackbone.hook'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +import useCoordinateFormat from '../../tabs/metacard/useCoordinateFormat'; +import Common from '../../../js/Common'; +import Extensions from '../../../extension-points'; +import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks'; +import wreqr from '../../../js/wreqr'; +import { LayoutContext } from '../../golden-layout/visual-settings.provider'; +import { RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable, } from '../settings-helpers'; +export function clearSelection() { + if (window.getSelection) { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + window.getSelection().removeAllRanges(); + } + else if (document.selection) { + ; + document.selection.empty(); + } +} +export function hasSelection() { + if (window.getSelection) { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + return window.getSelection().toString() !== ''; + } + else if (document.selection) { + return document.selection.toString() !== ''; + } + else { + return false; + } +} +var CheckboxCell = function (_a) { + var lazyResult = _a.lazyResult; + var isSelected = useSelectionOfLazyResult({ lazyResult: lazyResult }); + return (React.createElement(CellComponent, { className: "h-full", style: { width: 'auto', padding: '0px' } }, + React.createElement(Button, { "data-id": "select-checkbox", onClick: function (event) { + event.stopPropagation(); + if (event.shiftKey) { + lazyResult.shiftSelect(); + } + else { + lazyResult.controlSelect(); + } + }, className: "h-full" }, isSelected ? React.createElement(CheckBoxIcon, null) : React.createElement(CheckBoxOutlineBlankIcon, null)))); +}; +var RowComponent = function (_a) { + var lazyResult = _a.lazyResult, originalMeasure = _a.measure, index = _a.index, results = _a.results, selectionInterface = _a.selectionInterface, headerColWidth = _a.headerColWidth, actionWidth = _a.actionWidth, setMaxActionWidth = _a.setMaxActionWidth, addOnWidth = _a.addOnWidth, setMaxAddOnWidth = _a.setMaxAddOnWidth; + var _b = React.useContext(LayoutContext), getValue = _b.getValue, onStateChanged = _b.onStateChanged; + var MetacardDefinitions = useMetacardDefinitions(); + var thumbnail = lazyResult.plain.metacard.properties.thumbnail; + var _c = __read(React.useState(TypedUserInstance.getDecimalPrecision()), 2), decimalPrecision = _c[0], setDecimalPrecision = _c[1]; + var _d = __read(React.useState(getValue(RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable())), 2), shownAttributes = _d[0], setShownAttributes = _d[1]; + var isLast = index === results.length - 1; + var listenTo = useBackbone().listenTo; + var convertToFormat = useCoordinateFormat(); + var convertToPrecision = function (value) { + return value && decimalPrecision + ? Number(value).toFixed(decimalPrecision) + : value; + }; + useRerenderOnBackboneSync({ lazyResult: lazyResult }); + var actionRef = React.useRef(null); + var addOnRef = React.useRef(null); + React.useEffect(function () { + var _a, _b; + var actionWidth = ((_a = actionRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) || 0; + setMaxActionWidth(actionWidth); + var addOnWidth = ((_b = addOnRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().width) || 0; + setMaxAddOnWidth(addOnWidth); + }); + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:decimalPrecision', function () { + setDecimalPrecision(TypedUserInstance.getDecimalPrecision()); + }); + onStateChanged(function () { + var shownList = getValue(RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable()); + setShownAttributes(shownList); + }); + }, []); + var imgsrc = Common.getImageSrc(thumbnail); + var measure = function () { + var _a, _b; + if (((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) && + ((_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.clientHeight) > 0) { + originalMeasure(); + } + }; + React.useEffect(function () { + measure(); + }, [shownAttributes, convertToFormat]); + var getDisplayValue = function (value, property) { + if (value && MetacardDefinitions.getAttributeMap()[property]) { + switch (MetacardDefinitions.getAttributeMap()[property].type) { + case 'GEOMETRY': + return convertToFormat(value); + case 'LONG': + case 'DOUBLE': + case 'FLOAT': + return convertToPrecision(value); + } + } + return value; + }; + listenTo(wreqr.vent, 'activeContentItemChanged', function () { + measure(); + }); + var containerRef = React.useRef(null); + var ResultItemActionInstance = Extensions.resultItemAction({ + lazyResult: lazyResult, + selectionInterface: selectionInterface, + itemContentRef: containerRef, + }); + var ResultItemAddOnInstance = Extensions.resultItemRowAddOn({ + lazyResult: lazyResult, + isTableView: true, + }); + return (React.createElement("div", { ref: containerRef }, + React.createElement("div", { className: "bg-inherit flex items-strech flex-nowrap", style: { + width: actionWidth + addOnWidth + shownAttributes.length * 200 + 'px', + } }, + React.createElement("div", { key: "resultItemAction", className: "bg-inherit Mui-border-divider border ".concat(isLast ? '' : 'border-b-0', " border-l-0 ").concat(index === 0 ? 'border-t-0' : '') }, ResultItemActionInstance ? (React.createElement(CellComponent, { key: "resultItemAction", className: "h-full", style: { + width: 'auto', + padding: 0, + }, ref: actionRef }, + React.createElement(ResultItemActionInstance, null))) : (React.createElement("div", { style: { width: actionWidth } }))), + React.createElement("div", { className: "sticky left-0 w-auto z-10 bg-inherit Mui-border-divider border ".concat(isLast ? '' : 'border-b-0', " border-l-0 ").concat(index === 0 ? 'border-t-0' : '') }, + React.createElement(SelectionBackground, { lazyResult: lazyResult }), + React.createElement(CheckboxCell, { lazyResult: lazyResult })), + React.createElement("div", { className: "relative Mui-border-divider border border-b-0 border-r-0 border-l-0 ".concat(index === 0 ? 'border-t-0' : '') }, + React.createElement(SelectionBackground, { lazyResult: lazyResult, style: { width: addOnWidth + shownAttributes.length * 200 + 'px' } }), + React.createElement(Button, { "data-id": "result-item-row-container-button", onMouseDown: function (event) { + /** + * Shift key can cause selections since we set the class to allow text selection, + * so the only scenario we want to prevent that in is when shift clicking + */ + if (event.shiftKey) { + clearSelection(); + } + }, onClick: function (event) { + if (hasSelection()) { + return; + } + if (event.shiftKey) { + lazyResult.shiftSelect(); + } + else if (event.ctrlKey || event.metaKey) { + lazyResult.controlSelect(); + } + else { + lazyResult.select(); + } + }, disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, className: "outline-none rounded-none select-text p-0 text-left break-words h-full" }, + React.createElement("div", { className: "w-full h-full" }, + React.createElement(Grid, { container: true, direction: "row", className: "h-full", wrap: "nowrap" }, + React.createElement("div", { key: "resultItemAddOn", className: "Mui-border-divider border border-t-0 border-l-0 ".concat(isLast ? '' : 'border-b-0', " h-full") }, + React.createElement("div", { style: { width: addOnWidth } }, ResultItemAddOnInstance && (React.createElement(CellComponent, { key: "resultItemAddOn", style: { + width: 'auto', + }, className: "pt-3", ref: addOnRef }, ResultItemAddOnInstance)))), + shownAttributes.map(function (property) { + var value = lazyResult.plain.metacard.properties[property]; + if (value === undefined) { + value = ''; + } + if (value.constructor !== Array) { + value = [value]; + } + if (value && + MetacardDefinitions.getAttributeMap()[property]) { + switch (MetacardDefinitions.getAttributeMap()[property].type) { + case 'DATE': + value = value.map(function (val) { + return val !== undefined && val !== '' + ? user.getUserReadableDateTime(val) + : ''; + }); + break; + default: + break; + } + } + return (React.createElement("div", { key: property }, + React.createElement(CellComponent, { key: property, "data-property": "".concat(property), className: "Mui-border-divider border border-t-0 border-l-0 ".concat(isLast ? '' : 'border-b-0', " h-full"), "data-value": "".concat(value), style: { + width: "".concat(headerColWidth.get(property)), + minWidth: '200px', + } }, property === 'thumbnail' && thumbnail ? (React.createElement("img", { "data-id": "thumbnail-value", src: imgsrc, style: { + maxWidth: '100%', + maxHeight: '100%', + }, onLoad: function () { + measure(); + }, onError: function () { + measure(); + } })) : (React.createElement(React.Fragment, null, + React.createElement("div", { "data-id": "".concat(property, "-value"), style: { wordBreak: 'break-word' } }, value.map(function (curValue, index) { + return (React.createElement("span", { key: index, "data-value": "".concat(curValue) }, curValue.toString().startsWith('http') ? (React.createElement("a", { href: "".concat(curValue), target: "_blank", rel: "noopener noreferrer" }, MetacardDefinitions.getAlias(property))) : ("".concat(value.length > 1 && + index < value.length - 1 + ? getDisplayValue(curValue, property) + ', ' + : getDisplayValue(curValue, property))))); + }))))))); + })))))))); +}; +export default hot(module)(RowComponent); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0LWl0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ICAgICAgICA8Q2VsbENvbXBvbmVudFxuICAgICAgICAgICAgICBrZXk9XCJyZXN1bHRJdGVtQWN0aW9uXCJcbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiaC1mdWxsXCJcbiAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICB3aWR0aDogJ2F1dG8nLFxuICAgICAgICAgICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIHJlZj17YWN0aW9uUmVmfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8UmVzdWx0SXRlbUFjdGlvbkluc3RhbmNlIC8+XG4gICAgICAgICAgICA8L0NlbGxDb21wb25lbnQ+XG4gICAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDxkaXYgc3R5bGU9e3sgd2lkdGg6IGFjdGlvbldpZHRoIH19IC8+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjbGFzc05hbWU9e2BzdGlja3kgbGVmdC0wIHctYXV0byB6LTEwIGJnLWluaGVyaXQgTXVpLWJvcmRlci1kaXZpZGVyIGJvcmRlciAke1xuICAgICAgICAgICAgaXNMYXN0ID8gJycgOiAnYm9yZGVyLWItMCdcbiAgICAgICAgICB9IGJvcmRlci1sLTAgJHtpbmRleCA9PT0gMCA/ICdib3JkZXItdC0wJyA6ICcnfWB9XG4gICAgICAgID5cbiAgICAgICAgICA8U2VsZWN0aW9uQmFja2dyb3VuZCBsYXp5UmVzdWx0PXtsYXp5UmVzdWx0fSAvPlxuICAgICAgICAgIDxDaGVja2JveENlbGwgbGF6eVJlc3VsdD17bGF6eVJlc3VsdH0gLz5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjbGFzc05hbWU9e2ByZWxhdGl2ZSBNdWktYm9yZGVyLWRpdmlkZXIgYm9yZGVyIGJvcmRlci1iLTAgYm9yZGVyLXItMCBib3JkZXItbC0wICR7XG4gICAgICAgICAgICBpbmRleCA9PT0gMCA/ICdib3JkZXItdC0wJyA6ICcnXG4gICAgICAgICAgfWB9XG4gICAgICAgID5cbiAgICAgICAgICA8U2VsZWN0aW9uQmFja2dyb3VuZFxuICAgICAgICAgICAgbGF6eVJlc3VsdD17bGF6eVJlc3VsdH1cbiAgICAgICAgICAgIHN0eWxlPXt7IHdpZHRoOiBhZGRPbldpZHRoICsgc2hvd25BdHRyaWJ1dGVzLmxlbmd0aCAqIDIwMCArICdweCcgfX1cbiAgICAgICAgICAvPlxuICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgIGRhdGEtaWQ9XCJyZXN1bHQtaXRlbS1yb3ctY29udGFpbmVyLWJ1dHRvblwiXG4gICAgICAgICAgICBvbk1vdXNlRG93bj17KGV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICAgKiBTaGlmdCBrZXkgY2FuIGNhdXNlIHNlbGVjdGlvbnMgc2luY2Ugd2Ugc2V0IHRoZSBjbGFzcyB0byBhbGxvdyB0ZXh0IHNlbGVjdGlvbixcbiAgICAgICAgICAgICAgICogc28gdGhlIG9ubHkgc2NlbmFyaW8gd2Ugd2FudCB0byBwcmV2ZW50IHRoYXQgaW4gaXMgd2hlbiBzaGlmdCBjbGlja2luZ1xuICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgaWYgKGV2ZW50LnNoaWZ0S2V5KSB7XG4gICAgICAgICAgICAgICAgY2xlYXJTZWxlY3Rpb24oKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgb25DbGljaz17KGV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgIGlmIChoYXNTZWxlY3Rpb24oKSkge1xuICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChldmVudC5zaGlmdEtleSkge1xuICAgICAgICAgICAgICAgIGxhenlSZXN1bHQuc2hpZnRTZWxlY3QoKVxuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGV2ZW50LmN0cmxLZXkgfHwgZXZlbnQubWV0YUtleSkge1xuICAgICAgICAgICAgICAgIGxhenlSZXN1bHQuY29udHJvbFNlbGVjdCgpXG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGF6eVJlc3VsdC5zZWxlY3QoKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgZGlzYWJsZUZvY3VzUmlwcGxlXG4gICAgICAgICAgICBkaXNhYmxlUmlwcGxlXG4gICAgICAgICAgICBkaXNhYmxlVG91Y2hSaXBwbGVcbiAgICAgICAgICAgIGNsYXNzTmFtZT1cIm91dGxpbmUtbm9uZSByb3VuZGVkLW5vbmUgc2VsZWN0LXRleHQgcC0wIHRleHQtbGVmdCBicmVhay13b3JkcyBoLWZ1bGxcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiPlxuICAgICAgICAgICAgICA8R3JpZCBjb250YWluZXIgZGlyZWN0aW9uPVwicm93XCIgY2xhc3NOYW1lPVwiaC1mdWxsXCIgd3JhcD1cIm5vd3JhcFwiPlxuICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgIGtleT1cInJlc3VsdEl0ZW1BZGRPblwiXG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2BNdWktYm9yZGVyLWRpdmlkZXIgYm9yZGVyIGJvcmRlci10LTAgYm9yZGVyLWwtMCAke1xuICAgICAgICAgICAgICAgICAgICBpc0xhc3QgPyAnJyA6ICdib3JkZXItYi0wJ1xuICAgICAgICAgICAgICAgICAgfSBoLWZ1bGxgfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxkaXYgc3R5bGU9e3sgd2lkdGg6IGFkZE9uV2lkdGggfX0+XG4gICAgICAgICAgICAgICAgICAgIHtSZXN1bHRJdGVtQWRkT25JbnN0YW5jZSAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgPENlbGxDb21wb25lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleT1cInJlc3VsdEl0ZW1BZGRPblwiXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJ2F1dG8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cInB0LTNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmPXthZGRPblJlZn1cbiAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICB7UmVzdWx0SXRlbUFkZE9uSW5zdGFuY2V9XG4gICAgICAgICAgICAgICAgICAgICAgPC9DZWxsQ29tcG9uZW50PlxuICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAge3Nob3duQXR0cmlidXRlcy5tYXAoKHByb3BlcnR5KSA9PiB7XG4gICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBsYXp5UmVzdWx0LnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXNbXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5XG4gICAgICAgICAgICAgICAgICBdIGFzIGFueVxuICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSAnJ1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmNvbnN0cnVjdG9yICE9PSBBcnJheSkge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IFt2YWx1ZV1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgJiZcbiAgICAgICAgICAgICAgICAgICAgTWV0YWNhcmREZWZpbml0aW9ucy5nZXRBdHRyaWJ1dGVNYXAoKVtwcm9wZXJ0eV1cbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKFxuICAgICAgICAgICAgICAgICAgICAgIE1ldGFjYXJkRGVmaW5pdGlvbnMuZ2V0QXR0cmlidXRlTWFwKClbcHJvcGVydHldLnR5cGVcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgY2FzZSAnREFURSc6XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLm1hcCgodmFsOiBhbnkpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHZhbCAhPT0gdW5kZWZpbmVkICYmIHZhbCAhPT0gJydcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHVzZXIuZ2V0VXNlclJlYWRhYmxlRGF0ZVRpbWUodmFsKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJydcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgIDxkaXYga2V5PXtwcm9wZXJ0eX0+XG4gICAgICAgICAgICAgICAgICAgICAgPENlbGxDb21wb25lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleT17cHJvcGVydHl9XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLXByb3BlcnR5PXtgJHtwcm9wZXJ0eX1gfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgTXVpLWJvcmRlci1kaXZpZGVyIGJvcmRlciBib3JkZXItdC0wIGJvcmRlci1sLTAgJHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaXNMYXN0ID8gJycgOiAnYm9yZGVyLWItMCdcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gaC1mdWxsYH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEtdmFsdWU9e2Ake3ZhbHVlfWB9XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogYCR7aGVhZGVyQ29sV2lkdGguZ2V0KHByb3BlcnR5KX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5XaWR0aDogJzIwMHB4JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAge3Byb3BlcnR5ID09PSAndGh1bWJuYWlsJyAmJiB0aHVtYm5haWwgPyAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxpbWdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLWlkPVwidGh1bWJuYWlsLXZhbHVlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcmM9e2ltZ3NyY31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4V2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heEhlaWdodDogJzEwMCUnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25Mb2FkPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZWFzdXJlKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uRXJyb3I9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lYXN1cmUoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgICAgICAgICA8UmVhY3QuRnJhZ21lbnQ+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS1pZD17YCR7cHJvcGVydHl9LXZhbHVlYH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7IHdvcmRCcmVhazogJ2JyZWFrLXdvcmQnIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3ZhbHVlLm1hcCgoY3VyVmFsdWU6IGFueSwgaW5kZXg6IG51bWJlcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGtleT17aW5kZXh9IGRhdGEtdmFsdWU9e2Ake2N1clZhbHVlfWB9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2N1clZhbHVlLnRvU3RyaW5nKCkuc3RhcnRzV2l0aCgnaHR0cCcpID8gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhyZWY9e2Ake2N1clZhbHVlfWB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0PVwiX2JsYW5rXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWw9XCJub29wZW5lciBub3JlZmVycmVyXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtNZXRhY2FyZERlZmluaXRpb25zLmdldEFsaWFzKHByb3BlcnR5KX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYCR7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUubGVuZ3RoID4gMSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4IDwgdmFsdWUubGVuZ3RoIC0gMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBnZXREaXNwbGF5VmFsdWUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VyVmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydHlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSArICcsICdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogZ2V0RGlzcGxheVZhbHVlKGN1clZhbHVlLCBwcm9wZXJ0eSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgPC9DZWxsQ29tcG9uZW50PlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFJvd0NvbXBvbmVudClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/result-item.collection.d.ts b/src/main/webapp/component/visualization/results-visual/result-item.collection.d.ts new file mode 100644 index 00000000000..b2231810af4 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/result-item.collection.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { VariableSizeList } from 'react-window'; +type Props = { + mode: any; + setMode: any; + selectionInterface: any; +}; +export declare const useScrollToItemOnSelection: ({ selectionInterface, }: { + selectionInterface: Props['selectionInterface']; +}) => { + listRef: React.MutableRefObject; + setLastInteraction: React.Dispatch>; +}; +declare const _default: ({ mode, setMode, selectionInterface }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/results-visual/result-item.collection.js b/src/main/webapp/component/visualization/results-visual/result-item.collection.js new file mode 100644 index 00000000000..1fadeb2f74f --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/result-item.collection.js @@ -0,0 +1,198 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import ResultItem from './result-item'; +import { hot } from 'react-hot-loader'; +import { AutoVariableSizeList } from 'react-window-components'; +import Grid from '@mui/material/Grid'; +import Button from '@mui/material/Button'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../../theme/theme'; +import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks'; +import { useSelectedResults, useStatusOfLazyResults, } from '../../../js/model/LazyQueryResult/hooks'; +import { useTheme } from '@mui/material/styles'; +import LinearProgress from '@mui/material/LinearProgress'; +import ViewAgendaIcon from '@mui/icons-material/ViewAgenda'; +import TableChartIcon from '@mui/icons-material/TableChart'; +import { HeaderCheckbox } from './table-header'; +import { DarkDivider } from '../../dark-divider/dark-divider'; +import { ResultsCommonControls } from './table'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +import { Memo } from '../../memo/memo'; +import { LayoutContext } from '../../golden-layout/visual-settings.provider'; +import { RESULTS_ATTRIBUTES_LIST, getDefaultResultsShownList, } from '../settings-helpers'; +function scrollToItem(_a) { + var listRef = _a.listRef, index = _a.index, animationFrameId = _a.animationFrameId, currentScrollOffset = _a.currentScrollOffset, lastChangedTime = _a.lastChangedTime; + animationFrameId.current = window.requestAnimationFrame(function () { + var timeSinceLastChange = Date.now() - lastChangedTime.current; + if (timeSinceLastChange > 1000) { + return; + } + if (listRef.state.scrollOffset !== currentScrollOffset.current) { + lastChangedTime.current = Date.now(); + currentScrollOffset.current = listRef.state.scrollOffset; + } + if (!listRef.state.isScrolling) { + listRef.scrollToItem(index, 'smart'); + } + scrollToItem({ + listRef: listRef, + index: index, + animationFrameId: animationFrameId, + currentScrollOffset: currentScrollOffset, + lastChangedTime: lastChangedTime, + }); + }); +} +function startScrollingToItem(_a) { + var listRef = _a.listRef, index = _a.index, animationFrameId = _a.animationFrameId, currentScrollOffset = _a.currentScrollOffset, lastChangedTime = _a.lastChangedTime; + lastChangedTime.current = Date.now(); + currentScrollOffset.current = listRef.state.scrollOffset; + listRef.scrollToItem(index, 'smart'); + scrollToItem({ + listRef: listRef, + index: index, + animationFrameId: animationFrameId, + currentScrollOffset: currentScrollOffset, + lastChangedTime: lastChangedTime, + }); +} +export var useScrollToItemOnSelection = function (_a) { + var selectionInterface = _a.selectionInterface; + var _b = __read(React.useState(null), 2), lastInteraction = _b[0], setLastInteraction = _b[1]; + var listRef = React.useRef(null); + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResults = useSelectedResults({ lazyResults: lazyResults }); + var animationFrameId = React.useRef(null); + var currentScrollOffset = React.useRef(null); + var lastChangedTime = React.useRef(null); + React.useEffect(function () { + var allResults = Object.values(lazyResults.results); + var selected = Object.values(selectedResults); + if (listRef.current && + selected.length >= 1 && + Date.now() - (lastInteraction || 0) > 500) { + startScrollingToItem({ + listRef: listRef.current, + index: allResults.indexOf(selected[0]), + animationFrameId: animationFrameId, + currentScrollOffset: currentScrollOffset, + lastChangedTime: lastChangedTime, + }); + } + return function () { + window.cancelAnimationFrame(animationFrameId.current); + }; + }, [selectedResults, lazyResults, lastInteraction]); + return { listRef: listRef, setLastInteraction: setLastInteraction }; +}; +var ResultCards = function (_a) { + var mode = _a.mode, setMode = _a.setMode, selectionInterface = _a.selectionInterface; + var _b = React.useContext(LayoutContext), setValue = _b.setValue, getValue = _b.getValue; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var results = Object.values(lazyResults.results); + var theme = useTheme(); + var _c = useStatusOfLazyResults({ lazyResults: lazyResults }), isSearching = _c.isSearching, status = _c.status; + /** + * Note that this scenario only plays out when the component is first created, so if this is open before a search is run it will already be mounted. + * + * This is solely to keep the illusion of responsiveness when switching from table mode to list mode (or dropping a new result visual in) + */ + var _d = __read(React.useState(false), 2), isMounted = _d[0], setIsMounted = _d[1]; + var _e = useScrollToItemOnSelection({ + selectionInterface: selectionInterface, + }), listRef = _e.listRef, setLastInteraction = _e.setLastInteraction; + React.useEffect(function () { + var mountedTimeout = setTimeout(function () { + setIsMounted(true); + }, 1000); + return function () { + clearTimeout(mountedTimeout); + }; + }, []); + return (React.createElement(Grid, { container: true, className: "w-full h-full", direction: "column", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Grid, { container: true, className: "w-full pt-2 px-2", direction: "row", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "pl-6" }, + React.createElement(HeaderCheckbox, { showText: true, lazyResults: lazyResults, buttonProps: { + style: { + minWidth: 0, + }, + } })), + React.createElement(ResultsCommonControls, { getStartingLeft: function () { + return getValue(RESULTS_ATTRIBUTES_LIST, getDefaultResultsShownList()); + }, getStartingRight: function () { + return TypedUserInstance.getResultsAttributesPossibleList(getValue(RESULTS_ATTRIBUTES_LIST)); + }, onSave: function (active) { return setValue(RESULTS_ATTRIBUTES_LIST, active); } }), + React.createElement(Grid, { item: true, className: "pr-2" }, + React.createElement(Button, { "data-id": "list-button", onClick: function () { + setMode('card'); + }, style: { + borderBottom: mode === 'card' + ? "1px solid ".concat(theme.palette.primary.main) + : '1px solid transparent', + } }, + React.createElement(ViewAgendaIcon, null), + "List")), + React.createElement(Grid, { item: true }, + React.createElement(Button, { "data-id": "table-button", onClick: function () { + setMode('table'); + }, style: { + borderBottom: mode === 'table' + ? "1px solid ".concat(theme.palette.primary.main) + : '1px solid transparent', + } }, + React.createElement(TableChartIcon, null), + "Table")))), + React.createElement(DarkDivider, { className: "w-full h-min my-2" }), + React.createElement(Grid, { item: true, className: "w-full h-full p-2" }, + React.createElement(Paper, { elevation: Elevations.paper, className: "w-full h-full" }, isMounted ? (React.createElement(Memo, { dependencies: [ + listRef.current, + lazyResults.results, + isSearching, + status, + ] }, + React.createElement(AutoVariableSizeList, { controlledMeasuring: true, items: results, defaultSize: 60, overscanCount: 10, Item: function (_a) { + var itemRef = _a.itemRef, item = _a.item, measure = _a.measure, index = _a.index, width = _a.width; + return (React.createElement("div", { ref: itemRef, className: "relative" }, + index !== 0 ? (React.createElement(React.Fragment, null, + React.createElement("div", { className: "h-min w-full Mui-bg-divider" }))) : null, + React.createElement(ResultItem, { lazyResults: results, lazyResult: item, selectionInterface: selectionInterface, measure: measure, index: index, width: width }), + index === results.length - 1 ? (React.createElement(React.Fragment, null, + React.createElement("div", { className: "h-min w-full Mui-bg-divider" }))) : null)); + }, Empty: function () { + if (Object.values(status).length === 0) { + return (React.createElement("div", { className: "p-2" }, "Search has not yet been run.")); + } + if (isSearching) { + return React.createElement(LinearProgress, { variant: "indeterminate" }); + } + return (React.createElement("div", { className: "result-item-collection-empty p-2" }, "No Results Found")); + }, outerElementProps: { + onMouseEnter: function () { + setLastInteraction(Date.now()); + }, + onMouseUp: function () { + setLastInteraction(Date.now()); + }, + }, variableSizeListRef: listRef }))) : (React.createElement(LinearProgress, { variant: "indeterminate" })))))); +}; +export default hot(module)(ResultCards); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0LWl0ZW0uY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9yZXN1bHRzLXZpc3VhbC9yZXN1bHQtaXRlbS5jb2xsZWN0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0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EhlYWRlckNoZWNrYm94XG4gICAgICAgICAgICAgIHNob3dUZXh0XG4gICAgICAgICAgICAgIGxhenlSZXN1bHRzPXtsYXp5UmVzdWx0c31cbiAgICAgICAgICAgICAgYnV0dG9uUHJvcHM9e3tcbiAgICAgICAgICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgICAgICAgbWluV2lkdGg6IDAsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgIDxSZXN1bHRzQ29tbW9uQ29udHJvbHNcbiAgICAgICAgICAgIGdldFN0YXJ0aW5nTGVmdD17KCkgPT5cbiAgICAgICAgICAgICAgZ2V0VmFsdWUoUkVTVUxUU19BVFRSSUJVVEVTX0xJU1QsIGdldERlZmF1bHRSZXN1bHRzU2hvd25MaXN0KCkpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBnZXRTdGFydGluZ1JpZ2h0PXsoKSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBUeXBlZFVzZXJJbnN0YW5jZS5nZXRSZXN1bHRzQXR0cmlidXRlc1Bvc3NpYmxlTGlzdChcbiAgICAgICAgICAgICAgICBnZXRWYWx1ZShSRVNVTFRTX0FUVFJJQlVURVNfTElTVClcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIG9uU2F2ZT17KGFjdGl2ZSkgPT4gc2V0VmFsdWUoUkVTVUxUU19BVFRSSUJVVEVTX0xJU1QsIGFjdGl2ZSl9XG4gICAgICAgICAgLz5cbiAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInByLTJcIj5cbiAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgZGF0YS1pZD1cImxpc3QtYnV0dG9uXCJcbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgIHNldE1vZGUoJ2NhcmQnKVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgIGJvcmRlckJvdHRvbTpcbiAgICAgICAgICAgICAgICAgIG1vZGUgPT09ICdjYXJkJ1xuICAgICAgICAgICAgICAgICAgICA/IGAxcHggc29saWQgJHt0aGVtZS5wYWxldHRlLnByaW1hcnkubWFpbn1gXG4gICAgICAgICAgICAgICAgICAgIDogJzFweCBzb2xpZCB0cmFuc3BhcmVudCcsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxWaWV3QWdlbmRhSWNvbiAvPlxuICAgICAgICAgICAgICBMaXN0XG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgPEdyaWQgaXRlbT5cbiAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgZGF0YS1pZD1cInRhYmxlLWJ1dHRvblwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICBzZXRNb2RlKCd0YWJsZScpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgICAgYm9yZGVyQm90dG9tOlxuICAgICAgICAgICAgICAgICAgbW9kZSA9PT0gJ3RhYmxlJ1xuICAgICAgICAgICAgICAgICAgICA/IGAxcHggc29saWQgJHt0aGVtZS5wYWxldHRlLnByaW1hcnkubWFpbn1gXG4gICAgICAgICAgICAgICAgICAgIDogJzFweCBzb2xpZCB0cmFuc3BhcmVudCcsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxUYWJsZUNoYXJ0SWNvbiAvPlxuICAgICAgICAgICAgICBUYWJsZVxuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICA8L0dyaWQ+XG4gICAgICA8L0dyaWQ+XG4gICAgICA8RGFya0RpdmlkZXIgY2xhc3NOYW1lPVwidy1mdWxsIGgtbWluIG15LTJcIiAvPlxuICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1mdWxsIHAtMlwiPlxuICAgICAgICA8UGFwZXIgZWxldmF0aW9uPXtFbGV2YXRpb25zLnBhcGVyfSBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1mdWxsXCI+XG4gICAgICAgICAge2lzTW91bnRlZCA/IChcbiAgICAgICAgICAgIDxNZW1vXG4gICAgICAgICAgICAgIGRlcGVuZGVuY2llcz17W1xuICAgICAgICAgICAgICAgIGxpc3RSZWYuY3VycmVudCxcbiAgICAgICAgICAgICAgICBsYXp5UmVzdWx0cy5yZXN1bHRzLFxuICAgICAgICAgICAgICAgIGlzU2VhcmNoaW5nLFxuICAgICAgICAgICAgICAgIHN0YXR1cyxcbiAgICAgICAgICAgICAgXX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPEF1dG9WYXJpYWJsZVNpemVMaXN0PExhenlRdWVyeVJlc3VsdCwgSFRNTERpdkVsZW1lbnQ+XG4gICAgICAgICAgICAgICAgY29udHJvbGxlZE1lYXN1cmluZz17dHJ1ZX1cbiAgICAgICAgICAgICAgICBpdGVtcz17cmVzdWx0c31cbiAgICAgICAgICAgICAgICBkZWZhdWx0U2l6ZT17NjB9XG4gICAgICAgICAgICAgICAgb3ZlcnNjYW5Db3VudD17MTB9XG4gICAgICAgICAgICAgICAgSXRlbT17KHsgaXRlbVJlZiwgaXRlbSwgbWVhc3VyZSwgaW5kZXgsIHdpZHRoIH0pID0+IHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgcmVmPXtpdGVtUmVmfSBjbGFzc05hbWU9XCJyZWxhdGl2ZVwiPlxuICAgICAgICAgICAgICAgICAgICAgIHtpbmRleCAhPT0gMCA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiaC1taW4gdy1mdWxsIE11aS1iZy1kaXZpZGVyXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgICAgICAgICAgICAgIDxSZXN1bHRJdGVtXG4gICAgICAgICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0cz17cmVzdWx0c31cbiAgICAgICAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHQ9e2l0ZW19XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2U9e3NlbGVjdGlvbkludGVyZmFjZX1cbiAgICAgICAgICAgICAgICAgICAgICAgIG1lYXN1cmU9e21lYXN1cmV9XG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleD17aW5kZXh9XG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aD17d2lkdGh9XG4gICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICB7aW5kZXggPT09IHJlc3VsdHMubGVuZ3RoIC0gMSA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiaC1taW4gdy1mdWxsIE11aS1iZy1kaXZpZGVyXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIEVtcHR5PXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnZhbHVlcyhzdGF0dXMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicC0yXCI+U2VhcmNoIGhhcyBub3QgeWV0IGJlZW4gcnVuLjwvZGl2PlxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBpZiAoaXNTZWFyY2hpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDxMaW5lYXJQcm9ncmVzcyB2YXJpYW50PVwiaW5kZXRlcm1pbmF0ZVwiIC8+XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInJlc3VsdC1pdGVtLWNvbGxlY3Rpb24tZW1wdHkgcC0yXCI+XG4gICAgICAgICAgICAgICAgICAgICAgTm8gUmVzdWx0cyBGb3VuZFxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIG91dGVyRWxlbWVudFByb3BzPXt7XG4gICAgICAgICAgICAgICAgICBvbk1vdXNlRW50ZXI6ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2V0TGFzdEludGVyYWN0aW9uKERhdGUubm93KCkpXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgb25Nb3VzZVVwOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHNldExhc3RJbnRlcmFjdGlvbihEYXRlLm5vdygpKVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIHZhcmlhYmxlU2l6ZUxpc3RSZWY9e2xpc3RSZWZ9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L01lbW8+XG4gICAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDxMaW5lYXJQcm9ncmVzcyB2YXJpYW50PVwiaW5kZXRlcm1pbmF0ZVwiIC8+XG4gICAgICAgICAgKX1cbiAgICAgICAgPC9QYXBlcj5cbiAgICAgIDwvR3JpZD5cbiAgICA8L0dyaWQ+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUmVzdWx0Q2FyZHMpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/result-item.d.ts b/src/main/webapp/component/visualization/results-visual/result-item.d.ts new file mode 100644 index 00000000000..ea919548bbe --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/result-item.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +type ResultItemBasicProps = { + lazyResults: LazyQueryResult[]; + lazyResult: LazyQueryResult; + selectionInterface: any; +}; +type ResultItemFullProps = ResultItemBasicProps & { + measure: () => void; + index: number; + width: number; +}; +export declare const getIconClassName: ({ lazyResult, }: { + lazyResult: LazyQueryResult; +}) => string; +export declare const SelectionBackground: ({ lazyResult, }: { + lazyResult: LazyQueryResult; + style?: React.CSSProperties | undefined; +}) => JSX.Element; +export declare const ResultItem: ({ lazyResult, measure: originalMeasure, selectionInterface, }: ResultItemFullProps) => JSX.Element; +declare const _default: ({ lazyResult, measure: originalMeasure, selectionInterface, }: ResultItemFullProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/results-visual/result-item.js b/src/main/webapp/component/visualization/results-visual/result-item.js new file mode 100644 index 00000000000..dad487d8271 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/result-item.js @@ -0,0 +1,438 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import LazyMetacardInteractions from './lazy-metacard-interactions'; +import IconHelper from '../../../js/IconHelper'; +import user from '../../singletons/user-instance'; +import Button from '@mui/material/Button'; +import LinkIcon from '@mui/icons-material/Link'; +import GetAppIcon from '@mui/icons-material/GetApp'; +import Grid from '@mui/material/Grid'; +import { hot } from 'react-hot-loader'; +import Paper from '@mui/material/Paper'; +import Tooltip from '@mui/material/Tooltip'; +import MoreIcon from '@mui/icons-material/MoreVert'; +import WarningIcon from '@mui/icons-material/Warning'; +import { useBackbone } from '../../selection-checkbox/useBackbone.hook'; +import { useRerenderOnBackboneSync, useSelectionOfLazyResult, } from '../../../js/model/LazyQueryResult/hooks'; +import Extensions from '../../../extension-points'; +import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; +import CheckIcon from '@mui/icons-material/Check'; +import CheckBoxIcon from '@mui/icons-material/CheckBox'; +import { Elevations } from '../../theme/theme'; +import TouchRipple from '@mui/material/ButtonBase/TouchRipple'; +import { clearSelection, hasSelection } from './result-item-row'; +import { useLazyResultsSelectedResultsFromSelectionInterface } from '../../selection-interface/hooks'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +import useCoordinateFormat from '../../tabs/metacard/useCoordinateFormat'; +import EditIcon from '@mui/icons-material/Edit'; +import { Link } from '../../link/link'; +import { useMenuState } from '../../menu-state/menu-state'; +import Popover from '@mui/material/Popover'; +import Common from '../../../js/Common'; +import ExtensionPoints from '../../../extension-points/extension-points'; +import { StartupDataStore } from '../../../js/model/Startup/startup'; +import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks'; +import wreqr from '../../../js/wreqr'; +import { useDialog } from '../../dialog'; +import { useDownloadComponent } from '../../download/download'; +import { LayoutContext } from '../../golden-layout/visual-settings.provider'; +import { RESULTS_ATTRIBUTES_LIST, getDefaultResultsShownList, } from '../settings-helpers'; +var PropertyComponent = function (props) { + return (React.createElement("div", __assign({}, props, { className: "overflow-auto", style: { + marginTop: '10px', + opacity: '.7', + maxHeight: '200px', + minHeight: '21px', // firefox will show scroll bars all the time unless we do this minHeight :S + } }))); +}; +var showSource = function () { + return (StartupDataStore.Configuration.getResultShow().find(function (additionalProperty) { + return additionalProperty === 'source-id'; + }) !== undefined); +}; +var showRelevanceScore = function (_a) { + var lazyResult = _a.lazyResult; + return (StartupDataStore.Configuration.getShowRelevanceScores() && + lazyResult.hasRelevance()); +}; +export var getIconClassName = function (_a) { + var lazyResult = _a.lazyResult; + if (lazyResult.isRevision()) { + return 'fa fa-history'; + } + else if (lazyResult.isResource()) { + return IconHelper.getClassByMetacardObject(lazyResult.plain); + } + else if (lazyResult.isDeleted()) { + return 'fa fa-trash'; + } + return IconHelper.getClassByMetacardObject(lazyResult.plain); +}; +// @ts-expect-error ts-migrate(6133) FIXME: 'MultiSelectActions' is declared but its value is ... Remove this comment to see the full error message +var MultiSelectActions = function (_a) { + var selectionInterface = _a.selectionInterface; + var selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResultsArray = Object.values(selectedResults); + var metacardInteractionMenuState = useMenuState(); + return (React.createElement(React.Fragment, null, + React.createElement(Button, { component: "div", className: selectedResultsArray.length === 0 ? 'relative' : 'relative', color: "primary", disabled: selectedResultsArray.length === 0, onClick: function (e) { + e.stopPropagation(); + metacardInteractionMenuState.handleClick(); + }, ref: metacardInteractionMenuState.anchorRef, style: { height: '100%' }, size: "small" }, + selectedResultsArray.length, + " selected", + React.createElement(MoreIcon, { className: "Mui-text-text-primary" })), + React.createElement(Popover, __assign({}, metacardInteractionMenuState.MuiPopoverProps), + React.createElement(Paper, null, + React.createElement(LazyMetacardInteractions, { lazyResults: selectedResultsArray, onClose: metacardInteractionMenuState.handleClose }))))); +}; +var dynamicActionClasses = 'h-full'; +var DynamicActions = function (_a) { + var lazyResult = _a.lazyResult; + var setProps = useDialog().setProps; + var metacardInteractionMenuState = useMenuState(); + var DownloadComponent = useDownloadComponent(); + return (React.createElement(Grid, { container: true, direction: "column", wrap: "nowrap", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "h-full" }, + React.createElement(Button, { component: "div", "data-id": "result-item-more-vert-button", onClick: function (e) { + e.stopPropagation(); + metacardInteractionMenuState.handleClick(); + }, style: { height: '100%' }, size: "small", ref: metacardInteractionMenuState.anchorRef }, + React.createElement(MoreIcon, null)), + React.createElement(Popover, __assign({}, metacardInteractionMenuState.MuiPopoverProps, { keepMounted: true }), + React.createElement(Paper, null, + React.createElement(LazyMetacardInteractions, { lazyResults: [lazyResult], onClose: metacardInteractionMenuState.handleClose })))), + React.createElement(Grid, { item: true, className: dynamicActionClasses }, lazyResult.hasErrors() ? (React.createElement("div", { "data-id": "validation-errors-icon", className: "h-full", title: "Has validation errors.", "data-help": "Indicates the given result has a validation error.\n See the 'Quality' tab of the result for more details." }, + React.createElement(WarningIcon, null))) : ('')), + React.createElement(Grid, { item: true, className: dynamicActionClasses }, !lazyResult.hasErrors() && lazyResult.hasWarnings() ? (React.createElement("div", { "data-id": "validation-warnings-icon", className: "h-full", title: "Has validation warnings.", "data-help": "Indicates the given result has a validation warning.\n See the 'Quality' tab of the result for more details." }, + React.createElement(WarningIcon, null))) : ('')), + React.createElement(Grid, { item: true, className: dynamicActionClasses }, lazyResult.plain.metacard.properties['ext.link'] ? (React.createElement(Button, { component: "div", title: lazyResult.plain.metacard.properties['ext.link'], onClick: function (e) { + e.stopPropagation(); + window.open(lazyResult.plain.metacard.properties['ext.link']); + }, style: { height: '100%' }, size: "small" }, + React.createElement(LinkIcon, null))) : null), + React.createElement(Grid, { item: true, className: dynamicActionClasses }, lazyResult.getDownloadUrl() ? (React.createElement(Button, { component: "div", "data-id": "download-button", onClick: function (e) { + e.stopPropagation(); + setProps({ + open: true, + children: React.createElement(DownloadComponent, { lazyResults: [lazyResult] }), + }); + }, style: { height: '100%' }, size: "small" }, + React.createElement(GetAppIcon, null))) : null), + React.createElement(Extensions.resultItemTitleAddOn, { lazyResult: lazyResult }), + React.createElement(Grid, { item: true, className: dynamicActionClasses }, lazyResult.isSearch() ? (React.createElement(Link, { component: Button, "data-id": "edit-button", to: "/search/".concat(lazyResult.plain.id), style: { height: '100%' } }, + React.createElement(EditIcon, null))) : null))); +}; +export var SelectionBackground = function (_a) { + var lazyResult = _a.lazyResult; + var isSelected = useSelectionOfLazyResult({ lazyResult: lazyResult }); + return (React.createElement("div", { className: "absolute left-0 top-0 z-0 w-full h-full Mui-bg-secondary", style: { + opacity: isSelected ? 0.05 : 0, + } })); +}; +var IconButton = function (_a) { + var lazyResult = _a.lazyResult, selectionInterface = _a.selectionInterface, itemContentRef = _a.itemContentRef; + var MetacardDefinitions = useMetacardDefinitions(); + var isSelected = useSelectionOfLazyResult({ lazyResult: lazyResult }); + var ResultItemAction = ExtensionPoints.resultItemAction({ + lazyResult: lazyResult, + selectionInterface: selectionInterface, + itemContentRef: itemContentRef, + className: 'scale-0 absolute z-10 left-0 -translate-x-full ml-[3px] group-hover:scale-100 transition pt-1', + }); + var extraClasses = ResultItemAction + ? 'group-hover:scale-50 group-hover:-translate-x-[85%]' + : ''; + return (React.createElement(React.Fragment, null, + ResultItemAction && (React.createElement(ResultItemAction, { lazyResult: lazyResult, selectionInterface: selectionInterface, itemContentRef: itemContentRef })), + React.createElement(Button, { component: "div", "data-id": "select-checkbox", onClick: function (event) { + event.stopPropagation(); // this button takes precedence over the enclosing button, and is always additive / subtractive (no deselect of other results) + if (event.shiftKey) { + lazyResult.shiftSelect(); + } + else { + lazyResult.controlSelect(); + } + }, focusVisibleClassName: "focus-visible", className: "relative p-2 min-w-0 outline-none h-full group/checkbox shrink-0" }, + (function () { + if (isSelected) { + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "".concat(extraClasses, " absolute w-full h-full left-0 top-0 opacity-0 transform transition duration-200 ease-in-out -translate-x-full group-hover/checkbox:scale-100") }, + React.createElement(CheckBoxIcon, { className: "group-hover/checkbox:block group-focus-visible/checkbox:block hidden" }), + React.createElement(CheckIcon, { className: "group-hover/checkbox:hidden group-focus-visible/checkbox:hidden block" })), + React.createElement("div", { className: "".concat(extraClasses, " transform transition duration-200 ease-in-out -translate-x-full group-focus-visible/checkbox:!translate-x-0 group-hover/checkbox:!translate-x-0 group-hover/checkbox:scale-100") }, + React.createElement(CheckBoxIcon, { className: "group-hover/checkbox:block group-focus-visible/checkbox:block hidden" }), + React.createElement(CheckIcon, { className: "group-hover/checkbox:hidden group-focus-visible/checkbox:hidden block" })))); + } + else if (!isSelected) { + return (React.createElement("div", { className: "transform " }, + React.createElement(CheckBoxOutlineBlankIcon, { className: "group-hover/checkbox:visible group-focus-visible/checkbox:visible invisible" }))); + } + return null; + })(), + React.createElement("span", { className: "".concat(getIconClassName({ + lazyResult: lazyResult, + }), " font-awesome-span group-focus-visible/checkbox:invisible group-hover/checkbox:invisible absolute z-0 left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"), "data-help": MetacardDefinitions.getAlias('title'), title: "".concat(MetacardDefinitions.getAlias('title'), ": ").concat(lazyResult.plain.metacard.properties.title) })))); +}; +// factored out for easy debugging (can add bg-gray-400 to see trail) +var diagonalHoverClasses = 'absolute z-50 right-0 bottom-100 h-4 transform scale-0 group-hover:scale-100 transition-all absolute z-50 right-0 bottom-100'; +// fake event to pass ripple.stop +var fakeEvent = { + type: '', +}; +export var ResultItem = function (_a) { + var lazyResult = _a.lazyResult, originalMeasure = _a.measure, selectionInterface = _a.selectionInterface; + var _b = React.useContext(LayoutContext), getValue = _b.getValue, onStateChanged = _b.onStateChanged; + var MetacardDefinitions = useMetacardDefinitions(); + var rippleRef = React.useRef(null); + var listenTo = useBackbone().listenTo; + var convertToPrecision = function (value) { + return value && decimalPrecision + ? Number(value).toFixed(decimalPrecision) + : value; + }; + var convertToFormat = useCoordinateFormat(); + var _c = __read(React.useState(false), 2), renderExtras = _c[0], setRenderExtras = _c[1]; // dynamic actions are a significant part of rendering time, so delay until necessary + var _d = __read(React.useState(TypedUserInstance.getDecimalPrecision()), 2), decimalPrecision = _d[0], setDecimalPrecision = _d[1]; + var _e = __read(React.useState(getValue(RESULTS_ATTRIBUTES_LIST, getDefaultResultsShownList())), 2), shownAttributes = _e[0], setShownAttributes = _e[1]; + useRerenderOnBackboneSync({ lazyResult: lazyResult }); + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:decimalPrecision', function () { + setDecimalPrecision(TypedUserInstance.getDecimalPrecision()); + }); + onStateChanged(function () { + var shownList = getValue(RESULTS_ATTRIBUTES_LIST, getDefaultResultsShownList()); + setShownAttributes(shownList); + }); + }, []); + /** + * Unfocused (hidden) tab sets the container height to 0 + * Run the measure function when the height is 0 could cause items inside the tab to be unreadable + */ + var measure = function () { + var _a, _b; + if (((_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight) && + ((_b = buttonRef.current) === null || _b === void 0 ? void 0 : _b.clientHeight) > 0) { + originalMeasure(); + } + }; + React.useEffect(function () { + measure(); + }, [shownAttributes, convertToFormat]); + listenTo(wreqr.vent, 'activeContentItemChanged', function () { + measure(); + }); + var thumbnail = lazyResult.plain.metacard.properties.thumbnail; + var imgsrc = Common.getImageSrc(thumbnail); + var buttonRef = React.useRef(null); + var itemContentRef = React.useRef(null); + var ResultItemAddOnInstance = Extensions.resultItemRowAddOn({ + lazyResult: lazyResult, + isTableView: false, + }); + var ResultTitleIconAddOnInstance = Extensions.resultTitleIconAddOn({ + lazyResult: lazyResult, + }); + var shouldShowRelevance = showRelevanceScore({ lazyResult: lazyResult }); + var shouldShowSource = showSource(); + var extraHighlights = Object.keys(lazyResult.highlights).filter(function (attr) { return !shownAttributes.find(function (shownAttribute) { return shownAttribute === attr; }); }); + var getDisplayValue = function (_a) { + var detail = _a.detail, lazyResult = _a.lazyResult; + var value = lazyResult.plain.metacard.properties[detail]; + if (value && MetacardDefinitions.getAttributeMap()[detail]) { + switch (MetacardDefinitions.getAttributeMap()[detail].type) { + case 'DATE': + if (value.constructor === Array) { + value = value.map(function (val) { + return TypedUserInstance.getMomentDate(val); + }); + } + else { + value = TypedUserInstance.getMomentDate(value); + } + break; + case 'GEOMETRY': + value = convertToFormat(value); + case 'LONG': + case 'DOUBLE': + case 'FLOAT': + value = convertToPrecision(value); + } + } + if (Array.isArray(value)) { + value = value.join(', '); + } + return value; + }; + var detailsMap = shownAttributes + .slice(1) // remove top one since that's special + .map(function (detail) { + return { + attribute: detail, + value: getDisplayValue({ detail: detail, lazyResult: lazyResult }), + }; + }) + .filter(function (detail) { + // this is special and is handled differently, see show source + if (detail.attribute === 'source-id') { + return false; + } + return detail.value; + }); + return (React.createElement("button", { "data-id": "result-item-container-button", onMouseDown: function (event) { + /** + * Shift key can cause selections since we set the class to allow text selection, + * so the only scenario we want to prevent that in is when shift clicking + */ + if (event.shiftKey) { + clearSelection(); + } + /** + * Stop the ripple that starts on focus, that's only for navigating by keyboard + */ + setTimeout(function () { + if (rippleRef.current) { + rippleRef.current.stop(fakeEvent); + } + }, 0); + }, onClick: function (event) { + if (hasSelection()) { + return; + } + if (event.shiftKey) { + lazyResult.shiftSelect(); + } + else if (event.ctrlKey || event.metaKey) { + lazyResult.controlSelect(); + } + else { + lazyResult.select(); + } + if (rippleRef.current) { + rippleRef.current.start(event); + } + setTimeout(function () { + if (rippleRef.current) { + rippleRef.current.stop(fakeEvent); + } + }, 200); + }, onMouseLeave: function () { + /** + * This is to prevent weirdness with the dynamic actions, where clicking a menu option there adds focus, + * thus making the dynamic actions stay visible when the user starts to mouse away. + */ + try { + if (document.activeElement && + buttonRef.current && + buttonRef.current.contains(document.activeElement)) { + ; + document.activeElement.blur(); + } + } + catch (err) { + console.error(err); + } + }, onMouseEnter: function () { + setRenderExtras(true); + }, onFocus: function (e) { + setRenderExtras(true); + if (e.target === e.currentTarget && rippleRef.current) { + rippleRef.current.pulsate(); + } + }, onBlur: function (e) { + if (rippleRef.current) { + rippleRef.current.stop(e); + } + }, ref: buttonRef, className: "select-text outline-none px-6 pr-12 p-2 text-left break-words group w-full Mui-bg-button" }, + React.createElement("div", { className: "w-full" }, + React.createElement(TouchRipple, { ref: rippleRef }), + React.createElement(SelectionBackground, { lazyResult: lazyResult }), + React.createElement("div", { className: "w-full relative z-0", ref: itemContentRef }, + React.createElement("div", { className: "w-full flex items-start" }, + React.createElement(IconButton, { lazyResult: lazyResult, selectionInterface: selectionInterface, itemContentRef: itemContentRef }), + ResultTitleIconAddOnInstance && (React.createElement("div", { className: "pt-2 pr-1" }, ResultTitleIconAddOnInstance)), + React.createElement("div", { "data-id": "result-item-".concat(shownAttributes[0], "-label"), title: "".concat(MetacardDefinitions.getAlias(shownAttributes[0])), className: "shrink-1 w-full overflow-auto self-center", style: { maxHeight: '200px', minHeight: '21px' } }, shownAttributes[0] === 'thumbnail' && thumbnail ? (React.createElement("img", { "data-id": "result-item-thumbnail", src: imgsrc, style: { maxWidth: '100%', maxHeight: '200px' }, onLoad: function () { + measure(); + }, onError: function () { + measure(); + } })) : lazyResult.highlights[shownAttributes[0]] ? (React.createElement("span", { dangerouslySetInnerHTML: { + __html: lazyResult.highlights[shownAttributes[0]][0].highlight, + } })) : (getDisplayValue({ detail: shownAttributes[0], lazyResult: lazyResult })))), + React.createElement("div", { className: "pl-3 ".concat(ResultItemAddOnInstance !== null || + detailsMap.length > 0 || + extraHighlights.length > 0 || + shouldShowRelevance || + shouldShowSource + ? 'pb-2' + : '') }, + React.createElement("div", null, ResultItemAddOnInstance), + React.createElement("div", null, + detailsMap.map(function (detail) { + if (detail.attribute === 'thumbnail') { + return (React.createElement("img", { key: detail.attribute, "data-id": "result-item-thumbnail", src: imgsrc, style: { + marginTop: '10px', + maxWidth: '100%', + maxHeight: '200px', + }, onLoad: function () { + measure(); + }, onError: function () { + measure(); + } })); + } + return (React.createElement(PropertyComponent, { key: detail.attribute, "data-help": MetacardDefinitions.getAlias(detail.attribute), title: "".concat(MetacardDefinitions.getAlias(detail.attribute), ": ").concat(detail.value) }, + React.createElement("span", null, lazyResult.highlights[detail.attribute] ? (React.createElement("span", { dangerouslySetInnerHTML: { + __html: lazyResult.highlights[detail.attribute][0] + .highlight, + } })) : (getDisplayValue({ + detail: detail.attribute, + lazyResult: lazyResult, + }))))); + }), + extraHighlights.map(function (extraHighlight) { + var relevantHighlight = lazyResult.highlights[extraHighlight][0]; + return (React.createElement(PropertyComponent, { key: relevantHighlight.attribute, "data-help": MetacardDefinitions.getAlias(relevantHighlight.attribute) }, + React.createElement(Tooltip, { title: MetacardDefinitions.getAlias(relevantHighlight.attribute) }, + React.createElement("span", { dangerouslySetInnerHTML: { + __html: relevantHighlight.highlight, + } })))); + }), + shouldShowRelevance ? (React.createElement(PropertyComponent, { "data-help": "Relevance: ".concat(lazyResult.plain.relevance), title: "Relevance: ".concat(lazyResult.plain.relevance) }, + React.createElement("span", null, lazyResult.getRoundedRelevance()))) : (''), + shouldShowSource ? (React.createElement(PropertyComponent, { title: "".concat(MetacardDefinitions.getAlias('source-id'), ": ").concat(lazyResult.plain.metacard.properties['source-id']), "data-help": MetacardDefinitions.getAlias('source-id') }, !lazyResult.isRemote() ? (React.createElement(React.Fragment, null, + React.createElement("span", { className: "fa fa-home" }), + React.createElement("span", { style: { marginLeft: '5px' } }, "local"))) : (React.createElement(React.Fragment, null, + React.createElement("span", { className: "fa fa-cloud" }), + React.createElement("span", { style: { marginLeft: '5px' } }, lazyResult.plain.metacard.properties['source-id']))))) : ('')))), + renderExtras ? (React.createElement(React.Fragment, null, + ' ', + React.createElement("div", { className: "".concat(diagonalHoverClasses, " w-full transform translate-y-1") }), + React.createElement("div", { className: "".concat(diagonalHoverClasses, " w-9/12 transform translate-y-2 ") }), + React.createElement("div", { className: "".concat(diagonalHoverClasses, " w-6/12 transform translate-y-3") }), + React.createElement("div", { className: "".concat(diagonalHoverClasses, " w-5/12 transform translate-y-4") }), + React.createElement("div", { className: "".concat(diagonalHoverClasses, " w-4/12 transform translate-y-5") }), + React.createElement("div", { className: "".concat(diagonalHoverClasses, " w-3/12 transform translate-y-6") }), + React.createElement("div", { className: "".concat(diagonalHoverClasses, " w-2/12 transform translate-y-8") }), + React.createElement("div", { className: "absolute z-40 group-hover:z-50 focus-within:z-50 right-0 top-0 focus-within:opacity-100 group-hover:opacity-100 hover:opacity-100 opacity-0 cursor-auto transform focus-within:scale-100 transition-all hover:scale-100 ease-in-out duration-200 hover:translate-x-0 hover:scale-x-100" }, + React.createElement(Paper, { onClick: function (e) { + e.stopPropagation(); + }, elevation: Elevations.overlays, className: "p-2" }, + React.createElement(DynamicActions, { lazyResult: lazyResult }))))) : null))); +}; +export default hot(module)(ResultItem); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0LWl0ZW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vcmVzdWx0cy12aXN1YWwvcmVzdWx0LWl0ZW0udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyx3QkFBd0IsTUFBTSw4QkFBOEIsQ0FBQTtBQUNuRSxPQUFPLFVBQVUsTUFBTSx3QkFBd0IsQ0FBQTtBQUMvQyxPQUFPLElBQUksTUFBTSxnQ0FBZ0M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wJScgfX1cbiAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgIHJlZj17bWV0YWNhcmRJbnRlcmFjdGlvbk1lbnVTdGF0ZS5hbmNob3JSZWZ9XG4gICAgICAgID5cbiAgICAgICAgICA8TW9yZUljb24gLz5cbiAgICAgICAgPC9CdXR0b24+XG4gICAgICAgIDxQb3BvdmVyXG4gICAgICAgICAgey4uLm1ldGFjYXJkSW50ZXJhY3Rpb25NZW51U3RhdGUuTXVpUG9wb3ZlclByb3BzfVxuICAgICAgICAgIGtlZXBNb3VudGVkPXt0cnVlfVxuICAgICAgICA+XG4gICAgICAgICAgPFBhcGVyPlxuICAgICAgICAgICAgPExhenlNZXRhY2FyZEludGVyYWN0aW9uc1xuICAgICAgICAgICAgICBsYXp5UmVzdWx0cz17W2xhenlSZXN1bHRdfVxuICAgICAgICAgICAgICBvbkNsb3NlPXttZXRhY2FyZEludGVyYWN0aW9uTWVudVN0YXRlLmhhbmRsZUNsb3NlfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L1BhcGVyPlxuICAgICAgICA8L1BvcG92ZXI+XG4gICAgICA8L0dyaWQ+XG4gICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT17ZHluYW1pY0FjdGlvbkNsYXNzZXN9PlxuICAgICAgICB7bGF6eVJlc3VsdC5oYXNFcnJvcnMoKSA/IChcbiAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICBkYXRhLWlkPVwidmFsaWRhdGlvbi1lcnJvcnMtaWNvblwiXG4gICAgICAgICAgICBjbGFzc05hbWU9XCJoLWZ1bGxcIlxuICAgICAgICAgICAgdGl0bGU9XCJIYXMgdmFsaWRhdGlvbiBlcnJvcnMuXCJcbiAgICAgICAgICAgIGRhdGEtaGVscD1cIkluZGljYXRlcyB0aGUgZ2l2ZW4gcmVzdWx0IGhhcyBhIHZhbGlkYXRpb24gZXJyb3IuXG4gICAgICAgICAgICAgICAgICAgICBTZWUgdGhlICdRdWFsaXR5JyB0Y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mVudD1cImRpdlwiXG4gICAgICAgICAgICB0aXRsZT17bGF6eVJlc3VsdC5wbGFpbi5tZXRhY2FyZC5wcm9wZXJ0aWVzWydleHQubGluayddfVxuICAgICAgICAgICAgb25DbGljaz17KGU6IFJlYWN0Lk1vdXNlRXZlbnQ8SFRNTERpdkVsZW1lbnQsIE1vdXNlRXZlbnQ+KSA9PiB7XG4gICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKClcbiAgICAgICAgICAgICAgd2luZG93Lm9wZW4obGF6eVJlc3VsdC5wbGFpbi5tZXRhY2FyZC5wcm9wZXJ0aWVzWydleHQubGluayddKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIHN0eWxlPXt7IGhlaWdodDogJzEwMCUnIH19XG4gICAgICAgICAgICBzaXplPVwic21hbGxcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxMaW5rSWNvbiAvPlxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPXtkeW5hbWljQWN0aW9uQ2xhc3Nlc30+XG4gICAgICAgIHtsYXp5UmVzdWx0LmdldERvd25sb2FkVXJsKCkgPyAoXG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgY29tcG9uZW50PVwiZGl2XCJcbiAgICAgICAgICAgIGRhdGEtaWQ9XCJkb3dubG9hZC1idXR0b25cIlxuICAgICAgICAgICAgb25DbGljaz17KGU6IFJlYWN0Lk1vdXNlRXZlbnQ8SFRNTERpdkVsZW1lbnQsIE1vdXNlRXZlbnQ+KSA9PiB7XG4gICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKClcbiAgICAgICAgICAgICAgc2V0UHJvcHMoe1xuICAgICAgICAgICAgICAgIG9wZW46IHRydWUsXG4gICAgICAgICAgICAgICAgY2hpbGRyZW46IDxEb3dubG9hZENvbXBvbmVudCBsYXp5UmVzdWx0cz17W2xhenlSZXN1bHRdfSAvPixcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBzdHlsZT17eyBoZWlnaHQ6ICcxMDAlJyB9fVxuICAgICAgICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICA8R2V0QXBwSWNvbiAvPlxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxFeHRlbnNpb25zLnJlc3VsdEl0ZW1UaXRsZUFkZE9uIGxhenlSZXN1bHQ9e2xhenlSZXN1bHR9IC8+XG4gICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT17ZHluYW1pY0FjdGlvbkNsYXNzZXN9PlxuICAgICAgICB7bGF6eVJlc3VsdC5pc1NlYXJjaCgpID8gKFxuICAgICAgICAgIDxMaW5rXG4gICAgICAgICAgICBjb21wb25lbnQ9e0J1dHRvbn1cbiAgICAgICAgICAgIGRhdGEtaWQ9XCJlZGl0LWJ1dHRvblwiXG4gICAgICAgICAgICB0bz17YC9zZWFyY2gvJHtsYXp5UmVzdWx0LnBsYWluLmlkfWB9XG4gICAgICAgICAgICBzdHlsZT17eyBoZWlnaHQ6ICcxMDAlJyB9fVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxFZGl0SWNvbiAvPlxuICAgICAgICAgIDwvTGluaz5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICA8L0dyaWQ+XG4gICAgICB7LyoqIGFkZCBpbmxpbmUgZWRpdGluZyBsYXRlciAqL31cbiAgICAgIHsvKiA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cImgtZnVsbFwiPlxuICAgICAgICAgICB7bGF6eVJlc3VsdC5pc1NlYXJjaCgpID8gKFxuICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJlZGl0LWJ1dHRvblwiXG4gICAgICAgICAgICA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NoZWNrYm94OnNjYWxlLTEwMGB9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPENoZWNrQm94SWNvbiBjbGFzc05hbWU9XCJncm91cC1ob3Zlci9jaGVja2JveDpibG9jayBncm91cC1mb2N1cy12aXNpYmxlL2NoZWNrYm94OmJsb2NrIGhpZGRlblwiIC8+XG4gICAgICAgICAgICAgICAgICA8Q2hlY2tJY29uIGNsYXNzTmFtZT1cImdyb3VwLWhvdmVyL2NoZWNrYm94OmhpZGRlbiBncm91cC1mb2N1cy12aXNpYmxlL2NoZWNrYm94OmhpZGRlbiBibG9ja1wiIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgJHtleHRyYUNsYXNzZXN9IHRyYW5zZm9ybSB0cmFuc2l0aW9uIGR1cmF0aW9uLTIwMCBlYXNlLWluLW91dCAtdHJhbnNsYXRlLXgtZnVsbCBncm91cC1mb2N1cy12aXNpYmxlL2NoZWNrYm94OiF0cmFuc2xhdGUteC0wIGdyb3VwLWhvdmVyL2NoZWNrYm94OiF0cmFuc2xhdGUteC0wIGdyb3VwLWhvdmVyL2NoZWNrYm94OnNjYWxlLTEwMGB9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPENoZWNrQm94SWNvbiBjbGFzc05hbWU9XCJncm91cC1ob3Zlci9jaGVja2JveDpibG9jayBncm91cC1mb2N1cy12aXNpYmxlL2NoZWNrYm94OmJsb2NrIGhpZGRlblwiIC8+XG4gICAgICAgICAgICAgICAgICA8Q2hlY2tJY29uIGNsYXNzTmFtZT1cImdyb3VwLWhvdmVyL2NoZWNrYm94OmhpZGRlbiBncm91cC1mb2N1cy12aXNpYmxlL2NoZWNrYm94OmhpZGRlbiBibG9ja1wiIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICA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luZyBieSBrZXlib2FyZFxuICAgICAgICAgKi9cbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgaWYgKHJpcHBsZVJlZi5jdXJyZW50KSB7XG4gICAgICAgICAgICByaXBwbGVSZWYuY3VycmVudC5zdG9wKGZha2VFdmVudClcbiAgICAgICAgICB9XG4gICAgICAgIH0sIDApXG4gICAgICB9fVxuICAgICAgb25DbGljaz17KGV2ZW50OiBhbnkpID0+IHtcbiAgICAgICAgaWYgKGhhc1NlbGVjdGlvbigpKSB7XG4gICAgICAgICAgcmV0dXJuXG4gICAgICAgIH1cbiAgICAgICAgaWYgKGV2ZW50LnNoaWZ0S2V5KSB7XG4gICAgICAgICAgbGF6eVJlc3VsdC5zaGlmdFNlbGVjdCgpXG4gICAgICAgIH0gZWxzZSBpZiAoZXZlbnQuY3RybEtleSB8fCBldmVudC5tZXRhS2V5KSB7XG4gICAgICAgICAgbGF6eVJlc3VsdC5jb250cm9sU2VsZWN0KClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBsYXp5UmVzdWx0LnNlbGVjdCgpXG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJpcHBsZVJlZi5jdXJyZW50KSB7XG4gICAgICAgICAgcmlwcGxlUmVmLmN1cnJlbnQuc3RhcnQoZXZlbnQpXG4gICAgICAgIH1cbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgaWYgKHJpcHBsZVJlZi5jdXJyZW50KSB7XG4gICAgICAgICAgICByaXBwbGVSZWYuY3VycmVudC5zdG9wKGZha2VFdmVudClcbiAgICAgICAgICB9XG4gICAgICAgIH0sIDIwMClcbiAgICAgIH19XG4gICAgICBvbk1vdXNlTGVhdmU9eygpID0+IHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFRoaXMgaXMgdG8gcHJldmVudCB3ZWlyZG5lc3Mgd2l0aCB0aGUgZHluYW1pYyBhY3Rpb25zLCB3aGVyZSBjbGlja2luZyBhIG1lbnUgb3B0aW9uIHRoZXJlIGFkZHMgZm9jdXMsXG4gICAgICAgICAqIHRodXMgbWFraW5nIHRoZSBkeW5hbWljIGFjdGlvbnMgc3RheSB2aXNpYmxlIHdoZW4gdGhlIHVzZXIgc3RhcnRzIHRvIG1vdXNlIGF3YXkuXG4gICAgICAgICAqL1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGlmIChcbiAgICAgICAgICAgIGRvY3VtZW50LmFjdGl2ZUVsZW1lbnQgJiZcbiAgICAgICAgICAgIGJ1dHRvblJlZi5jdXJyZW50ICYmXG4gICAgICAgICAgICBidXR0b25SZWYuY3VycmVudC5jb250YWlucyhkb2N1bWVudC5hY3RpdmVFbGVtZW50KVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgOyhkb2N1bWVudC5hY3RpdmVFbGVtZW50IGFzIGFueSkuYmx1cigpXG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICBjb25zb2xlLmVycm9yKGVycilcbiAgICAgICAgfVxuICAgICAgfX1cbiAgICAgIG9uTW91c2VFbnRlcj17KCkgPT4ge1xuICAgICAgICBzZXRSZW5kZXJFeHRyYXModHJ1ZSlcbiAgICAgIH19XG4gICAgICBvbkZvY3VzPXsoZTogYW55KSA9PiB7XG4gICAgICAgIHNldFJlbmRlckV4dHJhcyh0cnVlKVxuICAgICAgICBpZiAoZS50YXJnZXQgPT09IGUuY3VycmVudFRhcmdldCAmJiByaXBwbGVSZWYuY3VycmVudCkge1xuICAgICAgICAgIHJpcHBsZVJlZi5jdXJyZW50LnB1bHNhdGUoKVxuICAgICAgICB9XG4gICAgICB9fVxuICAgICAgb25CbHVyPXsoZTogYW55KSA9PiB7XG4gICAgICAgIGlmIChyaXBwbGVSZWYuY3VycmVudCkge1xuICAgICAgICAgIHJpcHBsZVJlZi5jdXJyZW50LnN0b3AoZSlcbiAgICAgICAgfVxuICAgICAgfX1cbiAgICAgIHJlZj17YnV0dG9uUmVmfVxu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lhcyhzaG93bkF0dHJpYnV0ZXNbMF0pfWB9XG4gICAgICAgICAgICAgIGNsYXNzTmFtZT1cInNocmluay0xIHctZnVsbCBvdmVyZmxvdy1hdXRvIHNlbGYtY2VudGVyXCJcbiAgICAgICAgICAgICAgc3R5bGU9e3sgbWF4SGVpZ2h0OiAnMjAwcHgnLCBtaW5IZWlnaHQ6ICcyMXB4JyB9fSAvLyBmaXJlZm94IHdpbGwgc2hvdyBzY3JvbGxiYXJzIGFsd2F5cyB3aXRob3V0IHRoaXMgbWluSGVpZ2h0IDpTXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIHtzaG93bkF0dHJpYnV0ZXNbMF0gPT09ICd0aHVtYm5haWwnICYmIHRodW1ibmFpbCA/IChcbiAgICAgICAgICAgICAgICA8aW1nXG4gICAgICAgICAgICAgICAgICBkYXRhLWlkPVwicmVzdWx0LWl0ZW0tdGh1bWJuYWlsXCJcbiAgICAgICAgICAgICAgICAgIHNyYz17aW1nc3JjfVxuICAgICAgICAgICAgICAgICAgc3R5bGU9e3sgbWF4V2lkdGg6ICcxMDAlJywgbWF4SGVpZ2h0OiAnMjAwcHgnIH19XG4gICAgICAgICAgICAgICAgICBvbkxvYWQ9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbWVhc3VyZSgpXG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgb25FcnJvcj17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBtZWFzdXJlKClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKSA6IGxhenlSZXN1bHQuaGlnaGxpZ2h0c1tzaG93bkF0dHJpYnV0ZXNbMF1dID8gKFxuICAgICAgICAgICAgICAgIDxzcGFuXG4gICAgICAgICAgICAgICAgICBkYW5nZXJvdXNseVNldElubmVySFRNTD17e1xuICAgICAgICAgICAgICAgICAgICBfX2h0bWw6XG4gICAgICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdC5oaWdobGlnaHRzW3Nob3duQXR0cmlidXRlc1swXV1bMF0uaGlnaGxpZ2h0LFxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgIGdldERpc3BsYXlWYWx1ZSh7IGRldGFpbDogc2hvd25BdHRyaWJ1dGVzWzBdLCBsYXp5UmVzdWx0IH0pXG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICBjbGFzc05hbWU9e2BwbC0zICR7XG4gICAgICAgICAgICAgIFJlc3VsdEl0ZW1BZGRPbkluc3RhbmNlICE9PSBudWxsIHx8XG4gICAgICAgICAgICAgIGRldGFpbHNNYXAubGVuZ3RoID4gMCB8fFxuICAgICAgICAgICAgICBleHRyYUhpZ2hsaWdodHMubGVuZ3RoID4gMCB8fFxuICAgICAgICAgICAgICBzaG91bGRTaG93UmVsZXZhbmNlIHx8XG4gICAgICAgICAgICAgIHNob3VsZFNob3dTb3VyY2VcbiAgICAgICAgICAgICAgICA/ICdwYi0yJ1xuICAgICAgICAgICAgICAgIDogJydcbiAgICAgICAgICAgIH1gfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxkaXY+e1Jlc3VsdEl0ZW1BZGRPbkluc3RhbmNlfTwvZGl2PlxuICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAge2RldGFpbHNNYXAubWFwKChkZXRhaWwpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoZGV0YWlsLmF0dHJpYnV0ZSA9PT0gJ3RodW1ibmFpbCcpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgIDxpbWdcbiAgICAgICAgICAgICAgICAgICAgICBrZXk9e2RldGFpbC5hdHRyaWJ1dGV9XG4gICAgICAgICAgICAgICAgICAgICAgZGF0YS1pZD1cInJlc3VsdC1pdGVtLXRodW1ibmFpbFwiXG4gICAgICAgICAgICAgICAgICAgICAgc3JjPXtpbWdzcmN9XG4gICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpblRvcDogJzEwcHgnLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWF4V2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heEhlaWdodDogJzIwMHB4JyxcbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgIG9uTG9hZD17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVhc3VyZSgpXG4gICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICBvbkVycm9yPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZWFzdXJlKClcbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgPFByb3BlcnR5Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgIGtleT17ZGV0YWlsLmF0dHJpYnV0ZX1cbiAgICAgICAgICAgICAgICAgICAgZGF0YS1oZWxwPXtNZXRhY2FyZERlZmluaXRpb25zLmdldEFsaWFzKGRldGFpbC5hdHRyaWJ1dGUpfVxuICAgICAgICAgICAgICAgICAgICB0aXRsZT17YCR7TWV0YWNhcmREZWZpbml0aW9ucy5nZXRBbGlhcyhcbiAgICAgICAgICAgICAgICAgICAgICBkZXRhaWwuYXR0cmlidXRlXG4gICAgICAgICAgICAgICAgICAgICl9OiAke2RldGFpbC52YWx1ZX1gfVxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICA8c3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgICB7LyogSXQncyBva2F5IHRvIHVzZSB0aGUgZmlyc3Qgb25lIGhlcmUgc2luY2Ugd2Ugb25seSBldmVyIHdhbnQgdG8gZGlzcGxheSBvbmUsIG5vcm1hbGx5IHlvdSdkIHdhbnQgdG8gbWFwIG92ZXIgdGhpcyBsaXN0ICovfVxuICAgICAgICAgICAgICAgICAgICAgIHtsYXp5UmVzdWx0LmhpZ2hsaWdodHNbZGV0YWlsLmF0dHJpYnV0ZV0gPyAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgICAgICAgICAgICBkYW5nZXJvdXNseVNldElubmVySFRNTD17e1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9faHRtbDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHQuaGlnaGxpZ2h0c1tkZXRhaWwuYXR0cmlidXRlXVswXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuaGlnaGxpZ2h0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0RGlzcGxheVZhbHVlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWlsOiBkZXRhaWwuYXR0cmlidXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0LFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgICA8L1Byb3BlcnR5Q29tcG9uZW50PlxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgIHtleHRyYUhpZ2hsaWdodHMubWFwKChleHRyYUhpZ2hsaWdodCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHJlbGV2YW50SGlnaGxpZ2h0ID1cbiAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHQuaGlnaGxpZ2h0c1tleHRyYUhpZ2hsaWdodF1bMF1cbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgPFByb3BlcnR5Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgIGtleT17cmVsZXZhbnRIaWdobGlnaHQuYXR0cmlidXRlfVxuICAgICAgICAgICAgICAgICAgICBkYXRhLWhlbHA9e01ldGFjYXJkRGVmaW5pdGlvbnMuZ2V0QWxpYXMoXG4gICAgICAgICAgICAgICAgICAgICAgcmVsZXZhbnRIaWdobGlnaHQuYXR0cmlidXRlXG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIDxUb29sdGlwXG4gICAgICAgICAgICAgICAgICAgICAgdGl0bGU9e01ldGFjYXJkRGVmaW5pdGlvbnMuZ2V0QWxpYXMoXG4gICAgICAgICAgICAgICAgICAgICAgICByZWxldmFudEhpZ2hsaWdodC5hdHRyaWJ1dGVcbiAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgPHNwYW5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRhbmdlcm91c2x5U2V0SW5uZXJIVE1MPXt7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIF9faHRtbDogcmVsZXZhbnRIaWdobGlnaHQuaGlnaGxpZ2h0LFxuICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICA8L1Rvb2x0aXA+XG4gICAgICAgICAgICAgICAgICA8L1Byb3BlcnR5Q29tcG9uZW50PlxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgIHtzaG91bGRTaG93UmVsZXZhbmNlID8gKFxuICAgICAgICAgICAgICAgIDxQcm9wZXJ0eUNvbXBvbmVudFxuICAgICAgICAgICAgICAgICAgZGF0YS1oZWxwPXtgUmVsZXZhbmNlOiAke2xhenlSZXN1bHQucGxhaW4ucmVsZXZhbmNlfWB9XG4gICAgICAgICAgICAgICAgICB0aXRsZT17YFJlbGV2YW5jZTogJHtsYXp5UmVzdWx0LnBsYWluLnJlbGV2YW5jZX1gfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxzcGFuPntsYXp5UmVzdWx0LmdldFJvdW5kZWRSZWxldmFuY2UoKX08L3NwYW4+XG4gICAgICAgICAgICAgICAgPC9Qcm9wZXJ0eUNvbXBvbmVudD5cbiAgICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICAnJ1xuICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICB7c2hvdWxkU2hvd1NvdXJjZSA/IChcbiAgICAgICAgICAgICAgICA8UHJvcGVydHlDb21wb25lbnRcbiAgICAgICAgICAgICAgICAgIHRpdGxlPXtgJHtNZXRhY2FyZERlZmluaXRpb25zLmdldEFsaWFzKCdzb3VyY2UtaWQnKX06ICR7XG4gICAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHQucGxhaW4ubWV0YWNhcmQucHJvcGVydGllc1snc291cmNlLWlkJ11cbiAgICAgICAgICAgICAgICAgIH1gfVxuICAgICAgICAgICAgICAgICAgZGF0YS1oZWxwPXtNZXRhY2FyZERlZmluaXRpb25zLmdldEFsaWFzKCdzb3VyY2UtaWQnKX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICB7IWxhenlSZXN1bHQuaXNSZW1vdGUoKSA/IChcbiAgICAgICAgICAgICAgICAgICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT1cImZhIGZhLWhvbWVcIiAvPlxuICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIHN0eWxlPXt7IG1hcmdpbkxlZnQ6ICc1cHgnIH19PmxvY2FsPC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICA8L1JlYWN0LkZyYWdtZW50PlxuICAgICAgICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICAgICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT1cImZhIGZhLWNsb3VkXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBzdHlsZT17eyBtYXJnaW5MZWZ0OiAnNXB4JyB9fT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtsYXp5UmVzdWx0LnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXNbJ3NvdXJjZS1pZCddfVxuICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgPC9Qcm9wZXJ0eUNvbXBvbmVudD5cbiAgICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICAnJ1xuICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICB7cmVuZGVyRXh0cmFzID8gKFxuICAgICAgICAgIDw+XG4gICAgICAgICAgICB7JyAnfVxuICAgICAgICAgICAgey8qIHRyaWNrIHRvIGtlZXAgdGhlIGRyb3Bkb3duIHZpc2libGUgb3ZlciBhbiBhcmMgb2YgdGhlIGN1cnNvciwgc28gdXNlcnMgaGF2ZSBzb21lIGxlZXdheSBpZiBnb2luZyBkaWFnb25hbCB0byB0aGUgYWN0aW9ucyBkcm9wZG93bnMgKiovfVxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICBjbGFzc05hbWU9e2Ake2Rp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Z3JvdXAtaG92ZXI6ei01MCBmb2N1cy13aXRoaW46ei01MCByaWdodC0wIHRvcC0wIGZvY3VzLXdpdGhpbjpvcGFjaXR5LTEwMCBncm91cC1ob3ZlcjpvcGFjaXR5LTEwMCBob3ZlcjpvcGFjaXR5LTEwMCBvcGFjaXR5LTAgY3Vyc29yLWF1dG8gdHJhbnNmb3JtIGZvY3VzLXdpdGhpbjpzY2FsZS0xMDAgdHJhbnNpdGlvbi1hbGwgaG92ZXI6c2NhbGUtMTAwIGVhc2UtaW4tb3V0IGR1cmF0aW9uLTIwMCBob3Zlcjp0cmFuc2xhdGUteC0wIGhvdmVyOnNjYWxlLXgtMTAwYH1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPFBhcGVyXG4gICAgICAgICAgICAgICAgb25DbGljaz17KGUpID0+IHtcbiAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKClcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c31cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJwLTJcIlxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPER5bmFtaWNBY3Rpb25zIGxhenlSZXN1bHQ9e2xhenlSZXN1bHR9IC8+XG4gICAgICAgICAgICAgIDwvUGFwZXI+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8Lz5cbiAgICAgICAgKSA6IG51bGx9XG4gICAgICA8L2Rpdj5cbiAgICA8L2J1dHRvbj5cbiAgKVxufVxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUmVzdWx0SXRlbSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/results-visual.d.ts b/src/main/webapp/component/visualization/results-visual/results-visual.d.ts new file mode 100644 index 00000000000..a146e87f262 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/results-visual.d.ts @@ -0,0 +1,14 @@ +import * as React from 'react'; +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +import { ResultsState } from '../../golden-layout/golden-layout.types'; +type Props = { + selectionInterface: any; + componentState: ResultsState; +}; +export type ModeType = 'card' | 'table'; +export declare const ResultsViewContext: React.Context<{ + edit: LazyQueryResult | null; + setEdit: React.Dispatch; +}>; +declare const _default: ({ selectionInterface, componentState }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/results-visual/results-visual.js b/src/main/webapp/component/visualization/results-visual/results-visual.js new file mode 100644 index 00000000000..52c0cdcceb1 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/results-visual.js @@ -0,0 +1,46 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import ResultItemCollection from './result-item.collection'; +import Grid from '@mui/material/Grid'; +import TableVisual from './table'; +import Button from '@mui/material/Button'; +import BackgroundInheritingDiv from '../../theme/background-inheriting-div'; +import { LayoutContext } from '../../golden-layout/visual-settings.provider'; +import { RESULTS_MODE } from '../settings-helpers'; +export var ResultsViewContext = React.createContext({ + edit: null, + setEdit: (function () { }), +}); +var ResultsView = function (_a) { + var selectionInterface = _a.selectionInterface, componentState = _a.componentState; + var _b = React.useContext(LayoutContext), getValue = _b.getValue, setValue = _b.setValue; + var _c = __read(React.useState(null), 2), mode = _c[0], setMode = _c[1]; + var _d = __read(React.useState(null), 2), edit = _d[0], setEdit = _d[1]; + React.useEffect(function () { + setMode(getValue(RESULTS_MODE, componentState['results-mode'])); + }, []); + React.useEffect(function () { + mode && setValue(RESULTS_MODE, mode); + }, [mode]); + return (React.createElement(ResultsViewContext.Provider, { value: { edit: edit, setEdit: setEdit } }, + React.createElement(Grid, { container: true, direction: "column", className: "w-full h-full bg-inherit", wrap: "nowrap" }, + React.createElement(Grid, { className: "w-full h-full bg-inherit relative " }, + edit !== null ? (React.createElement(BackgroundInheritingDiv, { className: "absolute left-0 top-0 w-full h-full z-10" }, + React.createElement("div", { className: "w-full h-full p-2" }, + "Currently editing: ", + edit.plain.metacard.properties.title, + React.createElement(Button, { onClick: function () { + setEdit(null); + } }, "Cancel")))) : null, + (function () { + if (mode === 'card') { + return (React.createElement(ResultItemCollection, { mode: mode, setMode: setMode, selectionInterface: selectionInterface })); + } + else { + return (React.createElement(TableVisual, { selectionInterface: selectionInterface, mode: mode, setMode: setMode })); + } + })())))); +}; +export default hot(module)(ResultsView); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0cy12aXN1YWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vcmVzdWx0cy12aXN1YWwvcmVzdWx0cy12aXN1YWwudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxvQkFBb0IsTUFBTSwwQkFBMEIsQ0FBQTtBQUMzRCxPQUFPLElBQUksTUFBTSxvQkFBb0IsQ0FBQTtBQUNyQyxPQUFPLFdBQVcsTUFBTSxTQUFTLENBQUE7QUFRakMsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyx1QkFBdUIsTUFBTSx1Q0FBdUMsQ0FBQTtBQUMzRSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sOENBQThDLENBQUE7QUFDNUUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHFCQUFxQixDQUFBO0FBU2xELE1BQU0sQ0FBQyxJQUFNLGtCQUFrQixHQUFHLEtBQUssQ0FBQyxhQUFhLENBQUM7SUFDcEQsSUFBSSxFQUFFLElBQThCO0lBQ3B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AgdG9wLTAgdy1mdWxsIGgtZnVsbCB6LTEwXCI+XG4gICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbCBwLTJcIj5cbiAgICAgICAgICAgICAgICBDdXJyZW50bHkgZWRpdGluZzoge2VkaXQucGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy50aXRsZX1cbiAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHNldEVkaXQobnVsbClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgQ2FuY2VsXG4gICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9CYWNrZ3JvdW5kSW5oZXJpdGluZ0Rpdj5cbiAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICB7KCgpID0+IHtcbiAgICAgICAgICAgIGlmIChtb2RlID09PSAnY2FyZCcpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8UmVzdWx0SXRlbUNvbGxlY3Rpb25cbiAgICAgICAgICAgICAgICAgIG1vZGU9e21vZGV9XG4gICAgICAgICAgICAgICAgICBzZXRNb2RlPXtzZXRNb2RlfVxuICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uSW50ZXJmYWNlPXtzZWxlY3Rpb25JbnRlcmZhY2V9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8VGFibGVWaXN1YWxcbiAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbkludGVyZmFjZT17c2VsZWN0aW9uSW50ZXJmYWNlfVxuICAgICAgICAgICAgICAgICAgbW9kZT17bW9kZX1cbiAgICAgICAgICAgICAgICAgIHNldE1vZGU9e3NldE1vZGV9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pKCl9XG4gICAgICAgIDwvR3JpZD5cbiAgICAgIDwvR3JpZD5cbiAgICA8L1Jlc3VsdHNWaWV3Q29udGV4dC5Qcm92aWRlcj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShSZXN1bHRzVmlldylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/table-header.d.ts b/src/main/webapp/component/visualization/results-visual/table-header.d.ts new file mode 100644 index 00000000000..282ea9816f1 --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/table-header.d.ts @@ -0,0 +1,39 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { LazyQueryResults } from '../../../js/model/LazyQueryResult/LazyQueryResults'; +import { ButtonProps } from '@mui/material/Button'; +export type Header = { + hidden: boolean; + id: string; + label?: string; + sortable: boolean; +}; +type HeaderProps = { + lazyResults: LazyQueryResults; + setHeaderColWidth: Function; + headerColWidth: Map; + actionWidth: number; + addOnWidth: number; +}; +export declare const CellComponent: React.ForwardRefExoticComponent, HTMLDivElement>, "ref"> & React.RefAttributes>; +export declare const HeaderCheckbox: ({ showText, lazyResults, buttonProps, }: { + showText?: boolean | undefined; + lazyResults: HeaderProps['lazyResults']; + buttonProps?: ButtonProps | undefined; +}) => JSX.Element; +export declare const Header: ({ lazyResults, setHeaderColWidth, headerColWidth, actionWidth, addOnWidth, }: HeaderProps) => JSX.Element; +declare const _default: ({ lazyResults, setHeaderColWidth, headerColWidth, actionWidth, addOnWidth, }: HeaderProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/results-visual/table-header.js b/src/main/webapp/component/visualization/results-visual/table-header.js new file mode 100644 index 00000000000..f25afd61dfc --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/table-header.js @@ -0,0 +1,222 @@ +import { __assign, __read, __rest, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import _ from 'underscore'; +import user from '../../singletons/user-instance'; +import Button from '@mui/material/Button'; +import { useSelectionOfLazyResults } from '../../../js/model/LazyQueryResult/hooks'; +import CheckBoxIcon from '@mui/icons-material/CheckBox'; +import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank'; +import IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox'; +import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks'; +import { LayoutContext } from '../../golden-layout/visual-settings.provider'; +import { RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable, } from '../settings-helpers'; +export var CellComponent = React.forwardRef(function (props, ref) { + var style = props.style, className = props.className, otherProps = __rest(props, ["style", "className"]); + return (React.createElement("div", __assign({}, otherProps, { className: "inline-block ".concat(className, " p-2 overflow-auto whitespace-normal break-all "), style: __assign({ width: '200px', maxHeight: '200px' }, style), ref: ref }))); +}); +var updateSort = function (attribute) { + var prefs = user.get('user').get('preferences'); + var prefResultSort = prefs.get('resultSort'); + var currSort = prefResultSort && prefResultSort.length + ? prefResultSort.find(function (sort) { return sort.attribute === attribute; }) + : undefined; + var sort = [ + { + attribute: attribute, + direction: 'ascending', + }, + ]; + if (currSort) { + sort[0].direction = + currSort.direction === 'ascending' ? 'descending' : 'ascending'; + } + prefs.set('resultSort', sort); + prefs.savePreferences(); +}; +var getSortDirectionClass = function (attribute) { + var sorts = user.get('user').get('preferences').get('resultSort'); + var matchedSort = sorts && sorts.find(function (sort) { return sort.attribute === attribute; }); + if (matchedSort && matchedSort.direction) { + if (matchedSort.direction === 'ascending') { + return 'fa fa-sort-asc'; + } + else if (matchedSort.direction === 'descending') { + return 'fa fa-sort-desc'; + } + else { + return ''; + } + } + else { + return ''; + } +}; +export var HeaderCheckbox = function (_a) { + var _b = _a.showText, showText = _b === void 0 ? false : _b, lazyResults = _a.lazyResults, buttonProps = _a.buttonProps; + var selection = useSelectionOfLazyResults({ + lazyResults: Object.values(lazyResults.results), + }); + return (React.createElement(Button, __assign({ "data-id": "select-all-checkbox", color: "primary", onClick: function (event) { + event.stopPropagation(); + if (selection === 'selected') { + Object.values(lazyResults.results).forEach(function (lazyResult) { + lazyResult.setSelected(false); + }); + } + else { + Object.values(lazyResults.results).forEach(function (lazyResult) { + lazyResult.setSelected(true); + }); + } + } }, buttonProps), (function () { + switch (selection) { + case 'partially': + return (React.createElement(React.Fragment, null, + React.createElement(IndeterminateCheckBoxIcon, { className: "Mui-text-text-primary" }), + showText ? React.createElement("div", { className: "pl-2" }, "Select All") : null)); + case 'selected': + return (React.createElement(React.Fragment, null, + React.createElement(CheckBoxIcon, { className: "Mui-text-text-primary" }), + showText ? React.createElement("div", { className: "pl-2" }, "Deselect All") : null)); + case 'unselected': + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "Mui-text-text-primary" }, + React.createElement(CheckBoxOutlineBlankIcon, null)), + showText ? React.createElement("div", { className: "pl-2" }, "Select All") : null)); + } + })())); +}; +export var Header = function (_a) { + var lazyResults = _a.lazyResults, setHeaderColWidth = _a.setHeaderColWidth, headerColWidth = _a.headerColWidth, actionWidth = _a.actionWidth, addOnWidth = _a.addOnWidth; + var _b = React.useContext(LayoutContext), getValue = _b.getValue, onStateChanged = _b.onStateChanged; + var MetacardDefinitions = useMetacardDefinitions(); + var handleSortClick = _.debounce(updateSort, 500, true); + var _c = __read(React.useState(getValue(RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable())), 2), shownAttributes = _c[0], setShownAttributes = _c[1]; + var _d = __read(React.useState(null), 2), activeIndex = _d[0], setActiveIndex = _d[1]; + var columnRefs = React.useRef(shownAttributes.map(function () { return React.createRef(); })); + var prefs = user.get('user').get('preferences'); + var mouseDown = function (index) { + setActiveIndex(index); + }; + var mouseMove = React.useCallback(function (e) { + var columnsWidth = new Map(__spreadArray([], __read(headerColWidth), false)); + if (headerColWidth.size === 0) { + shownAttributes.map(function (col) { + columnsWidth.set(col, '200px'); + }); + } + shownAttributes.map(function (col, i) { + if (i === activeIndex) { + var currRef = columnRefs.current[i].current; + var offset = currRef === null || currRef === void 0 ? void 0 : currRef.getBoundingClientRect().x; + if (offset) { + var width = e.clientX - offset; + if (currRef) { + currRef.style.width = "".concat(width, "px"); + columnsWidth.set(col, "".concat(width, "px")); + } + } + } + }); + setHeaderColWidth(columnsWidth); + prefs.set('columnWidths', columnsWidth); + prefs.savePreferences(); + }, [activeIndex, shownAttributes]); + var resetColumnWidth = function (col) { + var columnsWidth = new Map(__spreadArray([], __read(headerColWidth), false)); + columnsWidth.set(col, '200px'); + setHeaderColWidth(columnsWidth); + prefs.set('columnWidths', columnsWidth); + prefs.savePreferences(); + }; + var removeListeners = React.useCallback(function () { + window.removeEventListener('mousemove', mouseMove); + window.removeEventListener('mouseup', removeListeners); + }, [mouseMove]); + var mouseUp = React.useCallback(function () { + setActiveIndex(null); + removeListeners(); + }, [setActiveIndex, removeListeners]); + React.useEffect(function () { + if (activeIndex !== null) { + window.addEventListener('mousemove', mouseMove); + window.addEventListener('mouseup', mouseUp); + } + return function () { + removeListeners(); + }; + }, [activeIndex, mouseMove, mouseUp, removeListeners]); + React.useEffect(function () { + onStateChanged(function () { + var shownList = getValue(RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable()); + setShownAttributes(shownList); + columnRefs.current = shownList.map(function () { + return React.createRef(); + }); + }); + }, []); + return (React.createElement(React.Fragment, null, + React.createElement("div", { "data-id": "table-container", className: "bg-inherit whitespace-nowrap flex items-strech flex-nowrap", style: { + width: shownAttributes.length * 200 + 'px', + display: 'grid', + gridTemplateColumns: "repeat(".concat(shownAttributes.length + 4, ", 1fr)"), + } }, + React.createElement("div", { key: "resultItemAction", className: "bg-inherit Mui-border-divider border border-t-0 border-l-0 border-b-0" }, + React.createElement("div", { style: { + width: actionWidth, + } })), + React.createElement("div", { className: "sticky left-0 w-auto z-10 bg-inherit Mui-border-divider border border-t-0 border-l-0 border-b-0" }, + React.createElement(CellComponent, { className: "bg-inherit", style: { width: 'auto', paddingLeft: '0px', paddingRight: '0px' } }, + React.createElement(HeaderCheckbox, { lazyResults: lazyResults }))), + React.createElement("div", { key: "resultItemAddOn", className: "bg-inherit Mui-border-divider border border-t-0 border-l-0 border-b-0" }, + React.createElement("div", { style: { + width: addOnWidth, + } })), + shownAttributes.map(function (attr, index) { + var label = MetacardDefinitions.getAlias(attr); + var sortable = true; + return (React.createElement("div", { key: attr, style: { + display: 'flex', + width: "".concat(headerColWidth.get(attr)), + minWidth: '200px', + }, ref: columnRefs.current[index] }, + React.createElement(CellComponent, { className: "".concat(sortable ? 'is-sortable' : '', " Mui-border-divider border border-t-0 border-l-0 border-b-0"), "data-propertyid": "".concat(attr), "data-propertytext": "".concat(label ? "".concat(label) : "".concat(attr)), style: { + width: '100%', + minWidth: '200px', + display: 'flex', + padding: 0, + } }, + React.createElement(Button, { disabled: !sortable, className: "w-full outline-none is-bold h-full", onClick: function () { return handleSortClick(attr); }, style: { width: '100%', marginRight: '5px' } }, + React.createElement("div", { className: "w-full text-left" }, + React.createElement("span", { className: "column-text is-bold", title: "".concat(label ? "".concat(label) : "".concat(attr)) }, "".concat(label ? "".concat(label) : "".concat(attr))), + React.createElement("span", { className: getSortDirectionClass(attr), style: { paddingLeft: '3px' } }))), + React.createElement("div", { style: { width: '10px', cursor: 'col-resize' }, className: "hover:border-solid", onDoubleClick: function () { + resetColumnWidth(attr); + var currRef = columnRefs.current[index].current; + if (currRef) { + currRef.style.width = '200px'; + } + }, onMouseDown: function () { + mouseDown(index); + } })))); + }), + React.createElement(CellComponent, { style: { width: '8px' } }), + ' '))); +}; +export default hot(module)(Header); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUtaGVhZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2NvbXBvbmVudC92aXN1YWxpemF0aW9uL3Jlc3VsdHMtdmlzdWFsL3RhYmxlLWhlYWRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFFdEMsT0FBTyxDQUFDLE1BQU0sWUFBWSxDQUFBO0FBQzFCLE9BQU8sSUFBSSxNQUFNLGdDQUFnQyxDQUFBO0FBQ2pELE9BQU8sTUFBdUIsTUFBTSxzQkFBc0IsQ0FBQTtBQUMxRCxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSx5Q0FBeUMsQ0FBQTtBQUNuRixPQUFPLFlBQVksTUFBTSw4QkFBOEIsQ0FBQTtBQUN2RCxPQUFPLHdCQUF3QixNQUFNLDBDQUEwQyxDQUFBO0FBQy9FLE9BQU8seUJBQXlCLE1BQU0sMkNBQ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ZCh0cnVlKVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH19XG4gICAgICB7Li4uYnV0dG9uUHJvcHN9XG4gICAgPlxuICAgICAgeygoKSA9PiB7XG4gICAgICAgIHN3aXRjaCAoc2VsZWN0aW9uKSB7XG4gICAgICAgICAgY2FzZSAncGFydGlhbGx5JzpcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgPEluZGV0ZXJtaW5hdGVDaGVja0JveEljb24gY2xhc3NOYW1lPVwiTXVpLXRleHQtdGV4dC1wcmltYXJ5XCIgLz5cbiAgICAgICAgICAgICAgICB7c2hvd1RleHQgPyA8ZGl2IGNsYXNzTmFtZT1cInBsLTJcIj5TZWxlY3QgQWxsPC9kaXY+IDogbnVsbH1cbiAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgY2FzZSAnc2VsZWN0ZWQnOlxuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICA8Q2hlY2tCb3hJY29uIGNsYXNzTmFtZT1cIk11aS10ZXh0LXRleHQtcHJpbWFyeVwiIC8+XG4gICAgICAgICAgICAgICAge3Nob3dUZXh0ID8gPGRpdiBjbGFzc05hbWU9XCJwbC0yXCI+RGVzZWxlY3QgQWxsPC9kaXY+IDogbnVsbH1cbiAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgY2FzZSAndW5zZWxlY3RlZCc6XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICA8PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiTXVpLXRleHQtdGV4dC1wcmltYXJ5XCI+XG4gICAgICAgICAgICAgICAgICA8Q2hlY2tCb3hPdXRsaW5lQmxhbmtJY29uIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAge3Nob3dUZXh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JlZnMgPSB1c2VyLmdldCgndXNlcicpLmdldCgncHJlZmVyZW5jZXMnKVxuXG4gIGNvbnN0IG1vdXNlRG93biA9IChpbmRleDogYW55KSA9PiB7XG4gICAgc2V0QWN0aXZlSW5kZXgoaW5kZXgpXG4gIH1cblxuICBjb25zdCBtb3VzZU1vdmUgPSBSZWFjdC51c2VDYWxsYmFjayhcbiAgICAoZTogYW55KSA9PiB7XG4gICAgICBjb25zdCBjb2x1bW5zV2lkdGggPSBuZXcgTWFwPHN0cmluZywgc3RyaW5nPihbLi4uaGVhZGVyQ29sV2lkdGhdKVxuXG4gICAgICBpZiAoaGVhZGVyQ29sV2lkdGguc2l6ZSA9PT0gMCkge1xuICAgICAgICBzaG93bkF0dHJpYnV0ZXMubWFwKChjb2wpID0+IHtcbiAgICAgICAgICBjb2x1bW5zV2lkdGguc2V0KGNvbCwgJzIwMHB4JylcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgc2hvd25BdHRyaWJ1dGVzLm1hcCgoY29sLCBpKSA9PiB7XG4gICAgICAgIGlmIChpID09PSBhY3RpdmVJbmRleCkge1xuICAgICAgICAgIGNvbnN0IGN1cnJSZWYgPSBjb2x1bW5SZWZzLmN1cnJlbnRbaV0uY3VycmVudFxuICAgICAgICAgIGNvbnN0IG9mZnNldCA9IGN1cnJSZWY/LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLnhcbiAgICAgICAgICBpZiAob2Zmc2V0KSB7XG4gICAgICAgICAgICBjb25zdCB3aWR0aCA9IGUuY2xpZW50WCAtIG9mZnNldFxuICAgICAgICAgICAgaWYgKGN1cnJSZWYpIHtcbiAgICAgICAgICAgICAgY3VyclJlZi5zdHlsZS53aWR0aCA9IGAke3dpZHRofXB4YFxuICAgICAgICAgICAgICBjb2x1bW5zV2lkdGguc2V0KGNvbCwgYCR7d2lkdGh9cHhgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSlcbiAgICAgIHN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AgICAgICAgZ3JpZFRlbXBsYXRlQ29sdW1uczogYHJlcGVhdCgke3Nob3duQXR0cmlidXRlcy5sZW5ndGggKyA0fSwgMWZyKWAsXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBrZXk9XCJyZXN1bHRJdGVtQWN0aW9uXCJcbiAgICAgICAgICBjbGFzc05hbWU9XCJiZy1pbmhlcml0IE11aS1ib3JkZXItZGl2aWRlciBib3JkZXIgYm9yZGVyLXQtMCBib3JkZXItbC0wIGJvcmRlci1iLTBcIlxuICAgICAgICA+XG4gICAgICAgICAgPGRpdlxuICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgd2lkdGg6IGFjdGlvbldpZHRoLFxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJzdGlja3kgbGVmdC0wIHctYXV0byB6LTEwIGJnLWluaGVyaXQgTXVpLWJvcmRlci1kaXZpZGVyIGJvcmRlciBib3JkZXItdC0wIGJvcmRlci1sLTAgYm9yZGVyLWItMFwiPlxuICAgICAgICAgIDxDZWxsQ29tcG9uZW50XG4gICAgICAgICAgICBjbGFzc05hbWU9XCJiZy1pbmhlcml0XCJcbiAgICAgICAgICAgIHN0eWxlPXt7IHdpZHRoOiAnYXV0bycsIHBhZGRpbmdMZWZ0OiAnMHB4JywgcGFkZGluZ1JpZ2h0OiAnMHB4JyB9fVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxIZWFkZXJDaGVja2JveCBsYXp5UmVzdWx0cz17bGF6eVJlc3VsdHN9IC8+XG4gICAgICAgICAgPC9DZWxsQ29tcG9uZW50PlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdlxuICAgICAgICAgIGtleT1cInJlc3VsdEl0ZW1BZGRPblwiXG4gICAgICAgICAgY2xhc3NOYW1lPVwiYmctaW5oZXJpdCBNdWktYm9yZGVyLWRpdmlkZXIgYm9yZGVyIGJvcmRlci10LTAgYm9yZGVyLWwtMCBib3JkZXItYi0wXCJcbiAgICAgICAgPlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgIHdpZHRoOiBhZGRPbldpZHRoLFxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAge3Nob3duQXR0cmlidXRlcy5tYXAoKGF0dHIsIGluZGV4KSA9PiB7XG4gICAgICAgICAgY29uc3QgbGFiZWwgPSBNZXRhY2FyZERlZmluaXRpb25zLmdldEFsaWFzKGF0dHIpXG4gICAgICAgICAgY29uc3Qgc29ydGFibGUgPSB0cnVlXG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAga2V5PXthdHRyfVxuICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcbiAgICAgICAgICAgICAgICB3aWR0aDogYCR7aGVhZGVyQ29sV2lkdGguZ2V0KGF0dHIpfWAsXG4gICAgICAgICAgICAgICAgbWluV2lkdGg6ICcyMDBweCcsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIHJlZj17Y29sdW1uUmVmcy5jdXJyZW50W2luZGV4XX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPENlbGxDb21wb25lbnRcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2Ake1xuICAgICAgICAgICAgICAgICAgc29ydGFibGUgPyAnaXMtc29ydGFibGUnIDogJydcbiAgICAgICAgICAgICAgICB9IE11aS1ib3JkZXItZGl2aWRlciBib3JkZXIgYm9yZGVyLXQtMCBib3JkZXItbC0wIGJvcmRlci1iLTBgfVxuICAgICAgICAgICAgICAgIGRhdGEtcHJvcGVydHlpZD17YCR7YXR0cn1gfVxuICAgICAgICAgICAgICAgIGRhdGEtcHJvcGVydHl0ZXh0PXtgJHtsYWJlbCA/IGAke2xhYmVsfWAgOiBgJHthdHRyfWB9YH1cbiAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgICAgICAgIG1pbldpZHRoOiAnMjAwcHgnLFxuICAgICAgICAgICAgICAgICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgICAgICAgICAgICAgICAgcGFkZGluZzogMCxcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ9eyFzb3J0YWJsZX1cbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cInctZnVsbCBvdXRsaW5lLW5vbmUgaXMtYm9sZCBoLWZ1bGxcIlxuICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlU29ydENsaWNrKGF0dHIpfVxuICAgICAgICAgICAgICAgICAgc3R5bGU9e3sgd2lkdGg6ICcxMDAlJywgbWFyZ2luUmlnaHQ6ICc1cHgnIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJ3LWZ1bGwgdGV4dC1sZWZ0XCI+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuXG4gICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiY29sdW1uLXRleHQgaXMtYm9sZFwiXG4gICAgICAgICAgICAgICAgICAgICAgdGl0bGU9e2Ake2xhYmVsID8gYCR7bGFiZWx9YCA6IGAke2F0dHJ9YH1gfVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAge2Ake2xhYmVsID8gYCR7bGFiZWx9YCA6IGAke2F0dHJ9YH1gfVxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuXG4gICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtnZXRTb3J0RGlyZWN0aW9uQ2xhc3MoYXR0cil9XG4gICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3sgcGFkZGluZ0xlZnQ6ICczcHgnIH19XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICBzdHlsZT17eyB3aWR0aDogJzEwcHgnLCBjdXJzb3I6ICdjb2wtcmVzaXplJyB9fVxuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPVwiaG92ZXI6Ym9yZGVyLXNvbGlkXCJcbiAgICAgICAgICAgICAgICAgIG9uRG91YmxlQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzZXRDb2x1bW5XaWR0aChhdHRyKVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBjdXJyUmVmID0gY29sdW1uUmVmcy5jdXJyZW50W2luZGV4XS5jdXJyZW50XG4gICAgICAgICAgICAgICAgICAgIGlmIChjdXJyUmVmKSB7XG4gICAgICAgICAgICAgICAgICAgICAgY3VyclJlZi5zdHlsZS53aWR0aCA9ICcyMDBweCdcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgIG9uTW91c2VEb3duPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIG1vdXNlRG93bihpbmRleClcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPjwvZGl2PlxuICAgICAgICAgICAgICA8L0NlbGxDb21wb25lbnQ+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICApXG4gICAgICAgIH0pfVxuICAgICAgICA8Q2VsbENvbXBvbmVudCBzdHlsZT17eyB3aWR0aDogJzhweCcgfX0+PC9DZWxsQ29tcG9uZW50PnsnICd9XG4gICAgICAgIHsvKiogLy8gOHB4IGlzIHRoZSBzY3JvbGxiYXIgd2lkdGggYW5kIHRoZXkgb25seSBhZmZlY3QgdGhlIGJvZHksIHNvIHdlIG5lZWQgdG8gYWNjb3VudCBmb3IgaXQgKi99XG4gICAgICA8L2Rpdj5cbiAgICA8L1JlYWN0LkZyYWdtZW50PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKEhlYWRlcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/results-visual/table.d.ts b/src/main/webapp/component/visualization/results-visual/table.d.ts new file mode 100644 index 00000000000..dfb559b4dce --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/table.d.ts @@ -0,0 +1,14 @@ +/// +type Props = { + selectionInterface: any; + mode: any; + setMode: any; +}; +type ResultsCommonControlsType = { + getStartingLeft: () => string[]; + getStartingRight: () => string[]; + onSave: (active: string[]) => void; +}; +export declare const ResultsCommonControls: ({ getStartingLeft, getStartingRight, onSave, }: ResultsCommonControlsType) => JSX.Element; +declare const _default: ({ selectionInterface, mode, setMode }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/component/visualization/results-visual/table.js b/src/main/webapp/component/visualization/results-visual/table.js new file mode 100644 index 00000000000..18dd81776ed --- /dev/null +++ b/src/main/webapp/component/visualization/results-visual/table.js @@ -0,0 +1,181 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import Button from '@mui/material/Button'; +import user from '../../singletons/user-instance'; +import { hot } from 'react-hot-loader'; +import { AutoVariableSizeList } from 'react-window-components'; +import Grid from '@mui/material/Grid'; +import { Header } from './table-header'; +import ResultItemRow from './result-item-row'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../../theme/theme'; +import Divider from '@mui/material/Divider'; +import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks'; +import { useStatusOfLazyResults } from '../../../js/model/LazyQueryResult/hooks'; +import LinearProgress from '@mui/material/LinearProgress'; +import { DarkDivider } from '../../dark-divider/dark-divider'; +import { useTheme } from '@mui/material/styles'; +import ViewAgendaIcon from '@mui/icons-material/ViewAgenda'; +import TableChartIcon from '@mui/icons-material/TableChart'; +import TransferList from '../../tabs/metacard/transfer-list'; +import { useDialog } from '../../dialog'; +import { TypedUserInstance } from '../../singletons/TypedUser'; +import useTimePrefs from '../../fields/useTimePrefs'; +import { useScrollToItemOnSelection } from './result-item.collection'; +import { Memo } from '../../memo/memo'; +import { LayoutContext } from '../../golden-layout/visual-settings.provider'; +import { RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable, } from '../settings-helpers'; +export var ResultsCommonControls = function (_a) { + var getStartingLeft = _a.getStartingLeft, getStartingRight = _a.getStartingRight, onSave = _a.onSave; + var dialogContext = useDialog(); + return (React.createElement(React.Fragment, null, + React.createElement(Grid, { item: true, className: "ml-auto pr-8 " }, + React.createElement(Button, { "data-id": "manage-attributes-button", onClick: function () { + dialogContext.setProps({ + PaperProps: { + style: { + minWidth: 'none', + }, + elevation: Elevations.panels, + }, + open: true, + disableEnforceFocus: true, + children: (React.createElement("div", { style: { + minHeight: '60vh', + } }, + React.createElement(TransferList, { startingLeft: getStartingLeft(), startingRight: getStartingRight(), onSave: function (active) { + onSave(active); + } }))), + }); + }, color: "primary" }, "Manage Attributes")))); +}; +var TableVisual = function (_a) { + var selectionInterface = _a.selectionInterface, mode = _a.mode, setMode = _a.setMode; + var _b = React.useContext(LayoutContext), getValue = _b.getValue, setValue = _b.setValue; + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var results = Object.values(lazyResults.results); + var theme = useTheme(); + var _c = useStatusOfLazyResults({ lazyResults: lazyResults }), isSearching = _c.isSearching, status = _c.status; + useTimePrefs(); + var headerRef = React.useRef(null); + /** + * Note that this scenario only plays out when the component is first created, so if this is open before a search is run it will already be mounted. + * + * This is solely to keep the illusion of responsiveness when switching from table mode to list mode (or dropping a new result visual in) + */ + var _d = __read(React.useState(false), 2), isMounted = _d[0], setIsMounted = _d[1]; + var _e = useScrollToItemOnSelection({ + selectionInterface: selectionInterface, + }), listRef = _e.listRef, setLastInteraction = _e.setLastInteraction; + React.useEffect(function () { + var mountedTimeout = setTimeout(function () { + setIsMounted(true); + }, 1000); + return function () { + clearTimeout(mountedTimeout); + }; + }, []); + var prefs = user.get('user').get('preferences'); + var columnsWidth = new Map(prefs.get('columnWidths')); + var _f = __read(React.useState(columnsWidth), 2), headerColWidth = _f[0], setHeaderColWidth = _f[1]; + var setWidth = function (width) { + setHeaderColWidth(width); + }; + var _g = __read(React.useState(0), 2), maxActionWidth = _g[0], setMaxActionWidth = _g[1]; + var _h = __read(React.useState(0), 2), maxAddOnWidth = _h[0], setMaxAddOnWidth = _h[1]; + return (React.createElement(Grid, { container: true, className: "w-full h-full bg-inherit", direction: "column", wrap: "nowrap" }, + React.createElement(Grid, { item: true }, + React.createElement(Grid, { container: true, className: "w-full pt-2 px-2", direction: "row", alignItems: "center" }, + React.createElement(ResultsCommonControls, { getStartingLeft: function () { + return getValue(RESULTS_ATTRIBUTES_TABLE, getDefaultResultsShownTable()); + }, getStartingRight: function () { + return TypedUserInstance.getResultsAttributesPossibleTable(getValue(RESULTS_ATTRIBUTES_TABLE)); + }, onSave: function (active) { return setValue(RESULTS_ATTRIBUTES_TABLE, active); } }), + React.createElement(Grid, { item: true, className: "pr-2" }, + React.createElement(Button, { "data-id": "list-button", onClick: function () { + setMode('card'); + }, style: { + borderBottom: mode === 'card' + ? "1px solid ".concat(theme.palette.primary.main) + : '1px solid transparent', + } }, + React.createElement(ViewAgendaIcon, null), + "List")), + React.createElement(Grid, { item: true }, + React.createElement(Button, { "data-id": "table-button", onClick: function () { + setMode('table'); + }, style: { + borderBottom: mode === 'table' + ? "1px solid ".concat(theme.palette.primary.main) + : '1px solid transparent', + } }, + React.createElement(TableChartIcon, null), + "Table")))), + React.createElement(DarkDivider, { className: "w-full h-min my-2" }), + React.createElement(Grid, { item: true, className: "overflow-hidden bg-inherit w-full h-full p-2" }, + React.createElement(Paper, { elevation: Elevations.paper, className: "w-full h-full" }, isMounted ? (React.createElement(Grid, { container: true, className: "w-full h-full bg-inherit", direction: "column", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "bg-inherit" }, + React.createElement("div", { className: "w-auto overflow-auto scrollbars-hide bg-inherit", ref: headerRef }, + React.createElement(Header, { lazyResults: lazyResults, setHeaderColWidth: setWidth, headerColWidth: headerColWidth, actionWidth: maxActionWidth, addOnWidth: maxAddOnWidth }))), + React.createElement(Grid, { item: true }, + React.createElement(Divider, { className: "w-full h-min" })), + React.createElement(Grid, { item: true, className: "w-full h-full overflow-hidden bg-inherit" }, + React.createElement(Memo, { dependencies: [ + listRef.current, + lazyResults.results, + isSearching, + status, + maxAddOnWidth, + ] }, + React.createElement(AutoVariableSizeList, { outerElementProps: { + onScroll: function (e) { + if (headerRef.current) { + headerRef.current.scrollLeft = e.target.scrollLeft; + } + }, + onMouseEnter: function () { + setLastInteraction(Date.now()); + }, + onMouseUp: function () { + setLastInteraction(Date.now()); + }, + }, defaultSize: 76, overscanCount: 10, controlledMeasuring: true, items: results, Item: function (_a) { + var itemRef = _a.itemRef, item = _a.item, measure = _a.measure, index = _a.index; + return (React.createElement("div", { ref: itemRef, className: "bg-inherit" }, + React.createElement(ResultItemRow, { lazyResult: item, measure: measure, index: index, results: results, selectionInterface: selectionInterface, headerColWidth: headerColWidth, actionWidth: maxActionWidth, setMaxActionWidth: function (width) { + return setMaxActionWidth(function (maxWidth) { + return Math.max(width, maxWidth); + }); + }, addOnWidth: maxAddOnWidth, setMaxAddOnWidth: function (width) { + return setMaxAddOnWidth(function (maxWidth) { + return Math.max(width, maxWidth); + }); + } }))); + }, Empty: function () { + if (Object.values(status).length === 0) { + return (React.createElement("div", { className: "p-2" }, "Search has not yet been run.")); + } + if (isSearching) { + return React.createElement(LinearProgress, { variant: "indeterminate" }); + } + return (React.createElement("div", { className: "result-item-collection-empty p-2" }, "No Results Found")); + }, variableSizeListRef: listRef }))))) : (React.createElement(LinearProgress, { variant: "indeterminate" })))))); +}; +export default hot(module)(TableVisual); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vcmVzdWx0cy12aXN1YWwvdGFibGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxJQUFJLE1BQU0sZ0NBQWdDLENBQUE7QUFDakQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBQzlELE9BQU8sSUFBSSxNQUFNLG9CQUFvQixDQUFBO0FBQ3JDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUN2QyxPQUFPLGFBQWEsTUFBTSxtQkFBbUIsQ0FBQTtBQUU3QyxPQUFPLEtBQUssTUFBTSxxQkFBcUIsQ0FBQTtBQUN2QyxPQUFPLEVBQUUsVUFBV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XBlID0ge1xuICBnZXRTdGFydGluZ0xlZnQ6ICgpID0+IHN0cmluZ1tdXG4gIGdldFN0YXJ0aW5nUmlnaHQ6ICgpID0+IHN0cmluZ1tdXG4gIG9uU2F2ZTogKGFjdGl2ZTogc3RyaW5nW10pID0+IHZvaWRcbn1cbmV4cG9ydCBjb25zdCBSZXN1bHRzQ29tbW9uQ29udHJvbHMgPSAoe1xuICBnZXRTdGFydGluZ0xlZnQsXG4gIGdldFN0YXJ0aW5nUmlnaHQsXG4gIG9uU2F2ZSxcbn06IFJlc3VsdHNDb21tb25Db250cm9sc1R5cGUpID0+IHtcbiAgY29uc3QgZGlhbG9nQ29udGV4dCA9IHVzZURpYWxvZygpXG4gIHJldHVybiAoXG4gICAgPD5cbiAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwibWwtYXV0byBwci04IFwiPlxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgZGF0YS1pZD1cIm1hbmFnZS1hdHRyaWJ1dGVzLWJ1dHRvblwiXG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgZGlhbG9nQ29udGV4dC5zZXRQcm9wcyh7XG4gICAgICAgICAgICAgIFBhcGVyUHJvcHM6IHtcbiAgICAgICAgICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgICAgICAgbWluV2lkdGg6ICdub25lJyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGVsZXZhdGlvbjogRWxldmF0aW9ucy5wYW5lbHMsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIG9wZW46IHRydWUsXG4gICAgICAgICAgICAgIGRpc2FibGVFbmZvcmNlRm9jdXM6IHRydWUsXG4gICAgICAgICAgICAgIGNoaWxkcmVuOiAoXG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgbWluSGVpZ2h0OiAnNjB2aCcsXG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxUcmFuc2Zlckxpc3RcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRpbmdMZWZ0PXtnZXRTdGFydGluZ0xlZnQoKX1cbiAgICAgICAgICAgICAgICAgICAgc3RhcnRpbmdSaWdodD17Z2V0U3RhcnRpbmdSaWdodCgpfVxuICAgICAgICAgICAgICAgICAgICBvblNhdmU9eyhhY3RpdmUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICBvblNhdmUoYWN0aXZlKVxuICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfX1cbiAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICA+XG4gICAgICAgICAgTWFuYWdlIEF0dHJpYnV0ZXNcbiAgICAgICAgPC9CdXR0b24+XG4gICAgICA8L0dyaWQ+XG4gICAgPC8+XG4gIClcbn1cbmNvbnN0IFRhYmxlVmlzdWFsID0gKHsgc2VsZWN0aW9uSW50ZXJmYWNlLCBtb2RlLCBzZXRNb2RlIH06IFByb3BzKSA9PiB7XG4gIGNvbnN0IHsgZ2V0VmFsdWUsIHNldFZhbHVlIH0gPSBSZWFjdC51c2VDb250ZXh0KExheW91dENvbnRleHQpXG4gIGNvbnN0IGxhenlSZXN1bHRzID0gdXNlTGF6eVJlc3VsdHNGcm9tU2VsZWN0aW9uSW50ZXJmYWNlKHtcbiAgICBzZWxlY3Rpb25JbnRlcmZhY2UsXG4gIH0pXG4gIGNvbnN0IHJlc3VsdHMgPSBPYmplY3QudmFsdWVzKGxhenlSZXN1bHRzLnJlc3VsdHMpXG4gIGNvbnN0IHRoZW1lID0gdXNlVGhlbWUoKVxuICBjb25zdCB7IGlzU2VhcmNoaW5nLCBzdGF0dXMgfSA9IHVzZ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NVTFRTX0FUVFJJQlVURVNfVEFCTEUsXG4gICAgICAgICAgICAgICAgZ2V0RGVmYXVsdFJlc3VsdHNTaG93blRhYmxlKClcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGdldFN0YXJ0aW5nUmlnaHQ9eygpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIFR5cGVkVXNlckluc3RhbmNlLmdldFJlc3VsdHNBdHRyaWJ1dGVzUG9zc2libGVUYWJsZShcbiAgICAgICAgICAgICAgICBnZXRWYWx1ZShSRVNVTFRTX0FUVFJJQlVURVNfVEFCTEUpXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBvblNhdmU9eyhhY3RpdmUpID0+IHNldFZhbHVlKFJFU1VMVFNfQVRUUklCVVRFU19UQUJMRSwgYWN0aXZlKX1cbiAgICAgICAgICAvPlxuICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwicHItMlwiPlxuICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICBkYXRhLWlkPVwibGlzdC1idXR0b25cIlxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0TW9kZSgnY2FyZCcpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgICAgYm9yZGVyQm90dG9tOlxuICAgICAgICAgICAgICAgICAgbW9kZSA9PT0gJ2NhcmQnXG4gICAgICAgICAgICAgICAgICAgID8gYDFweCBzb2xpZCAke3RoZW1lLnBhbGV0dGUucHJpbWFyeS5tYWlufWBcbiAgICAgICAgICAgICAgICAgICAgOiAnMXB4IHNvbGlkIHRyYW5zcGFyZW50JyxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPFZpZXdBZ2VuZGFJY29uIC8+XG4gICAgICAgICAgICAgIExpc3RcbiAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICA8R3JpZCBpdGVtPlxuICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICBkYXRhLWlkPVwidGFibGUtYnV0dG9uXCJcbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgIHNldE1vZGUoJ3RhYmxlJylcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICBib3JkZXJCb3R0b206XG4gICAgICAgICAgICAgICAgICBtb2RlID09PSAndGFibGUnXG4gICAgICAgICAgICAgICAgICAgID8gYDFweCBzb2xpZCAke3RoZW1lLnBhbGV0dGUucHJpbWFyeS5tYWlufWBcbiAgICAgICAgICAgICAgICAgICAgOiAnMXB4IHNvbGlkIHRyYW5zcGFyZW50JyxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPFRhYmxlQ2hhcnRJY29uIC8+XG4gICAgICAgICAgICAgIFRhYmxlXG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgIDwvR3JpZD5cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxEYXJrRGl2aWRlciBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1taW4gbXktMlwiIC8+XG5cbiAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwib3ZlcmZsb3ctaGlkZGVuIGJnLWluaGVyaXQgdy1mdWxsIGgtZnVsbCBwLTJcIj5cbiAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5wYXBlcn0gY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbFwiPlxuICAgICAgICAgIHtpc01vdW50ZWQgPyAoXG4gICAgICAgICAgICA8R3JpZFxuICAgICAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidy1mdWxsIGgtZnVsbCBiZy1pbmhlcml0XCJcbiAgICAgICAgICAgICAgZGlyZWN0aW9uPVwiY29sdW1uXCJcbiAgICAgICAgICAgICAgd3JhcD1cIm5vd3JhcFwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwiYmctaW5oZXJpdFwiPlxuICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cInctYXV0byBvdmVyZmxvdy1hdXRvIHNjcm9sbGJhcnMtaGlkZSBiZy1pbmhlcml0XCJcbiAgICAgICAgICAgICAgICAgIHJlZj17aGVhZGVyUmVmfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxIZWFkZXJcbiAgICAgICAgICAgICAgICAgICAgbGF6eVJlc3VsdHM9e2xhenlSZXN1bHRzfVxuICAgICAgICAgICAgICAgICAgICBzZXRIZWFkZXJDb2xXaWR0aD17c2V0V2lkdGh9XG4gICAgICAgICAgICAgICAgICAgIGhlYWRlckNvbFdpZHRoPXtoZWFkZXJDb2xXaWR0aH1cbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uV2lkdGg9e21heEFjdGlvbldpZHRofVxuICAgICAgICAgICAgICAgICAgICBhZGRPbldpZHRoPXttYXhBZGRPbldpZHRofVxuICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICA8R3JpZCBpdGVtPlxuICAgICAgICAgICAgICAgIDxEaXZpZGVyIGNsYXNzTmFtZT1cInctZnVsbCBoLW1pblwiIC8+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGwgaC1mdWxsIG92ZXJmbG93LWhpZGRlbiBiZy1pbmhlcml0XCI+XG4gICAgICAgICAgICAgICAgPE1lbW9cbiAgICAgICAgICAgICAgICAgIGRlcGVuZGVuY2llcz17W1xuICAgICAgICAgICAgICAgICAgICBsaXN0UmVmLmN1cnJlbnQsXG4gICAgICAgICAgICAgICAgICAgIGxhenlSZXN1bHRzLnJlc3VsdHMsXG4gICAgICAgICAgICAgICAgICAgIGlzU2VhcmNoaW5nLFxuICAgICAgICAgICAgICAgICAgICBzdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgIG1heEFkZE9uV2lkdGgsXG4gICAgICAgICAgICAgICAgICBdfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxBdXRvVmFyaWFibGVTaXplTGlzdDxMYXp5UXVlcnlSZXN1bHQsIEhUTUxEaXZFbGVtZW50PlxuICAgICAgICAgICAgICAgICAgICBvdXRlckVsZW1lbnRQcm9wcz17e1xuICAgICAgICAgICAgICAgICAgICAgIG9uU2Nyb2xsOiAoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhlYWRlclJlZi5jdXJyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlclJlZi5jdXJyZW50LnNjcm9sbExlZnQgPSAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZS50YXJnZXQgYXMgYW55XG4gICAgICAgICAgICAgICAgICAgICAgICAgICkuc2Nyb2xsTGVmdFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgb25Nb3VzZUVudGVyOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRMYXN0SW50ZXJhY3Rpb24oRGF0ZS5ub3coKSlcbiAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgIG9uTW91c2VVcDogKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0TGFzdEludGVyYWN0aW9uKERhdGUubm93KCkpXG4gICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFNpemU9ezc2fVxuICAgICAgICAgICAgICAgICAgICBvdmVyc2NhbkNvdW50PXsxMH1cbiAgICAgICAgICAgICAgICAgICAgY29udHJvbGxlZE1lYXN1cmluZz17dHJ1ZX1cbiAgICAgICAgICAgICAgICAgICAgaXRlbXM9e3Jlc3VsdHN9XG4gICAgICAgICAgICAgICAgICAgIEl0ZW09eyh7IGl0ZW1SZWYsIGl0ZW0sIG1lYXN1cmUsIGluZGV4IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiByZWY9e2l0ZW1SZWZ9IGNsYXNzTmFtZT1cImJnLWluaGVyaXRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgPFJlc3VsdEl0ZW1Sb3dcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXp5UmVzdWx0PXtpdGVtfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lYXN1cmU9e21lYXN1cmV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg9e2luZGV4fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdHM9e3Jlc3VsdHN9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uSW50ZXJmYWNlPXtzZWxlY3Rpb25JbnRlcmZhY2V9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyQ29sV2lkdGg9e2hlYWRlckNvbFdpZHRofVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbldpZHRoPXttYXhBY3Rpb25XaWR0aH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRNYXhBY3Rpb25XaWR0aD17KHdpZHRoKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0TWF4QWN0aW9uV2lkdGgoKG1heFdpZHRoKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNYXRoLm1heCh3aWR0aCwgbWF4V2lkdGgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZE9uV2lkdGg9e21heEFkZE9uV2lkdGh9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0TWF4QWRkT25XaWR0aD17KHdpZHRoKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0TWF4QWRkT25XaWR0aCgobWF4V2lkdGgpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1hdGgubWF4KHdpZHRoLCBtYXhXaWR0aClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgIEVtcHR5PXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC52YWx1ZXMoc3RhdHVzKS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicC0yXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VhcmNoIGhhcyBub3QgeWV0IGJlZW4gcnVuLlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKGlzU2VhcmNoaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gPExpbmVhclByb2dyZXNzIHZhcmlhbnQ9XCJpbmRldGVybWluYXRlXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwicmVzdWx0LWl0ZW0tY29sbGVjdGlvbi1lbXB0eSBwLTJcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgTm8gUmVzdWx0cyBGb3VuZFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICB2YXJpYWJsZVNpemVMaXN0UmVmPXtsaXN0UmVmfVxuICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L01lbW8+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICApIDogKFxuICAgICAgICAgICAgPExpbmVhclByb2dyZXNzIHZhcmlhbnQ9XCJpbmRldGVybWluYXRlXCIgLz5cbiAgICAgICAgICApfVxuICAgICAgICA8L1BhcGVyPlxuICAgICAgPC9HcmlkPlxuICAgIDwvR3JpZD5cbiAgKVxufVxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoVGFibGVWaXN1YWwpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/settings-helpers.d.ts b/src/main/webapp/component/visualization/settings-helpers.d.ts new file mode 100644 index 00000000000..357704c5a06 --- /dev/null +++ b/src/main/webapp/component/visualization/settings-helpers.d.ts @@ -0,0 +1,45 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/** + * We might want to not export anything beyond the default state functions, but for now we can leave this and refactor when we have time. + * The idea is this state should be flowing in at the top when we make the component, and not be getting fetched in the leaves. Maybe we can add it to the context. + */ +import { ComponentNameType } from '../golden-layout/golden-layout.types'; +import { ModeType } from './results-visual/results-visual'; +export declare const RESULTS_ATTRIBUTES_TABLE = "results-attributesShownTable"; +export declare const RESULTS_ATTRIBUTES_LIST = "results-attributesShownList"; +export declare const RESULTS_MODE = "results-mode"; +export declare const MAP_LAYERS = "mapLayers"; +export declare function getDefaultComponentState(component: ComponentNameType): { + mapLayers: any; + "results-attributesShownTable"?: undefined; + "results-attributesShownList"?: undefined; + "results-mode"?: undefined; +} | { + "results-attributesShownTable": string[]; + "results-attributesShownList": string[]; + "results-mode": ModeType; + mapLayers?: undefined; +} | { + mapLayers?: undefined; + "results-attributesShownTable"?: undefined; + "results-attributesShownList"?: undefined; + "results-mode"?: undefined; +}; +export declare const getUserPreferencesMapLayersJSON: () => any; +export declare const getDefaultResultsMode: () => ModeType; +export declare const getDefaultResultsShownList: () => string[]; +export declare const getDefaultResultsShownTable: () => string[]; +export declare const getUserCoordinateFormat: () => string; diff --git a/src/main/webapp/component/visualization/settings-helpers.js b/src/main/webapp/component/visualization/settings-helpers.js new file mode 100644 index 00000000000..9b409e396c2 --- /dev/null +++ b/src/main/webapp/component/visualization/settings-helpers.js @@ -0,0 +1,64 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { TypedUserInstance } from '../singletons/TypedUser'; +export var RESULTS_ATTRIBUTES_TABLE = 'results-attributesShownTable'; +export var RESULTS_ATTRIBUTES_LIST = 'results-attributesShownList'; +export var RESULTS_MODE = 'results-mode'; +export var MAP_LAYERS = 'mapLayers'; +export function getDefaultComponentState(component) { + var _a, _b, _c; + switch (component) { + case 'cesium': + return _a = {}, + _a[MAP_LAYERS] = getUserPreferencesMapLayersJSON(), + _a; + case 'openlayers': + return _b = {}, + _b[MAP_LAYERS] = getUserPreferencesMapLayersJSON(), + _b; + case 'results': + return _c = {}, + _c[RESULTS_ATTRIBUTES_TABLE] = getDefaultResultsShownTable(), + _c[RESULTS_ATTRIBUTES_LIST] = getDefaultResultsShownList(), + _c[RESULTS_MODE] = getDefaultResultsMode(), + _c; + default: + return {}; + } +} +export var getUserPreferencesMapLayersJSON = function () { + return TypedUserInstance.getMapLayers().toJSON(); +}; +export var getDefaultResultsMode = function () { + return 'card'; +}; +export var getDefaultResultsShownList = function () { + var defaultAttributes = TypedUserInstance.getResultsAttributesShownList(); + if (defaultAttributes && defaultAttributes.length > 0) { + return defaultAttributes; + } + return ['title', 'thumbnail']; +}; +export var getDefaultResultsShownTable = function () { + var defaultAttributes = TypedUserInstance.getResultsAttributesShownTable(); + if (defaultAttributes && defaultAttributes.length > 0) { + return defaultAttributes; + } + return ['title', 'thumbnail']; +}; +export var getUserCoordinateFormat = function () { + return TypedUserInstance.getCoordinateFormat(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dGluZ3MtaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9jb21wb25lbnQvdmlzdWFsaXphdGlvbi9zZXR0aW5ncy1oZWxwZXJzLnRze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XR0cmlidXRlcy5sZW5ndGggPiAwKSB7XG4gICAgcmV0dXJuIGRlZmF1bHRBdHRyaWJ1dGVzXG4gIH1cbiAgcmV0dXJuIFsndGl0bGUnLCAndGh1bWJuYWlsJ11cbn1cblxuZXhwb3J0IGNvbnN0IGdldFVzZXJDb29yZGluYXRlRm9ybWF0ID0gKCkgPT4ge1xuICByZXR1cm4gVHlwZWRVc2VySW5zdGFuY2UuZ2V0Q29vcmRpbmF0ZUZvcm1hdCgpXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/component/visualization/timeline/timeline.d.ts b/src/main/webapp/component/visualization/timeline/timeline.d.ts new file mode 100644 index 00000000000..5447902542f --- /dev/null +++ b/src/main/webapp/component/visualization/timeline/timeline.d.ts @@ -0,0 +1,96 @@ +import { WithBackboneProps } from './../../../react-component/backbone-container'; +import * as React from 'react'; +declare const _default: { + new (props: import("../../../typescript/subtract").default<{ + selectionInterface: any; + } & WithBackboneProps, WithBackboneProps> | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../../typescript/subtract").default<{ + selectionInterface: any; + } & WithBackboneProps, WithBackboneProps>, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/component/visualization/timeline/timeline.js b/src/main/webapp/component/visualization/timeline/timeline.js new file mode 100644 index 00000000000..6ca157bc861 --- /dev/null +++ b/src/main/webapp/component/visualization/timeline/timeline.js @@ -0,0 +1,166 @@ +import { __makeTemplateObject, __read } from "tslib"; +import WithListenTo from './../../../react-component/backbone-container'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import styled from 'styled-components'; +import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks'; +import { useSelectedResults } from '../../../js/model/LazyQueryResult/hooks'; +import Timeline from '../../timeline'; +import moment from 'moment-timezone'; +import useTimePrefs from '../../fields/useTimePrefs'; +import IconHelper from '../../../js/IconHelper'; +import useSnack from '../../hooks/useSnack'; +import wreqr from '../../../js/wreqr'; +import user from '../../singletons/user-instance'; +import Extensions from '../../../extension-points'; +import _ from 'lodash'; +import { useConfiguration } from '../../../js/model/Startup/configuration.hooks'; +import { StartupDataStore } from '../../../js/model/Startup/startup'; +var maxDate = moment().tz(user.getTimeZone()); +var TimelineWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 40px 40px 60px 40px;\n height: 100%;\n\n .MuiButton-label {\n font-size: 0.875rem !important;\n }\n"], ["\n padding: 40px 40px 60px 40px;\n height: 100%;\n\n .MuiButton-label {\n font-size: 0.875rem !important;\n }\n"]))); +var getDateAttributes = function (results) { + var availableAttributes = Object.keys(results) + .reduce(function (currentAvailable, key) { + var result = results[key]; + // @ts-expect-error ts-migrate(2322) FIXME: Type 'string[]' is not assignable to type 'never[]... Remove this comment to see the full error message + currentAvailable = _.union(currentAvailable, Object.keys(result.plain.metacard.properties)); + return currentAvailable; + }, []) + .sort(); + var dateAttributes = availableAttributes.reduce(function (list, attribute) { + var _a; + if (((_a = StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute]) === null || _a === void 0 ? void 0 : _a.type) == 'DATE') { + list.push(attribute); + } + return list; + }, []); + return dateAttributes; +}; +var renderTooltip = function (timelineItems) { + var itemsToExpand = 5; + var uniqueMetacards = timelineItems.filter(function (item, index) { return timelineItems.indexOf(item) === index; }); + var results = uniqueMetacards.slice(0, itemsToExpand).map(function (item) { + var data = item.data; + var icon = IconHelper.getFullByMetacardObject(data.plain); + var metacard = data.plain.metacard.properties; + var ItemAddOn = Extensions.timelineItemAddOn({ + results: [data], + isSingleItem: true, + }); + var valCount = timelineItems.filter(function (i) { return i.id === item.id; }).length; + return (React.createElement(React.Fragment, { key: metacard.id }, + React.createElement("span", { className: icon.class }), + "\u00A0", + ItemAddOn && (React.createElement(React.Fragment, null, + ItemAddOn, + "\u00A0")), + React.createElement("span", null, "".concat(metacard.title || metacard.id).concat(valCount > 1 ? " (".concat(valCount, ")") : '')), + React.createElement("br", null))); + }); + var OtherItemsAddOn = null; + if (uniqueMetacards.length > itemsToExpand) { + OtherItemsAddOn = Extensions.timelineItemAddOn({ + results: uniqueMetacards + .slice(itemsToExpand) + .map(function (item) { return item.data; }), + isSingleItem: false, + }); + } + var otherResults = (React.createElement(React.Fragment, null, + React.createElement("br", null), "+".concat(uniqueMetacards.length - itemsToExpand, " other results"), + OtherItemsAddOn && (React.createElement(React.Fragment, null, + "\u00A0", + OtherItemsAddOn)))); + return (React.createElement(React.Fragment, null, + results, + uniqueMetacards.length > itemsToExpand && otherResults)); +}; +var TimelineVisualization = function (props) { + var selectionInterface = props.selectionInterface; + var config = useConfiguration().config; + useTimePrefs(); + var lazyResults = useLazyResultsFromSelectionInterface({ + selectionInterface: selectionInterface, + }); + var selectedResults = useSelectedResults({ + lazyResults: lazyResults, + }); + var results = lazyResults.results; + var _a = __read(React.useState([]), 2), data = _a[0], setData = _a[1]; + var _b = __read(React.useState({}), 2), dateAttributeAliases = _b[0], setDateAttributeAliases = _b[1]; + var _c = __read(React.useState(0), 2), height = _c[0], setHeight = _c[1]; + var _d = __read(React.useState(false), 2), pause = _d[0], setPause = _d[1]; + var rootRef = React.useRef(null); + var _e = __read(React.useState(false), 2), resized = _e[0], setResized = _e[1]; + var addSnack = useSnack(); + React.useEffect(function () { + props.listenTo(wreqr.vent, 'resize', function () { + if (rootRef.current) { + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + var rect = rootRef.current.getBoundingClientRect(); + setHeight(rect.height); + } + setResized(true); + }); + }, []); + React.useEffect(function () { + if (resized) { + setResized(false); + } + }, [resized]); + React.useEffect(function () { + var selectedIds = Object.values(selectedResults).map(function (result) { return result.plain.metacard.properties.id; }); + var possibleDateAttributes = getDateAttributes(results); + var resultData = Object.values(results).map(function (result) { + var metacard = result.plain.metacard.properties; + var resultDateAttributes = {}; + possibleDateAttributes.forEach(function (dateAttribute) { + var val = metacard[dateAttribute]; + if (val) { + resultDateAttributes[dateAttribute] = Array.isArray(val) + ? val.map(function (v) { return moment(v); }) + : [moment(val)]; + } + }); + var id = metacard.id; + var resultDataPoint = { + id: id, + selected: selectedIds.includes(id), + data: result, + attributes: resultDateAttributes, + }; + return resultDataPoint; + }); + setData(resultData); + if (Object.keys(possibleDateAttributes).length > 0) { + var aliasMap_1 = {}; + possibleDateAttributes.forEach(function (dateAttribute) { + aliasMap_1[dateAttribute] = + (config === null || config === void 0 ? void 0 : config.attributeAliases[dateAttribute]) || dateAttribute; + }); + if (!_.isEqual(aliasMap_1, dateAttributeAliases)) { + setDateAttributeAliases(aliasMap_1); + } + } + }, [results, selectedResults, config]); + var onSelect = function (selectedData) { + var selectedIds = selectedData.map(function (d) { return d.id; }); + setPause(true); + lazyResults.selectByIds(selectedIds); + setPause(false); + }; + if (pause) { + return null; + } + return (React.createElement(TimelineWrapper, { "data-id": "timeline-container", ref: rootRef }, + React.createElement(Timeline, { min: moment('1975-01-01').tz(user.getTimeZone()), max: moment(maxDate), heightOffset: 250, onSelect: onSelect, data: data, dateAttributeAliases: dateAttributeAliases, renderTooltip: renderTooltip, format: user.getDateTimeFormat(), timezone: user.getTimeZone(), height: height, onCopy: function (copiedValue) { + addSnack('Copied to clipboard: ' + copiedValue, { + alertProps: { + severity: 'success', + }, + }); + } }))); +}; +export default hot(module)(WithListenTo(TimelineVisualization)); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxpbmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vdGltZWxpbmUvdGltZWxpbmUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLFlBRU4sT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G4gICAgICAgIG1heD17bW9tZW50KG1heERhdGUpfVxuICAgICAgICBoZWlnaHRPZmZzZXQ9ezI1MH1cbiAgICAgICAgb25TZWxlY3Q9e29uU2VsZWN0fVxuICAgICAgICBkYXRhPXtkYXRhfVxuICAgICAgICBkYXRlQXR0cmlidXRlQWxpYXNlcz17ZGF0ZUF0dHJpYnV0ZUFsaWFzZXN9XG4gICAgICAgIHJlbmRlclRvb2x0aXA9e3JlbmRlclRvb2x0aXB9XG4gICAgICAgIGZvcm1hdD17dXNlci5nZXREYXRlVGltZUZvcm1hdCgpfVxuICAgICAgICB0aW1lem9uZT17dXNlci5nZXRUaW1lWm9uZSgpfVxuICAgICAgICBoZWlnaHQ9e2hlaWdodH1cbiAgICAgICAgb25Db3B5PXsoY29waWVkVmFsdWUpID0+IHtcbiAgICAgICAgICBhZGRTbmFjaygnQ29waWVkIHRvIGNsaXBib2FyZDogJyArIGNvcGllZFZhbHVlLCB7XG4gICAgICAgICAgICBhbGVydFByb3BzOiB7XG4gICAgICAgICAgICAgIHNldmVyaXR5OiAnc3VjY2VzcycsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pXG4gICAgICAgIH19XG4gICAgICAvPlxuICAgIDwvVGltZWxpbmVXcmFwcGVyPlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShXaXRoTGlzdGVuVG8oVGltZWxpbmVWaXN1YWxpemF0aW9uKSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/component/visualization/visualizations.d.ts b/src/main/webapp/component/visualization/visualizations.d.ts new file mode 100644 index 00000000000..d29d5ed7811 --- /dev/null +++ b/src/main/webapp/component/visualization/visualizations.d.ts @@ -0,0 +1,10 @@ +type VisualizationType = { + id: string; + title: string; + view: any; + icon: string; + options: any; + singular: boolean; +}; +export declare const Visualizations: VisualizationType[]; +export {}; diff --git a/src/main/webapp/component/visualization/visualizations.js b/src/main/webapp/component/visualization/visualizations.js new file mode 100644 index 00000000000..509a397743f --- /dev/null +++ b/src/main/webapp/component/visualization/visualizations.js @@ -0,0 +1,179 @@ +import { __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import LinearProgress from '@mui/material/LinearProgress'; +/** + * Swapping to not doing string interpolation and generation of dynamic imports, as this increases build time and ends up producing larger bundles in the end downstream. + */ +var DynamicCesiumImport = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _a = __read(React.useState(null), 2), Component = _a[0], setComponent = _a[1]; + React.useEffect(function () { + import("./maps/cesium/cesium.view").then(function (code) { + setComponent(function () { + return code.CesiumMapViewReact; + }); + }); + }, []); + if (Component) { + return React.createElement.apply(React, __spreadArray([Component], __read(args), false)); + } + return React.createElement(LinearProgress, { className: "w-full h-2", variant: "indeterminate" }); +}; +var DynamicOpenlayersImport = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _a = __read(React.useState(null), 2), Component = _a[0], setComponent = _a[1]; + React.useEffect(function () { + import('./maps/openlayers/openlayers.view').then(function (code) { + setComponent(function () { + return code.OpenlayersMapViewReact; + }); + }); + }, []); + if (Component) { + return React.createElement.apply(React, __spreadArray([Component], __read(args), false)); + } + return React.createElement(LinearProgress, { className: "w-full h-2", variant: "indeterminate" }); +}; +var DynamicHistogramImport = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _a = __read(React.useState(null), 2), Component = _a[0], setComponent = _a[1]; + React.useEffect(function () { + import('./histogram/histogram').then(function (code) { + setComponent(function () { + return code.Histogram; + }); + }); + }, []); + if (Component) { + return React.createElement.apply(React, __spreadArray([Component], __read(args), false)); + } + return React.createElement(LinearProgress, { className: "w-full h-2", variant: "indeterminate" }); +}; +var DynamicInspectorImport = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _a = __read(React.useState(null), 2), Component = _a[0], setComponent = _a[1]; + React.useEffect(function () { + import('./inspector/audited-inspector').then(function (code) { + setComponent(function () { + return code.AuditedInspector; + }); + }); + }, []); + if (Component) { + return React.createElement.apply(React, __spreadArray([Component], __read(args), false)); + } + return React.createElement(LinearProgress, { className: "w-full h-2", variant: "indeterminate" }); +}; +var DynamicResultsImport = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _a = __read(React.useState(null), 2), Component = _a[0], setComponent = _a[1]; + React.useEffect(function () { + import('./results-visual').then(function (code) { + setComponent(function () { + return code.default; + }); + }); + }, []); + if (Component) { + return React.createElement.apply(React, __spreadArray([Component], __read(args), false)); + } + return React.createElement(LinearProgress, { className: "w-full h-2", variant: "indeterminate" }); +}; +var DynamicTimelineImport = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _a = __read(React.useState(null), 2), Component = _a[0], setComponent = _a[1]; + React.useEffect(function () { + import('./timeline/timeline').then(function (code) { + setComponent(function () { + return code.default; + }); + }); + }, []); + if (Component) { + return React.createElement.apply(React, __spreadArray([Component], __read(args), false)); + } + return React.createElement(LinearProgress, { className: "w-full h-2", variant: "indeterminate" }); +}; +export var Visualizations = [ + { + id: 'openlayers', + title: '2D Map', + view: DynamicOpenlayersImport, + icon: 'fa fa-map', + options: { + desiredContainer: 'openlayers', + }, + singular: true, + }, + { + id: 'cesium', + title: '3D Map', + view: DynamicCesiumImport, + icon: 'fa fa-globe', + options: { + desiredContainer: 'cesium', + }, + singular: true, + }, + { + id: 'histogram', + title: 'Histogram', + icon: 'fa fa-bar-chart', + view: DynamicHistogramImport, + singular: true, + }, + { + id: 'results', + title: 'Results', + view: DynamicResultsImport, + icon: 'fa fa-table', + singular: true, + }, + { + id: 'inspector', + title: 'Inspector', + icon: 'fa fa-info', + view: DynamicInspectorImport, + singular: true, + }, + { + id: 'timeline', + title: 'Timeline', + icon: 'fa fa-hourglass-half', + view: DynamicTimelineImport, + singular: true, + }, +]; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzdWFsaXphdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvY29tcG9uZW50L3Zpc3VhbGl6YXRpb24vdmlzdWFsaXphdGlvbnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sY0FBYyxNQUFNLDhCQUE4QixDQUFBO0FBV3pEOztHQUVHO0FBQ0gsSUFBTSxtQkFBbUIsR0FBRztJQUFDLGNBQVk7U0FBWixVQUFZLEVBQVoscUJBQVksRUFBWixJQUFZO1FBQVoseUJBQVk7O0lBQ2pDLElBQUEsS0FBQSxPQUE0QixLQUFLLENBQUMsUUFBUSxDQUFNLElBQUksQ0FBQyxJQUFBLEVBQXBELFNBQVMsUUFBQSxFQUFFLFlBQVksUUFBNkIsQ0FBQTtJQUUzRCxLQUFLLENBQUMsU0FBUyxDQUFDO1FBQ2QsTUFBTSxDQUFDLDJCQUEyQixDQUFDLENBQUMsSUFBSSxDQUFDLFVBQUMsSUFBSTtZQUM1QyxZQUFZLENBQUM7Z0JBQ1gsT0FBTyxJQUFJLENBQUMsa0JBQWtCLENBQUE7WUFDaEMsQ0FBQyxDQUFDLENBQUE7UUFDSixDQUFDLENBQUMsQ0FBQTtJQUNKLENBQUMs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2hpc3RvZ3JhbScsXG4gICAgdGl0bGU6ICdIaXN0b2dyYW0nLFxuICAgIGljb246ICdmYSBmYS1iYXItY2hhcnQnLFxuICAgIHZpZXc6IER5bmFtaWNIaXN0b2dyYW1JbXBvcnQsXG4gICAgc2luZ3VsYXI6IHRydWUsXG4gIH0sXG4gIHtcbiAgICBpZDogJ3Jlc3VsdHMnLFxuICAgIHRpdGxlOiAnUmVzdWx0cycsXG4gICAgdmlldzogRHluYW1pY1Jlc3VsdHNJbXBvcnQsXG4gICAgaWNvbjogJ2ZhIGZhLXRhYmxlJyxcbiAgICBzaW5ndWxhcjogdHJ1ZSxcbiAgfSxcbiAge1xuICAgIGlkOiAnaW5zcGVjdG9yJyxcbiAgICB0aXRsZTogJ0luc3BlY3RvcicsXG4gICAgaWNvbjogJ2ZhIGZhLWluZm8nLFxuICAgIHZpZXc6IER5bmFtaWNJbnNwZWN0b3JJbXBvcnQsXG4gICAgc2luZ3VsYXI6IHRydWUsXG4gIH0sXG4gIHtcbiAgICBpZDogJ3RpbWVsaW5lJyxcbiAgICB0aXRsZTogJ1RpbWVsaW5lJyxcbiAgICBpY29uOiAnZmEgZmEtaG91cmdsYXNzLWhhbGYnLFxuICAgIHZpZXc6IER5bmFtaWNUaW1lbGluZUltcG9ydCxcbiAgICBzaW5ndWxhcjogdHJ1ZSxcbiAgfSxcbl0gYXMgVmlzdWFsaXphdGlvblR5cGVbXVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/exports/wreqr.d.ts b/src/main/webapp/exports/wreqr.d.ts new file mode 100644 index 00000000000..94f722fe29e --- /dev/null +++ b/src/main/webapp/exports/wreqr.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wreqr from '../js/wreqr'; +export default wreqr; diff --git a/src/main/webapp/exports/wreqr.js b/src/main/webapp/exports/wreqr.js new file mode 100644 index 00000000000..97f08c87025 --- /dev/null +++ b/src/main/webapp/exports/wreqr.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import wreqr from '../js/wreqr'; +export default wreqr; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JlcXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvZXhwb3J0cy93cmVxci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sYUFBYSxDQUFBO0FBQy9CLGVBQWUsS0FBSyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgd3JlcXIgZnJvbSAnLi4vanMvd3JlcXInXG5leHBvcnQgZGVmYXVsdCB3cmVxclxuIl19 \ No newline at end of file diff --git a/src/main/webapp/extension-points/extension-points.d.ts b/src/main/webapp/extension-points/extension-points.d.ts new file mode 100644 index 00000000000..ea4970e213f --- /dev/null +++ b/src/main/webapp/extension-points/extension-points.d.ts @@ -0,0 +1,102 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { FC } from '../react-component/hoc/utils'; +import { Props as ProviderProps } from './providers'; +import { LazyQueryResult } from '../js/model/LazyQueryResult/LazyQueryResult'; +import { MetacardAttribute, ResultType } from '../js/model/Types'; +import { ValueTypes } from '../component/filter-builder/filter.structure'; +import { Suggestion } from '../react-component/location/gazetteer'; +import { MetacardInteractionProps } from '../react-component/metacard-interactions'; +import { PermissiveComponentType } from '../typescript'; +import { InputsType } from '../react-component/location/location'; +import { CustomHover } from '../component/visualization/histogram/add-on-helpers'; +type EditorProps = { + result: LazyQueryResult; + attribute: string; + onCancel?: () => void; + onSave?: () => void; + goBack?: () => void; +}; +export type ExtensionPointsType = { + providers: FC>; + metacardInteractions: ((props: MetacardInteractionProps) => React.ReactNode | any)[]; + customFilterInput: (props: { + value: string; + onChange: (val: any) => void; + }) => React.ReactNode | undefined; + customCanWritePermission: (props: { + attribute: string; + lazyResult: LazyQueryResult; + user: any; + editableAttributes: string[]; + }) => boolean | undefined; + customEditableAttributes: () => Promise; + resultItemTitleAddOn: ({ lazyResult, }: { + lazyResult: LazyQueryResult; + }) => JSX.Element | null; + resultItemRowAddOn: ({ lazyResult, isTableView, }: { + lazyResult: LazyQueryResult; + isTableView?: boolean; + }) => JSX.Element | null; + resultTitleIconAddOn: ({ lazyResult, }: { + lazyResult: LazyQueryResult; + }) => JSX.Element | null; + layoutDropdown: (props: { + goldenLayout: any; + layoutResult?: ResultType; + editLayoutRef?: any; + }) => JSX.Element | null; + customSourcesPage: ((props: { + onChange?: () => void; + }) => JSX.Element | null) | null; + serializeLocation: (property: string, value: ValueTypes['location']) => null | any; + handleFilter: (map: any, filter: any) => null | any; + suggester: (input: string) => null | Promise; + handleMetacardUpdate: (({ lazyResult, attributesToUpdate, }: { + lazyResult: LazyQueryResult; + attributesToUpdate: MetacardAttribute[]; + }) => Promise) | null; + extraRoutes: PermissiveComponentType; + locationTypes: (baseTypes: InputsType) => InputsType; + userInformation: PermissiveComponentType; + extraHeader: PermissiveComponentType; + extraFooter: PermissiveComponentType; + customMapBadge: (props: { + results: LazyQueryResult[]; + isCluster: boolean; + }) => { + text: string; + color: string; + } | undefined; + resultItemAction: ({ lazyResult, selectionInterface, itemContentRef, className, }: { + lazyResult: LazyQueryResult; + selectionInterface: any; + itemContentRef: React.RefObject; + className?: string; + }) => null | PermissiveComponentType; + attributeEditor: (result: LazyQueryResult, attribute: string) => React.FC | null; + customHistogramHover: ((props: { + results: LazyQueryResult[]; + }) => CustomHover | undefined) | undefined; + timelineItemAddOn: (props: { + results: LazyQueryResult[]; + isSingleItem: boolean; + }) => JSX.Element | null; + extraSidebarButtons?: PermissiveComponentType; + includeNavigationButtons?: boolean; +}; +declare const ExtensionPoints: ExtensionPointsType; +export default ExtensionPoints; diff --git a/src/main/webapp/extension-points/extension-points.js b/src/main/webapp/extension-points/extension-points.js new file mode 100644 index 00000000000..49206cde395 --- /dev/null +++ b/src/main/webapp/extension-points/extension-points.js @@ -0,0 +1,38 @@ +import { __awaiter, __generator } from "tslib"; +import { providers } from './providers'; +import metacardInteractions from './metacard-interactions'; +var ExtensionPoints = { + providers: providers, + metacardInteractions: metacardInteractions, + customFilterInput: function () { return undefined; }, + customCanWritePermission: function () { return undefined; }, + customEditableAttributes: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/, undefined]; + }); }); }, + resultItemTitleAddOn: function () { return null; }, + resultTitleIconAddOn: function () { return null; }, + resultItemRowAddOn: function () { return null; }, + layoutDropdown: function () { return null; }, + customSourcesPage: null, + serializeLocation: function () { return null; }, + handleFilter: function () { return null; }, + suggester: function () { return null; }, + handleMetacardUpdate: null, + extraRoutes: function () { return null; }, + locationTypes: function (baseTypes) { return baseTypes; }, + userInformation: function () { return null; }, + extraFooter: function () { return null; }, + extraHeader: function () { return null; }, + customMapBadge: function () { return undefined; }, + resultItemAction: function (_a) { + var _selectionInterface = _a.selectionInterface, _lazyResult = _a.lazyResult, _containerRef = _a.itemContentRef; + return null; + }, + attributeEditor: function () { return null; }, + customHistogramHover: undefined, + timelineItemAddOn: function () { return null; }, + extraSidebarButtons: function () { return null; }, + includeNavigationButtons: false, +}; +export default ExtensionPoints; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5zaW9uLXBvaW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9leHRlbnNpb24tcG9pbnRzL2V4dGVuc2lvbi1wb2ludHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFnQkEsT0FBTyxFQUFFLFNBQVMsRUFBMEIsTUFBTSxhQUFhLENBQUE7QUFDL0QsT0FBTyxvQkFBb0IsTUFBTSx5QkFBeUIsQ0FBQTtBQTZHMUQsSUFBTSxlQUFlLEdBQXdCO0lBQzNDLFNBQVMsV0FBQTtJQUNULG9CQUFvQixzQkFBQTtJQUNwQixpQkFBaUIsRUFBRSxjQUFNLE9BQUEsU0FBUyxFQUFULENBQVM7SUFDbEMsd0JBQXdCLEVBQUUsY0FBTSxPQUFBLFNBQVMsRUFBVCxDQUFTO0lBQ3pDLHdCQUF3QixFQUFFO1FBQVksc0JBQUEsU0FBUyxFQUFBO2FBQUE7SUFDL0Msb0JBQW9CLEVBQUUsY0FBTSxPQUFBLElBQUksRUFBSixDQUFJO0lBQ2hDLG9CQUFvQixFQUFFLGNBQU0sT0FBQSxJQUFJLEVBQUosQ0FBSTtJQUNoQyxrQkFBa0IsRUFBRSxjQUFNLE9BQUEsSUFBSSxFQUFKLENBQUk7SUFDOUIsY0FBYyxFQUFFLGNBQU0sT0FBQSxJQUFJLEVBQUosQ0FBSTtJQUMxQixpQkFBaUIsRUFBRSxJQUFJO0lBQ3ZCLGlCQUFpQixFQUFFLGNBQU0sT0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IHVzZXJJbmZvcm1hdGlvbjogKCkgPT4gbnVsbCxcbiAgZXh0cmFGb290ZXI6ICgpID0+IG51bGwsXG4gIGV4dHJhSGVhZGVyOiAoKSA9PiBudWxsLFxuICBjdXN0b21NYXBCYWRnZTogKCkgPT4gdW5kZWZpbmVkLFxuICByZXN1bHRJdGVtQWN0aW9uOiAoe1xuICAgIHNlbGVjdGlvbkludGVyZmFjZTogX3NlbGVjdGlvbkludGVyZmFjZSxcbiAgICBsYXp5UmVzdWx0OiBfbGF6eVJlc3VsdCxcbiAgICBpdGVtQ29udGVudFJlZjogX2NvbnRhaW5lclJlZixcbiAgfSkgPT4gbnVsbCxcbiAgYXR0cmlidXRlRWRpdG9yOiAoKSA9PiBudWxsLFxuICBjdXN0b21IaXN0b2dyYW1Ib3ZlcjogdW5kZWZpbmVkLFxuICB0aW1lbGluZUl0ZW1BZGRPbjogKCkgPT4gbnVsbCxcbiAgZXh0cmFTaWRlYmFyQnV0dG9uczogKCkgPT4gbnVsbCxcbiAgaW5jbHVkZU5hdmlnYXRpb25CdXR0b25zOiBmYWxzZSxcbn1cblxuZXhwb3J0IGRlZmF1bHQgRXh0ZW5zaW9uUG9pbnRzXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/extension-points/index.d.ts b/src/main/webapp/extension-points/index.d.ts new file mode 100644 index 00000000000..d4292a6ad19 --- /dev/null +++ b/src/main/webapp/extension-points/index.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default, ExtensionPointsType } from './extension-points'; +export { default as metacardInteractions } from './metacard-interactions'; diff --git a/src/main/webapp/extension-points/index.js b/src/main/webapp/extension-points/index.js new file mode 100644 index 00000000000..674a1bdf6cb --- /dev/null +++ b/src/main/webapp/extension-points/index.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './extension-points'; +export { default as metacardInteractions } from './metacard-interactions'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvZXh0ZW5zaW9uLXBvaW50cy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQXVCLE1BQU0sb0JBQW9CLENBQUE7QUFDakUsT0FBTyxFQUFFLE9BQU8sSUFBSSxvQkFBb0IsRUFBRSxNQUFNLHlCQUF5QixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0LCBFeHRlbnNpb25Qb2ludHNUeXBlIH0gZnJvbSAnLi9leHRlbnNpb24tcG9pbnRzJ1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBtZXRhY2FyZEludGVyYWN0aW9ucyB9IGZyb20gJy4vbWV0YWNhcmQtaW50ZXJhY3Rpb25zJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/extension-points/metacard-interactions/index.d.ts b/src/main/webapp/extension-points/metacard-interactions/index.d.ts new file mode 100644 index 00000000000..a9795029f83 --- /dev/null +++ b/src/main/webapp/extension-points/metacard-interactions/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './metacard-interactions'; diff --git a/src/main/webapp/extension-points/metacard-interactions/index.js b/src/main/webapp/extension-points/metacard-interactions/index.js new file mode 100644 index 00000000000..2e96fe2f5e3 --- /dev/null +++ b/src/main/webapp/extension-points/metacard-interactions/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './metacard-interactions'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvZXh0ZW5zaW9uLXBvaW50cy9tZXRhY2FyZC1pbnRlcmFjdGlvbnMvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0seUJBQXlCLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL21ldGFjYXJkLWludGVyYWN0aW9ucydcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.d.ts b/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.d.ts new file mode 100644 index 00000000000..73ba23b9437 --- /dev/null +++ b/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.d.ts @@ -0,0 +1,3 @@ +/// +declare const DefaultItems: ((props: import("../../react-component/metacard-interactions").MetacardInteractionProps) => JSX.Element | null)[]; +export default DefaultItems; diff --git a/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.js b/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.js new file mode 100644 index 00000000000..e9f68240bf9 --- /dev/null +++ b/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.js @@ -0,0 +1,28 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import ExpandMetacard from '../../react-component/metacard-interactions/expand-interaction'; +import DownloadProduct from '../../react-component/metacard-interactions/download-interaction'; +import ExportActions from '../../react-component/metacard-interactions/export-interaction'; +import OverwriteAction from '../../react-component/metacard-interactions/overwrite-interaction'; +import ArchiveAction from '../../react-component/metacard-interactions/archive-interaction'; +var DefaultItems = [ + ExpandMetacard, + DownloadProduct, + ExportActions, + OverwriteAction, + ArchiveAction, +]; +export default DefaultItems; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQtaW50ZXJhY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2V4dGVuc2lvbi1wb2ludHMvbWV0YWNhcmQtaW50ZXJhY3Rpb25zL21ldGFjYXJkLWludGVyYWN0aW9ucy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sY0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VmYXVsdCBEZWZhdWx0SXRlbXNcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/extension-points/providers/global-styles.d.ts b/src/main/webapp/extension-points/providers/global-styles.d.ts new file mode 100644 index 00000000000..094d930bbee --- /dev/null +++ b/src/main/webapp/extension-points/providers/global-styles.d.ts @@ -0,0 +1 @@ +export declare const GlobalStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>; diff --git a/src/main/webapp/extension-points/providers/global-styles.js b/src/main/webapp/extension-points/providers/global-styles.js new file mode 100644 index 00000000000..ed937d2a29b --- /dev/null +++ b/src/main/webapp/extension-points/providers/global-styles.js @@ -0,0 +1,5 @@ +import { __makeTemplateObject } from "tslib"; +import { createGlobalStyle } from 'styled-components'; +export var GlobalStyles = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* Only needed because we import 'bootstrap.less' in . */\n legend {\n /* Unset all properties */\n all: unset;\n\n /* Place back material-ui styling */\n padding: 0 !important;\n text-align: left !important;\n transition: width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n line-height: 11px !important;\n }\n\n /* So we match Material */\n .navigation-item + .navigation-item {\n margin-left: 10px;\n }\n .navigation-item:not(:last-of-type) {\n border-radius: 25px; \n }\n\n .inspector-content {\n transform: none;\n }\n .MuiPickersModal-dialogRootWider {\n min-width: 500px !important;\n }\n .MuiPickersBasePicker-pickerView {\n max-width: none !important;\n }\n .MuiDialog-paperWidthSm {\n max-width: none !important;\n }\n\n .no-resource {\n *[data-id='Overwrite'] {\n display: none !important;\n }\n }\n .federated {\n *[data-id='Notes'] {\n display: none !important;\n }\n }\n"], ["\n /* Only needed because we import 'bootstrap.less' in . */\n legend {\n /* Unset all properties */\n all: unset;\n\n /* Place back material-ui styling */\n padding: 0 !important;\n text-align: left !important;\n transition: width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n line-height: 11px !important;\n }\n\n /* So we match Material */\n .navigation-item + .navigation-item {\n margin-left: 10px;\n }\n .navigation-item:not(:last-of-type) {\n border-radius: 25px; \n }\n\n .inspector-content {\n transform: none;\n }\n .MuiPickersModal-dialogRootWider {\n min-width: 500px !important;\n }\n .MuiPickersBasePicker-pickerView {\n max-width: none !important;\n }\n .MuiDialog-paperWidthSm {\n max-width: none !important;\n }\n\n .no-resource {\n *[data-id='Overwrite'] {\n display: none !important;\n }\n }\n .federated {\n *[data-id='Notes'] {\n display: none !important;\n }\n }\n"]))); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsLXN0eWxlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9leHRlbnNpb24tcG9pbnRzL3Byb3ZpZGVycy9nbG9iYWwtc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFFckQsTUFBTSxDQUFDLElBQU0sWUFBWSxHQUFHLGlCQUFpQixzZ0NBQUEsbThCQTRDNUMsSUFBQSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3JlYXRlR2xvYmFsU3R5bGUgfSBmcm9tICdzdHlsZWQtY29tcG9uZW50cydcblxuZXhwb3J0IGNvbnN0IEdsb2JhbFN0eWxlcyA9IGNyZWF0ZUdsb2JhbFN0eWxlYFxuICAvKiBPbmx5IG5lZWRlZCBiZWNhdXNlIHdlIGltcG9ydCAnYm9vdHN0cmFwLmxlc3MnIGluIC4gKi9cbiAgbGVnZW5kIHtcbiAgICAvKiBVbnNldCBhbGwgcHJvcGVydGllcyAqL1xuICAgIGFsbDogdW5zZXQ7XG5cbiAgICAvKiBQbGFjZSBiYWNrIG1hdGVyaWFsLXVpIHN0eWxpbmcgKi9cbiAgICBwYWRkaW5nOiAwICFpbXBvcnRhbnQ7XG4gICAgdGV4dC1hbGlnbjogbGVmdCAhaW1wb3J0YW50O1xuICAgIHRyYW5zaXRpb246IHdpZHRoIDIwMG1zIGN1YmljLWJlemllcigwLCAwLCAwLjIsIDEpIDBtcztcbiAgICBsaW5lLWhlaWdodDogMTFweCAhaW1wb3J0YW50O1xuICB9XG5cbiAgLyogU28gd2UgbWF0Y2ggTWF0ZXJpYWwgKi9cbiAgLm5hdmlnYXRpb24taXRlbSArIC5uYXZpZ2F0aW9uLWl0ZW0ge1xuICAgIG1hcmdpbi1sZWZ0OiAxMHB4O1xuICB9XG4gIC5uYXZpZ2F0aW9uLWl0ZW06bm90KDpsYXN0LW9mLXR5cGUpIHtcbiAgICBib3JkZXItcmFkaXVzOiAyNXB4OyBcbiAgfVxuXG4gIC5pbnNwZWN0b3ItY29udGVudCB7XG4gICAgdHJhbnNmb3JtOiBub25lO1xuICB9XG4gIC5NdWlQaWNrZXJzTW9kYWwtZGlhbG9nUm9vdFdpZGVyIHtcbiAgICBtaW4td2lkdGg6IDUwMHB4ICFpbXBvcnRhbnQ7XG4gIH1cbiAgLk11aVBpY2tlcnNCYXNlUGlja2VyLXBpY2tlclZpZXcge1xuICAgIG1heC13aWR0aDogbm9uZSAhaW1wb3J0YW50O1xuICB9XG4gIC5NdWlEaWFsb2ctcGFwZXJXaWR0aFNtIHtcbiAgICBtYXgtd2lkdGg6IG5vbmUgIWltcG9ydGFudDtcbiAgfVxuXG4gIC5uby1yZXNvdXJjZSB7XG4gICAgKltkYXRhLWlkPSdPdmVyd3JpdGUnXSB7XG4gICAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gICAgfVxuICB9XG4gIC5mZWRlcmF0ZWQge1xuICAgICpbZGF0YS1pZD0nTm90ZXMnXSB7XG4gICAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gICAgfVxuICB9XG5gXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/extension-points/providers/index.d.ts b/src/main/webapp/extension-points/providers/index.d.ts new file mode 100644 index 00000000000..d9e4fd176e1 --- /dev/null +++ b/src/main/webapp/extension-points/providers/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default as providers, Props } from './providers.container'; diff --git a/src/main/webapp/extension-points/providers/index.js b/src/main/webapp/extension-points/providers/index.js new file mode 100644 index 00000000000..f936c94fa2d --- /dev/null +++ b/src/main/webapp/extension-points/providers/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default as providers } from './providers.container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvZXh0ZW5zaW9uLXBvaW50cy9wcm92aWRlcnMvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsT0FBTyxJQUFJLFNBQVMsRUFBUyxNQUFNLHVCQUF1QixDQUFB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at end of file diff --git a/src/main/webapp/extension-points/providers/providers.container.d.ts b/src/main/webapp/extension-points/providers/providers.container.d.ts new file mode 100644 index 00000000000..4a2f66263a7 --- /dev/null +++ b/src/main/webapp/extension-points/providers/providers.container.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +export type Props = { + children: React.ReactNode; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/extension-points/providers/providers.container.js b/src/main/webapp/extension-points/providers/providers.container.js new file mode 100644 index 00000000000..290f334778b --- /dev/null +++ b/src/main/webapp/extension-points/providers/providers.container.js @@ -0,0 +1,36 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import ThemeContainer from '../../react-component/theme'; +import { IntlProvider } from 'react-intl'; +import { Provider as ThemeProvider } from '../../component/theme/theme'; +import { SnackProvider } from '../../component/snack/snack.provider'; +import { DialogProvider } from '../../component/dialog'; +import { HashRouter as Router } from 'react-router-dom'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +var ProviderContainer = function (props) { + var getI18n = useConfiguration().getI18n; + return (React.createElement(React.Fragment, null, + React.createElement(ThemeContainer, null, + React.createElement(IntlProvider, { locale: navigator.language, messages: getI18n() }, + React.createElement(ThemeProvider, null, + React.createElement(Router, null, + React.createElement(SnackProvider, null, + React.createElement(DialogProvider, null, + React.createElement(React.Fragment, null, props.children))))))))); +}; +export default hot(module)(ProviderContainer); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmlkZXJzLmNvbnRhaW5lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9leHRlbnNpb24tcG9pbnRzL3Byb3ZpZGVycy9wcm92aWRlcnMuY29udGFpbmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBRXRDLE9BQU8sY0FBYyxNQUFNLDZCQUE2QixDQUFBO0FBQ3hELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxZQUFZLENBQUE7QUFDekMsT0FBTyxFQUFFLFFBQVEsSUFBSSxhQUFhLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQTtBQUN2RSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sc0NBQXNDLENBQUE7QUFDcEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3ZELE9BQU8sRUFBRSxVQUFVLElBQUksTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdkQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sNENBQTRDLENBQUE7QUFNN0UsSUFBTSxpQkFBaUIsR0FBRyxVQUFDLEtBQVk7SUFDN0IsSUFBQSxPQUFPLE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29uZmlndXJhdGlvbi5ob29rcydcblxuZXhwb3J0IHR5cGUgUHJvcHMgPSB7XG4gIGNoaWxkcmVuOiBSZWFjdC5SZWFjdE5vZGVcbn1cblxuY29uc3QgUHJvdmlkZXJDb250YWluZXIgPSAocHJvcHM6IFByb3BzKSA9PiB7XG4gIGNvbnN0IHsgZ2V0STE4biB9ID0gdXNlQ29uZmlndXJhdGlvbigpXG4gIHJldHVybiAoXG4gICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAgPFRoZW1lQ29udGFpbmVyPlxuICAgICAgICA8SW50bFByb3ZpZGVyIGxvY2FsZT17bmF2aWdhdG9yLmxhbmd1YWdlfSBtZXNzYWdlcz17Z2V0STE4bigpfT5cbiAgICAgICAgICA8VGhlbWVQcm92aWRlcj5cbiAgICAgICAgICAgIDxSb3V0ZXI+XG4gICAgICAgICAgICAgIDxTbmFja1Byb3ZpZGVyPlxuICAgICAgICAgICAgICAgIDxEaWFsb2dQcm92aWRlcj5cbiAgICAgICAgICAgICAgICAgIDw+e3Byb3BzLmNoaWxkcmVufTwvPlxuICAgICAgICAgICAgICAgIDwvRGlhbG9nUHJvdmlkZXI+XG4gICAgICAgICAgICAgIDwvU25hY2tQcm92aWRlcj5cbiAgICAgICAgICAgIDwvUm91dGVyPlxuICAgICAgICAgIDwvVGhlbWVQcm92aWRlcj5cbiAgICAgICAgPC9JbnRsUHJvdmlkZXI+XG4gICAgICA8L1RoZW1lQ29udGFpbmVyPlxuICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUHJvdmlkZXJDb250YWluZXIpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/handle-query-params.d.ts b/src/main/webapp/handle-query-params.d.ts new file mode 100644 index 00000000000..b566342c609 --- /dev/null +++ b/src/main/webapp/handle-query-params.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export declare function removeRedirectQueryParams(): void; diff --git a/src/main/webapp/handle-query-params.js b/src/main/webapp/handle-query-params.js new file mode 100644 index 00000000000..ddd71bffb12 --- /dev/null +++ b/src/main/webapp/handle-query-params.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// some systems like keycloak attach query params which interfere with react router / golden layout and their use of query params (when using hash routing) +export function removeRedirectQueryParams() { + if (location.href.includes("".concat(location.pathname, "?"))) { + var preHashStuff = location.href.split('?')[0]; + location.href = preHashStuff + location.hash; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFuZGxlLXF1ZXJ5LXBhcmFtcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9oYW5kbGUtcXVlcnktcGFyYW1zLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBRUosMkpBQTJKO0FBQzNKLE1BQU0sVUFBVSx5QkFBeUI7SUFDdkMsSUFBSSxRQUFRLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FB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Y2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5cbi8vIHNvbWUgc3lzdGVtcyBsaWtlIGtleWNsb2FrIGF0dGFjaCBxdWVyeSBwYXJhbXMgd2hpY2ggaW50ZXJmZXJlIHdpdGggcmVhY3Qgcm91dGVyIC8gZ29sZGVuIGxheW91dCBhbmQgdGhlaXIgdXNlIG9mIHF1ZXJ5IHBhcmFtcyAod2hlbiB1c2luZyBoYXNoIHJvdXRpbmcpXG5leHBvcnQgZnVuY3Rpb24gcmVtb3ZlUmVkaXJlY3RRdWVyeVBhcmFtcygpIHtcbiAgaWYgKGxvY2F0aW9uLmhyZWYuaW5jbHVkZXMoYCR7bG9jYXRpb24ucGF0aG5hbWV9P2ApKSB7XG4gICAgY29uc3QgcHJlSGFzaFN0dWZmID0gbG9jYXRpb24uaHJlZi5zcGxpdCgnPycpWzBdXG4gICAgbG9jYXRpb24uaHJlZiA9IHByZUhhc2hTdHVmZiArIGxvY2F0aW9uLmhhc2hcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/img/chrome.png b/src/main/webapp/img/chrome.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/img/chrome.png rename to src/main/webapp/img/chrome.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/img/dragIcon.png b/src/main/webapp/img/dragIcon.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/img/dragIcon.png rename to src/main/webapp/img/dragIcon.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/img/edge.png b/src/main/webapp/img/edge.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/img/edge.png rename to src/main/webapp/img/edge.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/img/firefox.png b/src/main/webapp/img/firefox.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/img/firefox.png rename to src/main/webapp/img/firefox.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/img/no-ie.png b/src/main/webapp/img/no-ie.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/img/no-ie.png rename to src/main/webapp/img/no-ie.png diff --git a/src/main/webapp/index.d.ts b/src/main/webapp/index.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/index.html b/src/main/webapp/index.html similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/index.html rename to src/main/webapp/index.html diff --git a/src/main/webapp/index.js b/src/main/webapp/index.js new file mode 100644 index 00000000000..7fc1b414e5e --- /dev/null +++ b/src/main/webapp/index.js @@ -0,0 +1,40 @@ +import { __awaiter, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// check browser before loading the rest of the app +import { isSupportedBrowser } from './check-browser'; +import { removeRedirectQueryParams } from './handle-query-params'; +(function () { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!isSupportedBrowser()) return [3 /*break*/, 4]; + removeRedirectQueryParams(); + return [4 /*yield*/, import('./js/WaitForReady')]; + case 1: + // wait for critical data to be fetched + return [4 /*yield*/, (_a.sent()).waitForReady()]; + case 2: + // wait for critical data to be fetched + _a.sent(); + return [4 /*yield*/, import('./app')]; + case 3: + _a.sent(); + _a.label = 4; + case 4: return [2 /*return*/]; + } + }); +}); })(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osbURBQW1EO0FBQ25ELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGlCQUFpQixDQUFBO0FBR3BELE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLHVCQUF1QixDQUNoRTtBQUFBLENBQUM7Ozs7cUJBRUksa0JBQWtCLEVBQUUsRUFBcEIsd0JBQW9CO2dCQUN0Qix5QkFBeUIsRUFBRSxDQUFBO2dCQUVwQixxQkFBTSxNQUFNLENBQUMsbUJBQW1CLENBQUMsRUFBQTs7WUFEeEMsdUNBQXVDO1lBQ3ZDLHFCQUFNLENBQUMsU0FBaUMsQ0FBQyxDQUFDLFlBQVksRUFBRSxFQUFBOztnQkFEeEQsdUNBQXVDO2dCQUN2QyxTQUF3RCxDQUFBO2dCQUN4RCxxQkFBTSxNQUFNLENBQUMsT0FBTyxDQUFDLEVBQUE7O2dCQUFyQixTQUFxQixDQUFBOzs7OztLQUV4QixDQUFDLEVBQUUsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlb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WVyeS1wYXJhbXMnXG47KGFzeW5jICgpID0+IHtcbiAgLy8gY2hlY2sgaWYgc3VwcG9ydGVkIGJyb3dzZXJcbiAgaWYgKGlzU3VwcG9ydGVkQnJvd3NlcigpKSB7XG4gICAgcmVtb3ZlUmVkaXJlY3RRdWVyeVBhcmFtcygpXG4gICAgLy8gd2FpdCBmb3IgY3JpdGljYWwgZGF0YSB0byBiZSBmZXRjaGVkXG4gICAgYXdhaXQgKGF3YWl0IGltcG9ydCgnLi9qcy9XYWl0Rm9yUmVhZHknKSkud2FpdEZvclJlYWR5KClcbiAgICBhd2FpdCBpbXBvcnQoJy4vYXBwJylcbiAgfVxufSkoKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/AjaxSettings.d.ts b/src/main/webapp/js/AjaxSettings.d.ts new file mode 100644 index 00000000000..74ca3eb0817 --- /dev/null +++ b/src/main/webapp/js/AjaxSettings.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export declare const CommonAjaxSettings: { + cache: boolean; + headers: { + 'X-Requested-With': string; + }; +}; diff --git a/src/main/webapp/js/AjaxSettings.js b/src/main/webapp/js/AjaxSettings.js new file mode 100644 index 00000000000..69034bba4e7 --- /dev/null +++ b/src/main/webapp/js/AjaxSettings.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export var CommonAjaxSettings = { + cache: false, + headers: { + 'X-Requested-With': 'XMLHttpRequest', + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWpheFNldHRpbmdzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL0FqYXhTZXR0aW5ncy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE1BQU0sQ0FBQyxJQUFNLGtCQUFrQixHQUFHO0lBQ2hDLEtBQUssRUFBRSxLQUFLO0lBQ1osT0FBTyxFQUFFO1FBQ1Asa0JBQWtCLEVBQUUsZ0JBQWdCO0tBQ3JDO0NBQ0YsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IGNvbnN0IENvbW1vbkFqYXhTZXR0aW5ncyA9IHtcbiAgY2FjaGU6IGZhbHNlLFxuICBoZWFkZXJzOiB7XG4gICAgJ1gtUmVxdWVzdGVkLVdpdGgnOiAnWE1MSHR0cFJlcXVlc3QnLFxuICB9LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/ApplicationHelpers.d.ts b/src/main/webapp/js/ApplicationHelpers.d.ts new file mode 100644 index 00000000000..550be61efed --- /dev/null +++ b/src/main/webapp/js/ApplicationHelpers.d.ts @@ -0,0 +1 @@ +import 'backbone-associations'; diff --git a/src/main/webapp/js/ApplicationHelpers.js b/src/main/webapp/js/ApplicationHelpers.js new file mode 100644 index 00000000000..3cbc53e2336 --- /dev/null +++ b/src/main/webapp/js/ApplicationHelpers.js @@ -0,0 +1,30 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* global define */ +import Backbone from 'backbone'; +import 'backbone-associations'; +// Backbone associations uses "." as its standard sub-object selecting within their framework. +// However since some of our json attribute names have "." characters in the name, this causes +// associations to do undesired sub-object querying when we do simple set operations on models +// model.set("my.attribute.name","foo"). If we ever want utilize this pathing, we need to use +// ">" instead so we don't conflicts with the pathing functionality. +// +// if someone wants to use the Backbone.Association sub-object selecting, they can do +// model.get('object>subObject>deeperSubObject'); +// +// This sub object selecting can be see at +// http://dhruvaray.github.io/backbone-associations/specify-associations.html#sa-getsetop +Backbone.Associations.setSeparator('>'); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwbGljYXRpb25IZWxwZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL0FwcGxpY2F0aW9uSGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osbUJBQW1CO0FBQ25CLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUMvQixPQUFPLHVCQUF1QixDQUFBO0FBQzlCLDhGQUE4RjtBQUM5Riw4RkFBOEY7QUFDOUYsOEZBQThGO0FBQzlGLDZGQUE2RjtBQUM3RixvRUFBb0U7QUFDcEUsRUFBRTtBQUNGLHFGQUFxRjtBQUNyRixpREFBaUQ7QUFDakQsRUFBRTtBQUNGLDBDQUEwQztBQUMxQyx5RkFBeUY7QUFDekYsUUFBUSxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGl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Yi1vYmplY3Qgc2VsZWN0aW5nIHdpdGhpbiB0aGVpciBmcmFtZXdvcmsuXG4vLyBIb3dldmVyIHNpbmNlIHNvbWUgb2Ygb3VyIGpzb24gYXR0cmlidXRlIG5hbWVzIGhhdmUgXCIuXCIgY2hhcmFjdGVycyBpbiB0aGUgbmFtZSwgdGhpcyBjYXVzZXNcbi8vIGFzc29jaWF0aW9ucyB0byBkbyB1bmRlc2lyZWQgc3ViLW9iamVjdCBxdWVyeWluZyB3aGVuIHdlIGRvIHNpbXBsZSBzZXQgb3BlcmF0aW9ucyBvbiBtb2RlbHNcbi8vIG1vZGVsLnNldChcIm15LmF0dHJpYnV0ZS5uYW1lXCIsXCJmb29cIikuIElmIHdlIGV2ZXIgd2FudCB1dGlsaXplIHRoaXMgcGF0aGluZywgd2UgbmVlZCB0byB1c2Vcbi8vIFwiPlwiIGluc3RlYWQgc28gd2UgZG9uJ3QgY29uZmxpY3RzIHdpdGggdGhlIHBhdGhpbmcgZnVuY3Rpb25hbGl0eS5cbi8vXG4vLyBpZiBzb21lb25lIHdhbnRzIHRvIHVzZSB0aGUgQmFja2JvbmUuQXNzb2NpYXRpb24gc3ViLW9iamVjdCBzZWxlY3RpbmcsIHRoZXkgY2FuIGRvXG4vLyBtb2RlbC5nZXQoJ29iamVjdD5zdWJPYmplY3Q+ZGVlcGVyU3ViT2JqZWN0Jyk7XG4vL1xuLy8gVGhpcyBzdWIgb2JqZWN0IHNlbGVjdGluZyBjYW4gYmUgc2VlIGF0XG4vLyBodHRwOi8vZGhydXZhcmF5LmdpdGh1Yi5pby9iYWNrYm9uZS1hc3NvY2lhdGlvbnMvc3BlY2lmeS1hc3NvY2lhdGlvbnMuaHRtbCNzYS1nZXRzZXRvcFxuQmFja2JvbmUuQXNzb2NpYXRpb25zLnNldFNlcGFyYXRvcignPicpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/ApplicationSetup.d.ts b/src/main/webapp/js/ApplicationSetup.d.ts new file mode 100644 index 00000000000..b68ca394875 --- /dev/null +++ b/src/main/webapp/js/ApplicationSetup.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import 'focus-visible'; +import 'cesium/Build/Cesium/Widgets/widgets.css'; +import '@blueprintjs/core/lib/css/blueprint.css'; +import '@blueprintjs/datetime/lib/css/blueprint-datetime.css'; +import 'font-awesome/css/font-awesome.css'; +import '../lib/cesium-drawhelper/DrawHelper.css'; +import 'golden-layout/src/css/goldenlayout-base.css'; +import 'golden-layout/src/css/goldenlayout-dark-theme.css'; +import '../styles/fonts.css'; +import '../styles/input-range.css'; +import '../styles/additional-styles.css'; +import '../styles/plotly.css'; +import './extensions/application.patches'; +import '../component/singletons/session-auto-renew'; diff --git a/src/main/webapp/js/ApplicationSetup.js b/src/main/webapp/js/ApplicationSetup.js new file mode 100644 index 00000000000..eabff60dc10 --- /dev/null +++ b/src/main/webapp/js/ApplicationSetup.js @@ -0,0 +1,69 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import 'focus-visible'; +import 'cesium/Build/Cesium/Widgets/widgets.css'; +import '@blueprintjs/core/lib/css/blueprint.css'; +import '@blueprintjs/datetime/lib/css/blueprint-datetime.css'; +import 'font-awesome/css/font-awesome.css'; +import '../lib/cesium-drawhelper/DrawHelper.css'; +import 'golden-layout/src/css/goldenlayout-base.css'; +import 'golden-layout/src/css/goldenlayout-dark-theme.css'; +import '../styles/fonts.css'; +import '../styles/input-range.css'; +import '../styles/additional-styles.css'; +import '../styles/plotly.css'; +import Backbone from 'backbone'; +import './extensions/application.patches'; +import '../component/singletons/session-auto-renew'; +import $ from 'jquery'; +import { StartupDataStore } from './model/Startup/startup'; +if (process.env.NODE_ENV !== 'production') { + $('html').addClass('is-development'); + if (module === null || module === void 0 ? void 0 : module.hot) { + import('react-hot-loader'); + $('html').addClass('is-hot-reloading'); + } +} +// @ts-ignore disable all react-beautiful-dnd development warnings (we have some spurious ones, but if you're working a component with this you can re-enable) +window['__react-beautiful-dnd-disable-dev-warnings'] = true; +window.CESIUM_BASE_URL = './cesium/assets'; +//in here we drop in any top level patches, etc. +var associationsSet = Backbone.AssociatedModel.prototype.set; +// @ts-expect-error ts-migrate(2322) FIXME: Type '(key: any, value: any, options: any) => any'... Remove this comment to see the full error message +Backbone.AssociatedModel.prototype.set = function (key, value, options) { + if (typeof key === 'object') { + options = value; + } + if (options && options.withoutSet === true) { + return this; + } + return associationsSet.apply(this, arguments); +}; +$(window.document).ready(function () { + var _a, _b, _c, _d; + window.document.title = + ((_a = StartupDataStore.Configuration.config) === null || _a === void 0 ? void 0 : _a.customBranding) + + ' ' + + ((_b = StartupDataStore.Configuration.config) === null || _b === void 0 ? void 0 : _b.product); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + window.document.querySelector('.welcome-branding').textContent = + (_c = StartupDataStore.Configuration.config) === null || _c === void 0 ? void 0 : _c.customBranding; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + window.document.querySelector('.welcome-branding-name').textContent = + (_d = StartupDataStore.Configuration.config) === null || _d === void 0 ? void 0 : _d.product; + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + window.document.querySelector('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VjdG9yKCcud2VsY29tZS1icmFuZGluZycpLnRleHRDb250ZW50ID1cbiAgICBTdGFydHVwRGF0YVN0b3JlLkNvbmZpZ3VyYXRpb24uY29uZmlnPy5jdXN0b21CcmFuZGluZ1xuICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoMjUzMSkgRklYTUU6IE9iamVjdCBpcyBwb3NzaWJseSAnbnVsbCcuXG4gIHdpbmRvdy5kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcud2VsY29tZS1icmFuZGluZy1uYW1lJykudGV4dENvbnRlbnQgPVxuICAgIFN0YXJ0dXBEYXRhU3RvcmUuQ29uZmlndXJhdGlvbi5jb25maWc/LnByb2R1Y3RcbiAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDI1MzEpIEZJWE1FOiBPYmplY3QgaXMgcG9zc2libHkgJ251bGwnLlxuICB3aW5kb3cuZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2xvYWRpbmcnKS5jbGFzc0xpc3QuYWRkKCdzaG93LXdlbGNvbWUnKVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/ApplicationStart.d.ts b/src/main/webapp/js/ApplicationStart.d.ts new file mode 100644 index 00000000000..dea44efe3c0 --- /dev/null +++ b/src/main/webapp/js/ApplicationStart.d.ts @@ -0,0 +1 @@ +export declare const attemptToStart: () => Promise; diff --git a/src/main/webapp/js/ApplicationStart.js b/src/main/webapp/js/ApplicationStart.js new file mode 100644 index 00000000000..76cff59db0e --- /dev/null +++ b/src/main/webapp/js/ApplicationStart.js @@ -0,0 +1,27 @@ +import { __awaiter, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { createRoot } from 'react-dom/client'; +export var attemptToStart = function () { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + import('../component/app/base-app').then(function (BaseApp) { + var root = createRoot(document.querySelector('#router')); + root.render(React.createElement(BaseApp.default, null)); + }); + return [2 /*return*/]; + }); +}); }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwbGljYXRpb25TdGFydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9BcHBsaWNhdGlvblN0YXJ0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUU3QyxNQUFNLENBQUMsSUFBTSxjQUFjLEdBQUc7O1FBQzVCLE1BQU0sQ0FBQywyQkFBMkIsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFDLE9BQU87WUFDL0MsSUFBTSxJQUFJLEdBQUcsVUFBVSxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUMsU0FBUyxDQUFRLENBQUMsQ0FBQTtZQUNqRSxJQUFJLENBQUMsTUFBTSxDQUFDLG9CQUFDLE9BQU8sQ0FBQyxPQUFPLE9BQUcsQ0FBQyxDQUFBO1FBQ2xDLENBQUMsQ0FBQyxDQUFBOzs7S0FDSCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHN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NlLWFwcCcpLnRoZW4oKEJhc2VBcHApID0+IHtcbiAgICBjb25zdCByb290ID0gY3JlYXRlUm9vdChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcm91dGVyJykgYXMgYW55KVxuICAgIHJvb3QucmVuZGVyKDxCYXNlQXBwLmRlZmF1bHQgLz4pXG4gIH0pXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/Autocomplete.d.ts b/src/main/webapp/js/Autocomplete.d.ts new file mode 100644 index 00000000000..81c6801832d --- /dev/null +++ b/src/main/webapp/js/Autocomplete.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; diff --git a/src/main/webapp/js/Autocomplete.js b/src/main/webapp/js/Autocomplete.js new file mode 100644 index 00000000000..f25877af773 --- /dev/null +++ b/src/main/webapp/js/Autocomplete.js @@ -0,0 +1,37 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/*jshint latedef: nofunc*/ +/* + Chrome only lets us pull off this trick once per loaded iframe. So we need to detach and reattach it after every submit. + Luckily, we can put it on the load event, and keep the logic centralized here. +*/ +import $ from 'jquery'; +function waitForInitialAttachLoad($iframe) { + $iframe.on('load', function () { + $iframe.off('load'); + attachSubmitListener($iframe); + }); +} +function attachSubmitListener($iframe) { + $iframe.on('load', function () { + $iframe.off('load'); + $iframe.detach(); + waitForInitialAttachLoad($iframe); + $('body').append($iframe); + }); +} +var $iframe = $('iframe[name=autocomplete]'); +attachSubmitListener($iframe); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXV0b2NvbXBsZXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL0F1dG9jb21wbGV0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBRUosMEJBQTBCO0FBQzFCOzs7RUFHRTtBQUVGLE9BQU8sQ0FBQyxNQUFNLFFBQVEsQ0FBQTtBQUV0QixTQUFTLHdCQUF3QixDQUFDLE9BQVk7SUFDNUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxNQUFNLEVBQUU7UUFDakIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQTtRQUNuQixvQkFBb0IsQ0FBQyxPQUFPLENBQUMsQ0FBQTtJQUMvQixDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUM7QUFFRCxTQUFTLG9CQUFvQixDQUFDLE9BQVk7SUFDeEMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxNQUFNLEVBQUU7UUFDakIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQTtRQUNuQixPQUFPLENBQUMsTUFBTSxFQUFFLENBQUE7UUFDaEIsd0JBQXdCLENBQUMsT0FBTyxDQUFDLENBQUE7UUFDakMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQTtJQUMzQixDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUM7QUF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KlxuICoqL1xuXG4vKmpzaGludCBsYXRlZGVmOiBub2Z1bmMqL1xuLypcbiAgICBDaHJvbWUgb25seSBsZXRzIHVzIHB1bGwgb2ZmIHRoaXMgdHJpY2sgb25jZSBwZXIgbG9hZGVkIGlmcmFtZS4gIFNvIHdlIG5lZWQgdG8gZGV0YWNoIGFuZCByZWF0dGFjaCBpdCBhZnRlciBldmVyeSBzdWJtaXQuXG4gICAgTHVja2lseSwgd2UgY2FuIHB1dCBpdCBvbiB0aGUgbG9hZCBldmVudCwgYW5kIGtlZXAgdGhlIGxvZ2ljIGNlbnRyYWxpemVkIGhlcmUuXG4qL1xuXG5pbXBvcnQgJCBmcm9tICdqcXVlcnknXG5cbmZ1bmN0aW9uIHdhaXRGb3JJbml0aWFsQXR0YWNoTG9hZCgkaWZyYW1lOiBhbnkpIHtcbiAgJGlmcmFtZS5vbignbG9hZCcsICgpID0+IHtcbiAgICAkaWZyYW1lLm9mZignbG9hZCcpXG4gICAgYXR0YWNoU3VibWl0TGlzdGVuZXIoJGlmcmFtZSlcbiAgfSlcbn1cblxuZnVuY3Rpb24gYXR0YWNoU3VibWl0TGlzdGVuZXIoJGlmcmFtZTogYW55KSB7XG4gICRpZnJhbWUub24oJ2xvYWQnLCAoKSA9PiB7XG4gICAgJGlmcmFtZS5vZmYoJ2xvYWQnKVxuICAgICRpZnJhbWUuZGV0YWNoKClcbiAgICB3YWl0Rm9ySW5pdGlhbEF0dGFjaExvYWQoJGlmcmFtZSlcbiAgICAkKCdib2R5JykuYXBwZW5kKCRpZnJhbWUpXG4gIH0pXG59XG5cbmxldCAkaWZyYW1lID0gJCgnaWZyYW1lW25hbWU9YXV0b2NvbXBsZXRlXScpXG5hdHRhY2hTdWJtaXRMaXN0ZW5lcigkaWZyYW1lKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/CQLUtils.d.ts b/src/main/webapp/js/CQLUtils.d.ts new file mode 100644 index 00000000000..9d6ccde7b5a --- /dev/null +++ b/src/main/webapp/js/CQLUtils.d.ts @@ -0,0 +1,41 @@ +import { StartupData } from './model/Startup/startup'; +declare function generateAnyGeoFilter(property: any, model: any): any; +declare function sanitizeGeometryCql(cqlString: any): any; +declare function getProperty(filter: any): any; +declare function generateIsEmptyFilter(property: any): { + type: string; + property: any; + value: null; +}; +declare function generateFilter(type: any, property: string, value: any, metacardDefinitions?: StartupData['MetacardDefinitions']): any; +declare function generateFilterForFilterFunction(filterFunctionName: any, params: any): { + type: string; + value: boolean; + property: { + type: string; + filterFunctionName: any; + params: any; + }; +}; +declare function isGeoFilter(type: any): boolean; +declare function isPointRadiusFilter(filter: any): any; +declare function buildIntersectCQL(this: any, locationGeometry: any): string | undefined; +declare function arrayFromPolygonWkt(wkt: any): any; +declare const _default: { + sanitizeGeometryCql: typeof sanitizeGeometryCql; + getProperty: typeof getProperty; + generateIsEmptyFilter: typeof generateIsEmptyFilter; + generateAnyGeoFilter: typeof generateAnyGeoFilter; + generateFilter: typeof generateFilter; + generateFilterForFilterFunction: typeof generateFilterForFilterFunction; + isGeoFilter: typeof isGeoFilter; + isPolygonFilter: (filter: any) => any; + isLineFilter: (filter: any) => any; + isPointRadiusFilter: typeof isPointRadiusFilter; + buildIntersectCQL: typeof buildIntersectCQL; + arrayFromPolygonWkt: typeof arrayFromPolygonWkt; + arrayFromLinestringWkt: (wkt: string) => [number, number][]; + arrayFromMultilinestringWkt: (wkt: string) => [number, number][][]; + arrayFromPointWkt: (wkt: string) => [number, number][]; +}; +export default _default; diff --git a/src/main/webapp/js/CQLUtils.js b/src/main/webapp/js/CQLUtils.js new file mode 100644 index 00000000000..ad1e474be84 --- /dev/null +++ b/src/main/webapp/js/CQLUtils.js @@ -0,0 +1,358 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/*jshint bitwise: false*/ +import $ from 'jquery'; +import DistanceUtils from './DistanceUtils'; +import { StartupDataStore } from './model/Startup/startup'; +function sanitizeForCql(text) { + return text + .split('[') + .join('(') + .split(']') + .join(')') + .split("'") + .join('') + .split('"') + .join(''); +} +function lineToCQLLine(model) { + var cqlLINE = model.map(function (point) { return point[0] + ' ' + point[1]; }); + return cqlLINE; +} +function polygonToCQLPolygon(model) { + var cqlPolygon = model.map(function (point) { return point[0] + ' ' + point[1]; }); + if (cqlPolygon[0] !== cqlPolygon[cqlPolygon.length - 1]) { + cqlPolygon.push(cqlPolygon[0]); + } + return [cqlPolygon]; +} +function polygonToCQLMultiPolygon(model) { + return model.map(function (polygon) { return polygonToCQLPolygon(polygon); }); +} +function bboxToCQLPolygon(model) { + if (model.locationType === 'usng') { + return [ + model.mapWest + ' ' + model.mapSouth, + model.mapWest + ' ' + model.mapNorth, + model.mapEast + ' ' + model.mapNorth, + model.mapEast + ' ' + model.mapSouth, + model.mapWest + ' ' + model.mapSouth, + ]; + } + else { + return [ + model.west + ' ' + model.south, + model.west + ' ' + model.north, + model.east + ' ' + model.north, + model.east + ' ' + model.south, + model.west + ' ' + model.south, + ]; + } +} +function generateAnyGeoFilter(property, model) { + if (model === null) { + return { + type: 'IS NULL', + property: property, + value: null, + }; + } + var defaultGeoFilter = { + type: 'INTERSECTS', + property: property, + value: '', + }; + switch (model.type) { + case 'LINE': + if (!Array.isArray(model.line)) { + return defaultGeoFilter; + } + return { + type: model.lineWidth > 0 ? 'DWITHIN' : 'INTERSECTS', + property: property, + value: 'LINESTRING' + + sanitizeForCql(JSON.stringify(lineToCQLLine(model.line))), + distance: DistanceUtils.getDistanceInMeters(model.lineWidth, model.lineUnits), + }; + case 'POLYGON': + if (!Array.isArray(model.polygon)) { + return defaultGeoFilter; + } + return __assign({ type: model.polygonBufferWidth > 0 ? 'DWITHIN' : 'INTERSECTS', property: property, value: "POLYGON".concat(sanitizeForCql(JSON.stringify(polygonToCQLPolygon(model.polygon)))) }, (model.polygonBufferWidth && { + distance: DistanceUtils.getDistanceInMeters(model.polygonBufferWidth, model.polygonBufferUnits), + })); + case 'MULTIPOLYGON': + if (!Array.isArray(model.polygon)) { + return defaultGeoFilter; + } + var poly = 'MULTIPOLYGON' + + sanitizeForCql(JSON.stringify(polygonToCQLMultiPolygon(model.polygon))); + return __assign({ type: model.polygonBufferWidth > 0 ? 'DWITHIN' : 'INTERSECTS', property: property, value: poly }, (model.polygonBufferWidth && { + distance: DistanceUtils.getDistanceInMeters(model.polygonBufferWidth, model.polygonBufferUnits), + })); + case 'BBOX': + return { + type: 'INTERSECTS', + property: property, + value: 'POLYGON(' + + sanitizeForCql(JSON.stringify(bboxToCQLPolygon(model))) + + ')', + }; + case 'POINT': + case 'POINTRADIUS': + return { + type: 'DWITHIN', + property: property, + value: 'POINT(' + model.lon + ' ' + model.lat + ')', + distance: DistanceUtils.getDistanceInMeters(model.radius, model.radiusUnits), + }; + default: + return defaultGeoFilter; + } +} +function buildIntersectOrCQL(shapes) { + var _this = this; + var locationFilter = ''; + $.each(shapes, function (i, shape) { + locationFilter += _this.buildIntersectCQL(shape); + if (i !== shapes.length - 1) { + locationFilter += ' OR '; + } + }); + return locationFilter; +} +function arrayFromPartialWkt(partialWkt) { + var result = partialWkt; + if (partialWkt.startsWith('((')) { + // remove the leading and trailing parentheses + result = partialWkt.replace(/^\(/, '').replace(/\)$/, ''); + } + // change parentheses to array brackets + result = result.replace(/\(/g, '[').replace(/\)/g, ']'); + // change each space-separated coordinate pair to a two-element array + // eslint-disable-next-line no-useless-escape + result = result.replace(/([^,\[\]]+)\s+([^,\[\]]+)/g, '[$1,$2]'); + // build nested arrays from the string + return JSON.parse(result); +} +function sanitizeGeometryCql(cqlString) { + //sanitize polygons + var polygons = cqlString.match(/'POLYGON\(\((-?[0-9]*.?[0-9]* -?[0-9]*.?[0-9]*,?)*\)\)'/g); + if (polygons) { + polygons.forEach(function (polygon) { + cqlString = cqlString.replace(polygon, polygon.replace(/'/g, '')); + }); + } + //sanitize multipolygons + var multipolygons = cqlString.match(/'MULTIPOLYGON\(\(\(.*\)\)\)'/g); + if (multipolygons) { + multipolygons.forEach(function (multipolygon) { + cqlString = cqlString.replace(multipolygon, multipolygon.replace(/'/g, '')); + }); + } + //sanitize points + var points = cqlString.match(/'POINT\(-?[0-9]*.?[0-9]* -?[0-9]*.?[0-9]*\)'/g); + if (points) { + points.forEach(function (point) { + cqlString = cqlString.replace(point, point.replace(/'/g, '')); + }); + } + //sanitize linestrings + var linestrings = cqlString.match(/'LINESTRING\((-?[0-9]*.?[0-9]* -?[0-9]*.?[0-9]*.?)*\)'/g); + if (linestrings) { + linestrings.forEach(function (linestring) { + cqlString = cqlString.replace(linestring, linestring.replace(/'/g, '')); + }); + } + return cqlString; +} +function getProperty(filter) { + if (typeof filter.property !== 'string') { + return null; + } + return filter.property.split('"').join(''); +} +function generateIsEmptyFilter(property) { + return { + type: 'IS NULL', + property: property, + value: null, + }; +} +function generateFilter(type, property, value, metacardDefinitions) { + if (!metacardDefinitions) { + metacardDefinitions = StartupDataStore.MetacardDefinitions; + } + if (metacardDefinitions.getAttributeMap()[property] === undefined) { + return null; + } + switch (metacardDefinitions.getAttributeMap()[property].type) { + case 'LOCATION': + case 'GEOMETRY': + return generateAnyGeoFilter(property, value); + default: + var filter = { + type: type, + property: property, + value: value, + }; + if (type === 'DURING') { + var dates = value.split('/'); + filter.from = dates[0]; + filter.to = dates[1]; + } + if (type === 'BETWEEN') { + ; + filter.lowerBoundary = value.lower; + filter.upperBoundary = value.upper; + } + return filter; + } +} +function generateFilterForFilterFunction(filterFunctionName, params) { + return { + type: '=', + value: true, + property: { + type: 'FILTER_FUNCTION', + filterFunctionName: filterFunctionName, + params: params, + }, + }; +} +function isGeoFilter(type) { + return type === 'DWITHIN' || type === 'INTERSECTS'; +} +// function transformFilterToCQL(filter) { +// // todo: see if we need the extra surrounding parens +// return this.sanitizeGeometryCql('(' + cql.write(filter) + ')') +// } +// function transformCQLToFilter(cqlString) { +// return cql.simplify(cql.read(cqlString)) +// } +var isPolygonFilter = function (filter) { + return geometryFilterContainsString(filter, 'POLYGON'); +}; +var isLineFilter = function (filter) { + return geometryFilterContainsString(filter, 'LINESTRING'); +}; +function isPointRadiusFilter(filter) { + return geometryFilterContainsString(filter, 'POINT'); +} +function geometryFilterContainsString(filter, filterSearchString) { + return filter.value && filter.value.indexOf(filterSearchString) >= 0; +} +function buildIntersectCQL(locationGeometry) { + var locationFilter = ''; + var locationWkt = locationGeometry.toWkt(); + var locationType = locationGeometry.toGeoJSON().type.toUpperCase(); + var shapes; + switch (locationType) { + case 'POINT': + case 'LINESTRING': + locationFilter = '(DWITHIN(anyGeo, ' + locationWkt + ', 1, meters))'; + break; + case 'POLYGON': + // Test if the shape wkt contains ,( + if (/,\(/.test(locationWkt)) { + shapes = locationWkt.split(',('); + $.each(shapes, function (i, polygon) { + locationWkt = polygon.replace(/POLYGON|[()]/g, ''); + locationWkt = 'POLYGON((' + locationWkt + '))'; + locationFilter += '(INTERSECTS(anyGeo, ' + locationWkt + '))'; + if (i !== shapes.length - 1) { + locationFilter += ' OR '; + } + }); + } + else { + locationFilter = '(INTERSECTS(anyGeo, ' + locationWkt + '))'; + } + break; + case 'MULTIPOINT': + shapes = locationGeometry.points; + locationFilter = buildIntersectOrCQL.call(this, shapes); + break; + case 'MULTIPOLYGON': + shapes = locationGeometry.polygons; + locationFilter = buildIntersectOrCQL.call(this, shapes); + break; + case 'MULTILINESTRING': + shapes = locationGeometry.lineStrings; + locationFilter = buildIntersectOrCQL.call(this, shapes); + break; + case 'GEOMETRYCOLLECTION': + shapes = locationGeometry.geometries; + locationFilter = buildIntersectOrCQL.call(this, shapes); + break; + default: + console.error('unknown location type'); + return; + } + return locationFilter; +} +function arrayFromPolygonWkt(wkt) { + // Handle POLYGON with no internal rings (i.e. holes) + if (wkt.startsWith('POLYGON')) { + var polygon = wkt.match(/\(\([^()]+\)\)/g); + return polygon.length === 1 ? arrayFromPartialWkt(polygon[0]) : []; + } + // Handle MULTIPOLYGON with no internal rings (i.e. holes) + var polygons = wkt.match(/\(\([^()]+\)\)/g); + if (polygons) { + return polygons.map(function (polygon) { return arrayFromPartialWkt(polygon); }); + } + return []; +} +var arrayFromLinestringWkt = function (wkt) { + var lines = wkt.match(/\([^()]+\)/g); + if (lines && lines.length > 0) { + return arrayFromPartialWkt(lines[0]); + } + return []; +}; +var arrayFromMultilinestringWkt = function (wkt) { + var lines = wkt.match(/\([^()]+\)/g); + if (lines && lines.length > 0) { + return lines.map(function (line) { return arrayFromPartialWkt(line); }); + } + return []; +}; +var arrayFromPointWkt = function (wkt) { + var points = wkt.match(/\([^()]+\)/g); + if (points && points.length > 0) { + return arrayFromPartialWkt(points[0]); + } + return []; +}; +export default { + sanitizeGeometryCql: sanitizeGeometryCql, + getProperty: getProperty, + generateIsEmptyFilter: generateIsEmptyFilter, + generateAnyGeoFilter: generateAnyGeoFilter, + generateFilter: generateFilter, + generateFilterForFilterFunction: generateFilterForFilterFunction, + isGeoFilter: isGeoFilter, + isPolygonFilter: isPolygonFilter, + isLineFilter: isLineFilter, + isPointRadiusFilter: isPointRadiusFilter, + buildIntersectCQL: buildIntersectCQL, + arrayFromPolygonWkt: arrayFromPolygonWkt, + arrayFromLinestringWkt: arrayFromLinestringWkt, + arrayFromMultilinestringWkt: arrayFromMultilinestringWkt, + arrayFromPointWkt: arrayFromPointWkt, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ1FMVXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvQ1FMVXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO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ZXJ0eSxcbiAgICAgICAgdmFsdWU6IHBvbHksXG4gICAgICAgIC4uLihtb2RlbC5wb2x5Z29uQnVmZmVyV2lkdGggJiYge1xuICAgICAgICAgIGRpc3RhbmNlOiBEaXN0YW5jZVV0aWxzLmdldERpc3RhbmNlSW5NZXRlcnMoXG4gICAgICAgICAgICBtb2RlbC5wb2x5Z29uQnVmZmVyV2lkdGgsXG4gICAgICAgICAgICBtb2RlbC5wb2x5Z29uQnVmZmVyVW5pdHNcbiAgICAgICAgICApLFxuICAgICAgICB9KSxcbiAgICAgIH1cbiAgICBjYXNlICdCQk9YJzpcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHR5cGU6ICdJTlRFUlNFQ1RTJyxcbiAgICAgICAgcHJvcGVydHksXG4gICAgICAgIHZhbHVlOlxuICAgICAgICAgICdQT0xZR09OKCcgK1xuICAgICAgICAgIHNhbml0aXplRm9yQ3FsKEpTT04uc3RyaW5naWZ5KGJib3hUb0NRTFBvbHlnb24obW9kZWwpKSkgK1xuICAgICAgICAgICcpJyxcbiAgICAgIH1cbiAgICBjYXNlICdQT0lOVCc6XG4gICAgY2FzZSAnUE9JTlRSQURJVVMnOlxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdHlwZTogJ0RXSVRISU4nLFxuICAgICAgICBwcm9wZXJ0eSxcbiAgICAgICAgdmFsdWU6ICdQT0lOVCgnICsgbW9kZWwubG9uICsgJyAnICsgbW9kZWwubGF0ICsgJyknLFxuICAgICAgICBkaXN0YW5jZTogRGlzdGFuY2VVdGlscy5nZXREaXN0YW5jZUluTWV0ZXJzKFxuICAgICAgICAgIG1vZGVsLnJhZGl1cyxcbiAgICAgICAgICBtb2RlbC5yYWRpdXNVbml0c1xuICAgICAgICApLFxuICAgICAgfVxuICAgIGRlZmF1bHQ6XG4gICAgICByZXR1cm4gZGVmYXVsdEdlb0ZpbHRlclxuICB9XG59XG5mdW5jdGlvbiBidWlsZEludGVyc2VjdE9yQ1FMKHRoaXM6IGFueSwg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iAgaXNQb2x5Z29uRmlsdGVyLFxuICBpc0xpbmVGaWx0ZXIsXG4gIGlzUG9pbnRSYWRpdXNGaWx0ZXIsXG4gIGJ1aWxkSW50ZXJzZWN0Q1FMLFxuICBhcnJheUZyb21Qb2x5Z29uV2t0LFxuICBhcnJheUZyb21MaW5lc3RyaW5nV2t0LFxuICBhcnJheUZyb21NdWx0aWxpbmVzdHJpbmdXa3QsXG4gIGFycmF5RnJvbVBvaW50V2t0LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/CQLUtils.spec.d.ts b/src/main/webapp/js/CQLUtils.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/CQLUtils.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/CQLUtils.spec.js b/src/main/webapp/js/CQLUtils.spec.js new file mode 100644 index 00000000000..f4b86f4ac3f --- /dev/null +++ b/src/main/webapp/js/CQLUtils.spec.js @@ -0,0 +1,409 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import chai from 'chai'; +var expect = chai.expect; +import wkx from 'wkx'; +import CQLUtils from './CQLUtils'; +var mockMetacardDefinitions = { + anyText: { + id: 'anyText', + type: 'STRING', + multivalued: false, + }, + anyGeo: { + id: 'anyGeo', + type: 'LOCATION', + multivalued: false, + }, + created: { + id: 'created', + type: 'DATE', + multivalued: false, + }, +}; +var mockMetacardDefinitionsObject = { + getAttributeMap: function () { return mockMetacardDefinitions; }, +}; +function assertCoordinateArray(actual, expected) { + expect(actual.length).equals(expected.length); + actual.forEach(function (point, i) { + var expectedPoint = expected[i]; + expect(point[0]).equals(expectedPoint[0]); + expect(point[1]).equals(expectedPoint[1]); + }); +} +function assertMultiCoordinateArray(actual, expected) { + expect(actual.length).equals(expected.length); + actual.forEach(function (shape, i) { + assertCoordinateArray(shape, expected[i]); + }); +} +describe('CQL Utils', function () { + it('strips double quotes from property', function () { + var prop = CQLUtils.getProperty({ property: '"some property"' }); + expect(prop).to.equal('some property'); + }); + it('returns null if property is not a string', function () { + var prop = CQLUtils.getProperty({ property: {} }); + expect(prop).to.be.null; + }); + describe('filter to CQL and CQL to filter conversions', function () { + // it('transform filter to CQL', () => { + // const cql = CQLUtils.transformFilterToCQL({ + // type: 'INTERSECTS', + // property: 'anyGeo', + // value: 'POLYGON((1 2,3 4,5 6,1 2))', + // }) + // expect(cql).to.equal('(INTERSECTS("anyGeo", POLYGON((1 2,3 4,5 6,1 2))))') + // }) + // it('transform compound AND filter to CQL', () => { + // const cql = CQLUtils.transformFilterToCQL({ + // type: 'AND', + // filters: [ + // { + // type: 'INTERSECTS', + // property: 'anyGeo', + // value: 'LINESTRING((1 2,3 4))', + // }, + // { + // type: 'INTERSECTS', + // property: 'anyGeo', + // value: 'POLYGON((5 6,7 8,9 10,5 6))', + // }, + // ], + // }) + // expect(cql).to.equal( + // '((INTERSECTS("anyGeo", LINESTRING((1 2,3 4)))) AND (INTERSECTS("anyGeo", POLYGON((5 6,7 8,9 10,5 6)))))' + // ) + // }) + // it('transform CQL to filter', () => { + // const cql = CQLUtils.transformCQLToFilter( + // '(INTERSECTS(anyGeo, POLYGON((1 2,3 4,5 6,1 2))))' + // ) + // expect(cql).to.deep.equal({ + // type: 'INTERSECTS', + // property: 'anyGeo', + // value: { type: 'GEOMETRY', value: 'POLYGON((1 2,3 4,5 6,1 2))' }, + // }) + // }) + // it('transform compound AND CQL to filter', () => { + // const cql = CQLUtils.transformCQLToFilter( + // '((INTERSECTS(anyGeo, LINESTRING((1 2,3 4)))) AND (INTERSECTS(anyGeo, POLYGON((5 6,7 8,9 10,5 6)))))' + // ) + // expect(cql).to.deep.equal({ + // type: 'AND', + // filters: [ + // { + // type: 'INTERSECTS', + // property: 'anyGeo', + // value: { type: 'GEOMETRY', value: 'LINESTRING((1 2,3 4))' }, + // }, + // { + // type: 'INTERSECTS', + // property: 'anyGeo', + // value: { type: 'GEOMETRY', value: 'POLYGON((5 6,7 8,9 10,5 6))' }, + // }, + // ], + // }) + // }) + }); + describe('transforms CQL', function () { + it('removes single quotes from POLYGON WKTs in CQL', function () { + var cql = CQLUtils.sanitizeGeometryCql("(INTERSECTS(anyGeo, 'POLYGON((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6))'))"); + expect(cql).to.equal('(INTERSECTS(anyGeo, POLYGON((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6))))'); + }); + it('removes single quotes from MULTIPOLYGON WKTs in CQL', function () { + var cql = CQLUtils.sanitizeGeometryCql("(INTERSECTS(anyGeo, 'MULTIPOLYGON(((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6)))'))"); + expect(cql).to.equal('(INTERSECTS(anyGeo, MULTIPOLYGON(((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6)))))'); + }); + it('removes single quotes from POINT WKTs in CQL', function () { + var cql = CQLUtils.sanitizeGeometryCql("(DWITHIN(anyGeo, 'POINT(-110.4 30.4)', 100, meters))"); + expect(cql).to.equal('(DWITHIN(anyGeo, POINT(-110.4 30.4), 100, meters))'); + }); + it('removes single quotes from LINESTRING WKTs in CQL', function () { + var cql = CQLUtils.sanitizeGeometryCql("(DWITHIN(anyGeo, 'LINESTRING(-106.7 36.2,-87.5 46.5)', 1, meters))"); + expect(cql).to.equal('(DWITHIN(anyGeo, LINESTRING(-106.7 36.2,-87.5 46.5), 1, meters))'); + }); + it('builds CQL for POINT location', function () { + var cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('POINT(1 2)')); + expect(cql).to.equal('(DWITHIN(anyGeo, POINT(1 2), 1, meters))'); + }); + it('builds CQL for LINESTRING location', function () { + var cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('LINESTRING(1 2, 3 4)')); + expect(cql).to.equal('(DWITHIN(anyGeo, LINESTRING(1 2,3 4), 1, meters))'); + }); + it('builds CQL for POLYGON location', function () { + var cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('POLYGON((1 2, 3 4, 5 6, 1 2))')); + expect(cql).to.equal('(INTERSECTS(anyGeo, POLYGON((1 2,3 4,5 6,1 2))))'); + }); + it('builds CQL for MULTIPOINT location', function () { + var cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('MULTIPOINT((1 2), (3 4))')); + expect(cql).to.equal('(DWITHIN(anyGeo, POINT(1 2), 1, meters)) OR (DWITHIN(anyGeo, POINT(3 4), 1, meters))'); + }); + it('builds CQL for MULTILINESTRING location', function () { + var cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('MULTILINESTRING((1 2, 3 4), (5 6, 7 8))')); + expect(cql).to.equal('(DWITHIN(anyGeo, LINESTRING(1 2,3 4), 1, meters)) OR (DWITHIN(anyGeo, LINESTRING(5 6,7 8), 1, meters))'); + }); + it('builds CQL for MULTIPOLYGON location', function () { + var cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('MULTIPOLYGON(((1 2, 3 4, 5 6, 1 2)), ((10 20, 30 40, 50 60, 10 20)))')); + expect(cql).to.equal('(INTERSECTS(anyGeo, POLYGON((1 2,3 4,5 6,1 2)))) OR (INTERSECTS(anyGeo, POLYGON((10 20,30 40,50 60,10 20))))'); + }); + it('builds CQL for GEOMETRYCOLLECTION location', function () { + var cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(1 2, 3 4))')); + expect(cql).to.equal('(DWITHIN(anyGeo, POINT(1 2), 1, meters)) OR (DWITHIN(anyGeo, LINESTRING(1 2,3 4), 1, meters))'); + }); + }); + describe('generates filters', function () { + it('generates filter with anyGeo property and LINE type', function () { + var filter = CQLUtils.generateFilter('some type', 'anyGeo', { + type: 'LINE', + line: [ + [1, 1], + [2, 2], + ], + lineWidth: 5.0, + }, mockMetacardDefinitionsObject); + expect(filter.type).equals('DWITHIN'); + expect(filter.property).equals('anyGeo'); + expect(filter.value).equals('LINESTRING(1 1,2 2)'); + expect(filter.distance).equals(5.0); + }); + it('generates filter with anyGeo property and POLYGON type', function () { + var filter = CQLUtils.generateFilter('some type', 'anyGeo', { + type: 'POLYGON', + polygon: [ + [1, 1], + [2, 2], + [1, 1], + ], + }, mockMetacardDefinitionsObject); + expect(filter.type).equals('INTERSECTS'); + expect(filter.property).equals('anyGeo'); + expect(filter.value).equals('POLYGON((1 1,2 2,1 1))'); + }); + it('generates filter with anyGeo property and MULTIPOLYGON type', function () { + var filter = CQLUtils.generateFilter('some type', 'anyGeo', { + type: 'MULTIPOLYGON', + polygon: [ + [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ], + [ + [8.0, 55.0], + [9.0, 54.0], + [9.0, 55.0], + [8.0, 55.0], + ], + ], + }, mockMetacardDefinitionsObject); + expect(filter.type).equals('INTERSECTS'); + expect(filter.property).equals('anyGeo'); + expect(filter.value).equals('MULTIPOLYGON(((3 50,4 49,4 50,3 50)),((8 55,9 54,9 55,8 55)))'); + }); + it('generates filter with anyGeo property and BBOX type (dd)', function () { + var filter = CQLUtils.generateFilter('some type', 'anyGeo', { + type: 'BBOX', + locationType: 'dd', + west: -97, + south: 41, + east: -90, + north: 46, + }, mockMetacardDefinitionsObject); + expect(filter.type).equals('INTERSECTS'); + expect(filter.property).equals('anyGeo'); + expect(filter.value).equals('POLYGON((-97 41,-97 46,-90 46,-90 41,-97 41))'); + }); + it('generates filter with anyGeo property and BBOX type (usng)', function () { + var filter = CQLUtils.generateFilter('some type', 'anyGeo', { + type: 'BBOX', + locationType: 'usng', + mapWest: -97, + mapSouth: 41, + mapEast: -90, + mapNorth: 46, + }, mockMetacardDefinitionsObject); + expect(filter.type).equals('INTERSECTS'); + expect(filter.property).equals('anyGeo'); + expect(filter.value).equals('POLYGON((-97 41,-97 46,-90 46,-90 41,-97 41))'); + }); + it('generates filter with anyGeo property and POINTRADIUS type', function () { + var filter = CQLUtils.generateFilter('some type', 'anyGeo', { type: 'POINTRADIUS', lon: 2, lat: 3, radius: 10 }, mockMetacardDefinitionsObject); + expect(filter.type).equals('DWITHIN'); + expect(filter.property).equals('anyGeo'); + expect(filter.value).equals('POINT(2 3)'); + expect(filter.distance).equals(10); + }); + it('generates filter with anyText property', function () { + var filter = CQLUtils.generateFilter('some type', 'anyText', 'some value', mockMetacardDefinitionsObject); + expect(filter.type).equals('some type'); + expect(filter.property).equals('anyText'); + expect(filter.value).equals('some value'); + }); + it('generates filter for filter function', function () { + var filter = CQLUtils.generateFilterForFilterFunction('myFunc', { param1: 'val1' }, + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 3. + mockMetacardDefinitions); + expect(filter.type).equals('='); + expect(filter.value).to.be.true; + expect(filter.property).to.deep.equal({ + type: 'FILTER_FUNCTION', + filterFunctionName: 'myFunc', + params: { param1: 'val1' }, + }); + }); + it('generates DURING filter with temporal property', function () { + var filter = CQLUtils.generateFilter('DURING', 'created', '2018-11-01T19:00:00.000Z/2018-11-30T19:00:00.000Z', mockMetacardDefinitionsObject); + expect(filter.type).equals('DURING'); + expect(filter.value).equals('2018-11-01T19:00:00.000Z/2018-11-30T19:00:00.000Z'); + expect(filter.from).equals('2018-11-01T19:00:00.000Z'); + expect(filter.to).equals('2018-11-30T19:00:00.000Z'); + }); + }); + describe('checks filter types', function () { + it('DWITHIN is a geo filter', function () { + var isGeoFilter = CQLUtils.isGeoFilter('DWITHIN'); + expect(isGeoFilter).to.be.true; + }); + it('INTERSECTS is a geo filter', function () { + var isGeoFilter = CQLUtils.isGeoFilter('INTERSECTS'); + expect(isGeoFilter).to.be.true; + }); + it('AFTER is not a geo filter', function () { + var isGeoFilter = CQLUtils.isGeoFilter('AFTER'); + expect(isGeoFilter).to.be.false; + }); + it('filter with a POINT is a point radius', function () { + var isPointRadiusFilter = CQLUtils.isPointRadiusFilter({ + value: 'POINT(1 1)', + }); + expect(isPointRadiusFilter).to.be.true; + }); + it('filter with a POINT is not a polygon', function () { + var isPolygonFilter = CQLUtils.isPolygonFilter({ + value: 'POINT(1 1)', + }); + expect(isPolygonFilter).to.be.false; + }); + it('filter with a POLYGON is a polygon', function () { + var isPolygonFilter = CQLUtils.isPolygonFilter({ + value: 'POLYGON((3 50, 4 49, 4 50, 3 50))', + }); + expect(isPolygonFilter).to.be.true; + }); + it('filter with a POLYGON is not a point radius', function () { + var isPointRadiusFilter = CQLUtils.isPointRadiusFilter({ + value: 'POLYGON((3 50, 4 49, 4 50, 3 50))', + }); + expect(isPointRadiusFilter).to.be.false; + }); + }); + describe('parses WKTs into arrays', function () { + it('correctly parses a POLYGON into an array', function () { + var polygon = CQLUtils.arrayFromPolygonWkt('POLYGON((3 50, 4 49, 4 50, 3 50))'); + assertCoordinateArray(polygon, [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ]); + }); + it('correctly parses a MULTIPOLYGON with one POLYGON into an array', function () { + var multipolygon = CQLUtils.arrayFromPolygonWkt('MULTIPOLYGON(((3 50, 4 49, 4 50, 3 50)))'); + assertMultiCoordinateArray(multipolygon, [ + [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ], + ]); + }); + it('correctly parses a MULTIPOLYGON with multiple POLYGONs into an array', function () { + var multipolygon = CQLUtils.arrayFromPolygonWkt('MULTIPOLYGON(((3 50, 4 49, 4 50, 3 50)), ((8 55, 9 54, 9 55, 8 55)))'); + assertMultiCoordinateArray(multipolygon, [ + [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ], + [ + [8.0, 55.0], + [9.0, 54.0], + [9.0, 55.0], + [8.0, 55.0], + ], + ]); + }); + it('correctly parses a LINESTRING into an array', function () { + var linestring = CQLUtils.arrayFromLinestringWkt('LINESTRING(3 50, 4 49, 4 50, 3 50)'); + assertCoordinateArray(linestring, [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ]); + }); + it('correctly parses a MULTILINESTRING with one LINESTRING into an array', function () { + var multilinestring = CQLUtils.arrayFromMultilinestringWkt('MULTILINESTRING((3 50, 4 49, 4 50, 3 50))'); + assertMultiCoordinateArray(multilinestring, [ + [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ], + ]); + }); + it('correctly parses a MULTILINESTRING with multiple LINESTRINGs into an array', function () { + var multilinestring = CQLUtils.arrayFromMultilinestringWkt('MULTILINESTRING((3 50, 4 49, 4 50, 3 50), (8 55, 9 54, 9 55, 8 55))'); + assertMultiCoordinateArray(multilinestring, [ + [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ], + [ + [8.0, 55.0], + [9.0, 54.0], + [9.0, 55.0], + [8.0, 55.0], + ], + ]); + }); + it('correctly parses a POINT into an array', function () { + var point = CQLUtils.arrayFromPointWkt('POINT(3 50)'); + assertCoordinateArray(point, [[3.0, 50.0]]); + }); + it('correctly parses a MULTIPOINT with one POINT into an array', function () { + var multipoint = CQLUtils.arrayFromPointWkt('MULTIPOINT(3 50)'); + assertCoordinateArray(multipoint, [[3.0, 50.0]]); + }); + it('correctly parses a MULTIPOINT with multiple POINTs into an array', function () { + var multipoint = CQLUtils.arrayFromPointWkt('MULTIPOINT(3 50, 4 49, 4 50, 3 50)'); + assertCoordinateArray(multipoint, [ + [3.0, 50.0], + [4.0, 49.0], + [4.0, 50.0], + [3.0, 50.0], + ]); + }); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ1FMVXRpbHMuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4u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AgIHdreC5HZW9tZXRyeS5wYXJzZShcbiAgICAgICAgICAnR0VPTUVUUllDT0xMRUNUSU9OKFBPSU5UKDEgMiksIExJTkVTVFJJTkcoMSAyLCAzIDQpKSdcbiAgICAgICAgKVxuICAgICAgKVxuICAgICAgZXhwZWN0KGNxbCkudG8uZXF1YWwoXG4gICAgICAgICcoRFdJVEhJTihhbnlHZW8sIFBPSU5UKDEgMiksIDEsIG1ldGVycykpIE9SIChEV0lUSElOKGFueUdlbywgTElORVNUUklORygxIDIsMyA0KSwgMSwgbWV0ZXJzKSknXG4gICAgICApXG4gICAgfSlcbiAgfSlcblxuICBkZXNjcmliZSgnZ2VuZXJhdGVzIGZpbHRlcnMnLCAoKSA9PiB7XG4gICAgaXQoJ2dlbmVyYXRlcyBmaWx0ZXIgd2l0aCBhbnlHZW8gcHJvcGVydHkgYW5kIExJTkUgdHlwZScsICgpID0+IHtcbiAgICAgIGNvbnN0IGZpbHRlciA9IENRTFV0aWxzLmdlbmVyYXRlRmlsdGVyKFxuICAgICAgICAnc29tZSB0eXBlJyxcbiAgICAgICAgJ2FueUdlbycsXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnTElORScsXG4gICAgICAgICAgbGluZTogW1xuICAgICAgICAgICAgWzEsIDFdLFxuICAgICAgICAgICAgWzIsIDJdLFxuICAgICAgICAgIF0sXG4gICAgICAgICAgbGluZVdpZHRoOiA1LjAsXG4gICAgICAgIH0sXG4gICAgICAgIG1vY2tNZXRhY2FyZERlZmluaXRpb25zT2JqZWN0XG4gICAgICApXG4gICAgICBleHBlY3QoZmlsdGVyLnR5cGUpLmVxdWFscygnRFdJVEhJTicpXG4gICAgICBleHBlY3QoZmlsdGVyLnByb3BlcnR5KS5lcXVhbHMoJ2FueUdlbycpXG4gICAgICBleHBlY3QoZmlsdGVyLnZhbHVlKS5lcXVhbHMoJ0xJTkVTVFJJTkcoMSAxLDIgMiknKVxuICAgICAgZXhwZWN0KGZpbHRlci5kaXN0YW5jZSkuZXF1YWxzKDUuMClcbiAgICB9KVxuXG4gICAgaXQoJ2dlbmVyYXRlcyBmaWx0ZXIgd2l0aCBhbnlHZW8gcHJvcGVydHkgYW5kIFBPTFlHT04gdHlwZScsICgpID0+IHtcbiAgICAgIGNvbnN0IGZpbHRlciA9IENRTFV0aWxzLmdlbmVyYXRlRmlsdGVyKFxuICAgICAgICAnc29tZSB0eXBlJyxcbiAgICAgICAgJ2FueUdlbycsXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnUE9MWUdPTicsXG4gICAgICAgICAgcG9seWdvbjogW1xuICAgICAgICAgICAgWzEsIDFdLFxuICAgICAgICAgICAgWzIsIDJdLFxuICAgICAgICAgICAgWzEsIDFdLFxuICAgICAgICAgIF0sXG4gICAgICAgIH0sXG4gICAgICAgIG1vY2tNZXRhY2FyZERlZmluaXRpb25zT2JqZWN0XG4gICAgICApXG4gICAgICBleHBlY3QoZmlsdGVyLnR5cGUpLmVxdWFscygnSU5URVJTRUNUUycpXG4gICAgICBleHBlY3QoZmlsdGVyLnByb3BlcnR5KS5lcXVhbHMoJ2FueUdlbycpXG4gICAgICBleHBlY3QoZmlsdGVyLnZhbHVlKS5lcXVhbHMoJ1BPTFlHT04oKDEgMSwyIDIsMSAxKSknKVxuICAgIH0pXG5cbiAgICBpdCgnZ2VuZXJhdGVzIGZpbHRlciB3aXRoIGFueUdlbyBwcm9wZXJ0eSBhbmQgTVVMVElQT0xZR09OIHR5cGUnLCAoKSA9PiB7XG4gICAgICBjb25zdCBmaWx0ZXIgPSBDUUxVdGlscy5nZW5lcmF0ZUZpbHRlcihcbiAgICAgICAgJ3NvbWUgdHlwZScsXG4gICAgICAgICdhbnlHZW8nLFxuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogJ01VTFRJUE9MWUdPTicsXG4gICAgICAgICAgcG9seWdvbjogW1xuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICBbMy4wLCA1MC4wXSxcbiAgICAgICAgICAgICAgWzQuMCwgND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gICAgIF0sXG4gICAgICBdKVxuICAgIH0pXG5cbiAgICBpdCgnY29ycmVjdGx5IHBhcnNlcyBhIE1VTFRJUE9MWUdPTiB3aXRoIG11bHRpcGxlIFBPTFlHT05zIGludG8gYW4gYXJyYXknLCAoKSA9PiB7XG4gICAgICBjb25zdCBtdWx0aXBvbHlnb24gPSBDUUxVdGlscy5hcnJheUZyb21Qb2x5Z29uV2t0KFxuICAgICAgICAnTVVMVElQT0xZR09OKCgoMyA1MCwgNCA0OSwgNCA1MCwgMyA1MCkpLCAoKDggNTUsIDkgNTQsIDkgNTUsIDggNTUpKSknXG4gICAgICApXG4gICAgICBhc3NlcnRNdWx0aUNvb3JkaW5hdGVBcnJheShtdWx0aXBvbHlnb24sIFtcbiAgICAgICAgW1xuICAgICAgICAgIFszLjAsIDUwLjBdLFxuICAgICAgICAgIFs0LjAsIDQ5LjBdLFxuICAgICAgICAgIFs0LjAsIDUwLjBdLFxuICAgICAgICAgIFszLjAsIDUwLjBdLFxuICAgICAgICBdLFxuICAgICAgICBbXG4gICAgICAgICAgWzguMCwgNTUuMF0sXG4gICAgICAgICAgWzkuMCwgNTQuMF0sXG4gICAgICAgICAgWzkuMCwgNTUuMF0sXG4gICAgICAgICAgWzguMCwgNTUuMF0sXG4gICAgICAgIF0sXG4gICAgICBdKVxuICAgIH0pXG5cbiAgICBpdCgnY29ycmVjdGx5IHBhcnNlcyBhIExJTkVTVFJJTkcgaW50byBhbiBhcnJheScsICgpID0+IHtcbiAgICAgIGNvbnN0IGxpbmVzdHJpbmcgPSBDUUxVdGlscy5hcnJheUZyb21MaW5lc3RyaW5nV2t0KFxuICAgICAgICAnTElORVNUUklORygzIDUwLCA0IDQ5LCA0IDUwLCAzIDUwKSdcbiAgICAgIClcbiAgICAgIGFzc2VydENvb3JkaW5hdGVBcnJheShsaW5lc3RyaW5nLCBbXG4gICAgICAgIFszLjAsIDUwLjBdLFxuICAgICAgICBbNC4wLCA0OS4wXSxcbiAgICAgICAgWzQuMCw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CBbXG4gICAgICAgIFszLjAsIDUwLjBdLFxuICAgICAgICBbNC4wLCA0OS4wXSxcbiAgICAgICAgWzQuMCwgNTAuMF0sXG4gICAgICAgIFszLjAsIDUwLjBdLFxuICAgICAgXSlcbiAgICB9KVxuICB9KVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/CacheSourceSelector.d.ts b/src/main/webapp/js/CacheSourceSelector.d.ts new file mode 100644 index 00000000000..619efdffb41 --- /dev/null +++ b/src/main/webapp/js/CacheSourceSelector.d.ts @@ -0,0 +1,4 @@ +declare const _default: { + trimCacheSources(cqlString: any, sources: any): any; +}; +export default _default; diff --git a/src/main/webapp/js/CacheSourceSelector.js b/src/main/webapp/js/CacheSourceSelector.js new file mode 100644 index 00000000000..75d98ef3269 --- /dev/null +++ b/src/main/webapp/js/CacheSourceSelector.js @@ -0,0 +1,44 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import cql from './cql'; +import CQLUtils from './CQLUtils'; +function buildCacheSourcesCql(sources) { + return { + type: 'OR', + filters: sources + .filter(function (source) { return source !== 'cache'; }) + .map(function (source) { return ({ + property: '"metacard_source"', + type: '=', + value: source, + }); }), + }; +} +function limitCacheSources(cql, sources) { + return { + type: 'AND', + filters: [cql, buildCacheSourcesCql(sources)], + }; +} +export default { + trimCacheSources: function (cqlString, sources) { + return CQLUtils.sanitizeGeometryCql('(' + + cql.write( + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ type: string; filters: any[]; ... Remove this comment to see the full error message + limitCacheSources(cql.simplify(cql.read(cqlString)), sources)) + + ')'); + }, +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sdGVyczogYW55W107IC4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgICAgICAgbGltaXRDYWNoZVNvdXJjZXMoY3FsLnNpbXBsaWZ5KGNxbC5yZWFkKGNxbFN0cmluZykpLCBzb3VyY2VzKVxuICAgICAgICApICtcbiAgICAgICAgJyknXG4gICAgKVxuICB9LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/Common.d.ts b/src/main/webapp/js/Common.d.ts new file mode 100644 index 00000000000..da28831a6b8 --- /dev/null +++ b/src/main/webapp/js/Common.d.ts @@ -0,0 +1,73 @@ +import './requestAnimationFramePolyfill'; +import { TimePrecision } from '@blueprintjs/datetime'; +export declare const Common: { + undefined: string; + coreTransitionTime: number; + cqlToHumanReadable(cql?: string): string | undefined; + getFileSize(item?: string): string; + getHumanReadableDateTime(date: string): string; + getDateTimeFormats(): { + [key: string]: { + millisecond: { + datetimefmt: string; + timefmt: string; + }; + minute: { + datetimefmt: string; + timefmt: string; + }; + second: { + datetimefmt: string; + timefmt: string; + }; + }; + }; + getDateTimeFormatsReverseMap(): { + [key: string]: { + format: string; + precision: TimePrecision; + }; + }; + getTimeFormatsReverseMap(): { + [key: string]: { + format: string; + precision: TimePrecision; + }; + }; + getTimeZones(): { + UTC: string; + '-12': string; + '-11': string; + '-10': string; + '-9': string; + '-8': string; + '-7': string; + '-6': string; + '-5': string; + '-4': string; + '-3': string; + '-2': string; + '-1': string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + getRelativeDate(date: string): string; + getImageSrc(img: string): string; + getResourceUrlFromThumbUrl(url: string): string; + cancelRepaintForTimeframe(requestDetails: any): void; + repaintForTimeframe(time: any, callback: any): any; + escapeHTML(value: string): string; + wrapMapCoordinates(x: number, [min, max]: [number, number]): number; + wrapMapCoordinatesArray(coordinates: Array<[number, number]>): number[][]; +}; +export default Common; diff --git a/src/main/webapp/js/Common.js b/src/main/webapp/js/Common.js new file mode 100644 index 00000000000..3fbc24ca295 --- /dev/null +++ b/src/main/webapp/js/Common.js @@ -0,0 +1,281 @@ +import { __read, __values } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/*jshint bitwise: false*/ +import $ from 'jquery'; +import moment from 'moment'; +import './requestAnimationFramePolyfill'; +import { cacheBustUrl } from './cache-bust-url'; +var timeZones = { + UTC: 'Etc/UTC', + '-12': 'Etc/GMT+12', + '-11': 'Etc/GMT+11', + '-10': 'Etc/GMT+10', + '-9': 'Etc/GMT+9', + '-8': 'Etc/GMT+8', + '-7': 'Etc/GMT+7', + '-6': 'Etc/GMT+6', + '-5': 'Etc/GMT+5', + '-4': 'Etc/GMT+4', + '-3': 'Etc/GMT+3', + '-2': 'Etc/GMT+2', + '-1': 'Etc/GMT+1', + 1: 'Etc/GMT-1', + 2: 'Etc/GMT-2', + 3: 'Etc/GMT-3', + 4: 'Etc/GMT-4', + 5: 'Etc/GMT-5', + 6: 'Etc/GMT-6', + 7: 'Etc/GMT-7', + 8: 'Etc/GMT-8', + 9: 'Etc/GMT-9', + 10: 'Etc/GMT-10', + 11: 'Etc/GMT-11', + 12: 'Etc/GMT-12', +}; +var dateTimeFormats = { + ISO: { + millisecond: { + datetimefmt: 'YYYY-MM-DD[T]HH:mm:ss.SSSZ', + timefmt: 'HH:mm:ssZ', + }, + second: { datetimefmt: 'YYYY-MM-DD[T]HH:mm:ssZ', timefmt: 'HH:mm:ssZ' }, + minute: { datetimefmt: 'YYYY-MM-DD[T]HH:mmZ', timefmt: 'HH:mmZ' }, + }, + '24': { + millisecond: { + datetimefmt: 'DD MMM YYYY HH:mm:ss.SSS Z', + timefmt: 'HH:mm:ss Z', + }, + second: { + datetimefmt: 'DD MMM YYYY HH:mm:ss Z', + timefmt: 'HH:mm:ss Z', + }, + minute: { + datetimefmt: 'DD MMM YYYY HH:mm Z', + timefmt: 'HH:mm Z', + }, + }, + '12': { + millisecond: { + datetimefmt: 'DD MMM YYYY hh:mm:ss.SSS a Z', + timefmt: 'hh:mm:ss a Z', + }, + second: { + datetimefmt: 'DD MMM YYYY hh:mm:ss a Z', + timefmt: 'hh:mm:ss a Z', + }, + minute: { + datetimefmt: 'DD MMM YYYY hh:mm a Z', + timefmt: 'hh:mm a Z', + }, + }, +}; +var dateTimeFormatsReverseMap = Object.entries(dateTimeFormats).reduce(function (map, val) { + var e_1, _a; + var format = val[0]; + try { + for (var _b = __values(Object.entries(val[1])), _c = _b.next(); !_c.done; _c = _b.next()) { + var _d = __read(_c.value, 2), precision = _d[0], formats = _d[1]; + map[formats.datetimefmt] = { + format: format, + precision: precision, + }; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return map; +}, {}); +var timeFormatsReverseMap = Object.entries(dateTimeFormats).reduce(function (map, val) { + var e_2, _a; + var format = val[0]; + try { + for (var _b = __values(Object.entries(val[1])), _c = _b.next(); !_c.done; _c = _b.next()) { + var _d = __read(_c.value, 2), precision = _d[0], formats = _d[1]; + map[formats.timefmt] = { format: format, precision: precision }; + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_2) throw e_2.error; } + } + return map; +}, {}); +export var Common = { + //randomly generated guid guaranteed to be unique ;) + undefined: '2686dcb5-7578-4957-974d-aaa9289cd2f0', + coreTransitionTime: 250, + cqlToHumanReadable: function (cql) { + if (cql === undefined) { + return cql; + } + cql = cql.replace(new RegExp('anyText ILIKE ', 'g'), '~'); + cql = cql.replace(new RegExp('anyText LIKE ', 'g'), ''); + cql = cql.replace(new RegExp('AFTER', 'g'), '>'); + cql = cql.replace(new RegExp('DURING', 'g'), 'BETWEEN'); + return cql; + }, + getFileSize: function (item) { + if (item === undefined || item === null) { + return 'Unknown Size'; + } + var givenProductSize = (item === null || item === void 0 ? void 0 : item.replace(/[,]+/g, '').trim()) || ''; + //remove any commas and trailing whitespace + var bytes = parseInt(givenProductSize, 10); + var noUnitsGiven = /[0-9]$/; + //number without a word following + var reformattedProductSize = givenProductSize.replace(/\s\s+/g, ' '); + //remove extra whitespaces + var finalFormatProductSize = reformattedProductSize.replace(/([0-9])([a-zA-Z])/g, '$1 $2'); + //make sure there is exactly one space between number and unit + var sizeArray = finalFormatProductSize.split(' '); + //splits size into number and unit + if (isNaN(bytes)) { + return 'Unknown Size'; + } + if (noUnitsGiven.test(givenProductSize)) { + //need to parse number given and add units, number is assumed to be bytes + var size = void 0, index = void 0, type = ['bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes === 0) { + return '0 bytes'; + } + else { + index = Math.floor(Math.log(bytes) / Math.log(1024)); + if (index > 4) { + index = 4; + } + size = (bytes / Math.pow(1024, index)).toFixed(index < 2 ? 0 : 1); + } + return size + ' ' + type[index]; + } + else { + //units were included with size + switch (sizeArray[1].toLowerCase()) { + case 'bytes': + return sizeArray[0] + ' bytes'; + case 'b': + return sizeArray[0] + ' bytes'; + case 'kb': + return sizeArray[0] + ' KB'; + case 'kilobytes': + return sizeArray[0] + ' KB'; + case 'kbytes': + return sizeArray[0] + ' KB'; + case 'mb': + return sizeArray[0] + ' MB'; + case 'megabytes': + return sizeArray[0] + ' MB'; + case 'mbytes': + return sizeArray[0] + ' MB'; + case 'gb': + return sizeArray[0] + ' GB'; + case 'gigabytes': + return sizeArray[0] + ' GB'; + case 'gbytes': + return sizeArray[0] + ' GB'; + case 'tb': + return sizeArray[0] + ' TB'; + case 'terabytes': + return sizeArray[0] + ' TB'; + case 'tbytes': + return sizeArray[0] + ' TB'; + default: + return 'Unknown Size'; + } + } + }, + //can be deleted once histogram changes are merged + getHumanReadableDateTime: function (date) { + return moment(date).format(dateTimeFormats['24']['second']['datetimefmt']); + }, + getDateTimeFormats: function () { + return dateTimeFormats; + }, + getDateTimeFormatsReverseMap: function () { + return dateTimeFormatsReverseMap; + }, + getTimeFormatsReverseMap: function () { + return timeFormatsReverseMap; + }, + getTimeZones: function () { + return timeZones; + }, + getRelativeDate: function (date) { + return "".concat(moment(date).fromNow()); + }, + getImageSrc: function (img) { + if (typeof img === 'string' && + (img === '' || img.substring(0, 4) === 'http')) + return cacheBustUrl(img); + if (typeof img === 'string' && img.startsWith('data:image/png;base64,')) + return img; + return 'data:image/png;base64,' + img; + }, + getResourceUrlFromThumbUrl: function (url) { + return url.replace(/=thumbnail[_=&\d\w\s;]+/, '=resource'); + }, + cancelRepaintForTimeframe: function (requestDetails) { + if (requestDetails) { + window.cancelAnimationFrame(requestDetails.requestId); + } + }, + repaintForTimeframe: function (time, callback) { + var requestDetails = { + requestId: undefined, + }; + var timeEnd = Date.now() + time; + var repaint = function () { + callback(); + if (Date.now() < timeEnd) { + requestDetails.requestId = window.requestAnimationFrame(function () { + repaint(); + }); + } + }; + requestDetails.requestId = window.requestAnimationFrame(function () { + repaint(); + }); + return requestDetails; + }, + escapeHTML: function (value) { + return $('
').text(value).html(); + }, + wrapMapCoordinates: function (x, _a) { + var _b = __read(_a, 2), min = _b[0], max = _b[1]; + var d = max - min; + return ((((x - min) % d) + d) % d) + min; + }, + wrapMapCoordinatesArray: function (coordinates) { + var _this = this; + return coordinates.map(function (_a) { + var _b = __read(_a, 2), lon = _b[0], lat = _b[1]; + return [ + _this.wrapMapCoordinates(lon, [-180, 180]), + _this.wrapMapCoordinates(lat, [-90, 90]), + ]; + }); + }, +}; +export default Common; +//# sourceMappingURL=data:application/json;base64,eyJ2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gICAgICByZXR1cm4gc2l6ZUFycmF5WzBdICsgJyBieXRlcydcbiAgICAgICAgY2FzZSAna2InOlxuICAgICAgICAgIHJldHVybiBzaXplQXJyYXlbMF0gKyAnIEtCJ1xuICAgICAgICBjYXNlICdraWxvYnl0ZXMnOlxuICAgICAgICAgIHJldHVybiBzaXplQXJyYXlbMF0gKyAnIEtCJ1xuICAgICAgICBjYXNlICdrYnl0ZXMnOlxuICAgICAgICAgIHJldHVybiBzaXplQXJyYXlbMF0gKyAnIEtCJ1xuICAgICAgICBjYXNlICdtYic6XG4gICAgICAgICAgcmV0dXJuIHNpemVBcnJheVswXSArICcgTUInXG4gICAgICAgIGNhc2UgJ21lZ2FieXRlcyc6XG4gICAgICAgICAgcmV0dXJuIHNpemVBcnJheVswXSArICcgTUInXG4gICAgICAgIGNhc2UgJ21ieXRlcyc6XG4gICAgICAgICAgcmV0dXJuIHNpemVBcnJheVswXSArICcgTUInXG4gICAgICAgIGNhc2UgJ2diJzpcbiAgICAgICAgICByZXR1cm4gc2l6ZUFycmF5WzBdICsgJyBHQidcbiAgICAgICAgY2FzZSAnZ2lnYWJ5dGVzJzpcbiAgICAgICAgICByZXR1cm4gc2l6ZUFycmF5WzBdICsgJyBHQidcbiAgICAgICAgY2FzZSAnZ2J5dGVzJzpcbiAgICAgICAgICByZXR1cm4gc2l6ZUFycmF5WzBdICsgJyBHQidcbiAgICAgICAgY2FzZSAndGInOlxuICAgICAgICAgIHJldHVybiBzaXplQXJyYXlbMF0gKyAnIFRCJ1xuICAgICAgICBjYXNlICd0ZXJhYnl0ZXMnOlxuICAgICAgICAgIHJldHVybiBzaXplQXJyYXlbMF0gKyAnIFRCJ1xuICAgICAgICBjYXNlICd0Ynl0ZXMnOlxuICAgICAgICAgIHJldHVybiBzaXplQXJyYXlbMF0gKyAnIFRCJ1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIHJldHVybiAnVW5rbm93biBTaXplJ1xuICAgICAgfVxuICAgIH1cbiAgfSxc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KSB7XG4gICAgcmV0dXJuICQoJzxkaXY+JykudGV4dCh2YWx1ZSkuaHRtbCgpXG4gIH0sXG4gIHdyYXBNYXBDb29yZGluYXRlcyh4OiBudW1iZXIsIFttaW4sIG1heF06IFtudW1iZXIsIG51bWJlcl0pIHtcbiAgICBjb25zdCBkID0gbWF4IC0gbWluXG4gICAgcmV0dXJuICgoKCh4IC0gbWluKSAlIGQpICsgZCkgJSBkKSArIG1pblxuICB9LFxuICB3cmFwTWFwQ29vcmRpbmF0ZXNBcnJheShjb29yZGluYXRlczogQXJyYXk8W251bWJlciwgbnVtYmVyXT4pIHtcbiAgICByZXR1cm4gY29vcmRpbmF0ZXMubWFwKChbbG9uLCBsYXRdKSA9PiBbXG4gICAgICB0aGlzLndyYXBNYXBDb29yZGluYXRlcyhsb24sIFstMTgwLCAxODBdKSxcbiAgICAgIHRoaXMud3JhcE1hcENvb3JkaW5hdGVzKGxhdCwgWy05MCwgOTBdKSxcbiAgICBdKVxuICB9LFxufVxuZXhwb3J0IGRlZmF1bHQgQ29tbW9uXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/Common.spec.d.ts b/src/main/webapp/js/Common.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/Common.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/Common.spec.js b/src/main/webapp/js/Common.spec.js new file mode 100644 index 00000000000..8a9aa216242 --- /dev/null +++ b/src/main/webapp/js/Common.spec.js @@ -0,0 +1,89 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import Common from './Common'; +describe('Common', function () { + describe('wrapMapCoordinates', function () { + it('overflow +1/-1', function () { + expect(Common.wrapMapCoordinates(181, [-180, 180])).to.equal(-179); + expect(Common.wrapMapCoordinates(-181, [-180, 180])).to.equal(179); + }); + it('overflow +/-a lot', function () { + expect(Common.wrapMapCoordinates(64.25 + 180 * 7, [-180, 180])).to.equal(-180 + 64.25); + expect(Common.wrapMapCoordinates(-64.25 - 180 * 7, [-180, 180])).to.equal(180 - 64.25); + }); + it('no overflow mid', function () { + expect(Common.wrapMapCoordinates(-179, [-180, 180])).to.equal(-179); + expect(Common.wrapMapCoordinates(179, [-180, 180])).to.equal(179); + expect(Common.wrapMapCoordinates(0, [-180, 180])).to.equal(0); + expect(Common.wrapMapCoordinates(5, [-180, 180])).to.equal(5); + expect(Common.wrapMapCoordinates(-15, [-180, 180])).to.equal(-15); + }); + it('max should map to min', function () { + expect(Common.wrapMapCoordinates(180, [-180, 180])).to.equal(-180); + }); + it('min should remain min', function () { + expect(Common.wrapMapCoordinates(-180, [-180, 180])).to.equal(-180); + }); + }); + describe('wrapMapCoordinatesArray', function () { + it('wraps as expected', function () { + var coordinates = [ + [-181, -91], + [181, 91], + [0, 0], + ]; + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number[][]' is not assignable to... Remove this comment to see the full error message + var results = Common.wrapMapCoordinatesArray(coordinates); + expect(results[0][0]).to.equal(179); + expect(results[0][1]).to.equal(89); + expect(results[1][0]).to.equal(-179); + expect(results[1][1]).to.equal(-89); + expect(results[2][0]).to.equal(0); + expect(results[2][1]).to.equal(0); + expect(results.length).to.equal(3); + }); + }); + describe('getImageSrc', function () { + it('prepends data:image to null', function () { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'null' is not assignable to param... Remove this comment to see the full error message + var image = Common.getImageSrc(null); + expect(image).to.equal('data:image/png;base64,null'); + }); + it('prepends data:image to undefined', function () { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'undefined' is not assignable to ... Remove this comment to see the full error message + var image = Common.getImageSrc(undefined); + expect(image).to.equal('data:image/png;base64,undefined'); + }); + it('prepends data:image to non-empty and non-http string', function () { + var image = Common.getImageSrc('iVBORw0KGgoAAAANSUhEUgAABkAAAAH'); + expect(image).to.equal('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABkAAAAH'); + }); + it('prepends data:image to non-string value', function () { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number' is not assignable to par... Remove this comment to see the full error message + var image = Common.getImageSrc(123456789); + expect(image).to.equal('data:image/png;base64,123456789'); + }); + it('returns url with cache bust', function () { + var image = Common.getImageSrc('http://some.url/cx.png'); + expect(image.includes('?_=')).to.equal(true); + }); + it('returns empty string unchanged', function () { + var image = Common.getImageSrc(''); + expect(image).to.equal(''); + }); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tbW9uLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvQ29tbW9uLnNwZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxNQUFNLENBQUE7QUFDN0IsT0FBTyxNQUFNLE1BQU0sVUFBVSxDQUFBO0FBRTdCLFFBQVEsQ0FBQyxRQUFRLEVBQUU7SUFDakIsUUFBUSxDQUFDLG9CQUFvQixFQUFFO1FBQzdCLEVBQUUsQ0FBQyxnQkFBZ0IsRUFBRTtZQUNuQixNQUFNLENBQUMsTUFBTSxDQUFDLGtCQUFrQixDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUMsR0FBRyxFQUFFLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsS0FBSyxDQUFDLENBQUMsR0FBRyxDQUFD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BpbWFnZSA9IENvbW1vbi5nZXRJbWFnZVNyYygnJylcbiAgICAgIGV4cGVjdChpbWFnZSkudG8uZXF1YWwoJycpXG4gICAgfSlcbiAgfSlcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/DistanceUtils.d.ts b/src/main/webapp/js/DistanceUtils.d.ts new file mode 100644 index 00000000000..cb584767f06 --- /dev/null +++ b/src/main/webapp/js/DistanceUtils.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +type UnitsType = 'kilometers' | 'feet' | 'yards' | 'miles' | 'nautical miles' | 'meters'; +export declare const DistanceUtils: { + distToDegrees(distanceInMeters: number): number; + distToRadians(distanceInMeters: number): number; + toDegrees(distanceInRadians: number): number; + getDistanceInMeters(distance: number, units: UnitsType): number; + getDistanceFromMeters(distance: number, units: UnitsType): number; + altitudeRound(value: number): number; + coordinateRound(value: string | number): number; +}; +export default DistanceUtils; diff --git a/src/main/webapp/js/DistanceUtils.js b/src/main/webapp/js/DistanceUtils.js new file mode 100644 index 00000000000..39c107a229c --- /dev/null +++ b/src/main/webapp/js/DistanceUtils.js @@ -0,0 +1,83 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/*jshint bitwise: false*/ +var EARTH_MEAN_RADIUS_METERS = 6371008.7714; +var DEGREES_TO_RADIANS = Math.PI / 180; +var RADIANS_TO_DEGREES = 1 / DEGREES_TO_RADIANS; +var METERS_KILOMETERS = 1000; +var METERS_FEET = 0.3048; +var METERS_YARDS = 0.9144; +var METERS_MILES = 1609.344; +var METERS_NAUTICAL_MILES = 1852; +/* 6 Digits of precision used because it gives precision up to +0.11 meters, which was deemed precise enough for any use case +of application */ +var DECIMAL_PRECISION = 6; +export var DistanceUtils = { + distToDegrees: function (distanceInMeters) { + return this.toDegrees(this.distToRadians(distanceInMeters)); + }, + distToRadians: function (distanceInMeters) { + return distanceInMeters / EARTH_MEAN_RADIUS_METERS; + }, + toDegrees: function (distanceInRadians) { + return distanceInRadians * RADIANS_TO_DEGREES; + }, + getDistanceInMeters: function (distance, units) { + distance = distance || 0; + switch (units) { + case 'kilometers': + return distance * METERS_KILOMETERS; + case 'feet': + return distance * METERS_FEET; + case 'yards': + return distance * METERS_YARDS; + case 'miles': + return distance * METERS_MILES; + case 'nautical miles': + return distance * METERS_NAUTICAL_MILES; + case 'meters': + default: + return Number(distance); + } + }, + getDistanceFromMeters: function (distance, units) { + distance = distance || 0; + switch (units) { + case 'kilometers': + return distance / METERS_KILOMETERS; + case 'feet': + return distance / METERS_FEET; + case 'yards': + return distance / METERS_YARDS; + case 'miles': + return distance / METERS_MILES; + case 'nautical miles': + return distance / METERS_NAUTICAL_MILES; + case 'meters': + default: + return distance; + } + }, + altitudeRound: function (value) { + // round the value, don't need picometer precision. + return Math.round(value); + }, + coordinateRound: function (value) { + return parseFloat(parseFloat(value.toString()).toFixed(DECIMAL_PRECISION)); + }, +}; +export default DistanceUtils; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGlzdGFuY2VVdGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3N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wb3J0IGRlZmF1bHQgRGlzdGFuY2VVdGlsc1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/Entry.d.ts b/src/main/webapp/js/Entry.d.ts new file mode 100644 index 00000000000..3f4842d0933 --- /dev/null +++ b/src/main/webapp/js/Entry.d.ts @@ -0,0 +1,4 @@ +import '../js/ApplicationSetup'; +import { ExtensionPointsType } from '../extension-points'; +declare const entry: (extensionPoints?: Partial, startFunction?: Function) => void; +export default entry; diff --git a/src/main/webapp/js/Entry.js b/src/main/webapp/js/Entry.js new file mode 100644 index 00000000000..b2419f645ff --- /dev/null +++ b/src/main/webapp/js/Entry.js @@ -0,0 +1,39 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/** + * ApplicationSetup needs to happen first. + * This ensures styles are applied correctly, + * because some of our styles have the same specificity as vendor + * styles. + */ +; +(function verifyFirstImport() { + if (document.querySelector('[data-styled-components]')) { + var firstImportErrorMessage = "The entry import has to be the first (top) import for your application, otherwise styles won't be applied properly.\n If you're seeing this, it probably means you need to move your import of the Entry file to the top of whatever file it's in.\n "; + alert(firstImportErrorMessage); + throw Error(firstImportErrorMessage); + } +})(); +import '../js/ApplicationSetup'; +import ExtensionPoints from '../extension-points'; +import { attemptToStart } from './ApplicationStart'; +var entry = function (extensionPoints, startFunction) { + if (extensionPoints === void 0) { extensionPoints = {}; } + if (startFunction === void 0) { startFunction = attemptToStart; } + Object.assign(ExtensionPoints, extensionPoints); + startFunction(); +}; +export default entry; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW50cnkuanMiLC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Rpb24oKVxufVxuXG5leHBvcnQgZGVmYXVsdCBlbnRyeVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/Environment.d.ts b/src/main/webapp/js/Environment.d.ts new file mode 100644 index 00000000000..b7415a90b88 --- /dev/null +++ b/src/main/webapp/js/Environment.d.ts @@ -0,0 +1,6 @@ +export declare const Environment: { + isTest(): boolean; + commitHash: any; + isDirty: any; + commitDate: any; +}; diff --git a/src/main/webapp/js/Environment.js b/src/main/webapp/js/Environment.js new file mode 100644 index 00000000000..e07fa7840a2 --- /dev/null +++ b/src/main/webapp/js/Environment.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__ENV__'. +console.info(__ENV__); // moving this here as it's useful to see at least once +export var Environment = { + isTest: function () { + // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__ENV__'. + return __ENV__ === 'test'; + }, + // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__COMMIT_HASH__'. + commitHash: __COMMIT_HASH__, + // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__IS_DIRTY__'. + isDirty: __IS_DIRTY__, + // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__COMMIT_DATE__'. + commitDate: __COMMIT_DATE__, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW52aXJvbm1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvan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gLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDIzMDQpIEZJWE1FOiBDYW5ub3QgZmluZCBuYW1lICdfX0NPTU1JVF9EQVRFX18nLlxuICBjb21taXREYXRlOiBfX0NPTU1JVF9EQVRFX18sXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/IconHelper.d.ts b/src/main/webapp/js/IconHelper.d.ts new file mode 100644 index 00000000000..02d0b4370f0 --- /dev/null +++ b/src/main/webapp/js/IconHelper.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { LazyQueryResult } from './model/LazyQueryResult/LazyQueryResult'; +declare const _default_1: { + getClassByMetacardObject(metacard: LazyQueryResult['plain']): string; + getFullByMetacardObject(metacard: LazyQueryResult['plain']): { + class: string; + style: { + code: string; + font: string; + size: string; + }; + }; + getClassByName(name: string): string; +}; +export default _default_1; diff --git a/src/main/webapp/js/IconHelper.js b/src/main/webapp/js/IconHelper.js new file mode 100644 index 00000000000..ecad71ace4b --- /dev/null +++ b/src/main/webapp/js/IconHelper.js @@ -0,0 +1,118 @@ +import _get from 'lodash/get'; +import { StartupDataStore } from './model/Startup/startup'; +var _map = Object.keys(StartupDataStore.Configuration.getIconConfig()).reduce(function (totalIconMap, iconConfigKey) { + var iconProp = StartupDataStore.Configuration.getIconConfig()[iconConfigKey]; + totalIconMap[iconConfigKey] = { + class: iconProp.className, + style: { + code: iconProp.code, + font: iconProp.font, + size: iconProp.size, + }, + }; + return totalIconMap; +}, {}); +/* Maps top-level mime type category names to the closest icon. */ +var _mimeMap = { + application: _map.document, + audio: _map.sound, + example: _map.default, + font: _map.document, + image: _map.image, + message: _map.document, + model: _map.dataset, + multipart: _map.collection, + text: _map.text, + video: _map.video, +}; +/* This is the default icon that will be used if a Metacard cannot be + mapped to an icon. Set default attributes to empty strings for no icon. */ +var _default = _map.default; +/* Remove resource keyword from datatype and covert to lowercase. */ +function _formatAttribute(attr) { + if (attr !== undefined) { + return attr.toLowerCase().replace(' resource', ''); + } + return attr; +} +/* Checks if the attribute value exists in the icon map. */ +function _iconExistsInMap(attr, map) { + if (Array.isArray(attr)) { + attr = attr[0]; + } + if (attr !== undefined && + attr.length > 0 && + map.hasOwnProperty(_formatAttribute(attr))) { + return true; + } + else { + return false; + } +} +/* Find the correct icon based on various Metacard attributes. */ +function _deriveIconByMetacardObject(metacard) { + var prop, dataTypes, metacardType, mimeType, contentType, icon = _default; + prop = metacard.metacard.properties; + dataTypes = prop.datatype; + metacardType = _formatAttribute(prop['metacard-type']); + mimeType = _formatAttribute(prop['media.type']); + contentType = _formatAttribute(prop['metadata-content-type']); + if (mimeType !== undefined) { + var mime_1 = mimeType.split('/'); + if (mime_1 && mime_1.length === 2) { + mimeType = mime_1[0]; + } + } + if (_iconExistsInMap(dataTypes, _map)) { + icon = _get(_map, _formatAttribute(dataTypes[0]), _default); + } + else if (_iconExistsInMap(metacardType, _map)) { + icon = _get(_map, metacardType, _default); + } + else if (_iconExistsInMap(contentType, _map)) { + icon = _get(_map, contentType, _default); + } + else if (_iconExistsInMap(mimeType, _mimeMap)) { + icon = _get(_mimeMap, mimeType, _default); + } + if (metacardType === 'metacard.query') { + return { + class: 'fa fa-search', + style: { + code: 'f002', + font: 'FontAwesome', + size: '12px', + }, + }; + } + if (!icon) { + return { + class: 'fa fa-question', + style: { + code: 'f128', + font: 'FontAwesome', + size: '12px', + }, + }; + } + return icon; +} +/* Find the correct icon by icon name. */ +function _deriveIconByName(name) { + return _get(_map, _formatAttribute(name), _default); +} +export default { + getClassByMetacardObject: function (metacard) { + var i = _deriveIconByMetacardObject(metacard); + return _get(i, 'class', _default.class); + }, + getFullByMetacardObject: function (metacard) { + var i = _deriveIconByMetacardObject(metacard); + return i !== undefined ? i : _default; + }, + getClassByName: function (name) { + var i = _deriveIconByName(name); + return _get(i, 'class', _default === null || _default === void 0 ? void 0 : _default.class); + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSWNvbkhlbHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9JY29uSGVscGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQkEsT0FBTyxJQUFJLE1BQU0sWUFBWSxDQUFBO0FBQzdCLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBRTFELElBQU0sSUFBSSxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsYUFBYSxDQUFDLGFBQWEsRUFBRSxDQUFDLENBQUMsTUFBTSxDQUM3RSxVQUFDLFlBQVksRUFBRSxhQUFhO0lBQzFCLElBQU0sUUFBUSxHQUNaLGdCQUFnQixDQUFDLGFBQWEsQ0FBQyxhQUFhLEVBQUUsQ0FBQyxhQUFhLENBQUMsQ0FBQTtJQUMvRCxZQUFZLENBQUMsYUFBYSxDQUFDLEdBQUc7UUFDNUIsS0FBSyxFQUFFLFFBQVEsQ0FBQyxTQUFTO1FBQ3pCLEtBQUssRUFBRTtZQUNMLElBQUksRUFBRSxRQUFRLENBQUMsSUFBSTtZQUNuQixJQUFJLEVBQUUsUUFBUSxDQUFDLElBQUk7WUFDbkIsSUFBSSxFQUFFLFFBQVEsQ0FBQyxJQUFJO1NBQ3BCO0tBQ0YsQ0FBQTtJQUNELE9BQU8sWUFBWSxDQUFBO0FBQ3JCLENBQUMsRUFDRCxFQVNDLENBQ0YsQ0FBQT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ICAgY29uc3QgaSA9IF9kZXJpdmVJY29uQnlNZXRhY2FyZE9iamVjdChtZXRhY2FyZClcbiAgICByZXR1cm4gX2dldChpLCAnY2xhc3MnLCBfZGVmYXVsdC5jbGFzcylcbiAgfSxcbiAgZ2V0RnVsbEJ5TWV0YWNhcmRPYmplY3QobWV0YWNhcmQ6IExhenlRdWVyeVJlc3VsdFsncGxhaW4nXSkge1xuICAgIGNvbnN0IGkgPSBfZGVyaXZlSWNvbkJ5TWV0YWNhcmRPYmplY3QobWV0YWNhcmQpXG4gICAgcmV0dXJuIGkgIT09IHVuZGVmaW5lZCA/IGkgOiBfZGVmYXVsdFxuICB9LFxuICBnZXRDbGFzc0J5TmFtZShuYW1lOiBzdHJpbmcpIHtcbiAgICBjb25zdCBpID0gX2Rlcml2ZUljb25CeU5hbWUobmFtZSlcbiAgICByZXR1cm4gX2dldChpLCAnY2xhc3MnLCBfZGVmYXVsdD8uY2xhc3MpXG4gIH0sXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/OpenLayersGeometryUtils.d.ts b/src/main/webapp/js/OpenLayersGeometryUtils.d.ts new file mode 100644 index 00000000000..1f95b98c0b0 --- /dev/null +++ b/src/main/webapp/js/OpenLayersGeometryUtils.d.ts @@ -0,0 +1,18 @@ +import ol from 'openlayers'; +type CoordinateType = Array; +type PointType = Array; +type GeometryType = { + getType: () => 'LineString' | 'Polygon' | 'Circle'; + getCoordinates: () => CoordinateType; + getCenter: () => any; + setCoordinates: (coords: CoordinateType) => void; + setCenter: (cords: CoordinateType) => void; +}; +export declare const OpenLayersGeometryUtils: { + getCoordinatesFromGeometry: (geometry: GeometryType) => any; + setCoordinatesForGeometry: (geometry: GeometryType, coordinates: CoordinateType) => void; + mapCoordinateToLonLat: (point: PointType) => ol.Coordinate; + lonLatToMapCoordinate: (point: PointType) => ol.Coordinate; + wrapCoordinatesFromGeometry: (geometry: GeometryType) => GeometryType; +}; +export default OpenLayersGeometryUtils; diff --git a/src/main/webapp/js/OpenLayersGeometryUtils.js b/src/main/webapp/js/OpenLayersGeometryUtils.js new file mode 100644 index 00000000000..412398a721e --- /dev/null +++ b/src/main/webapp/js/OpenLayersGeometryUtils.js @@ -0,0 +1,63 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Common from './Common'; +/*jshint esversion: 6, bitwise: false*/ +import ol from 'openlayers'; +import { StartupDataStore } from './model/Startup/startup'; +export var OpenLayersGeometryUtils = { + getCoordinatesFromGeometry: function (geometry) { + var type = geometry.getType(); + switch (type) { + case 'LineString': + return geometry.getCoordinates(); + case 'Polygon': + return geometry.getCoordinates()[0]; + case 'Circle': + return [geometry.getCenter()]; + default: + return []; + } + }, + setCoordinatesForGeometry: function (geometry, coordinates) { + var type = geometry.getType(); + switch (type) { + case 'LineString': + geometry.setCoordinates(coordinates); + break; + case 'Polygon': + geometry.setCoordinates([coordinates]); + break; + case 'Circle': + geometry.setCenter(coordinates[0]); + break; + default: + break; + } + }, + mapCoordinateToLonLat: function (point) { + return ol.proj.transform(point, StartupDataStore.Configuration.getProjection(), 'EPSG:4326'); + }, + lonLatToMapCoordinate: function (point) { + return ol.proj.transform(point, 'EPSG:4326', StartupDataStore.Configuration.getProjection()); + }, + wrapCoordinatesFromGeometry: function (geometry) { + var coordinates = OpenLayersGeometryUtils.getCoordinatesFromGeometry(geometry).map(OpenLayersGeometryUtils.mapCoordinateToLonLat); + coordinates = Common.wrapMapCoordinatesArray(coordinates).map(OpenLayersGeometryUtils.lonLatToMapCoordinate); + OpenLayersGeometryUtils.setCoordinatesForGeometry(geometry, coordinates); + return geometry; + }, +}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nksXG4gICAgICAnRVBTRzo0MzI2JyxcbiAgICAgIFN0YXJ0dXBEYXRhU3RvcmUuQ29uZmlndXJhdGlvbi5nZXRQcm9qZWN0aW9uKClcbiAgICApLFxuICB3cmFwQ29vcmRpbmF0ZXNGcm9tR2VvbWV0cnk6IChnZW9tZXRyeTogR2VvbWV0cnlUeXBlKSA9PiB7XG4gICAgbGV0IGNvb3JkaW5hdGVzID0gT3BlbkxheWVyc0dlb21ldHJ5VXRpbHMuZ2V0Q29vcmRpbmF0ZXNGcm9tR2VvbWV0cnkoXG4gICAgICBnZW9tZXRyeVxuICAgICkubWFwKE9wZW5MYXllcnNHZW9tZXRyeVV0aWxzLm1hcENvb3JkaW5hdGVUb0xvbkxhdClcbiAgICBjb29yZGluYXRlcyA9IENvbW1vbi53cmFwTWFwQ29vcmRpbmF0ZXNBcnJheShjb29yZGluYXRlcykubWFwKFxuICAgICAgT3BlbkxheWVyc0dlb21ldHJ5VXRpbHMubG9uTGF0VG9NYXBDb29yZGluYXRlXG4gICAgKVxuICAgIE9wZW5MYXllcnNHZW9tZXRyeVV0aWxzLnNldENvb3JkaW5hdGVzRm9yR2VvbWV0cnkoZ2VvbWV0cnksIGNvb3JkaW5hdGVzKVxuICAgIHJldHVybiBnZW9tZXRyeVxuICB9LFxufVxuZXhwb3J0IGRlZmF1bHQgT3BlbkxheWVyc0dlb21ldHJ5VXRpbHNcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/OpenLayersGeometryUtils.spec.d.ts b/src/main/webapp/js/OpenLayersGeometryUtils.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/OpenLayersGeometryUtils.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/OpenLayersGeometryUtils.spec.js b/src/main/webapp/js/OpenLayersGeometryUtils.spec.js new file mode 100644 index 00000000000..942a66d9a32 --- /dev/null +++ b/src/main/webapp/js/OpenLayersGeometryUtils.spec.js @@ -0,0 +1,118 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'sino... Remove this comment to see the full error message +import sinon from 'sinon'; +import { mock as mockJquery, unmock as unmockJquery, } from '../test/mock-api/mock-jquery'; +import { mock as mockProperties, unmock as unmockProperties, } from '../test/mock-api/mock-properties'; +import olUtils from './OpenLayersGeometryUtils'; +describe('Common', function () { + before(function () { + mockJquery(); + mockProperties(); + }); + after(function () { + unmockJquery(); + unmockProperties(); + }); + describe('wrapCoordinatesFromGeometry', function () { + var MockGeometry = /** @class */ (function () { + function MockGeometry(props) { + this.props = props; + } + MockGeometry.prototype.getType = function () { + return this.props.type; + }; + MockGeometry.prototype.getCoordinates = function () { + return this.props.coordinates; + }; + MockGeometry.prototype.getCenter = function () { + return this.props.center; + }; + MockGeometry.prototype.setCenter = function () { + throw new Error(); + }; + MockGeometry.prototype.setCoordinates = function () { + throw new Error(); + }; + return MockGeometry; + }()); + var sandbox = sinon.createSandbox(); + afterEach(function () { + sandbox.restore(); + }); + it('LineString wraps coordinates', function () { + var coordinates = [ + [210, 50], + [0, 0], + [-240, -15], + ].map(olUtils.lonLatToMapCoordinate); + var line = new MockGeometry({ + type: 'LineString', + coordinates: coordinates, + }); + var stub = sandbox.stub(line, 'setCoordinates'); + olUtils.wrapCoordinatesFromGeometry(line); + var calls = stub.getCalls(); + var results = calls[0].args[0].map(olUtils.mapCoordinateToLonLat); + expect(results[0][0]).to.be.closeTo(-150, 0.001); + expect(results[0][1]).to.be.closeTo(50, 0.001); + expect(results[1][0]).to.be.closeTo(-0, 0.001); + expect(results[1][1]).to.be.closeTo(0, 0.001); + expect(results[2][0]).to.be.closeTo(120, 0.001); + expect(results[2][1]).to.be.closeTo(-15, 0.001); + expect(results.length).to.equal(3); + }); + it('Polygon wraps coordinates', function () { + var coordinates = [ + [210, 50], + [0, 0], + [-240, -15], + [210, 50], + ].map(olUtils.lonLatToMapCoordinate); + var line = new MockGeometry({ + type: 'Polygon', + coordinates: [coordinates], + }); + var stub = sandbox.stub(line, 'setCoordinates'); + olUtils.wrapCoordinatesFromGeometry(line); + var calls = stub.getCalls(); + var results = calls[0].args[0][0].map(olUtils.mapCoordinateToLonLat); + expect(results[0][0]).to.be.closeTo(-150, 0.001); + expect(results[0][1]).to.be.closeTo(50, 0.001); + expect(results[1][0]).to.be.closeTo(-0, 0.001); + expect(results[1][1]).to.be.closeTo(0, 0.001); + expect(results[2][0]).to.be.closeTo(120, 0.001); + expect(results[2][1]).to.be.closeTo(-15, 0.001); + expect(results[3][0]).to.equal(results[0][0]); + expect(results[3][1]).to.equal(results[0][1]); + expect(results.length).to.equal(4); + }); + it('Circle wraps coordinates', function () { + var coordinates = olUtils.lonLatToMapCoordinate([210, 50]); + var line = new MockGeometry({ + type: 'Circle', + center: coordinates, + }); + var stub = sandbox.stub(line, 'setCenter'); + olUtils.wrapCoordinatesFromGeometry(line); + var calls = stub.getCalls(); + var results = olUtils.mapCoordinateToLonLat(calls[0].args[0]); + expect(results[0]).to.be.closeTo(-150, 0.001); + expect(results[1]).to.be.closeTo(50, 0.001); + }); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3BlbkxheWVyc0dlb21ldHJ5VXRpbHMuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9PcGVuTGF5ZXJzR2VvbWV0cnlVdGlscy5zcGVjLnRzIl0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cHM6IGFueVxuICAgICAgY29uc3RydWN0b3IocHJvcHM6IGFueSkge1xuICAgICAgICB0aGlzLnByb3BzID0gcHJvcHNcbiAgICAgIH1cbiAgICAgIGdldFR5cGUoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByb3BzLnR5cGVcbiAgICAgIH1cbiAgICAgIGdldENvb3JkaW5hdGVzKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5jb29yZGluYXRlc1xuICAgICAgfVxuICAgICAgZ2V0Q2VudGVyKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5jZW50ZXJcbiAgICAgIH1cbiAgICAgIHNldENlbnRlcigpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKClcbiAgICAgIH1cbiAgICAgIHNldENvb3JkaW5hdGVzKCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoKVxuICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBzYW5kYm94ID0gc2lub24uY3JlYXRlU2FuZGJveCgpXG4gICAgYWZ0ZXJFYWNoKCgpID0+IHtcbiAgICAgIHNhbmRib3gucmVzdG9yZSgpXG4gICAgfSlcbiAgICBpdCgnTGluZVN0cmluZyB3cmFwcyBjb29yZGluYXRlcycsICgpID0+IHtcbiAgICAgIGNvbnN0IGNvb3JkaW5hdGVzID0gW1xuICAgICAgICBbMjEwLCA1MF0sXG4gICAgICAgIFswLCAwXSxcbiAgICAgICAgWy0yNDAsIC0xNV0sXG4gICAgICBdLm1hcChvbFV0aWxzLmxvbkxhdFRvTWFwQ29vcmRpbmF0ZSlcbiAgICAgIGNvbnN0IGxpbmUgPSBuZXcgTW9ja0dlb21ldHJ5KHtcbiAgICAgICAgdHlwZTogJ0xpbmVTdHJpbmcnLFxuICAgICAgICBjb29yZGluYXRlcyxcbiAgICAgIH0pXG4gICAgICBjb25zdCBzdHViID0gc2FuZGJveC5zdHViKGxpbmUsICdzZXRDb29yZGluYXRlcycpXG4gICAgICBvbFV0aWxz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ICAgY29uc3QgbGluZSA9IG5ldyBNb2NrR2VvbWV0cnkoe1xuICAgICAgICB0eXBlOiAnQ2lyY2xlJyxcbiAgICAgICAgY2VudGVyOiBjb29yZGluYXRlcyxcbiAgICAgIH0pXG4gICAgICBjb25zdCBzdHViID0gc2FuZGJveC5zdHViKGxpbmUsICdzZXRDZW50ZXInKVxuICAgICAgb2xVdGlscy53cmFwQ29vcmRpbmF0ZXNGcm9tR2VvbWV0cnkobGluZSlcbiAgICAgIGNvbnN0IGNhbGxzID0gc3R1Yi5nZXRDYWxscygpXG4gICAgICBjb25zdCByZXN1bHRzID0gb2xVdGlscy5tYXBDb29yZGluYXRlVG9Mb25MYXQoY2FsbHNbMF0uYXJnc1swXSlcbiAgICAgIGV4cGVjdChyZXN1bHRzWzBdKS50by5iZS5jbG9zZVRvKC0xNTAsIDAuMDAxKVxuICAgICAgZXhwZWN0KHJlc3VsdHNbMV0pLnRvLmJlLmNsb3NlVG8oNTAsIDAuMDAxKVxuICAgIH0pXG4gIH0pXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/Positioning.d.ts b/src/main/webapp/js/Positioning.d.ts new file mode 100644 index 00000000000..d75c41ee7ae --- /dev/null +++ b/src/main/webapp/js/Positioning.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: { + isEffectivelyHidden(element: any): any; +}; +export default _default; diff --git a/src/main/webapp/js/Positioning.js b/src/main/webapp/js/Positioning.js new file mode 100644 index 00000000000..1b628568cc0 --- /dev/null +++ b/src/main/webapp/js/Positioning.js @@ -0,0 +1,40 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +var zeroScale = 'matrix(0, 0, 0, 0, 0, 0)'; +var zeroOpacity = '0'; +var notDisplayed = 'none'; +export default { + // @ts-expect-error ts-migrate(7023) FIXME: 'isEffectivelyHidden' implicitly has return type '... Remove this comment to see the full error message + isEffectivelyHidden: function (element) { + if (element === document) { + return false; + } + else if (element === null) { + return true; + } + else { + var computedStyle = window.getComputedStyle(element); + if (computedStyle.transform === zeroScale || + computedStyle.opacity === zeroOpacity || + computedStyle.display === notDisplayed) { + return true; + } + else { + return this.isEffectivelyHidden(element.parentNode); + } + } + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9zaXRpb25pbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvUG9zaXRpb25pbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUVKLElBQU0sU0FBUyxHQUFHLDBCQUEwQixDQUFBO0FBQzVDLElBQU0sV0FBVyxHQUFHLEdBQUcsQ0FBQTtBQUN2QixJQUFNLFlBQVksR0FBRyxNQUFNLENBQUE7QUFFM0IsZUFBZTtJQUNiLG1KQUFtSjtJQUNuSixtQkFBbUIsWUFBQyxPQUFZO1FBQzlCLElBQUksT0FBTyxLQUFLLFFBQVEsRUFBRTtZQUN4QixPQUFPLEtBQUssQ0FBQTtTQUNiO2FBQU0sSUFBSS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zZm9ybSA9PT0gemVyb1NjYWxlIHx8XG4gICAgICAgIGNvbXB1dGVkU3R5bGUub3BhY2l0eSA9PT0gemVyb09wYWNpdHkgfHxcbiAgICAgICAgY29tcHV0ZWRTdHlsZS5kaXNwbGF5ID09PSBub3REaXNwbGF5ZWRcbiAgICAgICkge1xuICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuaXNFZmZlY3RpdmVseUhpZGRlbihlbGVtZW50LnBhcmVudE5vZGUpXG4gICAgICB9XG4gICAgfVxuICB9LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/ShapeUtils.d.ts b/src/main/webapp/js/ShapeUtils.d.ts new file mode 100644 index 00000000000..53f2a46288e --- /dev/null +++ b/src/main/webapp/js/ShapeUtils.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare const _default: { + isArray3D(values: any): any; +}; +export default _default; diff --git a/src/main/webapp/js/ShapeUtils.js b/src/main/webapp/js/ShapeUtils.js new file mode 100644 index 00000000000..374759ed9fc --- /dev/null +++ b/src/main/webapp/js/ShapeUtils.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export default { + isArray3D: function (values) { + return values && values[0] && Array.isArray(values[0][0]); + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2hhcGVVdGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9TaGFwZVV0aWxzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBRUosZUFBZTtJQUNiLFNBQVMsWUFBQyxNQUFXO1FBQ25CLE9BQU8sTUFBTSxJQUFJLE1BQU0sQ0FBQyxDQUFDLENBQUMsSUFBSSxLQUFLLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQzNELENBQUM7Q0FDRixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgaXNBcnJheTNEKHZhbHVlczogYW55KSB7XG4gICAgcmV0dXJuIHZhbHVlcyAmJiB2YWx1ZXNbMF0gJiYgQXJyYXkuaXNBcnJheSh2YWx1ZXNbMF1bMF0pXG4gIH0sXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/WaitForReady.d.ts b/src/main/webapp/js/WaitForReady.d.ts new file mode 100644 index 00000000000..610a5f7160b --- /dev/null +++ b/src/main/webapp/js/WaitForReady.d.ts @@ -0,0 +1 @@ +export declare const waitForReady: () => Promise; diff --git a/src/main/webapp/js/WaitForReady.js b/src/main/webapp/js/WaitForReady.js new file mode 100644 index 00000000000..60069207cac --- /dev/null +++ b/src/main/webapp/js/WaitForReady.js @@ -0,0 +1,34 @@ +import { __awaiter, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { StartupDataStore } from '../js/model/Startup/startup'; +function sleep(ms) { + if (ms === void 0) { ms = 60; } + return new Promise(function (resolve) { return setTimeout(resolve, ms); }); +} +export var waitForReady = function () { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!!StartupDataStore.Configuration.config) return [3 /*break*/, 2]; + return [4 /*yield*/, sleep()]; + case 1: + _a.sent(); + return [2 /*return*/, waitForReady()]; + case 2: return [2 /*return*/]; + } + }); +}); }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2FpdEZvclJlYWR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL1dhaXRGb3JSZWFkeS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQTtBQUU5RCxTQUFTLEtBQUssQ0FBQyxFQUFlO0lBQWYsbUJBQUEsRUFBQSxPQUFlO0lBQzVCLE9BQU8sSUFBSSxPQUFPLENBQUMsVUFBQyxPQUFPLElBQUssT0FBQSxVQUFVLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxFQUF2QixDQUF1QixDQUFDLENBQUE7QUFDMUQsQ0FBQztBQUVELE1BQU0sQ0FBQyxJQUFNLFlBQVksR0FBd0I7Ozs7cUJBQzNDLENBQUMsZ0JBQWdCLENBQUMsYUFBYSxDQUFDLE1BQU0sRUFBdEMsd0JBQXNDO2dCQUN4QyxxQkFBTSxLQUFLLEVBQUUsRUFBQTs7Z0JBQWIsU0FBYSxDQUFBO2dCQUNiLHNCQUFPLFlBQVksRU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FydHVwL3N0YXJ0dXAnXG5cbmZ1bmN0aW9uIHNsZWVwKG1zOiBudW1iZXIgPSA2MCkge1xuICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNldFRpbWVvdXQocmVzb2x2ZSwgbXMpKVxufVxuXG5leHBvcnQgY29uc3Qgd2FpdEZvclJlYWR5OiAoKSA9PiBQcm9taXNlPHZvaWQ+ID0gYXN5bmMgKCkgPT4ge1xuICBpZiAoIVN0YXJ0dXBEYXRhU3RvcmUuQ29uZmlndXJhdGlvbi5jb25maWcpIHtcbiAgICBhd2FpdCBzbGVlcCgpXG4gICAgcmV0dXJuIHdhaXRGb3JSZWFkeSgpXG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/cache-bust-url.d.ts b/src/main/webapp/js/cache-bust-url.d.ts new file mode 100644 index 00000000000..357cb1c3626 --- /dev/null +++ b/src/main/webapp/js/cache-bust-url.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export declare function cacheBustUrl(url: string): string; diff --git a/src/main/webapp/js/cache-bust-url.js b/src/main/webapp/js/cache-bust-url.js new file mode 100644 index 00000000000..6f98ea741f6 --- /dev/null +++ b/src/main/webapp/js/cache-bust-url.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export function cacheBustUrl(url) { + if (url && url.indexOf('_=') === -1) { + var newUrl = url; + if (url.indexOf('?') >= 0) { + newUrl += '&'; + } + else { + newUrl += '?'; + } + newUrl += '_=' + Date.now(); + return newUrl; + } + return url; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGUtYnVzdC11cmwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvY2FjaGUtYnVzdC11cmwudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixNQUFNLFVBQVUsWUFBWSxDQUFDLEdBQVc7SUFDdEMsSUFBSSxHQUFHLElBQUksR0FBRyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsRUFBRTtRQUNuQyxJQUFJLE1BQU0sR0FBRyxHQUFHLENBQUE7UUFDaEIsSUFBSSxHQUFHLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsRUFBRTtZQUN6QixNQUFNLElBQUksR0FBRyxDQUFBO1NBQ2Q7YUFBTTtZQUNMLE1BQU0sSUFBSSxHQUFHLENBQUE7U0FDZDtRQUNELE1BQU0sSUFBSSxJQUFJLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFBO1FBQzNCLE9BQU8sTUFBTSxDQUFBO0tBQ2Q7SUFDRCxPQUFPLEdBQUcsQ0FBQTtBQUNaLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6I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JyYnXG4gICAgfSBlbHNlIHtcbiAgICAgIG5ld1VybCArPSAnPydcbiAgICB9XG4gICAgbmV3VXJsICs9ICdfPScgKyBEYXRlLm5vdygpXG4gICAgcmV0dXJuIG5ld1VybFxuICB9XG4gIHJldHVybiB1cmxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/controllers/cesium.layer-ordering.d.ts b/src/main/webapp/js/controllers/cesium.layer-ordering.d.ts new file mode 100644 index 00000000000..c89e7273fe6 --- /dev/null +++ b/src/main/webapp/js/controllers/cesium.layer-ordering.d.ts @@ -0,0 +1,7 @@ +export declare function addLayer({ initialized: initializedLayerOrder, all: allLayerOrder, layer: layerId, }: any): any; +export declare function shiftLayers({ prev: previousLayerOrder, cur: currentLayerOrder, }: any): any; +export declare function getShift({ prev: previousLayerOrder, cur: currentLayerOrder, }: any): { + layer: any; + method: string; + count: number; +}; diff --git a/src/main/webapp/js/controllers/cesium.layer-ordering.js b/src/main/webapp/js/controllers/cesium.layer-ordering.js new file mode 100644 index 00000000000..f0bd3a402ce --- /dev/null +++ b/src/main/webapp/js/controllers/cesium.layer-ordering.js @@ -0,0 +1,71 @@ +import { __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { isEqual, intersection } from 'lodash'; +export function addLayer(_a) { + var initializedLayerOrder = _a.initialized, allLayerOrder = _a.all, layerId = _a.layer; + var initializedLayers = new Set(initializedLayerOrder); + var filtered = allLayerOrder.filter(function (id) { return initializedLayers.has(id); }); + if (filtered.length < initializedLayerOrder.length) { + throw new Error("addLayer: the set of all layers must be a superset of initialized layers"); + } + if (!isEqual(filtered, initializedLayerOrder)) { + throw new Error("addLayer: the two layer orders cannot have different orders"); + } + return allLayerOrder.filter(function (id) { return id === layerId || initializedLayers.has(id); }); +} +export function shiftLayers(_a) { + var previousLayerOrder = _a.prev, currentLayerOrder = _a.cur; + var previousLayers = new Set(previousLayerOrder); + return currentLayerOrder.filter(function (id) { return previousLayers.has(id); }); +} +export function getShift(_a) { + var previousLayerOrder = _a.prev, currentLayerOrder = _a.cur; + if (intersection(previousLayerOrder, currentLayerOrder).length !== + previousLayerOrder.length || + currentLayerOrder.length !== previousLayerOrder.length) { + throw new Error("getShift: arrays must contain the same ids"); + } + if (isEqual(previousLayerOrder, currentLayerOrder)) { + return { layer: previousLayerOrder[0], method: 'lower', count: 0 }; + } + var shiftLayerToIndex = function (_a) { + var layerOrder = _a.layerOrder, layerId = _a.layer, index = _a.index; + var layerIdRemoved = layerOrder.filter(function (id) { return id !== layerId; }); + return __spreadArray(__spreadArray(__spreadArray([], __read(layerIdRemoved.slice(0, index)), false), [ + layerId + ], false), __read(layerIdRemoved.slice(index)), false); + }; + var changedLayers = previousLayerOrder.filter(function (id, index) { return currentLayerOrder[index] !== id; }); + for (var i = 0; i < changedLayers.length; i++) { + var layer = changedLayers[i]; + var previousOrder = previousLayerOrder.indexOf(layer); + var currentOrder = currentLayerOrder.indexOf(layer); + var shiftLayer = shiftLayerToIndex({ + layerOrder: previousLayerOrder, + layer: layer, + index: currentOrder, + }); + if (isEqual(shiftLayer, currentLayerOrder)) { + return { + layer: layer, + method: currentOrder > previousOrder ? 'raise' : 'lower', + count: Math.abs(currentOrder - previousOrder), + }; + } + } + throw new Error("getShift: unable to find shift"); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VzaXVtLmxheWVyLW9yZGVyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViY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llcklkUmVtb3ZlZC5zbGljZSgwLCBpbmRleCksXG4gICAgICBsYXllcklkLFxuICAgICAgLi4ubGF5ZXJJZFJlbW92ZWQuc2xpY2UoaW5kZXgpLFxuICAgIF1cbiAgfVxuXG4gIGNvbnN0IGNoYW5nZWRMYXllcnMgPSBwcmV2aW91c0xheWVyT3JkZXIuZmlsdGVyKFxuICAgIChpZDogYW55LCBpbmRleDogYW55KSA9PiBjdXJyZW50TGF5ZXJPcmRlcltpbmRleF0gIT09IGlkXG4gIClcblxuICBmb3IgKGxldCBpID0gMDsgaSA8IGNoYW5nZWRMYXllcnMubGVuZ3RoOyBpKyspIHtcbiAgICBjb25zdCBsYXllciA9IGNoYW5nZWRMYXllcnNbaV1cbiAgICBjb25zdCBwcmV2aW91c09yZGVyID0gcHJldmlvdXNMYXllck9yZGVyLmluZGV4T2YobGF5ZXIpXG4gICAgY29uc3QgY3VycmVudE9yZGVyID0gY3VycmVudExheWVyT3JkZXIuaW5kZXhPZihsYXllcilcbiAgICBjb25zdCBzaGlmdExheWVyID0gc2hpZnRMYXllclRvSW5kZXgoe1xuICAgICAgbGF5ZXJPcmRlcjogcHJldmlvdXNMYXllck9yZGVyLFxuICAgICAgbGF5ZXIsXG4gICAgICBpbmRleDogY3VycmVudE9yZGVyLFxuICAgIH0pXG4gICAgaWYgKGlzRXF1YWwoc2hpZnRMYXllciwgY3VycmVudExheWVyT3JkZXIpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsYXllcixcbiAgICAgICAgbWV0aG9kOiBjdXJyZW50T3JkZXIgPiBwcmV2aW91c09yZGVyID8gJ3JhaXNlJyA6ICdsb3dlcicsIC8vIHJhaXNlIG1lYW5zIG1vdmUgdG8gaGlnaGVyIGluZGV4IDooXG4gICAgICAgIGNvdW50OiBNYXRoLmFicyhjdXJyZW50T3JkZXIgLSBwcmV2aW91c09yZGVyKSxcbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgdGhyb3cgbmV3IEVycm9yKGBnZXRTaGlmdDogdW5hYmxlIHRvIGZpbmQgc2hpZnRgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/controllers/cesium.layer-ordering.spec.d.ts b/src/main/webapp/js/controllers/cesium.layer-ordering.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/controllers/cesium.layer-ordering.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/controllers/cesium.layer-ordering.spec.js b/src/main/webapp/js/controllers/cesium.layer-ordering.spec.js new file mode 100644 index 00000000000..65cf9ae4852 --- /dev/null +++ b/src/main/webapp/js/controllers/cesium.layer-ordering.spec.js @@ -0,0 +1,175 @@ +var _this = this; +import { __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import { addLayer, shiftLayers, getShift } from './cesium.layer-ordering'; +describe('Cesium Layer Ordering', function () { + var checkOrdering = function (_a) { + var actual = _a.actual, expected = _a.expected; + return expect(actual).to.have.same.ordered.members(expected); + }; + describe('addLayer()', function () { + describe('Returns correct layer order when adding to:', function () { + var initialized = ['b', 'd']; + var all = ['a', 'b', 'c', 'd', 'e']; + var testData = [ + { test: 'beginning', layer: 'a', expectedOrder: ['a', 'b', 'd'] }, + { test: 'middle', layer: 'c', expectedOrder: ['b', 'c', 'd'] }, + { test: 'end', layer: 'e', expectedOrder: ['b', 'd', 'e'] }, + ]; + testData.forEach(function (_a) { + var test = _a.test, layer = _a.layer, expectedOrder = _a.expectedOrder; + it("".concat(test), function () { + var newLayerOrder = addLayer({ + initialized: initialized, + all: all, + layer: layer, + }); + checkOrdering({ actual: newLayerOrder, expected: expectedOrder }); + }); + }); + }); + it('Can add layer to empty ordering', function () { + var newLayerOrder = addLayer({ + initialized: [], + all: ['a', 'b', 'c', 'd', 'e'], + layer: 'a', + }); + checkOrdering({ actual: newLayerOrder, expected: ['a'] }); + }); + it('Does not duplicate an existing layer', function () { + var newLayerOrder = addLayer({ + initialized: ['a', 'c', 'd'], + all: ['a', 'b', 'c', 'd', 'e'], + layer: 'c', + }); + checkOrdering({ actual: newLayerOrder, expected: ['a', 'c', 'd'] }); + }); + it('Does not add a layer that does not exist', function () { + var newLayerOrder = addLayer({ + initialized: ['a', 'c', 'd'], + all: ['a', 'b', 'c', 'd', 'e'], + layer: 'g', + }); + checkOrdering({ actual: newLayerOrder, expected: ['a', 'c', 'd'] }); + }); + it('Throws the correct error when the passed in layer orders have different orders', function () { + expect(addLayer.bind(_this, { + initialized: ['d', 'a', 'b'], + all: ['a', 'b', 'c', 'd', 'e'], + layer: 'c', + })).to.throw(Error, 'addLayer: the two layer orders cannot have different orders'); + }); + it('Throws the correct error when the when the set of all layers is not a superset of the initialized layers', function () { + expect(addLayer.bind(_this, { + initialized: ['a', 'g', 'd'], + all: ['a', 'b', 'c', 'd', 'e'], + layer: 'c', + })).to.throw(Error, 'addLayer: the set of all layers must be a superset of initialized layers'); + }); + }); + describe('Shift Layers', function () { + var testData = [ + //shift from ['a', 'b', 'c', 'd', 'e'] + { test: 'from beginning to middle', cur: ['b', 'c', 'a', 'd', 'e'] }, + { test: 'from beginning to end', cur: ['b', 'c', 'd', 'e', 'a'] }, + { test: 'from middle to beginning', cur: ['c', 'a', 'b', 'd', 'e'] }, + { test: 'from middle to end', cur: ['a', 'b', 'd', 'e', 'c'] }, + { test: 'from middle leftwards', cur: ['a', 'c', 'b', 'd', 'e'] }, + { test: 'from middle rightwards', cur: ['a', 'b', 'd', 'c', 'e'] }, + { test: 'from end to middle', cur: ['a', 'b', 'e', 'c', 'd'] }, + { test: 'from end to beginning', cur: ['e', 'a', 'b', 'c', 'd'] }, + { test: 'no change in ordering', cur: ['a', 'b', 'c', 'd', 'e'] }, + ]; + describe('shiftLayers()', function () { + describe('All layers initialized', function () { + var prev = ['a', 'b', 'c', 'd', 'e']; + describe('Returns correct layer order for shifts:', function () { + testData.forEach(function (_a) { + var test = _a.test, cur = _a.cur; + it("".concat(test), function () { + var newLayerOrder = shiftLayers({ prev: prev, cur: cur }); + checkOrdering({ actual: newLayerOrder, expected: cur }); + }); + }); + }); + }); + describe('Not all layers initialized', function () { + var prev = ['b', 'c', 'e']; + var previousLayers = new Set(prev); + describe('Returns correct layer order for shifts:', function () { + testData.forEach(function (_a) { + var test = _a.test, cur = _a.cur; + it("".concat(test), function () { + var newLayerOrder = shiftLayers({ prev: prev, cur: cur }); + checkOrdering({ + actual: newLayerOrder, + expected: cur.filter(function (layer) { return previousLayers.has(layer); }), + }); + }); + }); + }); + }); + }); + describe('getShift()', function () { + var prev = ['a', 'b', 'c', 'd', 'e']; + var applyShift = function (_a) { + var previousLayerOrder = _a.prev, layer = _a.layer, method = _a.method, count = _a.count; + var METHOD_RAISE = 'raise'; + var shiftLayerToIndex = function (_a) { + var layerOrder = _a.layerOrder, layerId = _a.layer, index = _a.index; + var layerIdRemoved = layerOrder.filter(function (id) { return id !== layerId; }); + return __spreadArray(__spreadArray(__spreadArray([], __read(layerIdRemoved.slice(0, index)), false), [ + layerId + ], false), __read(layerIdRemoved.slice(index)), false); + }; + var modifier = method === METHOD_RAISE ? 1 : -1; + var index = previousLayerOrder.indexOf(layer) + modifier * count; + return shiftLayerToIndex({ + layerOrder: previousLayerOrder, + layer: layer, + index: index, + }); + }; + describe('Returns the correct shift:', function () { + testData.forEach(function (_a) { + var test = _a.test, cur = _a.cur; + it("".concat(test), function () { + var _a = getShift({ + prev: prev, + cur: cur, + }), layer = _a.layer, method = _a.method, count = _a.count; + var appliedShift = applyShift({ prev: prev, layer: layer, method: method, count: count }); + checkOrdering({ actual: appliedShift, expected: cur }); + }); + }); + it('Throws the correct error when the passed in layer orders do not contain the same ids', function () { + expect(getShift.bind(_this, { + prev: ['a', 'b', 'c', 'd'], + cur: ['a', 'b'], + })).to.throw(Error, 'getShift: arrays must contain the same ids'); + }); + it('Throws the correct error when more than one shift is required', function () { + expect(getShift.bind(_this, { + prev: ['d', 'a', 'b'], + cur: ['b', 'a', 'd'], + })).to.throw(Error, 'getShift: unable to find shift'); + }); + }); + }); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VzaXVtLmxheWVyLW9yZGVyaW5nLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvY29udHJvbGxlcnMvY2VzaXVtLmxheWVyLW9yZGVyaW5nLnNwZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBY0EsaUJBb0xBOztBQWxNQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUM3QixPQUFPLEVBQUUsUUFBUSxFQUFFLFdBQVcsRUFBRSxRQUFRLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQTtBQUV6RSxRQUFRLENBQUMsdUJBQXVCLEVBQUU7SUFDaEMsSUFBTSxhQUFhLEdBQUcsVUFBQyxFQUF5QjtZQUF2QixNQUFNLFlBQUEsRUFBRSxRQUFRLGNBQUE7UUFDdkMsT0FBQSxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUM7SUFBckQsQ0FBcUQsQ0FBQTtJQUV2RCxRQUFRLENBQUMsWUFBWSxFQUFFO1FBQ3JCLFFBQVEsQ0FBQyw2Q0FBNkMsRUFBRT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gIGRlc2NyaWJlKCdOb3QgYWxsIGxheWVycyBpbml0aWFsaXplZCcsICgpID0+IHtcbiAgICAgICAgY29uc3QgcHJldiA9IFsnYicsICdjJywgJ2UnXVxuICAgICAgICBjb25zdCBwcmV2aW91c0xheWVycyA9IG5ldyBTZXQocHJldilcbiAgICAgICAgZGVzY3JpYmUoJ1JldHVybnMgY29ycmVjdCBsYXllciBvcmRlciBmb3Igc2hpZnRzOicsICgpID0+IHtcbiAgICAgICAgICB0ZXN0RGF0YS5mb3JFYWNoKCh7IHRlc3QsIGN1ciB9KSA9PiB7XG4gICAgICAgICAgICBpdChgJHt0ZXN0fWAsICgpID0+IHtcbiAgICAgICAgICAgICAgY29uc3QgbmV3TGF5ZXJPcmRlciA9IHNoaWZ0TGF5ZXJzKHsgcHJldiwgY3VyIH0pXG4gICAgICAgICAgICAgIGNoZWNrT3JkZXJpbmcoe1xuICAgICAgICAgICAgICAgIGFjdHVhbDogbmV3TGF5ZXJPcmRlcixcbiAgICAgICAgICAgICAgICBleHBlY3RlZDogY3VyLmZpbHRlcigobGF5ZXIpID0+IHByZXZpb3VzTGF5ZXJzLmhhcyhsYXllcikpLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9KVxuICAgICAgfSlcbiAgICB9KVxuICAgIGRlc2NyaWJlKCdnZXRTaGlmdCgpJywgKCkgPT4ge1xuICAgICAgY29uc3QgcHJldiA9IFsnYScsICdiJywgJ2MnLCAnZCcsICdlJ11cbiAgICAgIGNvbnN0IGFwcGx5U2hpZnQgPSAoe1xuICAgICAgICBwcmV2OiBwcmV2aW91c0xheWVyT3JkZXIsXG4gICAgICAgIGxheWVyLFxuICAgICAgICBtZXRob2QsXG4gICAgICAgIGNvdW50LFxuICAgICAgfTogYW55KSA9PiB7XG4gICAgICAgIGNvbnN0IE1FVEhPRF9SQUlTRSA9ICdyYWlzZSdcbiAgICAgICAgY29uc3Qgc2hpZnRMYXllclRvSW5kZXggPSAoe1xuICAgICAgICAgIGxheWVyT3JkZXIsXG4gICAgICAgICAgbGF5ZXI6IGxheWVySWQsXG4gICAgICAgICAgaW5kZXgsXG4gICAgICAgIH06IGFueSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGxheWVySWRSZW1vdmVkID0gbGF5ZXJPcmRlci5maWx0ZXIoKGlkOiBhbnkpID0+IGlkICE9PSBsYXllcklkKVxuICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAuLi5sYXllcklkUmVtb3ZlZC5zbGljZSgwLCBpbmRleCksXG4gICAgICAgICAgICBsYXllcklkLFxuICAgICAgICAgICAgLi4ubGF5ZXJJZFJlbW92ZWQuc2xpY2UoaW5kZXgpLFxuICAgICAgICAgIF1cbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtb2RpZmllciA9IG1ldGhvZCA9PT0gTUVUSE9EX1JBSVNFID8gMSA6IC0xXG4gICAgICAgIGNvbnN0IGluZGV4ID0gcHJldmlvdXNMYXllck9yZGVyLmluZGV4T2YobGF5ZXIpICsgbW9kaWZpZXIgKiBjb3VudFxuICAgICAgICByZXR1cm4gc2hpZnRMYXllclRvSW5kZXgoe1xuICAgICAgICAgIGxheWVyT3JkZXI6IHByZXZpb3VzTGF5ZXJPcmRlcixcbiAgICAgICAgICBsYXllcixcbiAgICAgICAgICBpbmRleCxcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICAgIGRlc2NyaWJlKCdSZXR1cm5zIHRoZSBjb3JyZWN0IHNoaWZ0OicsICgpID0+IHtcbiAgICAgICAgdGVzdERhdGEuZm9yRWFjaCgoeyB0ZXN0LCBjdXIgfSkgPT4ge1xuICAgICAgICAgIGl0KGAke3Rlc3R9YCwgKCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgeyBsYXllciwgbWV0aG9kLCBjb3VudCB9ID0gZ2V0U2hpZnQoe1xuICAgICAgICAgICAgICBwcmV2LFxuICAgICAgICAgICAgICBjdXIsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgY29uc3QgYXBwbGllZFNoaWZ0ID0gYXBwbHlTaGlmdCh7IHByZXYsIGxheWVyLCBtZXRob2QsIGNvdW50IH0pXG4gICAgICAgICAgICBjaGVja09yZGVyaW5nKHsgYWN0dWFsOiBhcHBsaWVkU2hpZnQsIGV4cGVjdGVkOiBjdXIgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9KVxuICAgICAgICBpdCgnVGhyb3dzIHRoZSBjb3JyZWN0IGVycm9yIHdoZW4gdGhlIHBhc3NlZCBpbiBsYXllciBvcmRlcnMgZG8gbm90IGNvbnRhaW4gdGhlIHNhbWUgaWRzJywgKCkgPT4ge1xuICAgICAgICAgIGV4cGVjdChcbiAgICAgICAgICAgIGdldFNoaWZ0LmJpbmQodGhpcywge1xuICAgICAgICAgICAgICBwcmV2OiBbJ2EnLCAnYicsICdjJywgJ2QnXSxcbiAgICAgICAgICAgICAgY3VyOiBbJ2EnLCAnYiddLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICApLnRvLnRocm93KEVycm9yLCAnZ2V0U2hpZnQ6IGFycmF5cyBtdXN0IGNvbnRhaW4gdGhlIHNhbWUgaWRzJylcbiAgICAgICAgfSlcbiAgICAgICAgaXQoJ1Rocm93cyB0aGUgY29ycmVjdCBlcnJvciB3aGVuIG1vcmUgdGhhbiBvbmUgc2hpZnQgaXMgcmVxdWlyZWQnLCAoKSA9PiB7XG4gICAgICAgICAgZXhwZWN0KFxuICAgICAgICAgICAgZ2V0U2hpZnQuYmluZCh0aGlzLCB7XG4gICAgICAgICAgICAgIHByZXY6IFsnZCcsICdhJywgJ2InXSxcbiAgICAgICAgICAgICAgY3VyOiBbJ2InLCAnYScsICdkJ10sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICkudG8udGhyb3coRXJyb3IsICdnZXRTaGlmdDogdW5hYmxlIHRvIGZpbmQgc2hpZnQnKVxuICAgICAgICB9KVxuICAgICAgfSlcbiAgICB9KVxuICB9KVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/controllers/cesium.layers.d.ts b/src/main/webapp/js/controllers/cesium.layers.d.ts new file mode 100644 index 00000000000..025a1b715dd --- /dev/null +++ b/src/main/webapp/js/controllers/cesium.layers.d.ts @@ -0,0 +1,27 @@ +export declare const CesiumImageryProviderTypes: { + [key: string]: any; +}; +import { Layers } from './layers'; +type MakeMapType = { + cesiumOptions: any; + element: HTMLElement; +}; +export declare class CesiumLayers { + layers: Layers; + map: any; + isMapCreated: boolean; + layerForCid: any; + backboneModel: any; + layerOrder: Array; + constructor({ collection }: { + collection: any; + }); + makeMap(options: MakeMapType): any; + initLayer(model: any): void; + addLayer(): void; + removeLayer(): void; + setAlpha(model: any): void; + setShow(model: any): void; + reIndexLayers(): void; +} +export {}; diff --git a/src/main/webapp/js/controllers/cesium.layers.js b/src/main/webapp/js/controllers/cesium.layers.js new file mode 100644 index 00000000000..5242727891b --- /dev/null +++ b/src/main/webapp/js/controllers/cesium.layers.js @@ -0,0 +1,151 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/*jshint newcap: false, bitwise: false */ +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import url from 'url'; +import { addLayer, shiftLayers, getShift } from './cesium.layer-ordering'; +import _ from 'underscore'; +var DEFAULT_HTTPS_PORT = 443; +var DEFAULT_HTTP_PORT = 80; +export var CesiumImageryProviderTypes = { + OSM: Cesium.createOpenStreetMapImageryProvider, + AGM: Cesium.ArcGisMapServerImageryProvider, + BM: Cesium.BingMapsImageryProvider, + WMS: Cesium.WebMapServiceImageryProvider, + WMT: Cesium.WebMapTileServiceImageryProvider, + TMS: Cesium.createTileMapServiceImageryProvider, + GE: Cesium.GoogleEarthImageryProvider, + CT: Cesium.CesiumTerrainProvider, + AGS: Cesium.ArcGisImageServerTerrainProvider, + VRW: Cesium.VRTheWorldTerrainProvider, + SI: Cesium.SingleTileImageryProvider, +}; +import { Layers } from './layers'; +import Backbone from 'backbone'; +import { StartupDataStore } from '../model/Startup/startup'; +var CesiumLayers = /** @class */ (function () { + function CesiumLayers(_a) { + var collection = _a.collection; + this.backboneModel = new Backbone.Model({}); + this.isMapCreated = false; + this.layerOrder = []; + this.layerForCid = {}; + var layerPrefs = collection; + this.layers = new Layers(layerPrefs); + this.backboneModel.listenTo(layerPrefs, 'change:alpha', this.setAlpha.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'change:show change:alpha', this.setShow.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'add', this.addLayer.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'remove', this.removeLayer.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'sort', this.reIndexLayers.bind(this)); + } + CesiumLayers.prototype.makeMap = function (options) { + var _this = this; + // must create cesium map after containing DOM is attached. + this.map = new Cesium.Viewer(options.element, options.cesiumOptions); + this.map.scene.requestRenderMode = true; + this.layers.layers.forEach(function (model) { + if (model.get('show')) { + _this.initLayer(model); + } + }, this); + this.isMapCreated = true; + return this.map; + }; + CesiumLayers.prototype.initLayer = function (model) { + var type = CesiumImageryProviderTypes[model.get('type')]; + var initObj = _.omit(model.attributes, 'type', 'label', 'index', 'modelCid'); + if (model.get('type') === 'WMT') { + /* If matrixSet is present (OpenLayers WMTS keyword) set tileMatrixSetID (Cesium WMTS keyword) */ + if (initObj.matrixSet) { + initObj.tileMatrixSetID = initObj.matrixSet; + } + /* Set the tiling scheme for WMTS imagery providers that are EPSG:4326 */ + if (StartupDataStore.Configuration.getProjection() === 'EPSG:4326') { + initObj.tilingScheme = new Cesium.GeographicTilingScheme(); + } + } + var provider = new type(initObj); + /* + Optionally add this provider as a TrustedServer. This sets withCredentials = true + on the XmlHttpRequests for CORS. + */ + if (model.get('withCredentials')) { + var parsedUrl = url.parse(provider.url); + var port = parsedUrl.port; + if (!port) { + // @ts-expect-error ts-migrate(2322) FIXME: Type '443 | 80' is not assignable to type 'string ... Remove this comment to see the full error message + port = + parsedUrl.protocol === 'https:' + ? DEFAULT_HTTPS_PORT + : DEFAULT_HTTP_PORT; + } + Cesium.TrustedServers.add(parsedUrl.hostname, port); + } + this.layerOrder = addLayer({ + initialized: this.layerOrder, + all: this.layers.layers.map(function (model) { return model.id; }).reverse(), + layer: model.id, + }); + var layerIndex = this.layerOrder.indexOf(model.id); + var layer = this.map.imageryLayers.addImageryProvider(provider, layerIndex); + this.layerForCid[model.id] = layer; + layer.alpha = model.get('alpha'); + layer.show = model.shouldShowLayer(); + }; + CesiumLayers.prototype.addLayer = function () { + // never done + }; + CesiumLayers.prototype.removeLayer = function () { + // never done + }; + CesiumLayers.prototype.setAlpha = function (model) { + var layer = this.layerForCid[model.id]; + layer.alpha = model.get('alpha'); + }; + CesiumLayers.prototype.setShow = function (model) { + if (!this.layerForCid[model.id]) { + this.initLayer(model); + } + var layer = this.layerForCid[model.id]; + layer.show = model.shouldShowLayer(); + this.map.scene.requestRender(); + }; + /* + removing/re-adding the layers causes visible "re-render" of entire map; + raising/lowering is smoother. + raising means to move to a higher index. higher indexes are displayed on top of lower indexes. + so we have to reverse the order property here to make it display correctly. + in other words, order 1 means highest index. + */ + CesiumLayers.prototype.reIndexLayers = function () { + var _this = this; + var newLayerOrder = shiftLayers({ + prev: this.layerOrder, + cur: this.layers.layers.map(function (model) { return model.id; }).reverse(), + }); + var _a = getShift({ + prev: this.layerOrder, + cur: newLayerOrder, + }), layer = _a.layer, method = _a.method, count = _a.count; + _.times(count, function () { + _this.map.imageryLayers[method](_this.layerForCid[layer]); + }, this); + this.layerOrder =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AgICAgICAgICAgPyBERUZBVUxUX0hUVFBTX1BPUlRcbiAgICAgICAgICAgIDogREVGQVVMVF9IVFRQX1BPUlRcbiAgICAgIH1cbiAgICAgIENlc2l1bS5UcnVzdGVkU2VydmVycy5hZGQocGFyc2VkVXJsLmhvc3RuYW1lLCBwb3J0KVxuICAgIH1cbiAgICB0aGlzLmxheWVyT3JkZXIgPSBhZGRMYXllcih7XG4gICAgICBpbml0aWFsaXplZDogdGhpcy5sYXllck9yZGVyLFxuICAgICAgYWxsOiB0aGlzLmxheWVycy5sYXllcnMubWFwKChtb2RlbCkgPT4gbW9kZWwuaWQpLnJldmVyc2UoKSxcbiAgICAgIGxheWVyOiBtb2RlbC5pZCxcbiAgICB9KVxuICAgIGNvbnN0IGxheWVySW5kZXggPSB0aGlzLmxheWVyT3JkZXIuaW5kZXhPZihtb2RlbC5pZClcbiAgICBjb25zdCBsYXllciA9IHRoaXMubWFwLmltYWdlcnlMYXllcnMuYWRkSW1hZ2VyeVByb3ZpZGVyKFxuICAgICAgcHJvdmlkZXIsXG4gICAgICBsYXllckluZGV4XG4gICAgKVxuICAgIHRoaXMubGF5ZXJGb3JDaWRbbW9kZWwuaWRdID0gbGF5ZXJcbiAgICBsYXllci5hbHBoYSA9IG1vZGVsLmdldCgnYWxwaGEnKVxuICAgIGxheWVyLnNob3cgPSBtb2RlbC5zaG91bGRTaG93TGF5ZXIoKVxuICB9XG4gIGFkZExheWVyKCkge1xuICAgIC8vIG5ldmVyIGRvbmVcbiAgfVxuICByZW1vdmVMYXllcigpIHtcbiAgICAvLyBuZXZlciBkb25lXG4gIH1cbiAgc2V0QWxwaGEobW9kZWw6IGFueSkge1xuICAgIGNvbnN0IGxheWVyID0gdGhpcy5sYXllckZvckNpZFttb2RlbC5pZF1cbiAgICBsYXllci5hbHBoYSA9IG1vZGVsLmdldCgnYWxwaGEnKVxuICB9XG4gIHNldFNob3cobW9kZWw6IGFueSkge1xuICAgIGlmICghdGhpcy5sYXllckZvckNpZFttb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IsXG4gICAgfSlcbiAgICBfLnRpbWVzKFxuICAgICAgY291bnQsXG4gICAgICAoKSA9PiB7XG4gICAgICAgIHRoaXMubWFwLmltYWdlcnlMYXllcnNbbWV0aG9kXSh0aGlzLmxheWVyRm9yQ2lkW2xheWVyXSlcbiAgICAgIH0sXG4gICAgICB0aGlzXG4gICAgKVxuICAgIHRoaXMubGF5ZXJPcmRlciA9IG5ld0xheWVyT3JkZXJcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/controllers/layers.d.ts b/src/main/webapp/js/controllers/layers.d.ts new file mode 100644 index 00000000000..83469dcd27f --- /dev/null +++ b/src/main/webapp/js/controllers/layers.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { Subscribable } from '../model/Base/base-classes'; +export type LayerType = { + alpha: string; + id: string; + label: string; + name: string; + order: number; + parameters: any; + proxyEnabled: boolean; + show: boolean; + type: string; + url: string; + withCredentials: boolean; +}; +export declare class Layer extends Subscribable<{ + thing: 'change'; +}> { + layer: LayerType; + constructor(layer: LayerType); +} +export declare class Layers extends Subscribable<{ + thing: 'sort' | 'add' | 'remove'; +}> { + layers: Array; + constructor(layers: Array); +} diff --git a/src/main/webapp/js/controllers/layers.js b/src/main/webapp/js/controllers/layers.js new file mode 100644 index 00000000000..36dfebec9e2 --- /dev/null +++ b/src/main/webapp/js/controllers/layers.js @@ -0,0 +1,37 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __extends } from "tslib"; +import { Subscribable } from '../model/Base/base-classes'; +var Layer = /** @class */ (function (_super) { + __extends(Layer, _super); + function Layer(layer) { + var _this = _super.call(this) || this; + _this.layer = layer; + return _this; + } + return Layer; +}(Subscribable)); +export { Layer }; +var Layers = /** @class */ (function (_super) { + __extends(Layers, _super); + function Layers(layers) { + var _this = _super.call(this) || this; + _this.layers = layers; + return _this; + } + return Layers; +}(Subscribable)); +export { Layers }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL2NvbnRyb2xsZXJzL2xheWVycy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTs7QUFFSixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNEJBQTRCLENBQUE7QUFnQnpEO0lBQTJCLHlCQUFpQztJQUUxRCxlQUFZLEtBQWdCO1FBQTVCLFlBQ0UsaUJBQU8sU0FFUjtRQURDLEtBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFBOztJQUNwQixDQUFDO0lBQ0gsWUFBQztBQUFELENBQUMsQUFORCxDQUEyQixZQUFZLEdBTXRDOztBQUVEO0lBQTRCLDBCQUFrRDtJQUU1RSxnQkFBWSxNQUFrQjtRQUE5QixZQUNFLGlCQUFPLFNBRVI7UUFEQyxLQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQTs7SUFDdEIsQ0FBQztJQUNILGFBQUM7QUFBRCxDQ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2Jhc2UtY2xhc3NlcydcblxuZXhwb3J0IHR5cGUgTGF5ZXJUeXBlID0ge1xuICBhbHBoYTogc3RyaW5nXG4gIGlkOiBzdHJpbmdcbiAgbGFiZWw6IHN0cmluZ1xuICBuYW1lOiBzdHJpbmdcbiAgb3JkZXI6IG51bWJlclxuICBwYXJhbWV0ZXJzOiBhbnlcbiAgcHJveHlFbmFibGVkOiBib29sZWFuXG4gIHNob3c6IGJvb2xlYW5cbiAgdHlwZTogc3RyaW5nXG4gIHVybDogc3RyaW5nXG4gIHdpdGhDcmVkZW50aWFsczogYm9vbGVhblxufVxuXG5leHBvcnQgY2xhc3MgTGF5ZXIgZXh0ZW5kcyBTdWJzY3JpYmFibGU8eyB0aGluZzogJ2NoYW5nZScgfT4ge1xuICBsYXllcjogTGF5ZXJUeXBlXG4gIGNvbnN0cnVjdG9yKGxheWVyOiBMYXllclR5cGUpIHtcbiAgICBzdXBlcigpXG4gICAgdGhpcy5sYXllciA9IGxheWVyXG4gIH1cbn1cblxuZXhwb3J0IGNsYXNzIExheWVycyBleHRlbmRzIFN1YnNjcmliYWJsZTx7IHRoaW5nOiAnc29ydCcgfCAnYWRkJyB8ICdyZW1vdmUnIH0+IHtcbiAgbGF5ZXJzOiBBcnJheTxhbnk+XG4gIGNvbnN0cnVjdG9yKGxheWVyczogQXJyYXk8YW55Pikge1xuICAgIHN1cGVyKClcbiAgICB0aGlzLmxheWVycyA9IGxheWVyc1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/controllers/openlayers.layers.d.ts b/src/main/webapp/js/controllers/openlayers.layers.d.ts new file mode 100644 index 00000000000..73e5fdd6252 --- /dev/null +++ b/src/main/webapp/js/controllers/openlayers.layers.d.ts @@ -0,0 +1,24 @@ +import { Layers } from './layers'; +type MakeMapType = { + zoom: number; + minZoom: number; + center: [number, number]; + element: HTMLElement; +}; +export declare class OpenlayersLayers { + layers: Layers; + map: any; + isMapCreated: boolean; + layerForCid: any; + backboneModel: any; + constructor({ collection }: { + collection: any; + }); + makeMap(mapOptions: MakeMapType): any; + addLayer(model: any): Promise; + removeLayer(model: any): void; + reIndexLayers(): void; + setAlpha(model: any): void; + setShow(model: any): void; +} +export {}; diff --git a/src/main/webapp/js/controllers/openlayers.layers.js b/src/main/webapp/js/controllers/openlayers.layers.js new file mode 100644 index 00000000000..9680f102d75 --- /dev/null +++ b/src/main/webapp/js/controllers/openlayers.layers.js @@ -0,0 +1,201 @@ +import { __assign, __awaiter, __generator, __read, __rest } from "tslib"; +import { Layers } from './layers'; +import _ from 'underscore'; +import ol from 'openlayers'; +import user from '../../component/singletons/user-instance'; +import Backbone from 'backbone'; +import { StartupDataStore } from '../model/Startup/startup'; +var createTile = function (_a, Source, Layer) { + var show = _a.show, alpha = _a.alpha, options = __rest(_a, ["show", "alpha"]); + if (Layer === void 0) { Layer = ol.layer.Tile; } + return new Layer({ + visible: show, + preload: Infinity, + opacity: alpha, + source: new Source(options), + }); +}; +var OSM = function (opts) { + var url = opts.url; + return createTile(__assign(__assign({}, opts), { url: url + (url.indexOf('/{z}/{x}/{y}') === -1 ? '/{z}/{x}/{y}.png' : '') }), ol.source.OSM); +}; +var BM = function (opts) { + var imagerySet = opts.imagerySet || opts.url; + return createTile(__assign(__assign({}, opts), { imagerySet: imagerySet }), ol.source.BingMaps); +}; +var WMS = function (opts) { + var params = opts.params || __assign({ LAYERS: opts.layers }, opts.parameters); + return createTile(__assign(__assign({}, opts), { params: params }), ol.source.TileWMS); +}; +var WMT = function (opts) { return __awaiter(void 0, void 0, void 0, function () { + var url, withCredentials, proxyEnabled, originalUrl, getCapabilitiesUrl, res, text, parser, result, layer, matrixSet, options; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + url = opts.url, withCredentials = opts.withCredentials, proxyEnabled = opts.proxyEnabled; + originalUrl = proxyEnabled + ? new URL(url, window.location.origin + window.location.pathname) + : new URL(url); + getCapabilitiesUrl = new URL(originalUrl); + getCapabilitiesUrl.searchParams.set('request', 'GetCapabilities'); + return [4 /*yield*/, window.fetch(getCapabilitiesUrl, { + credentials: withCredentials ? 'include' : 'same-origin', + })]; + case 1: + res = _a.sent(); + return [4 /*yield*/, res.text()]; + case 2: + text = _a.sent(); + parser = new ol.format.WMTSCapabilities(); + result = parser.read(text); + if (result.Contents.Layer.length === 0) { + throw new Error('WMTS map layer source has no layers.'); + } + layer = opts.layer, matrixSet = opts.matrixSet; + /* If tileMatrixSetID is present (Cesium WMTS keyword) set matrixSet (OpenLayers WMTS keyword) */ + if (opts.tileMatrixSetID) { + matrixSet = opts.tileMatrixSetID; + } + if (!layer) { + layer = result.Contents.Layer[0].Identifier; + } + options = ol.source.WMTS.optionsFromCapabilities(result, __assign(__assign({}, opts), { layer: layer, matrixSet: matrixSet })); + if (options === null) { + throw new Error('WMTS map layer source could not be setup.'); + } + if (proxyEnabled) { + // Set this to the proxy URL. Otherwise, OpenLayers will use the URL provided by the + // GetCapabilities response. + options.url = originalUrl.toString(); + options.urls = [originalUrl.toString()]; + } + return [2 /*return*/, createTile(opts, function () { return new ol.source.WMTS(options); })]; + } + }); +}); }; +var AGM = function (opts) { + // We strip the template part of the url because we will manually format + // it in the `tileUrlFunction` function. + var url = opts.url.replace('tile/{z}/{y}/{x}', ''); + // arcgis url format: + // http:///tile/// + // + // reference links: + // - https://openlayers.org/en/latest/examples/xyz-esri-4326-512.html + // - https://developers.arcgis.com/rest/services-reference/map-tile.htm + var tileUrlFunction = function (tileCoord) { + var _a = __read(tileCoord, 3), z = _a[0], x = _a[1], y = _a[2]; + return "".concat(url, "/tile/").concat(z - 1, "/").concat(-y - 1, "/").concat(x); + }; + return createTile(__assign(__assign({}, opts), { tileUrlFunction: tileUrlFunction }), ol.source.XYZ); +}; +var SI = function (opts) { + var imageExtent = opts.imageExtent || + ol.proj.get(StartupDataStore.Configuration.getProjection()).getExtent(); + return createTile(__assign(__assign(__assign({}, opts), { imageExtent: imageExtent }), opts.parameters), ol.source.ImageStatic, ol.layer.Image); +}; +var sources = { OSM: OSM, BM: BM, WMS: WMS, WMT: WMT, AGM: AGM, SI: SI }; +var createLayer = function (type, opts) { + var fn = sources[type]; + if (fn === undefined) { + throw new Error("Unsupported map layer type ".concat(type)); + } + return fn(opts); +}; +var OpenlayersLayers = /** @class */ (function () { + function OpenlayersLayers(_a) { + var collection = _a.collection; + this.backboneModel = new Backbone.Model({}); + this.isMapCreated = false; + this.layerForCid = {}; + var layerPrefs = collection; + this.layers = new Layers(layerPrefs); + this.backboneModel.listenTo(layerPrefs, 'change:alpha', this.setAlpha.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'change:show change:alpha', this.setShow.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'add', this.addLayer.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'remove', this.removeLayer.bind(this)); + this.backboneModel.listenTo(layerPrefs, 'sort', this.reIndexLayers.bind(this)); + } + OpenlayersLayers.prototype.makeMap = function (mapOptions) { + var _this = this; + this.layers.layers.forEach(function (layer) { + _this.addLayer(layer); + }); + var view = new ol.View({ + projection: ol.proj.get(StartupDataStore.Configuration.getProjection()), + center: ol.proj.transform([0, 0], 'EPSG:4326', StartupDataStore.Configuration.getProjection()), + zoom: mapOptions.zoom, + minZoom: mapOptions.minZoom, + }); + var config = { + target: mapOptions.element, + view: view, + interactions: ol.interaction.defaults({ doubleClickZoom: false }), + }; + this.map = new ol.Map(config); + this.isMapCreated = true; + return this.map; + }; + OpenlayersLayers.prototype.addLayer = function (model) { + return __awaiter(this, void 0, void 0, function () { + var _a, id, type, opts, layer, e_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = model.toJSON(), id = _a.id, type = _a.type; + opts = _.omit(model.attributes, 'type', 'label', 'index', 'modelCid'); + opts.show = model.shouldShowLayer(); + _b.label = 1; + case 1: + _b.trys.push([1, 3, , 4]); + return [4 /*yield*/, Promise.resolve(createLayer(type, opts))]; + case 2: + layer = _b.sent(); + this.map.addLayer(layer); + this.layerForCid[id] = layer; + this.reIndexLayers(); + return [3 /*break*/, 4]; + case 3: + e_1 = _b.sent(); + model.set('warning', e_1.message); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + OpenlayersLayers.prototype.removeLayer = function (model) { + var id = model.get('id'); + var layer = this.layerForCid[id]; + if (layer !== undefined) { + this.map.removeLayer(layer); + } + delete this.layerForCid[id]; + this.reIndexLayers(); + }; + OpenlayersLayers.prototype.reIndexLayers = function () { + var _this = this; + this.layers.layers.forEach(function (model, index) { + var layer = _this.layerForCid[model.id]; + if (layer !== undefined) { + layer.setZIndex(-(index + 1)); + } + }, this); + user.savePreferences(); + }; + OpenlayersLayers.prototype.setAlpha = function (model) { + var layer = this.layerForCid[model.id]; + if (layer !== undefined) { + layer.setOpacity(model.get('alpha')); + } + }; + OpenlayersLayers.prototype.setShow = function (model) { + var layer = this.layerForCid[model.id]; + if (layer !== undefined) { + layer.setVisible(model.shouldShowLayer()); + } + }; + return OpenlayersLayers; +}()); +export { OpenlayersLayers }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlbmxheWVycy5sYXllcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvY29udHJvbGxlcnMvb3BlbmxheWVycy5sYXllcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBQ2pDLE9BQU8sQ0FBQyxNQUFNLFlBQVksQ0FBQTtBQUMxQixPQUFPLEVBQUUsTUFBTSxZQUFZLENBQUE7QUFDM0IsT0FBTyxJQUFJLE1BQU0sMENBQTBDLENBQUE7QUFDM0QsT0FBTyxRQUFRLE1BQU0sVUFBVSxDQUFBO0FBQy9CLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDBCQUEwQixDQUFBO0FBQz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IH1cbiAgfVxuICBzZXRTaG93KG1vZGVsOiBhbnkpIHtcbiAgICBjb25zdCBsYXllciA9IHRoaXMubGF5ZXJGb3JDaWRbbW9kZWwuaWRdXG4gICAgaWYgKGxheWVyICE9PSB1bmRlZmluZWQpIHtcbiAgICAgIGxheWVyLnNldFZpc2libGUobW9kZWwuc2hvdWxkU2hvd0xheWVyKCkpXG4gICAgfVxuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/cql.d.ts b/src/main/webapp/js/cql.d.ts new file mode 100644 index 00000000000..5887c1b4b32 --- /dev/null +++ b/src/main/webapp/js/cql.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { CQLStandardFilterBuilderClass, FilterBuilderClass, FilterClass } from '../component/filter-builder/filter.structure'; +/** + * For now, all this does is remove anyDate from cql since that's purely for the UI to track the query basic view state correctly. + * We might want to reconsider how we do the basic query in order to avoid this necessity (it's really the checkbox). + * + * This will only ever happen with a specific structure, so we don't need to recurse or anything. + */ +declare function removeInvalidFilters(cqlAst: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass): FilterBuilderClass | FilterClass | boolean | CQLStandardFilterBuilderClass; +declare const _default: { + /** + * This function should be used only to test reconstitution, or as a last resort to handle upgrades from a system where the filter tree is + * no longer compatible. No loss of accuracy will occur, but nice UX touches like remembering coordinate systems and units will. + * + * Also, it may group things slightly different (we do our best effort, but the postfix notation technically causes parens around everything, and from there + * we do a simplification, which means the resulting filter tree may look simpler than you remember). However, once again, the accuracy and + * results returned by the search will remain the same. + * @param cql + */ + read(cql?: string): FilterBuilderClass; + write(filter: FilterBuilderClass): string; + removeInvalidFilters: typeof removeInvalidFilters; + simplify(cqlAst: FilterBuilderClass): FilterBuilderClass; + translateCqlToUserql: (str: string) => string; + translateUserqlToCql: (str: string) => string; + ANYTEXT_WILDCARD: string; + getGeoFilters: (wkt: string, property: string, buffer?: string | undefined) => FilterBuilderClass | FilterClass; +}; +export default _default; diff --git a/src/main/webapp/js/cql.js b/src/main/webapp/js/cql.js new file mode 100644 index 00000000000..d84e46e1572 --- /dev/null +++ b/src/main/webapp/js/cql.js @@ -0,0 +1,925 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/* Copyright (c) 2006-2015 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the 2-clause BSD license. + * See license.txt in the OpenLayers distribution or repository for the + * full text of the license. */ +import { CQLStandardFilterBuilderClass, deserialize, FilterBuilderClass, FilterClass, isBasicDatatypeClass, isFilterBuilderClass, isCQLStandardFilterBuilderClass, serialize, shouldBeFilterBuilderClass, convertResourceSizeFilterClassValueToBytes, isResourceSizeFilterClass, isResourceSizeRangeFilterClass, convertResourceSizeRangeFilterClassValueToBytes, } from '../component/filter-builder/filter.structure'; +import { getDataTypesConfiguration } from '../component/reserved-basic-datatype/reserved.basic-datatype'; +import CQLUtils from './CQLUtils'; +import _cloneDeep from 'lodash/cloneDeep'; +import wkx from 'wkx'; +import { StartupDataStore } from './model/Startup/startup'; +var getPointRadiusFilter = function (point, property, radius) { + var value = { + mode: 'circle', + type: 'POINTRADIUS', + lat: point[1], + lon: point[0], + }; + return new FilterClass({ + type: 'GEOMETRY', + value: (radius ? __assign(__assign({}, value), { radius: radius }) : value), + property: property, + }); +}; +var getLinestringFilter = function (line, property, buffer) { + var value = { + mode: 'line', + type: 'LINE', + line: line, + }; + return new FilterClass({ + type: 'GEOMETRY', + value: (buffer + ? __assign(__assign({}, value), { lineWidth: buffer }) : value), + property: property, + }); +}; +var getPolygonFilter = function (poly, property, buffer) { + var value = { + mode: 'poly', + type: 'POLYGON', + polygon: poly, + }; + return new FilterClass({ + type: 'GEOMETRY', + value: (buffer + ? __assign(__assign({}, value), { polygonBufferWidth: buffer }) : value), + property: property, + }); +}; +var ANYTEXT_WILDCARD = '"anyText" ILIKE \'%\''; +var timePattern = /((([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?)|^'')/i, patterns = { + //Allows for non-standard single-quoted property names + PROPERTY: /^([_a-zA-Z]\w*|"[^"]+"|'[^']+')/, + COMPARISON: /^(=|<>|<=|<|>=|>|LIKE|ILIKE)/i, + IS_NULL: /^IS NULL/i, + COMMA: /^,/, + LOGICAL: /^(AND|OR)/i, + VALUE: /^('([^']|'')*'|-?\d+(\.\d*)?|\.\d+)/, + FILTER_FUNCTION: /^[a-z]\w+\(/, + BOOLEAN: /^(false|true)/i, + LPAREN: /^\(/, + RPAREN: /^\)/, + SPATIAL: /^(BBOX|INTERSECTS|DWITHIN|WITHIN|CONTAINS)/i, + UNITS: /^(meters)/i, + NOT: /^NOT/i, + BETWEEN: /^BETWEEN/i, + BEFORE: /^BEFORE/i, + AFTER: /^AFTER/i, + DURING: /^DURING/i, + RELATIVE: /^'RELATIVE\([A-Za-z0-9.]*\)'/i, + TIME: new RegExp('^' + timePattern.source), + TIME_PERIOD: new RegExp('^' + timePattern.source + '/' + timePattern.source), + GEOMETRY: function (text) { + var type = /^(POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)/.exec(text); + if (type) { + var len = text.length; + var idx = text.indexOf('(', type[0].length); + if (idx > -1) { + var depth = 1; + while (idx < len && depth > 0) { + idx++; + switch (text.charAt(idx)) { + case '(': + depth++; + break; + case ')': + depth--; + break; + default: + // in default case, do nothing + } + } + } + return [text.substr(0, idx + 1)]; + } + return null; + }, + END: /^$/, +}, follows = { + ROOT_NODE: [ + 'NOT', + 'GEOMETRY', + 'SPATIAL', + 'FILTER_FUNCTION', + 'PROPERTY', + 'LPAREN', + ], + LPAREN: [ + 'NOT', + 'GEOMETRY', + 'SPATIAL', + 'FILTER_FUNCTION', + 'PROPERTY', + 'VALUE', + 'LPAREN', + ], + RPAREN: ['NOT', 'LOGICAL', 'END', 'RPAREN', 'COMPARISON', 'COMMA'], + PROPERTY: [ + 'COMPARISON', + 'BETWEEN', + 'COMMA', + 'IS_NULL', + 'BEFORE', + 'AFTER', + 'DURING', + 'RPAREN', + ], + BETWEEN: ['VALUE'], + IS_NULL: ['RPAREN', 'LOGICAL', '[', ']'], + COMPARISON: ['RELATIVE', 'VALUE', 'BOOLEAN'], + COMMA: ['FILTER_FUNCTION', 'GEOMETRY', 'VALUE', 'UNITS', 'PROPERTY'], + VALUE: ['LOGICAL', 'COMMA', 'RPAREN', 'END'], + BOOLEAN: ['RPAREN'], + SPATIAL: ['LPAREN'], + UNITS: ['RPAREN'], + LOGICAL: [ + 'FILTER_FUNCTION', + 'NOT', + 'VALUE', + 'SPATIAL', + 'PROPERTY', + 'LPAREN', + ], + NOT: ['PROPERTY', 'LPAREN'], + GEOMETRY: ['COMMA', 'RPAREN'], + BEFORE: ['TIME'], + AFTER: ['TIME'], + DURING: ['TIME_PERIOD'], + TIME: ['LOGICAL', 'RPAREN', 'END'], + TIME_PERIOD: ['LOGICAL', 'RPAREN', 'END'], + RELATIVE: ['RPAREN', 'END'], + FILTER_FUNCTION: ['LPAREN', 'PROPERTY', 'VALUE', 'RPAREN'], + END: [], +}, precedence = { + RPAREN: 3, + LOGICAL: 2, + COMPARISON: 1, +}, +// as an improvement, these could be figured out while building the syntax tree +filterFunctionParamCount = { + proximity: 3, + pi: 0, +}, dateTimeFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; +function tryToken(text, pattern) { + if (pattern instanceof RegExp) { + return pattern.exec(text); + } + else { + return pattern(text); + } +} +function nextToken(text, tokens) { + var i, token, len = tokens.length; + for (i = 0; i < len; i++) { + token = tokens[i]; + var pat = patterns[token]; + var matches = tryToken(text, pat); + if (matches) { + var match = matches[0]; + var remainder = text.substr(match.length).replace(/^\s*/, ''); + return { + type: token, + text: match, + remainder: remainder, + }; + } + } + var msg = 'ERROR: In parsing: [' + text + '], expected one of: '; + for (i = 0; i < len; i++) { + token = tokens[i]; + msg += '\n ' + token + ': ' + patterns[token]; + } + throw new Error(msg); +} +function tokenize(text) { + var results = []; + var token = undefined; + var expect = follows['ROOT_NODE']; + do { + token = nextToken(text, expect); + text = token.remainder; + expect = follows[token.type]; + if (token.type !== 'END' && !expect) { + throw new Error('No follows list for ' + token.type); + } + results.push(token); + } while (token.type !== 'END'); + return results; +} +// Mapping of Intrigue's query language syntax to CQL syntax +var userqlToCql = { + '*': '%', + '?': '_', + '%': '\\%', + _: '\\_', +}; +var translateUserqlToCql = function (str) { + return str.replace(/([^*?%_])?([*?%_])/g, function (_, a, b) { + if (a === void 0) { a = ''; } + return a + (a === '\\' ? b : userqlToCql[b]); + }); +}; +//Mapping of CQL syntax to Intrigue's query language syntax +var cqlToUserql = { + '%': '*', + _: '?', +}; +var translateCqlToUserql = function (str) { + return str.replace(/([^%_])?([%_])/g, function (_, a, b) { + if (a === void 0) { a = ''; } + return a === '\\' ? b : a + cqlToUserql[b]; + }); +}; +var getNextToken = function (postfix) { + if (postfix[postfix.length - 3] && + postfix[postfix.length - 3].type === 'FILTER_FUNCTION') { + // first two are useless + postfix.pop(); + postfix.pop(); + return postfix.pop(); + } + if (postfix[postfix.length - 2] && + postfix[postfix.length - 2].type === 'RELATIVE') { + // first one is useless + postfix.pop(); + return postfix.pop(); + } + return postfix.pop(); +}; +var getGeoFilters = function (wkt, property, buffer) { + if (wkt.startsWith('GEOMETRYCOLLECTION')) { + var parsedWkt = wkx.Geometry.parse(wkt); + var geoJson = parsedWkt.toGeoJSON(); + var innerWkts = geoJson.geometries.map(function (geometry) { + return wkx.Geometry.parseGeoJSON(geometry).toWkt(); + }); + return new FilterBuilderClass({ + type: 'OR', + filters: innerWkts.map(function (wkt) { return getGeoFilters(wkt, property, buffer); }), + }); + } + else if (wkt.startsWith('LINESTRING')) { + var line = CQLUtils.arrayFromLinestringWkt(wkt); + return getLinestringFilter(line, property, buffer); + } + else if (wkt.startsWith('MULTILINESTRING')) { + return new FilterBuilderClass({ + type: 'OR', + filters: CQLUtils.arrayFromMultilinestringWkt(wkt).map(function (line) { return getLinestringFilter(line, property, buffer); }), + }); + } + else if (wkt.startsWith('POLYGON')) { + var poly = CQLUtils.arrayFromPolygonWkt(wkt); + return getPolygonFilter(poly, property, buffer); + } + else if (wkt.startsWith('MULTIPOLYGON')) { + return new FilterBuilderClass({ + type: 'OR', + filters: CQLUtils.arrayFromPolygonWkt(wkt).map(function (poly) { + return getPolygonFilter(poly, property, buffer); + }), + }); + } + else if (wkt.startsWith('POINT')) { + var point = CQLUtils.arrayFromPointWkt(wkt)[0]; + return getPointRadiusFilter(point, property, buffer); + } + else if (wkt.startsWith('MULTIPOINT')) { + return new FilterBuilderClass({ + type: 'OR', + filters: CQLUtils.arrayFromPointWkt(wkt).map(function (point) { + return getPointRadiusFilter(point, property, buffer); + }), + }); + } + throw new Error('Unknown spatial type encountered'); +}; +function buildTree(postfix) { + var value, property, tok = getNextToken(postfix); + var tokenType = tok.type; + switch (tokenType) { + case 'LOGICAL': + var rhs = buildTree(postfix), lhs = buildTree(postfix); + return new FilterBuilderClass({ + filters: [lhs, rhs], + type: tok.text.toUpperCase(), + }); + case 'NOT': + var peekToken = postfix[postfix.length - 1]; + if (peekToken.type === 'LOGICAL') { + return new FilterBuilderClass(__assign(__assign({}, buildTree(postfix)), { negated: true })); + } + else if (peekToken.type === 'NOT') { + return new FilterBuilderClass({ + filters: [buildTree(postfix)], + type: 'AND', + negated: true, + }); + } + else { + return new FilterClass(__assign(__assign({}, buildTree(postfix)), { negated: true })); + } + case 'BETWEEN': // works + var min = void 0, max = void 0; + postfix.pop(); // unneeded AND token here + max = buildTree(postfix); + min = buildTree(postfix); + property = buildTree(postfix); + return new FilterClass({ + property: property, + value: { + start: min, + end: max, + }, + type: tokenType, + }); + case 'BEFORE': // works + case 'AFTER': // works + value = buildTree(postfix); + property = buildTree(postfix); + return new FilterClass({ + property: property, + value: value, + type: tok.text.toUpperCase(), + }); + case 'DURING': // technically between for dates, works + var dates = buildTree(postfix).split('/'); + property = buildTree(postfix); + return new FilterClass({ + property: property, + value: { + start: dates[0], + end: dates[1], + }, + type: tok.text.toUpperCase(), + }); + case 'COMPARISON': // works + value = buildTree(postfix); + property = buildTree(postfix); + return new FilterClass({ + property: property, + value: value, + type: tok.text.toUpperCase(), + }); + case 'IS_NULL': // works + property = buildTree(postfix); + return new FilterClass({ + property: property, + type: tok.text.toUpperCase(), + }); + case 'VALUE': //works + var match = tok.text.match(/^'(.*)'$/); + if (match) { + if (unwrap(postfix[0].text) === 'id') { + // don't escape ids + return match[1].replace(/''/g, "'"); + } + else { + return translateCqlToUserql(match[1].replace(/''/g, "'")); + } + } + else { + return Number(tok.text); + } + case 'BOOLEAN': // works + switch (tok.text.toUpperCase()) { + case 'TRUE': + return true; + default: + return false; + } + case 'SPATIAL': // working + // next token tells us whether this is DWITHIN or INTERSECTS + switch (tok.text) { + case 'INTERSECTS': { + // things without buffers, could be poly or line + var valueToken = postfix.pop(); + var propertyToken = postfix.pop(); + return getGeoFilters(valueToken.text, propertyToken.text, undefined); + } + case 'DWITHIN': { + // things with buffers, could be poly, line or point + var bufferToken = postfix.pop(); + var valueToken = postfix.pop(); + var propertyToken = postfix.pop(); + return getGeoFilters(valueToken.text, propertyToken.text, bufferToken.text); + } + default: + throw new Error('Unknown spatial type encountered'); + } + case 'GEOMETRY': + return { + type: tokenType, + value: tok.text, + }; + case 'RELATIVE': + return new FilterClass({ + type: 'RELATIVE', + value: deserialize.dateRelative(tok.text), + property: postfix.pop().text, + }); + case 'FILTER_FUNCTION': // working + var filterFunctionName = tok.text.slice(0, -1); // remove trailing '(' + var paramCount = filterFunctionParamCount[filterFunctionName]; + if (paramCount === undefined) { + throw new Error('Unsupported filter function: ' + filterFunctionName); + } + var params = Array.apply(null, Array(paramCount)) + .map(function () { return buildTree(postfix); }) + .reverse(); + switch (filterFunctionName) { + case 'proximity': + var proximityStrings = params[2]; + return new FilterClass({ + type: 'FILTER FUNCTION proximity', + property: params[0], + value: { + first: proximityStrings.split(' ')[0], + second: proximityStrings.split(' ')[1], + distance: params[1], + }, + }); + default: + throw new Error('Unknown filter function'); + } + case 'TIME_PERIOD': + return tok.text; + default: + return tok.text; + } +} +function buildAst(tokens) { + var operatorStack = [], postfix = []; + while (tokens.length) { + var tok = tokens.shift(); + switch (tok.type) { + case 'PROPERTY': + tok.text = unwrap(tok.text); + case 'GEOMETRY': + case 'VALUE': + case 'TIME': + case 'TIME_PERIOD': + case 'RELATIVE': + case 'BOOLEAN': + postfix.push(tok); + break; + case 'COMPARISON': + case 'BETWEEN': + case 'IS_NULL': + case 'LOGICAL': + case 'BEFORE': + case 'AFTER': + case 'DURING': + var p = precedence[tok.type]; + while (operatorStack.length > 0 && + precedence[operatorStack[operatorStack.length - 1].type] <= p) { + postfix.push(operatorStack.pop()); + } + operatorStack.push(tok); + break; + case 'SPATIAL': + case 'NOT': + case 'LPAREN': + operatorStack.push(tok); + break; + case 'FILTER_FUNCTION': + operatorStack.push(tok); + // insert a '(' manually because we lost the original LPAREN matching the FILTER_FUNCTION regex + operatorStack.push({ type: 'LPAREN' }); + break; + case 'RPAREN': + while (operatorStack.length > 0 && + operatorStack[operatorStack.length - 1].type !== 'LPAREN') { + postfix.push(operatorStack.pop()); + } + operatorStack.pop(); // toss out the LPAREN + // if this right parenthesis ends a function argument list (it's not for a logical grouping), + // it's now time to add that function to the postfix-ordered list + var lastOperatorType = operatorStack.length > 0 && + operatorStack[operatorStack.length - 1].type; + if (lastOperatorType === 'SPATIAL' || + lastOperatorType === 'FILTER_FUNCTION') { + postfix.push(operatorStack.pop()); + } + break; + case 'COMMA': + case 'END': + case 'UNITS': + break; + default: + throw new Error('Unknown token type ' + tok.type); + } + } + while (operatorStack.length > 0) { + postfix.push(operatorStack.pop()); + } + var result = buildTree(postfix); + if (postfix.length > 0) { + var msg = 'Remaining tokens after building AST: \n'; + for (var i = postfix.length - 1; i >= 0; i--) { + msg += postfix[i].type + ': ' + postfix[i].text + '\n'; + } + throw new Error(msg); + } + return result; +} +function wrap(property) { + var wrapped = property; + if (!wrapped.startsWith('"')) { + wrapped = '"' + wrapped; + } + if (!wrapped.endsWith('"')) { + wrapped = wrapped + '"'; + } + return wrapped; +} +function unwrap(property) { + // Remove single and double quotes if they exist in property name + return property.replace(/^'|'$/g, '').replace(/^"|"$/g, ''); +} +// really could use some refactoring to enable better typing, right now it's recursive and calls itself with so many different types / return types +function write(filter) { + switch (filter.type) { + // spatialClass + case 'BBOX': + var xmin = filter.value[0], ymin = filter.value[1], xmax = filter.value[2], ymax = filter.value[3]; + return ('BBOX(' + + wrap(filter.property) + + ',' + + xmin + + ',' + + ymin + + ',' + + xmax + + ',' + + ymax + + ')'); + // verified line, polygon, point radius + case 'DWITHIN': + return "DWITHIN(".concat(wrap(filter.property), ", ").concat(filter.value, ", ").concat(filter.distance, ", meters)"); + // unused at the moment + case 'WITHIN': + return ('WITHIN(' + wrap(filter.property) + ', ' + write(filter.value) + ')'); + // verified bbox + case 'INTERSECTS': + return 'INTERSECTS(' + wrap(filter.property) + ', ' + filter.value + ')'; + // unused at the moment + case 'CONTAINS': + return ('CONTAINS(' + wrap(filter.property) + ', ' + write(filter.value) + ')'); + // all "geo" filters pass through this first, which serializes them into a form that cql understands + // this is only done here on the fly because the transformation involves a loss of information + // (such as the units [meters or miles?] and coordinate system [dms or mgrs?]) + case 'GEOMETRY': + return write(serialize.location(filter.property, filter.value)); + // logicalClass + case 'AND': + case 'OR': + var res = '('; + var first = true; + for (var i = 0; i < filter.filters.length; i++) { + var writtenFilter = write(filter.filters[i]); + if (writtenFilter) { + if (first) { + first = false; + } + else { + res += ') ' + filter.type + ' ('; + } + res += writtenFilter; + } + } + return res + ')'; + case 'NOT': + // TODO: deal with precedence of logical operators to + // avoid extra parentheses (not urgent) + return 'NOT (' + write(filter.filters[0]) + ')'; + // comparisonClass + case 'IS NULL': + return "(\"".concat(filter.property, "\" ").concat(filter.type, ")"); + case 'BETWEEN': + return (wrap(filter.property) + + ' BETWEEN ' + + write(Math.min(filter.value.start, filter.value.end)) + + ' AND ' + + write(Math.max(filter.value.start, filter.value.end))); + case '=': + case '<>': + case '<': + case '<=': + case '>': + case '>=': + case 'LIKE': + case 'ILIKE': + var property = typeof filter.property === 'object' + ? write(filter.property) + : wrap(unwrap(filter.property)); // unwrap first, because technically only "" is supported (so swap '' for "") + if (filter.value === null) { + return "".concat(property, " ").concat(filter.type); + } + return "".concat(property, " ").concat(filter.type, " ").concat(unwrap(filter.property) === 'id' + ? "'".concat(filter.value, "'") + : write(filter.value)); // don't escape ids + // temporalClass + case 'RELATIVE': + // weird thing I noticed is you have to wrap the value in single quotes, double quotes don't work + return "".concat(wrap(filter.property), " = '").concat(serialize.dateRelative(filter.value), "'"); + case 'AROUND': + return "".concat(wrap(filter.property), " ").concat(serialize.dateAround(filter.value)); + case 'BEFORE': + case 'AFTER': + return (wrap(filter.property) + + ' ' + + filter.type + + ' ' + + (filter.value ? filter.value.toString(dateTimeFormat) : "''")); + case 'DURING': + return "".concat(wrap(filter.property), " ").concat(filter.type, " ").concat(filter.value.start, "/").concat(filter.value.end); + // filterFunctionClass + case 'FILTER FUNCTION proximity': + // not sure why we need the = true part but without it the backend fails to parse + return "proximity(".concat(write(filter.property), ",").concat(write(filter.value.distance), ",").concat(write("".concat(filter.value.first, " ").concat(filter.value.second)), ") = true"); + break; + case 'BOOLEAN_TEXT_SEARCH': + var booleanTextSearchFilter = filter.value; + if (booleanTextSearchFilter.error) { + return; + } + else if (booleanTextSearchFilter.cql === '') { + return "(anyText ILIKE '*')"; + } + else { + return booleanTextSearchFilter.cql; + } + break; + case undefined: + if (typeof filter === 'string') { + return translateUserqlToCql("'" + filter.replace(/'/g, "''") + "'"); + } + else if (typeof filter === 'number') { + return String(filter); + } + else if (typeof filter === 'boolean') { + return Boolean(filter); + } + break; + default: + throw new Error("Can't encode: " + filter.type + ' ' + filter); + } +} +function simplifyFilters(cqlAst) { + for (var i = 0; i < cqlAst.filters.length; i++) { + if (simplifyAst(cqlAst.filters[i], cqlAst)) { + cqlAst.filters.splice.apply(cqlAst.filters, [i, 1].concat(cqlAst.filters[i].filters)); + } + } + return cqlAst; +} +/** + * The current read function for cql produces an unoptimized tree. While it's possible we could + * fix the output there, I'm not sure of how. It ends up producing very nested filter trees from + * relatively simple cql. + * @param cqlAst + * @param parentNode + */ +function simplifyAst(cqlAst, parentNode) { + if (!isFilterBuilderClass(cqlAst) && parentNode) { + return false; + } + else if (!parentNode) { + if (isFilterBuilderClass(cqlAst)) { + simplifyFilters(cqlAst); + } + return cqlAst; + } + else { + simplifyFilters(cqlAst); + if (cqlAst.type === parentNode.type && !cqlAst.negated) { + // these are the only simplifications we can make based on boolean algebra rules + return true; + } + else { + return false; + } + } +} +function uncollapseNOTs(_a) { + var cqlAst = _a.cqlAst; + if (isFilterBuilderClass(cqlAst)) { + if (cqlAst.negated) { + return new CQLStandardFilterBuilderClass({ + type: 'NOT', + filters: [ + new CQLStandardFilterBuilderClass({ + type: cqlAst.type, + filters: cqlAst.filters.map(function (filter) { + return uncollapseNOTs({ cqlAst: filter }); + }), + }), + ], + }); + } + else { + return new CQLStandardFilterBuilderClass({ + type: cqlAst.type, + filters: cqlAst.filters.map(function (filter) { + return uncollapseNOTs({ cqlAst: filter }); + }), + }); + } + } + else { + if (cqlAst.negated) { + var clonedFieldFilter = _cloneDeep(cqlAst); + return new CQLStandardFilterBuilderClass({ + type: 'NOT', + filters: [ + new CQLStandardFilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass(__assign({}, clonedFieldFilter)), + ], + }), + ], + }); + } + else { + return cqlAst; + } + } +} +function getDataTypesConfigurationUsingStartupStore() { + return getDataTypesConfiguration({ + Configuration: StartupDataStore.Configuration, + MetacardDefinitions: StartupDataStore.MetacardDefinitions, + }); +} +function handleAllFilterTypes(cqlAst) { + if (isCQLStandardFilterBuilderClass(cqlAst) || isFilterBuilderClass(cqlAst)) { + return new CQLStandardFilterBuilderClass({ + type: cqlAst.type, + filters: cqlAst.filters.map(function (filter) { return handleAllFilterTypes(filter); }), + }); + } + else if (isBasicDatatypeClass(cqlAst)) { + var dataTypeConfiguration_1 = getDataTypesConfigurationUsingStartupStore(); + var datatypeFilters_1 = []; + cqlAst.value.map(function (value) { + var relevantAttributes = dataTypeConfiguration_1.valueMap[value]; + if (relevantAttributes) { + Object.keys(relevantAttributes.attributes).map(function (attribute) { + var relevantValues = relevantAttributes.attributes[attribute]; + relevantValues.forEach(function (relevantValue) { + datatypeFilters_1.push(new FilterClass({ + property: attribute, + value: relevantValue, + type: 'ILIKE', + })); + }); + }); + } + }); + return new CQLStandardFilterBuilderClass({ + type: 'AND', + filters: [ + new CQLStandardFilterBuilderClass({ + type: 'OR', + filters: datatypeFilters_1, + }), + ], + }); + } + else if (isResourceSizeFilterClass(cqlAst)) { + var bytesValue = convertResourceSizeFilterClassValueToBytes(cqlAst); + return new FilterClass(__assign(__assign({}, cqlAst), { value: bytesValue })); + } + else if (isResourceSizeRangeFilterClass(cqlAst)) { + var bytesValue = convertResourceSizeRangeFilterClassValueToBytes(cqlAst); + return new FilterClass(__assign(__assign({}, cqlAst), { value: bytesValue })); + } + else { + return cqlAst; + } +} +/** + * For now, all this does is remove anyDate from cql since that's purely for the UI to track the query basic view state correctly. + * We might want to reconsider how we do the basic query in order to avoid this necessity (it's really the checkbox). + * + * This will only ever happen with a specific structure, so we don't need to recurse or anything. + */ +function removeInvalidFilters(cqlAst) { + // loop over filters, splicing out invalid ones, at end of loop if all filters gone, remove self? + if (isFilterBuilderClass(cqlAst) || + shouldBeFilterBuilderClass(cqlAst) || + isCQLStandardFilterBuilderClass(cqlAst)) { + var i = cqlAst.filters.length; + while (i--) { + var currentFilter = cqlAst.filters[i]; + var validFilter = removeInvalidFilters(currentFilter); + if (!validFilter) { + cqlAst.filters.splice(i, 1); + } + } + if (cqlAst.filters.length === 0) { + return false; + } + } + else { + if (cqlAst.property === 'anyDate') { + return false; + } + if (cqlAst.type === 'BOOLEAN_TEXT_SEARCH') { + var booleanTextValue = cqlAst.value; + if (booleanTextValue.error) { + return false; + } + } + } + return cqlAst; +} +function iterativelySimplify(cqlAst) { + var prevAst = _cloneDeep(cqlAst); + simplifyAst(cqlAst); + while (JSON.stringify(prevAst) !== JSON.stringify(cqlAst)) { + prevAst = _cloneDeep(cqlAst); + simplifyAst(cqlAst); + } + return cqlAst; +} +export default { + /** + * This function should be used only to test reconstitution, or as a last resort to handle upgrades from a system where the filter tree is + * no longer compatible. No loss of accuracy will occur, but nice UX touches like remembering coordinate systems and units will. + * + * Also, it may group things slightly different (we do our best effort, but the postfix notation technically causes parens around everything, and from there + * we do a simplification, which means the resulting filter tree may look simpler than you remember). However, once again, the accuracy and + * results returned by the search will remain the same. + * @param cql + */ + read: function (cql) { + if (cql === undefined || cql.length === 0) { + return new FilterBuilderClass({ + type: 'AND', + filters: [], + }); + } + // if anything goes wrong, simply log the error and move on (return a default filter tree). + try { + var reconstructedFilter = this.simplify(buildAst(tokenize(cql))); + if (isFilterBuilderClass(reconstructedFilter) || + shouldBeFilterBuilderClass(reconstructedFilter)) { + return new FilterBuilderClass(reconstructedFilter); + } + else { + return new FilterBuilderClass({ + type: 'AND', + filters: [reconstructedFilter], + }); + } + } + catch (err) { + console.error(err); + return new FilterBuilderClass({ type: 'AND', filters: [] }); + } + }, + write: function (filter) { + try { + var standardCqlAst = handleAllFilterTypes(uncollapseNOTs({ + cqlAst: filter, + })); + removeInvalidFilters(standardCqlAst); + return write(standardCqlAst); + } + catch (err) { + console.error(err); + return write(new FilterBuilderClass({ + type: 'AND', + filters: [], + })); + } + }, + removeInvalidFilters: removeInvalidFilters, + simplify: function (cqlAst) { + return iterativelySimplify(cqlAst); + }, + translateCqlToUserql: translateCqlToUserql, + translateUserqlToCql: translateUserqlToCql, + ANYTEXT_WILDCARD: ANYTEXT_WILDCARD, + getGeoFilters: getGeoFilters, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3FsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL2NxbC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSjs7OytCQUcrQjtBQUMvQixPQUFPLEVBRUwsNkJBQTZCLEVBQzdCLFdBQVcsRUFDWCxrQkFBa0IsRUFDbEIsV0FBVyxFQUNYLG9CQUFvQixFQUNwQixvQkFBb0IsRUFDcEIsK0JBQStCLEVBQy9CLFNBQVMsRUFDVCwwQkFBMEIsRUFFMUIsMENBQTBDLEVBQzFDLHlCQUF5QixFQUN6Qiw4QkFBOEIsRUFDOUIsK0NBQStDLEdBQ2hELE1BQU0sOENBQThDLENBQUE7QUFDckQsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sOERBQThELENBQUE7QUFDeEcsT0FBTyxRQUFRLE1BQU0sWUFBWSxDQUFBO0FBQ2pDLE9BQU8sVUFBVSxNQUFNLGtCQUFrQixDQUFBO0FBQ3pDLE9BQU8sR0FBRyxNQUFNLEtBQUssQ0FBQTtBQUNyQixPQUFPLEVBQUUsZ0JBQWdCLEVB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xlbmd0aClcbiAgICAgICAgaWYgKGlkeCA+IC0xKSB7XG4gICAgICAgICAgbGV0IGRlcHRoID0gMVxuICAgICAgICAgIHdoaWxlIChpZHggPCBsZW4gJiYgZGVwdGggPiAwKSB7XG4gICAgICAgICAgICBpZHgrK1xuICAgICAgICAgICAgc3dpdGNoICh0ZXh0LmNoYXJBdChpZHgpKSB7XG4gICAgICAgICAgICAgIGNhc2UgJygnOlxuICAgICAgICAgICAgICAgIGRlcHRoKytcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICBjYXNlICcpJzpcbiAgICAgICAgICAgICAgICBkZXB0aC0tXG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgLy8gaW4gZGVmYXVsdCBjYXNlLCBkbyBub3RoaW5nXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBbdGV4dC5zdWJzdHIoMCwgaWR4ICsgMSldXG4gICAgICB9XG4gICAgICByZXR1cm4gbnVsbFxuICAgIH0sXG4gICAgRU5EOiAvXiQvLFxuICB9IGFzIFJlY29yZDxQYXR0ZXJuTmFtZXNUeXBlIHwgJ0VORCcsIFBhdHRlcm5SZXR1cm5UeXBlPixcbiAgZm9sbG93cyA9IHtcbiAgICBST09UX05PREU6IFtcbiAgICAgICdOT1QnLFxuICAgICAgJ0dFT01FVFJZJyxcbiAgICAgICdTUEFUSUFMJyxcbiAgICAgICdGSUxURVJfRlVOQ1RJT04nLFxuICAgICAgJ1BST1BFUlRZJyxcbiAgICAgICdMUEFSRU4nLFxuICAgIF0sXG4gICAgTFBBUkVOOiBbXG4gICAgICAnTk9UJyxcbiAgICAgICdHRU9NRVRSWScsXG4gICAgICAnU1BBVElBTCcsXG4gICAgICAnRklMVEVSX0ZVTkNUSU9OJyxcbiAgICAgICdQUk9QRVJUWScsXG4gICAgICAnVkFMVUUnLFxuICAgICAgJ0xQ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VlWzBdLFxuICAgICAgICB5bWluID0gZmlsdGVyLnZhbHVlWzFdLFxuICAgICAgICB4bWF4ID0gZmlsdGVyLnZhbHVlWzJdLFxuICAgICAgICB5bWF4ID0gZmlsdGVyLnZhbHVlWzNdXG4gICAgICByZXR1cm4gKFxuICAgICAgICAnQkJPWCgnICtcbiAgICAgICAgd3JhcChmaWx0ZXIucHJvcGVydHkpICtcbiAgICAgICAgJywnICtcbiAgICAgICAgeG1pbiArXG4gICAgICAgICcsJyArXG4gICAgICAgIHltaW4gK1xuICAgICAgICAnLCcgK1xuICAgICAgICB4bWF4ICtcbiAgICAgICAgJywnICtcbiAgICAgICAgeW1heCArXG4gICAgICAgICcpJ1xuICAgICAgKVxuICAgIC8vIHZlcmlmaWVkIGxpbmUsIHBvbHlnb24sIHBvaW50IHJhZGl1c1xuICAgIGNhc2UgJ0RXSVRISU4nOlxuICAgICAgcmV0dXJuIGBEV0lUSElOKCR7d3JhcChmaWx0ZXIucHJvcGVydHkpfSwgJHtmaWx0ZXIudmFsdWV9LCAke1xuICAgICAgICBmaWx0ZXIuZGlzdGFuY2VcbiAgICAgIH0sIG1ldGVycylgXG4gICAgLy8gdW51c2VkIGF0IHRoZSBtb21lbnRcbiAgICBjYXNlICdXSVRISU4nOlxuICAgICAgcmV0dXJuIChcbiAgICAgICAgJ1dJVEhJTignICsgd3JhcChmaWx0ZXIucHJvcGVydHkpICsgJywgJyArIHdyaXRlKGZpbHRlci52YWx1ZSkgKyAnKSdcbiAgICAgIClcbiAgICAvLyB2ZXJpZmllZCBiYm94XG4gICAgY2FzZSAnSU5URVJTRUNUUyc6XG4gICAgICByZXR1cm4gJ0lOVEVSU0VDVFMoJyArIHdyYXAoZmlsdGVyLnByb3BlcnR5KSArICcsICcgKyBmaWx0ZXIudmFsdWUgKyAnKSdcbiAgICAvLyB1bnVzZWQgYXQgdGhlIG1vbWVudFxuICAgIGNhc2UgJ0NPTlRBSU5TJzpcbiAgICAgIHJldHVybiAoXG4gICAgICA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biAgICByZXR1cm4gaXRlcmF0aXZlbHlTaW1wbGlmeShjcWxBc3QpXG4gIH0sXG4gIHRyYW5zbGF0ZUNxbFRvVXNlcnFsLFxuICB0cmFuc2xhdGVVc2VycWxUb0NxbCxcbiAgQU5ZVEVYVF9XSUxEQ0FSRCxcbiAgZ2V0R2VvRmlsdGVycyxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/cql.spec.d.ts b/src/main/webapp/js/cql.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/cql.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/cql.spec.js b/src/main/webapp/js/cql.spec.js new file mode 100644 index 00000000000..142c049f71c --- /dev/null +++ b/src/main/webapp/js/cql.spec.js @@ -0,0 +1,1395 @@ +import { __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import { FilterBuilderClass, FilterClass, } from '../component/filter-builder/filter.structure'; +import cql from './cql'; +import { StartupDataStore } from './model/Startup/startup'; +var DatatypesJSONConfig = { + groups: { + Object: { + iconConfig: { + class: 'fa fa-file-text-o', + }, + values: { + Person: { + attributes: { + description: ['person'], + }, + iconConfig: { + class: 'fa fa-user', + }, + }, + Group: { + attributes: { + description: ['group'], + }, + iconConfig: { + class: 'fa fa-users', + }, + }, + Equipment: { + attributes: { + description: ['equipment'], + }, + iconConfig: { + class: 'fa fa-wrench', + }, + }, + Platform: { + attributes: { + description: ['platform'], + }, + iconConfig: { + class: 'fa fa-industry', + }, + }, + Facility: { + attributes: { + description: ['facility'], + }, + iconConfig: { + class: 'fa fa-building', + }, + }, + }, + }, + Happenings: { + iconConfig: { + class: 'fa fa-bolt', + }, + values: { + Civil: { + attributes: { + description: ['civil'], + }, + iconConfig: { + class: 'fa fa-university', + }, + }, + Military: { + attributes: { + description: ['military'], + }, + iconConfig: { + class: 'fa fa-shield', + }, + }, + Political: { + attributes: { + description: ['political'], + }, + iconConfig: { + class: 'fa fa-balance-scale', + }, + }, + Natural: { + attributes: { + description: ['natural'], + }, + iconConfig: { + class: 'fa fa-leaf', + }, + }, + Other: { + attributes: { + description: ['other'], + }, + }, + }, + }, + 'Visual Media': { + iconConfig: { + class: 'fa fa-camera-retro', + }, + values: { + Image: { + attributes: { + datatype: ['Image'], + }, + iconConfig: { + class: 'fa fa-picture-o', + }, + }, + 'Moving Image': { + attributes: { + datatype: ['Moving Image'], + }, + iconConfig: { + class: 'fa fa-film', + }, + }, + 'Still Image': { + attributes: { + datatype: ['Still Image'], + }, + iconConfig: { + class: 'fa fa-camera-retro', + }, + }, + }, + }, + }, +}; +/** + * Test all the capabilities (without boolean logic involved). + * + * left is input, right is expected output (can differ, we do our best effort but ultimately simplifying can change things!) + * categorized by types so make this easier to maintain and update as needed + */ +var cqlCapabilityStrings = { + strings: [ + "(\"anyText\" ILIKE '1')", + "(\"anyText\" LIKE '1')", + "(\"anyText\" = '1')", + "(proximity('anyText',2,'second first') = true)", + "((\"title\" IS NULL))", + ], + numbers: [ + "(\"media.width-pixels\" > 0)", + "(\"media.width-pixels\" < 0)", + "(\"media.width-pixels\" = 0)", + "(\"media.width-pixels\" >= 0)", + "(\"media.width-pixels\" <= 0)", + "(\"media.width-pixels\" BETWEEN 0 AND 1)", + "((\"media.width-pixels\" IS NULL))", + ], + dates: [ + "(\"modified\" BEFORE 2020-12-10T20:31:03.388Z)", + "(\"modified\" AFTER 2020-12-10T20:31:03.388Z)", + "(\"modified\" = 'RELATIVE(PT1S)')", + "(\"modified\" = 'RELATIVE(PT1M)')", + "(\"modified\" = 'RELATIVE(PT1H)')", + "(\"modified\" = 'RELATIVE(P1D)')", + "(\"modified\" = 'RELATIVE(P7D)')", + "(\"modified\" = 'RELATIVE(P1M)')", + "(\"modified\" = 'RELATIVE(P1Y)')", + "((\"created\" IS NULL))", + ], + booleans: [ + "(\"enterprise\" = false)", + "(\"enterprise\" = true)", + "((\"enterprise\" IS NULL))", + ], + geometries: [ + "((\"location\" IS NULL))", + "(INTERSECTS(\"anyGeo\", LINESTRING(-1.385015 11.713654,-2.691833 0.382483,-10.326418 8.220109)))", + "(DWITHIN(\"anyGeo\", LINESTRING(-1.719894 11.760274,-1.611331 3.939398,-8.774062 7.567764), 500, meters))", + "(INTERSECTS(\"anyGeo\", POLYGON((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094))))", + "(DWITHIN(\"anyGeo\", POLYGON((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094)), 500, meters))", + "(DWITHIN(\"anyGeo\", POINT(-2.703933 4.726838), 523283.971121, meters))", + ], +}; +var cqlMultipolygonStrings = { + geometries: [ + { + input: "(INTERSECTS(\"anyGeo\", \n MULTIPOLYGON(\n ((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094)), \n ((0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,0.580634 10.295094)),\n ((10 10,-10 -10,-10 10,10 10))\n )))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + polygon: [ + [-0.580634, 10.295094], + [0.577341, -1.188461], + [-5.041638, -1.100891], + [-0.580634, 10.295094], + ], + type: 'POLYGON', + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + polygon: [ + [0.580634, 10.295094], + [0.577341, -1.188461], + [-5.041638, -1.100891], + [0.580634, 10.295094], + ], + type: 'POLYGON', + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + polygon: [ + [10, 10], + [-10, -10], + [-10, 10], + [10, 10], + ], + type: 'POLYGON', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(INTERSECTS(\"anyGeo\", MULTIPOLYGON(((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094)))))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + polygon: [ + [-0.580634, 10.295094], + [0.577341, -1.188461], + [-5.041638, -1.100891], + [-0.580634, 10.295094], + ], + type: 'POLYGON', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", MULTIPOLYGON(((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094))), 500, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + polygon: [ + [-0.580634, 10.295094], + [0.577341, -1.188461], + [-5.041638, -1.100891], + [-0.580634, 10.295094], + ], + polygonBufferWidth: '500', + type: 'POLYGON', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(INTERSECTS(\"anyGeo\", MULTIPOLYGON(((17.704563951827325 26.80670872544821,26.69962466928798 14.956073177047667,9.280618200554649 15.313020030915167,17.704563951827325 26.80670872544821))))) OR (INTERSECTS(\"anyGeo\", MULTIPOLYGON(((37.62219839763307 22.095010254397405,48.83032960907214 32.5892477581015,50.68645324918305 21.09555906356843,40.19221574547897 17.31192241257309,37.62219839763307 22.095010254397405)))))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + polygon: [ + [17.704563951827325, 26.80670872544821], + [26.69962466928798, 14.956073177047667], + [9.280618200554649, 15.313020030915167], + [17.704563951827325, 26.80670872544821], + ], + type: 'POLYGON', + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + polygon: [ + [37.62219839763307, 22.095010254397405], + [48.83032960907214, 32.5892477581015], + [50.68645324918305, 21.09555906356843], + [40.19221574547897, 17.31192241257309], + [37.62219839763307, 22.095010254397405], + ], + type: 'POLYGON', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + ], +}; +var cqlPointStrings = { + geometries: [ + { + input: "(INTERSECTS(\"anyGeo\", POINT(10 20)))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + lat: 20, + lon: 10, + type: 'POINTRADIUS', + }, + }, + ], + negated: false, + type: 'AND', + }, + }, + { + input: "(INTERSECTS(\"anyGeo\", MULTIPOINT(10 20, 5 5)))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + lat: 20, + lon: 10, + type: 'POINTRADIUS', + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + lat: 5, + lon: 5, + type: 'POINTRADIUS', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", POINT(10 20), 100, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + lat: 20, + lon: 10, + radius: '100', + type: 'POINTRADIUS', + }, + }, + ], + negated: false, + type: 'AND', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", MULTIPOINT(10 20), 100, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + lat: 20, + lon: 10, + radius: '100', + type: 'POINTRADIUS', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", MULTIPOINT(10 20, 5 5), 100, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + lat: 20, + lon: 10, + radius: '100', + type: 'POINTRADIUS', + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + lat: 5, + lon: 5, + radius: '100', + type: 'POINTRADIUS', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + ], +}; +var cqlLinestrings = { + geometries: [ + { + input: "(INTERSECTS(\"anyGeo\", LINESTRING(10 20, 30 30, 40 20)))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + line: [ + [10, 20], + [30, 30], + [40, 20], + ], + }, + }, + ], + negated: false, + type: 'AND', + }, + }, + { + input: "(INTERSECTS(\"anyGeo\", MULTILINESTRING((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + line: [ + [10, 10], + [20, 20], + [10, 40], + ], + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + line: [ + [40, 40], + [30, 30], + [40, 20], + [30, 10], + ], + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", LINESTRING(10 20, 30 30, 40 20), 1000, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + lineWidth: '1000', + line: [ + [10, 20], + [30, 30], + [40, 20], + ], + }, + }, + ], + negated: false, + type: 'AND', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", MULTILINESTRING((10 10, 20 20, 10 40)), 1000, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + lineWidth: '1000', + line: [ + [10, 10], + [20, 20], + [10, 40], + ], + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", MULTILINESTRING((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10)), 1000, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + lineWidth: '1000', + line: [ + [10, 10], + [20, 20], + [10, 40], + ], + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + lineWidth: '1000', + line: [ + [40, 40], + [30, 30], + [40, 20], + [30, 10], + ], + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + ], +}; +var cqlGeometryCollections = { + geometries: [ + { + input: "(INTERSECTS(\"anyGeo\", GEOMETRYCOLLECTION(POINT(10 20), LINESTRING(30 30, 40 20))))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + type: 'POINTRADIUS', + lat: 20, + lon: 10, + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + line: [ + [30, 30], + [40, 20], + ], + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(INTERSECTS(\"anyGeo\", GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 20)), LINESTRING(30 30, 40 20))))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + type: 'POINTRADIUS', + lat: 20, + lon: 10, + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + line: [ + [30, 30], + [40, 20], + ], + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", GEOMETRYCOLLECTION(POINT(10 20)), 1000, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'circle', + type: 'POINTRADIUS', + lat: 20, + lon: 10, + radius: '1000', + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + { + input: "(DWITHIN(\"anyGeo\", GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((10 20, 15 18, 5 9, 10 20))), LINESTRING(30 30, 40 20)), 1000, meters))", + output: { + filters: [ + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'poly', + type: 'POLYGON', + polygonBufferWidth: '1000', + polygon: [ + [10, 20], + [15, 18], + [5, 9], + [10, 20], + ], + }, + }, + { + context: undefined, + negated: false, + property: 'anyGeo', + type: 'GEOMETRY', + value: { + mode: 'line', + type: 'LINE', + lineWidth: '1000', + line: [ + [30, 30], + [40, 20], + ], + }, + }, + ], + negated: false, + type: 'OR', + }, + }, + ], +}; +/** + * Same as above, but this goes beyond just testing functions, it tests the boolean logic + * + * The different section is for things that technically can be simplified by boolean logic. Due to how reconstitution works, utilizing postfix, we are forced to simplify. If we didn't, things would get super nested (lookup postfix notation for more on why). So in some cases, we might simplify beyond the expectation. The two results will have parity though since we follow boolean algebra rules. + */ +var cqlBooleanLogicStrings = { + same: [ + "(\"anyText\" ILIKE '1') AND (\"anyText\" ILIKE '2')", + "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2')", + "(\"anyText\" ILIKE '1') OR (NOT ((\"anyText\" ILIKE '2')))", + "NOT ((\"anyText\" ILIKE '%') AND (NOT ((\"anyText\" ILIKE ''))))", + "(NOT ((\"anyText\" ILIKE '1'))) OR (NOT ((\"anyText\" ILIKE '2')))", + "NOT ((NOT ((\"anyText\" ILIKE '1'))) OR (NOT ((\"anyText\" ILIKE '2'))))", + "NOT ((\"anyText\" ILIKE '1') OR (NOT ((\"anyText\" ILIKE '2'))))", + "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (NOT ((\"anyText\" ILIKE '')))", + "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (NOT ((NOT ((\"anyText\" ILIKE '')))))", + "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR ((\"anyText\" ILIKE '') AND (\"anyText\" ILIKE ''))", + "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (NOT ((\"anyText\" ILIKE '') OR (\"anyText\" ILIKE '')))", + "NOT ((\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (NOT ((\"anyText\" ILIKE '') OR (\"anyText\" ILIKE ''))))", + "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (NOT ((\"anyText\" ILIKE '') OR (\"anyText\" ILIKE '')))", + "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (NOT ((\"anyText\" ILIKE '') OR (\"anyText\" ILIKE '') OR ((\"anyText\" ILIKE '') AND (\"anyText\" ILIKE ''))))", + ], + different: [ + { + input: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR ((\"anyText\" ILIKE ''))", + output: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (\"anyText\" ILIKE '')", + }, + { + input: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR ((NOT ((\"anyText\" ILIKE ''))))", + output: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (NOT ((\"anyText\" ILIKE '')))", + }, + { + input: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR ((\"anyText\" ILIKE '') OR (\"anyText\" ILIKE ''))", + output: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (\"anyText\" ILIKE '') OR (\"anyText\" ILIKE '')", + }, + { + input: "NOT ((\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR ((\"anyText\" ILIKE '') OR (\"anyText\" ILIKE '')))", + output: "NOT ((\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (\"anyText\" ILIKE '') OR (\"anyText\" ILIKE ''))", + }, + { + input: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR ((\"anyText\" ILIKE '') OR (\"anyText\" ILIKE '') OR ((\"anyText\" ILIKE '') AND (\"anyText\" ILIKE '')))", + output: "(\"anyText\" ILIKE '1') OR (\"anyText\" ILIKE '2') OR (\"anyText\" ILIKE '') OR (\"anyText\" ILIKE '') OR ((\"anyText\" ILIKE '') AND (\"anyText\" ILIKE ''))", + }, + { + input: "NOT ((\"anyText\" ILIKE '%') AND (NOT ((\"anyText\" ILIKE '5') AND ((NOT ((\"anyText\" ILIKE '1'))) AND (\"anyText\" ILIKE '3')) AND (NOT ((\"anyText\" ILIKE '4'))))))", + output: "NOT ((\"anyText\" ILIKE '%') AND (NOT ((\"anyText\" ILIKE '5') AND (NOT ((\"anyText\" ILIKE '1'))) AND (\"anyText\" ILIKE '3') AND (NOT ((\"anyText\" ILIKE '4'))))))", + }, + ], +}; +describe('read & write parity for capabilities, as well as boolean logic', function () { + it('TEST GET GEO FILTERS', function () { + var wkt = 'GEOMETRYCOLLECTION(POINT(50 40), LINESTRING(10 20, 40 50))'; + cql.getGeoFilters(wkt, 'anyGeo', '100'); + expect('test-value', 'Adding bogus expectation.').to.equal('test-value'); + }); + it('TEST LINESTRING FILTERS', function () { + var wkt = 'LINESTRING(10 20, 40 50)'; + cql.getGeoFilters(wkt, 'anyGeo', '100'); + expect('test-value', 'Adding bogus expectation.').to.equal('test-value'); + }); + describe('test all capabilities', function () { + for (var type in cqlCapabilityStrings) { + cqlCapabilityStrings[type].forEach(function (capability) { + it("".concat(capability), function () { + expect(capability, 'Unexpected filter value.').to.equal(cql.write(cql.read(capability))); + }); + }); + } + }); + describe('test all logic', function () { + describe('where things stay the same (already simplified)', function () { + cqlBooleanLogicStrings['same'].forEach(function (input) { + it("".concat(input), function () { + expect(input, 'Unexpected filter value.').to.equal(cql.write(cql.read(input))); + }); + }); + }); + describe('where things differ (they get simplified)', function () { + cqlBooleanLogicStrings['different'].forEach(function (inputOutputPair) { + it("".concat(inputOutputPair.input), function () { + expect(inputOutputPair.output, 'Unexpected filter value.').to.equal(cql.write(cql.read(inputOutputPair.input))); + }); + }); + }); + }); + describe('test corner cases / special', function () { + it('it handles escaping _ in properties that are not id', function () { + var value = '12123123_123213123'; + var originalFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: '=', + property: 'title', + value: value, + }), + ], + }); + var cqlText = cql.write(originalFilter); + var newFilter = cql.read(cqlText); + var filterToCheck = newFilter.filters[0]; + expect(cqlText, "Doesn't escape properly").to.equal('("title" = \'12123123\\_123213123\')'); + expect(filterToCheck.value).to.equal(value); + }); + it('it handles escaping _ in properties that are id', function () { + var value = '12123123_123213123'; + var originalFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: '=', + property: 'id', + value: value, + }), + ], + }); + var cqlText = cql.write(originalFilter); + var newFilter = cql.read(cqlText); + var filterToCheck = newFilter.filters[0]; + expect(cql.write(originalFilter), "Doesn't escape properly").to.equal('("id" = \'12123123_123213123\')'); + expect(filterToCheck.value).to.equal(value); + }); + it('it handles escaping _ in properties that are "id" (double wrapped!)', function () { + var value = '12123123_123213123'; + var originalFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: '=', + property: '"id"', + value: value, + }), + ], + }); + var cqlText = cql.write(originalFilter); + var newFilter = cql.read(cqlText); + var filterToCheck = newFilter.filters[0]; + expect(cql.write(originalFilter), "Doesn't escape properly").to.equal('("id" = \'12123123_123213123\')'); + expect(filterToCheck.value).to.equal(value); + }); + it("it handles escaping _ in properties that are 'id' (double wrapped!)", function () { + var value = '12123123_123213123'; + var originalFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: '=', + property: "'id'", + value: value, + }), + ], + }); + var cqlText = cql.write(originalFilter); + var newFilter = cql.read(cqlText); + var filterToCheck = newFilter.filters[0]; + expect(cql.write(originalFilter), "Doesn't escape properly").to.equal('("id" = \'12123123_123213123\')'); + expect(filterToCheck.value).to.equal(value); + }); + }); + describe('invalid filters get removed', function () { + it('handles typical anyDate removal', function () { + var testFilter = new FilterBuilderClass({ + filters: [ + new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + property: 'anyDate', + value: '', + type: 'BEFORE', + }), + ], + }), + new FilterClass({ + property: 'anyText', + value: '*', + type: 'ILIKE', + }), + ], + type: 'OR', + }); + expect(cql.write(testFilter)).to.equal("(\"anyText\" ILIKE '%')"); + }); + it('handles empty reserved.basic-datatype', function () { + var testFilter = new FilterBuilderClass({ + filters: [ + new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + property: 'reserved.basic-datatype', + value: [], + type: 'ILIKE', + }), + ], + }), + new FilterClass({ + property: 'anyText', + value: '*', + type: 'ILIKE', + }), + ], + type: 'OR', + }); + expect(cql.write(testFilter)).to.equal("(\"anyText\" ILIKE '%')"); + }); + it('handles invalid values in reserved.basic-datatype', function () { + var testFilter = new FilterBuilderClass({ + filters: [ + new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + property: 'reserved.basic-datatype', + value: ['bogus'], + type: 'ILIKE', + }), + ], + }), + new FilterClass({ + property: 'anyText', + value: '*', + type: 'ILIKE', + }), + ], + type: 'OR', + }); + expect(cql.write(testFilter)).to.equal("(\"anyText\" ILIKE '%')"); + }); + it('handles invalid values mixed with valid values in reserved.basic-datatype', function () { + if (StartupDataStore.Configuration.config) + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + var testFilter = new FilterBuilderClass({ + filters: [ + new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + property: 'reserved.basic-datatype', + value: ['bogus', 'Person'], + type: 'ILIKE', + }), + ], + }), + new FilterClass({ + property: 'anyText', + value: '*', + type: 'ILIKE', + }), + ], + type: 'OR', + }); + expect(cql.write(testFilter)).to.equal("((((\"description\" ILIKE 'person')))) OR (\"anyText\" ILIKE '%')"); + }); + it('handles anyDate removal', function () { + var testFilter = new FilterBuilderClass({ + filters: [ + new FilterClass({ + property: 'anyDate', + value: '', + type: 'BEFORE', + }), + new FilterClass({ + property: 'anyText', + value: '*', + type: 'ILIKE', + }), + ], + type: 'OR', + }); + expect(cql.write(testFilter)).to.equal("(\"anyText\" ILIKE '%')"); + }); + }); + describe('test reserved.basic-datatype', function () { + it('does handle a simple reserved.basic-datatype', function () { + if (StartupDataStore.Configuration.config) + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + var testFilter = new FilterBuilderClass({ + filters: [ + new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + property: 'reserved.basic-datatype', + value: ['Person', 'Military'], + type: 'ILIKE', + }), + ], + }), + ], + type: 'OR', + }); + expect(cql.write(testFilter)).to.equal("((((\"description\" ILIKE 'person') OR (\"description\" ILIKE 'military'))))"); + }); + it('does handle a negated reserved.basic-datatype', function () { + if (StartupDataStore.Configuration.config) + StartupDataStore.Configuration.config.extra = { + datatypes: DatatypesJSONConfig, + }; + var testFilter = new FilterBuilderClass({ + filters: [ + new FilterBuilderClass({ + negated: true, + type: 'AND', + filters: [ + new FilterClass({ + property: 'reserved.basic-datatype', + value: ['Person', 'Military'], + type: 'ILIKE', + }), + ], + }), + ], + type: 'OR', + }); + expect(cql.write(testFilter)).to.equal("(NOT ((((\"description\" ILIKE 'person') OR (\"description\" ILIKE 'military')))))"); + }); + }); + describe('test boolean search', function () { + it('does handles a simple boolean search', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE '*')", + error: false, + text: '"*"', + }, + }), + ], + }); + expect(cql.write(testFilter)).to.equal("((anyText ILIKE '*'))"); + }); + it('does handles a simple boolean search 2', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat')", + error: false, + text: 'dog or cat', + }, + }), + ], + }); + expect(cql.write(testFilter)).to.equal("((anyText ILIKE 'dog') or (anyText ILIKE 'cat'))"); + }); + it('does handles a simple boolean search that is empty', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "", + error: false, + text: '', + }, + }), + ], + }); + expect(cql.write(testFilter)).to.equal("((anyText ILIKE '*'))"); + }); + it('does handles a simple boolean search with not', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: false, + text: 'dog or cat and not (fish)', + }, + }), + ], + }); + expect(cql.write(testFilter)).to.equal("((anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish'))))"); + }); + it('does handles a simple boolean search other terms', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: false, + text: 'dog or cat and not (fish)', + }, + }), + new FilterBuilderClass({ + type: 'OR', + filters: [ + new FilterClass({ + property: 'datatype', + type: 'ILIKE', + value: 'Moving Image', + }), + new FilterClass({ + property: 'metadata-content-type', + type: 'ILIKE', + value: 'Moving Image', + }), + ], + }), + ], + }); + expect(cql.write(testFilter)).to.equal("((anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))) AND ((\"datatype\" ILIKE 'Moving Image') OR (\"metadata-content-type\" ILIKE 'Moving Image'))"); + }); + it('does handles a simple boolean search other terms and negations', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + negated: true, + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: false, + text: 'dog or cat and not (fish)', + }, + }), + new FilterBuilderClass({ + type: 'OR', + filters: [ + new FilterClass({ + property: 'datatype', + type: 'ILIKE', + value: 'Moving Image', + }), + new FilterClass({ + property: 'metadata-content-type', + type: 'ILIKE', + value: 'Moving Image', + }), + ], + }), + ], + }); + expect(cql.write(testFilter)).to.equal("(NOT (((anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))))) AND ((\"datatype\" ILIKE 'Moving Image') OR (\"metadata-content-type\" ILIKE 'Moving Image'))"); + }); + it('does handles a simple boolean search other terms with interspersed errors', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: true, + text: 'dog or cat and not (fish)', + }, + }), + new FilterBuilderClass({ + type: 'OR', + filters: [ + new FilterClass({ + property: 'datatype', + type: 'ILIKE', + value: 'Moving Image', + }), + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: true, + text: 'dog or cat and not (fish)', + }, + }), + new FilterClass({ + property: 'metadata-content-type', + type: 'ILIKE', + value: 'Moving Image', + }), + ], + }), + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: true, + text: 'dog or cat and not (fish)', + }, + }), + ], + }); + expect(cql.write(testFilter)).to.equal("((\"datatype\" ILIKE 'Moving Image') OR (\"metadata-content-type\" ILIKE 'Moving Image'))"); + }); + it('does handles a simple boolean search other terms with interspersed errors and negations', function () { + var testFilter = new FilterBuilderClass({ + type: 'AND', + negated: true, + filters: [ + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + negated: true, + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: true, + text: 'dog or cat and not (fish)', + }, + }), + new FilterBuilderClass({ + type: 'OR', + filters: [ + new FilterClass({ + property: 'datatype', + type: 'ILIKE', + value: 'Moving Image', + }), + new FilterClass({ + type: 'BOOLEAN_TEXT_SEARCH', + negated: true, + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: true, + text: 'dog or cat and not (fish)', + }, + }), + new FilterClass({ + property: 'metadata-content-type', + type: 'ILIKE', + value: 'Moving Image', + }), + ], + }), + new FilterClass({ + negated: true, + type: 'BOOLEAN_TEXT_SEARCH', + value: { + cql: "(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))", + error: true, + text: 'dog or cat and not (fish)', + }, + }), + ], + }); + expect(cql.write(testFilter)).to.equal("NOT (((\"datatype\" ILIKE 'Moving Image') OR (\"metadata-content-type\" ILIKE 'Moving Image')))"); + }); + }); + describe('multipolygon cql string read test', function () { + cqlMultipolygonStrings.geometries.forEach(function (capability) { + it("".concat(capability), function () { + var filterBuilderClassOutput = cql.read(capability.input); + var filtersArray = []; + filterBuilderClassOutput.filters.forEach(function (filter) { + if (filter instanceof FilterClass) { + var id_1 = filter.id, newFilter = __rest(filter, ["id"]); + filtersArray.push(newFilter); + } + }); + var id = filterBuilderClassOutput.id, expectedOutput = __rest(filterBuilderClassOutput, ["id"]); + expectedOutput.filters = filtersArray; + expect(expectedOutput, 'Unexpected filter value.').to.deep.equal(capability.output); + }); + }); + }); + describe('point and multipoint cql string read test', function () { + cqlPointStrings.geometries.forEach(function (capability) { + it("".concat(capability), function () { + var filterBuilderClassOutput = cql.read(capability.input); + var filtersArray = []; + filterBuilderClassOutput.filters.forEach(function (filter) { + var id = filter.id, newFilter = __rest(filter, ["id"]); + filtersArray.push(newFilter); + }); + var id = filterBuilderClassOutput.id, expectedOutput = __rest(filterBuilderClassOutput, ["id"]); + expectedOutput.filters = filtersArray; + expect(expectedOutput, 'Unexpected filter value.').to.deep.equal(capability.output); + }); + }); + }); + describe('linestring and multilinestring cql string read test', function () { + cqlLinestrings.geometries.forEach(function (capability) { + it("".concat(capability), function () { + var filterBuilderClassOutput = cql.read(capability.input); + var filtersArray = []; + filterBuilderClassOutput.filters.forEach(function (filter) { + var id = filter.id, newFilter = __rest(filter, ["id"]); + filtersArray.push(newFilter); + }); + var id = filterBuilderClassOutput.id, expectedOutput = __rest(filterBuilderClassOutput, ["id"]); + expectedOutput.filters = filtersArray; + expect(expectedOutput, 'Unexpected filter value.').to.deep.equal(capability.output); + }); + }); + }); + describe('geometry collection cql string read test', function () { + cqlGeometryCollections.geometries.forEach(function (capability) { + it("".concat(capability), function () { + var filterBuilderClassOutput = cql.read(capability.input); + var filtersArray = []; + filterBuilderClassOutput.filters.forEach(function (filter) { + var id = filter.id, newFilter = __rest(filter, ["id"]); + filtersArray.push(newFilter); + }); + var id = filterBuilderClassOutput.id, expectedOutput = __rest(filterBuilderClassOutput, ["id"]); + expectedOutput.filters = filtersArray; + expect(expectedOutput, 'Unexpected filter value.').to.deep.equal(capability.output); + }); + }); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3FsLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvY3FsLnNwZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sT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gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLXVzZXJzJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBFcXVpcG1lbnQ6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWydlcXVpcG1lbnQnXSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgICAgIGNsYXNzOiAnZmEgZmEtd3JlbmNoJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBQbGF0Zm9ybToge1xuICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ3BsYXRmb3JtJ10sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWluZHVzdHJ5JyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBGYWNpbGl0eToge1xuICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ2ZhY2lsaXR5J10sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWJ1aWxkaW5nJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9LFxuICAgIEhhcHBlbmluZ3M6IHtcbiAgICAgIGljb25Db25maWc6IHtcbiAgICAgICAgY2xhc3M6ICdmYSBmYS1ib2x0JyxcbiAgICAgIH0sXG4gICAgICB2YWx1ZXM6IHtcbiAgICAgICAgQ2l2aWw6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWydjaXZpbCddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS11bml2ZXJzaXR5JyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBNaWxpdGFyeToge1xuICAgICAgICAgIGF0dHJpYnV0ZXM6IHtcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBbJ21pbGl0YXJ5J10sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLXNoaWVsZCcsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgUG9saXRpY2FsOiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGVzY3JpcHRpb246IFsncG9saXRpY2FsJ10sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWJhbGFuY2Utc2NhbGUnLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIE5hdHVyYWw6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogWyduYXR1cmFsJ10sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWxlYWYnLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIE90aGVyOiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGVzY3JpcHRpb246IFsnb3RoZXInXSxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9LFxuICAgICdWaXN1YWwgTWVkaWEnOiB7XG4gICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgIGNsYXNzOiAnZmEgZmEtY2FtZXJhLXJldHJvJyxcbiAgICAgIH0sXG4gICAgICB2YWx1ZXM6IHtcbiAgICAgICAgSW1hZ2U6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkYXRhdHlwZTogWydJbWFnZSddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1waWN0dXJlLW8nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgICdNb3ZpbmcgSW1hZ2UnOiB7XG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZGF0YXR5cGU6IFsnTW92aW5nIEltYWdlJ10sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBpY29uQ29uZmlnOiB7XG4gICAgICAgICAgICBjbGFzczogJ2ZhIGZhLWZpbG0nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgICdTdGlsbCBJbWFnZSc6IHtcbiAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICBkYXRhdHlwZTogWydTdGlsbCBJbWFnZSddLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgaWNvbkNvbmZpZzoge1xuICAgICAgICAgICAgY2xhc3M6ICdmYSBmYS1jYW1lcmEtcmV0cm8nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG59IGFzIERhdGFUeXBlc0NvbmZpZ3VyYXRpb25cblxudHlwZSBDYXBhYmlsaXR5Q2F0ZWdvcmllc1R5cGUgPVxuICB8ICdzdHJpbmdzJ1xuICB8ICdudW1iZXJzJ1xuICB8ICdkYXRlcydcbiAgfCAnYm9vbGVhbnMnXG4gIHwgJ2dlb21ldHJpZXMnXG5cbi8qKlxuICogVGVzdCBhbGwgdGhlIGNhcGFiaWxpdGllcyAod2l0aG91dCBib29sZWFuIGxvZ2ljIGludm9sdmVkKS5cb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nR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAncG9seScsXG4gICAgICAgICAgICAgIHBvbHlnb246IFtcbiAgICAgICAgICAgICAgICBbLTAuNTgwNjM0LCAxMC4yOTUwOTRdLFxuICAgICAgICAgICAgICAgIFswLjU3NzM0MSwgLTEuMTg4NDYxXSxcbiAgICAgICAgICAgICAgICBbLTUuMDQxNjM4LCAtMS4xMDA4OTFdLFxuICAgICAgICAgICAgICAgIFstMC41ODA2MzQsIDEwLjI5NTA5NF0sXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgIHR5cGU6ICdQT0xZR09OJyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAncG9seScsXG4gICAgICAgICAgICAgIHBvbHlnb246IFtcbiAgICAgICAgICAgICAgICBbMC41ODA2MzQsIDEwLjI5NTA5NF0sXG4gICAgICAgICAgICAgICAgWzAuNTc3MzQxLCAtMS4xODg0NjFdLFxuICAgICAgICAgICAgICAgIFstNS4wNDE2MzgsIC0xLjEwMDg5MV0sXG4gICAgICAgICAgICAgICAgWzAuNTgwNjM0LCAxMC4yOTUwOTRdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICB0eXBlOiAnUE9MWUdPTicsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ3BvbHknLFxuICAgICAgICAgICAgICBwb2x5Z29uOiBbXG4gICAgICAgICAgICAgICAgWzEwLCAxMF0sXG4gICAgICAgICAgICAgICAgWy0xMCwgLTEwXSxcbiAgICAgICAgICAgICAgICBbLTEwLCAxMF0sXG4gICAgICAgICAgICAgICAgWzEwLCAxMF0sXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgIHR5cGU6ICdQT0xZR09OJyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgIHR5cGU6ICdPUicsXG4gICAgICB9LFxuICAgIH0sXG4gICAge1xuICAgICAgaW5wdXQ6IGAoSU5URVJTRUNUUyhcImFueUdlb1wiLCBNVUxUSVBPTFlHT04oKCgtMC41ODA2MzQgMTAuMjk1MDk0LDAuNTc3MzQxIC0xLjE4ODQ2MSwtNS4wNDE2MzggLTEuMTAwODkxLC0wLjU4MDYzNCAxMC4yOTUwOTQpKSkpKWAsXG4gICAgICBvdXRwdXQ6IHtcbiAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGNvbnRleHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgcHJvcGVydHk6ICdhbnlHZW8nLFxuICAgICAgICAgICAgdHlwZTogJ0dFT01FVFJZJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIG1vZGU6ICdwb2x5JyxcbiAgICAgICAgICAgICAgcG9seWdvbjogW1xuICAgICAgICAgICAgICAgIFstMC41ODA2MzQsIDEwLjI5NTA5NF0sXG4gICAgICAgICAgICAgICAgWzAuNTc3MzQxLCAtMS4xODg0NjFdLFxuICAgICAgICAgICAgICAgIFstNS4wNDE2MzgsIC0xLjEwMDg5MV0sXG4gICAgICAgICAgICAgICAgWy0wLjU4MDYzNCwgMTAuMjk1MDk0XSxcbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgdHlwZTogJ1BPTFlHT04nLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgdHlwZTogJ09SJyxcbiAgICAgIH0sXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYChEV0lUSElOKFwiYW55R2VvXCIsIE1VTFRJUE9MWUdPTigoKC0wLjU4MDYzNCAxMC4yOTUwOTQsMC41NzczNDEgLTEuMTg4NDYxLC01LjA0MTYzOCAtMS4xMDA4OTEsLTAuNTgwNjM0IDEwLjI5NTA5NCkpKSwgNTAwLCBtZXRlcnMpKWAsXG4gICAgICBvdXRwdXQ6IHtcbiAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGNvbnRleHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgcHJvcGVydHk6ICdhbnlHZW8nLFxuICAgICAgICAgICAgdHlwZTogJ0dFT01FVFJZJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIG1vZGU6ICdwb2x5JyxcbiAgICAgICAgICAgICAgcG9seWdvbjogW1xuICAgICAgICAgICAgICAgIFstMC41ODA2MzQsIDEwLjI5NTA5NF0sXG4gICAgICAgICAgICAgICAgWzAuNTc3MzQxLCAtMS4xODg0NjFdLFxuICAgICAgICAgICAgICAgIFstNS4wNDE2MzgsIC0xLjEwMDg5MV0sXG4gICAgICAgICAgICAgICAgWy0wLjU4MDYzNCwgMTAuMjk1MDk0XSxcbi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ICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ3BvbHknLFxuICAgICAgICAgICAgICBwb2x5Z29uOiBbXG4gICAgICAgICAgICAgICAgWzE3LjcwNDU2Mzk1MTgyNzMyNSwgMjYuODA2NzA4NzI1NDQ4MjFdLFxuICAgICAgICAgICAgICAgIFsyNi42OTk2MjQ2NjkyODc5OCwgMTQuOTU2MDczMTc3MDQ3NjY3XSxcbiAgICAgICAgICAgICAgICBbOS4yODA2MTgyMDA1NTQ2NDksIDE1LjMxMzAyMDAzMDkxNTE2N10sXG4gICAgICAgICAgICAgICAgWzE3LjcwNDU2Mzk1MTgyNzMyNSwgMjYuODA2NzA4NzI1NDQ4MjFdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICB0eXBlOiAnUE9MWUdPTicsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ3BvbHknLFxuICAgICAgICAgICAgICBwb2x5Z29uOiBbXG4gICAgICAgICAgICAgICAgWzM3LjYyMjE5ODM5NzYzMzA3LCAyMi4wOTUwMTAyNTQzOTc0MDVdLFxuICAgICAgICAgICAgICAgIFs0OC44MzAzMjk2MDkwNzIxNCwgMzIuNTg5MjQ3NzU4MTAxNV0sXG4gICAgICAgICAgICAgICAgWzUwLjY4NjQ1MzI0OTE4MzA1LCAyMS4wOTU1NTkwNjM1Njg0M10sXG4gICAgICAgICAgICAgICAgWzQwLjE5MjIxNTc0NTQ3ODk3LCAxNy4zMTE5MjI0MTI1NzMwOV0sXG4gICAgICAgICAgICAgICAgWzM3LjYyMjE5ODM5NzYzMzA3LCAyMi4wOTUwMTAyNTQzOTc0MDVdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICB0eXBlOiAnUE9MWUdPTicsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnT1InLFxuICAgICAgfSxcbiAgICB9LFxuICBdLFxufVxuXG5jb25zdCBjcWxQb2ludFN0cmluZ3MgPSB7XG4gIGdlb21ldHJpZXM6IFtcbiAgICB7XG4gICAgICBpbnB1dDogYChJTlRFUlNFQ1RTKFwiYW55R2VvXCIsIFBPSU5UKDEwIDIwKSkpYCxcbiAgICAgIG91dHB1dDoge1xuICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2NpcmNsZScsXG4gICAgICAgICAgICAgIGxhdDogMjAsXG4gICAgICAgICAgICAgIGxvbjogMTAsXG4gICAgICAgICAgICAgIHR5cGU6ICdQT0lOVFJBRElVUycsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnQU5EJyxcbiAgICAgIH0sXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYChJTlRFUlNFQ1RTKFwiYW55R2VvXCIsIE1VTFRJUE9JTlQoMTAgMjAsIDUgNSkpKWAsXG4gICAgICBvdXRwdXQ6IHtcbiAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGNvbnRleHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgcHJvcGVydHk6ICdhbnlHZW8nLFxuICAgICAgICAgICAgdHlwZTogJ0dFT01FVFJZJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIG1vZGU6ICdjaXJjbGUnLFxuICAgICAgICAgICAgICBsYXQ6IDIwLFxuICAgICAgICAgICAgICBsb246IDEwLFxuICAgICAgICAgICAgICB0eXBlOiAnUE9JTlRSQURJVVMnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGNvbnRleHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgcHJvcGVydHk6ICdhbnlHZW8nLFxuICAgICAgICAgICAgdHlwZTogJ0dFT01FVFJZJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIG1vZGU6ICdjaXJjbGUnLFxuICAgICAgICAgICAgICBsYXQ6IDUsXG4gICAgICAgICAgICAgIGxvbjogNSxcbiAgICAgICAgICAgICAgdHlwZTogJ1BPSU5UUkFESVVTJyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgIHR5cGU6ICdPUicsXG4gICAgICB9LFxuICAgIH0sXG4gICAge1xuICAgICAgaW5wdXQ6IGAoRFdJVEhJTihcImFueUdlb1wiLCBQT0lOVCgxMCAyMCksIDEwMCwgbWV0ZXJzKSlgLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAnY2lyY2xlJyxcbiAgICAgICAgICAgICAgbGF0OiAyMCxcbiAgICAgICAgICAgICAgbG9uOiAxMCxcbiAgICAgICAgICAgICAgcmFkaXVzOiAnMTAwJyxcbiAgICAgICAgICAgICAgdHlwZTogJ1BPSU5UUkFESVVTJyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgIHR5cGU6ICdBTkQnLFxuICAgICAgfSxcbiAgICB9LFxuICAgIHtcbiAgICAgIGlucHV0OiBgKERXSVRISU4oXCJhbnlHZW9cIiwgTVVMVElQT0lOVCgxMCAyMCksIDEwMCwgbWV0ZXJzKSlgLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAnY2lyY2xlJyxcbiAgICAgICAgICAgICAgbGF0OiAyMCxcbiAgICAgICAgICAgICAgbG9uOiAxMCxcbiAgICAgICAgICAgICAgcmFkaXVzOiAnMTAwJyxcbiAgICAgICAgICAgICAgdHlwZTogJ1BPSU5UUkFESVVTJyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgIHR5cGU6ICdPUicsXG4gICAgICB9LFxuICAgIH0sXG4gICAge1xuICAgICAgaW5wdXQ6IGAoRFdJVEhJTihcImFueUdlb1wiLCBNVUxUSVBPSU5UKDEwIDIwLCA1IDUpLCAxMDAsIG1ldGVycykpYCxcbiAgICAgIG91dHB1dDoge1xuICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2NpcmNsZScsXG4gICAgICAgICAgICAgIGxhdDogMjAsXG4gICAgICAgICAgICAgIGxvbjogMTAsXG4gICAgICAgICAgICAgIHJhZGl1czogJzEwMCcsXG4gICAgICAgICAgICAgIHR5cGU6ICdQT0lOVFJBRElVUycsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2NpcmNsZScsXG4gICAgICAgICAgICAgIGxhdDogNSxcbiAgICAgICAgICAgICAgbG9uOiA1LFxuICAgICAgICAgICAgICByYWRpdXM6ICcxMDAnLFxuICAgICAgICAgICAgICB0eXBlOiAnUE9JTlRSQURJVVMnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgdHlwZTogJ09SJyxcbiAgICAgIH0sXG4gICAgfSxcbiAgXSxcbn1cblxuY29uc3QgY3FsTGluZXN0cmluZ3MgPSB7XG4gIGdlb21ldHJpZXM6IFtcbiAgICB7XG4gICAgICBpbnB1dDogYChJTlRFUlNFQ1RTKFwiYW55R2VvXCIsIExJTkVTVFJJTkcoMTAgMjAsIDMwIDMwLCA0MCAyMCkpKWAsXG4gICAgICBvdXRwdXQ6IHtcbiAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGNvbnRleHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgcHJvcGVydHk6ICdhbnlHZW8nLFxuICAgICAgICAgICAgdHlwZTogJ0dFT01FVFJZJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIG1vZGU6ICdsaW5lJyxcbiAgICAgICAgICAgICAgdHlwZTogJ0xJTkUnLFxuICAgICAgICAgICAgICBsaW5lOiBbXG4gICAgICAgICAgICAgICAgWzEwLCAyMF0sXG4gICAgICAgICAgICAgICAgWzMwLCAzMF0sXG4gICAgICAgICAgICAgICAgWzQwLCAyMF0sXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnQU5EJyxcbiAgICAgIH0sXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYChJTlRFUlNFQ1RTKFwiYW55R2VvXCIsIE1VTFRJTElORVNUUklORygoMTAgMTAsIDIwIDIwLCAxMCA0MCksICg0MCA0MCwgMzAgMzAsIDQwIDIwLCAzMCAxMCkpKSlgLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAnbGluZScsXG4gICAgICAgICAgICAgIHR5cGU6ICdMSU5FJyxcbiAgICAgICAgICAgICAgbGluZTogW1xuICAgICAgICAgICAgICAgIFsxMCwgMTBdLFxuICAgICAgICAgICAgICAgIFsyMCwgMjBdLFxuICAgICAgICAgICAgICAgIFsxMCwgNDBdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGNvbnRleHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgcHJvcGVydHk6ICdhbnlHZW8nLFxuICAgICAgICAgICAgdHlwZTogJ0dFT01FVFJZJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIG1vZGU6ICdsaW5lJyxcbiAgICAgICAgICAgICAgdHlwZTogJ0xJTkUnLFxuICAgICAgICAgICAgICBsaW5lOiBbXG4gICAgICAgICAgICAgICAgWzQwLCA0MF0sXG4gICAgICAgICAgICAgICAgWzMwLCAzMF0sXG4gICAgICAgICAgICAgICAgWzQwLCAyMF0sXG4gICAgICAgICAgICAgICAgWzMwLCAxMF0sXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnT1InLFxuICAgICAgfSxcbiAgICB9LFxuICAgIHtcbiAgICAgIGlucHV0OiBgKERXSVRISU4oXCJhbnlHZW9cIiwgTElORVNUUklORygxMCAyMCwgMzAgMzAsIDQwIDIwKSwgMTAwMCwgbWV0ZXJzKSlgLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAnbGluZScsXG4gICAgICAgICAgICAgIHR5cGU6ICdMSU5FJyxcbiAgICAgICAgICAgICAgbGluZVdpZHRoOiAnMTAwMCcsXG4gICAgICAgICAgICAgIGxpbmU6IFtcbiAgICAgICAgICAgICAgICBbMTAsIDIwXSxcbiAgICAgICAgICAgICAgICBbMzAsIDMwXSxcbiAgICAgICAgICAgICAgICBbNDAsIDIwXSxcbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgIHR5cGU6ICdBTkQnLFxuICAgICAgfSxcbiAgICB9LFxuICAgIHtcbiAgICAgIGlucHV0OiBgKERXSVRISU4oXCJhbnlHZW9cIiwgTVVMVElMSU5FU1RSSU5HKCgxMCAxMCwgMjAgMjAsIDEwIDQwKSksIDEwMDAsIG1ldGVycykpYCxcbiAgICAgIG91dHB1dDoge1xuICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2xpbmUnLFxuICAgICAgICAgICAgICB0eXBlOiAnTElORScsXG4gICAgICAgICAgICAgIGxpbmVXaWR0aDogJzEwMDAnLFxuICAgICAgICAgICAgICBsaW5lOiBbXG4gICAgICAgICAgICAgICAgWzEwLCAxMF0sXG4gICAgICAgICAgICAgICAgWzIwLCAyMF0sXG4gICAgICAgICAgICAgICAgWzEwLCA0MF0sXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnT1InLFxuICAgICAgfSxcbiAgICB9LFxuICAgIHtcbiAgICAgIGlucHV0OiBgKERXSVRISU4oXCJhbnlHZW9cIiwgTVVMVElMSU5FU1RSSU5HKCgxMCAxMCwgMjAgMjAsIDEwIDQwKSwgKDQwIDQwLCAzMCAzMCwgNDAgMjAsIDMwIDEwKSksIDEwMDAsIG1ldGVycykpYCxcbiAgICAgIG91dHB1dDoge1xuICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2xpbmUnLFxuICAgICAgICAgICAgICB0eXBlOiAnTElORScsXG4gICAgICAgICAgICAgIGxpbmVXaWR0aDogJzEwMDAnLFxuICAgICAgICAgICAgICBsaW5lOiBbXG4gICAgICAgICAgICAgICAgWzEwLCAxMF0sXG4gICAgICAgICAgICAgICAgWzIwLCAyMF0sXG4gICAgICAgICAgICAgICAgWzEwLCA0MF0sXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2xpbmUnLFxuICAgICAgICAgICAgICB0eXBlOiAnTElORScsXG4gICAgICAgICAgICAgIGxpbmVXaWR0aDogJzEwMDAnLFxuICAgICAgICAgICAgICBsaW5lOiBbXG4gICAgICAgICAgICAgICAgWzQwLCA0MF0sXG4gICAgICAgICAgICAgICAgWzMwLCAzMF0sXG4gICAgICAgICAgICAgICAgWzQwLCAyMF0sXG4gICAgICAgICAgICAgICAgWzMwLCAxMF0sXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnT1InLFxuICAgICAgfSxcbiAgICB9LFxuICBdLFxufVxuXG5jb25zdCBjcWxHZW9tZXRyeUNvbGxlY3Rpb25zID0ge1xuICBnZW9tZXRyaWVzOiBbXG4gICAge1xuICAgICAgaW5wdXQ6IGAoSU5URVJTRUNUUyhcImFueUdlb1wiLCBHRU9NRVRSWUNPTExFQ1RJT04oUE9JTlQoMTAgMjApLCBMSU5FU1RSSU5HKDMwIDMwLCA0MCAyMCkpKSlgLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAnY2lyY2xlJyxcbiAgICAgICAgICAgICAgdHlwZTogJ1BPSU5UUkFESVVTJyxcbiAgICAgICAgICAgICAgbGF0OiAyMCxcbiAgICAgICAgICAgICAgbG9uOiAxMCxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAnbGluZScsXG4gICAgICAgICAgICAgIHR5cGU6ICdMSU5FJyxcbiAgICAgICAgICAgICAgbGluZTogW1xuICAgICAgICAgICAgICAgIFszMCwgMzBdLFxuICAgICAgICAgICAgICAgIFs0MCwgMjBdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgdHlwZTogJ09SJyxcbiAgICAgIH0sXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYChJTlRFUlNFQ1RTKFwiYW55R2VvXCIsIEdFT01FVFJZQ09MTEVDVElPTihHRU9NRVRSWUNPTExFQ1RJT04oUE9JTlQoMTAgMjApKSwgTElORVNUUklORygzMCAzMCwgNDAgMjApKSkpYCxcbiAgICAgIG91dHB1dDoge1xuICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2NpcmNsZScsXG4gICAgICAgICAgICAgIHR5cGU6ICdQT0lOVFJBRElVUycsXG4gICAgICAgICAgICAgIGxhdDogMjAsXG4gICAgICAgICAgICAgIGxvbjogMTAsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ2xpbmUnLFxuICAgICAgICAgICAgICB0eXBlOiAnTElORScsXG4gICAgICAgICAgICAgIGxpbmU6IFtcbiAgICAgICAgICAgICAgICBbMzAsIDMwXSxcbiAgICAgICAgICAgICAgICBbNDAsIDIwXSxcbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgIHR5cGU6ICdPUicsXG4gICAgICB9LFxuICAgIH0sXG4gICAge1xuICAgICAgaW5wdXQ6IGAoRFdJVEhJTihcImFueUdlb1wiLCBHRU9NRVRSWUNPTExFQ1RJT04oUE9JTlQoMTAgMjApKSwgMTAwMCwgbWV0ZXJzKSlgLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICBjb250ZXh0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZWdhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55R2VvJyxcbiAgICAgICAgICAgIHR5cGU6ICdHRU9NRVRSWScsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICBtb2RlOiAnY2lyY2xlJyxcbiAgICAgICAgICAgICAgdHlwZTogJ1BPSU5UUkFESVVTJyxcbiAgICAgICAgICAgICAgbGF0OiAyMCxcbiAgICAgICAgICAgICAgbG9uOiAxMCxcbiAgICAgICAgICAgICAgcmFkaXVzOiAnMTAwMCcsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICAgIG5lZ2F0ZWQ6IGZhbHNlLFxuICAgICAgICB0eXBlOiAnT1InLFxuICAgICAgfSxcbiAgICB9LFxuICAgIHtcbiAgICAgIGlucHV0OiBgKERXSVRISU4oXCJhbnlHZW9cIiwgR0VPTUVUUllDT0xMRUNUSU9OKEdFT01FVFJZQ09MTEVDVElPTihQT0xZR09OKCgxMCAyMCwgMTUgMTgsIDUgOSwgMTAgMjApKSksIExJTkVTVFJJTkcoMzAgMzAsIDQwIDIwKSksIDEwMDAsIG1ldGVycykpYCxcbiAgICAgIG91dHB1dDoge1xuICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgY29udGV4dDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbmVnYXRlZDogZmFsc2UsXG4gICAgICAgICAgICBwcm9wZXJ0eTogJ2FueUdlbycsXG4gICAgICAgICAgICB0eXBlOiAnR0VPTUVUUlknLFxuICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgbW9kZTogJ3BvbHknLFxuICAgICAgICAgICAgICB0eXBlOiAnUE9MWUdPTicsXG4gICAgICAgICAgICAgIHBvbHlnb25CdWZmZXJXaWR0aDogJzEwMDAnLFxuICAgICAgICAgICAgICBwb2x5Z29uOiBbXG4gICAgICAgICAgICAgICAgWzEwLCAyMF0sXG4gICAgICAgICAgICAgICAgWzE1LCAxOF0sXG4gICAgICAgICAgICAgICAgWzUsIDldLFxuICAgICAgICAgICAgICAgIFsxMCwgMjBdLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGNvbnRleHQ6IHVuZGVmaW5lZCxcbiAgIC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ICcxJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcyJykgT1IgKChcImFueVRleHRcIiBJTElLRSAnJykgQU5EIChcImFueVRleHRcIiBJTElLRSAnJykpYCxcbiAgICBgKFwiYW55VGV4dFwiIElMSUtFICcxJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcyJykgT1IgKE5PVCAoKFwiYW55VGV4dFwiIElMSUtFICcnKSBPUiAoXCJhbnlUZXh0XCIgSUxJS0UgJycpKSlgLFxuICAgIGBOT1QgKChcImFueVRleHRcIiBJTElLRSAnMScpIE9SIChcImFueVRleHRcIiBJTElLRSAnMicpIE9SIChOT1QgKChcImFueVRleHRcIiBJTElLRSAnJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcnKSkpKWAsXG4gICAgYChcImFueVRleHRcIiBJTElLRSAnMScpIE9SIChcImFueVRleHRcIiBJTElLRSAnMicpIE9SIChOT1QgKChcImFueVRleHRcIiBJTElLRSAnJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcnKSkpYCxcbiAgICBgKFwiYW55VGV4dFwiIElMSUtFICcxJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcyJykgT1IgKE5PVCAoKFwiYW55VGV4dFwiIElMSUtFICcnKSBPUiAoXCJhbnlUZXh0XCIgSUxJS0UgJycpIE9SICgoXCJhbnlUZXh0XCIgSUxJS0UgJycpIEFORCAoXCJhbnlUZXh0XCIgSUxJS0UgJycpKSkpYCxcbiAgXSxcbiAgZGlmZmVyZW50OiBbXG4gICAge1xuICAgICAgaW5wdXQ6IGAoXCJhbnlUZXh0XCIgSUxJS0UgJzEnKSBPUiAoXCJhbnlUZXh0XCIgSUxJS0UgJzInKSBPUiAoKFwiYW55VGV4dFwiIElMSUtFICcnKSlgLFxuICAgICAgb3V0cHV0OiBgKFwiYW55VGV4dFwiIElMSUtFICcxJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcyJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcnKWAsXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYChcImFueVRleHRcIiBJTElLRSAnMScpIE9SIChcImFueVRleHRcIiBJTElLRSAnMicpIE9SICgoTk9UICgoXCJhbnlUZXh0XCIgSUxJS0UgJycpKSkpYCxcbiAgICAgIG91dHB1dDogYChcImFueVRleHRcIiBJTElLRSAnMScpIE9SIChcImFueVRleHRcIiBJTElLRSAnMicpIE9SIChOT1QgKChcImFueVRleHRcIiBJTElLRSAnJykpKWAsXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYChcImFueVRleHRcIiBJTElLRSAnMScpIE9SIChcImFueVRleHRcIiBJTElLRSAnMicpIE9SICgoXCJhbnlUZXh0XCIgSUxJS0UgJycpIE9SIChcImFueVRleHRcIiBJTElLRSAnJykpYCxcbiAgICAgIG91dHB1dDogYChcImFueVRleHRcIiBJTElLRSAnMScpIE9SIChcImFueVRleHRcIiBJTElLRSAnMicpIE9SIChcImFueVRleHRcIiBJTElLRSAnJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcnKWAsXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYE5PVCAoKFwiYW55VGV4dFwiIElMSUtFICcxJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcyJykgT1IgKChcImFueVRleHRcIiBJTElLRSAnJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcnKSkpYCxcbiAgICAgIG91dHB1dDogYE5PVCAoKFwiYW55VGV4dFwiIElMSUtFICcxJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcyJykgT1IgKFwiYW55VGV4dFwiIElMSUtFICcnKSBPUiAoXCJhbnlUZXh0XCIgSUxJS0UgJycpKWAsXG4gICAgfSxcbiAgICB7XG4gICAgICBpbnB1dDogYChcImFueVRleHRcIiBJTElLRSAnMScpIE9SIChcImFueVRleHRcIiBJTElLRSAnMicpIE9SICgoXCJhbnlUZXh0XCIgSUxJS0UgJycpIE9SIChcImFueVRleHRcIiBJTElLRSAnJykgT1IgKChcIm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G4gICAgICAgICAgICB2YWx1ZTogJyonLFxuICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICB9KSxcbiAgICAgICAgXSxcbiAgICAgICAgdHlwZTogJ09SJyxcbiAgICAgIH0pXG4gICAgICBleHBlY3QoY3FsLndyaXRlKHRlc3RGaWx0ZXIpKS50by5lcXVhbChgKFxcXCJhbnlUZXh0XFxcIiBJTElLRSAnJScpYClcbiAgICB9KVxuXG4gICAgaXQoJ2hhbmRsZXMgZW1wdHkgcmVzZXJ2ZWQuYmFzaWMtZGF0YXR5cGUnLCAoKSA9PiB7XG4gICAgICBjb25zdCB0ZXN0RmlsdGVyID0gbmV3IEZpbHRlckJ1aWxkZXJDbGFzcyh7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgIHR5cGU6ICdBTkQnLFxuICAgICAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgIHByb3BlcnR5OiAncmVzZXJ2ZWQuYmFzaWMtZGF0YXR5cGUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBbXSxcbiAgICAgICAgICAgICAgICB0eXBlOiAnSUxJS0UnLFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgfSksXG4gICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgIHByb3BlcnR5OiAnYW55VGV4dCcsXG4gICAgICAgICAgICB2YWx1ZTogJyonLFxuICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICB9KSxcbiAgICAgICAgXSxcbiAgICAgICAgdHlwZTogJ09SJyxcbiAgICAgIH0pXG4gICAgICBleHBlY3QoY3FsLndyaXRlKHRlc3RGaWx0ZXIpKS50by5lcXVhbChgKFxcXCJhbnlUZXh0XFxcIiBJT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lndXJhdGlvbi5jb25maWcpXG4gICAgICAgIFN0YXJ0dXBEYXRhU3RvcmUuQ29uZmlndXJhdGlvbi5jb25maWcuZXh0cmEgPSB7XG4gICAgICAgICAgZGF0YXR5cGVzOiBEYXRhdHlwZXNKU09OQ29uZmlnLFxuICAgICAgICB9XG4gICAgICBjb25zdCB0ZXN0RmlsdGVyID0gbmV3IEZpbHRlckJ1aWxkZXJDbGFzcyh7XG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgIHR5cGU6ICdBTkQnLFxuICAgICAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgIHByb3BlcnR5OiAncmVzZXJ2ZWQuYmFzaWMtZGF0YXR5cGUnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBbJ2JvZ3VzJywgJ1BlcnNvbiddLFxuICAgICAgICAgICAgICAgIHR5cGU6ICdJTElLRScsXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICB9KSxcbiAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgcHJvcGVydHk6ICdhbnlUZXh0JyxcbiAgICAgICAgICAgIHZhbHVlOiAnKicsXG4gICAgICAgICAgICB0eXBlOiAnSUxJS0UnLFxuICAgICAgICAgIH0pLFxuICAgICAgICBdLFxuICAgICAgICB0eXBlOiAnT1InLFxuICAgICAgfSlcbiAgICAgIGV4cGVjdChjcWwud3JpdGUodGVzdEZpbHRlcikpLnRvLmVxdWFsKFxuICAgICAgICBgKCgoKFwiZGVzY3JpcHRpb25cIiBJTElLRSBcXCdwZXJzb25cXCcpKSkpIE9SIChcImFueVRleHRcIiBJTElLRSBcXCclXFwnKWBcbiAgICAgIClcbiAgICB9KVxuXG4gICAgaXQoJ2hhbmRsZXMgYW55RGF0ZSByZ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FxuICAgICAgICBdLFxuICAgICAgfSlcbiAgICAgIGV4cGVjdChjcWwud3JpdGUodGVzdEZpbHRlcikpLnRvLmVxdWFsKFxuICAgICAgICBgKChhbnlUZXh0IElMSUtFICdkb2cnKSBvciAoYW55VGV4dCBJTElLRSAnY2F0JykgYW5kIChOT1QgKChhbnlUZXh0IElMSUtFICdmaXNoJykpKSlgXG4gICAgICApXG4gICAgfSlcblxuICAgIGl0KCdkb2VzIGhhbmRsZXMgYSBzaW1wbGUgYm9vbGVhbiBzZWFyY2ggb3RoZXIgdGVybXMnLCAoKSA9PiB7XG4gICAgICBjb25zdCB0ZXN0RmlsdGVyID0gbmV3IEZpbHRlckJ1aWxkZXJDbGFzcyh7XG4gICAgICAgIHR5cGU6ICdBTkQnLFxuICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgIHR5cGU6ICdCT09MRUFOX1RFWFRfU0VBUkNIJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIGNxbDogYChhbnlUZXh0IElMSUtFICdkb2cnKSBvciAoYW55VGV4dCBJTElLRSAnY2F0JykgYW5kIChOT1QgKChhbnlUZXh0IElMSUtFICdmaXNoJykpKWAsXG4gICAgICAgICAgICAgIGVycm9yOiBmYWxzZSxcbiAgICAgICAgICAgICAgdGV4dDogJ2RvZyBvciBjYXQgYW5kIG5vdCAoZmlzaCknLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9KSxcbiAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgIHR5cGU6ICdPUicsXG4gICAgICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgcHJvcGVydHk6ICdkYXRhdHlwZScsXG4gICAgICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogJ01vdmluZyBJbWFnZScsXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgIHByb3BlcnR5OiAnbWV0YWRhdGEtY29udGVudC10eXBlJyxcbiAgICAgICAgICAgICAgICB0eXBlOiAnSUxJS0UnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiAnTW92aW5nIEltYWdlJyxcbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBdLFxuICAgICAgICAgIH0pLFxuICAgICAgICBdLFxuICAgICAgfSlcbiAgICAgIGV4cGVjdChjcWwud3JpdGUodGVzdEZpbHRlcikpLnRvLmVxdWFsKFxuICAgICAgICBgKChhbnlUZXh0IElMSUtFICdkb2cnKSBvciAoYW55VGV4dCBJTElLRSAnY2F0JykgYW5kIChOT1QgKChhbnlUZXh0IElMSUtFICdmaXNoJykpKSkgQU5EICgoXFxcImRhdGF0eXBlXFxcIiBJTElLRSAnTW92aW5nIEltYWdlJykgT1IgKFxcXCJtZXRhZGF0YS1jb250ZW50LXR5cGVcXFwiIElMSUtFICdNb3ZpbmcgSW1hZ2UnKSlgXG4gICAgICApXG4gICAgfSlcblxuICAgIGl0KCdkb2VzIGhhbmRsZXMgYSBzaW1wbGUgYm9vbGVhbiBzZWFyY2ggb3RoZXIgdGVybXMgYW5kIG5lZ2F0aW9ucycsICgpID0+IHtcbiAgICAgIGNvbnN0IHRlc3RGaWx0ZXIgPSBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgdHlwZTogJ0FORCcsXG4gICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgdHlwZTogJ0JPT0xFQU5fVEVYVF9TRUFSQ0gnLFxuICAgICAgICAgICAgbmVnYXRlZDogdHJ1ZSxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIGNxbDogYChhbnlUZXh0IElMSUtFICdkb2cnKSBvciAoYW55VGV4dCBJTElLRSAnY2F0JykgYW5kIChOT1QgKChhbnlUZXh0IElMSUtFICdmaXNoJykpKWAsXG4gICAgICAgICAgICAgIGVycm9yOiBmYWxzZSxcbiAgICAgICAgICAgICAgdGV4dDogJ2RvZyBvciBjYXQgYW5kIG5vdCAoZmlzaCknLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9KSxcbiAgICAgICAgICBuZXcgRmlsdGVyQnVpbGRlckNsYXNzKHtcbiAgICAgICAgICAgIHR5cGU6ICdPUicsXG4gICAgICAgICAgICBmaWx0ZXJzOiBbXG4gICAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgcHJvcGVydHk6ICdkYXRhdHlwZScsXG4gICAgICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogJ01vdmluZyBJbWFnZScsXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgICAgIHByb3BlcnR5OiAnbWV0YWRhdGEtY29udGVudC10eXBlJyxcbiAgICAgICAgICAgICAgICB0eXBlOiAnSUxJS0UnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiAnTW92aW5nIEltYWdlJyxcbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBdLFxuICAgICAgICAgIH0pLFxuICAgICAgICBdLFxuICAgICAgfSlcbiAgICAgIGV4cGVjdChjcWwud3JpdGUodGVzdEZpbHRlcikpLnRvLmVxdWFsKFxuICAgICAgICBgKE5PVCAoKChhbnlUZXh0IElMSUtFICdkb2cnKSBvciAoYW55VGV4dCBJTElLRSAnY2F0JykgYW5kIChOT1QgKChhbnlUZXh0IElMSUtFICdmaXNoJykpKSkpKSBBTkQgKChcXFwiZGF0YXR5cGVcXFwiIElMSUtFICdNb3ZpbmcgSW1hZ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x0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgdHlwZTogJ0JPT0xFQU5fVEVYVF9TRUFSQ0gnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgICAgICBjcWw6IGAoYW55VGV4dCBJTElLRSAnZG9nJykgb3IgKGFueVRleHQgSUxJS0UgJ2NhdCcpIGFuZCAoTk9UICgoYW55VGV4dCBJTElLRSAnZmlzaCcpKSlgLFxuICAgICAgICAgICAgICAgICAgZXJyb3I6IHRydWUsXG4gICAgICAgICAgICAgICAgICB0ZXh0OiAnZG9nIG9yIGNhdCBhbmQgbm90IChmaXNoKScsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgcHJvcGVydHk6ICdtZXRhZGF0YS1jb250ZW50LXR5cGUnLFxuICAgICAgICAgICAgICAgIHR5cGU6ICdJTElLRScsXG4gICAgICAgICAgICAgICAgdmFsdWU6ICdNb3ZpbmcgSW1hZ2UnLFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgfSksXG4gICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgIHR5cGU6ICdCT09MRUFOX1RFWFRfU0VBUkNIJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIGNxbDogYChhbnlUZXh0IElMSUtFICdkb2cnKSBvciAoYW55VGV4dCBJTElLRSAnY2F0JykgYW5kIChOT1QgKChhbnlUZXh0IElMSUtFICdmaXNoJykpKWAsXG4gICAgICAgICAgICAgIGVycm9yOiB0cnVlLFxuICAgICAgICAgICAgICB0ZXh0OiAnZG9nIG9yIGNhdCBhbmQgbm90IChmaXNoKScsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pLFxuICAgICAgICBdLFxuICAgICAgfSlcbiAgICAgIGV4cGVjdCh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YXNzKHtcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eTogJ2RhdGF0eXBlJyxcbiAgICAgICAgICAgICAgICB0eXBlOiAnSUxJS0UnLFxuICAgICAgICAgICAgICAgIHZhbHVlOiAnTW92aW5nIEltYWdlJyxcbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgdHlwZTogJ0JPT0xFQU5fVEVYVF9TRUFSQ0gnLFxuICAgICAgICAgICAgICAgIG5lZ2F0ZWQ6IHRydWUsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgICAgIGNxbDogYChhbnlUZXh0IElMSUtFICdkb2cnKSBvciAoYW55VGV4dCBJTElLRSAnY2F0JykgYW5kIChOT1QgKChhbnlUZXh0IElMSUtFICdmaXNoJykpKWAsXG4gICAgICAgICAgICAgICAgICBlcnJvcjogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgIHRleHQ6ICdkb2cgb3IgY2F0IGFuZCBub3QgKGZpc2gpJyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eTogJ21ldGFkYXRhLWNvbnRlbnQtdHlwZScsXG4gICAgICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogJ01vdmluZyBJbWFnZScsXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgXSxcbiAgICAgICAgICB9KSxcbiAgICAgICAgICBuZXcgRmlsdGVyQ2xhc3Moe1xuICAgICAgICAgICAgbmVnYXRlZDogdHJ1ZSxcbiAgICAgICAgICAgIHR5cGU6ICdCT09MRUFOX1RFWFRfU0VBUkNIJyxcbiAgICAgICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgICAgIGNxbDogYChhbnlUZXh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WFsKFxuICAgICAgICAgIGNhcGFiaWxpdHkub3V0cHV0XG4gICAgICAgIClcbiAgICAgIH0pXG4gICAgfSlcbiAgfSlcblxuICBkZXNjcmliZSgnZ2VvbWV0cnkgY29sbGVjdGlvbiBjcWwgc3RyaW5nIHJlYWQgdGVzdCcsICgpID0+IHtcbiAgICBjcWxHZW9tZXRyeUNvbGxlY3Rpb25zLmdlb21ldHJpZXMuZm9yRWFjaCgoY2FwYWJpbGl0eSkgPT4ge1xuICAgICAgaXQoYCR7Y2FwYWJpbGl0eX1gLCAoKSA9PiB7XG4gICAgICAgIGNvbnN0IGZpbHRlckJ1aWxkZXJDbGFzc091dHB1dCA9IGNxbC5yZWFkKGNhcGFiaWxpdHkuaW5wdXQpXG4gICAgICAgIGNvbnN0IGZpbHRlcnNBcnJheTogYW55W10gPSBbXVxuXG4gICAgICAgIGZpbHRlckJ1aWxkZXJDbGFzc091dHB1dC5maWx0ZXJzLmZvckVhY2goKGZpbHRlcikgPT4ge1xuICAgICAgICAgIGNvbnN0IHsgaWQsIC4uLm5ld0ZpbHRlciB9ID0gZmlsdGVyXG4gICAgICAgICAgZmlsdGVyc0FycmF5LnB1c2gobmV3RmlsdGVyKVxuICAgICAgICB9KVxuICAgICAgICBjb25zdCB7IGlkLCAuLi5leHBlY3RlZE91dHB1dCB9ID0gZmlsdGVyQnVpbGRlckNsYXNzT3V0cHV0XG4gICAgICAgIGV4cGVjdGVkT3V0cHV0LmZpbHRlcnMgPSBmaWx0ZXJzQXJyYXlcbiAgICAgICAgZXhwZWN0KGV4cGVjdGVkT3V0cHV0LCAnVW5leHBlY3RlZCBmaWx0ZXIgdmFsdWUuJykudG8uZGVlcC5lcXVhbChcbiAgICAgICAgICBjYXBhYmlsaXR5Lm91dHB1dFxuICAgICAgICApXG4gICAgICB9KVxuICAgIH0pXG4gIH0pXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/extensions/application.patches.d.ts b/src/main/webapp/js/extensions/application.patches.d.ts new file mode 100644 index 00000000000..a6f25497d7d --- /dev/null +++ b/src/main/webapp/js/extensions/application.patches.d.ts @@ -0,0 +1,8 @@ +/** + * Collection of patches we apply to various libraries or setup functions + */ +import '../requestAnimationFramePolyfill'; +import '../ApplicationHelpers'; +import '../Autocomplete'; +import './network.proxy'; +import './backbone.ajax'; diff --git a/src/main/webapp/js/extensions/application.patches.js b/src/main/webapp/js/extensions/application.patches.js new file mode 100644 index 00000000000..cf40f2d8c40 --- /dev/null +++ b/src/main/webapp/js/extensions/application.patches.js @@ -0,0 +1,9 @@ +/** + * Collection of patches we apply to various libraries or setup functions + */ +import '../requestAnimationFramePolyfill'; +import '../ApplicationHelpers'; +import '../Autocomplete'; +import './network.proxy'; +import './backbone.ajax'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbGljYXRpb24ucGF0Y2hlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9leHRlbnNpb25zL2FwcGxpY2F0aW9uLnBhdGNoZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsT0FBTyxrQ0FBa0MsQ0FBQTtBQUV6QyxPQUFPLHVCQUF1QixDQUFBO0FBQzlCLE9BQU8saUJBQWlCLENBQUE7QUFDeEIsT0FBTyxpQkFBaUIsQ0FBQTtBQUN4QixPQUFPLGlCQUFpQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb2xsZWN0aW9uIG9mIHBhdGNoZXMgd2UgYXBwbHkgdG8gdmFyaW91cyBsaWJyYXJpZXMgb3Igc2V0dXAgZnVuY3Rpb25zXG4gKi9cbmltcG9ydCAnLi4vcmVxdWVzdEFuaW1hdGlvbkZyYW1lUG9seWZpbGwnXG5cbmltcG9ydCAnLi4vQXBwbGljYXRpb25IZWxwZXJzJ1xuaW1wb3J0ICcuLi9BdXRvY29tcGxldGUnXG5pbXBvcnQgJy4vbmV0d29yay5wcm94eSdcbmltcG9ydCAnLi9iYWNrYm9uZS5hamF4J1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/extensions/backbone.ajax.d.ts b/src/main/webapp/js/extensions/backbone.ajax.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/extensions/backbone.ajax.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/extensions/backbone.ajax.js b/src/main/webapp/js/extensions/backbone.ajax.js new file mode 100644 index 00000000000..90b1098f5bc --- /dev/null +++ b/src/main/webapp/js/extensions/backbone.ajax.js @@ -0,0 +1,46 @@ +import Backbone from 'backbone'; +import { checkForErrors, throwFetchErrorEvent, } from '../../react-component/utils/fetch/fetch'; +var oldBackboneAjax = Backbone.ajax; +Backbone.ajax = function (request) { + var _this = this; + var originalError = request.error; + var newError = function () { + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + throwFetchErrorEvent([params[2]]); + if (typeof originalError === 'function') { + originalError.apply(_this, params); + } + else if (typeof originalError === 'object') { + originalError.forEach(function (errorCallback) { + if (typeof errorCallback === 'function') { + errorCallback.apply(_this, params); + } + }); + } + }; + var originalSuccess = request.success; + var newSuccess = function () { + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + checkForErrors(params[0]); // query response is 200 even with errors -> check if any source has an error + if (typeof originalSuccess === 'function') { + originalSuccess.apply(_this, params); + } + else if (typeof originalSuccess === 'object') { + originalSuccess.forEach(function (successCallback) { + if (typeof successCallback === 'function') { + successCallback.apply(_this, params); + } + }); + } + }; + request.error = newError; + request.success = newSuccess; + return oldBackboneAjax(request); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFja2JvbmUuYWpheC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3Vy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2luYWxTdWNjZXNzID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICBvcmlnaW5hbFN1Y2Nlc3MuYXBwbHkodGhpcywgcGFyYW1zKVxuICAgIH0gZWxzZSBpZiAodHlwZW9mIG9yaWdpbmFsU3VjY2VzcyA9PT0gJ29iamVjdCcpIHtcbiAgICAgIG9yaWdpbmFsU3VjY2Vzcy5mb3JFYWNoKChzdWNjZXNzQ2FsbGJhY2spID0+IHtcbiAgICAgICAgaWYgKHR5cGVvZiBzdWNjZXNzQ2FsbGJhY2sgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICBzdWNjZXNzQ2FsbGJhY2suYXBwbHkodGhpcywgcGFyYW1zKVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH1cbiAgfVxuICByZXF1ZXN0LmVycm9yID0gbmV3RXJyb3JcbiAgcmVxdWVzdC5zdWNjZXNzID0gbmV3U3VjY2Vzc1xuICByZXR1cm4gb2xkQmFja2JvbmVBamF4KHJlcXVlc3QpXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/extensions/network.proxy.d.ts b/src/main/webapp/js/extensions/network.proxy.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/extensions/network.proxy.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/extensions/network.proxy.js b/src/main/webapp/js/extensions/network.proxy.js new file mode 100644 index 00000000000..13dffcc9230 --- /dev/null +++ b/src/main/webapp/js/extensions/network.proxy.js @@ -0,0 +1,14 @@ +/** + * When we're in test environment, patch everything to avoid hitting the network. + * + * For now this is a simple voiding of fetch, but we could detect which model is doing the fetch and return mocked responses. + */ +import { Environment } from '../Environment'; +import * as Backbone from 'backbone'; +if (Environment.isTest()) { + // @ts-expect-error ts-migrate(2322) FIXME: Type '() => void' is not assignable to type '(opti... Remove this comment to see the full error message + Backbone.Model.prototype.fetch = function () { + // mock response? + }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2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Mgbm90IGFzc2lnbmFibGUgdG8gdHlwZSAnKG9wdGkuLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICBCYWNrYm9uZS5Nb2RlbC5wcm90b3R5cGUuZmV0Y2ggPSBmdW5jdGlvbiAoKSB7XG4gICAgLy8gbW9jayByZXNwb25zZT9cbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/jquery.whenAll.d.ts b/src/main/webapp/js/jquery.whenAll.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/jquery.whenAll.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/jquery.whenAll.js b/src/main/webapp/js/jquery.whenAll.js new file mode 100644 index 00000000000..cef92df8cb1 --- /dev/null +++ b/src/main/webapp/js/jquery.whenAll.js @@ -0,0 +1,45 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import $ from 'jquery'; +$.whenAll = function () { + var args = arguments, sliceDeferred = [].slice, i = 0, length = args.length, count = length, rejected, deferred = $.Deferred(); + function resolveFunc(i, reject) { + return function (value) { + rejected = rejected || reject; + args[i] = arguments.length > 1 ? sliceDeferred.call(arguments, 0) : value; + if (!--count) { + // Strange bug in FF4: + // Values changed onto the arguments object sometimes end up as undefined values + // outside the $.when method. Cloning the object into a fresh array solves the issue + var fn = rejected ? deferred.rejectWith : deferred.resolveWith; + fn.call(deferred, deferred, sliceDeferred.call(args, 0)); + } + }; + } + for (; i < length; i++) { + if (args[i] && $.isFunction(args[i].promise)) { + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + args[i].promise().then(resolveFunc(i), resolveFunc(i, true)); + } + else { + --count; + } + } + if (count === 0) { + deferred.resolveWith(deferred, args); + } + return deferred.promise(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianF1ZXJ5LndoZW5BbGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvanF1ZXJ5LndoZW5BbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sQ0FBQyxNQUFNLFFBQVEsQ0FDckI7QUFBQyxDQUFTLENBQUMsT0FBTyxHQUFHO0lBQ3BCLElBQUksSUFBSSxHQUFHLFNBQVMsRUFDbEIsYUFBYSxHQUFHLEVBQUUsQ0FBQyxLQUFLLEVBQ3hCLENBQUMsR0FBRyxDQUFDLEVBQ0wsTUFBTSxHQUFHLElBQUksQ0FBQyxNQUFNLEVBQ3BCLEtBQUssR0FBRyxNQUFNLEVBQ2QsUUFBYSxFQUNiLFFBQVEsR0FBRyxDQUFDLENBQUMsUUFBUSxFQUFFLENBQUE7SUFDekIsU0FBUyxXQUFXLENBQUMsQ0FBTSxFQUFFLE1BQVc7UUFDdEMsT0FBTyxVQUFVLEtBQVU7WUFDekIsUUFBUSxHQUFHLFFBQVEsSUFBSSxNQUFNLENBQUE7WUFDN0IsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFHLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFBO1lBQ3pFLElBQUksQ0FBQyxFQUFFLEtBQUssRUFBR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JWE1FOiBFeHBlY3RlZCAyIGFyZ3VtZW50cywgYnV0IGdvdCAxLlxuICAgICAgYXJnc1tpXS5wcm9taXNlKCkudGhlbihyZXNvbHZlRnVuYyhpKSwgcmVzb2x2ZUZ1bmMoaSwgdHJ1ZSkpXG4gICAgfSBlbHNlIHtcbiAgICAgIC0tY291bnRcbiAgICB9XG4gIH1cbiAgaWYgKGNvdW50ID09PSAwKSB7XG4gICAgZGVmZXJyZWQucmVzb2x2ZVdpdGgoZGVmZXJyZWQsIGFyZ3MpXG4gIH1cbiAgcmV0dXJuIGRlZmVycmVkLnByb21pc2UoKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Alert.d.ts b/src/main/webapp/js/model/Alert.d.ts new file mode 100644 index 00000000000..25be9247885 --- /dev/null +++ b/src/main/webapp/js/model/Alert.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import 'backbone-associations'; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/Alert.js b/src/main/webapp/js/model/Alert.js new file mode 100644 index 00000000000..068c27a94af --- /dev/null +++ b/src/main/webapp/js/model/Alert.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import { v4 } from 'uuid'; +import 'backbone-associations'; +export default Backbone.AssociatedModel.extend({ + defaults: { + unseen: true, + queryId: undefined, + when: undefined, + metacardIds: [], + }, + initialize: function () { + if (!this.id) { + this.set('id', v4()); + } + }, + getTimeComparator: function () { + return this.get('when'); + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWxlcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvQWxlcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUVKLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUUvQixPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQ3pCLE9BQU8sdUJBQXVCLENBQUE7QUFFOUIsZUFBZSxRQUFRLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FBQztJQUM3QyxRQUFRLEVBQUU7UUFDUixNQUFNLEVBQUUsSUFBSTtRQUNaLE9BQU8sRUFBRSxTQUFTO1FBQ2xCLElBQUksRUFBRSxTQUFTO1FBQ2YsV0FBVyxFQUFFLEVBQUU7S0FDaEI7SUFDRCxVQUFVO1FBQ1IsSUFBSSxDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUU7WUFDWixJQUFJLENBQUMsR0FBRyxDQUFDLElBQUksRUFBRSxFQUFFLEVBQUUsQ0FBQyxDQUFBO1NBQ3JCO0lBQ0gsQ0FBQztJQUNELGlCQUFpQjtRQUNmLE9BQU8sSUFBSSxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUN6QixDQUFDO0NBQ0YsQ0FBQyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4g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mV4cG9ydCBkZWZhdWx0IEJhY2tib25lLkFzc29jaWF0ZWRNb2RlbC5leHRlbmQoe1xuICBkZWZhdWx0czoge1xuICAgIHVuc2VlbjogdHJ1ZSxcbiAgICBxdWVyeUlkOiB1bmRlZmluZWQsXG4gICAgd2hlbjogdW5kZWZpbmVkLFxuICAgIG1ldGFjYXJkSWRzOiBbXSxcbiAgfSxcbiAgaW5pdGlhbGl6ZSgpIHtcbiAgICBpZiAoIXRoaXMuaWQpIHtcbiAgICAgIHRoaXMuc2V0KCdpZCcsIHY0KCkpXG4gICAgfVxuICB9LFxuICBnZXRUaW1lQ29tcGFyYXRvcigpIHtcbiAgICByZXR1cm4gdGhpcy5nZXQoJ3doZW4nKVxuICB9LFxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/AsyncTask/async-task.d.ts b/src/main/webapp/js/model/AsyncTask/async-task.d.ts new file mode 100644 index 00000000000..32e5278b239 --- /dev/null +++ b/src/main/webapp/js/model/AsyncTask/async-task.d.ts @@ -0,0 +1,156 @@ +import { Subscribable } from '../Base/base-classes'; +import { LazyQueryResult } from '../LazyQueryResult/LazyQueryResult'; +type PlainMetacardPropertiesType = LazyQueryResult['plain']['metacard']['properties']; +type MinimalPropertySet = Partial & { + title: PlainMetacardPropertiesType['title']; +}; +export declare const convertToBackendCompatibleForm: ({ properties, }: { + properties: MinimalPropertySet; +}) => MinimalPropertySet; +type AsyncSubscriptionsType = { + thing: 'update'; +}; +/** + * Provides a singleton for tracking async tasks in the UI + */ +declare class AsyncTasksClass extends Subscribable<{ + thing: 'add' | 'remove' | 'update'; +}> { + list: Array; + constructor(); + delete({ lazyResult }: { + lazyResult: LazyQueryResult; + }): DeleteTask; + restore({ lazyResult }: { + lazyResult: LazyQueryResult; + }): RestoreTask; + create({ data, metacardType, }: { + data: MinimalPropertySet; + metacardType: string; + }): CreateTask; + save({ lazyResult, data, metacardType, }: { + data: PlainMetacardPropertiesType; + lazyResult: LazyQueryResult; + metacardType: string; + }): SaveTask; + createSearch({ data }: { + data: PlainMetacardPropertiesType; + }): CreateSearchTask; + saveSearch({ lazyResult, data, }: { + data: PlainMetacardPropertiesType; + lazyResult: LazyQueryResult; + }): SaveSearchTask; + isRestoreTask(task: AsyncTask): task is RestoreTask; + isDeleteTask(task: AsyncTask): task is DeleteTask; + isCreateTask(task: AsyncTask): task is CreateTask; + isSaveTask(task: AsyncTask): task is SaveTask; + isCreateSearchTask(task: AsyncTask): task is CreateSearchTask; + isSaveSearchTask(task: AsyncTask): task is SaveSearchTask; + hasShowableTasks(): boolean; + private add; + remove(asyncTask: AsyncTask): void; +} +export declare const AsyncTasks: AsyncTasksClass; +/** + * Goal is to provide a common abstraction to track long running async tasks in the UI, and free up the user to do whatever they want during them. + * Through subscriptions, we'll allow views to track progress if necessary. (useTaskProgress hooks?) + */ +declare abstract class AsyncTask extends Subscribable { + constructor(); +} +export declare const useRenderOnAsyncTasksAddOrRemove: () => void; +export declare const useRestoreSearchTaskBasedOnParams: () => RestoreTask | null; +export declare const useRestoreSearchTask: ({ id }: { + id?: string | undefined; +}) => RestoreTask | null; +export declare const useCreateTaskBasedOnParams: () => CreateTask | null; +export declare const useCreateTask: ({ id }: { + id?: string | undefined; +}) => CreateTask | null; +export declare const useSaveTaskBasedOnParams: () => SaveTask | null; +export declare const useSaveTask: ({ id }: { + id?: string | undefined; +}) => SaveTask | null; +export declare const useCreateSearchTaskBasedOnParams: () => CreateSearchTask | null; +export declare const useCreateSearchTask: ({ id }: { + id?: string | undefined; +}) => CreateSearchTask | null; +export declare const useSaveSearchTaskBasedOnParams: () => CreateSearchTask | null; +export declare const useSaveSearchTask: ({ id }: { + id?: string | undefined; +}) => CreateSearchTask | null; +/** + * Pass an async task that you want updates for. Each update will cause your component to rerender, + * and then you can then check whatever you want to about the task. + */ +export declare const useRenderOnAsyncTaskUpdate: ({ asyncTask, }: { + asyncTask: AsyncTask; +}) => void; +declare class RestoreTask extends AsyncTask { + lazyResult: LazyQueryResult; + constructor({ lazyResult }: { + lazyResult: LazyQueryResult; + }); + attemptRestore(): void; + static isInstanceOf(task: any): task is RestoreTask; +} +declare class DeleteTask extends AsyncTask { + lazyResult: LazyQueryResult; + constructor({ lazyResult }: { + lazyResult: LazyQueryResult; + }); + attemptDelete(): void; + static isInstanceOf(task: any): task is DeleteTask; +} +declare class CreateTask extends AsyncTask { + metacardType: string; + data: MinimalPropertySet; + constructor({ data, metacardType, }: { + data: MinimalPropertySet; + metacardType: string; + }); + attemptSave(): void; + static isInstanceOf(task: any): task is CreateTask; +} +declare class SaveTask extends AsyncTask { + metacardType: string; + lazyResult: LazyQueryResult; + data: PlainMetacardPropertiesType; + controller: AbortController; + timeoutid: number | undefined; + constructor({ lazyResult, data, metacardType, }: { + lazyResult: LazyQueryResult; + data: PlainMetacardPropertiesType; + metacardType: string; + }); + update({ data }: { + data: PlainMetacardPropertiesType; + }): void; + attemptSave(): void; + static isInstanceOf(task: any): task is SaveTask; +} +declare class CreateSearchTask extends AsyncTask { + lazyResult?: LazyQueryResult; + data: LazyQueryResult['plain']['metacard']['properties']; + constructor({ data, }: { + data: LazyQueryResult['plain']['metacard']['properties']; + }); + attemptSave(): void; + static isInstanceOf(task: any): task is CreateSearchTask; +} +declare class SaveSearchTask extends AsyncTask { + lazyResult: LazyQueryResult; + data: PlainMetacardPropertiesType; + controller: AbortController; + timeoutid: number | undefined; + constructor({ lazyResult, data, }: { + lazyResult: LazyQueryResult; + data: PlainMetacardPropertiesType; + }); + update({ data }: { + data: PlainMetacardPropertiesType; + }): void; + attemptSave(): void; + static isInstanceOf(task: any): task is SaveSearchTask; +} +export {}; diff --git a/src/main/webapp/js/model/AsyncTask/async-task.js b/src/main/webapp/js/model/AsyncTask/async-task.js new file mode 100644 index 00000000000..4202ed735f5 --- /dev/null +++ b/src/main/webapp/js/model/AsyncTask/async-task.js @@ -0,0 +1,633 @@ +import { __assign, __extends, __read } from "tslib"; +import { Subscribable } from '../Base/base-classes'; +import * as React from 'react'; +import _cloneDeep from 'lodash/cloneDeep'; +import fetch from '../../../react-component/utils/fetch'; +import { useParams } from 'react-router-dom'; +import CQL from '../../cql'; +import { v4 } from 'uuid'; +export var convertToBackendCompatibleForm = function (_a) { + var properties = _a.properties; + var duplicatedProperties = _cloneDeep(properties); + Object.keys(duplicatedProperties).forEach(function (key) { + var _a, _b; + if (typeof duplicatedProperties[key] !== 'string') { + if (((_a = duplicatedProperties[key]) === null || _a === void 0 ? void 0 : _a.constructor) === Array) { + duplicatedProperties[key] = duplicatedProperties[key].map(function (value) { + if (typeof value === 'object') { + // sorts on queries! + return value; + } + return value.toString(); + }); + } + else { + duplicatedProperties[key] = (_b = duplicatedProperties[key]) === null || _b === void 0 ? void 0 : _b.toString(); + } + } + }); + return duplicatedProperties; +}; +/** + * Provides a singleton for tracking async tasks in the UI + */ +var AsyncTasksClass = /** @class */ (function (_super) { + __extends(AsyncTasksClass, _super); + function AsyncTasksClass() { + var _this = _super.call(this) || this; + _this.list = []; + return _this; + } + AsyncTasksClass.prototype.delete = function (_a) { + var lazyResult = _a.lazyResult; + var existingTask = this.list + .filter(DeleteTask.isInstanceOf) + .find(function (task) { return task.lazyResult === lazyResult; }); + if (existingTask) { + return existingTask; + } + var newTask = new DeleteTask({ lazyResult: lazyResult }); + this.add(newTask); + return newTask; + }; + AsyncTasksClass.prototype.restore = function (_a) { + var lazyResult = _a.lazyResult; + var existingTask = this.list + .filter(RestoreTask.isInstanceOf) + .find(function (task) { return task.lazyResult === lazyResult; }); + if (existingTask) { + return existingTask; + } + var newTask = new RestoreTask({ lazyResult: lazyResult }); + this.add(newTask); + return newTask; + }; + AsyncTasksClass.prototype.create = function (_a) { + var data = _a.data, metacardType = _a.metacardType; + var newTask = new CreateTask({ data: data, metacardType: metacardType }); + this.add(newTask); + return newTask; + }; + AsyncTasksClass.prototype.save = function (_a) { + var lazyResult = _a.lazyResult, data = _a.data, metacardType = _a.metacardType; + var existingTask = this.list + .filter(SaveTask.isInstanceOf) + .find(function (task) { return task.lazyResult === lazyResult; }); + if (existingTask) { + existingTask.update({ data: data }); + return existingTask; + } + var newTask = new SaveTask({ lazyResult: lazyResult, data: data, metacardType: metacardType }); + this.add(newTask); + return newTask; + }; + AsyncTasksClass.prototype.createSearch = function (_a) { + var data = _a.data; + var newTask = new CreateSearchTask({ data: data }); + this.add(newTask); + return newTask; + }; + AsyncTasksClass.prototype.saveSearch = function (_a) { + var lazyResult = _a.lazyResult, data = _a.data; + var existingTask = this.list + .filter(SaveSearchTask.isInstanceOf) + .find(function (task) { return task.lazyResult === lazyResult; }); + if (existingTask) { + existingTask.update({ data: data }); + return existingTask; + } + var newTask = new SaveSearchTask({ lazyResult: lazyResult, data: data }); + this.add(newTask); + return newTask; + }; + AsyncTasksClass.prototype.isRestoreTask = function (task) { + return RestoreTask.isInstanceOf(task); + }; + AsyncTasksClass.prototype.isDeleteTask = function (task) { + return DeleteTask.isInstanceOf(task); + }; + AsyncTasksClass.prototype.isCreateTask = function (task) { + return CreateTask.isInstanceOf(task); + }; + AsyncTasksClass.prototype.isSaveTask = function (task) { + return SaveTask.isInstanceOf(task); + }; + AsyncTasksClass.prototype.isCreateSearchTask = function (task) { + return CreateSearchTask.isInstanceOf(task); + }; + AsyncTasksClass.prototype.isSaveSearchTask = function (task) { + return SaveSearchTask.isInstanceOf(task); + }; + AsyncTasksClass.prototype.hasShowableTasks = function () { + return (this.list.filter(function (task) { return !SaveSearchTask.isInstanceOf(task); }).length > 0); + }; + AsyncTasksClass.prototype.add = function (asyncTask) { + if (this.list.indexOf(asyncTask) === -1) { + this.list.push(asyncTask); + this._notifySubscribers({ thing: 'add' }); + this._notifySubscribers({ thing: 'update' }); + } + }; + AsyncTasksClass.prototype.remove = function (asyncTask) { + var index = this.list.indexOf(asyncTask); + if (index >= 0) { + this.list.splice(this.list.indexOf(asyncTask), 1); + this._notifySubscribers({ thing: 'remove' }); + this._notifySubscribers({ thing: 'update' }); + } + }; + return AsyncTasksClass; +}(Subscribable)); +export var AsyncTasks = new AsyncTasksClass(); +/** + * Goal is to provide a common abstraction to track long running async tasks in the UI, and free up the user to do whatever they want during them. + * Through subscriptions, we'll allow views to track progress if necessary. (useTaskProgress hooks?) + */ +var AsyncTask = /** @class */ (function (_super) { + __extends(AsyncTask, _super); + function AsyncTask() { + return _super.call(this) || this; + } + return AsyncTask; +}(Subscribable)); +export var useRenderOnAsyncTasksAddOrRemove = function () { + var _a = __read(React.useState(Math.random()), 2), setForceRender = _a[1]; + React.useEffect(function () { + var unsub = AsyncTasks.subscribeTo({ + subscribableThing: 'update', + callback: function () { + setForceRender(Math.random()); + }, + }); + return function () { + unsub(); + }; + }, []); + return; +}; +// allow someone to see if one exists, and sub to updates +export var useRestoreSearchTaskBasedOnParams = function () { + var id = useParams().id; + var task = useRestoreSearchTask({ id: id }); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useRestoreSearchTask = function (_a) { + var id = _a.id; + var _b = __read(React.useState(null), 2), task = _b[0], setTask = _b[1]; + useRenderOnAsyncTasksAddOrRemove(); + React.useEffect(function () { + var updateTask = function () { + /** + * Watch out for metacard.deleted.id not existing, hence the guard, + * and also that either id could match depending on where we are in the restore + * process + */ + var relevantTask = id + ? AsyncTasks.list.filter(RestoreTask.isInstanceOf).find(function (task) { + return (task.lazyResult.plain.metacard.properties['metacard.deleted.id'] === id || task.lazyResult.plain.metacard.properties['id'] === id); + }) + : null; + setTask(relevantTask || null); + }; + var unsub = AsyncTasks.subscribeTo({ + subscribableThing: 'update', + callback: function () { + updateTask(); + }, + }); + updateTask(); + return function () { + unsub(); + }; + }, [id]); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useCreateTaskBasedOnParams = function () { + var id = useParams().id; + var task = useCreateTask({ id: id }); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useCreateTask = function (_a) { + var id = _a.id; + var _b = __read(React.useState(null), 2), task = _b[0], setTask = _b[1]; + useRenderOnAsyncTasksAddOrRemove(); + React.useEffect(function () { + var updateTask = function () { + var relevantTask = AsyncTasks.list + .filter(CreateTask.isInstanceOf) + .find(function (task) { + return task.data.id === id; + }); + setTask(relevantTask || null); + }; + var unsub = AsyncTasks.subscribeTo({ + subscribableThing: 'update', + callback: function () { + updateTask(); + }, + }); + updateTask(); + return function () { + unsub(); + }; + }, [id]); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useSaveTaskBasedOnParams = function () { + var id = useParams().id; + var task = useSaveTask({ id: id }); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useSaveTask = function (_a) { + var id = _a.id; + var _b = __read(React.useState(null), 2), task = _b[0], setTask = _b[1]; + useRenderOnAsyncTasksAddOrRemove(); + React.useEffect(function () { + var updateTask = function () { + var relevantTask = AsyncTasks.list + .filter(SaveTask.isInstanceOf) + .find(function (task) { + return task.data.id === id; + }); + setTask(relevantTask || null); + }; + var unsub = AsyncTasks.subscribeTo({ + subscribableThing: 'update', + callback: function () { + updateTask(); + }, + }); + updateTask(); + return function () { + unsub(); + }; + }, [id]); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useCreateSearchTaskBasedOnParams = function () { + var id = useParams().id; + var task = useCreateSearchTask({ id: id }); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useCreateSearchTask = function (_a) { + var id = _a.id; + var _b = __read(React.useState(null), 2), task = _b[0], setTask = _b[1]; + useRenderOnAsyncTasksAddOrRemove(); + React.useEffect(function () { + var updateTask = function () { + var relevantTask = AsyncTasks.list + .filter(CreateSearchTask.isInstanceOf) + .find(function (task) { + return task.data.id === id; + }); + setTask(relevantTask || null); + }; + var unsub = AsyncTasks.subscribeTo({ + subscribableThing: 'update', + callback: function () { + updateTask(); + }, + }); + updateTask(); + return function () { + unsub(); + }; + }, [id]); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useSaveSearchTaskBasedOnParams = function () { + var id = useParams().id; + var task = useSaveSearchTask({ id: id }); + return task; +}; +// allow someone to see if one exists, and sub to updates +export var useSaveSearchTask = function (_a) { + var id = _a.id; + var _b = __read(React.useState(null), 2), task = _b[0], setTask = _b[1]; + useRenderOnAsyncTasksAddOrRemove(); + React.useEffect(function () { + var updateTask = function () { + var relevantTask = AsyncTasks.list + .filter(SaveSearchTask.isInstanceOf) + .find(function (task) { + return task.data.id === id; + }); + setTask(relevantTask || null); + }; + var unsub = AsyncTasks.subscribeTo({ + subscribableThing: 'update', + callback: function () { + updateTask(); + }, + }); + updateTask(); + return function () { + unsub(); + }; + }, [id]); + return task; +}; +/** + * Pass an async task that you want updates for. Each update will cause your component to rerender, + * and then you can then check whatever you want to about the task. + */ +export var useRenderOnAsyncTaskUpdate = function (_a) { + var asyncTask = _a.asyncTask; + var _b = __read(React.useState(Math.random()), 2), setForceRender = _b[1]; + React.useEffect(function () { + var unsub = asyncTask.subscribeTo({ + subscribableThing: 'update', + callback: function () { + setForceRender(Math.random()); + }, + }); + return function () { + unsub(); + }; + }, []); + return; +}; +var getCqlForFilterTree = function (filterTree) { + if (typeof filterTree === 'string') { + try { + filterTree = JSON.parse(filterTree); + } + catch (err) { + // Continue using string literal if string is not valid JSON. + } + } + return CQL.write(filterTree); +}; +var RestoreTask = /** @class */ (function (_super) { + __extends(RestoreTask, _super); + function RestoreTask(_a) { + var lazyResult = _a.lazyResult; + var _this = _super.call(this) || this; + _this.lazyResult = lazyResult; + _this.attemptRestore(); + return _this; + } + RestoreTask.prototype.attemptRestore = function () { + var _this = this; + var unsubscibeCallback = this.lazyResult.subscribeTo({ + subscribableThing: 'backboneSync', + callback: function () { + var deletedId = _this.lazyResult.plain.metacard.properties['metacard.deleted.id']; + var deletedVersion = _this.lazyResult.plain.metacard.properties['metacard.deleted.version']; + var sourceId = _this.lazyResult.plain.metacard.properties['source-id']; + if (!deletedId) { + window.setTimeout(function () { + _this.lazyResult.refreshDataOverNetwork(); + }, 5000); + } + else { + fetch("./internal/history/revert/".concat(deletedId, "/").concat(deletedVersion, "/").concat(sourceId)).then(function () { + _this._notifySubscribers({ thing: 'update' }); + }); + unsubscibeCallback(); + } + }, + }); + window.setTimeout(function () { + _this.lazyResult.refreshDataOverNetwork(); + }, 5000); + }; + RestoreTask.isInstanceOf = function (task) { + return task.constructor === RestoreTask; + }; + return RestoreTask; +}(AsyncTask)); +var DeleteTask = /** @class */ (function (_super) { + __extends(DeleteTask, _super); + function DeleteTask(_a) { + var lazyResult = _a.lazyResult; + var _this = _super.call(this) || this; + _this.lazyResult = lazyResult; + setTimeout(function () { + _this.attemptDelete(); + }, 1000); + return _this; + } + DeleteTask.prototype.attemptDelete = function () { + var _this = this; + var payload = { + id: '1', + jsonrpc: '2.0', + method: 'ddf.catalog/delete', + params: { + ids: [this.lazyResult.plain.id], + }, + }; + fetch('/direct', { + method: 'POST', + body: JSON.stringify(payload), + }).then(function () { + _this._notifySubscribers({ thing: 'update' }); + }); + }; + DeleteTask.isInstanceOf = function (task) { + return task.constructor === DeleteTask; + }; + return DeleteTask; +}(AsyncTask)); +var CreateTask = /** @class */ (function (_super) { + __extends(CreateTask, _super); + function CreateTask(_a) { + var data = _a.data, metacardType = _a.metacardType; + var _this = _super.call(this) || this; + _this.metacardType = metacardType; + _this.data = data; + _this.data.id = _this.data.id || v4(); + setTimeout(function () { + _this.attemptSave(); + }, 1000); + return _this; + } + CreateTask.prototype.attemptSave = function () { + var _this = this; + var payload = { + id: '1', + jsonrpc: '2.0', + method: 'ddf.catalog/create', + params: { + metacards: [ + { + attributes: __assign({}, convertToBackendCompatibleForm({ properties: this.data })), + metacardType: this.metacardType, + }, + ], + }, + }; + fetch('/direct', { + method: 'POST', + body: JSON.stringify(payload), + }).then(function () { + _this._notifySubscribers({ thing: 'update' }); + }); + }; + CreateTask.isInstanceOf = function (task) { + return task.constructor === CreateTask; + }; + return CreateTask; +}(AsyncTask)); +var SaveTask = /** @class */ (function (_super) { + __extends(SaveTask, _super); + function SaveTask(_a) { + var lazyResult = _a.lazyResult, data = _a.data, metacardType = _a.metacardType; + var _this = _super.call(this) || this; + _this.metacardType = metacardType; + _this.lazyResult = lazyResult; + _this.data = data; + _this.controller = new AbortController(); + _this.attemptSave(); + return _this; + } + SaveTask.prototype.update = function (_a) { + var data = _a.data; + clearTimeout(this.timeoutid); + this.controller.abort(); + this.data = data; + this.attemptSave(); + }; + SaveTask.prototype.attemptSave = function () { + var _this = this; + this.controller = new AbortController(); + this.timeoutid = window.setTimeout(function () { + var payload = { + id: '1', + jsonrpc: '2.0', + method: 'ddf.catalog/update', + params: { + metacards: [ + { + attributes: __assign({}, convertToBackendCompatibleForm({ properties: _this.data })), + metacardType: _this.metacardType, + }, + ], + }, + }; + fetch('/direct', { + method: 'POST', + body: JSON.stringify(payload), + signal: _this.controller.signal, + }).then(function () { + _this.lazyResult.refreshDataOverNetwork(); + var unsub = _this.lazyResult.subscribeTo({ + subscribableThing: 'backboneSync', + callback: function () { + _this._notifySubscribers({ thing: 'update' }); + unsub(); + }, + }); + }); + }, 500); + }; + SaveTask.isInstanceOf = function (task) { + return task.constructor === SaveTask; + }; + return SaveTask; +}(AsyncTask)); +var CreateSearchTask = /** @class */ (function (_super) { + __extends(CreateSearchTask, _super); + function CreateSearchTask(_a) { + var data = _a.data; + var _this = _super.call(this) || this; + _this.data = data; + _this.data.id = v4(); + setTimeout(function () { + _this.attemptSave(); + }, 1000); + return _this; + } + CreateSearchTask.prototype.attemptSave = function () { + var _this = this; + var payload = { + id: '1', + jsonrpc: '2.0', + method: 'ddf.catalog/create', + params: { + metacards: [ + { + attributes: __assign(__assign({}, convertToBackendCompatibleForm({ properties: this.data })), { 'metacard-tags': ['query'], cql: getCqlForFilterTree(this.data.filterTree) }), + metacardType: 'metacard.query', + }, + ], + }, + }; + fetch('/direct', { + method: 'POST', + body: JSON.stringify(payload), + }).then(function () { + _this._notifySubscribers({ thing: 'update' }); + }); + }; + CreateSearchTask.isInstanceOf = function (task) { + return task.constructor === CreateSearchTask; + }; + return CreateSearchTask; +}(AsyncTask)); +var SaveSearchTask = /** @class */ (function (_super) { + __extends(SaveSearchTask, _super); + function SaveSearchTask(_a) { + var lazyResult = _a.lazyResult, data = _a.data; + var _this = _super.call(this) || this; + _this.lazyResult = lazyResult; + _this.data = data; + _this.controller = new AbortController(); + _this.attemptSave(); + return _this; + } + SaveSearchTask.prototype.update = function (_a) { + var data = _a.data; + clearTimeout(this.timeoutid); + this.controller.abort(); + this.data = data; + this.attemptSave(); + }; + SaveSearchTask.prototype.attemptSave = function () { + var _this = this; + this.controller = new AbortController(); + this.timeoutid = window.setTimeout(function () { + var payload = { + id: '1', + jsonrpc: '2.0', + method: 'ddf.catalog/create', + params: { + metacards: [ + { + attributes: __assign(__assign({}, convertToBackendCompatibleForm({ properties: _this.data })), { 'metacard-tags': ['query'], cql: getCqlForFilterTree(_this.data.filterTree) }), + metacardType: 'metacard.query', + }, + ], + }, + }; + fetch('/direct', { + method: 'POST', + body: JSON.stringify(payload), + signal: _this.controller.signal, + }).then(function () { + _this.lazyResult.refreshDataOverNetwork(); + var unsub = _this.lazyResult.subscribeTo({ + subscribableThing: 'backboneSync', + callback: function () { + _this._notifySubscribers({ thing: 'update' }); + unsub(); + }, + }); + }); + }, 500); + }; + SaveSearchTask.isInstanceOf = function (task) { + return task.constructor === SaveSearchTask; + }; + return SaveSearchTask; +}(AsyncTask)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN5bmMtdGFzay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9Bc3luY1Rhc2svYXN5bmMtdGFzay50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtBQUNuRCxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLFVBQVUsTUFBTSxrQkFBa0IsQ0FBQTtBQUV6QyxPQUFPLEtBQUssTUFBTSxzQ0FBc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GltZW91dGlkKVxuICAgIHRoaXMuY29udHJvbGxlci5hYm9ydCgpXG4gICAgdGhpcy5kYXRhID0gZGF0YVxuICAgIHRoaXMuYXR0ZW1wdFNhdmUoKVxuICB9XG4gIGF0dGVtcHRTYXZlKCkge1xuICAgIHRoaXMuY29udHJvbGxlciA9IG5ldyBBYm9ydENvbnRyb2xsZXIoKVxuICAgIHRoaXMudGltZW91dGlkID0gd2luZG93LnNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgY29uc3QgcGF5bG9hZCA9IHtcbiAgICAgICAgaWQ6ICcxJyxcbiAgICAgICAganNvbnJwYzogJzIuMCcsXG4gICAgICAgIG1ldGhvZDogJ2RkZi5jYXRhbG9nL3VwZGF0ZScsXG4gICAgICAgIHBhcmFtczoge1xuICAgICAgICAgIG1ldGFjYXJkczogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBhdHRyaWJ1dGVzOiB7XG4gICAgICAgICAgICAgICAgLi4uY29udmVydFRvQmFja2VuZENvbXBhdGlibGVGb3JtKHsgcHJvcGVydGllczogdGhpcy5kYXRhIH0pLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBtZXRhY2FyZFR5cGU6IHRoaXMubWV0YWNhcmRUeXBlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdLFxuICAgICAgICB9LFxuICAgICAgfVxuXG4gICAgICBmZXRjaCgnL2RpcmVjdCcsIHtcbiAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHBheWxvYWQpLFxuICAgICAgICBzaWduYWw6IHRoaXMuY29udHJvbGxlci5zaWduYWwsXG4gICAgICB9KS50aGVuKCgpID0+IHtcbiAgICAgICAgdGhpcy5sYXp5UmVzdWx0LnJlZnJlc2hEYXRhT3Zlck5ldHdvcmsoKVxuICAgICAgICBjb25zdCB1bnN1YiA9IHRoaXMubGF6eVJlc3VsdC5zdWJzY3JpYmVUbyh7XG4gICA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SxcbiAgICAgICAgICAgICAgICAnbWV0YWNhcmQtdGFncyc6IFsncXVlcnknXSxcbiAgICAgICAgICAgICAgICBjcWw6IGdldENxbEZvckZpbHRlclRyZWUodGhpcy5kYXRhLmZpbHRlclRyZWUpLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBtZXRhY2FyZFR5cGU6ICdtZXRhY2FyZC5xdWVyeScsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0sXG4gICAgICAgIH0sXG4gICAgICB9XG5cbiAgICAgIGZldGNoKCcvZGlyZWN0Jywge1xuICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkocGF5bG9hZCksXG4gICAgICAgIHNpZ25hbDogdGhpcy5jb250cm9sbGVyLnNpZ25hbCxcbiAgICAgIH0pLnRoZW4oKCkgPT4ge1xuICAgICAgICB0aGlzLmxhenlSZXN1bHQucmVmcmVzaERhdGFPdmVyTmV0d29yaygpXG4gICAgICAgIGNvbnN0IHVuc3ViID0gdGhpcy5sYXp5UmVzdWx0LnN1YnNjcmliZVRvKHtcbiAgICAgICAgICBzdWJzY3JpYmFibGVUaGluZzogJ2JhY2tib25lU3luYycsXG4gICAgICAgICAgY2FsbGJhY2s6ICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMuX25vdGlmeVN1YnNjcmliZXJzKHsgdGhpbmc6ICd1cGRhdGUnIH0pXG4gICAgICAgICAgICB1bnN1YigpXG4gICAgICAgICAgfSxcbiAgICAgICAgfSlcbiAgICAgIH0pXG4gICAgfSwgNTAwKVxuICB9XG4gIHN0YXRpYyBpc0luc3RhbmNlT2YodGFzazogYW55KTogdGFzayBpcyBTYXZlU2VhcmNoVGFzayB7XG4gICAgcmV0dXJuIHRhc2suY29uc3RydWN0b3IgPT09IFNhdmVTZWFyY2hUYXNrXG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Base/base-classes.d.ts b/src/main/webapp/js/model/Base/base-classes.d.ts new file mode 100644 index 00000000000..c12ebdc7792 --- /dev/null +++ b/src/main/webapp/js/model/Base/base-classes.d.ts @@ -0,0 +1,25 @@ +/** + * Attempt to pull out what is a fairly common pattern around subscribing + * to instances. + */ +export declare class Subscribable { + subscriptionsToMe: Record void>>; + subscribeTo({ subscribableThing, callback, }: { + subscribableThing: T['thing']; + callback: (val: T['args']) => void; + }): () => void; + _notifySubscribers(parameters: T): void; + constructor(); +} +export declare class Overridable extends Subscribable<{ + thing: 'override'; + args: T; +}> { + private value; + constructor(value: T); + override(newValue: T): void; + get(): T; +} diff --git a/src/main/webapp/js/model/Base/base-classes.hooks.d.ts b/src/main/webapp/js/model/Base/base-classes.hooks.d.ts new file mode 100644 index 00000000000..96ed6abbe7c --- /dev/null +++ b/src/main/webapp/js/model/Base/base-classes.hooks.d.ts @@ -0,0 +1,13 @@ +import { Subscribable, Overridable } from './base-classes'; +export declare function useSubscribable(subscribable: Subscribable, thing: T['thing'], callback: (val: T['args']) => void): void; +/** + * Notice that we are passing a function to useState. This is because useState will call functions + * that are passed to it to compute the initial state. Since overridable.get() could return a function, + * we need to encapsulate the call to it within another function to ensure that useState handles it correctly. + * Similar with setValue, when passed a function it assumes you're trying to access the previous state, so we + * need to encapsulate that call as well. + */ +export declare function useOverridable(overridable: Overridable): T; diff --git a/src/main/webapp/js/model/Base/base-classes.hooks.js b/src/main/webapp/js/model/Base/base-classes.hooks.js new file mode 100644 index 00000000000..38ee09f5968 --- /dev/null +++ b/src/main/webapp/js/model/Base/base-classes.hooks.js @@ -0,0 +1,23 @@ +import { __read } from "tslib"; +// hooks to deal with the base classes +import React from 'react'; +export function useSubscribable(subscribable, thing, callback) { + React.useEffect(function () { + return subscribable.subscribeTo({ subscribableThing: thing, callback: callback }); + }, [subscribable, thing, callback]); +} +/** + * Notice that we are passing a function to useState. This is because useState will call functions + * that are passed to it to compute the initial state. Since overridable.get() could return a function, + * we need to encapsulate the call to it within another function to ensure that useState handles it correctly. + * Similar with setValue, when passed a function it assumes you're trying to access the previous state, so we + * need to encapsulate that call as well. + */ +export function useOverridable(overridable) { + var _a = __read(React.useState(function () { return overridable.get(); }), 2), value = _a[0], setValue = _a[1]; + useSubscribable(overridable, 'override', function () { + setValue(function () { return overridable.get(); }); + }); + return value; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1jbGFzc2VzLmhvb2tzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL0Jhc2UvYmFzZS1jbGFzc2VzLmhvb2tzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsc0NBQXNDO0FBQ3RDLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUd6QixNQUFNLFVBQVUsZUFBZSxDQUM3QixZQUE2QixFQUM3QixLQUFpQixFQUNqQixRQUFrQztJQUVsQyxLQUFLLENBQUMsU0FBUyxDQUFDO1FBQ2QsT0FBTyxZQUFZLENBQUMsV0FBVyxDQUFDLEVBQUUsaUJBQWlCLEVBQUUsS0FBSyxFQUFFLFFBQVEsVUFBQSxFQUFFLENBQUMsQ0FBQTtJQUN6RSxDQUFDLEVBQUUsQ0FBQyxZQUFZLEVBQUUsS0FBSyxFQUFFLFFBQVEsQ0FBQyxDQUFDLENBQUE7QUFDckMsQ0FBQztBQUVEOzs7Ozs7R0FNRztBQUNILE1BQU0sVUFBVSxjQUFjLENBQUksV0FBMkI7SUFDckQsSUFBQSxLQUFBLE9BQW9CLEtBQUssQ0FBQyxRQUFRLENBQUMsY0FBTSxPQUFBLFdBQVcsQ0FBQyxHQUFHLEVBQUUsRUFBakIsQ0FBaUIsQ0FBQyxJQUFBLEVBQTFELEtBQUssUUFBQSxFQUFFLFFBQVEsUUFBMkMsQ0FBQTtJQUNqRSxlQUFlLENBQUMsV0FBV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cm4gYSBmdW5jdGlvbixcbiAqIHdlIG5lZWQgdG8gZW5jYXBzdWxhdGUgdGhlIGNhbGwgdG8gaXQgd2l0aGluIGFub3RoZXIgZnVuY3Rpb24gdG8gZW5zdXJlIHRoYXQgdXNlU3RhdGUgaGFuZGxlcyBpdCBjb3JyZWN0bHkuXG4gKiBTaW1pbGFyIHdpdGggc2V0VmFsdWUsIHdoZW4gcGFzc2VkIGEgZnVuY3Rpb24gaXQgYXNzdW1lcyB5b3UncmUgdHJ5aW5nIHRvIGFjY2VzcyB0aGUgcHJldmlvdXMgc3RhdGUsIHNvIHdlXG4gKiBuZWVkIHRvIGVuY2Fwc3VsYXRlIHRoYXQgY2FsbCBhcyB3ZWxsLlxuICovXG5leHBvcnQgZnVuY3Rpb24gdXNlT3ZlcnJpZGFibGU8VD4ob3ZlcnJpZGFibGU6IE92ZXJyaWRhYmxlPFQ+KSB7XG4gIGNvbnN0IFt2YWx1ZSwgc2V0VmFsdWVdID0gUmVhY3QudXNlU3RhdGUoKCkgPT4gb3ZlcnJpZGFibGUuZ2V0KCkpXG4gIHVzZVN1YnNjcmliYWJsZShvdmVycmlkYWJsZSwgJ292ZXJyaWRlJywgKCkgPT4ge1xuICAgIHNldFZhbHVlKCgpID0+IG92ZXJyaWRhYmxlLmdldCgpKVxuICB9KVxuICByZXR1cm4gdmFsdWVcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Base/base-classes.js b/src/main/webapp/js/model/Base/base-classes.js new file mode 100644 index 00000000000..d694fc2a697 --- /dev/null +++ b/src/main/webapp/js/model/Base/base-classes.js @@ -0,0 +1,49 @@ +import { __extends } from "tslib"; +/** + * Attempt to pull out what is a fairly common pattern around subscribing + * to instances. + */ +var Subscribable = /** @class */ (function () { + function Subscribable() { + this.subscriptionsToMe = {}; + } + Subscribable.prototype.subscribeTo = function (_a) { + var _this = this; + var subscribableThing = _a.subscribableThing, callback = _a.callback; + var id = Math.random().toString(); + if (!this.subscriptionsToMe[subscribableThing]) { + this.subscriptionsToMe[subscribableThing] = {}; + } + this.subscriptionsToMe[subscribableThing][id] = callback; + return function () { + delete _this.subscriptionsToMe[subscribableThing][id]; + }; + }; + Subscribable.prototype._notifySubscribers = function (parameters) { + var subscribers = this.subscriptionsToMe[parameters['thing']]; + if (subscribers) + Object.values(subscribers).forEach(function (callback) { + return callback(parameters['args']); + }); + }; + return Subscribable; +}()); +export { Subscribable }; +var Overridable = /** @class */ (function (_super) { + __extends(Overridable, _super); + function Overridable(value) { + var _this = _super.call(this) || this; + _this.value = value; + return _this; + } + Overridable.prototype.override = function (newValue) { + this.value = newValue; + this._notifySubscribers({ thing: 'override', args: newValue }); + }; + Overridable.prototype.get = function () { + return this.value; + }; + return Overridable; +}(Subscribable)); +export { Overridable }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1jbGFzc2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL0Jhc2UvYmFzZS1jbGFzc2VzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7OztHQUdHO0FBQ0g7SUF5QkU7UUFDRSxJQUFJLENBQUMsaUJBQWlCLEdBQUcsRUFBRSxDQUFBO0lBQzdCLENBQUM7SUF6QkQsa0NBQVcsR0FBWCxVQUFZLEVBTVg7UUFORCxpQkFlQztZQWRDLGlCQUFpQix1QkFBQSxFQUNqQixRQUFRLGNBQUE7UUFLUixJQUFNLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsUUFBUSxFQUFFLENBQUE7UUFDbkMsSUFBSSxDQUFDLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxpQkFBaUIsQ0FBQyxFQUFFO1lBQzlDLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxpQkFBaUIsQ0FBQyxHQUFHL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W1ldGVyczogVCkge1xuICAgIGNvbnN0IHN1YnNjcmliZXJzID0gdGhpcy5zdWJzY3JpcHRpb25zVG9NZVtwYXJhbWV0ZXJzWyd0aGluZyddXVxuICAgIGlmIChzdWJzY3JpYmVycylcbiAgICAgIE9iamVjdC52YWx1ZXMoc3Vic2NyaWJlcnMpLmZvckVhY2goKGNhbGxiYWNrKSA9PlxuICAgICAgICBjYWxsYmFjayhwYXJhbWV0ZXJzWydhcmdzJ10pXG4gICAgICApXG4gIH1cbiAgY29uc3RydWN0b3IoKSB7XG4gICAgdGhpcy5zdWJzY3JpcHRpb25zVG9NZSA9IHt9XG4gIH1cbn1cblxuZXhwb3J0IGNsYXNzIE92ZXJyaWRhYmxlPFQ+IGV4dGVuZHMgU3Vic2NyaWJhYmxlPHtcbiAgdGhpbmc6ICdvdmVycmlkZSdcbiAgYXJnczogVFxufT4ge1xuICBwcml2YXRlIHZhbHVlOiBUXG4gIGNvbnN0cnVjdG9yKHZhbHVlOiBUKSB7XG4gICAgc3VwZXIoKVxuICAgIHRoaXMudmFsdWUgPSB2YWx1ZVxuICB9XG4gIG92ZXJyaWRlKG5ld1ZhbHVlOiBUKSB7XG4gICAgdGhpcy52YWx1ZSA9IG5ld1ZhbHVlXG4gICAgdGhpcy5fbm90aWZ5U3Vic2NyaWJlcnMoeyB0aGluZzogJ292ZXJyaWRlJywgYXJnczogbmV3VmFsdWUgfSlcbiAgfVxuICBnZXQoKSB7XG4gICAgcmV0dXJuIHRoaXMudmFsdWVcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Base/subscribable.spec.d.ts b/src/main/webapp/js/model/Base/subscribable.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/model/Base/subscribable.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/model/Base/subscribable.spec.js b/src/main/webapp/js/model/Base/subscribable.spec.js new file mode 100644 index 00000000000..afe4964dc16 --- /dev/null +++ b/src/main/webapp/js/model/Base/subscribable.spec.js @@ -0,0 +1,39 @@ +import { __extends } from "tslib"; +import { Subscribable } from './base-classes'; +var ExampleClass = /** @class */ (function (_super) { + __extends(ExampleClass, _super); + function ExampleClass() { + var _this = _super.call(this) || this; + setTimeout(function () { + _this._notifySubscribers({ thing: 'one' }); + _this._notifySubscribers({ thing: 'two' }); + }, 500); // 2000ms is max before jest complains + return _this; + } + return ExampleClass; +}(Subscribable)); +describe('subscribable classes work as expected', function () { + it('allows subscribing', function (done) { + var exampleInstance = new ExampleClass(); + exampleInstance.subscribeTo({ + subscribableThing: 'one', + callback: function () { + done(); + }, + }); + }); + it('allows unsubscribing', function (done) { + var exampleInstance = new ExampleClass(); + var unsubCall = exampleInstance.subscribeTo({ + subscribableThing: 'one', + callback: function () { + throw new Error('This should not happen'); + }, + }); + unsubCall(); + setTimeout(function () { + done(); + }, 1000); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vic2NyaWJhYmxlLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvQmFzZS9zdWJzY3JpYmFibGUuc3BlYy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUU3QztJQUEyQixnQ0FBaUQ7SUFDMUU7UUFBQSxZQUNFLGlCQUFPLFNBS1I7UUFKQyxVQUFVLENBQUM7WUFDVCxLQUFJLENBQUMsa0JBQWtCLENBQUMsRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQTtZQUN6QyxLQUFJLENBQUMsa0JBQWtCLENBQUMsRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQTtRQUMzQyxDQUF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bnN1YkNhbGwoKVxuICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgZG9uZSgpXG4gICAgfSwgMTAwMClcbiAgfSlcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.d.ts b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.d.ts new file mode 100644 index 00000000000..456815321bc --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.d.ts @@ -0,0 +1,124 @@ +/// +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { ResultType } from '../Types'; +import { LazyQueryResults, AttributeHighlights } from './LazyQueryResults'; +type SubscribableType = 'backboneCreated' | 'selected' | 'filtered' | 'backboneSync'; +export declare class LazyQueryResult { + ['subscriptionsToMe.backboneCreated']: { + [key: string]: () => void; + }; + ['subscriptionsToMe.backboneSync']: { + [key: string]: () => void; + }; + ['subscriptionsToMe.selected']: { + [key: string]: () => void; + }; + ['subscriptionsToMe.filtered']: { + [key: string]: () => void; + }; + subscribeTo({ subscribableThing, callback, }: { + subscribableThing: SubscribableType; + callback: () => void; + }): () => void; + _notifySubscribers(subscribableThing: SubscribableType): void; + ['_notifySubscribers.backboneCreated'](): void; + ['_notifySubscribers.backboneSync'](): void; + ['_notifySubscribers.selected'](): void; + ['_notifySubscribers.filtered'](): void; + _turnOnDebouncing(): void; + index: number; + prev?: LazyQueryResult; + next?: LazyQueryResult; + parent?: LazyQueryResults; + plain: ResultType; + backbone?: any; + isResourceLocal: boolean; + highlights: AttributeHighlights; + type: 'query-result'; + ['metacard.id']: string; + isSelected: boolean; + isFiltered: boolean; + constructor(plain: ResultType, highlights?: AttributeHighlights); + syncWithBackbone(): void; + syncWithPlain(): void; + refreshFromEditResponse(response: [ + { + ids: string[]; + attributes: [ + { + attribute: string; + values: string[]; + } + ]; + } + ]): void; + refreshData(metacardProperties: LazyQueryResult['plain']['metacard']['properties']): void; + refreshDataOverNetwork(): void; + handleRefreshError(): void; + parseRefresh(response: { + results: ResultType[]; + }): void; + getDownloadUrl(): string; + getPreview(): string; + hasPreview(): boolean; + isSearch(): boolean; + isResource(): boolean; + isRevision(): boolean; + isDeleted(): boolean; + isRemote(): boolean; + hasGeometry(attribute?: any): boolean; + getGeometries(attribute?: any): any; + getPoints(attribute?: any): any; + getMapActions(): { + description: string; + displayName: string; + id: string; + title: string; + url: string; + }[]; + hasMapActions(): boolean; + getExportActions(): { + description: string; + displayName: string; + id: string; + title: string; + url: string; + }[]; + hasExportActions(): boolean; + getOtherActions(): { + description: string; + displayName: string; + id: string; + title: string; + url: string; + }[]; + hasRelevance(): boolean; + getRoundedRelevance(): string; + hasErrors(): boolean; + getErrors(): any; + hasWarnings(): boolean; + getWarnings(): any; + getColor(): string; + getBackbone(): any; + _setBackbone(backboneModel: Backbone.Model): void; + setSelected(isSelected: boolean): boolean; + shiftSelect(): void; + controlSelect(): void; + select(): void; + setFiltered(isFiltered: boolean): boolean; + currentOverlayUrl?: string; +} +export {}; diff --git a/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.js b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.js new file mode 100644 index 00000000000..023c37a1e03 --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.js @@ -0,0 +1,367 @@ +import { __assign } from "tslib"; +import QueryResult from '../QueryResult'; +import cql from '../../cql'; +import _ from 'underscore'; +import * as TurfMeta from '@turf/meta'; +import wkx from 'wkx'; +import { FilterBuilderClass, FilterClass, } from '../../../component/filter-builder/filter.structure'; +import Common from '../../Common'; +var debounceTime = 50; +import $ from 'jquery'; +import { StartupDataStore } from '../Startup/startup'; +function getThumbnailAction(result) { + return result.actions.find(function (action) { return action.id === 'catalog.data.metacard.thumbnail'; }); +} +function humanizeResourceSize(plain) { + if (plain.metacard.properties['resource-size']) { + plain.metacard.properties['resource-size'] = Common.getFileSize(plain.metacard.properties['resource-size']); + } +} +/** + * Add defaults, etc. We need to make sure everything has a tag at the very least + */ +var transformPlain = function (_a) { + var plain = _a.plain; + if (!plain.metacard.properties['metacard-tags']) { + plain.metacard.properties['metacard-tags'] = ['resource']; + } + var thumbnailAction = getThumbnailAction(plain); + if (thumbnailAction) { + plain.metacard.properties.thumbnail = thumbnailAction.url; + } + plain.metacardType = plain.metacard.properties['metacard-type']; + if (plain.metacardType === 'metacard.query' || + (plain.metacard.properties['metacard.deleted.tags'] && + plain.metacard.properties['metacard.deleted.tags'].includes('query'))) { + // since the plain cql search endpoint doesn't understand more complex properties on metacards, we can handle them like this + // plain.metacard.properties.filterTree = + // plain.metacard.properties.filterTree && + // typeof plain.metacard.properties.filterTree === 'string' + // ? JSON.parse(plain.metacard.properties.filterTree) + // : plain.metacard.properties.filterTree + // we could do the same thing we do for filterTree in query to get rid of this, but it requires a lot of tech debt cleanup I think + try { + plain.metacard.properties.sorts = + plain.metacard.properties.sorts && + typeof plain.metacard.properties.sorts[0] === 'string' + ? plain.metacard.properties.sorts.map(function (sort) { + var attribute = sort + .split('attribute=')[1] + .split(', direction=')[0]; + var direction = sort.split(', direction=')[1].slice(0, -1); + return { + attribute: attribute, + direction: direction, + }; + }) + : plain.metacard.properties.sorts; + } + catch (err) { + plain.metacard.properties.sorts = + plain.metacard.properties.sorts && + typeof plain.metacard.properties.sorts[0] === 'string' + ? plain.metacard.properties.sorts.map(function (sort) { + var attribute = sort.split(',')[0]; + var direction = sort.split(',')[1]; + return { + attribute: attribute, + direction: direction, + }; + }) + : plain.metacard.properties.sorts; + } + } + plain.metacard.id = plain.metacard.properties.id; + plain.id = plain.metacard.properties.id; + return plain; +}; +var LazyQueryResult = /** @class */ (function () { + function LazyQueryResult(plain, highlights) { + if (highlights === void 0) { highlights = {}; } + this.highlights = highlights; + this.type = 'query-result'; + this.plain = transformPlain({ plain: plain }); + this.isResourceLocal = false || plain.isResourceLocal; + this['subscriptionsToMe.backboneCreated'] = {}; + this['subscriptionsToMe.backboneSync'] = {}; + this['subscriptionsToMe.selected'] = {}; + this['subscriptionsToMe.filtered'] = {}; + this['metacard.id'] = plain.metacard.properties.id; + this.isSelected = false; + this.isFiltered = false; + humanizeResourceSize(plain); + } + LazyQueryResult.prototype.subscribeTo = function (_a) { + var _this = this; + var subscribableThing = _a.subscribableThing, callback = _a.callback; + var id = Math.random().toString(); + // @ts-ignore + this["subscriptionsToMe.".concat(subscribableThing)][id] = callback; + return function () { + // @ts-ignore + delete _this["subscriptionsToMe.".concat(subscribableThing)][id]; + }; + }; + LazyQueryResult.prototype._notifySubscribers = function (subscribableThing) { + // @ts-ignore + var subscribers = this["subscriptionsToMe.".concat(subscribableThing)]; + Object.values(subscribers).forEach(function (callback) { return callback(); }); + }; + LazyQueryResult.prototype['_notifySubscribers.backboneCreated'] = function () { + this._notifySubscribers('backboneCreated'); + }; + LazyQueryResult.prototype['_notifySubscribers.backboneSync'] = function () { + this._notifySubscribers('backboneSync'); + }; + LazyQueryResult.prototype['_notifySubscribers.selected'] = function () { + this._notifySubscribers('selected'); + }; + LazyQueryResult.prototype['_notifySubscribers.filtered'] = function () { + this._notifySubscribers('filtered'); + }; + LazyQueryResult.prototype._turnOnDebouncing = function () { + this['_notifySubscribers.backboneCreated'] = _.debounce(this['_notifySubscribers.backboneCreated'], debounceTime); + this['_notifySubscribers.backboneSync'] = _.debounce(this['_notifySubscribers.backboneSync'], debounceTime); + this['_notifySubscribers.selected'] = _.debounce(this['_notifySubscribers.selected'], debounceTime); + this['_notifySubscribers.filtered'] = _.debounce(this['_notifySubscribers.filtered'], debounceTime); + }; + LazyQueryResult.prototype.syncWithBackbone = function () { + if (this.backbone) { + this.plain = transformPlain({ plain: this.backbone.toJSON() }); + humanizeResourceSize(this.plain); + this['_notifySubscribers.backboneSync'](); + } + }; + LazyQueryResult.prototype.syncWithPlain = function () { + this.plain = transformPlain({ plain: __assign({}, this.plain) }); + humanizeResourceSize(this.plain); + this['_notifySubscribers.backboneSync'](); + }; + // this is a partial update (like title only or something) + LazyQueryResult.prototype.refreshFromEditResponse = function (response) { + var _this = this; + response.forEach(function (part) { + return part.attributes.forEach(function (attribute) { + _this.plain.metacard.properties[attribute.attribute] = + StartupDataStore.MetacardDefinitions.isMulti(attribute.attribute) + ? attribute.values + : attribute.values[0]; + }); + }); + // I think we should update the edit endpoint to include the new metacard modified date, as this is just to force a refresh + this.plain.metacard.properties['metacard.modified'] = new Date().toJSON(); + this.syncWithPlain(); + }; + // we have the entire metacard sent back + LazyQueryResult.prototype.refreshData = function (metacardProperties) { + if (metacardProperties !== undefined) { + this.plain.metacard.properties = metacardProperties; + this.syncWithPlain(); + } + else { + this.refreshDataOverNetwork(); + } + }; + // just ask the source of truth + LazyQueryResult.prototype.refreshDataOverNetwork = function () { + var _this = this; + //let solr flush + setTimeout(function () { + var req = { + count: 1, + cql: cql.write(new FilterBuilderClass({ + type: 'AND', + filters: [ + new FilterBuilderClass({ + type: 'OR', + filters: [ + new FilterClass({ + type: '=', + property: '"id"', + value: _this.plain.metacard.properties['metacard.deleted.id'] || + _this.plain.id, + }), + new FilterClass({ + type: '=', + property: '"metacard.deleted.id"', + value: _this.plain.id, + }), + ], + }), + new FilterClass({ + type: 'ILIKE', + property: '"metacard-tags"', + value: '*', + }), + ], + })), + id: '0', + sort: 'modified:desc', + src: _this.plain.metacard.properties['source-id'], + }; + $.ajax({ + type: 'POST', + url: './internal/cql', + data: JSON.stringify(req), + contentType: 'application/json', + }).then(_this.parseRefresh.bind(_this), _this.handleRefreshError.bind(_this)); + }, 1000); + }; + LazyQueryResult.prototype.handleRefreshError = function () { + //do nothing for now, should we announce this? + }; + LazyQueryResult.prototype.parseRefresh = function (response) { + var _this = this; + response.results.forEach(function (result) { + _this.plain = result; + }); + this.syncWithPlain(); + }; + LazyQueryResult.prototype.getDownloadUrl = function () { + var downloadAction = this.plain.actions.find(function (action) { + return action.id === 'catalog.data.metacard.resource.alternate-download'; + }); + return downloadAction + ? downloadAction.url + : this.plain.metacard.properties['resource-download-url']; + }; + LazyQueryResult.prototype.getPreview = function () { + return this.plain.metacard.properties['ext.extracted.text']; + }; + LazyQueryResult.prototype.hasPreview = function () { + return this.plain.metacard.properties['ext.extracted.text'] !== undefined; + }; + LazyQueryResult.prototype.isSearch = function () { + return this.plain.metacard.properties['metacard-type'] === 'metacard.query'; + }; + LazyQueryResult.prototype.isResource = function () { + return (this.plain.metacard.properties['metacard-tags'].indexOf('resource') >= 0); + }; + LazyQueryResult.prototype.isRevision = function () { + return (this.plain.metacard.properties['metacard-tags'].indexOf('revision') >= 0); + }; + LazyQueryResult.prototype.isDeleted = function () { + return (this.plain.metacard.properties['metacard-tags'].indexOf('deleted') >= 0); + }; + LazyQueryResult.prototype.isRemote = function () { + var harvestedSources = StartupDataStore.Sources.harvestedSources; + return (harvestedSources.includes(this.plain.metacard.properties['source-id']) === + false); + }; + LazyQueryResult.prototype.hasGeometry = function (attribute) { + return (_.filter(this.plain.metacard.properties, function (_value, key) { + return (attribute === undefined || attribute === key) && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === + 'GEOMETRY'; + }).length > 0); + }; + LazyQueryResult.prototype.getGeometries = function (attribute) { + return _.filter(this.plain.metacard.properties, function (_value, key) { + return !StartupDataStore.MetacardDefinitions.isHiddenAttribute(key) && + (attribute === undefined || attribute === key) && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === + 'GEOMETRY'; + }); + }; + LazyQueryResult.prototype.getPoints = function (attribute) { + try { + return this.getGeometries(attribute).reduce(function (pointArray, wkt) { + return pointArray.concat(TurfMeta.coordAll(wkx.Geometry.parse(wkt).toGeoJSON())); + }, []); + } + catch (err) { + console.error(err); + return []; + } + }; + LazyQueryResult.prototype.getMapActions = function () { + return this.plain.actions.filter(function (action) { return action.id.indexOf('catalog.data.metacard.map.') === 0; }); + }; + LazyQueryResult.prototype.hasMapActions = function () { + return this.getMapActions().length > 0; + }; + LazyQueryResult.prototype.getExportActions = function () { + var otherActions = this.getMapActions(); + return this.plain.actions + .filter(function (action) { return action.title.indexOf('Export') === 0; }) + .filter(function (action) { return otherActions.indexOf(action) === -1; }); + }; + LazyQueryResult.prototype.hasExportActions = function () { + return this.getExportActions().length > 0; + }; + LazyQueryResult.prototype.getOtherActions = function () { + var otherActions = this.getExportActions().concat(this.getMapActions()); + return this.plain.actions.filter(function (action) { return otherActions.indexOf(action) === -1; }); + }; + LazyQueryResult.prototype.hasRelevance = function () { + return Boolean(this.plain.relevance); + }; + LazyQueryResult.prototype.getRoundedRelevance = function () { + return this.plain.relevance.toPrecision(StartupDataStore.Configuration.getRelevancePrecision()); + }; + LazyQueryResult.prototype.hasErrors = function () { + return Boolean(this.getErrors()); + }; + LazyQueryResult.prototype.getErrors = function () { + return this.plain.metacard.properties['validation-errors']; + }; + LazyQueryResult.prototype.hasWarnings = function () { + return Boolean(this.getWarnings()); + }; + LazyQueryResult.prototype.getWarnings = function () { + return this.plain.metacard.properties['validation-warnings']; + }; + LazyQueryResult.prototype.getColor = function () { + return '#004949'; + }; + LazyQueryResult.prototype.getBackbone = function () { + if (this.backbone === undefined) { + this._setBackbone(new QueryResult(this.plain)); + } + return this.backbone; + }; + LazyQueryResult.prototype._setBackbone = function (backboneModel) { + this.backbone = backboneModel; + this['_notifySubscribers.backboneCreated'](); + }; + LazyQueryResult.prototype.setSelected = function (isSelected) { + if (this.isSelected !== isSelected) { + this.isSelected = isSelected; + this['_notifySubscribers.selected'](); + return true; + } + else { + return false; + } + }; + LazyQueryResult.prototype.shiftSelect = function () { + if (this.parent) { + this.parent.shiftSelect(this); + } + }; + LazyQueryResult.prototype.controlSelect = function () { + if (this.parent) { + this.parent.controlSelect(this); + } + }; + LazyQueryResult.prototype.select = function () { + if (this.parent) { + this.parent.select(this); + } + }; + LazyQueryResult.prototype.setFiltered = function (isFiltered) { + if (this.isFiltered !== isFiltered) { + this.isFiltered = isFiltered; + this['_notifySubscribers.filtered'](); + return true; + } + else { + return false; + } + }; + return LazyQueryResult; +}()); +export { LazyQueryResult }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGF6eVF1ZXJ5UmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL0xhenlRdWVyeVJlc3VsdC9MYXp5UXVlcnlSZXN1bHQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFlQSxPQUFPLFdBQVcsTUFBTSxnQkFBZ0IsQ0FBQTtBQUV4QyxPQUFPLEdBQUcsTUFBTSxXQUFXLENBQUE7QUFDM0IsT0FBTyxDQUFDLE1BQU0sWUFBWSxDQUFBO0FBQzFCLE9BQU8sS0FBSyxRQUFRLE1BQU0sWUFBWSxDQUFBO0FBQ3RDLE9BQU8sR0FBRyxNQUFNLEtBQUssQ0FBQTtBQUNyQixPQUFPLEVBQ0wsa0JBQWtCLEVBQ2xCLFdBQVcsR0FDWixNQUFNLG9EQUFvRCxDQUFBO0FBQzNELE9BQU8sTUFBTSxNQUFNLGNBQWMsQ0FBQTtBQUNqQyxJQUFNLFlBQVksR0FBRyxFQUFFLENBQUE7QUFDdkIsT0FBTyxDQUFDLE1BQU0sUUFBUSxDQUFBO0FBQ3RCLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG9CQUFvQixDQUFBO0FBQ3JELFNBQVMsa0JBQWtCLENBQUMsTUFBa0I7SUFDNUMsT0FBTyxNQUFNLENBQUMsT0FBTyxDQUF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gICAgLnNwbGl0KCcsIGRpcmVjdGlvbj0nKVswXVxuICAgICAgICAgICAgICBjb25zdCBkaXJlY3Rpb24gPSBzb3J0LnNwbGl0KCcsIGRpcmVjdGlvbj0nKVsxXS5zbGljZSgwLCAtMSlcbiAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGUsXG4gICAgICAgICAgICAgICAgZGlyZWN0aW9uLFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgIDogcGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy5zb3J0c1xuICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgcGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy5zb3J0cyA9XG4gICAgICAgIHBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMuc29ydHMgJiZcbiAgICAgICAgdHlwZW9mIHBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMuc29ydHNbMF0gPT09ICdzdHJpbmcnXG4gICAgICAgICAgPyAocGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy5zb3J0cyBhcyBzdHJpbmdbXSkubWFwKChzb3J0KSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IGF0dHJpYnV0ZSA9IHNvcnQuc3BsaXQoJywnKVswXVxuICAgICAgICAgICAgICBjb25zdCBkaXJlY3Rpb24gPSBzb3J0LnNwbGl0KCcsJylbMV1cbiAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGUsXG4gICAgICAgICAgICAgICAgZGlyZWN0aW9uLFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgIDogcGxhaW4ubWV0YWNhcmQucHJvcGVydGllcy5zb3J0c1xuICAgIH1cbiAgfVxuICBwbGFpbi5tZXRhY2FyZC5pZCA9IHBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXMuaWRcbiAgcGxhaW4uaWQgPSBwbG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0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICc9JyxcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydHk6ICdcImlkXCInLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTpcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXNbJ21ldGFjYXJkLmRlbGV0ZWQuaWQnXSB8fFxuICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGxhaW4uaWQsXG4gICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICc9JyxcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydHk6ICdcIm1ldGFjYXJkLmRlbGV0ZWQuaWRcIicsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiB0aGlzLnBsYWluLmlkLFxuICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgIG5ldyBGaWx0ZXJDbGFzcyh7XG4gICAgICAgICAgICAgICAgdHlwZTogJ0lMSUtFJyxcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eTogJ1wibWV0YWNhcmQtdGFnc1wiJyxcbiAgICAgICAgICAgICAgICB2YWx1ZTogJyonLFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgfSlcbiAgICAgICAgKSxcbiAgICAgICAgaWQ6ICcwJyxcbiAgICAgICAgc29ydDogJ21vZGlmaWVkOmRlc2MnLFxuICAgICAgICBzcmM6IHRoaXMucGxhaW4ubWV0YWNhcmQucHJvcGVydGllc1snc291cmNlLWlkJ10sXG4gICAgICB9XG4gICAgICAkLmFqYXgoe1xuICAgICAgICB0eXBlOiAnUE9TVCcsXG4gICAgICAgIHVybDogJy4vaW50ZXJuYWwvY3Fs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wYXJlbnQpIHtcbiAgICAgIHRoaXMucGFyZW50LnNlbGVjdCh0aGlzKVxuICAgIH1cbiAgfVxuICBzZXRGaWx0ZXJlZChpc0ZpbHRlcmVkOiBib29sZWFuKSB7XG4gICAgaWYgKHRoaXMuaXNGaWx0ZXJlZCAhPT0gaXNGaWx0ZXJlZCkge1xuICAgICAgdGhpcy5pc0ZpbHRlcmVkID0gaXNGaWx0ZXJlZFxuICAgICAgdGhpc1snX25vdGlmeVN1YnNjcmliZXJzLmZpbHRlcmVkJ10oKVxuICAgICAgcmV0dXJuIHRydWVcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGZhbHNlXG4gICAgfVxuICB9XG4gIGN1cnJlbnRPdmVybGF5VXJsPzogc3RyaW5nXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.d.ts b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.d.ts new file mode 100644 index 00000000000..8914a1475a6 --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.d.ts @@ -0,0 +1,228 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { ResultType } from '../Types'; +import { LazyQueryResult } from './LazyQueryResult'; +import { QuerySortType } from './types'; +import { Status } from './status'; +import { TransformSortsComposedFunctionType } from '../TypedQuery'; +import Backbone from 'backbone'; +import { FilterBuilderClass } from '../../../component/filter-builder/filter.structure'; +export type SearchStatus = { + [key: string]: Status; +}; +export type AttributeHighlight = { + highlight: string; + attribute: string; + endIndex: string; + startIndex: string; + valueIndex: string; +}; +export type AttributeHighlights = { + [key: string]: Array; +}; +/** + * Example: + * [ + { + "id": "29c0c0e9-b205-49bb-9649-ddf3b31e46f7", + "highlights": [ + { + "valueIndex": "0", + "highlight": "Windham County, Vermont", + "startIndex": "16", + "endIndex": "23", + "attribute": "title" + } + ] + } + ] + */ +export type ResponseHighlightType = Array<{ + id: string; + highlights: Array; +}>; +/** store highlights in a map + * Example: + * { + "29c0c0e9-b205-49bb-9649-ddf3b31e46f7": { + "title": [ + { + "valueIndex": "0", + "highlight": "Windham County, Vermont", + "startIndex": "16", + "endIndex": "23", + "attribute": "title" + } + ] + } + } + */ +type TransformedHighlightsType = { + [key: string]: AttributeHighlights; +}; +export declare const transformResponseHighlightsToMap: ({ highlights, }: { + highlights?: ResponseHighlightType | undefined; +}) => TransformedHighlightsType; +type ConstructorProps = { + filterTree?: FilterBuilderClass; + results?: ResultType[]; + sorts?: QuerySortType[]; + sources?: string[]; + transformSorts?: TransformSortsComposedFunctionType; + status?: SearchStatus; + highlights?: TransformedHighlightsType; + showingResultsForFields?: any[]; + didYouMeanFields?: any[]; +}; +type SubscribableType = 'status' | 'filteredResults' | 'selectedResults' | 'results.backboneSync' | 'filterTree'; +type SubscriptionType = { + [key: string]: () => void; +}; +/** + * Constructed with performance in mind, taking advantage of maps whenever possible. + * This is the heart of our app, so take care when updating / adding things here to + * do it with performance in mind. + * + */ +export declare class LazyQueryResults { + ['subscriptionsToOthers.result.isSelected']: (() => void)[]; + ['subscriptionsToOthers.result.backboneCreated']: (() => void)[]; + ['subscriptionsToOthers.result.backboneSync']: (() => void)[]; + ['subscriptionsToMe.status']: SubscriptionType; + ['subscriptionsToMe.filteredResults']: SubscriptionType; + ['subscriptionsToMe.selectedResults']: SubscriptionType; + ['subscriptionsToMe.filterTree']: SubscriptionType; + ['subscriptionsToMe.results.backboneSync']: SubscriptionType; + subscribeTo({ subscribableThing, callback, }: { + subscribableThing: SubscribableType; + callback: () => void; + }): () => void; + _notifySubscribers(subscribableThing: SubscribableType): void; + ['_notifySubscribers.status'](): void; + ['_notifySubscribers.filteredResults'](): void; + ['_notifySubscribers.selectedResults'](): void; + ['_notifySubscribers.results.backboneSync'](): void; + ['_notifySubscribers.filterTree'](): void; + _turnOnDebouncing(): void; + compareFunction: (a: LazyQueryResult, b: LazyQueryResult) => number; + results: { + [key: string]: LazyQueryResult; + }; + selectedResults: { + [key: string]: LazyQueryResult; + }; + _getMaxIndexOfSelectedResults(): number; + _getMinIndexOfSelectedResults(): number; + /** + * This is used mostly by + */ + groupSelect(): void; + /** + * This will set swathes of sorted results to be selected. It does not deselect anything. + * Primarily used in the list view (card / table) + */ + shiftSelect(target: LazyQueryResult): void; + /** + * This takes a list of ids to set to selected, and will deselect all others. + */ + selectByIds(targets: string[]): void; + controlSelect(target: LazyQueryResult): void; + /** + * This will toggle selection of the lazyResult passed in, and deselect all others. + */ + select(target: LazyQueryResult): void; + deselect(): void; + backboneModel: Backbone.Model; + /** + * Can contain distance / best text match + * (this matches what the query requested) + */ + persistantSorts: QuerySortType[]; + /** + * Pass a function that returns the sorts to use, allowing such things as substituting ephemeral sorts + */ + transformSorts: TransformSortsComposedFunctionType; + /** + * Should really only be set at constructor time (moment a query is done) + */ + _updatePersistantSorts(sorts: QuerySortType[]): void; + _updateTransformSorts(transformSorts: TransformSortsComposedFunctionType): void; + _getSortedResults(results: LazyQueryResult[]): LazyQueryResult[]; + /** + * The map of results will ultimately be the source of truth here + * Maps guarantee chronological order for Object.keys operations, + * so we turn it into an array to sort then feed it back into a map. + * + * On resort we have to update the links between results (used for selecting performantly), + * as well as the indexes which are used similarly + * + */ + _resort(): void; + /** + * This is purely to force a rerender in scenarios where we update result values and want to update views without resorting + * (resorting wouldn't make sense to do client side since there could be more results on the server) + * It also would be weird since things in tables or lists might jump around while the user is working with them. + */ + _fakeResort(): void; + highlights: TransformedHighlightsType; + addHighlights(highlights: TransformedHighlightsType): void; + resetHighlights(): void; + constructor({ filterTree, results, sorts, sources, transformSorts, status, highlights, didYouMeanFields, showingResultsForFields, }?: ConstructorProps); + init(): void; + _resetSelectedResults(): void; + reset({ filterTree, results, sorts, sources, transformSorts, status, highlights, didYouMeanFields, showingResultsForFields, }?: ConstructorProps): void; + destroy(): void; + isEmpty(): boolean; + add({ results, }?: { + results?: ResultType[]; + }): void; + _updateSelectedResults({ lazyResult }: { + lazyResult: LazyQueryResult; + }): void; + types: MetacardTypes; + addTypes(types: MetacardTypes): void; + getCurrentAttributes(): string[]; + sources: string[]; + _resetSources(sources: string[]): void; + _resetStatus(): void; + filterTree?: FilterBuilderClass; + _resetFilterTree(filterTree?: FilterBuilderClass): void; + cancel(): void; + updateStatus(status: SearchStatus): void; + updateStatusWithError({ sources, message, }: { + sources: string[]; + message: string; + }): void; + _updateIsSearching(): void; + isSearching: boolean; + currentAsOf: number; + status: SearchStatus; + updateDidYouMeanFields(update: any[] | null): void; + resetDidYouMeanFields(): void; + didYouMeanFields: any[]; + updateShowingResultsForFields(update: any[] | null): void; + resetShowingResultsForFields(): void; + showingResultsForFields: any[]; +} +type MetacardTypes = { + [key: string]: { + [key: string]: { + format: string; + multivalued: boolean; + indexed: boolean; + }; + }; +}; +export {}; diff --git a/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.js b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.js new file mode 100644 index 00000000000..7bad44e1588 --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.js @@ -0,0 +1,401 @@ +import { __assign, __read, __spreadArray } from "tslib"; +import { generateCompareFunction } from './sort'; +import { LazyQueryResult } from './LazyQueryResult'; +import { Status } from './status'; +import _ from 'underscore'; +var debounceTime = 250; +import Backbone from 'backbone'; +export var transformResponseHighlightsToMap = function (_a) { + var _b = _a.highlights, highlights = _b === void 0 ? [] : _b; + return highlights.reduce(function (blob, highlight) { + blob[highlight.id] = highlight.highlights.reduce(function (innerblob, subhighlight) { + innerblob[subhighlight.attribute] = highlight.highlights.filter(function (hl) { return hl.attribute === subhighlight.attribute; }); + return innerblob; + }, {}); + return blob; + }, {}); +}; +/** + * Constructed with performance in mind, taking advantage of maps whenever possible. + * This is the heart of our app, so take care when updating / adding things here to + * do it with performance in mind. + * + */ +var LazyQueryResults = /** @class */ (function () { + function LazyQueryResults(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.filterTree, filterTree = _c === void 0 ? undefined : _c, _d = _b.results, results = _d === void 0 ? [] : _d, _e = _b.sorts, sorts = _e === void 0 ? [] : _e, _f = _b.sources, sources = _f === void 0 ? [] : _f, transformSorts = _b.transformSorts, _g = _b.status, status = _g === void 0 ? {} : _g, _h = _b.highlights, highlights = _h === void 0 ? {} : _h, _j = _b.didYouMeanFields, didYouMeanFields = _j === void 0 ? [] : _j, _k = _b.showingResultsForFields, showingResultsForFields = _k === void 0 ? [] : _k; + /** + * Pass a function that returns the sorts to use, allowing such things as substituting ephemeral sorts + */ + this.transformSorts = function (_a) { + var originalSorts = _a.originalSorts; + return originalSorts; + }; + this.highlights = {}; + this._turnOnDebouncing(); + this.reset({ + filterTree: filterTree, + results: results, + sorts: sorts, + sources: sources, + transformSorts: transformSorts, + status: status, + highlights: highlights, + didYouMeanFields: didYouMeanFields, + showingResultsForFields: showingResultsForFields, + }); + this.backboneModel = new Backbone.Model({ + id: Math.random().toString(), + }); + } + LazyQueryResults.prototype.subscribeTo = function (_a) { + var _this = this; + var subscribableThing = _a.subscribableThing, callback = _a.callback; + var id = Math.random().toString(); + // @ts-ignore remove when we upgrade ace to use latest typescript + this["subscriptionsToMe.".concat(subscribableThing)][id] = callback; + return function () { + // @ts-ignore remove when we upgrade ace to use latest typescript + delete _this["subscriptionsToMe.".concat(subscribableThing)][id]; + }; + }; + LazyQueryResults.prototype._notifySubscribers = function (subscribableThing) { + // @ts-ignore remove when we upgrade ace to use latest typescript + var subscribers = this["subscriptionsToMe.".concat(subscribableThing)]; + Object.values(subscribers).forEach(function (callback) { return callback(); }); + }; + LazyQueryResults.prototype['_notifySubscribers.status'] = function () { + this._notifySubscribers('status'); + }; + LazyQueryResults.prototype['_notifySubscribers.filteredResults'] = function () { + this._notifySubscribers('filteredResults'); + }; + LazyQueryResults.prototype['_notifySubscribers.selectedResults'] = function () { + this._notifySubscribers('selectedResults'); + }; + LazyQueryResults.prototype['_notifySubscribers.results.backboneSync'] = function () { + this._notifySubscribers('results.backboneSync'); + }; + LazyQueryResults.prototype['_notifySubscribers.filterTree'] = function () { + this._notifySubscribers('filterTree'); + }; + LazyQueryResults.prototype._turnOnDebouncing = function () { + this['_notifySubscribers.status'] = _.debounce(this['_notifySubscribers.status'], debounceTime); + this['_notifySubscribers.filteredResults'] = _.debounce(this['_notifySubscribers.filteredResults'], debounceTime); + this['_notifySubscribers.selectedResults'] = _.debounce(this['_notifySubscribers.selectedResults'], debounceTime); + this['_notifySubscribers.results.backboneSync'] = _.debounce(this['_notifySubscribers.results.backboneSync'], debounceTime); + this['_notifySubscribers.filterTree'] = _.debounce(this['_notifySubscribers.filterTree'], debounceTime); + }; + LazyQueryResults.prototype._getMaxIndexOfSelectedResults = function () { + return Object.values(this.selectedResults).reduce(function (max, result) { + return Math.max(max, result.index); + }, -1); + }; + LazyQueryResults.prototype._getMinIndexOfSelectedResults = function () { + return Object.values(this.selectedResults).reduce(function (min, result) { + return Math.min(min, result.index); + }, Object.keys(this.results).length); + }; + /** + * This is used mostly by + */ + LazyQueryResults.prototype.groupSelect = function () { }; + /** + * This will set swathes of sorted results to be selected. It does not deselect anything. + * Primarily used in the list view (card / table) + */ + LazyQueryResults.prototype.shiftSelect = function (target) { + var firstIndex = this._getMinIndexOfSelectedResults(); + var lastIndex = this._getMaxIndexOfSelectedResults(); + var indexClicked = target.index; + if (Object.keys(this.selectedResults).length === 0) { + target.setSelected(target.isSelected); + } + else if (indexClicked <= firstIndex) { + // traverse from target to next until firstIndex + var currentItem = target; + while (currentItem && currentItem.index <= firstIndex) { + currentItem.setSelected(true); + currentItem = currentItem.next; + } + } + else if (indexClicked >= lastIndex) { + // traverse from target to prev until lastIndex + var currentItem = target; + while (currentItem && currentItem.index >= lastIndex) { + currentItem.setSelected(true); + currentItem = currentItem.prev; + } + } + else { + // traverse from target to prev until something doesn't change + var currentItem = target; + var changed = true; + while (currentItem && changed) { + changed = currentItem.setSelected(true) && changed; + currentItem = currentItem.prev; + } + } + }; + /** + * This takes a list of ids to set to selected, and will deselect all others. + */ + LazyQueryResults.prototype.selectByIds = function (targets) { + var _this = this; + this.deselect(); + targets.forEach(function (id) { + if (_this.results[id]) { + _this.results[id].setSelected(true); + } + }); + }; + LazyQueryResults.prototype.controlSelect = function (target) { + target.setSelected(!target.isSelected); + }; + /** + * This will toggle selection of the lazyResult passed in, and deselect all others. + */ + LazyQueryResults.prototype.select = function (target) { + var isSelected = !target.isSelected; + this.deselect(); + target.setSelected(isSelected); + }; + LazyQueryResults.prototype.deselect = function () { + Object.values(this.selectedResults).forEach(function (result) { + result.setSelected(false); + }); + }; + /** + * Should really only be set at constructor time (moment a query is done) + */ + LazyQueryResults.prototype._updatePersistantSorts = function (sorts) { + this.persistantSorts = sorts; + }; + LazyQueryResults.prototype._updateTransformSorts = function (transformSorts) { + this.transformSorts = transformSorts; + }; + LazyQueryResults.prototype._getSortedResults = function (results) { + return results.sort(generateCompareFunction(this.transformSorts({ originalSorts: this.persistantSorts }))); + }; + /** + * The map of results will ultimately be the source of truth here + * Maps guarantee chronological order for Object.keys operations, + * so we turn it into an array to sort then feed it back into a map. + * + * On resort we have to update the links between results (used for selecting performantly), + * as well as the indexes which are used similarly + * + */ + LazyQueryResults.prototype._resort = function () { + this.results = this._getSortedResults(Object.values(this.results)).reduce(function (blob, result, index, results) { + result.index = index; + result.prev = results[index - 1]; + result.next = results[index + 1]; + blob[result['metacard.id']] = result; + return blob; + }, {}); + }; + /** + * This is purely to force a rerender in scenarios where we update result values and want to update views without resorting + * (resorting wouldn't make sense to do client side since there could be more results on the server) + * It also would be weird since things in tables or lists might jump around while the user is working with them. + */ + LazyQueryResults.prototype._fakeResort = function () { + this.results = Object.values(this.results).reduce(function (blob, result, index, results) { + result.index = index; + result.prev = results[index - 1]; + result.next = results[index + 1]; + blob[result['metacard.id']] = result; + return blob; + }, {}); + }; + // we can do a shallow merge because there will be no overlap between the two objects (separate queries, seperate results i.e. ids) + LazyQueryResults.prototype.addHighlights = function (highlights) { + this.highlights = __assign(__assign({}, this.highlights), highlights); + }; + LazyQueryResults.prototype.resetHighlights = function () { + this.highlights = {}; + }; + LazyQueryResults.prototype.init = function () { + this.currentAsOf = Date.now(); + if (this['subscriptionsToOthers.result.isSelected']) + this['subscriptionsToOthers.result.isSelected'].forEach(function (unsubscribe) { + unsubscribe(); + }); + if (this['subscriptionsToOthers.result.backboneSync']) + this['subscriptionsToOthers.result.backboneSync'].forEach(function (unsubscribe) { + unsubscribe(); + }); + this['subscriptionsToOthers.result.backboneSync'] = []; + this['subscriptionsToOthers.result.isSelected'] = []; + this._resetSelectedResults(); + if (this['subscriptionsToMe.filteredResults'] === undefined) + this['subscriptionsToMe.filteredResults'] = {}; + if (this['subscriptionsToMe.selectedResults'] === undefined) + this['subscriptionsToMe.selectedResults'] = {}; + if (this['subscriptionsToMe.status'] === undefined) + this['subscriptionsToMe.status'] = {}; + if (this['subscriptionsToMe.filterTree'] === undefined) + this['subscriptionsToMe.filterTree'] = {}; + this.results = {}; + this.types = {}; + this.sources = []; + this.status = {}; + }; + LazyQueryResults.prototype._resetSelectedResults = function () { + var shouldNotify = this.selectedResults !== undefined && + Object.keys(this.selectedResults).length > 0; + this.selectedResults = {}; + if (shouldNotify) + this['_notifySubscribers.selectedResults'](); + }; + LazyQueryResults.prototype.reset = function (_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.filterTree, filterTree = _c === void 0 ? undefined : _c, _d = _b.results, results = _d === void 0 ? [] : _d, _e = _b.sorts, sorts = _e === void 0 ? [] : _e, _f = _b.sources, sources = _f === void 0 ? [] : _f, _g = _b.transformSorts, transformSorts = _g === void 0 ? function (_a) { + var originalSorts = _a.originalSorts; + return originalSorts; + } : _g, _h = _b.status, status = _h === void 0 ? {} : _h, _j = _b.highlights, highlights = _j === void 0 ? {} : _j, _k = _b.didYouMeanFields, didYouMeanFields = _k === void 0 ? [] : _k, _l = _b.showingResultsForFields, showingResultsForFields = _l === void 0 ? [] : _l; + this.init(); + this.resetHighlights(); + this.resetDidYouMeanFields(); + this.resetShowingResultsForFields(); + this._resetFilterTree(filterTree); + this._resetSources(sources); + this._updatePersistantSorts(sorts); + this._updateTransformSorts(transformSorts); + this.updateDidYouMeanFields(didYouMeanFields); + this.updateShowingResultsForFields(showingResultsForFields); + this.addHighlights(highlights); + this.add({ results: results }); + this.updateStatus(status); + }; + LazyQueryResults.prototype.destroy = function () { + this.backboneModel.stopListening(); + }; + LazyQueryResults.prototype.isEmpty = function () { + return Object.keys(this.results).length === 0; + }; + LazyQueryResults.prototype.add = function (_a) { + var _this = this; + var _b = _a === void 0 ? {} : _a, _c = _b.results, results = _c === void 0 ? [] : _c; + results.forEach(function (result) { + var lazyResult = new LazyQueryResult(result, _this.highlights[result.metacard.properties.id]); + _this.results[lazyResult['metacard.id']] = lazyResult; + lazyResult.parent = _this; + /** + * Keep a fast lookup of what results are selected + */ + _this['subscriptionsToOthers.result.isSelected'].push(lazyResult.subscribeTo({ + subscribableThing: 'selected', + callback: function () { + _this._updateSelectedResults({ lazyResult: lazyResult }); + }, + })); + /** + * When a backbone model is created we want to start listening for updates so the plain object has the same information + */ + _this['subscriptionsToOthers.result.backboneSync'].push(lazyResult.subscribeTo({ + subscribableThing: 'backboneSync', + callback: function () { + /** + * In this case we don't want to really resort, just force renders on views by telling them things have changed. + */ + _this._fakeResort(); + _this['_notifySubscribers.filteredResults'](); + }, + })); + }); + this._resort(); + this['_notifySubscribers.filteredResults'](); + }; + LazyQueryResults.prototype._updateSelectedResults = function (_a) { + var lazyResult = _a.lazyResult; + if (lazyResult.isSelected) { + this.selectedResults[lazyResult['metacard.id']] = lazyResult; + } + else { + delete this.selectedResults[lazyResult['metacard.id']]; + } + this['_notifySubscribers.selectedResults'](); + }; + LazyQueryResults.prototype.addTypes = function (types) { + this.types = __assign(__assign({}, this.types), types); + }; + LazyQueryResults.prototype.getCurrentAttributes = function () { + return Object.keys(Object.values(this.types).reduce(function (blob, definition) { + return __assign(__assign({}, blob), definition); + }, {})); + }; + LazyQueryResults.prototype._resetSources = function (sources) { + this.sources = sources; + this._resetStatus(); + }; + LazyQueryResults.prototype._resetStatus = function () { + this.status = this.sources.reduce(function (blob, source) { + blob[source] = new Status({ id: source }); + return blob; + }, {}); + this._updateIsSearching(); + this['_notifySubscribers.status'](); + }; + LazyQueryResults.prototype._resetFilterTree = function (filterTree) { + this.filterTree = filterTree; + this['_notifySubscribers.filterTree'](); + }; + LazyQueryResults.prototype.cancel = function () { + var _this = this; + Object.keys(status).forEach(function (id) { + if (_this.status[id].hasReturned === false) { + _this.status[id].updateStatus({ + hasReturned: true, + message: 'Canceled by user', + successful: false, + }); + } + }); + this._updateIsSearching(); + this['_notifySubscribers.status'](); + }; + LazyQueryResults.prototype.updateStatus = function (status) { + var _this = this; + Object.keys(status).forEach(function (id) { + _this.status[id].updateStatus(status[id]); + }); + this._updateIsSearching(); + this['_notifySubscribers.status'](); + }; + LazyQueryResults.prototype.updateStatusWithError = function (_a) { + var _this = this; + var sources = _a.sources, message = _a.message; + sources.forEach(function (id) { + if (_this.status[id]) + _this.status[id].updateStatus({ + message: message, + successful: false, + }); + }); + this._updateIsSearching(); + this['_notifySubscribers.status'](); + }; + LazyQueryResults.prototype._updateIsSearching = function () { + this.isSearching = Object.values(this.status).some(function (status) { + return !status.hasReturned; + }); + }; + LazyQueryResults.prototype.updateDidYouMeanFields = function (update) { + if (update !== null) + this.didYouMeanFields = __spreadArray(__spreadArray([], __read(this.didYouMeanFields), false), __read(update), false); + }; + LazyQueryResults.prototype.resetDidYouMeanFields = function () { + this.didYouMeanFields = []; + }; + LazyQueryResults.prototype.updateShowingResultsForFields = function (update) { + if (update !== null) + this.showingResultsForFields = __spreadArray(__spreadArray([], __read(this.showingResultsForFields), false), __read(update), false); + }; + LazyQueryResults.prototype.resetShowingResultsForFields = function () { + this.showingResultsForFields = []; + }; + return LazyQueryResults; +}()); +export { LazyQueryResults }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGF6eVF1ZXJ5UmVzdWx0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9MYXp5UXVlcnlSZXN1bHQvTGF6eVF1ZXJ5UmVzdWx0cy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWVBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUNoRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFFbkQsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUVqQyxPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFDMUIsSUFBTSxZQUFZLEdBQUcsR0FBRyxDQUFBO0FBRXhCLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQTZEL0IsTUFBTSxDQUFDLElBQU0sZ0NBQWdDLEdBQUcsVUFBQyxFQUloRDtRQUhDLGtCQUFlLEVBQWYsVUFBVSxtQkFBRyxFQUFFLEtBQUE7SUFJZixPQUFPLFVBQVUsQ0FBQyxNQUFNLENBQUMsVUFBQyxJQUFJLEVBQUUsU0FBUztRQUN2QyxJQUFJLENBQUMsU0FBUyxDQUFDLEVBQUUsQ0FBQyxHQUFHLFNBQVMsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUM5QyxVQUFDLFNBQVMsRUFBRSxZQUFZO1lBQ3RCLFNBQVMsQ0FBQyxZQUFZLENBQUMsU0FBUyxDQUFDLEdBQUcsU0FBUyxDQUFDLFVBQVUsQ0F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N0cmluZ106IHtcbiAgICAgIGZvcm1hdDogc3RyaW5nXG4gICAgICBtdWx0aXZhbHVlZDogYm9vbGVhblxuICAgICAgaW5kZXhlZDogYm9vbGVhblxuICAgIH1cbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/LazyQueryResult/hooks.d.ts b/src/main/webapp/js/model/LazyQueryResult/hooks.d.ts new file mode 100644 index 00000000000..ccfd52e6c9c --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/hooks.d.ts @@ -0,0 +1,58 @@ +import { LazyQueryResult } from './LazyQueryResult'; +import { LazyQueryResults } from './LazyQueryResults'; +/** + * If a view cares about whether or not a lazy result is selected, + * this will let them know. + */ +export declare const useSelectionOfLazyResult: ({ lazyResult, }: { + lazyResult: LazyQueryResult; +}) => boolean; +/** + * If a view cares about whether or not a lazy result is filtered, + * this will let them know. + */ +export declare const useFilteredOfLazyResult: ({ lazyResult, }: { + lazyResult: LazyQueryResult; +}) => boolean; +/** + * Used by clusters to respond quickly to changes they care about + * (in other words the results in their cluster) + */ +export declare const useSelectionOfLazyResults: ({ lazyResults, }: { + lazyResults: LazyQueryResult[]; +}) => "selected" | "unselected" | "partially"; +/** + * If a view cares about the entirety of what results are selected out + * of a LazyQueryResults object, this will keep them up to date. + * + * This is overkill for most components, but needed for things like + * the inspector. Most other components will instead respond to changes + * in a single result. + */ +export declare const useSelectedResults: ({ lazyResults, }: { + lazyResults?: LazyQueryResults | undefined; +}) => { + [x: string]: LazyQueryResult; +}; +/** + * If a view cares about the status of a LazyQueryResults object + */ +export declare const useStatusOfLazyResults: ({ lazyResults, }: { + lazyResults: LazyQueryResults; +}) => { + status: import("./LazyQueryResults").SearchStatus; + isSearching: boolean; + currentAsOf: number; +}; +/** + * If a view cares about the status of a LazyQueryResults object + */ +export declare const useFilterTreeOfLazyResults: ({ lazyResults, }: { + lazyResults: LazyQueryResults; +}) => import("../../../component/filter-builder/filter.structure").FilterBuilderClass | undefined; +/** + * Allow a view to rerender when the backbone model resyncs to the plain model + */ +export declare const useRerenderOnBackboneSync: ({ lazyResult, }: { + lazyResult?: LazyQueryResult | undefined; +}) => void; diff --git a/src/main/webapp/js/model/LazyQueryResult/hooks.js b/src/main/webapp/js/model/LazyQueryResult/hooks.js new file mode 100644 index 00000000000..a7794d9a2df --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/hooks.js @@ -0,0 +1,200 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import _ from 'underscore'; +/** + * If a view cares about whether or not a lazy result is selected, + * this will let them know. + */ +export var useSelectionOfLazyResult = function (_a) { + var lazyResult = _a.lazyResult; + var _b = __read(React.useState(lazyResult.isSelected), 2), isSelected = _b[0], setIsSelected = _b[1]; + React.useEffect(function () { + setIsSelected(lazyResult.isSelected); + var unsubscribe = lazyResult.subscribeTo({ + subscribableThing: 'selected', + callback: function () { + setIsSelected(lazyResult.isSelected); + }, + }); + return function () { + unsubscribe(); + }; + }, [lazyResult]); + return isSelected; +}; +/** + * If a view cares about whether or not a lazy result is filtered, + * this will let them know. + */ +export var useFilteredOfLazyResult = function (_a) { + var lazyResult = _a.lazyResult; + var _b = __read(React.useState(lazyResult.isFiltered), 2), isFiltered = _b[0], setIsFiltered = _b[1]; + React.useEffect(function () { + var unsubscribe = lazyResult.subscribeTo({ + subscribableThing: 'filtered', + callback: function () { + setIsFiltered(lazyResult.isFiltered); + }, + }); + return function () { + unsubscribe(); + }; + }, [lazyResult]); + return isFiltered; +}; +/** + * Used by clusters to respond quickly to changes they care about + * (in other words the results in their cluster) + */ +export var useSelectionOfLazyResults = function (_a) { + var lazyResults = _a.lazyResults; + var cache = React.useRef({}); + var calculateIfSelected = React.useMemo(function () { + return function () { + var currentValues = Object.values(cache.current); + var baseline = currentValues[0]; + var updateToIsSelected = baseline + ? 'selected' + : 'unselected'; + for (var i = 1; i <= currentValues.length - 1; i++) { + if (baseline !== currentValues[i]) { + updateToIsSelected = 'partially'; + break; + } + } + return updateToIsSelected; + }; + }, []); + var debouncedUpdatedIsSelected = React.useMemo(function () { + return _.debounce(function () { + setIsSelected(calculateIfSelected()); + }, 100); + }, []); + var _b = __read(React.useState(calculateIfSelected()), 2), isSelected = _b[0], setIsSelected = _b[1]; + React.useEffect(function () { + cache.current = lazyResults.reduce(function (blob, lazyResult) { + blob[lazyResult['metacard.id']] = lazyResult.isSelected; + return blob; + }, {}); + setIsSelected(calculateIfSelected()); + var unsubscribeCalls = lazyResults.map(function (lazyResult) { + return lazyResult.subscribeTo({ + subscribableThing: 'selected', + callback: function () { + cache.current[lazyResult['metacard.id']] = lazyResult.isSelected; + debouncedUpdatedIsSelected(); + }, + }); + }); + return function () { + unsubscribeCalls.forEach(function (unsubscribeCall) { + unsubscribeCall(); + }); + }; + }, [lazyResults]); + return isSelected; +}; +var getSelectedResultsOfLazyResults = function (_a) { + var lazyResults = _a.lazyResults; + if (lazyResults) { + return __assign({}, lazyResults.selectedResults); + } + return {}; +}; +/** + * If a view cares about the entirety of what results are selected out + * of a LazyQueryResults object, this will keep them up to date. + * + * This is overkill for most components, but needed for things like + * the inspector. Most other components will instead respond to changes + * in a single result. + */ +export var useSelectedResults = function (_a) { + var lazyResults = _a.lazyResults; + var _b = __read(React.useState(getSelectedResultsOfLazyResults({ lazyResults: lazyResults })), 2), selectedResults = _b[0], setSelectedResults = _b[1]; + React.useEffect(function () { + if (lazyResults) { + var unsubscribeCall_1 = lazyResults.subscribeTo({ + subscribableThing: 'selectedResults', + callback: function () { + setSelectedResults(getSelectedResultsOfLazyResults({ lazyResults: lazyResults })); + }, + }); + return function () { + unsubscribeCall_1(); + }; + } + return function () { }; + }, [lazyResults]); + return selectedResults; +}; +var getStatusFromLazyResults = function (_a) { + var lazyResults = _a.lazyResults; + return { + status: lazyResults.status, + isSearching: lazyResults.isSearching, + currentAsOf: lazyResults.currentAsOf, + }; +}; +/** + * If a view cares about the status of a LazyQueryResults object + */ +export var useStatusOfLazyResults = function (_a) { + var lazyResults = _a.lazyResults; + var _b = __read(React.useState(getStatusFromLazyResults({ lazyResults: lazyResults })), 2), status = _b[0], setStatus = _b[1]; + React.useEffect(function () { + setStatus(getStatusFromLazyResults({ lazyResults: lazyResults })); + var unsubscribeCall = lazyResults.subscribeTo({ + subscribableThing: 'status', + callback: function () { + setStatus(getStatusFromLazyResults({ lazyResults: lazyResults })); + }, + }); + return function () { + unsubscribeCall(); + }; + }, [lazyResults]); + return status; +}; +/** + * If a view cares about the status of a LazyQueryResults object + */ +export var useFilterTreeOfLazyResults = function (_a) { + var lazyResults = _a.lazyResults; + var _b = __read(React.useState(lazyResults.filterTree), 2), filterTree = _b[0], setFilterTree = _b[1]; + React.useEffect(function () { + setFilterTree(lazyResults.filterTree); + var unsubscribeCall = lazyResults.subscribeTo({ + subscribableThing: 'filterTree', + callback: function () { + setFilterTree(lazyResults.filterTree); + }, + }); + return function () { + unsubscribeCall(); + }; + }, [lazyResults]); + return filterTree; +}; +/** + * Allow a view to rerender when the backbone model resyncs to the plain model + */ +export var useRerenderOnBackboneSync = function (_a) { + var lazyResult = _a.lazyResult; + var _b = __read(React.useState(Math.random()), 2), setRandomNumber = _b[1]; + React.useEffect(function () { + setRandomNumber(Math.random()); + var unsubscribeCall = lazyResult + ? lazyResult.subscribeTo({ + subscribableThing: 'backboneSync', + callback: function () { + setRandomNumber(Math.random()); + }, + }) + : function () { }; + return function () { + unsubscribeCall(); + }; + }, [lazyResult]); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9va3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvTGF6eVF1ZXJ5UmVzdWx0L2hvb2tzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFOUIsT0FBTyxDQUFDLE1BQU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2FsbCgpXG4gICAgfVxuICB9LCBbbGF6eVJlc3VsdHNdKVxuXG4gIHJldHVybiBmaWx0ZXJUcmVlXG59XG5cbi8qKlxuICogIEFsbG93IGEgdmlldyB0byByZXJlbmRlciB3aGVuIHRoZSBiYWNrYm9uZSBtb2RlbCByZXN5bmNzIHRvIHRoZSBwbGFpbiBtb2RlbFxuICovXG5leHBvcnQgY29uc3QgdXNlUmVyZW5kZXJPbkJhY2tib25lU3luYyA9ICh7XG4gIGxhenlSZXN1bHQsXG59OiB7XG4gIGxhenlSZXN1bHQ/OiBMYXp5UXVlcnlSZXN1bHRcbn0pID0+IHtcbiAgY29uc3QgWywgc2V0UmFuZG9tTnVtYmVyXSA9IFJlYWN0LnVzZVN0YXRlKE1hdGgucmFuZG9tKCkpXG4gIFJlYWN0LnVzZUVmZmVjdCgoKSA9PiB7XG4gICAgc2V0UmFuZG9tTnVtYmVyKE1hdGgucmFuZG9tKCkpXG4gICAgY29uc3QgdW5zdWJzY3JpYmVDYWxsID0gbGF6eVJlc3VsdFxuICAgICAgPyBsYXp5UmVzdWx0LnN1YnNjcmliZVRvKHtcbiAgICAgICAgICBzdWJzY3JpYmFibGVUaGluZzogJ2JhY2tib25lU3luYycsXG4gICAgICAgICAgY2FsbGJhY2s6ICgpID0+IHtcbiAgICAgICAgICAgIHNldFJhbmRvbU51bWJlcihNYXRoLnJhbmRvbSgpKVxuICAgICAgICAgIH0sXG4gICAgICAgIH0pXG4gICAgICA6ICgpID0+IHt9XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIHVuc3Vic2NyaWJlQ2FsbCgpXG4gICAgfVxuICB9LCBbbGF6eVJlc3VsdF0pXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/LazyQueryResult/sort.d.ts b/src/main/webapp/js/model/LazyQueryResult/sort.d.ts new file mode 100644 index 00000000000..63334a62b24 --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/sort.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { LazyQueryResult } from './LazyQueryResult'; +import { QuerySortType } from './types'; +export declare const generateCompareFunction: (sorting: QuerySortType[]) => (a: LazyQueryResult, b: LazyQueryResult) => number; diff --git a/src/main/webapp/js/model/LazyQueryResult/sort.js b/src/main/webapp/js/model/LazyQueryResult/sort.js new file mode 100644 index 00000000000..b7a44a52257 --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/sort.js @@ -0,0 +1,94 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { StartupDataStore } from '../Startup/startup'; +function parseMultiValue(value) { + if (value && value.constructor === Array) { + return value[0]; + } + return value; +} +function isEmpty(value) { + return value === undefined || value === null; +} +function parseValue(value, attribute) { + var attributeDefinition = StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute]; + if (!attributeDefinition) { + return value.toString().toLowerCase(); + } + switch (attributeDefinition.type) { + case 'DATE': + case 'BOOLEAN': + return value; + case 'STRING': + return value.toString().toLowerCase(); + default: + return parseFloat(value); + } +} +function compareValues(aVal, bVal, sorting) { + var sortOrder = sorting.direction === 'descending' ? -1 : 1; + aVal = parseValue(aVal, sorting.attribute); + bVal = parseValue(bVal, sorting.attribute); + if (aVal < bVal) { + return sortOrder * -1; + } + if (aVal > bVal) { + return sortOrder; + } + return 0; +} +function checkSortValue(a, b, sorting) { + var aVal = parseMultiValue(a.plain.metacard.properties[sorting.attribute]); + var bVal = parseMultiValue(b.plain.metacard.properties[sorting.attribute]); + if (isEmpty(aVal) && isEmpty(bVal)) { + return 0; + } + if (isEmpty(aVal)) { + return 1; + } + if (isEmpty(bVal)) { + return -1; + } + return compareValues(aVal, bVal, sorting); +} +export var generateCompareFunction = function (sorting) { + if (!sorting) { + throw new Error("Sorting can't be undefined!"); + } + return function (a, b) { + var sortValue = 0; + for (var i = 0; i <= sorting.length - 1; i++) { + var sortField = sorting[i].attribute; + var sortOrder = sorting[i].direction === 'descending' ? -1 : 1; + switch (sortField) { + case 'RELEVANCE': + sortValue = sortOrder * (a.plain.relevance - b.plain.relevance); + break; + case 'DISTANCE': + // this says distance could be null, could be a bug we need to address + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + sortValue = sortOrder * (a.plain.distance - b.plain.distance); + break; + default: + sortValue = checkSortValue(a, b, sorting[i]); + } + if (sortValue !== 0) { + break; + } + } + return sortValue; + }; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9MYXp5UXVlcnlSZXN1bHQvc29ydC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUVKLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG9CQUFvQixDQUFBO0FBSXJELFNBQVMsZUFBZSxDQUFDLEtBQVU7SUFDakMsSUFBSSxLQUFLLElBQUksS0FBSyxDQUFDLFdBQVcsS0FBSyxLQUFLLEVBQUU7UUFDeEMs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uXG4gICAgICAgICAgc29ydFZhbHVlID0gc29ydE9yZGVyICogKGEucGxhaW4uZGlzdGFuY2UgLSBiLnBsYWluLmRpc3RhbmNlKVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgc29ydFZhbHVlID0gY2hlY2tTb3J0VmFsdWUoYSwgYiwgc29ydGluZ1tpXSlcbiAgICAgIH1cbiAgICAgIGlmIChzb3J0VmFsdWUgIT09IDApIHtcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHNvcnRWYWx1ZVxuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/LazyQueryResult/status.d.ts b/src/main/webapp/js/model/LazyQueryResult/status.d.ts new file mode 100644 index 00000000000..22d3b7ff535 --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/status.d.ts @@ -0,0 +1,45 @@ +export type StatusBySourceType = { + [key: string]: { + count: number; + elapsed: number; + hits: number; + id: string; + successful: boolean; + }; +}; +export declare class Status { + /** + * Amount of results returned + */ + count: number; + /** + * Time the search took in milliseconds + */ + elapsed: number; + /** + * Total amount of results that match the search criteria + * Not all are sent back, just what is in count, so this should always be + * >= count + */ + hits: number; + /** + * Source name + */ + id: string; + successful: boolean; + fromcache: number; + cacheHasReturned: boolean; + cacheSuccessful: boolean; + cacheMessages: []; + hasReturned: boolean; + message: string; + warnings: [string]; + errors: [string]; + constructor({ id }: { + id: string; + }); + updateStatus(update: Partial): void; +} diff --git a/src/main/webapp/js/model/LazyQueryResult/status.js b/src/main/webapp/js/model/LazyQueryResult/status.js new file mode 100644 index 00000000000..85ce38d4f0e --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/status.js @@ -0,0 +1,19 @@ +var Status = /** @class */ (function () { + function Status(_a) { + var id = _a.id; + this.id = id; + this.count = 0; + this.hasReturned = false; + } + Status.prototype.updateStatus = function (update) { + var _this = this; + Object.keys(update).forEach(function (key) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + _this[key] = update[key]; + }); + this.hasReturned = true; + }; + return Status; +}()); +export { Status }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL0xhenlRdWVyeVJlc3VsdC9zdGF0dXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVVBO0lBNEJFLGdCQUFZLEVBQXNCO1lBQXBCLEVBQUUsUUFBQTtRQUNkLElBQUksQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFBO1FBQ1osSUFBSSxDQUFDLEtBQUssR0FBRyxDQUFDLENBQUE7UUFDZCxJQUFJLENBQUMsV0FBVyxHQUFHLEtBQUssQ0FBQTtJQUMxQixDQUFDO0lBQ0QsNkJBQVksR0FBWixVQUNFLE1BRUM7UUFISCxpQkFVQztRQUxDLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsT0FBTyxDQUFDLFVBQUMsR0FBRztZQUM5QixtSkFBbUo7WUFDbkosS0FBSSxDQUFDLEdBQUcsQ0FBQyxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQTtRQUN6QixDQUFDLENBQUMsQ0FBQTtRQUNGLElBQUksQ0FBQyxXQUFXLEdBQUcsSUFBSSxDQUFBO0lBQ3pCLENBQUM7SUFDSCxhQUFDO0FBQUQsQ0FBQyxBQTVDRCxJQTRDQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIFN0YXR1c0J5U291cmNlVHlwZSA9IHtcbiAgW2tleTogc3RyaW5nXToge1xuICAgIGNvdW50OiBudW1iZXJcbiAgICBlbGFwc2VkOiBudW1iZXJcbiAgICBoaXRzOiBudW1i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AgU3RhdHVzQnlTb3VyY2VUeXBlWzBdICYgeyBoYXNSZXR1cm5lZDogYm9vbGVhbjsgbWVzc2FnZTogc3RyaW5nIH1cbiAgICA+XG4gICkge1xuICAgIE9iamVjdC5rZXlzKHVwZGF0ZSkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoNzA1MykgRklYTUU6IEVsZW1lbnQgaW1wbGljaXRseSBoYXMgYW4gJ2FueScgdHlwZSBiZWNhdXNlIGV4cHJlLi4uIFJlbW92ZSB0aGlzIGNvbW1lbnQgdG8gc2VlIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2VcbiAgICAgIHRoaXNba2V5XSA9IHVwZGF0ZVtrZXldXG4gICAgfSlcbiAgICB0aGlzLmhhc1JldHVybmVkID0gdHJ1ZVxuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/LazyQueryResult/types.d.ts b/src/main/webapp/js/model/LazyQueryResult/types.d.ts new file mode 100644 index 00000000000..7d75d54b5eb --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/types.d.ts @@ -0,0 +1,13 @@ +import { SortType } from '../Query.shared-types'; +export type QuerySortType = SortType; +export type TruncatingFilterType = { + type: 'ILIKE' | string; + property: string; + value: string; + filters: undefined; +}; +export type FilterType = { + type: 'AND' | 'OR' | 'NOT AND' | 'NOT OR'; + filters: (TruncatingFilterType | FilterType)[]; +}; +export type MasterType = TruncatingFilterType | FilterType; diff --git a/src/main/webapp/js/model/LazyQueryResult/types.js b/src/main/webapp/js/model/LazyQueryResult/types.js new file mode 100644 index 00000000000..9a62e65b9c2 --- /dev/null +++ b/src/main/webapp/js/model/LazyQueryResult/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvTGF6eVF1ZXJ5UmVzdWx0L3R5cGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU29ydFR5cGUgfSBmcm9tICcuLi9RdWVyeS5zaGFyZWQtdHlwZXMnXG5cbmV4cG9ydCB0eXBlIFF1ZXJ5U29ydFR5cGUgPSBTb3J0VHlwZVxuXG5leHBvcnQgdHlwZSBUcnVuY2F0aW5nRmlsdGVyVHlwZSA9IHtcbiAgdHlwZTogJ0lMSUtFJyB8IHN0cmluZ1xuICBwcm9wZXJ0eTogc3RyaW5nXG4gIHZhbHVlOiBzdHJpbmdcbiAgZmlsdGVyczogdW5kZWZpbmVkXG59XG5cbmV4cG9ydCB0eXBlIEZpbHRlclR5cGUgPSB7XG4gIHR5cGU6ICdBTkQnIHwgJ09SJyB8ICdOT1QgQU5EJyB8ICdOT1QgT1InXG4gIGZpbHRlcnM6IChUcnVuY2F0aW5nRmlsdGVyVHlwZSB8IEZpbHRlclR5cGUpW11cbn1cblxuZXhwb3J0IHR5cGUgTWFzdGVyVHlwZSA9IFRydW5jYXRpbmdGaWx0ZXJUeXBlIHwgRmlsdGVyVHlwZVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Metacard.d.ts b/src/main/webapp/js/model/Metacard.d.ts new file mode 100644 index 00000000000..aecf6c3d65a --- /dev/null +++ b/src/main/webapp/js/model/Metacard.d.ts @@ -0,0 +1,3 @@ +import 'backbone-associations'; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/Metacard.js b/src/main/webapp/js/model/Metacard.js new file mode 100644 index 00000000000..f8ad7cc9548 --- /dev/null +++ b/src/main/webapp/js/model/Metacard.js @@ -0,0 +1,39 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import 'backbone-associations'; +import MetacardPropertiesModel from './MetacardProperties'; +export default Backbone.AssociatedModel.extend({ + hasGeometry: function (attribute) { + return this.get('properties').hasGeometry(attribute); + }, + getPoints: function (attribute) { + return this.get('properties').getPoints(attribute); + }, + getGeometries: function (attribute) { + return this.get('properties').getGeometries(attribute); + }, + relations: [ + { + type: Backbone.One, + key: 'properties', + relatedModel: MetacardPropertiesModel, + }, + ], + defaults: { + queryId: undefined, + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0YWNhcmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvTWV0YWNhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUUvQixPQUFPLHVCQUF1QixDQUFBO0FBQzlCLE9BQU8sdUJBQXVCLE1BQU0sc0JBQXNCLENBQUE7QUFFMUQsZUFBZSxRQUFRLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FBQztJQUM3QyxXQUFXLFlBQUMsU0FBYztRQUN4QixPQUFPLElBQUksQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLENBQUMsV0FBVyxDQUFDLFNBQVMsQ0FBQyxDQUFBO0lBQ3RELENBQUM7SUFDRCxTQUFTLFlBQUMsU0FBYztRQUN0QixPQUFPLElBQUksQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUF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ZXRhY2FyZFByb3BlcnRpZXNNb2RlbCxcbiAgICB9LFxuICBdLFxuICBkZWZhdWx0czoge1xuICAgIHF1ZXJ5SWQ6IHVuZGVmaW5lZCxcbiAgfSxcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/MetacardAction.d.ts b/src/main/webapp/js/model/MetacardAction.d.ts new file mode 100644 index 00000000000..aecf6c3d65a --- /dev/null +++ b/src/main/webapp/js/model/MetacardAction.d.ts @@ -0,0 +1,3 @@ +import 'backbone-associations'; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/MetacardAction.js b/src/main/webapp/js/model/MetacardAction.js new file mode 100644 index 00000000000..9836c88ff08 --- /dev/null +++ b/src/main/webapp/js/model/MetacardAction.js @@ -0,0 +1,59 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import 'backbone-associations'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'urij... Remove this comment to see the full error message +import URITemplate from 'urijs/src/URITemplate'; +var DECODED_QUERY_ID_TEMPLATE = '{&queryId}'; +var ENCODED_QUERY_ID_TEMPLATE = encodeURIComponent(DECODED_QUERY_ID_TEMPLATE); +export default Backbone.AssociatedModel.extend({ + defaults: function () { + return { + url: undefined, + title: undefined, + description: undefined, + id: undefined, + queryId: undefined, + displayName: undefined, + }; + }, + getExportType: function () { + return this.get('displayName'); + }, + initialize: function () { + this.handleQueryId(); + this.listenTo(this, 'change:queryId', this.handleQueryId); + }, + handleQueryId: function () { + if (this.get('queryId') !== undefined) { + // This is the story: + // An action provider can include {&queryId} as a template in the url if it needs the queryId + // The backend is encoding {&queryId} because it has to. + // The entire url was being decoded and that caused issues because it decoded things that were supposed to be remain encoded + // The entire url couldn't be encoded because it was returning a useless url + // An attempt was made at decoding and encoding the individual parts of both the path and query params + // This caused an issue because it was encoding the transform ids, some of which include a ':' + // So that's why the string replace "decoding" is currently being done + var url = this.get('url'); + var replacedUrl = url.replace(ENCODED_QUERY_ID_TEMPLATE, DECODED_QUERY_ID_TEMPLATE); + var replacedUrlTemplate = new URITemplate(replacedUrl); + var expandedUrl = replacedUrlTemplate.expand({ + queryId: this.get('queryId'), + }); + this.set('url', expandedUrl); + } + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0YWNhcmRBY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvTWV0YWNhcmRBY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUUvQixPQUFPLHVCQUF1QixDQUFBO0FBQzlCLG1KQUFtSjtBQUNuSixPQUFPLFdBQVcsTUFBTSx1QkFBdUIsQ0FBQTtBQUMvQyxJQUFNLHlCQUF5QixHQUFHLFlBQVksQ0FBQTtBQUM5QyxJQUFNLHlCQUF5QixHQUFHLGtCQUFrQixDQUFDLHlCQUF5QixDQUFDLENBQUE7QUFFL0UsZUFBZSxRQUFRLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FBQztJQUM3QyxRQUFRO1FBQ04sT0FBTztZQUNMLEdBQUcsRUFBRSxTQUFTO1lBQ2QsS0FBSyxFQUFFLFNBQVM7WUFDaEIsV0FBVyxFQUFFLFNBQVM7WUFDdEIsRUFBRSxFQUFFLFNBQVM7WUFDYixPQUFPLE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UVSWV9JRF9URU1QTEFURSxcbiAgICAgICAgREVDT0RFRF9RVUVSWV9JRF9URU1QTEFURVxuICAgICAgKVxuICAgICAgY29uc3QgcmVwbGFjZWRVcmxUZW1wbGF0ZSA9IG5ldyBVUklUZW1wbGF0ZShyZXBsYWNlZFVybClcbiAgICAgIGNvbnN0IGV4cGFuZGVkVXJsID0gcmVwbGFjZWRVcmxUZW1wbGF0ZS5leHBhbmQoe1xuICAgICAgICBxdWVyeUlkOiB0aGlzLmdldCgncXVlcnlJZCcpLFxuICAgICAgfSlcblxuICAgICAgdGhpcy5zZXQoJ3VybCcsIGV4cGFuZGVkVXJsKVxuICAgIH1cbiAgfSxcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/MetacardProperties.d.ts b/src/main/webapp/js/model/MetacardProperties.d.ts new file mode 100644 index 00000000000..aecf6c3d65a --- /dev/null +++ b/src/main/webapp/js/model/MetacardProperties.d.ts @@ -0,0 +1,3 @@ +import 'backbone-associations'; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/MetacardProperties.js b/src/main/webapp/js/model/MetacardProperties.js new file mode 100644 index 00000000000..f870c573648 --- /dev/null +++ b/src/main/webapp/js/model/MetacardProperties.js @@ -0,0 +1,62 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import _ from 'underscore'; +import * as TurfMeta from '@turf/meta'; +import wkx from 'wkx'; +import 'backbone-associations'; +import { StartupDataStore } from './Startup/startup'; +export default Backbone.AssociatedModel.extend({ + type: 'metacard-properties', + defaults: function () { + return { + 'metacard-tags': ['resource'], + }; + }, + hasGeometry: function (attribute) { + return (_.filter(this.toJSON(), function (_value, key) { + return (attribute === undefined || attribute === key) && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === + 'GEOMETRY'; + }).length > 0); + }, + getCombinedGeoJSON: function () { + return; + }, + getPoints: function (attribute) { + try { + return this.getGeometries(attribute).reduce(function (pointArray, wkt) { + return pointArray.concat( + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{}' is not assignable to paramet... Remove this comment to see the full error message + TurfMeta.coordAll(wkx.Geometry.parse(wkt).toGeoJSON())); + }, []); + } + catch (err) { + console.error(err); + return []; + } + }, + getGeometries: function (attribute) { + return _.filter(this.toJSON(), function (_value, key) { + return !StartupDataStore.MetacardDefinitions.isHiddenAttribute(key) && + (attribute === undefined || attribute === key) && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && + StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === + 'GEOMETRY'; + }); + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0YWNhcmRQcm9wZXJ0aWVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL01ldGFjYXJkUHJvcGVydGllcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxRQUFRLE1BQU0sVUFBVSxDQUFBO0FBRS9CLE9BQU8sQ0FBQyxNQUFNLFlBQVksQ0FBQTtBQUMxQixPQUFPLEtBQUssUUFBUSxNQUFNLFlBQVksQ0FBQTtBQUN0QyxPQUFPLEdBQUcsTUFBTSxLQUFLLENBQUE7QUFDckIsT0FBTyx1QkFBdUIsQ0FBQTtBQUM5QixPQUFPLEVBQUUsZ0JBQWdCLEVBQUUs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GFyc2Uod2t0KS50b0dlb0pTT04oKSlcbiAgICAgICAgICApLFxuICAgICAgICBbXVxuICAgICAgKVxuICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgY29uc29sZS5lcnJvcihlcnIpXG4gICAgICByZXR1cm4gW11cbiAgICB9XG4gIH0sXG4gIGdldEdlb21ldHJpZXMoYXR0cmlidXRlOiBhbnkpIHtcbiAgICByZXR1cm4gXy5maWx0ZXIoXG4gICAgICB0aGlzLnRvSlNPTigpLFxuICAgICAgKF92YWx1ZSwga2V5KSA9PlxuICAgICAgICAhU3RhcnR1cERhdGFTdG9yZS5NZXRhY2FyZERlZmluaXRpb25zLmlzSGlkZGVuQXR0cmlidXRlKGtleSkgJiZcbiAgICAgICAgKGF0dHJpYnV0ZSA9PT0gdW5kZWZpbmVkIHx8IGF0dHJpYnV0ZSA9PT0ga2V5KSAmJlxuICAgICAgICBTdGFydHVwRGF0YVN0b3JlLk1ldGFjYXJkRGVmaW5pdGlvbnMuZ2V0QXR0cmlidXRlTWFwKClba2V5XSAmJlxuICAgICAgICBTdGFydHVwRGF0YVN0b3JlLk1ldGFjYXJkRGVmaW5pdGlvbnMuZ2V0QXR0cmlidXRlTWFwKClba2V5XS50eXBlID09PVxuICAgICAgICAgICdHRU9NRVRSWSdcbiAgICApXG4gIH0sXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Overwrite.d.ts b/src/main/webapp/js/model/Overwrite.d.ts new file mode 100644 index 00000000000..5298df7f0f6 --- /dev/null +++ b/src/main/webapp/js/model/Overwrite.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/Overwrite.js b/src/main/webapp/js/model/Overwrite.js new file mode 100644 index 00000000000..71a8c5a21f9 --- /dev/null +++ b/src/main/webapp/js/model/Overwrite.js @@ -0,0 +1,76 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +export default Backbone.Model.extend({ + defaults: function () { + return { + id: undefined, + result: undefined, + file: undefined, + percentage: 0, + sending: false, + success: false, + error: false, + message: '', + dropzone: undefined, + }; + }, + initialize: function () { + this.setupDropzoneListeners(); + }, + setupDropzoneListeners: function () { + this.get('dropzone').on('sending', this.handleSending.bind(this)); + this.get('dropzone').on('uploadprogress', this.handleUploadProgress.bind(this)); + this.get('dropzone').on('error', this.handleError.bind(this)); + this.get('dropzone').on('success', this.handleSuccess.bind(this)); + }, + handleSending: function (file) { + this.set({ + file: file, + sending: true, + }); + }, + handleUploadProgress: function (_file, percentage) { + this.set('percentage', percentage); + }, + handleError: function (file, response) { + var result = this.get('result'); + var message = result.plain.metacard.properties.title + + ' could not be overwritten by ' + + file.name + + response; + this.set({ + error: true, + message: message, + }); + }, + handleSuccess: function (file) { + var result = this.get('result'); + var message = result.plain.metacard.properties.title + + ' has been overwritten by ' + + file.name; + this.set({ + success: true, + message: message, + }); + result.refreshDataOverNetwork(); + }, + removeIfUnused: function () { + if (!this.get('sending')) { + this.collection.remove(this); + } + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3ZlcndyaXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL092ZXJ3cml0ZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUcvQixlQUFlLFFBQVE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Vzc2FnZSxcbiAgICB9KVxuICAgIHJlc3VsdC5yZWZyZXNoRGF0YU92ZXJOZXR3b3JrKClcbiAgfSxcbiAgcmVtb3ZlSWZVbnVzZWQoKSB7XG4gICAgaWYgKCF0aGlzLmdldCgnc2VuZGluZycpKSB7XG4gICAgICB0aGlzLmNvbGxlY3Rpb24ucmVtb3ZlKHRoaXMpXG4gICAgfVxuICB9LFxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Query.d.ts b/src/main/webapp/js/model/Query.d.ts new file mode 100644 index 00000000000..1bd9ac890a0 --- /dev/null +++ b/src/main/webapp/js/model/Query.d.ts @@ -0,0 +1,63 @@ +import 'backbone-associations'; +import { LazyQueryResults } from './LazyQueryResult/LazyQueryResults'; +import { FilterBuilderClass } from '../../component/filter-builder/filter.structure'; +import { IndexForSourceGroupType, QueryStartAndEndType } from './Query.methods'; +export type QueryType = { + constructor: (_attributes: any, options: any) => void; + set: (p1: any, p2?: any, p3?: any) => void; + toJSON: () => any; + defaults: () => any; + resetToDefaults: (overridenDefaults: any) => void; + applyDefaults: () => void; + revert: () => void; + isLocal: () => boolean; + _handleDeprecatedFederation: (attributes: any) => void; + initialize: (attributes: any) => void; + getSelectedSources: () => Array; + buildSearchData: () => any; + isOutdated: () => boolean; + startSearchIfOutdated: () => void; + updateCqlBasedOnFilterTree: () => void; + initializeResult: (options?: any) => { + data: any; + selectedSources: any; + isHarvested: any; + isFederated: any; + result: any; + resultOptions: any; + }; + startSearchFromFirstPage: (options?: any, done?: any) => void; + startSearch: (options?: any, done?: any) => void; + currentSearches: Array; + cancelCurrentSearches: () => void; + clearResults: () => void; + setSources: (sources: any) => void; + setColor: (color: any) => void; + getColor: () => any; + color: () => any; + getPreviousServerPage: () => void; + hasPreviousServerPage: () => boolean; + hasNextServerPage: () => boolean; + getNextServerPage: () => void; + getHasFirstServerPage: () => boolean; + getFirstServerPage: () => void; + getHasLastServerPage: () => boolean; + getLastServerPage: () => void; + getCurrentIndexForSourceGroup: () => IndexForSourceGroupType; + getNextIndexForSourceGroup: () => IndexForSourceGroupType; + resetCurrentIndexForSourceGroup: () => void; + setNextIndexForSourceGroupToPrevPage: () => void; + setNextIndexForSourceGroupToNextPage: () => void; + getCurrentStartAndEndForSourceGroup: () => QueryStartAndEndType; + hasCurrentIndexForSourceGroup: () => boolean; + getMostRecentStatus: () => any; + getLazyResults: () => LazyQueryResults; + updateMostRecentStatus: () => void; + refetch: () => void; + canRefetch: () => boolean; + [key: string]: any; +}; +export declare function limitToDeleted(cqlFilterTree: any): FilterBuilderClass; +export declare function limitToHistoric(cqlFilterTree: any): FilterBuilderClass; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/Query.js b/src/main/webapp/js/model/Query.js new file mode 100644 index 00000000000..1989ba5b21c --- /dev/null +++ b/src/main/webapp/js/model/Query.js @@ -0,0 +1,600 @@ +import { __assign, __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import _ from 'underscore'; +import QueryResponse from './QueryResponse'; +import { postSimpleAuditLog } from '../../react-component/utils/audit/audit-endpoint'; +import cql from '../cql'; +import _merge from 'lodash/merge'; +import _cloneDeep from 'lodash.clonedeep'; +import { v4 } from 'uuid'; +import 'backbone-associations'; +import { LazyQueryResults, } from './LazyQueryResult/LazyQueryResults'; +import { FilterBuilderClass, FilterClass, isFilterBuilderClass, } from '../../component/filter-builder/filter.structure'; +import { downgradeFilterTreeToBasic } from '../../component/query-basic/query-basic.view'; +import { getConstrainedFinalPageForSourceGroup, getConstrainedNextPageForSourceGroup, getCurrentStartAndEndForSourceGroup, getConstrainedPreviousPageForSourceGroup, hasNextPageForSourceGroup, hasPreviousPageForSourceGroup, } from './Query.methods'; +import wreqr from '../wreqr'; +import { CommonAjaxSettings } from '../AjaxSettings'; +import { StartupDataStore } from './Startup/startup'; +export function limitToDeleted(cqlFilterTree) { + return new FilterBuilderClass({ + type: 'AND', + filters: [ + cqlFilterTree, + new FilterClass({ + property: '"metacard-tags"', + type: 'ILIKE', + value: 'deleted', + }), + new FilterClass({ + property: '"metacard.deleted.tags"', + type: 'ILIKE', + value: 'resource', + }), + ], + }); +} +export function limitToHistoric(cqlFilterTree) { + return new FilterBuilderClass({ + type: 'AND', + filters: [ + cqlFilterTree, + new FilterClass({ + property: '"metacard-tags"', + type: 'ILIKE', + value: 'revision', + }), + ], + }); +} +export default Backbone.AssociatedModel.extend({ + relations: [ + { + type: Backbone.One, + key: 'result', + relatedModel: QueryResponse, + isTransient: true, + }, + ], + // override constructor slightly to ensure options / attributes are available on the self ref immediately + constructor: function (attributes, options) { + if (!options || + !options.transformDefaults || + !options.transformFilterTree || + !options.transformSorts || + !options.transformCount) { + throw new Error('Options for transformDefaults, transformFilterTree, transformSorts, and transformCount must be provided'); + } + this._constructorAttributes = attributes || {}; + this.options = options; + return Backbone.AssociatedModel.apply(this, arguments); + }, + set: function (data, value, options) { + try { + switch (typeof data) { + case 'object': + if (data.filterTree !== undefined && + typeof data.filterTree === 'string') { + data.filterTree = JSON.parse(data.filterTree); + } + if (!isFilterBuilderClass(data.filterTree)) { + data.filterTree = new FilterBuilderClass(data.filterTree); + } + break; + case 'string': + if (data === 'filterTree') { + if (typeof value === 'string') { + value = JSON.parse(value); + } + if (!isFilterBuilderClass(value)) { + value = new FilterBuilderClass(value); + } + } + break; + } + } + catch (e) { + console.error(e); + } + return Backbone.AssociatedModel.prototype.set.apply(this, [ + data, + value, + options, + ]); + }, + toJSON: function () { + var _a; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var json = (_a = Backbone.AssociatedModel.prototype.toJSON).call.apply(_a, __spreadArray([this], __read(args), false)); + if (typeof json.filterTree === 'object') { + json.filterTree = JSON.stringify(json.filterTree); + } + return json; + }, + defaults: function () { + var _this = this; + var _a, _b; + var filterTree = (_a = this._constructorAttributes) === null || _a === void 0 ? void 0 : _a.filterTree; + var constructedFilterTree; + var constructedCql = ((_b = this._constructorAttributes) === null || _b === void 0 ? void 0 : _b.cql) || "anyText ILIKE '*'"; + if (filterTree && typeof filterTree === 'string') { + constructedFilterTree = new FilterBuilderClass(JSON.parse(filterTree)); + } + else if (!filterTree || filterTree.id === undefined) { + // when we make drastic changes to filter tree it will be necessary to fall back to cql and reconstruct a filter tree that's compatible + constructedFilterTree = cql.read(constructedCql); + console.warn('migrating a filter tree to the latest structure'); + wreqr.vent.trigger('filterTree:migration', { + search: this, + }); + } + else { + constructedFilterTree = new FilterBuilderClass(filterTree); + } + return this.options.transformDefaults({ + originalDefaults: { + cql: constructedCql, + filterTree: constructedFilterTree, + associatedFormModel: undefined, + excludeUnnecessaryAttributes: true, + count: StartupDataStore.Configuration.getResultCount(), + sorts: [ + { + attribute: 'modified', + direction: 'descending', + }, + ], + sources: ['all'], + // initialize this here so we can avoid creating spurious references to LazyQueryResults objects + result: new QueryResponse({ + lazyResults: new LazyQueryResults({ + filterTree: constructedFilterTree, + sorts: [], + sources: [], + transformSorts: function (_a) { + var originalSorts = _a.originalSorts; + return _this.options.transformSorts({ + originalSorts: originalSorts, + queryRef: _this, + }); + }, + }), + }), + type: 'text', + isLocal: false, + isOutdated: false, + 'detail-level': undefined, + spellcheck: false, + phonetics: false, + additionalOptions: '{}', + currentIndexForSourceGroup: {}, + nextIndexForSourceGroup: {}, + mostRecentStatus: {}, + }, + queryRef: this, + }); + }, + /** + * Add filterTree in here, since initialize is only run once (and defaults can't have filterTree) + */ + resetToDefaults: function (overridenDefaults) { + var defaults = _.omit(__assign(__assign({}, this.defaults()), { filterTree: new FilterBuilderClass({ + filters: [ + new FilterClass({ + property: 'anyText', + value: '*', + type: 'ILIKE', + }), + ], + type: 'AND', + }) }), ['isLocal', 'result']); + this.set(_merge(defaults, overridenDefaults)); + this.trigger('resetToDefaults'); + }, + applyDefaults: function () { + this.set(_.pick(this.defaults(), ['sorts', 'sources'])); + }, + revert: function () { + this.trigger('revert'); + }, + isLocal: function () { + return this.get('isLocal'); + }, + _handleDeprecatedFederation: function (attributes) { + if (attributes && attributes.federation) { + console.error('Attempt to set federation on a search. This attribute is deprecated. Did you mean to set sources?'); + } + }, + initialize: function (attributes) { + var _this = this; + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + _.bindAll.apply(_, [this].concat(_.functions(this))); // underscore bindAll does not take array arg + this._handleDeprecatedFederation(attributes); + this.listenTo(this, 'change:cql change:filterTree change:sources change:sorts change:spellcheck change:phonetics change:count change:additionalOptions', function () { + _this.set('isOutdated', true); + _this.set('mostRecentStatus', {}); + }); + this.listenTo(this, 'change:filterTree', function () { + _this.getLazyResults()._resetFilterTree(_this.get('filterTree')); + }); + // basically remove invalid filters when going from basic to advanced, and make it basic compatible + this.listenTo(this, 'change:type', function () { + if (_this.get('type') === 'basic') { + var cleanedUpFilterTree = cql.removeInvalidFilters(_this.get('filterTree')); + _this.set('filterTree', downgradeFilterTreeToBasic(cleanedUpFilterTree)); + } + }); + this.getLazyResults().subscribeTo({ + subscribableThing: 'status', + callback: function () { + _this.updateMostRecentStatus(); + }, + }); + }, + getSelectedSources: function () { + var Sources = StartupDataStore.Sources.sources; + var sourceIds = Sources.map(function (src) { return src.id; }); + var localSourceIds = Sources.filter(function (source) { return source.harvested; }).map(function (src) { return src.id; }); + var remoteSourceIds = Sources.filter(function (source) { return !source.harvested; }).map(function (src) { return src.id; }); + var selectedSources = this.get('sources'); + var sourceArray = selectedSources; + if (selectedSources.includes('all')) { + sourceArray = sourceIds; + } + if (selectedSources.includes('local')) { + sourceArray = sourceArray + .concat(localSourceIds) + .filter(function (src) { return src !== 'local'; }); + } + if (selectedSources.includes('remote')) { + sourceArray = sourceArray + .concat(remoteSourceIds) + .filter(function (src) { return src !== 'remote'; }); + } + return sourceArray; + }, + buildSearchData: function () { + var data = this.toJSON(); + data.sources = this.getSelectedSources(); + data.count = this.options.transformCount({ + originalCount: this.get('count'), + queryRef: this, + }); + data.sorts = this.options.transformSorts({ + originalSorts: this.get('sorts'), + queryRef: this, + }); + return _.pick(data, 'sources', 'count', 'timeout', 'cql', 'sorts', 'id', 'spellcheck', 'phonetics', 'additionalOptions'); + }, + isOutdated: function () { + return this.get('isOutdated'); + }, + startSearchIfOutdated: function () { + if (this.isOutdated()) { + this.startSearch(); + } + }, + /** + * We only keep filterTree up to date, then when we interact with the server we write out what it means + * + * We do this for performance, and because transformation is lossy. + * + * Also notice that we do a slight bit of validation, so anything that has no filters will translate to a star query (everything) + */ + updateCqlBasedOnFilterTree: function () { + var filterTree = this.get('filterTree'); + if (!filterTree || + filterTree.filters === undefined || + filterTree.filters.length === 0) { + this.set('filterTree', new FilterBuilderClass({ + filters: [ + new FilterClass({ value: '*', property: 'anyText', type: 'ILIKE' }), + ], + type: 'AND', + })); + this.updateCqlBasedOnFilterTree(); + } + else { + this.set('cql', cql.write(filterTree)); + } + }, + startSearchFromFirstPage: function (options, done) { + this.updateCqlBasedOnFilterTree(); + this.resetCurrentIndexForSourceGroup(); + this.startSearch(options, done); + }, + initializeResult: function (options) { + var _this = this; + var Sources = StartupDataStore.Sources.sources; + options = _.extend({ + limitToDeleted: false, + limitToHistoric: false, + additionalOptions: undefined, + }, options); + this.options = _.extend(this.options, options); + var data = _cloneDeep(this.buildSearchData()); + if (options.additionalOptions) { + var optionsObj = JSON.parse(data.additionalOptions || '{}'); + optionsObj = _.extend(optionsObj, options.additionalOptions); + data.additionalOptions = JSON.stringify(optionsObj); + } + data.batchId = v4(); + // Data.sources is set in `buildSearchData` based on which sources you have selected. + var selectedSources = data.sources; + var harvestedSources = Sources.filter(function (source) { return source.harvested; }).map(function (source) { return source.id; }); + var isHarvested = function (id) { return harvestedSources.includes(id); }; + var isFederated = function (id) { return !harvestedSources.includes(id); }; + if (options.limitToDeleted) { + selectedSources = data.sources.filter(isHarvested); + } + var result = this.get('result'); + this.getLazyResults().reset({ + filterTree: this.get('filterTree'), + sorts: this.get('sorts'), + sources: selectedSources, + transformSorts: function (_a) { + var originalSorts = _a.originalSorts; + return _this.options.transformSorts({ originalSorts: originalSorts, queryRef: _this }); + }, + }); + return { + data: data, + selectedSources: selectedSources, + isHarvested: isHarvested, + isFederated: isFederated, + result: result, + resultOptions: options, + }; + }, + // we need at least one status for the search to be able to correctly page things, technically we could just use the first one + updateMostRecentStatus: function () { + var currentStatus = this.getLazyResults().status; + var previousStatus = this.getMostRecentStatus(); + var newStatus = JSON.parse(JSON.stringify(previousStatus)); + // compare each key and overwrite only when the new status is successful - we need a successful status to page + Object.keys(currentStatus).forEach(function (key) { + if (currentStatus[key].successful) { + newStatus[key] = currentStatus[key]; + } + }); + this.set('mostRecentStatus', newStatus); + }, + getLazyResults: function () { + return this.get('result').get('lazyResults'); + }, + startSearch: function (options, done) { + var _this = this; + this.trigger('panToShapesExtent'); + this.set('isOutdated', false); + if (this.get('cql') === '') { + return; + } + this.cancelCurrentSearches(); + var _a = this.initializeResult(options), data = _a.data, selectedSources = _a.selectedSources, isHarvested = _a.isHarvested, isFederated = _a.isFederated, result = _a.result, resultOptions = _a.resultOptions; + data.fromUI = true; + var cqlFilterTree = this.get('filterTree'); + if (resultOptions.limitToDeleted) { + cqlFilterTree = limitToDeleted(cqlFilterTree); + } + else if (resultOptions.limitToHistoric) { + cqlFilterTree = limitToHistoric(cqlFilterTree); + } + var cqlString = this.options.transformFilterTree({ + originalFilterTree: cqlFilterTree, + queryRef: this, + }); + this.set('currentIndexForSourceGroup', this.getNextIndexForSourceGroup()); + postSimpleAuditLog({ + action: 'SEARCH_SUBMITTED', + component: 'query: [' + cqlString + '] sources: [' + selectedSources + ']', + }); + var federatedSearchesToRun = selectedSources + .filter(isFederated) + .map(function (source) { return (__assign(__assign({}, data), { cql: cqlString, srcs: [source], start: _this.get('currentIndexForSourceGroup')[source] })); }); + var searchesToRun = __spreadArray([], __read(federatedSearchesToRun), false).filter(function (search) { return search.srcs.length > 0; }); + if (this.getCurrentIndexForSourceGroup().local) { + var localSearchToRun = __assign(__assign({}, data), { cql: cqlString, srcs: selectedSources.filter(isHarvested), start: this.getCurrentIndexForSourceGroup().local }); + searchesToRun.push(localSearchToRun); + } + if (searchesToRun.length === 0) { + // reset to all and run + this.set('sources', ['all']); + this.startSearchFromFirstPage(); + return; + } + this.currentSearches = searchesToRun.map(function (search) { + delete search.sources; // This key isn't used on the backend and only serves to confuse those debugging this code. + // `result` is QueryResponse + return result.fetch(__assign(__assign({}, CommonAjaxSettings), { customErrorHandling: true, data: JSON.stringify(search), remove: false, dataType: 'json', contentType: 'application/json', method: 'POST', processData: false, timeout: StartupDataStore.Configuration.getSearchTimeout(), success: function (_model, response, options) { + response.options = options; + }, error: function (_model, response, options) { + response.options = options; + } })); + }); + if (typeof done === 'function') { + done(this.currentSearches); + } + }, + currentSearches: [], + cancelCurrentSearches: function () { + this.currentSearches.forEach(function (request) { + request.abort('Canceled'); + }); + var result = this.get('result'); + if (result) { + this.getLazyResults().cancel(); + } + this.currentSearches = []; + }, + clearResults: function () { + this.cancelCurrentSearches(); + this.set({ + result: undefined, + }); + }, + setSources: function (sources) { + var sourceArr = []; + sources.each(function (src) { + if (src.get('available') === true) { + sourceArr.push(src.get('id')); + } + }); + if (sourceArr.length > 0) { + this.set('sources', sourceArr.join(',')); + } + else { + this.set('sources', ''); + } + }, + setColor: function (color) { + this.set('color', color); + }, + getColor: function () { + return this.get('color'); + }, + color: function () { + return this.get('color'); + }, + getPreviousServerPage: function () { + this.setNextIndexForSourceGroupToPrevPage(); + this.startSearch(this.options); + }, + /** + * Much simpler than seeing if a next page exists + */ + hasPreviousServerPage: function () { + return hasPreviousPageForSourceGroup({ + currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), + }); + }, + hasNextServerPage: function () { + return hasNextPageForSourceGroup({ + queryStatus: this.getMostRecentStatus(), + isLocal: this.isLocalSource, + currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), + count: this.get('count'), + }); + }, + getNextServerPage: function () { + this.setNextIndexForSourceGroupToNextPage(); + this.startSearch(this.options); + }, + getHasFirstServerPage: function () { + // so technically always "true" but what we really mean is, are we not on page 1 already + return this.hasPreviousServerPage(); + }, + getFirstServerPage: function () { + this.startSearchFromFirstPage(this.options); + }, + getHasLastServerPage: function () { + // so technically always "true" but what we really mean is, are we not on last page already + return this.hasNextServerPage(); + }, + getLastServerPage: function () { + this.set('nextIndexForSourceGroup', getConstrainedFinalPageForSourceGroup({ + queryStatus: this.getMostRecentStatus(), + isLocal: this.isLocalSource, + count: this.get('count'), + })); + this.startSearch(this.options); + }, + resetCurrentIndexForSourceGroup: function () { + this.set('currentIndexForSourceGroup', {}); + if (this.get('result')) { + this.getLazyResults()._resetSources([]); + } + this.setNextIndexForSourceGroupToNextPage(); + }, + /** + * Update the next index to be the prev page + */ + setNextIndexForSourceGroupToPrevPage: function () { + this.set('nextIndexForSourceGroup', getConstrainedPreviousPageForSourceGroup({ + sources: this.getSelectedSources(), + currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), + count: this.get('count'), + isLocal: this.isLocalSource, + queryStatus: this.getMostRecentStatus(), + })); + }, + isLocalSource: function (id) { + var Sources = StartupDataStore.Sources.sources; + var harvestedSources = Sources.filter(function (source) { return source.harvested; }).map(function (source) { return source.id; }); + return harvestedSources.includes(id); + }, + /** + * Update the next index to be the next page + */ + setNextIndexForSourceGroupToNextPage: function () { + this.set('nextIndexForSourceGroup', getConstrainedNextPageForSourceGroup({ + sources: this.getSelectedSources(), + currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), + count: this.get('count'), + isLocal: this.isLocalSource, + queryStatus: this.getMostRecentStatus(), + })); + }, + getCurrentStartAndEndForSourceGroup: function () { + return getCurrentStartAndEndForSourceGroup({ + currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), + queryStatus: this.getMostRecentStatus(), + isLocal: this.isLocalSource, + }); + }, + // try to return the most recent successful status + getMostRecentStatus: function () { + var mostRecentStatus = this.get('mostRecentStatus'); + if (Object.keys(mostRecentStatus).length === 0) { + return this.getLazyResults().status || {}; + } + return mostRecentStatus; + }, + getCurrentIndexForSourceGroup: function () { + return this.get('currentIndexForSourceGroup'); + }, + getNextIndexForSourceGroup: function () { + return this.get('nextIndexForSourceGroup'); + }, + hasCurrentIndexForSourceGroup: function () { + return Object.keys(this.getCurrentIndexForSourceGroup()).length > 0; + }, + refetch: function () { + if (this.canRefetch()) { + this.set('nextIndexForSourceGroup', this.getCurrentIndexForSourceGroup()); + this.startSearch(); + } + else { + throw new Error('Missing necessary data to refetch (currentIndexForSourceGroup), or search criteria is outdated.'); + } + }, + // as long as we have a current index, and the search criteria isn't out of date, we can refetch - useful for resuming searches + canRefetch: function () { + return this.hasCurrentIndexForSourceGroup() && !this.isOutdated(); + }, + // common enough that we should extract this for ease of use + refetchOrStartSearchFromFirstPage: function () { + if (this.canRefetch()) { + this.refetch(); + } + else { + this.startSearchFromFirstPage(); + } + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvUXVlcnkudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxRQUFRLE1BQU0sVUFBVSxDQUFBO0FBQy9CLE9BQU8sQ0FBQyxNQUFNLFlBQVksQ0FBQTtBQUMxQixPQUFPLGFBQWEsTUFBTSxpQkFBaUIsQ0FBQTtBQUMzQyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSx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W5kIHRoZSBzZWFyY2ggY3JpdGVyaWEgaXNuJ3Qgb3V0IG9mIGRhdGUsIHdlIGNhbiByZWZldGNoIC0gdXNlZnVsIGZvciByZXN1bWluZyBzZWFyY2hlc1xuICBjYW5SZWZldGNoKCkge1xuICAgIHJldHVybiB0aGlzLmhhc0N1cnJlbnRJbmRleEZvclNvdXJjZUdyb3VwKCkgJiYgIXRoaXMuaXNPdXRkYXRlZCgpXG4gIH0sXG4gIC8vIGNvbW1vbiBlbm91Z2ggdGhhdCB3ZSBzaG91bGQgZXh0cmFjdCB0aGlzIGZvciBlYXNlIG9mIHVzZVxuICByZWZldGNoT3JTdGFydFNlYXJjaEZyb21GaXJzdFBhZ2UoKSB7XG4gICAgaWYgKHRoaXMuY2FuUmVmZXRjaCgpKSB7XG4gICAgICB0aGlzLnJlZmV0Y2goKVxuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLnN0YXJ0U2VhcmNoRnJvbUZpcnN0UGFnZSgpXG4gICAgfVxuICB9LFxufSBhcyBRdWVyeVR5cGUpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/Query.methods.d.ts b/src/main/webapp/js/model/Query.methods.d.ts new file mode 100644 index 00000000000..e678498d190 --- /dev/null +++ b/src/main/webapp/js/model/Query.methods.d.ts @@ -0,0 +1,111 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export type IndexForSourceGroupType = { + [key: string]: number; +}; +export type SourceStatus = { + id: string; + count: number; + hasReturned: boolean; + hits: number; + elapsed: number; + successful: boolean; + warnings: []; +}; +export type QueryStatus = { + [key: string]: SourceStatus; +}; +/** + * We use the current status + current index to calculate next index. + * Local sources get grouped into a single index. + * + * If current index is blank it's assumed to be the start. + * + * We throw an error if status is provided while current index is blank, as that doesn't make sense. + * + * Notice that a good chunk of the logic is dedicated to ensuring we don't go beyond hits. + * Locally this doesn't matter, but remote sources tend to throw errors if we do. + */ +export declare const calculateNextIndexForSourceGroupNextPage: ({ queryStatus, sources, isLocal, currentIndexForSourceGroup, }: { + queryStatus: QueryStatus; + sources: Array; + isLocal: (id: string) => boolean; + currentIndexForSourceGroup: IndexForSourceGroupType; +}) => IndexForSourceGroupType; +export declare const getIndexOfNoMoreResultsForSourceGroup: ({ queryStatus, isLocal, }: { + queryStatus: QueryStatus; + isLocal: (id: string) => boolean; +}) => IndexForSourceGroupType; +/** + * This is the index of the final result for a source group. + */ +export declare const getIndexOfLastResultForSourceGroup: ({ queryStatus, isLocal, }: { + queryStatus: QueryStatus; + isLocal: (id: string) => boolean; +}) => IndexForSourceGroupType; +export declare const hasPreviousPageForSourceGroup: ({ currentIndexForSourceGroup, }: { + currentIndexForSourceGroup: IndexForSourceGroupType; +}) => boolean; +export declare const hasNextPageForSourceGroup: ({ queryStatus, isLocal, currentIndexForSourceGroup, count, }: { + queryStatus: QueryStatus; + isLocal: (id: string) => boolean; + currentIndexForSourceGroup: IndexForSourceGroupType; + count: number; +}) => boolean; +export declare const getFirstPageForSourceGroup: ({ sources, isLocal, }: { + sources: Array; + isLocal: (id: string) => boolean; +}) => IndexForSourceGroupType; +export type QueryStartAndEndType = { + start: number; + end: number; + hits: number; +}; +export declare const getCurrentStartAndEndForSourceGroup: ({ queryStatus, currentIndexForSourceGroup, isLocal, }: { + queryStatus: QueryStatus; + currentIndexForSourceGroup: IndexForSourceGroupType; + isLocal: (id: string) => boolean; +}) => QueryStartAndEndType; +/** + * Ensures that the next page indices for a group of sources make sense. We do this by examining the farthest index, since paging is done individually for each source. + * If the farthest index is beyond the hits for a source, we essentially "lock" the source to the end to ensure we don't recieve further results. + **/ +export declare const getConstrainedNextPageForSourceGroup: ({ currentIndexForSourceGroup, sources, isLocal, count, queryStatus, }: { + sources: Array; + isLocal: (id: string) => boolean; + currentIndexForSourceGroup: IndexForSourceGroupType; + count: number; + queryStatus: QueryStatus; +}) => IndexForSourceGroupType; +/** + * The final index for a source group is not the same as the final index when thinking about the very last page, since we have multiple sources. + * Some sources may have already "exhausted" their results, so we need to make sure that if we don't return results that we've already "passed". + */ +export declare const getConstrainedFinalPageForSourceGroup: ({ queryStatus, isLocal, count, }: { + queryStatus: QueryStatus; + isLocal: (id: string) => boolean; + count: number; +}) => IndexForSourceGroupType; +/** + * Ensures that the next page indices for a group of sources make sense. We do this by examining the farthest index, since paging is done individually for each source. + * If the farthest index is beyond the hits for a source, we essentially "lock" the source to the end to ensure we don't recieve further results. + **/ +export declare const getConstrainedPreviousPageForSourceGroup: ({ currentIndexForSourceGroup, sources, isLocal, count, queryStatus, }: { + sources: Array; + isLocal: (id: string) => boolean; + currentIndexForSourceGroup: IndexForSourceGroupType; + count: number; + queryStatus: QueryStatus; +}) => IndexForSourceGroupType; diff --git a/src/main/webapp/js/model/Query.methods.js b/src/main/webapp/js/model/Query.methods.js new file mode 100644 index 00000000000..4991fd6787f --- /dev/null +++ b/src/main/webapp/js/model/Query.methods.js @@ -0,0 +1,304 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __assign, __read, __spreadArray } from "tslib"; +/** + * We use the current status + current index to calculate next index. + * Local sources get grouped into a single index. + * + * If current index is blank it's assumed to be the start. + * + * We throw an error if status is provided while current index is blank, as that doesn't make sense. + * + * Notice that a good chunk of the logic is dedicated to ensuring we don't go beyond hits. + * Locally this doesn't matter, but remote sources tend to throw errors if we do. + */ +export var calculateNextIndexForSourceGroupNextPage = function (_a) { + var _b = _a.queryStatus, queryStatus = _b === void 0 ? {} : _b, sources = _a.sources, isLocal = _a.isLocal, currentIndexForSourceGroup = _a.currentIndexForSourceGroup; + if (Object.keys(queryStatus).length > 0 && + Object.keys(currentIndexForSourceGroup).length === 0) { + throw 'Invalid invocation: queryStatus cannot be provided if currentIndexForSourceGroup is not'; + } + var federatedSources = sources.filter(function (id) { + return !isLocal(id); + }); + var hasLocal = sources.some(function (id) { return isLocal(id); }); + var maxLocalStart = Math.max(1, Object.values(queryStatus) + .filter(function (indiviualStatus) { return isLocal(indiviualStatus.id); }) + .filter(function (indiviualStatus) { return indiviualStatus.hits !== undefined; }) + .reduce(function (blob, status) { + return blob + status.hits; + }, 1)); + return Object.values(queryStatus).reduce(function (blob, indiviualStatus) { + if (isLocal(indiviualStatus.id)) { + blob['local'] = Math.min(maxLocalStart, blob['local'] + indiviualStatus.count); + } + else { + blob[indiviualStatus.id] = Math.min(indiviualStatus.hits !== undefined ? indiviualStatus.hits + 1 : 1, blob[indiviualStatus.id] + indiviualStatus.count); + } + return blob; + }, __assign(__assign(__assign({}, (hasLocal ? { local: 1 } : {})), federatedSources.reduce(function (blob, id) { + blob[id] = 1; + return blob; + }, {})), currentIndexForSourceGroup)); +}; +export var getIndexOfNoMoreResultsForSourceGroup = function (_a) { + var queryStatus = _a.queryStatus, isLocal = _a.isLocal; + var indexOfLastResultForSourceGroup = getIndexOfLastResultForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + }); + return Object.keys(indexOfLastResultForSourceGroup).reduce(function (blob, key) { + blob[key] = indexOfLastResultForSourceGroup[key] + 1; + return blob; + }, {}); +}; +/** + * This is the index of the final result for a source group. + */ +export var getIndexOfLastResultForSourceGroup = function (_a) { + var queryStatus = _a.queryStatus, isLocal = _a.isLocal; + if (Object.keys(queryStatus).length === 0) { + console.warn('Invalid invocation: queryStatus is required to determine max index for a query'); + return {}; + } + var hasLocal = Object.values(queryStatus).some(function (status) { + return isLocal(status.id); + }); + var maxLocalStart = Math.max(0, Object.values(queryStatus) + .filter(function (indiviualStatus) { return isLocal(indiviualStatus.id); }) + .filter(function (indiviualStatus) { return indiviualStatus.hits !== undefined; }) + .reduce(function (blob, status) { + return blob + status.hits; + }, 0)); + return Object.values(queryStatus).reduce(function (blob, indiviualStatus) { + if (!isLocal(indiviualStatus.id)) { + blob[indiviualStatus.id] = indiviualStatus.hits; + } + return blob; + }, __assign({}, (hasLocal ? { local: maxLocalStart } : {}))); +}; +export var hasPreviousPageForSourceGroup = function (_a) { + var currentIndexForSourceGroup = _a.currentIndexForSourceGroup; + return (Object.values(currentIndexForSourceGroup).length > 0 && + Object.values(currentIndexForSourceGroup).some(function (start) { return start !== 1; })); +}; +// should not be used outside of calculating the constrained next page +var getNextPageForSourceGroup = function (_a) { + var currentIndexForSourceGroup = _a.currentIndexForSourceGroup, sources = _a.sources, isLocal = _a.isLocal, count = _a.count, queryStatus = _a.queryStatus; + var finalIndexForSourceGroup = getFinalPageForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + count: count, + }); + if (Object.keys(currentIndexForSourceGroup).length > 0) { + return Object.keys(currentIndexForSourceGroup).reduce(function (blob, key) { + blob[key] = Math.min(blob[key] + count, finalIndexForSourceGroup[key]); + return blob; + }, __assign({}, currentIndexForSourceGroup)); + } + else { + var hasLocal = sources.some(function (id) { return isLocal(id); }); + return sources.reduce(function (blob, sourceName) { + if (!isLocal(sourceName)) { + blob[sourceName] = + Math.min(1, finalIndexForSourceGroup[sourceName]) || 1; + } + return blob; + }, __assign({}, (hasLocal ? { local: 1 } : {}))); + } +}; +export var hasNextPageForSourceGroup = function (_a) { + var queryStatus = _a.queryStatus, isLocal = _a.isLocal, currentIndexForSourceGroup = _a.currentIndexForSourceGroup, count = _a.count; + if (!queryStatus) { + return false; + } + var indexOfLastResultForSourceGroup = getIndexOfLastResultForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + }); + return Object.keys(indexOfLastResultForSourceGroup).some(function (key) { + return (currentIndexForSourceGroup[key] + count - 1 < + indexOfLastResultForSourceGroup[key]); + }); +}; +// should not be used outside of calculating the constrained previous page +var getPreviousPageForSourceGroup = function (_a) { + var currentIndexForSourceGroup = _a.currentIndexForSourceGroup, sources = _a.sources, isLocal = _a.isLocal, count = _a.count, queryStatus = _a.queryStatus; + var finalIndexForSourceGroup = getFinalPageForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + count: count, + }); + if (Object.keys(currentIndexForSourceGroup).length > 0) { + return Object.keys(currentIndexForSourceGroup).reduce(function (blob, key) { + blob[key] = Math.max(Math.min(blob[key] - count, finalIndexForSourceGroup[key]), 1); + return blob; + }, __assign({}, currentIndexForSourceGroup)); + } + else { + var hasLocal = sources.some(function (id) { return isLocal(id); }); + return sources.reduce(function (blob, sourceName) { + if (!isLocal(sourceName)) { + blob[sourceName] = + Math.min(1, finalIndexForSourceGroup[sourceName]) || 1; + } + return blob; + }, __assign({}, (hasLocal ? { local: 1 } : {}))); + } +}; +export var getFirstPageForSourceGroup = function (_a) { + var sources = _a.sources, isLocal = _a.isLocal; + return calculateNextIndexForSourceGroupNextPage({ + sources: sources, + isLocal: isLocal, + queryStatus: {}, + currentIndexForSourceGroup: {}, + }); +}; +var getFinalPageForSourceGroup = function (_a) { + var queryStatus = _a.queryStatus, isLocal = _a.isLocal, count = _a.count; + if (!queryStatus) { + return {}; + } + var indexOfLastResultForSourceGroup = getIndexOfLastResultForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + }); + return Object.keys(indexOfLastResultForSourceGroup).reduce(function (blob, sourceName) { + var remainderOnFinalPage = indexOfLastResultForSourceGroup[sourceName] % count; + remainderOnFinalPage = + remainderOnFinalPage === 0 ? count : remainderOnFinalPage; + blob[sourceName] = Math.max(indexOfLastResultForSourceGroup[sourceName] - remainderOnFinalPage + 1, 1); + return blob; + }, __assign({}, indexOfLastResultForSourceGroup)); +}; +export var getCurrentStartAndEndForSourceGroup = function (_a) { + var queryStatus = _a.queryStatus, currentIndexForSourceGroup = _a.currentIndexForSourceGroup, isLocal = _a.isLocal; + if (!queryStatus || Object.keys(queryStatus).length === 0) { + return { + start: 0, + end: 0, + hits: 0, + }; + } + var lastIndexForSourceGroup = getIndexOfLastResultForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + }); + var start = 1; + var isBeginning = Object.values(currentIndexForSourceGroup).every(function (start) { return start === 1; }); + if (!isBeginning) { + start = Object.keys(currentIndexForSourceGroup).reduce(function (blob, key) { + return (blob + + Math.min(currentIndexForSourceGroup[key], lastIndexForSourceGroup[key])); // if we go beyond the hits, we should only add the total hits for that source + }, 0); + } + var end = Object.keys(queryStatus).reduce(function (blob, key) { + return blob + queryStatus[key].count; + }, start - 1); + var hits = Object.keys(queryStatus).reduce(function (blob, key) { + return blob + queryStatus[key].hits; + }, 0); + return { + start: Math.min(start, hits), + end: Math.min(Math.max(start, end), hits), + hits: hits, + }; +}; +function getFarthestIndexForSourceGroup(sourceGroup) { + // find the max index for the source group + return Math.max.apply(Math, __spreadArray([], __read(Object.values(sourceGroup)), false)); +} +/** + * Ensures that the next page indices for a group of sources make sense. We do this by examining the farthest index, since paging is done individually for each source. + * If the farthest index is beyond the hits for a source, we essentially "lock" the source to the end to ensure we don't recieve further results. + **/ +export var getConstrainedNextPageForSourceGroup = function (_a) { + var currentIndexForSourceGroup = _a.currentIndexForSourceGroup, sources = _a.sources, isLocal = _a.isLocal, count = _a.count, queryStatus = _a.queryStatus; + var nextPageForSourceGroup = getNextPageForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + count: count, + currentIndexForSourceGroup: currentIndexForSourceGroup, + sources: sources, + }); + var farthestIndexForSourceGroup = getFarthestIndexForSourceGroup(nextPageForSourceGroup); + var indexOfNoMoreResultsForSourceGroup = getIndexOfNoMoreResultsForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + }); + return Object.keys(nextPageForSourceGroup).reduce(function (blob, sourceName) { + if (blob[sourceName] < farthestIndexForSourceGroup) { + blob[sourceName] = indexOfNoMoreResultsForSourceGroup[sourceName]; // lock the source to the end, since we've gone beyond the hits (will ensure no results come back) + } + return blob; + }, __assign({}, nextPageForSourceGroup)); +}; +/** + * The final index for a source group is not the same as the final index when thinking about the very last page, since we have multiple sources. + * Some sources may have already "exhausted" their results, so we need to make sure that if we don't return results that we've already "passed". + */ +export var getConstrainedFinalPageForSourceGroup = function (_a) { + var queryStatus = _a.queryStatus, isLocal = _a.isLocal, count = _a.count; + var finalPageForSourceGroup = getFinalPageForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + count: count, + }); + var maxFinalPageIndexForSourceGroup = Math.max.apply(Math, __spreadArray([], __read(Object.values(finalPageForSourceGroup)), false)); + var indexOfNoMoreResultsForSourceGroup = getIndexOfNoMoreResultsForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + }); + return Object.keys(finalPageForSourceGroup).reduce(function (blob, sourceName) { + if (blob[sourceName] < maxFinalPageIndexForSourceGroup) { + blob[sourceName] = indexOfNoMoreResultsForSourceGroup[sourceName]; + } + return blob; + }, __assign({}, finalPageForSourceGroup)); +}; +/** + * Ensures that the next page indices for a group of sources make sense. We do this by examining the farthest index, since paging is done individually for each source. + * If the farthest index is beyond the hits for a source, we essentially "lock" the source to the end to ensure we don't recieve further results. + **/ +export var getConstrainedPreviousPageForSourceGroup = function (_a) { + var currentIndexForSourceGroup = _a.currentIndexForSourceGroup, sources = _a.sources, isLocal = _a.isLocal, count = _a.count, queryStatus = _a.queryStatus; + if (!queryStatus || Object.keys(queryStatus).length === 0) { + return getFirstPageForSourceGroup({ + sources: sources, + isLocal: isLocal, + }); + } + var previousPageForSourceGroup = getPreviousPageForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + count: count, + currentIndexForSourceGroup: currentIndexForSourceGroup, + sources: sources, + }); + var farthestIndexForSourceGroup = getFarthestIndexForSourceGroup(previousPageForSourceGroup); + var indexOfNoMoreResultsForSourceGroup = getIndexOfNoMoreResultsForSourceGroup({ + queryStatus: queryStatus, + isLocal: isLocal, + }); + return Object.keys(previousPageForSourceGroup).reduce(function (blob, sourceName) { + if (blob[sourceName] < farthestIndexForSourceGroup) { + // never go beyond the no more results index, but make sure we keep indexes in sync when going backwards + blob[sourceName] = Math.min(indexOfNoMoreResultsForSourceGroup[sourceName], farthestIndexForSourceGroup); + } + return blob; + }, __assign({}, previousPageForSourceGroup)); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVlcnkubWV0aG9kcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9RdWVyeS5tZXRob2RzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJOztBQXVCSjs7Ozs7Ozs7OztHQVVHO0FBQ0gsTUFBTSxDQUFDLElBQU0sd0NBQXdDLEdBQUcsVUFBQyxFQVV4RDtRQVRDLG1CQUFnQixFQUFoQixXQUFXLG1CQUFHLEVBQUUsS0FBQSxFQUNoQixPQUFPLGFBQUEsRUFDUCxPQUFPLGFBQUEsRUFDUCwwQkFBMEIsZ0NBQUE7SUFPMUIsSUFDRSxNQUFNLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDLE1BQU0sR0FBRyxDQUFDO1FBQ25DLE1BQU0sQ0FBQyxJQUFJLENBQUMsMEJBQTBCLENBQUMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUNwRDtRQUNBLE1BQU0sMEZBQTBGLENBQUE7S0FDakc7SUFDRCxJQUFNLGdCQUFnQixHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsVUFBQyxFQUFFO1FBQ3pDLE9BQ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yb3VwW3NvdXJjZU5hbWVdLFxuICAgICAgICAgIGZhcnRoZXN0SW5kZXhGb3JTb3VyY2VHcm91cFxuICAgICAgICApXG4gICAgICB9XG4gICAgICByZXR1cm4gYmxvYlxuICAgIH0sXG4gICAge1xuICAgICAgLi4ucHJldmlvdXNQYWdlRm9yU291cmNlR3JvdXAsXG4gICAgfSBhcyB7IFtrZXk6IHN0cmluZ106IG51bWJlciB9XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Query.shared-types.d.ts b/src/main/webapp/js/model/Query.shared-types.d.ts new file mode 100644 index 00000000000..01ab2335877 --- /dev/null +++ b/src/main/webapp/js/model/Query.shared-types.d.ts @@ -0,0 +1,50 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { FilterBuilderClass } from '../../component/filter-builder/filter.structure'; +export type SortType = { + attribute: string; + direction: 'ascending' | 'descending'; +}; +export type QueryAttributesType = { + filterTree?: FilterBuilderClass; + sources?: string[]; + sorts?: SortType[]; + count?: number; + type?: string; + isLocal?: boolean; + isOutdated?: boolean; + spellcheck?: boolean; + phonetics?: boolean; + additionalOptions?: string; + currentIndexForSourceGroup?: { + [key: string]: number; + }; + nextIndexForSourceGroup?: { + [key: string]: number; + }; + mostRecentStatus?: { + [key: string]: { + id: string; + count: number; + hasReturned: boolean; + hits: number; + elapsed: number; + successful: boolean; + warnings: string[]; + errors: string[]; + }; + }; + [key: string]: any; +}; diff --git a/src/main/webapp/js/model/Query.shared-types.js b/src/main/webapp/js/model/Query.shared-types.js new file mode 100644 index 00000000000..1ba2221399c --- /dev/null +++ b/src/main/webapp/js/model/Query.shared-types.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVlcnkuc2hhcmVkLXR5cGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL1F1ZXJ5LnNoYXJlZC10eXBlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgY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ucz86IHN0cmluZ1xuICBjdXJyZW50SW5kZXhGb3JTb3VyY2VHcm91cD86IHtcbiAgICBba2V5OiBzdHJpbmddOiBudW1iZXJcbiAgfVxuICBuZXh0SW5kZXhGb3JTb3VyY2VHcm91cD86IHtcbiAgICBba2V5OiBzdHJpbmddOiBudW1iZXJcbiAgfVxuICBtb3N0UmVjZW50U3RhdHVzPzoge1xuICAgIFtrZXk6IHN0cmluZ106IHtcbiAgICAgIGlkOiBzdHJpbmdcbiAgICAgIGNvdW50OiBudW1iZXJcbiAgICAgIGhhc1JldHVybmVkOiBib29sZWFuXG4gICAgICBoaXRzOiBudW1iZXJcbiAgICAgIGVsYXBzZWQ6IG51bWJlclxuICAgICAgc3VjY2Vzc2Z1bDogYm9vbGVhblxuICAgICAgd2FybmluZ3M6IHN0cmluZ1tdXG4gICAgICBlcnJvcnM6IHN0cmluZ1tdXG4gICAgfVxuICB9XG4gIFtrZXk6IHN0cmluZ106IGFueSAvLyBzbG93bHkgYnVpbGQgb3V0IHRoZSBwcm9wZXIgdHlwZSwgdGhlbiByZW1vdmUgdGhpcyAobGVhdmUgZm9yIG5vdyBzbyB3ZSBkb24ndCBhY2NpZGVudGFsbHkgbGVhdmUgc29tZXRoaW5nIG9mZilcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Query.spec.d.ts b/src/main/webapp/js/model/Query.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/model/Query.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/model/Query.spec.js b/src/main/webapp/js/model/Query.spec.js new file mode 100644 index 00000000000..e7fe99f8b38 --- /dev/null +++ b/src/main/webapp/js/model/Query.spec.js @@ -0,0 +1,3670 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import { getConstrainedNextPageForSourceGroup, getIndexOfLastResultForSourceGroup, getConstrainedPreviousPageForSourceGroup, getConstrainedFinalPageForSourceGroup, getCurrentStartAndEndForSourceGroup, } from './Query.methods'; +// Helper function to run a test case +function runTest(description, method, input, expectedOutput) { + it(description, function (done) { + expect(JSON.stringify(method(input))).to.equal(JSON.stringify(expectedOutput)); + done(); + }); +} +var CasesToTest = [ + // non local sources only + { + caseDescription: 'for single non local source without queryStatus', + caseData: { + sources: ['Geoserver'], + queryStatus: {}, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { Geoserver: 1 }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for single non local source with queryStatus at beginning of results', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { Geoserver: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { Geoserver: 2 }, + indexOfLastResultForSourceGroup: { Geoserver: 100 }, + constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, + constrainedFinalPageForSourceGroup: { Geoserver: 100 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 1, + hits: 100, + }, + }, + }, + { + caseDescription: 'for single non local source with queryStatus, at end of results', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { Geoserver: 100 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { Geoserver: 100 }, + indexOfLastResultForSourceGroup: { Geoserver: 100 }, + constrainedPreviousPageForSourceGroup: { Geoserver: 99 }, + constrainedFinalPageForSourceGroup: { Geoserver: 100 }, + currentStartAndEndForSourceGroup: { + start: 100, + end: 100, + hits: 100, + }, + }, + }, + { + caseDescription: 'for multiple non local sources only, with no queryStatus', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: {}, + isLocal: function () { return false; }, + currentIndexForSourceGroup: {}, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for multiple non local sources with queryStatus at beginning of results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 2, + Geoserver2: 2, + Geoserver3: 2, + }, + indexOfLastResultForSourceGroup: { + Geoserver1: 100, + Geoserver2: 105, + Geoserver3: 110, + }, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + constrainedFinalPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 110, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple non local sources with queryStatus mixed between already ended and not yet ended results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { + Geoserver1: 101, + Geoserver2: 105, + Geoserver3: 105, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 106, + }, + indexOfLastResultForSourceGroup: { + Geoserver1: 100, + Geoserver2: 105, + Geoserver3: 110, + }, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 104, + Geoserver3: 104, + }, + constrainedFinalPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 110, + }, + currentStartAndEndForSourceGroup: { + start: 310, + end: 311, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple non local sources with queryStatus at end of results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 110, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 110, + }, + indexOfLastResultForSourceGroup: { + Geoserver1: 100, + Geoserver2: 105, + Geoserver3: 110, + }, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 109, + }, + constrainedFinalPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 110, + }, + currentStartAndEndForSourceGroup: { + start: 315, + end: 315, + hits: 315, + }, + }, + }, + // non local sources, count of 3 + { + caseDescription: 'for single non local source without queryStatus, with count of 3', + caseData: { + sources: ['Geoserver'], + queryStatus: {}, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { Geoserver: 1 }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for single non local source with queryStatus at beginning of results, with count of 3', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 3, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { Geoserver: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { Geoserver: 4 }, + indexOfLastResultForSourceGroup: { Geoserver: 100 }, + constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, + constrainedFinalPageForSourceGroup: { Geoserver: 100 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 100, + }, + }, + }, + { + caseDescription: 'for single non local source with queryStatus, at end of results, with count of 3', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { Geoserver: 100 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { Geoserver: 100 }, + indexOfLastResultForSourceGroup: { Geoserver: 100 }, + constrainedPreviousPageForSourceGroup: { Geoserver: 97 }, + constrainedFinalPageForSourceGroup: { Geoserver: 100 }, + currentStartAndEndForSourceGroup: { + start: 100, + end: 100, + hits: 100, + }, + }, + }, + { + caseDescription: 'for multiple non local sources only, with no queryStatus, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: {}, + isLocal: function () { return false; }, + currentIndexForSourceGroup: {}, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for multiple non local sources with queryStatus at beginning of results, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 3, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 3, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 3, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 4, + Geoserver2: 4, + Geoserver3: 4, + }, + indexOfLastResultForSourceGroup: { + Geoserver1: 100, + Geoserver2: 105, + Geoserver3: 110, + }, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 1, + Geoserver2: 1, + Geoserver3: 1, + }, + constrainedFinalPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 109, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 9, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple non local sources with queryStatus mixed between already ended and not yet ended results, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 3, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 3, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { + Geoserver1: 101, + Geoserver2: 103, + Geoserver3: 103, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 106, + }, + indexOfLastResultForSourceGroup: { + Geoserver1: 100, + Geoserver2: 105, + Geoserver3: 110, + }, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 100, + Geoserver2: 100, + Geoserver3: 100, + }, + constrainedFinalPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 109, + }, + currentStartAndEndForSourceGroup: { + start: 306, + end: 311, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple non local sources with queryStatus at end of results, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 2, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 109, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 109, + }, + indexOfLastResultForSourceGroup: { + Geoserver1: 100, + Geoserver2: 105, + Geoserver3: 110, + }, + constrainedPreviousPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 106, + }, + constrainedFinalPageForSourceGroup: { + Geoserver1: 101, + Geoserver2: 106, + Geoserver3: 109, + }, + currentStartAndEndForSourceGroup: { + start: 314, + end: 315, + hits: 315, + }, + }, + }, + // only local sources + { + caseDescription: 'for single local source without queryStatus', + caseData: { + sources: ['Geoserver'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1 }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { local: 1 }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for single local source with queryStatus at beginning of results', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver'].includes(id); }, + currentIndexForSourceGroup: { local: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 2 }, + indexOfLastResultForSourceGroup: { local: 100 }, + constrainedPreviousPageForSourceGroup: { local: 1 }, + constrainedFinalPageForSourceGroup: { local: 100 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 1, + hits: 100, + }, + }, + }, + { + caseDescription: 'for single local source with queryStatus, at end of results', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver'].includes(id); }, + currentIndexForSourceGroup: { local: 100 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 100 }, + indexOfLastResultForSourceGroup: { local: 100 }, + constrainedPreviousPageForSourceGroup: { local: 99 }, + constrainedFinalPageForSourceGroup: { local: 100 }, + currentStartAndEndForSourceGroup: { + start: 100, + end: 100, + hits: 100, + }, + }, + }, + { + caseDescription: 'for multiple local sources only, with no queryStatus', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 1, + }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { + local: 1, + }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for multiple local sources with queryStatus at beginning of results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: { + local: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 2, + }, + indexOfLastResultForSourceGroup: { + local: 315, + }, + constrainedPreviousPageForSourceGroup: { + local: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 315, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 1, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple local sources with queryStatus mixed between already ended and not yet ended results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: { + local: 105, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 106, + }, + indexOfLastResultForSourceGroup: { + local: 315, + }, + constrainedPreviousPageForSourceGroup: { + local: 104, + }, + constrainedFinalPageForSourceGroup: { + local: 315, + }, + currentStartAndEndForSourceGroup: { + start: 105, + end: 105, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple local sources with queryStatus at end of results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: { + local: 315, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 315, + }, + indexOfLastResultForSourceGroup: { + local: 315, + }, + constrainedPreviousPageForSourceGroup: { + local: 314, + }, + constrainedFinalPageForSourceGroup: { + local: 315, + }, + currentStartAndEndForSourceGroup: { + start: 315, + end: 315, + hits: 315, + }, + }, + }, + // only local sources, count of 3 + { + caseDescription: 'for single local source without queryStatus, with count of 3', + caseData: { + sources: ['Geoserver'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1 }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { local: 1 }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for single local source with queryStatus at beginning of results, with count of 3', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 3, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver'].includes(id); }, + currentIndexForSourceGroup: { local: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 4 }, + indexOfLastResultForSourceGroup: { local: 100 }, + constrainedPreviousPageForSourceGroup: { local: 1 }, + constrainedFinalPageForSourceGroup: { local: 100 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 100, + }, + }, + }, + { + caseDescription: 'for single local source with queryStatus, at end of results, with count of 3', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver'].includes(id); }, + currentIndexForSourceGroup: { local: 100 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 100 }, + indexOfLastResultForSourceGroup: { local: 100 }, + constrainedPreviousPageForSourceGroup: { local: 97 }, + constrainedFinalPageForSourceGroup: { local: 100 }, + currentStartAndEndForSourceGroup: { + start: 100, + end: 100, + hits: 100, + }, + }, + }, + { + caseDescription: 'for multiple local sources only, with no queryStatus, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 1, + }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { + local: 1, + }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for multiple local sources with queryStatus at beginning of results, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: { + local: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 4, + }, + indexOfLastResultForSourceGroup: { + local: 315, + }, + constrainedPreviousPageForSourceGroup: { + local: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 313, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple local sources with queryStatus mixed between already ended and not yet ended results, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: { + local: 103, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 106, + }, + indexOfLastResultForSourceGroup: { + local: 315, + }, + constrainedPreviousPageForSourceGroup: { + local: 100, + }, + constrainedFinalPageForSourceGroup: { + local: 313, + }, + currentStartAndEndForSourceGroup: { + start: 103, + end: 105, + hits: 315, + }, + }, + }, + { + caseDescription: 'for multiple local sources with queryStatus at end of results, with count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id); }, + currentIndexForSourceGroup: { + local: 313, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 313, + }, + indexOfLastResultForSourceGroup: { + local: 315, + }, + constrainedPreviousPageForSourceGroup: { + local: 310, + }, + constrainedFinalPageForSourceGroup: { + local: 313, + }, + currentStartAndEndForSourceGroup: { + start: 313, + end: 315, + hits: 315, + }, + }, + }, + // now let's do a mix of both local and non local sources + { + caseDescription: 'for single local source and single non local source without queryStatus', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for single local source and single non local source with queryStatus at beginning of results', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 2, Geoserver2: 2 }, + indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 105 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 2, + hits: 205, + }, + }, + }, + { + caseDescription: 'for single local source and single non local source with queryStatus, at end of results', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 101, Geoserver2: 105 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 101, Geoserver2: 105 }, + indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, + constrainedPreviousPageForSourceGroup: { local: 101, Geoserver2: 104 }, + constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 105 }, + currentStartAndEndForSourceGroup: { + start: 205, + end: 205, + hits: 205, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources without queryStatus', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at beginning of results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 1, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 2, + Geoserver3: 2, + Geoserver4: 2, + }, + indexOfLastResultForSourceGroup: { + local: 205, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 430, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 1, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 111, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 112, + }, + indexOfLastResultForSourceGroup: { + local: 40, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 41, + Geoserver3: 110, + Geoserver4: 110, + }, + constrainedFinalPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + currentStartAndEndForSourceGroup: { + start: 261, + end: 261, + hits: 265, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 1, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + indexOfLastResultForSourceGroup: { + local: 40, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 114, + }, + constrainedFinalPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + currentStartAndEndForSourceGroup: { + start: 265, + end: 265, + hits: 265, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 116, + Geoserver3: 111, + Geoserver4: 116, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 117, + Geoserver3: 111, + Geoserver4: 116, + }, + indexOfLastResultForSourceGroup: { + local: 205, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 115, + Geoserver3: 111, + Geoserver4: 115, + }, + constrainedFinalPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + currentStartAndEndForSourceGroup: { + start: 341, + end: 341, + hits: 430, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + indexOfLastResultForSourceGroup: { + local: 205, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 204, + Geoserver3: 111, + Geoserver4: 116, + }, + constrainedFinalPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + currentStartAndEndForSourceGroup: { + start: 430, + end: 430, + hits: 430, + }, + }, + }, + // now let's do a mix of both local and non local sources with a count of 3 + { + caseDescription: 'for single local source and single non local source without queryStatus, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for single local source and single non local source with queryStatus at beginning of results, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 3, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 3, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 4, Geoserver2: 4 }, + indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 103 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 6, + hits: 205, + }, + }, + }, + { + caseDescription: 'for single local source and single non local source with queryStatus, at end of results, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 3, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 101, Geoserver2: 103 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 101, Geoserver2: 103 }, + indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, + constrainedPreviousPageForSourceGroup: { local: 100, Geoserver2: 100 }, + constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 103 }, + currentStartAndEndForSourceGroup: { + start: 203, + end: 205, + hits: 205, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources without queryStatus, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: {}, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: {}, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: {}, + constrainedPreviousPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: {}, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at beginning of results, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 3, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 3, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 3, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 4, + Geoserver3: 4, + Geoserver4: 4, + }, + indexOfLastResultForSourceGroup: { + local: 205, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 9, + hits: 430, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 3, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 112, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + indexOfLastResultForSourceGroup: { + local: 40, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 41, + Geoserver3: 109, + Geoserver4: 109, + }, + constrainedFinalPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + currentStartAndEndForSourceGroup: { + start: 262, + end: 264, + hits: 265, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 20, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 1, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + indexOfLastResultForSourceGroup: { + local: 40, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 112, + }, + constrainedFinalPageForSourceGroup: { + local: 41, + Geoserver3: 111, + Geoserver4: 115, + }, + currentStartAndEndForSourceGroup: { + start: 265, + end: 265, + hits: 265, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 2, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 1, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 115, + Geoserver3: 111, + Geoserver4: 115, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 118, + Geoserver3: 111, + Geoserver4: 116, + }, + indexOfLastResultForSourceGroup: { + local: 205, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 112, + Geoserver3: 111, + Geoserver4: 112, + }, + constrainedFinalPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + currentStartAndEndForSourceGroup: { + start: 340, + end: 343, + hits: 430, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end, with a count of 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 105, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 115, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + indexOfLastResultForSourceGroup: { + local: 205, + Geoserver3: 110, + Geoserver4: 115, + }, + constrainedPreviousPageForSourceGroup: { + local: 202, + Geoserver3: 111, + Geoserver4: 116, + }, + constrainedFinalPageForSourceGroup: { + local: 205, + Geoserver3: 111, + Geoserver4: 116, + }, + currentStartAndEndForSourceGroup: { + start: 430, + end: 430, + hits: 430, + }, + }, + }, + // now let's test when the number of hits is 0 for certain sources + { + caseDescription: 'for single non local source with queryStatus at beginning of results with 0 hits', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['local'].includes(id); }, + currentIndexForSourceGroup: { Geoserver: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { Geoserver: 1 }, + indexOfLastResultForSourceGroup: { Geoserver: 0 }, + constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, + constrainedFinalPageForSourceGroup: { Geoserver: 1 }, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for single local source with queryStatus at beginning of results with 0 hits', + caseData: { + sources: ['Geoserver'], + queryStatus: { + Geoserver: { + id: 'Geoserver', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver'].includes(id); }, + currentIndexForSourceGroup: { local: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1 }, + indexOfLastResultForSourceGroup: { local: 0 }, + constrainedPreviousPageForSourceGroup: { local: 1 }, + constrainedFinalPageForSourceGroup: { local: 1 }, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results with 0 hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results, with local having no hits and non local having hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 2 }, + indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 1, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at end of results, with local having no hits and non local having hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 10 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 10 }, + indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 9 }, + constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, + currentStartAndEndForSourceGroup: { + start: 10, + end: 10, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 2, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 1, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 2, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 1, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at end of results, with local having hits and non local having no hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 10, Geoserver2: 1 }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 10, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 9, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 10, + end: 10, + hits: 10, + }, + }, + }, + // now let's test when the number of hits is 0 for certain sources with a count of 3 + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results with 0 hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 0, + end: 0, + hits: 0, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results, with local having no hits and non local having hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 3, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 4 }, + indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at end of results, with local having no hits and non local having hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 1, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 10 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 10 }, + indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 7 }, + constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, + currentStartAndEndForSourceGroup: { + start: 10, + end: 10, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 3, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 4, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 3, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 4, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 3, + hits: 10, + }, + }, + }, + { + caseDescription: 'for a local source and non local source with queryStatus at end of results, with local having hits and non local having no hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 10, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1'].includes(id); }, + currentIndexForSourceGroup: { local: 10, Geoserver2: 1 }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { local: 10, Geoserver2: 1 }, + indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, + constrainedPreviousPageForSourceGroup: { local: 7, Geoserver2: 1 }, + constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, + currentStartAndEndForSourceGroup: { + start: 10, + end: 10, + hits: 10, + }, + }, + }, + // now let's do multiple sources for each type with some having 0 hits + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at beginning of results, with one of each source type having 0 hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 2, + Geoserver3: 2, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 100, + Geoserver3: 110, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 101, + Geoserver3: 110, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 2, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results with one of each source type having 0 hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 101, + Geoserver3: 101, + Geoserver4: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 101, + Geoserver3: 102, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 100, + Geoserver3: 110, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 100, + Geoserver3: 100, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 101, + Geoserver3: 110, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 201, + end: 201, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end with one of each source type having 0 hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 101, + Geoserver3: 110, + Geoserver4: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 101, + Geoserver3: 110, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 100, + Geoserver3: 110, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 101, + Geoserver3: 109, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 101, + Geoserver3: 110, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 210, + end: 210, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results with one of each source type having 0 hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 101, + Geoserver3: 101, + Geoserver4: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 102, + Geoserver3: 101, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 110, + Geoserver3: 100, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 100, + Geoserver3: 100, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 110, + Geoserver3: 101, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 201, + end: 201, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end with one of each source type having 0 hits', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 1, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 110, + Geoserver3: 101, + Geoserver4: 1, + }, + count: 1, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 110, + Geoserver3: 101, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 110, + Geoserver3: 100, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 109, + Geoserver3: 101, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 110, + Geoserver3: 101, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 210, + end: 210, + hits: 210, + }, + }, + }, + // now let's do multiple sources for each type with some having 0 hits with a count of 3 + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at beginning of results, with one of each source type having 0 hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 3, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 3, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 4, + Geoserver3: 4, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 100, + Geoserver3: 110, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 1, + Geoserver3: 1, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 101, + Geoserver3: 109, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 1, + end: 6, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results with one of each source type having 0 hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 3, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 101, + Geoserver3: 103, + Geoserver4: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 101, + Geoserver3: 106, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 100, + Geoserver3: 110, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 100, + Geoserver3: 100, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 101, + Geoserver3: 109, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 203, + end: 205, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end with one of each source type having 0 hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 2, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 101, + Geoserver3: 109, + Geoserver4: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 101, + Geoserver3: 109, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 100, + Geoserver3: 110, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 101, + Geoserver3: 106, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 101, + Geoserver3: 109, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 209, + end: 210, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results with one of each source type having 0 hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 3, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 103, + Geoserver3: 101, + Geoserver4: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 106, + Geoserver3: 101, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 110, + Geoserver3: 100, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 100, + Geoserver3: 100, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 109, + Geoserver3: 101, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 203, + end: 205, + hits: 210, + }, + }, + }, + { + caseDescription: 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end with one of each source type having 0 hits with count 3', + caseData: { + sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], + queryStatus: { + Geoserver1: { + id: 'Geoserver1', + count: 2, + hasReturned: true, + hits: 110, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver2: { + id: 'Geoserver2', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver3: { + id: 'Geoserver3', + count: 0, + hasReturned: true, + hits: 100, + elapsed: 500, + successful: true, + warnings: [], + }, + Geoserver4: { + id: 'Geoserver4', + count: 0, + hasReturned: true, + hits: 0, + elapsed: 500, + successful: true, + warnings: [], + }, + }, + isLocal: function (id) { return ['Geoserver1', 'Geoserver2'].includes(id); }, + currentIndexForSourceGroup: { + local: 109, + Geoserver3: 101, + Geoserver4: 1, + }, + count: 3, + }, + caseReturns: { + constrainedNextPageForSourceGroup: { + local: 109, + Geoserver3: 101, + Geoserver4: 1, + }, + indexOfLastResultForSourceGroup: { + local: 110, + Geoserver3: 100, + Geoserver4: 0, + }, + constrainedPreviousPageForSourceGroup: { + local: 106, + Geoserver3: 101, + Geoserver4: 1, + }, + constrainedFinalPageForSourceGroup: { + local: 109, + Geoserver3: 101, + Geoserver4: 1, + }, + currentStartAndEndForSourceGroup: { + start: 209, + end: 210, + hits: 210, + }, + }, + }, +]; +// this will verify that you've set up the test case data correctly, otherwise tests will fail for reasons outside of actual method issues, like returning wrong counts in sources +function verifyCaseData(caseData, caseDescription) { + var queryStatus = caseData.queryStatus, currentIndexForSourceGroup = caseData.currentIndexForSourceGroup, count = caseData.count, isLocal = caseData.isLocal; + Object.values(queryStatus).forEach(function (status) { + if (isLocal(status.id)) { + return; // we verify this separately + } + var currentIndex = currentIndexForSourceGroup[status.id]; + var correctCount = 0; + if (currentIndex <= status.hits) { + correctCount = Math.min(count, status.hits - currentIndex + 1); + } + // based of currentIndex and hits, we can decide if the count on the status is correct + if (status.count !== correctCount) { + it("".concat(caseDescription, " status count is incorrect for ").concat(status.id, ", expected ").concat(correctCount, ", got ").concat(status.count), function () { + expect(status.count).to.equal(correctCount); + }); + } + }); + if (Object.values(queryStatus).length > 0) { + var localStatuses = Object.values(queryStatus).filter(function (status) { + return isLocal(status.id); + }); + if (localStatuses.length > 0) { + var currentLocalIndex = currentIndexForSourceGroup['local']; + var totalLocalHits = localStatuses.reduce(function (acc, status) { return acc + status.hits; }, 0); + var totalLocalCount_1 = localStatuses.reduce(function (acc, status) { return acc + status.count; }, 0); + var correctCount_1 = 0; + if (currentLocalIndex <= totalLocalHits) { + correctCount_1 = Math.min(count, totalLocalHits - currentLocalIndex + 1); + } + if (totalLocalCount_1 !== correctCount_1) { + it("".concat(caseDescription, " local status count is incorrect, expected ").concat(correctCount_1, ", got ").concat(totalLocalCount_1), function () { + expect(totalLocalCount_1).to.equal(correctCount_1); + }); + } + } + } +} +describe('exercise various edge cases for searches involving sources and paging', function () { + CasesToTest.forEach(function (testCase) { + var caseDescription = testCase.caseDescription, caseData = testCase.caseData, caseReturns = testCase.caseReturns; + if (!caseReturns) { + return; + } + // first verify that the status of the case test data is not in an inconsistent state + verifyCaseData(caseData, caseDescription); + if (caseReturns.constrainedNextPageForSourceGroup) { + runTest("calculates next index ".concat(caseDescription), getConstrainedNextPageForSourceGroup, caseData, caseReturns.constrainedNextPageForSourceGroup); + } + if (caseReturns.indexOfLastResultForSourceGroup) { + runTest("calculates index of last result ".concat(caseDescription), getIndexOfLastResultForSourceGroup, caseData, caseReturns.indexOfLastResultForSourceGroup); + } + if (caseReturns.constrainedPreviousPageForSourceGroup) { + runTest("calculates previous page ".concat(caseDescription), getConstrainedPreviousPageForSourceGroup, caseData, caseReturns.constrainedPreviousPageForSourceGroup); + } + if (caseReturns.constrainedFinalPageForSourceGroup) { + runTest("calculates final page ".concat(caseDescription), getConstrainedFinalPageForSourceGroup, caseData, caseReturns.constrainedFinalPageForSourceGroup); + } + if (caseReturns.currentStartAndEndForSourceGroup) { + runTest("calculates current start and end ".concat(caseDescription), getCurrentStartAndEndForSourceGroup, caseData, caseReturns.currentStartAndEndForSourceGroup); + } + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVlcnkuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9RdWVyeS5zcGVjLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUU3QixPQUFPLEVBQ0wsb0NBQW9DLEVBQ3BDLGtDQUFrQyxFQUNsQyx3Q0FBd0MsRUFDeEMscUNBQXFDLEVBQ3J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29uc3RyYWluZWRGaW5hbFBhZ2VGb3JTb3VyY2VHcm91cDoge30sXG4gICAgICBjdXJyZW50U3RhcnRBbmRFbmRGb3JTb3VyY2VHcm91cDoge1xuICAgICAgICBzdGFydDogMCxcbiAgICAgICAgZW5kOiAwLFxuICAgICAgICBoaXRzOiAwLFxuICAgICAgfSxcbiAgICB9LFxuICB9LFxuICB7XG4gICAgY2FzZURlc2NyaXB0aW9uOlxuICAgICAgJ2ZvciBtdWx0aXBsZSBub24gbG9jYWwgc291cmNlcyB3aXRoIHF1ZXJ5U3RhdHVzIGF0IGJlZ2lubmluZyBvZiByZXN1bHRzJyxcbiAgICBjYXNlRGF0YToge1xuICAgICAgc291cmNlczogWydHZW9zZXJ2ZXIxJywgJ0dlb3NlcnZlcjInLCAnR2Vvc2VydmVyMyddLFxuICAgICAgcXVlcnlTdGF0dXM6IHtcbiAgICAgICAgR2Vvc2VydmVyMToge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMScsXG4gICAgICAgICAgY291bnQ6IDEsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTAwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDEsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTA1LFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMzoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyM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Edlb3NlcnZlcjI6IDEwNCxcbiAgICAgICAgR2Vvc2VydmVyMzogMTA0LFxuICAgICAgfSxcbiAgICAgIGNvbnN0cmFpbmVkRmluYWxQYWdlRm9yU291cmNlR3JvdXA6IHtcbiAgICAgICAgR2Vvc2VydmVyMTogMTAxLFxuICAgICAgICBHZW9zZXJ2ZXIyOiAxMDYsXG4gICAgICAgIEdlb3NlcnZlcjM6IDExMCxcbiAgICAgIH0sXG4gICAgICBjdXJyZW50U3RhcnRBbmRFbmRGb3JTb3VyY2VHcm91cDoge1xuICAgICAgICBzdGFydDogMzEwLFxuICAgICAgICBlbmQ6IDMxMSxcbiAgICAgICAgaGl0czogMzE1LFxuICAgICAgfSxcbiAgICB9LFxuICB9LFxuICB7XG4gICAgY2FzZURlc2NyaXB0aW9uOlxuICAgICAgJ2ZvciBtdWx0aXBsZSBub24gbG9jYWwgc291cmNlcyB3aXRoIHF1ZXJ5U3RhdHVzIGF0IGVuZCBvZiByZXN1bHRzJyxcbiAgICBjYXNlRGF0YToge1xuICAgICAgc291cmNlczogWydHZW9zZXJ2ZXIxJywgJ0dlb3NlcnZlcjInLCAnR2Vvc2VydmVyMyddLFxuICAgICAgcXVlcnlTdGF0dXM6IHtcbiAgICAgICAgR2Vvc2VydmVyMToge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMScsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTAwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAg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3NlcnZlcjE6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjEnLFxuICAgICAgICAgIGNvdW50OiAwLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDEwMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjI6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjInLFxuICAgICAgICAgIGNvdW50OiAwLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDEwNSxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjM6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjMnLFxuICAgICAgICAgIGNvdW50OiAyLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDExMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgaXNMb2NhbDogKGlkKSA9PiBbJ2xvY2FsJ10uaW5jbHVkZXMoaWQpLFxuICAgICAgY3VycmVudEluZGV4Rm9yU291cmNlR3JvdXA6IHtcbiAgICAgICAgR2Vvc2VydmVyMTogMTAxLFxuICAgICAgICBHZW9zZXJ2ZXIyOiAxMDYsXG4gICAgICAgIEdlb3NlcnZlcjM6IDEwOSxcbiAgICAgIH0sXG4gICAgICBjb3VudDogMyxcbiAgICB9LFxuICAg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AgY291bnQ6IDEsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTAwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDEsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTA1LFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMzoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMycsXG4gICAgICAgICAgY291bnQ6IDEsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTEwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBpc0xvY2FsOiAoaWQpID0+IFsnR2Vvc2VydmVyMScsICdHZW9zZXJ2ZXIyJywgJ0dlb3NlcnZlcjMnXS5pbmNsdWRlcyhpZCksXG4gICAgICBjdXJyZW50SW5kZXhGb3JTb3VyY2VHcm91cDoge1xuICAgICAgICBsb2NhbDogMTAzLFxuICAgICAgfSxcbiAgICAgIGNvdW50OiAzLFxuICAgIH0sXG4gICAgY2FzZVJldHVybnM6IHtcbiAgICAgIGNvbnN0cmFpbmVkTmV4dFBhZ2VGb3JTb3VyY2VHcm91cDoge1xuICAgICAgICBsb2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ICAgIGNvdW50OiAwLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDIwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMjAsXG4gICAgICAgICAgZWxhcHNlZDogNTAwLFxuICAgICAgICAgIHN1Y2Nlc3NmdWw6IHRydWUsXG4gICAgICAgICAgd2FybmluZ3M6IFtdLFxuICAgICAgICB9LFxuICAgICAgICBHZW9zZXJ2ZXIzOiB7XG4gICAgICAgICAgaWQ6ICdHZW9zZXJ2ZXIzJyxcbiAgICAgICAgICBjb3VudDogMCxcbiAgICAgICAgICBoYXNSZXR1cm5lZDogdHJ1ZSxcbiAgICAgICAgICBoaXRzOiAxMTAsXG4gICAgICAgICAgZWxhcHNlZDogNTAwLFxuICAgICAgICAgIHN1Y2Nlc3NmdWw6IHRydWUsXG4gICAgICAgICAgd2FybmluZ3M6IFtdLFxuICAgICAgICB9LFxuICAgICAgICBHZW9zZXJ2ZXI0OiB7XG4gICAgICAgICAgaWQ6ICdHZW9zZXJ2ZXI0JyxcbiAgICAgICAgICBjb3VudDogMSxcbiAgICAgICAgICBoYXNSZXR1cm5lZDogdHJ1ZSxcbiAgICAgICAgICBoaXRzOiAxMTUsXG4gICAgICAgICAgZWxhcHNlZDogNTAwLFxuICAgICAgICAgIHN1Y2Nlc3NmdWw6IHRydWUsXG4gICAgICAgICAgd2FybmluZ3M6IFtdLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIGlzTG9jYWw6IChpZCkgPT4gWydHZW9zZXJ2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AgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTA1LFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMzoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMycsXG4gICAgICAgICAgY291bnQ6IDMsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTEwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyNDoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyNCcsXG4gICAgICAgICAgY291bnQ6IDMsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTE1LFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBpc0xvY2FsOiAoaWQpID0+IFsnR2Vvc2VydmVyMScsICdHZW9zZXJ2ZXIyJ10uaW5jbHVkZXMoaWQpLFxuICAgICAgY3VycmVudEluZGV4Rm9yU291cmNlR3JvdXA6IHtcbiAgICAgICAgbG9jYWw6IDEsXG4gICAgICAgIEdlb3NlcnZlcjM6IDEsXG4gICAgICAgIEdlb3NlcnZlcjQ6IDEsXG4gICAgICB9LFxuICAgICAgY291bnQ6IDMsXG4gICAgfSxcbiAgICBjYXNlUmV0dXJuczoge1xuICAgICAgY29uc3RyYWluZWROZXh0UGFnZUZvclNvdXJjZUdyb3VwO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biAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjM6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjMnLFxuICAgICAgICAgIGNvdW50OiAxLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDExMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjQ6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjQnLFxuICAgICAgICAgIGNvdW50OiAwLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDAsXG4gICAgICAgICAgZWxhcHNlZDogNTAwLFxuICAgICAgICAgIHN1Y2Nlc3NmdWw6IHRydWUsXG4gICAgICAgICAgd2FybmluZ3M6IFtdLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIGlzTG9jYWw6IChpZCkgPT4gWydHZW9zZXJ2ZXIxJywgJ0dlb3NlcnZlcjInXS5pbmNsdWRlcyhpZCksXG4gICAgICBjdXJyZW50SW5kZXhGb3JTb3VyY2VHcm91cDoge1xuICAgICAgICBsb2NhbDogMSxcbiAgICAgICAgR2Vvc2VydmVyMzogMSxcbiAgICAgICAgR2Vvc2VydmVyNDogMSxcbiAgICAgIH0sXG4gICAgICBjb3VudDogMSxcb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XN1bHRzIHdpdGggb25lIG9mIGVhY2ggc291cmNlIHR5cGUgaGF2aW5nIDAgaGl0cycsXG4gICAgY2FzZURhdGE6IHtcbiAgICAgIHNvdXJjZXM6IFsnR2Vvc2VydmVyMScsICdHZW9zZXJ2ZXIyJywgJ0dlb3NlcnZlcjMnLCAnR2Vvc2VydmVyNCddLFxuICAgICAgcXVlcnlTdGF0dXM6IHtcbiAgICAgICAgR2Vvc2VydmVyMToge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMScsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTAwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjM6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjMnLFxuICAgICAgICAgIGNvdW50OiAxLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDExMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjQ6IHtcbiAgICAgICAgICBpZ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pbmcgMCBoaXRzIHdpdGggY291bnQgMycsXG4gICAgY2FzZURhdGE6IHtcbiAgICAgIHNvdXJjZXM6IFsnR2Vvc2VydmVyMScsICdHZW9zZXJ2ZXIyJywgJ0dlb3NlcnZlcjMnLCAnR2Vvc2VydmVyNCddLFxuICAgICAgcXVlcnlTdGF0dXM6IHtcbiAgICAgICAgR2Vvc2VydmVyMToge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMScsXG4gICAgICAgICAgY291bnQ6IDMsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTAwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjM6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjMnLFxuICAgICAgICAgIGNvdW50OiAzLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDExMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjQ6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjQnLFxuICAgICAgICAgI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ZURhdGE6IHtcbiAgICAgIHNvdXJjZXM6IFsnR2Vvc2VydmVyMScsICdHZW9zZXJ2ZXIyJywgJ0dlb3NlcnZlcjMnLCAnR2Vvc2VydmVyNCddLFxuICAgICAgcXVlcnlTdGF0dXM6IHtcbiAgICAgICAgR2Vvc2VydmVyMToge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMScsXG4gICAgICAgICAgY291bnQ6IDIsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMTEwLFxuICAgICAgICAgIGVsYXBzZWQ6IDUwMCxcbiAgICAgICAgICBzdWNjZXNzZnVsOiB0cnVlLFxuICAgICAgICAgIHdhcm5pbmdzOiBbXSxcbiAgICAgICAgfSxcbiAgICAgICAgR2Vvc2VydmVyMjoge1xuICAgICAgICAgIGlkOiAnR2Vvc2VydmVyMicsXG4gICAgICAgICAgY291bnQ6IDAsXG4gICAgICAgICAgaGFzUmV0dXJuZWQ6IHRydWUsXG4gICAgICAgICAgaGl0czogMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjM6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjMnLFxuICAgICAgICAgIGNvdW50OiAwLFxuICAgICAgICAgIGhhc1JldHVybmVkOiB0cnVlLFxuICAgICAgICAgIGhpdHM6IDEwMCxcbiAgICAgICAgICBlbGFwc2VkOiA1MDAsXG4gICAgICAgICAgc3VjY2Vzc2Z1bDogdHJ1ZSxcbiAgICAgICAgICB3YXJuaW5nczogW10sXG4gICAgICAgIH0sXG4gICAgICAgIEdlb3NlcnZlcjQ6IHtcbiAgICAgICAgICBpZDogJ0dlb3NlcnZlcjQnLFxuICAgICAgICAgIGNvdW50OiAwLFxuICAgICAgICAgIGhhc1JldHVybmVkOi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fVxuXG4gICAgaWYgKGNhc2VSZXR1cm5zLmNvbnN0cmFpbmVkRmluYWxQYWdlRm9yU291cmNlR3JvdXApIHtcbiAgICAgIHJ1blRlc3QoXG4gICAgICAgIGBjYWxjdWxhdGVzIGZpbmFsIHBhZ2UgJHtjYXNlRGVzY3JpcHRpb259YCxcbiAgICAgICAgZ2V0Q29uc3RyYWluZWRGaW5hbFBhZ2VGb3JTb3VyY2VHcm91cCxcbiAgICAgICAgY2FzZURhdGEsXG4gICAgICAgIGNhc2VSZXR1cm5zLmNvbnN0cmFpbmVkRmluYWxQYWdlRm9yU291cmNlR3JvdXBcbiAgICAgIClcbiAgICB9XG5cbiAgICBpZiAoY2FzZVJldHVybnMuY3VycmVudFN0YXJ0QW5kRW5kRm9yU291cmNlR3JvdXApIHtcbiAgICAgIHJ1blRlc3QoXG4gICAgICAgIGBjYWxjdWxhdGVzIGN1cnJlbnQgc3RhcnQgYW5kIGVuZCAke2Nhc2VEZXNjcmlwdGlvbn1gLFxuICAgICAgICBnZXRDdXJyZW50U3RhcnRBbmRFbmRGb3JTb3VyY2VHcm91cCxcbiAgICAgICAgY2FzZURhdGEsXG4gICAgICAgIGNhc2VSZXR1cm5zLmN1cnJlbnRTdGFydEFuZEVuZEZvclNvdXJjZUdyb3VwXG4gICAgICApXG4gICAgfVxuICB9KVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/QueryResponse.d.ts b/src/main/webapp/js/model/QueryResponse.d.ts new file mode 100644 index 00000000000..aecf6c3d65a --- /dev/null +++ b/src/main/webapp/js/model/QueryResponse.d.ts @@ -0,0 +1,3 @@ +import 'backbone-associations'; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/QueryResponse.js b/src/main/webapp/js/model/QueryResponse.js new file mode 100644 index 00000000000..ae9ad5efbf1 --- /dev/null +++ b/src/main/webapp/js/model/QueryResponse.js @@ -0,0 +1,158 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import $ from 'jquery'; +import Backbone from 'backbone'; +import 'backbone-associations'; +import { transformResponseHighlightsToMap, } from './LazyQueryResult/LazyQueryResults'; +import { Client } from 'rpc-websockets'; +import { StartupDataStore } from './Startup/startup'; +import { checkForErrors, } from '../../react-component/utils/fetch/fetch'; +var rpc = null; +var rpcInitial = null; +var rpcConnectionInitiated = false; +if (StartupDataStore.Configuration.getWebSocketsEnabled() && window.WebSocket) { + var protocol = { 'http:': 'ws:', 'https:': 'wss:' }; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var url = "".concat(protocol[location.protocol], "//").concat(location.hostname, ":").concat(location.port).concat(location.pathname, "ws"); + rpcInitial = new Client(url, { autoconnect: false }); + // Only set rpc if the connection succeeds + rpcInitial.once('open', function () { + rpc = rpcInitial; + }); +} +export default Backbone.AssociatedModel.extend({ + defaults: function () { + return { + lazyResults: undefined, + }; + }, + url: './internal/cql', + initialize: function () { + this.listenTo(this, 'error', this.handleError); + if (rpcInitial && !rpcConnectionInitiated) { + rpcInitial.connect(); + rpcConnectionInitiated = true; + } + }, + sync: function (method, model, options) { + if (rpc !== null) { + var handled_1 = false; + var promise_1 = rpc + .call('query', [options.data], options.timeout) + .then( + // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. + function (res) { + if (!handled_1) { + handled_1 = true; + checkForErrors(res); + options.success(res); + return [res, 'success']; + } + }) + // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. + .catch(function (res) { + if (!handled_1) { + handled_1 = true; + res.options = options; + switch (res.code) { + case 400: + case 404: + case 500: + options.error({ + responseJSON: res, + }); + break; + case -32000: + if (rpc !== null) { + rpc.close(); + rpc = null; + } + options.error({ + responseJSON: { + message: 'User not logged in.', + }, + }); + break; + default: + // notify user and fallback to http + if (rpc !== null) { + rpc.close(); + rpc = null; + } + options.error({ + responseJSON: { + message: 'Search failed due to unknown reasons, please try again.', + }, + }); + } + return [res, 'error']; + } + }); + model.trigger('request', model, null, options); + return { + abort: function () { + if (!handled_1) { + handled_1 = true; + options.error({ + responseJSON: { + message: 'Stopped', + }, + }); + } + }, + promise: function () { + var d = $.Deferred(); + promise_1 + .then(function (value) { + d.resolve(value); + }) + .catch(function (err) { + d.reject(err); + }); + return d; + }, + }; + } + else { + return Backbone.AssociatedModel.prototype.sync.call(this, method, model, options); + } + }, + handleError: function (_resultModel, response, sent) { + var dataJSON = JSON.parse(sent.data); + this.get('lazyResults').updateStatusWithError({ + sources: dataJSON.srcs, + message: response.responseJSON + ? response.responseJSON.message + : response.statusText, + }); + }, + handleSync: function () { }, + parse: function (resp) { + StartupDataStore.MetacardDefinitions.addDynamicallyFoundMetacardDefinitionsFromSearchResults(resp.types); + var lazyResults = this.get('lazyResults'); + lazyResults.addTypes(resp.types); + lazyResults.updateStatus(resp.statusBySource); + lazyResults.updateDidYouMeanFields(resp.didYouMeanFields); + lazyResults.updateShowingResultsForFields(resp.showingResultsForFields); + lazyResults.addHighlights(transformResponseHighlightsToMap({ + highlights: resp.highlights, + })); + lazyResults.add({ + results: resp.results, + }); + return {}; + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVlcnlSZXNwb25zZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9RdWVyeVJlc3BvbnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQ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mF0ZSg3MDMwKSBGSVhNRTogTm90IGFsbCBjb2RlIHBhdGhzIHJldHVybiBhIHZhbHVlLlxuICAgICAgICAgIChyZXM6IFF1ZXJ5UmVzcG9uc2VUeXBlKSA9PiB7XG4gICAgICAgICAgICBpZiAoIWhhbmRsZWQpIHtcbiAgICAgICAgICAgICAgaGFuZGxlZCA9IHRydWVcbiAgICAgICAgICAgICAgY2hlY2tGb3JFcnJvcnMocmVzKVxuICAgICAgICAgICAgICBvcHRpb25zLnN1Y2Nlc3MocmVzKVxuICAgICAgICAgICAgICByZXR1cm4gW3JlcywgJ3N1Y2Nlc3MnXVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgKVxuICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoNzAzMCkgRklYTUU6IE5vdCBhbGwgY29kZSBwYXRocyByZXR1cm4gYSB2YWx1ZS5cbiAgICAgICAgLmNhdGNoKChyZXM6IGFueSkgPT4ge1xuICAgICAgICAgIGlmICghaGFuZGxlZCkge1xuICAgICAgICAgICAgaGFuZGxlZCA9IHRydWVcbiAgICAgICAgICAgIHJlcy5vcHRpb25zID0gb3B0aW9uc1xuICAgICAgICAgICAgc3dpdGNoIChyZXMuY29kZSkge1xuICAgICAgICAgICAgICBjYXNlIDQwMDpcbiAgICAgICAgICAgICAgY2FzZSA0MDQ6XG4gICAgICAgICAgICAgIGNhc2UgNTAwOlxuICAgICAgICAgICAgICAgIG9wdGlvbnMuZXJyb3Ioe1xuICAgICAgICAgICAgICAgICAgcmVzcG9uc2VKU09OOiByZXMsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICBjYXNlIC0zMjAwMDpcbiAgICAgICAgICAgICAgICBpZiAocnBjICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICBycGMuY2xvc2UoKVxuICAgICAgICAgICAgICAgICAgcnBjID0gbnVsbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvcHRpb25zLmVycm9yKHtcbiAgICAgICAgICAgICAgICAgIHJlc3BvbnNlSlNPTjoge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnVXNlciBub3QgbG9nZ2VkIGluLicsXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAvLyBub3RpZnkgdXNlciBhbmQgZmFsbGJhY2sgdG8gaHR0cFxuICAgICAgICAgICAgICAgIGlmIChycGMgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIHJwYy5jbG9zZSgpXG4gICAgICAgICAgICAgICAgICBycGMgPSBudWxsXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG9wdGlvbnMuZXJyb3Ioe1xuICAgICAgICAgICAgICAgICAgcmVzcG9uc2VKU09OOiB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6XG4gICAgICAgICAgICAgICAgICAgICAgJ1NlYXJjaCBmYWlsZWQgZHVlIHRvIHVua25vd24gcmVhc29ucywgcGxlYXNlIHRyeSBhZ2Fpbi4nLFxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFtyZXMsICdlcnJvciddXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgbW9kZWwudHJpZ2dlcigncmVxdWVzdCcsIG1vZGVsLCBudWxsLCBvcHRpb25zKVxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWJvcnQoKSB7XG4gICAgICAgICAgaWYgKCFoYW5kbGVkKSB7XG4gICAgICAgICAgICBoYW5kbGVkID0gdHJ1ZVxuICAgICAgICAgICAgb3B0aW9ucy5lcnJvcih7XG4gICAgICAgICAgICAgIHJlc3BvbnNlSlNPTjoge1xuICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdTdG9wcGVkJyxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBwcm9taXNlKCkge1xuICAgICAgICAgIGNvbnN0IGQgPSAkLkRlZmVycmVkKClcbiAgICAgICAgICBwcm9taXNlXG4gICAgICAgICAgICAudGhlbigodmFsdWU6IGFueSkgPT4ge1xuICAgICAgICAgICAgICBkLnJlc29sdmUodmFsdWUpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKChlcnI6IGFueSkgPT4ge1xuICAgICAgICAgICAgICBkLnJlamVjdChlcnIpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIHJldHVybiBkXG4gICAgICAgIH0sXG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBCYWNrYm9uZS5Bc3NvY2lhdGVkTW9kZWwucHJvdG90eXBlLnN5bmMuY2FsbChcbiAgICAgICAgdGhpcyxcbiAgICAgICAgbWV0aG9kLFxuICAgICAgICBtb2RlbCxcbiAgICAgICAgb3B0aW9uc1xuICAgICAgKVxuICAgIH1cbiAgfSxcbiAgaGFuZGxlRXJyb3IoX3Jlc3VsdE1vZGVsOiBhbnksIHJlc3BvbnNlOiBhbnksIHNlbnQ6IGFueSkge1xuICAgIGNvbnN0IGRhdGFKU09OID0gSlNPTi5wYXJzZShzZW50LmRhdGEpXG4gICAgdGhpcy5nZXQoJ2xhenlSZXN1bHRzJykudXBkYXRlU3RhdHVzV2l0aEVycm9yKHtcbiAgICAgIHNvdXJjZXM6IGRhdGFKU09OLnNyY3MsXG4gICAgICBtZXNzYWdlOiByZXNwb25zZS5yZXNwb25zZUpTT05cbiAgICAgICAgPyByZXNwb25zZS5yZXNwb25zZUpTT04ubWVzc2FnZVxuICAgICAgICA6IHJlc3BvbnNlLnN0YXR1c1RleHQsXG4gICAgfSlcbiAgfSxcbiAgaGFuZGxlU3luYygpIHt9LFxuICBwYXJzZShyZXNwOiBhbnkpIHtcbiAgICBTdGFydHVwRGF0YVN0b3JlLk1ldGFjYXJkRGVmaW5pdGlvbnMuYWRkRHluYW1pY2FsbHlGb3VuZE1ldGFjYXJkRGVmaW5pdGlvbnNGcm9tU2VhcmNoUmVzdWx0cyhcbiAgICAgIHJlc3AudHlwZXNcbiAgICApXG4gICAgY29uc3QgbGF6eVJlc3VsdHMgPSB0aGlzLmdldCgnbGF6eVJlc3VsdHMnKSBhcyBMYXp5UXVlcnlSZXN1bHRzXG4gICAgbGF6eVJlc3VsdHMuYWRkVHlwZXMocmVzcC50eXBlcylcbiAgICBsYXp5UmVzdWx0cy51cGRhdGVTdGF0dXMocmVzcC5zdGF0dXNCeVNvdXJjZSlcbiAgICBsYXp5UmVzdWx0cy51cGRhdGVEaWRZb3VNZWFuRmllbGRzKHJlc3AuZGlkWW91TWVhbkZpZWxkcylcbiAgICBsYXp5UmVzdWx0cy51cGRhdGVTaG93aW5nUmVzdWx0c0ZvckZpZWxkcyhyZXNwLnNob3dpbmdSZXN1bHRzRm9yRmllbGRzKVxuICAgIGxhenlSZXN1bHRzLmFkZEhpZ2hsaWdodHMoXG4gICAgICB0cmFuc2Zvcm1SZXNwb25zZUhpZ2hsaWdodHNUb01hcCh7XG4gICAgICAgIGhpZ2hsaWdodHM6IHJlc3AuaGlnaGxpZ2h0cyxcbiAgICAgIH0pXG4gICAgKVxuICAgIGxhenlSZXN1bHRzLmFkZCh7XG4gICAgICByZXN1bHRzOiByZXNwLnJlc3VsdHMsXG4gICAgfSlcbiAgICByZXR1cm4ge31cbiAgfSxcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/QueryResult.d.ts b/src/main/webapp/js/model/QueryResult.d.ts new file mode 100644 index 00000000000..aecf6c3d65a --- /dev/null +++ b/src/main/webapp/js/model/QueryResult.d.ts @@ -0,0 +1,3 @@ +import 'backbone-associations'; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/QueryResult.js b/src/main/webapp/js/model/QueryResult.js new file mode 100644 index 00000000000..e5e32789d66 --- /dev/null +++ b/src/main/webapp/js/model/QueryResult.js @@ -0,0 +1,221 @@ +import { __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import _ from 'underscore'; +import $ from 'jquery'; +import Common from '../Common'; +import cql from '../cql'; +import 'backbone-associations'; +import Metacard from './Metacard'; +import MetacardActionModel from './MetacardAction'; +import { StartupDataStore } from './Startup/startup'; +function generateThumbnailUrl(url) { + var newUrl = url; + if (url.indexOf('?') >= 0) { + newUrl += '&'; + } + else { + newUrl += '?'; + } + newUrl += '_=' + Date.now(); + return newUrl; +} +function humanizeResourceSize(result) { + if (result.metacard.properties['resource-size']) { + result.metacard.properties['resource-size'] = Common.getFileSize(result.metacard.properties['resource-size']); + } +} +export default Backbone.AssociatedModel.extend({ + type: 'query-result', + defaults: function () { + return { + isResourceLocal: false, + }; + }, + relations: [ + { + type: Backbone.One, + key: 'metacard', + relatedModel: Metacard, + }, + { + type: Backbone.Many, + key: 'actions', + collectionType: Backbone.Collection.extend({ + model: MetacardActionModel, + comparator: function (c) { + return c.get('title').toLowerCase(); + }, + }), + }, + ], + initialize: function () { + this.refreshData = _.throttle(this.refreshData, 200); + }, + getTitle: function () { + return this.get('metacard').get('properties').attributes.title; + }, + getPreview: function () { + return this.get('metacard').get('properties').get('ext.extracted.text'); + }, + hasPreview: function () { + return (this.get('metacard').get('properties').get('ext.extracted.text') !== + undefined); + }, + isResource: function () { + return (this.get('metacard') + .get('properties') + .get('metacard-tags') + .indexOf('resource') >= 0); + }, + isRevision: function () { + return (this.get('metacard') + .get('properties') + .get('metacard-tags') + .indexOf('revision') >= 0); + }, + isDeleted: function () { + return (this.get('metacard') + .get('properties') + .get('metacard-tags') + .indexOf('deleted') >= 0); + }, + isRemote: function () { + var Sources = StartupDataStore.Sources.sources; + var harvestedSources = Sources.filter(function (source) { return source.harvested; }).map(function (source) { return source.id; }); + return (harvestedSources.includes(this.get('metacard').get('properties').get('source-id')) === false); + }, + hasGeometry: function (attribute) { + return this.get('metacard').hasGeometry(attribute); + }, + getPoints: function (attribute) { + return this.get('metacard').getPoints(attribute); + }, + getGeometries: function (attribute) { + return this.get('metacard').getGeometries(attribute); + }, + hasExportActions: function () { + return this.getExportActions().length > 0; + }, + getOtherActions: function () { + var otherActions = this.getExportActions().concat(this.getMapActions()); + return this.get('actions').filter(function (action) { return otherActions.indexOf(action) === -1; }); + }, + getExportActions: function () { + var otherActions = this.getMapActions(); + return this.get('actions') + .filter(function (action) { return action.get('title').indexOf('Export') === 0; }) + .filter(function (action) { return otherActions.indexOf(action) === -1; }); + }, + hasMapActions: function () { + return this.getMapActions().length > 0; + }, + getMapActions: function () { + return this.get('actions').filter(function (action) { return action.id.indexOf('catalog.data.metacard.map.') === 0; }); + }, + refreshData: function (metacardProperties) { + var _this = this; + if (metacardProperties !== undefined) { + var updatedResult = this.toJSON(); + updatedResult.metacard.properties = metacardProperties; + this.set(updatedResult); + var clearedAttributes = Object.keys(this.get('metacard').get('properties').toJSON()).reduce(function (acc, cur) { + return cur in metacardProperties ? acc : __spreadArray([cur], __read(acc), false); + }, []); + clearedAttributes.forEach(function (attribute) { + _this.get('metacard').get('properties').unset(attribute); + }); + this.trigger('refreshdata'); + return; + } + //let solr flush + setTimeout(function () { + var metacard = _this.get('metacard'); + var req = { + count: 1, + cql: cql.write({ + type: 'AND', + filters: [ + { + type: 'OR', + filters: [ + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: "="; property: string; value: any; }... Remove this comment to see the full error message + { + type: '=', + property: '"id"', + value: metacard.get('properties').get('metacard.deleted.id') || + metacard.id, + }, + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: "="; property: string; value: any; }... Remove this comment to see the full error message + { + type: '=', + property: '"metacard.deleted.id"', + value: metacard.id, + }, + ], + }, + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: "ILIKE"; property: string; value: st... Remove this comment to see the full error message + { + type: 'ILIKE', + property: '"metacard-tags"', + value: '*', + }, + ], + }), + id: '0', + sort: 'modified:desc', + src: metacard.get('properties').get('source-id'), + }; + $.ajax({ + type: 'POST', + url: './internal/cql', + data: JSON.stringify(req), + contentType: 'application/json', + }).then(_this.parseRefresh.bind(_this), _this.handleRefreshError.bind(_this)); + }, 1000); + }, + handleRefreshError: function () { + //do nothing for now, should we announce this? + }, + parseRefresh: function (response) { + var queryId = this.get('metacard').get('queryId'); + var color = this.get('metacard').get('color'); + _.forEach(response.results, function (result) { + delete result.relevance; + result.propertyTypes = + response.types[result.metacard.properties['metacard-type']]; + result.metacardType = result.metacard.properties['metacard-type']; + result.metacard.id = result.metacard.properties.id; + result.id = result.metacard.id + result.metacard.properties['source-id']; + result.metacard.queryId = queryId; + result.metacard.color = color; + humanizeResourceSize(result); + result.actions.forEach(function (action) { return (action.queryId = queryId); }); + var thumbnailAction = _.findWhere(result.actions, { + id: 'catalog.data.metacard.thumbnail', + }); + if (result.hasThumbnail && thumbnailAction) { + result.metacard.properties.thumbnail = generateThumbnailUrl(thumbnailAction.url); + } + else { + result.metacard.properties.thumbnail = undefined; + } + }); + this.set(response.results[0]); + this.trigger('refreshdata'); + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVlcnlSZXN1bHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvUXVlcnlS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c29sciBmbHVzaFxuICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgY29uc3QgbWV0YWNhcmQgPSB0aGlzLmdldCgnbWV0YWNhcmQnKVxuICAgICAgY29uc3QgcmVxID0ge1xuICAgICAgICBjb3VudDogMSxcbiAgICAgICAgY3FsOiBjcWwud3JpdGUoe1xuICAgICAgICAgIHR5cGU6ICdBTkQnLFxuICAgICAgICAgIGZpbHRlcnM6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdHlwZTogJ09SJyxcbiAgICAgICAgICAgICAgZmlsdGVyczogW1xuICAgICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyMzIyKSBGSVhNRTogVHlwZSAneyB0eXBlOiBcIj1cIjsgcHJvcGVydHk6IHN0cmluZzsgdmFsdWU6IGFueTsgfS4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgdHlwZTogJz0nLFxuICAgICAgICAgICAgICAgICAgcHJvcGVydHk6ICdcImlkXCInLFxuICAgICAgICAgICAgICAgICAgdmFsdWU6XG4gICAgICAgICAgICAgICAgICAgIG1ldGFjYXJkLmdldCgncHJvcGVydGllcycpLmdldCgnbWV0YWNhcmQuZGVsZXRlZC5pZCcpIHx8XG4gICAgICAgICAgICAgICAgICAgIG1ldGFjYXJkLmlkLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDIzMjIpIEZJWE1FOiBUeXBlICd7IHR5cGU6IFwiPVwiOyBwcm9wZXJ0eTogc3RyaW5nOyB2YWx1ZTogYW55OyB9Li4uIFJlbW92ZSB0aGlzIGNvbW1lbnQgdG8gc2VlIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2VcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICB0eXBlOiAnPScsXG4gICAgICAgICAgICAgICAgICBwcm9wZXJ0eTogJ1wibWV0YWNhcmQuZGVsZXRlZC5pZFwiJyxcbiAgICAgICAgICAgICAgICAgIHZhbHVlOiBtZXRhY2FyZC5pZCxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyMzIyKSBGSVhNRTogVHlwZSAneyB0eXBlOiBcIklMSUtFXCI7IHByb3BlcnR5OiBzdHJpbmc7IHZhbHVlOiBzdC4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHR5cGU6ICdJTElLRScsXG4gICAgICAgICAgICAgIHByb3BlcnR5OiAnXCJtZXRhY2FyZC10YWdzXCInLFxuICAgICAgICAgICAgICB2YWx1ZTogJyonLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdLFxuICAgICAgICB9KSxcbiAgICAgICAgaWQ6ICcwJyxcbiAgICAgICAgc29ydDogJ21vZGlmaWVkOmRlc2MnLFxuICAgICAgICBzcmM6IG1ldGFjYXJkLmdldCgncHJvcGVydGllcycpLmdldCgnc291cmNlLWlkJyksXG4gICAgICB9XG4gICAgICAkLmFqYXgoe1xuICAgICAgICB0eXBlOiAnUE9TVCcsXG4gICAgICAgIHVybDogJy4vaW50ZXJuYWwvY3FsJyxcbiAgICAgICAgZGF0YTogSlNPTi5zdHJpbmdpZnkocmVxKSxcbiAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi9qc29uJyxcbiAgICAgIH0pLnRoZW4odGhpcy5wYXJzZVJlZnJlc2guYmluZCh0aGlzKSwgdGhpcy5oYW5kbGVSZWZyZXNoRXJyb3IuYmluZCh0aGlzKSlcbiAgICB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lJZCA9IHF1ZXJ5SWQpKVxuICAgICAgY29uc3QgdGh1bWJuYWlsQWN0aW9uID0gXy5maW5kV2hlcmUocmVzdWx0LmFjdGlvbnMsIHtcbiAgICAgICAgaWQ6ICdjYXRhbG9nLmRhdGEubWV0YWNhcmQudGh1bWJuYWlsJyxcbiAgICAgIH0pXG4gICAgICBpZiAocmVzdWx0Lmhhc1RodW1ibmFpbCAmJiB0aHVtYm5haWxBY3Rpb24pIHtcbiAgICAgICAgcmVzdWx0Lm1ldGFjYXJkLnByb3BlcnRpZXMudGh1bWJuYWlsID0gZ2VuZXJhdGVUaHVtYm5haWxVcmwoXG4gICAgICAgICAgdGh1bWJuYWlsQWN0aW9uLnVybFxuICAgICAgICApXG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXN1bHQubWV0YWNhcmQucHJvcGVydGllcy50aHVtYm5haWwgPSB1bmRlZmluZWRcbiAgICAgIH1cbiAgICB9KVxuICAgIHRoaXMuc2V0KHJlc3BvbnNlLnJlc3VsdHNbMF0pXG4gICAgdGhpcy50cmlnZ2VyKCdyZWZyZXNoZGF0YScpXG4gIH0sXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/QuerySettings.d.ts b/src/main/webapp/js/model/QuerySettings.d.ts new file mode 100644 index 00000000000..5298df7f0f6 --- /dev/null +++ b/src/main/webapp/js/model/QuerySettings.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/QuerySettings.js b/src/main/webapp/js/model/QuerySettings.js new file mode 100644 index 00000000000..08490ce1f3a --- /dev/null +++ b/src/main/webapp/js/model/QuerySettings.js @@ -0,0 +1,50 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import { StartupDataStore } from './Startup/startup'; +export default Backbone.Model.extend({ + defaults: function () { + var sources = StartupDataStore.Configuration.getDefaultSources(); + return { + type: 'text', + sources: sources, + sorts: [ + { + attribute: 'modified', + direction: 'descending', + }, + ], + template: undefined, + spellcheck: false, + phonetics: false, + additionalOptions: '{}', + }; + }, + isTemplate: function (template) { + if (this.get('defaultResultFormId') === template.id) { + return true; + } + if (this.get('template') !== undefined) { + return this.get('template').id === template.id; + } + else { + return false; + } + }, + isDefaultTemplate: function (template) { + return this.isTemplate(template) && this.get('template').default; + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVlcnlTZXR0aW5ncy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9RdWVyeVNldHRpbmdzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLFFBQVEsTUFBTSxVQUFVLENBQUE7QUFDL0IsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFDcEQsZUFBZSxRQUFRLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQztJQUNuQyxRQUFRO1FBQ04sSUFBTSxPQUFPLEdBQUcsZ0JBQWdCLENBQUMsYUFBYSxDQUFDLGlCQUFpQixFQUFFLENBQUE7UUFDbEUsT0FBTztZQUNMLElBQUksRUFBRSxNQUFNO1lBQ1osT0FBTyxTQUFBO1lBQ1AsS0FBSyxFQUFFO2dCQUNMO29CQUNFLFNBQVMsRUFBRSxVQUFVO29CQUNyQixTQUFTLEVBQUUsWUFBWTtpQkFDeEI7YUFDRjtZ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AgZGlyZWN0aW9uOiAnZGVzY2VuZGluZycsXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgICAgdGVtcGxhdGU6IHVuZGVmaW5lZCxcbiAgICAgIHNwZWxsY2hlY2s6IGZhbHNlLFxuICAgICAgcGhvbmV0aWNzOiBmYWxzZSxcbiAgICAgIGFkZGl0aW9uYWxPcHRpb25zOiAne30nLFxuICAgIH1cbiAgfSxcbiAgaXNUZW1wbGF0ZSh0ZW1wbGF0ZTogYW55KSB7XG4gICAgaWYgKHRoaXMuZ2V0KCdkZWZhdWx0UmVzdWx0Rm9ybUlkJykgPT09IHRlbXBsYXRlLmlkKSB7XG4gICAgICByZXR1cm4gdHJ1ZVxuICAgIH1cbiAgICBpZiAodGhpcy5nZXQoJ3RlbXBsYXRlJykgIT09IHVuZGVmaW5lZCkge1xuICAgICAgcmV0dXJuIHRoaXMuZ2V0KCd0ZW1wbGF0ZScpLmlkID09PSB0ZW1wbGF0ZS5pZFxuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gZmFsc2VcbiAgICB9XG4gIH0sXG4gIGlzRGVmYXVsdFRlbXBsYXRlKHRlbXBsYXRlOiBhbnkpIHtcbiAgICByZXR1cm4gdGhpcy5pc1RlbXBsYXRlKHRlbXBsYXRlKSAmJiB0aGlzLmdldCgndGVtcGxhdGUnKS5kZWZhdWx0XG4gIH0sXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/configuration.d.ts b/src/main/webapp/js/model/Startup/configuration.d.ts new file mode 100644 index 00000000000..5f2a706cad8 --- /dev/null +++ b/src/main/webapp/js/model/Startup/configuration.d.ts @@ -0,0 +1,62 @@ +import { Subscribable } from '../Base/base-classes'; +import { StartupPayloadType } from './startup.types'; +import { StartupData } from './startup'; +import { DataTypesConfiguration } from '../../../component/datatypes/datatypes'; +declare class Configuration extends Subscribable<{ + thing: 'configuration-update'; +}> { + config?: StartupPayloadType['config']; + platformUiConfiguration?: StartupPayloadType['platformUiConfiguration']; + constructor(startupData?: StartupData); + getExportLimit: () => number; + getResultCount: () => number; + getProjection: () => string; + getI18n: () => Record; + getAttributeAliases: () => Record; + isReadOnly: (attribute: string) => boolean; + getReadOnly: () => string[]; + getSummaryShow: () => string[]; + getRequiredExportAttributes: () => string[]; + getExportMetacardFormatOptions: () => string[]; + getExportMetacardsFormatOptions: () => string[]; + getCommonAttributes: () => string[]; + getImageryProviders: () => import("./startup.types").ImageryProvider[]; + getTerrainProvider: () => {}; + getBingKey: () => string; + getSystemUsageMessage: () => string; + getPlatformUITimeout: () => number; + getBasicSearchTemporalSelectionDefault: () => string[]; + getEnums: () => Record; + getOnlineGazetteer: () => boolean; + getResultShow: () => string[]; + getIconConfig: () => import("./startup.types").IconConfig; + getShowRelevanceScores: () => boolean; + getRelevancePrecision: () => number; + getMapHome: () => string; + getHelpUrl: () => string; + getCustomBranding: () => string; + getTopLeftLogoSrc: () => string; + getProduct: () => string; + getMenuIconSrc: () => string; + getBottomLeftBackgroundSrc: () => string; + getPlatformHeader: () => string | undefined; + getPlatformFooter: () => string | undefined; + getPlatformBackground: () => string | undefined; + getPlatformColor: () => string | undefined; + getWebSocketsEnabled: () => boolean | undefined; + getBasicSearchMatchType: () => string; + getDefaultLayout: () => import("./startup.types").VisualizationType[] | undefined; + getSearchTimeout: () => number; + getDefaultSources: () => any[]; + getDefaultTableColumns: () => string[]; + getIsFuzzyResultsEnabled: () => boolean; + getDisableUnknownErrorBox: () => boolean; + getExtra: () => { + [key: string]: any; + datatypes?: DataTypesConfiguration | undefined; + resourceSizeIdentifiers?: string[] | undefined; + } | undefined; + getDataTypes: () => DataTypesConfiguration; + getResourceSizeIdentifiers: () => string[]; +} +export { Configuration }; diff --git a/src/main/webapp/js/model/Startup/configuration.hooks.d.ts b/src/main/webapp/js/model/Startup/configuration.hooks.d.ts new file mode 100644 index 00000000000..6db3fc1c581 --- /dev/null +++ b/src/main/webapp/js/model/Startup/configuration.hooks.d.ts @@ -0,0 +1 @@ +export declare const useConfiguration: () => import("./configuration").Configuration; diff --git a/src/main/webapp/js/model/Startup/configuration.hooks.js b/src/main/webapp/js/model/Startup/configuration.hooks.js new file mode 100644 index 00000000000..aef002ae894 --- /dev/null +++ b/src/main/webapp/js/model/Startup/configuration.hooks.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { SnapshotManager } from './snapshot'; +import { StartupDataStore } from './startup'; +import { useSyncExternalStore } from 'react'; +var subscribe = function (callback) { + var cancelSubscription = StartupDataStore.Configuration.subscribeTo({ + subscribableThing: 'configuration-update', + callback: callback, + }); + return function () { + cancelSubscription(); + }; +}; +var snapshotManager = new SnapshotManager(function () { + return StartupDataStore.Configuration; +}, subscribe); +export var useConfiguration = function () { + var configuration = useSyncExternalStore(snapshotManager.subscribe, snapshotManager.getSnapshot); + return configuration; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5ob29rcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9TdGFydHVwL2NvbmZpZ3VyYXRpb24uaG9va3MudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQzVDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLFdBQVcsQ0FB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lvbigpXG4gIH1cbn1cblxuY29uc3Qgc25hcHNob3RNYW5hZ2VyID0gbmV3IFNuYXBzaG90TWFuYWdlcigoKSA9PiB7XG4gIHJldHVybiBTdGFydHVwRGF0YVN0b3JlLkNvbmZpZ3VyYXRpb25cbn0sIHN1YnNjcmliZSlcblxuZXhwb3J0IGNvbnN0IHVzZUNvbmZpZ3VyYXRpb24gPSAoKSA9PiB7XG4gIGNvbnN0IGNvbmZpZ3VyYXRpb24gPSB1c2VTeW5jRXh0ZXJuYWxTdG9yZShcbiAgICBzbmFwc2hvdE1hbmFnZXIuc3Vic2NyaWJlLFxuICAgIHNuYXBzaG90TWFuYWdlci5nZXRTbmFwc2hvdFxuICApXG4gIHJldHVybiBjb25maWd1cmF0aW9uXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/configuration.js b/src/main/webapp/js/model/Startup/configuration.js new file mode 100644 index 00000000000..4ae009a637e --- /dev/null +++ b/src/main/webapp/js/model/Startup/configuration.js @@ -0,0 +1,223 @@ +import { __extends } from "tslib"; +import { Subscribable } from '../Base/base-classes'; +import _ from 'underscore'; +function match(regexList, attribute) { + return (_.chain(regexList) + .map(function (str) { return new RegExp(str); }) + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '(regex: RegExp) => RegExpExecArr... Remove this comment to see the full error message + .find(function (regex) { return regex.exec(attribute); }) + .value() !== undefined); +} +var Configuration = /** @class */ (function (_super) { + __extends(Configuration, _super); + function Configuration(startupData) { + var _this = _super.call(this) || this; + _this.getExportLimit = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.exportResultLimit) || 1000; + }; + _this.getResultCount = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.resultCount) || 250; + }; + _this.getProjection = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.projection) || 'EPSG:4326'; + }; + _this.getI18n = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.i18n) || {}; + }; + _this.getAttributeAliases = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.attributeAliases) || {}; + }; + _this.isReadOnly = function (attribute) { + return match(_this.getReadOnly(), attribute); + }; + _this.getReadOnly = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.readOnly) || []; + }; + _this.getSummaryShow = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.summaryShow) || []; + }; + _this.getRequiredExportAttributes = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.requiredExportAttributes) || []; + }; + _this.getExportMetacardFormatOptions = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.exportMetacardFormatOptions) || []; + }; + _this.getExportMetacardsFormatOptions = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.exportMetacardsFormatOptions) || []; + }; + _this.getCommonAttributes = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.commonAttributes) || []; + }; + _this.getImageryProviders = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.imageryProviders) || []; + }; + _this.getTerrainProvider = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.terrainProvider) || {}; + }; + _this.getBingKey = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.bingKey) || ''; + }; + _this.getSystemUsageMessage = function () { + var _a; + return ((_a = _this.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.systemUsageMessage) || ''; + }; + // in minutes + _this.getPlatformUITimeout = function () { + var _a; + return ((_a = _this.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.timeout) || 15; + }; + _this.getBasicSearchTemporalSelectionDefault = function () { + var _a; + return (((_a = _this.config) === null || _a === void 0 ? void 0 : _a.basicSearchTemporalSelectionDefault) || [ + 'created', + 'effective', + 'modified', + 'metacard.created', + 'metacard.modified', + ]); + }; + _this.getEnums = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.enums) || {}; + }; + _this.getOnlineGazetteer = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.onlineGazetteer) || false; + }; + _this.getResultShow = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.resultShow) || []; + }; + _this.getIconConfig = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.iconConfig) || {}; + }; + _this.getShowRelevanceScores = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.showRelevanceScores) || false; + }; + _this.getRelevancePrecision = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.relevancePrecision) || 2; + }; + _this.getMapHome = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.mapHome) || ''; + }; + _this.getHelpUrl = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.helpUrl) || ''; + }; + _this.getCustomBranding = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.customBranding) || ''; + }; + _this.getTopLeftLogoSrc = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.topLeftLogoSrc) || ''; + }; + _this.getProduct = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.product) || ''; + }; + _this.getMenuIconSrc = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.menuIconSrc) || ''; + }; + _this.getBottomLeftBackgroundSrc = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.bottomLeftBackgroundSrc) || ''; + }; + _this.getPlatformHeader = function () { + var _a; + return (_a = _this.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.header; + }; + _this.getPlatformFooter = function () { + var _a; + return (_a = _this.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.footer; + }; + _this.getPlatformBackground = function () { + var _a; + return (_a = _this.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.background; + }; + _this.getPlatformColor = function () { + var _a; + return (_a = _this.platformUiConfiguration) === null || _a === void 0 ? void 0 : _a.color; + }; + _this.getWebSocketsEnabled = function () { + var _a; + return (_a = _this.config) === null || _a === void 0 ? void 0 : _a.webSocketsEnabled; + }; + _this.getBasicSearchMatchType = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.basicSearchMatchType) || 'datatype'; + }; + _this.getDefaultLayout = function () { + var _a; + return (_a = _this.config) === null || _a === void 0 ? void 0 : _a.defaultLayout; + }; + // in milliseconds + _this.getSearchTimeout = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.timeout) || 300000; + }; + _this.getDefaultSources = function () { + var _a, _b; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.defaultSources) && ((_b = _this.config) === null || _b === void 0 ? void 0 : _b.defaultSources.length) > 0 + ? _this.config.defaultSources + : ['all']; + }; + _this.getDefaultTableColumns = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.defaultTableColumns) || []; + }; + _this.getIsFuzzyResultsEnabled = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.isFuzzyResultsEnabled) || false; + }; + _this.getDisableUnknownErrorBox = function () { + var _a; + return ((_a = _this.config) === null || _a === void 0 ? void 0 : _a.disableUnknownErrorBox) || false; + }; + _this.getExtra = function () { + var _a; + return (_a = _this.config) === null || _a === void 0 ? void 0 : _a.extra; + }; + _this.getDataTypes = function () { + var _a, _b; + return { + groups: ((_b = (_a = _this.getExtra()) === null || _a === void 0 ? void 0 : _a.datatypes) === null || _b === void 0 ? void 0 : _b.groups) || {}, + }; + }; + _this.getResourceSizeIdentifiers = function () { + var _a; + return ((_a = _this.getExtra()) === null || _a === void 0 ? void 0 : _a.resourceSizeIdentifiers) || []; + }; + startupData === null || startupData === void 0 ? void 0 : startupData.subscribeTo({ + subscribableThing: 'fetched', + callback: function (startupPayload) { + _this.config = startupPayload.config; + _this.platformUiConfiguration = startupPayload.platformUiConfiguration; + _this._notifySubscribers({ thing: 'configuration-update' }); + }, + }); + return _this; + } + return Configuration; +}(Subscribable)); +export { Configuration }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9TdGFydHVwL2NvbmZpZ3VyYXRpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sc0JBQXNCLENBQUE7QUFHbkQsT0FBTyxDQUFDLE1BQU0sWUFBWSxDQUFBO0FBRzFCLFNBQVMsS0FBSyxDQUFDLFNBQWMsRUFBRSxTQUFjO0lBQzNDLE9BQU8sQ0FDTCxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQVMsQ0FBQztTQUNmLEdBQUcsQ0FBQyxVQUFDLEdBQUcsSUFBSyxPQUFBLElBQUksTUFBTSxDQUFDLEdBQUcsQ0FBQyxFQUFmLENBQWUsQ0FBQztRQUM5QixtSkFBbUo7U0FDbEosSUFBSSxDQUFDLFVBQUMsS0FBSyxJQUFLLE9BQUEsS0FBSyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsRUFBckIsQ0FBcUIsQ0FBQztTQUN0QyxLQUFLLEVBQUUsS0FBSyxTQUFTLENBQ3pCLENBQUE7QUFDSCxDQUFDO0FBRUQ7SUFBNEIsaUNBQStDO0lBR3pFLHVCQUFZLFdBQXlCO1FBQXJDLFlBQ0UsaUJBQU8sU0FTUjtRQUNELG9CQUFjLEdBQUc7O1lBQ2YsT0FBTyxDQUFBLE1BQUEsS0FBSSxDQUFDLE1BQU0sMENBQUUsaUJBQWlCLEtBQUksSUFBSSxDQUFBO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1tdID0+IHtcbiAgICByZXR1cm4gdGhpcy5nZXRFeHRyYSgpPy5yZXNvdXJjZVNpemVJZGVudGlmaWVycyB8fCBbXVxuICB9XG59XG5cbmV4cG9ydCB7IENvbmZpZ3VyYXRpb24gfVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/metacard-definitions.d.ts b/src/main/webapp/js/model/Startup/metacard-definitions.d.ts new file mode 100644 index 00000000000..ad1a6d11504 --- /dev/null +++ b/src/main/webapp/js/model/Startup/metacard-definitions.d.ts @@ -0,0 +1,37 @@ +import { Subscribable } from '../Base/base-classes'; +import { StartupData } from './startup'; +import { AttributeDefinitionType, AttributeMapType, MetacardDefinitionType, MetacardDefinitionsType, SearchResultMetacardDefinitionType, StartupPayloadType } from './startup.types'; +declare class MetacardDefinitions extends Subscribable<{ + thing: 'metacard-definitions-update'; +}> { + attributeMap?: StartupPayloadType['attributeMap']; + sortedAttributes?: StartupPayloadType['sortedAttributes']; + metacardTypes?: StartupPayloadType['metacardTypes']; + constructor(startupData?: StartupData); + addDynamicallyFoundMetacardDefinitionsFromSearchResults: (definitions: SearchResultMetacardDefinitionType) => void; + addDynamicallyFoundMetacardDefinitions: (definitions: MetacardDefinitionsType) => void; + addUnknownMetacardType: ({ name, definition, }: { + name: string; + definition: MetacardDefinitionType; + }) => void; + addUnknownAttributes: (definition: MetacardDefinitionType) => void; + addUnknownAttribute: ({ attributeDefinition, attributeName, }: { + attributeName: string; + attributeDefinition: AttributeDefinitionType; + }) => void; + isUnknownAttribute: (attributeName: string) => boolean; + isUnknownMetacardType: (metacardType: string) => boolean; + resortKnownMetacardAttributes: () => void; + isHiddenAttribute: (id: string) => boolean; + getMetacardDefinition: (metacardTypeName: string) => AttributeMapType; + getRequired: (metacardTypeName: string, attributeName: string) => boolean; + getAlias: (attributeName: string) => string; + getType: (attributeName: string) => import("./startup.types").AttributeTypes; + isMulti: (attributeName: string) => boolean; + getEnum: (attributeName: string) => string[]; + getSearchOnlyAttributes: () => string[]; + getSortedAttributes: () => import("./startup.types").SortedAttributesType; + getAttributeMap: () => AttributeMapType; + getAttributeDefinition: (id: string) => AttributeDefinitionType | undefined; +} +export { MetacardDefinitions }; diff --git a/src/main/webapp/js/model/Startup/metacard-definitions.hooks.d.ts b/src/main/webapp/js/model/Startup/metacard-definitions.hooks.d.ts new file mode 100644 index 00000000000..e5ee34f9946 --- /dev/null +++ b/src/main/webapp/js/model/Startup/metacard-definitions.hooks.d.ts @@ -0,0 +1 @@ +export declare const useMetacardDefinitions: () => import("./metacard-definitions").MetacardDefinitions; diff --git a/src/main/webapp/js/model/Startup/metacard-definitions.hooks.js b/src/main/webapp/js/model/Startup/metacard-definitions.hooks.js new file mode 100644 index 00000000000..866bf5b0e14 --- /dev/null +++ b/src/main/webapp/js/model/Startup/metacard-definitions.hooks.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { SnapshotManager } from './snapshot'; +import { StartupDataStore } from './startup'; +import { useSyncExternalStore } from 'react'; +var subscribe = function (callback) { + var cancelSubscription = StartupDataStore.MetacardDefinitions.subscribeTo({ + subscribableThing: 'metacard-definitions-update', + callback: callback, + }); + return function () { + cancelSubscription(); + }; +}; +var snapshotManager = new SnapshotManager(function () { + return StartupDataStore.MetacardDefinitions; +}, subscribe); +export var useMetacardDefinitions = function () { + var metacardDefinitions = useSyncExternalStore(snapshotManager.subscribe, snapshotManager.getSnapshot); + return metacardDefinitions; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQtZGVmaW5pdGlv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bXBvcnQgeyB1c2VTeW5jRXh0ZXJuYWxTdG9yZSB9IGZyb20gJ3JlYWN0J1xuXG5jb25zdCBzdWJzY3JpYmUgPSAoY2FsbGJhY2s6ICgpID0+IHZvaWQpID0+IHtcbiAgY29uc3QgY2FuY2VsU3Vic2NyaXB0aW9uID0gU3RhcnR1cERhdGFTdG9yZS5NZXRhY2FyZERlZmluaXRpb25zLnN1YnNjcmliZVRvKHtcbiAgICBzdWJzY3JpYmFibGVUaGluZzogJ21ldGFjYXJkLWRlZmluaXRpb25zLXVwZGF0ZScsXG4gICAgY2FsbGJhY2ssXG4gIH0pXG4gIHJldHVybiAoKSA9PiB7XG4gICAgY2FuY2VsU3Vic2NyaXB0aW9uKClcbiAgfVxufVxuXG5jb25zdCBzbmFwc2hvdE1hbmFnZXIgPSBuZXcgU25hcHNob3RNYW5hZ2VyKCgpID0+IHtcbiAgcmV0dXJuIFN0YXJ0dXBEYXRhU3RvcmUuTWV0YWNhcmREZWZpbml0aW9uc1xufSwgc3Vic2NyaWJlKVxuXG5leHBvcnQgY29uc3QgdXNlTWV0YWNhcmREZWZpbml0aW9ucyA9ICgpID0+IHtcbiAgY29uc3QgbWV0YWNhcmREZWZpbml0aW9ucyA9IHVzZVN5bmNFeHRlcm5hbFN0b3JlKFxuICAgIHNuYXBzaG90TWFuYWdlci5zdWJzY3JpYmUsXG4gICAgc25hcHNob3RNYW5hZ2VyLmdldFNuYXBzaG90XG4gIClcbiAgcmV0dXJuIG1ldGFjYXJkRGVmaW5pdGlvbnNcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/metacard-definitions.js b/src/main/webapp/js/model/Startup/metacard-definitions.js new file mode 100644 index 00000000000..2f655245fba --- /dev/null +++ b/src/main/webapp/js/model/Startup/metacard-definitions.js @@ -0,0 +1,167 @@ +import { __extends, __read } from "tslib"; +import { BasicDataTypePropertyName } from '../../../component/filter-builder/reserved.properties'; +import { Subscribable } from '../Base/base-classes'; +function sortMetacardTypes(metacardTypes) { + if (metacardTypes === void 0) { metacardTypes = {}; } + return Object.values(metacardTypes).sort(function (a, b) { + var attrToCompareA = (a.alias || a.id).toLowerCase(); + var attrToCompareB = (b.alias || b.id).toLowerCase(); + if (attrToCompareA < attrToCompareB) { + return -1; + } + if (attrToCompareA > attrToCompareB) { + return 1; + } + return 0; + }); +} +var MetacardDefinitions = /** @class */ (function (_super) { + __extends(MetacardDefinitions, _super); + function MetacardDefinitions(startupData) { + var _this = _super.call(this) || this; + // each time a search is conducted, this is possible, as searches return types + _this.addDynamicallyFoundMetacardDefinitionsFromSearchResults = function (definitions) { + var unknownMetacardTypes = Object.keys(definitions).filter(_this.isUnknownMetacardType); + if (unknownMetacardTypes.length === 0) { + // don't do unnecessary work + return; + } + var transformedDefinitions = Object.entries(definitions).reduce(function (blob, entry) { + var _a = __read(entry, 2), key = _a[0], value = _a[1]; + blob[key] = Object.entries(value).reduce(function (innerBlob, innerEntry) { + var _a = __read(innerEntry, 2), innerKey = _a[0], innerValue = _a[1]; + innerBlob[innerKey] = { + id: innerKey, + type: innerValue.format, + multivalued: innerValue.multivalued, + isInjected: false, // not sure we need this + }; + return innerBlob; + }, {}); + return blob; + }, {}); + _this.addDynamicallyFoundMetacardDefinitions(transformedDefinitions); + }; + _this.addDynamicallyFoundMetacardDefinitions = function (definitions) { + var unknownMetacardTypes = Object.keys(definitions).filter(_this.isUnknownMetacardType); + unknownMetacardTypes.forEach(function (type) { + _this.addUnknownMetacardType({ + name: type, + definition: definitions[type], + }); + }); + var unknownAttributes = unknownMetacardTypes.reduce(function (blob, definitionName) { + var mapOfUnknownAttributeDefinitionsFromUnknownType = Object.keys(definitions[definitionName]) + .filter(_this.isUnknownAttribute) + .reduce(function (innerBlob, attributeName) { + innerBlob[attributeName] = + definitions[definitionName][attributeName]; + return innerBlob; + }, {}); + Object.assign(blob, mapOfUnknownAttributeDefinitionsFromUnknownType); + return blob; + }, {}); + _this.addUnknownAttributes(unknownAttributes); + if (Object.keys(unknownAttributes).length > 0) { + _this.resortKnownMetacardAttributes(); + } + }; + _this.addUnknownMetacardType = function (_a) { + var name = _a.name, definition = _a.definition; + if (_this.metacardTypes) { + _this.metacardTypes[name] = definition; + } + }; + _this.addUnknownAttributes = function (definition) { + if (_this.attributeMap) { + Object.entries(definition) + .filter(function (entry) { return _this.isUnknownAttribute(entry[0]); }) + .forEach(function (entry) { + _this.addUnknownAttribute({ + attributeName: entry[0], + attributeDefinition: entry[1], + }); + }); + } + }; + _this.addUnknownAttribute = function (_a) { + var attributeDefinition = _a.attributeDefinition, attributeName = _a.attributeName; + if (_this.attributeMap) { + _this.attributeMap[attributeName] = attributeDefinition; + } + }; + _this.isUnknownAttribute = function (attributeName) { + if (_this.attributeMap) { + return _this.attributeMap[attributeName] === undefined; + } + return true; + }; + _this.isUnknownMetacardType = function (metacardType) { + if (_this.metacardTypes) { + return _this.metacardTypes[metacardType] === undefined; + } + return true; + }; + _this.resortKnownMetacardAttributes = function () { + _this.sortedAttributes = sortMetacardTypes(_this.attributeMap); + _this._notifySubscribers({ thing: 'metacard-definitions-update' }); + }; + _this.isHiddenAttribute = function (id) { + if (!_this.attributeMap) { + return false; + } + return (_this.attributeMap[id] === undefined || + _this.attributeMap[id].hidden === true); + }; + _this.getMetacardDefinition = function (metacardTypeName) { + var _a; + return ((_a = _this.metacardTypes) === null || _a === void 0 ? void 0 : _a[metacardTypeName]) || {}; + }; + _this.getRequired = function (metacardTypeName, attributeName) { + var _a, _b, _c; + return (((_c = (_b = (_a = _this.metacardTypes) === null || _a === void 0 ? void 0 : _a[metacardTypeName]) === null || _b === void 0 ? void 0 : _b[attributeName]) === null || _c === void 0 ? void 0 : _c.required) || false); + }; + _this.getAlias = function (attributeName) { + var _a, _b; + return ((_b = (_a = _this.attributeMap) === null || _a === void 0 ? void 0 : _a[attributeName]) === null || _b === void 0 ? void 0 : _b.alias) || attributeName; + }; + _this.getType = function (attributeName) { + var _a, _b; + return ((_b = (_a = _this.attributeMap) === null || _a === void 0 ? void 0 : _a[attributeName]) === null || _b === void 0 ? void 0 : _b.type) || 'STRING'; + }; + _this.isMulti = function (attributeName) { + var _a, _b; + return ((_b = (_a = _this.attributeMap) === null || _a === void 0 ? void 0 : _a[attributeName]) === null || _b === void 0 ? void 0 : _b.multivalued) || false; + }; + _this.getEnum = function (attributeName) { + var _a, _b; + return ((_b = (_a = _this.attributeMap) === null || _a === void 0 ? void 0 : _a[attributeName]) === null || _b === void 0 ? void 0 : _b.enumerations) || []; + }; + _this.getSearchOnlyAttributes = function () { + return ['anyText', 'anyGeo', 'anyDate', BasicDataTypePropertyName]; + }; + _this.getSortedAttributes = function () { + return _this.sortedAttributes || []; + }; + _this.getAttributeMap = function () { + return _this.attributeMap || {}; + }; + _this.getAttributeDefinition = function (id) { + var _a; + return (_a = _this.attributeMap) === null || _a === void 0 ? void 0 : _a[id]; + }; + startupData === null || startupData === void 0 ? void 0 : startupData.subscribeTo({ + subscribableThing: 'fetched', + callback: function (startupPayload) { + _this.attributeMap = startupPayload.attributeMap; + _this.sortedAttributes = startupPayload.sortedAttributes; + _this.metacardTypes = startupPayload.metacardTypes; + _this._notifySubscribers({ thing: 'metacard-definitions-update' }); + }, + }); + return _this; + } + return MetacardDefinitions; +}(Subscribable)); +export { MetacardDefinitions }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQtZGVmaW5pdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvU3RhcnR1cC9tZXRhY2FyZC1kZWZpbml0aW9ucy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLHVEQUF1RCxDQUFBO0FBQ2pHLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtB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5cbmV4cG9ydCB7IE1ldGFjYXJkRGVmaW5pdGlvbnMgfVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/snapshot.d.ts b/src/main/webapp/js/model/Startup/snapshot.d.ts new file mode 100644 index 00000000000..b7b2dda53af --- /dev/null +++ b/src/main/webapp/js/model/Startup/snapshot.d.ts @@ -0,0 +1,17 @@ +import { Subscribable } from '../Base/base-classes'; +/** + * useSyncExternalStore expects us to return a cached or immutable version of the object + * as a result, it tries to be smart and only rerender if the object itself is different (despite our subscription telling it to update) + * this allows us to do a simple compare / snapshot to handle our usage of mutable data with useSyncExternalStore + */ +export declare class SnapshotManager extends Subscribable<{ + thing: 'update'; +}> { + private snapshot; + private getMutable; + private subscribeToMutable; + private updateSnapshot; + constructor(getMutable: () => Data, subscribeToMutable: (callback: () => void) => void); + subscribe: (callback: () => void) => () => void; + getSnapshot: () => Data; +} diff --git a/src/main/webapp/js/model/Startup/snapshot.js b/src/main/webapp/js/model/Startup/snapshot.js new file mode 100644 index 00000000000..c2ab5bbebf5 --- /dev/null +++ b/src/main/webapp/js/model/Startup/snapshot.js @@ -0,0 +1,58 @@ +import { __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import _cloneDeep from 'lodash.clonedeep'; +import _isEqualWith from 'lodash.isequalwith'; +import { Subscribable } from '../Base/base-classes'; +/** + * useSyncExternalStore expects us to return a cached or immutable version of the object + * as a result, it tries to be smart and only rerender if the object itself is different (despite our subscription telling it to update) + * this allows us to do a simple compare / snapshot to handle our usage of mutable data with useSyncExternalStore + */ +var SnapshotManager = /** @class */ (function (_super) { + __extends(SnapshotManager, _super); + function SnapshotManager(getMutable, subscribeToMutable) { + var _this = _super.call(this) || this; + _this.updateSnapshot = function () { + var newSnapshot = _cloneDeep(_this.getMutable()); + if (!_isEqualWith(newSnapshot, _this.snapshot, function (_v1, _v2, key) { + if (key === 'subscriptionsToMe') { + return true; // Ignore the "subscriptionsToMe" field + } + // Perform default comparison for other fields + return undefined; + })) { + _this.snapshot = newSnapshot; + _this._notifySubscribers({ thing: 'update' }); + } + }; + _this.subscribe = function (callback) { + return _this.subscribeTo({ subscribableThing: 'update', callback: callback }); + }; + _this.getSnapshot = function () { + return _this.snapshot; + }; + _this.getMutable = getMutable; + _this.snapshot = _cloneDeep(_this.getMutable()); + _this.subscribeToMutable = subscribeToMutable; + _this.subscribeToMutable(function () { + _this.updateSnapshot(); + }); + return _this; + } + return SnapshotManager; +}(Subscribable)); +export { SnapshotManager }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic25hcHNob3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvU3RhcnR1cC9zbmFwc2hvdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLFVBQVUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN6QyxPQUFPLFlBQVksTUFBTSxvQkFBb0IsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sc0JBQXNCLENBQUE7QUFFbkQ7Ozs7R0FJRztBQUNIO0lBQTJDLG1DQUFpQztJQW1CMUUseUJBQ0UsVUFBc0IsRUFDdEIsa0JBQWtEO1FBRnBELFlBSUUsaUJBQU8sU0FPUjtRQTFCTyxvQkFBYyxHQUFHO1lBQ3ZCLElBQU0sV0FBVyxHQUFHLFVB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JsZVRoaW5nOiAndXBkYXRlJywgY2FsbGJhY2sgfSlcbiAgfVxuICBnZXRTbmFwc2hvdCA9ICgpOiBEYXRhID0+IHtcbiAgICByZXR1cm4gdGhpcy5zbmFwc2hvdFxuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/sources.d.ts b/src/main/webapp/js/model/Startup/sources.d.ts new file mode 100644 index 00000000000..a9fae156422 --- /dev/null +++ b/src/main/webapp/js/model/Startup/sources.d.ts @@ -0,0 +1,18 @@ +import { Subscribable } from '../Base/base-classes'; +import { StartupPayloadType } from './startup.types'; +import { StartupData } from './startup'; +declare class Sources extends Subscribable<{ + thing: 'sources-initialized' | 'sources-update'; +}> { + sources: StartupPayloadType['sources']; + localSourceId: StartupPayloadType['localSourceId']; + harvestedSources: StartupPayloadType['harvestedSources']; + sourcePollInterval: StartupPayloadType['config']['sourcePollInterval']; + disableLocalCatalog: StartupPayloadType['config']['disableLocalCatalog']; + constructor(startupData?: StartupData); + fetchSources: () => void; + startPollingSources: () => void; + updateSources: (sources?: StartupPayloadType['sources']) => void; + setHarvestedSources: (harvestedSources?: string[]) => void; +} +export { Sources }; diff --git a/src/main/webapp/js/model/Startup/sources.hooks.d.ts b/src/main/webapp/js/model/Startup/sources.hooks.d.ts new file mode 100644 index 00000000000..2ccaa5a461f --- /dev/null +++ b/src/main/webapp/js/model/Startup/sources.hooks.d.ts @@ -0,0 +1 @@ +export declare const useSources: () => import("./sources").Sources; diff --git a/src/main/webapp/js/model/Startup/sources.hooks.js b/src/main/webapp/js/model/Startup/sources.hooks.js new file mode 100644 index 00000000000..93d6a63385b --- /dev/null +++ b/src/main/webapp/js/model/Startup/sources.hooks.js @@ -0,0 +1,35 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { StartupDataStore } from './startup'; +import { useSyncExternalStore } from 'react'; +import { SnapshotManager } from './snapshot'; +var subscribe = function (callback) { + var cancelSubscription = StartupDataStore.Sources.subscribeTo({ + subscribableThing: 'sources-update', + callback: callback, + }); + return function () { + cancelSubscription(); + }; +}; +var snapshotManager = new SnapshotManager(function () { + return StartupDataStore.Sources; +}, subscribe); +// I want to be able to pass a subscribe callback, and only update it when the subscribe happens +export var useSources = function () { + var sources = useSyncExternalStore(snapshotManager.subscribe, snapshotManager.getSnapshot); + return sources; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlcy5ob29rcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9TdGFydHVwL3NvdXJjZXMuaG9va3MudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFDNUMsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQzVDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxZQUFZLENBQUE7QUFFNUMsSUFBTSxTQUFTLEdBQUcsVUFBQyxRQUFvQjtJQUNyQyxJQUFNLGtCQUFrQixHQUFHLGdCQUFnQixDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUM7UUFDOUQsaUJBQWlCLEVBQUUsZ0JBQWdCO1FBQ25DLFFBQVEsVUFBQTtLQUNULENBQUMsQ0FBQTtJQUNGLE9BQU87UUFDTCxrQkFBa0IsRUFBRS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2NyaWJlIGhhcHBlbnNcbmV4cG9ydCBjb25zdCB1c2VTb3VyY2VzID0gKCkgPT4ge1xuICBjb25zdCBzb3VyY2VzID0gdXNlU3luY0V4dGVybmFsU3RvcmUoXG4gICAgc25hcHNob3RNYW5hZ2VyLnN1YnNjcmliZSxcbiAgICBzbmFwc2hvdE1hbmFnZXIuZ2V0U25hcHNob3RcbiAgKVxuICByZXR1cm4gc291cmNlc1xufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/sources.js b/src/main/webapp/js/model/Startup/sources.js new file mode 100644 index 00000000000..4d9355ceaa2 --- /dev/null +++ b/src/main/webapp/js/model/Startup/sources.js @@ -0,0 +1,124 @@ +import { __extends, __read, __spreadArray } from "tslib"; +import { Subscribable } from '../Base/base-classes'; +import fetch from '../../../react-component/utils/fetch/fetch'; +function getLocalCatalog(data) { + return (data === null || data === void 0 ? void 0 : data.localSourceId) || 'local'; +} +function getSourcePollInterval(data) { + return (data === null || data === void 0 ? void 0 : data.config.sourcePollInterval) || 60000; +} +function markHarvestedSources(_a) { + var sources = _a.sources, data = _a.data; + sources.forEach(function (source) { + var _a; + source.harvested = (_a = data === null || data === void 0 ? void 0 : data.harvestedSources) === null || _a === void 0 ? void 0 : _a.includes(source.id); + }); +} +function updateSources(_a) { + var data = _a.data, sources = _a.sources; + if (data) { + sources = removeLocalCatalogIfNeeded({ sources: sources, data: data }); + sources = removeCache({ sources: sources }); + markLocalSource({ sources: sources, data: data }); + markHarvestedSources({ sources: sources, data: data }); + sources = sortSources({ sources: sources }); + data.sources = sources; + } +} +function removeLocalCatalogIfNeeded(_a) { + var sources = _a.sources, data = _a.data; + if (data === null || data === void 0 ? void 0 : data.disableLocalCatalog) { + sources = sources.filter(function (source) { return source.id !== getLocalCatalog(data); }); + } + return sources; +} +function removeCache(_a) { + var sources = _a.sources; + return sources.filter(function (source) { return source.id !== 'cache'; }); +} +function markLocalSource(_a) { + var sources = _a.sources, data = _a.data; + var localSource = sources.find(function (source) { return source.id === getLocalCatalog(data); }); + if (localSource) { + localSource.local = true; + } +} +function sortSources(_a) { + var sources = _a.sources; + return sources.sort(function (a, b) { + var aName = a.id.toLowerCase(); + var bName = b.id.toLowerCase(); + var aAvailable = a.available; + var bAvailable = b.available; + if ((aAvailable && bAvailable) || (!aAvailable && !bAvailable)) { + if (aName < bName) { + return -1; + } + if (aName > bName) { + return 1; + } + return 0; + } + else if (!aAvailable) { + return -1; + } + else if (!bAvailable) { + return 1; + } + return 0; + }); +} +var Sources = /** @class */ (function (_super) { + __extends(Sources, _super); + function Sources(startupData) { + var _this = _super.call(this) || this; + _this.sources = []; + _this.localSourceId = 'local'; + _this.harvestedSources = ['local']; + _this.sourcePollInterval = 60000; + _this.disableLocalCatalog = false; + _this.fetchSources = function () { + fetch('./internal/catalog/sources') + .then(function (response) { return response.json(); }) + .then(function (sources) { + _this.updateSources(sources); + }); + }; + _this.startPollingSources = function () { + _this._notifySubscribers({ thing: 'sources-initialized' }); + window.setInterval(function () { + _this.fetchSources(); + }, _this.sourcePollInterval); + }; + _this.updateSources = function (sources) { + if (sources === void 0) { sources = []; } + updateSources({ data: _this, sources: sources }); + _this._notifySubscribers({ thing: 'sources-update' }); + }; + _this.setHarvestedSources = function (harvestedSources) { + if (harvestedSources === void 0) { harvestedSources = []; } + if (_this.sources) { + _this.harvestedSources = + harvestedSources.length > 0 + ? __spreadArray(__spreadArray([], __read(harvestedSources), false), [_this.localSourceId], false) : [_this.localSourceId]; + _this.updateSources(_this.sources); + } + }; + startupData === null || startupData === void 0 ? void 0 : startupData.subscribeTo({ + subscribableThing: 'fetched', + callback: function (startupPayload) { + _this.sources = startupPayload.sources; + _this.localSourceId = startupPayload.localSourceId; + _this.harvestedSources = startupPayload.harvestedSources; + _this.disableLocalCatalog = startupPayload.config.disableLocalCatalog; + _this.sourcePollInterval = getSourcePollInterval(startupPayload); + _this.setHarvestedSources(_this.harvestedSources); + _this.startPollingSources(); + }, + }); + return _this; + } + return Sources; +}(Subscrib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ICB9XG4gIHVwZGF0ZVNvdXJjZXMgPSAoc291cmNlczogU3RhcnR1cFBheWxvYWRUeXBlWydzb3VyY2VzJ10gPSBbXSkgPT4ge1xuICAgIHVwZGF0ZVNvdXJjZXMoeyBkYXRhOiB0aGlzLCBzb3VyY2VzIH0pXG4gICAgdGhpcy5fbm90aWZ5U3Vic2NyaWJlcnMoeyB0aGluZzogJ3NvdXJjZXMtdXBkYXRlJyB9KVxuICB9XG4gIHNldEhhcnZlc3RlZFNvdXJjZXMgPSAoaGFydmVzdGVkU291cmNlczogc3RyaW5nW10gPSBbXSkgPT4ge1xuICAgIGlmICh0aGlzLnNvdXJjZXMpIHtcbiAgICAgIHRoaXMuaGFydmVzdGVkU291cmNlcyA9XG4gICAgICAgIGhhcnZlc3RlZFNvdXJjZXMubGVuZ3RoID4gMFxuICAgICAgICAgID8gWy4uLmhhcnZlc3RlZFNvdXJjZXMsIHRoaXMubG9jYWxTb3VyY2VJZF1cbiAgICAgICAgICA6IFt0aGlzLmxvY2FsU291cmNlSWRdXG4gICAgICB0aGlzLnVwZGF0ZVNvdXJjZXModGhpcy5zb3VyY2VzKVxuICAgIH1cbiAgfVxufVxuXG5leHBvcnQgeyBTb3VyY2VzIH1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/startup.d.ts b/src/main/webapp/js/model/Startup/startup.d.ts new file mode 100644 index 00000000000..06fd93fc80d --- /dev/null +++ b/src/main/webapp/js/model/Startup/startup.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { Subscribable } from '../Base/base-classes'; +import { StartupPayloadType } from './startup.types'; +import { Sources } from './sources'; +import { Configuration } from './configuration'; +import { MetacardDefinitions } from './metacard-definitions'; +export declare class StartupData extends Subscribable<{ + thing: 'fetched'; + args: StartupPayloadType; +}> { + data?: Omit; + Sources: Sources; + Configuration: Configuration; + MetacardDefinitions: MetacardDefinitions; + constructor(); + fetch(): void; +} +export declare const StartupDataStore: StartupData; diff --git a/src/main/webapp/js/model/Startup/startup.hooks.d.ts b/src/main/webapp/js/model/Startup/startup.hooks.d.ts new file mode 100644 index 00000000000..b7a83ab50f6 --- /dev/null +++ b/src/main/webapp/js/model/Startup/startup.hooks.d.ts @@ -0,0 +1 @@ +export declare const useStartupData: () => import("./startup").StartupData; diff --git a/src/main/webapp/js/model/Startup/startup.hooks.js b/src/main/webapp/js/model/Startup/startup.hooks.js new file mode 100644 index 00000000000..b3b1304b871 --- /dev/null +++ b/src/main/webapp/js/model/Startup/startup.hooks.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { StartupDataStore } from './startup'; +import { useSyncExternalStore } from 'react'; +import { SnapshotManager } from './snapshot'; +var subscribe = function (callback) { + var cancelSubscription = StartupDataStore.subscribeTo({ + subscribableThing: 'fetched', + callback: callback, + }); + return function () { + cancelSubscription(); + }; +}; +var snapshotManager = new SnapshotManager(function () { + return StartupDataStore; +}, subscribe); +export var useStartupData = function () { + var startupData = useSyncExternalStore(snapshotManager.subscribe, snapshotManager.getSnapshot); + return startupData; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R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nN0IHN1YnNjcmliZSA9IChjYWxsYmFjazogKCkgPT4gdm9pZCkgPT4ge1xuICBjb25zdCBjYW5jZWxTdWJzY3JpcHRpb24gPSBTdGFydHVwRGF0YVN0b3JlLnN1YnNjcmliZVRvKHtcbiAgICBzdWJzY3JpYmFibGVUaGluZzogJ2ZldGNoZWQnLFxuICAgIGNhbGxiYWNrLFxuICB9KVxuICByZXR1cm4gKCkgPT4ge1xuICAgIGNhbmNlbFN1YnNjcmlwdGlvbigpXG4gIH1cbn1cblxuY29uc3Qgc25hcHNob3RNYW5hZ2VyID0gbmV3IFNuYXBzaG90TWFuYWdlcigoKSA9PiB7XG4gIHJldHVybiBTdGFydHVwRGF0YVN0b3JlXG59LCBzdWJzY3JpYmUpXG5cbmV4cG9ydCBjb25zdCB1c2VTdGFydHVwRGF0YSA9ICgpID0+IHtcbiAgY29uc3Qgc3RhcnR1cERhdGEgPSB1c2VTeW5jRXh0ZXJuYWxTdG9yZShcbiAgICBzbmFwc2hvdE1hbmFnZXIuc3Vic2NyaWJlLFxuICAgIHNuYXBzaG90TWFuYWdlci5nZXRTbmFwc2hvdFxuICApXG4gIHJldHVybiBzdGFydHVwRGF0YVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/startup.js b/src/main/webapp/js/model/Startup/startup.js new file mode 100644 index 00000000000..77849fa5b4f --- /dev/null +++ b/src/main/webapp/js/model/Startup/startup.js @@ -0,0 +1,44 @@ +import { __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { Subscribable } from '../Base/base-classes'; // Import Subscribable from base-classes module +import { Sources } from './sources'; +import fetch from '../../../react-component/utils/fetch/fetch'; +import { Configuration } from './configuration'; +import { MetacardDefinitions } from './metacard-definitions'; +var StartupData = /** @class */ (function (_super) { + __extends(StartupData, _super); + function StartupData() { + var _this = _super.call(this) || this; + _this.Configuration = new Configuration(_this); + _this.Sources = new Sources(_this); + _this.MetacardDefinitions = new MetacardDefinitions(_this); + _this.fetch(); + return _this; + } + StartupData.prototype.fetch = function () { + var _this = this; + fetch('./internal/compose/startup') + .then(function (response) { return response.json(); }) + .then(function (startupPayload) { + _this.data = startupPayload; + _this._notifySubscribers({ thing: 'fetched', args: startupPayload }); + }); + }; + return StartupData; +}(Subscribable)); +export { StartupData }; +export var StartupDataStore = new StartupData(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhcnR1cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9TdGFydHVwL3N0YXJ0dXAudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHNCQUFzQixDQUFBLENBQUMsK0NBQStDO0FBRW5HLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFDbkMsT0FBTyxLQUFLLE1BQU0sNENBQTRDLENBQUE7QUFDOUQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGlCQUFpQixDQUFBO0FBQy9DLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBRTVEO0lBQWlDLCtCQUcvQjtJQWVBO1FBQUEsWUFDRSxpQkFBTyxTQUtSO1FBSkMsS0FBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLGFBQWEsQ0FBQyxLQ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5qc29uKCkpXG4gICAgICAudGhlbigoc3RhcnR1cFBheWxvYWQ6IFN0YXJ0dXBQYXlsb2FkVHlwZSkgPT4ge1xuICAgICAgICB0aGlzLmRhdGEgPSBzdGFydHVwUGF5bG9hZFxuICAgICAgICB0aGlzLl9ub3RpZnlTdWJzY3JpYmVycyh7IHRoaW5nOiAnZmV0Y2hlZCcsIGFyZ3M6IHN0YXJ0dXBQYXlsb2FkIH0pXG4gICAgICB9KVxuICB9XG59XG5cbmV4cG9ydCBjb25zdCBTdGFydHVwRGF0YVN0b3JlID0gbmV3IFN0YXJ0dXBEYXRhKClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Startup/startup.types.d.ts b/src/main/webapp/js/model/Startup/startup.types.d.ts new file mode 100644 index 00000000000..ab822473e8d --- /dev/null +++ b/src/main/webapp/js/model/Startup/startup.types.d.ts @@ -0,0 +1,346 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { DataTypesConfiguration } from '../../../component/datatypes/datatypes'; +export type AttributeTypes = 'BINARY' | 'DATE' | 'LOCATION' | 'GEOMETRY' | 'LONG' | 'DOUBLE' | 'FLOAT' | 'INTEGER' | 'SHORT' | 'STRING' | 'BOOLEAN' | 'XML' | 'OBJECT'; +export type AttributeDefinitionType = { + id: string; + isInjected: boolean; + multivalued: boolean; + type: AttributeTypes; + alias?: string; + enumerations?: string[]; + deprecatedEnumerations?: string[]; + hidden?: boolean; + required?: boolean; +}; +export type AttributeMapType = { + [key: string]: AttributeDefinitionType; +}; +export type MetacardDefinitionType = AttributeMapType; +export type MetacardDefinitionsType = { + [key: string]: MetacardDefinitionType; +}; +export type SearchResultAttributeDefinitionType = { + format: AttributeTypes; + indexed: boolean; + multivalued: boolean; +}; +export type SearchResultAttributeMap = { + [key: string]: SearchResultAttributeDefinitionType; +}; +export type SearchResultMetacardDefinitionType = SearchResultAttributeMap; +export type SortedAttributesType = Array; +export interface ImageryProvider { + type: string; + url: string; + parameters: { + format?: string; + transparent?: boolean; + imageSize?: number[]; + }; + alpha: number; + name: string; + show: boolean; + proxyEnabled: boolean; + order: number; +} +export interface IconConfig { + [key: string]: { + code: string; + size: string; + className: string; + font: string; + }; +} +export interface VisualizationType { + type: string; + title: string; + content: { + type: string; + title: string; + width: number; + content: { + type: string; + component: string; + componentName: string; + title: string; + }[]; + }[]; +} +export interface UIConfigType { + mapHome: string; + resultCount: number; + showLogo: boolean; + relevancePrecision: number; + attributeDescriptions: Record; + basicSearchTemporalSelectionDefault: string[]; + branding: string; + basicSearchMatchType: string; + onlineGazetteer: boolean; + imageryProviders: ImageryProvider[]; + requiredExportAttributes: string[]; + exportMetacardFormatOptions: string[]; + exportMetacardsFormatOptions: string[]; + isCacheDisabled: boolean; + isCustomTextNotationEnabled: boolean; + isVersioningEnabled: boolean; + isSpellcheckEnabled: boolean; + attributeSuggestionList: any[]; + summaryShow: string[]; + readOnly: string[]; + version: string; + commonAttributes: string[]; + i18n: Record; + customTextNotationAttribute: string; + isExperimental: boolean; + sourcePollInterval: number; + requiredAttributes: any[]; + scheduleFrequencyList: number[]; + defaultSources: any[]; + terrainProvider: { + type: string; + url: string; + }; + topLeftLogoSrc: string; + hiddenAttributes: string[]; + timeout: number; + attributeAliases: Record; + iconConfig: IconConfig; + enums: Record; + extra: { + [key: string]: any; + datatypes?: DataTypesConfiguration; + resourceSizeIdentifiers?: string[]; + }; + editorAttributes: string[]; + resultShow: string[]; + disableUnknownErrorBox: boolean; + isFuzzyResultsEnabled: boolean; + theme: string; + projection: string; + defaultLayout: VisualizationType[]; + webSocketsEnabled: boolean; + showRelevanceScores: boolean; + menuIconSrc: string; + product: string; + typeNameMapping: Record; + visualizations: VisualizationType[]; + landingPageBackgroundSrc: string; + bottomLeftBackgroundSrc: string; + gazetteer: boolean; + isPhoneticsEnabled: boolean; + helpUrl: string; + customBranding: string; + defaultTableColumns: string[]; + exportResultLimit: number; + bingKey: string; + bottomLeftLogoSrc: string; + useHyphensInUuid: boolean; + disableLocalCatalog: boolean; +} +export type localSourceIdType = string; +export type platformConfigType = { + productImage: string; + color?: string; + footer?: string; + background?: string; + vendorImage: string; + favIcon: string; + header?: string; + title: string; + version: string; + timeout: number; + systemUsageMessage?: string; + systemUsageOncePerSession?: boolean; + systemUsageTitle?: string; +}; +type SourceType = { + sourceActions: any[]; + available: boolean; + id: string; + contentTypes: Array<{ + name: string; + version: string; + }>; + version: string; + local?: boolean; + harvested?: boolean; +}; +type SourcesType = Array; +interface PreferencesType { + id: string; + resultDisplay: string; + resultPreview: string[]; + 'inspector-hideEmpty': boolean; + 'inspector-summaryShown': any[]; + 'inspector-summaryOrder': any[]; + 'inspector-detailsOrder': string[]; + 'inspector-detailsHidden': any[]; + 'results-attributesShownTable': any[]; + 'results-attributesShownList': any[]; + homeFilter: string; + homeSort: string; + homeDisplay: string; + decimalPrecision: number; + alertPersistence: boolean; + alertExpiration: number; + visualization: string; + columnHide: any[]; + columnOrder: string[]; + columnWidths: any[]; + hasSelectedColumns: boolean; + oauth: any[]; + fontSize: number; + dateTimeFormat: { + datetimefmt: string; + timefmt: string; + }; + timeZone: string; + coordinateFormat: string; + autoPan: boolean; + goldenLayout: { + settings: { + hasHeaders: boolean; + constrainDragToContainer: boolean; + reorderEnabled: boolean; + selectionEnabled: boolean; + popoutWholeStack: boolean; + blockedPopoutsThrowError: boolean; + closePopoutsOnUnload: boolean; + showPopoutIcon: boolean; + showMaximiseIcon: boolean; + showCloseIcon: boolean; + responsiveMode: string; + }; + dimensions: { + borderWidth: number; + minItemHeight: number; + minItemWidth: number; + headerHeight: number; + dragProxyWidth: number; + dragProxyHeight: number; + }; + labels: { + close: string; + maximise: string; + minimise: string; + popout: string; + popin: string; + tabDropdown: string; + }; + content: any[]; + isClosable: boolean; + reorderEnabled: boolean; + title: string; + openPopouts: any[]; + }; + animation: boolean; + hoverPreview: boolean; + layoutId: string; + mapLayers: { + type: string; + url: string; + parameters: { + format?: string; + transparent?: boolean; + imageSize?: number[]; + }; + alpha: number; + name: string; + show: boolean; + proxyEnabled: boolean; + order: number; + label: string; + id: string; + }[]; + alerts: any[]; + uploads: { + unseen: boolean; + percentage: number; + errors: number; + successes: number; + complete: number; + amount: number; + issues: number; + sending: boolean; + finished: boolean; + interrupted: boolean; + sentAt: number; + id: string; + uploads: { + file: { + upload: { + progress: number; + total: number; + bytesSent: number; + }; + status: string; + accepted: boolean; + processing: boolean; + xhr: object; + }; + id: string; + percentage: number; + sending: boolean; + success: boolean; + error: boolean; + message: string; + validating: boolean; + issues: boolean; + }[]; + }[]; + theme: { + palette: string; + theme: string; + }; + querySettings: { + type: string; + sources: string[]; + sorts: { + attribute: string; + direction: string; + }[]; + spellcheck: boolean; + phonetics: boolean; + additionalOptions?: string; + }; +} +export type UserType = { + email: string; + isGuest: boolean; + preferences: PreferencesType; + roles: Array; + userid: string; + username: string; +}; +export type StartupPayloadType = { + attributeMap: AttributeMapType; + config: UIConfigType; + localSourceId: localSourceIdType; + metacardTypes: MetacardDefinitionsType; + platformUiConfiguration: platformConfigType; + sortedAttributes: SortedAttributesType; + sources: SourcesType; + user: UserType; + harvestedSources: string[]; +}; +export type DatatypeQueryMap = { + datatype: string; + attributes: { + name: string; + values: string[]; + }[]; +}; +export {}; diff --git a/src/main/webapp/js/model/Startup/startup.types.js b/src/main/webapp/js/model/Startup/startup.types.js new file mode 100644 index 00000000000..71ef4155c34 --- /dev/null +++ b/src/main/webapp/js/model/Startup/startup.types.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhcnR1cC50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9TdGFydHVwL3N0YXJ0dXAudHlwZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUkiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVT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vdXQ6IHtcbiAgICBzZXR0aW5nczoge1xuICAgICAgaGFzSGVhZGVyczogYm9vbGVhblxuICAgICAgY29uc3RyYWluRHJhZ1RvQ29udGFpbmVyOiBib29sZWFuXG4gICAgICByZW9yZGVyRW5hYmxlZDogYm9vbGVhblxuICAgICAgc2VsZWN0aW9uRW5hYmxlZDogYm9vbGVhblxuICAgICAgcG9wb3V0V2hvbGVTdGFjazogYm9vbGVhblxuICAgICAgYmxvY2tlZFBvcG91dHNUaHJvd0Vycm9yOiBib29sZWFuXG4gICAgICBjbG9zZVBvcG91dHNPblVubG9hZDogYm9vbGVhblxuICAgICAgc2hvd1BvcG91dEljb246IGJvb2xlYW5cbiAgICAgIHNob3dNYXhpbWlzZUljb246IGJvb2xlYW5cbiAgICAgIHNob3dDbG9zZUljb246IGJvb2xlYW5cbiAgICAgIHJlc3BvbnNpdmVNb2RlOiBzdHJpbmdcbiAgICB9XG4gICAgZGltZW5zaW9uczoge1xuICAgICAgYm9yZGVyV2lkdGg6IG51bWJlclxuICAgICAgbWluSXRlbUhlaWdodDogbnVtYmVyXG4gICAgICBtaW5JdGVtV2lkdGg6IG51bWJlclxuICAgICAgaGVhZGVySGVpZ2h0OiBudW1iZXJcbiAgICAgIGRyYWdQcm94eVdpZHRoOiBudW1iZXJcbiAgICAgIGRyYWdQcm94eUhlaWdodDogbnVtYmVyXG4gICAgfVxuICAgIGxhYmVsczoge1xuICAgICAgY2xvc2U6IHN0cmluZ1xuICAgICAgbWF4aW1pc2U6IHN0cmluZ1xuICAgICAgbWluaW1pc2U6IHN0cmluZ1xuICAgICAgcG9wb3V0OiBzdHJpbmdcbiAgICAgIHBvcGluOiBzdHJpbmdcbiAgICAgIHRhYkRyb3Bkb3duOiBzdHJpbmdcbiAgICB9XG4gICAgY29udGVudDogYW55W11cbiAgICBpc0Nsb3NhYmxlOiBib29sZWFuXG4gICAgcmVvcmRlckVuYWJsZWQ6IGJvb2xlYW5cbiAgICB0aXRsZTogc3RyaW5nXG4gICAgb3BlblBvcG91dHM6IGFueVtdXG4gIH1cbiAgYW5pbWF0aW9uOiBib29sZWFuXG4gIGhvdmVyUHJldmlldzogYm9vbGVhblxuICBsYXlvdXRJZDogc3RyaW5nXG4gIG1hcExheWVyczoge1xuICAgIHR5cGU6IHN0cmluZ1xuICAgIHVybDogc3RyaW5nXG4gICAgcGFyYW1ldGVyczoge1xuICAgICAgZm9ybWF0Pzogc3RyaW5nXG4gICAgICB0cmFuc3BhcmVudD86IGJvb2xlYW5cbiAgICAgIGltYWdlU2l6ZT86IG51bWJlcltdXG4gICAgfVxuICAgIGFscGhhOiBudW1iZXJcbiAgICBuYW1lOiBzdHJpbmdcbiAgICBzaG93OiBib29sZWFuXG4gICAgcHJveHlFbmFibGVkOiBib29sZWFuXG4gICAgb3JkZXI6IG51bWJlclxuICAgIGxhYmVsOiBzdHJpbmdcbiAgICBpZDogc3RyaW5nXG4gIH1bXVxuICBhbGVydHM6IGFueVtdXG4gIHVwbG9hZHM6IHtcbiAgICB1bnNlZW46IGJvb2xlYW5cbiAgICBwZXJjZW50YWdlOiBudW1iZXJcbiAgICBlcnJvcnM6IG51bWJlclxuICAgIHN1Y2Nlc3NlczogbnVtYmVyXG4gICAgY29tcGxldGU6IG51bWJlclxuICAgIGFtb3VudDogbnVtYmVyXG4gICAgaXNzdWVzOiBudW1iZXJcbiAgICBzZW5kaW5nOiBib29sZWFuXG4gICAgZmluaXNoZWQ6IGJvb2xlYW5cbiAgICBpbnRlcnJ1cHRlZDogYm9vbGVhblxuICAgIHNlbnRBdDogbnVtYmVyXG4gICAgaWQ6IHN0cmluZ1xuICAgIHVwbG9hZHM6IHtcbiAgICAgIGZpbGU6IHtcbiAgICAgICAgdXBsb2FkOiB7XG4gICAgICAgICAgcHJvZ3Jlc3M6IG51bWJlclxuICAgICAgICAgIHRvdGFsOiBudW1iZXJcbiAgICAgICAgICBieXRlc1NlbnQ6IG51bWJlclxuICAgICAgICB9XG4gICAgICAgIHN0YXR1czogc3RyaW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AgbG9jYWxTb3VyY2VJZDogbG9jYWxTb3VyY2VJZFR5cGVcbiAgbWV0YWNhcmRUeXBlczogTWV0YWNhcmREZWZpbml0aW9uc1R5cGVcbiAgcGxhdGZvcm1VaUNvbmZpZ3VyYXRpb246IHBsYXRmb3JtQ29uZmlnVHlwZVxuICBzb3J0ZWRBdHRyaWJ1dGVzOiBTb3J0ZWRBdHRyaWJ1dGVzVHlwZVxuICBzb3VyY2VzOiBTb3VyY2VzVHlwZVxuICB1c2VyOiBVc2VyVHlwZVxuICBoYXJ2ZXN0ZWRTb3VyY2VzOiBzdHJpbmdbXVxufVxuXG5leHBvcnQgdHlwZSBEYXRhdHlwZVF1ZXJ5TWFwID0ge1xuICBkYXRhdHlwZTogc3RyaW5nXG4gIGF0dHJpYnV0ZXM6IHtcbiAgICBuYW1lOiBzdHJpbmdcbiAgICB2YWx1ZXM6IHN0cmluZ1tdXG4gIH1bXVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/TypedQuery.d.ts b/src/main/webapp/js/model/TypedQuery.d.ts new file mode 100644 index 00000000000..93a5586c8bd --- /dev/null +++ b/src/main/webapp/js/model/TypedQuery.d.ts @@ -0,0 +1,71 @@ +/// +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { Dispatch, SetStateAction } from 'react'; +import { FilterBuilderClass } from '../../component/filter-builder/filter.structure'; +import { QueryAttributesType, SortType } from './Query.shared-types'; +import { QueryType } from './Query'; +/** + * Mainly used by lazy query results, since it gets passed a function that adds in the query ref for it + */ +export type TransformSortsComposedFunctionType = ({ originalSorts, }: { + originalSorts: SortType[]; +}) => SortType[]; +export type TransformSortsFunctionType = ({ originalSorts, queryRef, }: { + originalSorts: SortType[]; + queryRef: Backbone.Model; +}) => SortType[]; +export type QueryOptions = { + /** + * Pass a function that returns the defaults to use + */ + transformDefaults?: ({ originalDefaults, queryRef, }: { + originalDefaults: QueryAttributesType; + queryRef: Backbone.Model; + }) => QueryAttributesType; + /** + * Pass a function that returns the cql given a filter tree, allowing such things as mixing in ephemeral filters + */ + transformFilterTree?: ({ originalFilterTree, queryRef, }: { + originalFilterTree: FilterBuilderClass; + queryRef: Backbone.Model; + }) => string; + /** + * Pass a function that returns the sorts to use, allowing such things as substituting ephemeral sorts + */ + transformSorts?: TransformSortsFunctionType; + transformCount?: ({ originalCount, queryRef, }: { + originalCount: number; + queryRef: Backbone.Model; + }) => number; + limitToDeleted?: boolean; + limitToHistoric?: boolean; + additionalOptions?: any; +}; +export declare const DEFAULT_QUERY_OPTIONS: Readonly>; +export declare const Query: (attributes?: QueryAttributesType, options?: QueryOptions) => any; +export declare const DEFAULT_USER_QUERY_OPTIONS: Readonly>; +/** + * This should be used in place of useUserQuery _only_ if you do not intend to listen to changes to user prefs. + */ +export declare const UserQuery: (attributes?: QueryAttributesType, options?: QueryOptions) => any; +export declare const useQuery: ({ attributes, options, }?: { + attributes?: QueryAttributesType | undefined; + options?: QueryOptions | undefined; +}) => [QueryType, Dispatch>]; +export declare const useUserQuery: ({ attributes, options, }?: { + attributes?: QueryAttributesType | undefined; + options?: QueryOptions | undefined; +}) => [QueryType, Dispatch>]; diff --git a/src/main/webapp/js/model/TypedQuery.js b/src/main/webapp/js/model/TypedQuery.js new file mode 100644 index 00000000000..5428e3c0c41 --- /dev/null +++ b/src/main/webapp/js/model/TypedQuery.js @@ -0,0 +1,112 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { FilterBuilderClass } from '../../component/filter-builder/filter.structure'; +import { useListenTo } from '../../component/selection-checkbox/useBackbone.hook'; +import { TypedUserInstance } from '../../component/singletons/TypedUser'; +import cql from '../cql'; +import UntypedQuery from './Query'; +export var DEFAULT_QUERY_OPTIONS = { + transformDefaults: function (_a) { + var originalDefaults = _a.originalDefaults; + return originalDefaults; + }, + transformFilterTree: function (_a) { + var originalFilterTree = _a.originalFilterTree; + return cql.write(originalFilterTree); + }, + transformCount: function (_a) { + var originalCount = _a.originalCount; + return originalCount; + }, + transformSorts: function (_a) { + var originalSorts = _a.originalSorts; + return originalSorts; + }, + limitToHistoric: false, + limitToDeleted: false, + additionalOptions: undefined, +}; +export var Query = function (attributes, options) { + var mergedOptions = __assign(__assign({}, DEFAULT_QUERY_OPTIONS), options); + return new UntypedQuery(attributes, mergedOptions); +}; +function mixinEphemeralFilter(originalCQL) { + var ephemeralFilter = TypedUserInstance.getEphemeralFilter(); + try { + if (ephemeralFilter) { + return new FilterBuilderClass({ + filters: [ephemeralFilter, originalCQL], + type: 'AND', + }); + } + else { + return originalCQL; + } + } + catch (err) { + console.error(err); + return originalCQL; + } +} +export var DEFAULT_USER_QUERY_OPTIONS = { + transformDefaults: function (_a) { + var originalDefaults = _a.originalDefaults; + return __assign(__assign(__assign({}, originalDefaults), TypedUserInstance.getQuerySettingsJSON()), { count: TypedUserInstance.getResultCount() }); + }, + transformFilterTree: function (_a) { + var originalFilterTree = _a.originalFilterTree; + return cql.write(mixinEphemeralFilter(originalFilterTree)); + }, + transformSorts: function (_a) { + var originalSorts = _a.originalSorts; + return TypedUserInstance.getEphemeralSorts() || originalSorts; + }, + transformCount: function (_a) { + var originalCount = _a.originalCount; + return TypedUserInstance.getResultCount() || originalCount; + }, + limitToDeleted: false, + limitToHistoric: false, + additionalOptions: undefined, +}; +/** + * This should be used in place of useUserQuery _only_ if you do not intend to listen to changes to user prefs. + */ +export var UserQuery = function (attributes, options) { + var mergedOptions = __assign(__assign({}, DEFAULT_USER_QUERY_OPTIONS), options); + return Query(attributes, mergedOptions); +}; +export var useQuery = function (_a) { + var _b = _a === void 0 ? {} : _a, attributes = _b.attributes, options = _b.options; + var _c = __read(React.useState(Query(attributes, options)), 2), query = _c[0], setQuery = _c[1]; + return [query, setQuery]; +}; +export var useUserQuery = function (_a) { + var _b = _a === void 0 ? {} : _a, attributes = _b.attributes, options = _b.options; + var _c = __read(React.useState(UserQuery(attributes, options)), 2), query = _c[0], setQuery = _c[1]; + useListenTo(TypedUserInstance.getPreferences(), 'change:resultCount', function () { + query.set('count', TypedUserInstance.getResultCount()); + }); + useListenTo(TypedUserInstance.getPreferences(), 'change:resultFilter', function () { + query.startSearchFromFirstPage(); + }); + useListenTo(TypedUserInstance.getPreferences(), 'change:resultSort', function () { + query.startSearchFromFirstPage(); + }); + return [query, setQuery]; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHlwZWRRdWVyeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9UeXBlZFF1ZXJ5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBbUMsTUFBTSxPQUFPLENBQUE7QUFDdkQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0saURBQWlELENBQUE7QUFDcEYsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFEQUFxRCxDQUFBO0FBQ2pGLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHNDQ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n06IHtcbiAgYXR0cmlidXRlcz86IFF1ZXJ5QXR0cmlidXRlc1R5cGVcbiAgb3B0aW9ucz86IFF1ZXJ5T3B0aW9uc1xufSA9IHt9KTogW1F1ZXJ5VHlwZSwgRGlzcGF0Y2g8U2V0U3RhdGVBY3Rpb248UXVlcnlUeXBlPj5dID0+IHtcbiAgY29uc3QgW3F1ZXJ5LCBzZXRRdWVyeV0gPSBSZWFjdC51c2VTdGF0ZShVc2VyUXVlcnkoYXR0cmlidXRlcywgb3B0aW9ucykpXG4gIHVzZUxpc3RlblRvKFR5cGVkVXNlckluc3RhbmNlLmdldFByZWZlcmVuY2VzKCksICdjaGFuZ2U6cmVzdWx0Q291bnQnLCAoKSA9PiB7XG4gICAgcXVlcnkuc2V0KCdjb3VudCcsIFR5cGVkVXNlckluc3RhbmNlLmdldFJlc3VsdENvdW50KCkpXG4gIH0pXG4gIHVzZUxpc3RlblRvKFR5cGVkVXNlckluc3RhbmNlLmdldFByZWZlcmVuY2VzKCksICdjaGFuZ2U6cmVzdWx0RmlsdGVyJywgKCkgPT4ge1xuICAgIHF1ZXJ5LnN0YXJ0U2VhcmNoRnJvbUZpcnN0UGFnZSgpXG4gIH0pXG4gIHVzZUxpc3RlblRvKFR5cGVkVXNlckluc3RhbmNlLmdldFByZWZlcmVuY2VzKCksICdjaGFuZ2U6cmVzdWx0U29ydCcsICgpID0+IHtcbiAgICBxdWVyeS5zdGFydFNlYXJjaEZyb21GaXJzdFBhZ2UoKVxuICB9KVxuICByZXR1cm4gW3F1ZXJ5LCBzZXRRdWVyeV1cbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/Types.d.ts b/src/main/webapp/js/model/Types.d.ts new file mode 100644 index 00000000000..a0f446d119c --- /dev/null +++ b/src/main/webapp/js/model/Types.d.ts @@ -0,0 +1,49 @@ +export type ResultType = { + actions: ActionType[]; + distance: null; + hasThumbnail: boolean; + isResourceLocal: boolean; + matches: {}; + metacard: MetacardType; + relevance: number; + metacardType: string; + id: string; +}; +type MetacardType = { + cached: string; + properties: MetacardPropertiesType; + id: string; +}; +export type MetacardPropertiesType = { + id: string; + title: string; + 'metacard.deleted.id'?: string; + 'metacard.deleted.version'?: string; + 'metacard.deleted.date'?: string; + 'metacard.deleted.tags'?: string[]; + 'metacard.owner': string; + description: string; + created: string; + modified: string; + 'security.access-individuals'?: string[]; + 'security.access-individuals-read'?: string[]; + 'security.access-groups'?: string[]; + 'security.access-groups-read'?: string[]; + sorts?: string[] | { + attribute: string; + direction: string; + }[]; + [key: string]: any; +}; +type ActionType = { + description: string; + displayName: string; + id: string; + title: string; + url: string; +}; +export type MetacardAttribute = { + attribute: string; + values: any; +}; +export {}; diff --git a/src/main/webapp/js/model/Types.js b/src/main/webapp/js/model/Types.js new file mode 100644 index 00000000000..ef1d37e18b9 --- /dev/null +++ b/src/main/webapp/js/model/Types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvVHlwZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBSZXN1bHRUeXBlID0ge1xuICBhY3Rpb25zOiBBY3Rpb25UeXBlW11cbiAgZGlzdGFuY2U6IG51bGxcbiAgaGFzVGh1bWJuYWlsOiBib29sZWFuXG4gIGlzUmVzb3VyY2VMb2NhbDogYm9vbGVhblxuICBtYXRjaGVzOiB7fVxuICBtZXRhY2FyZDogTWV0YWNhcmRUeXBlXG4gIHJlbGV2YW5jZTogbnVtYmVyXG4gIG1ldGFjYXJkVHlwZTogc3RyaW5nXG4gIGlkOiBzdHJpbmdcbn1cblxudHlwZSBNZXRhY2FyZFR5cGUgPSB7XG4gIGNhY2hlZDog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gIGF0dHJpYnV0ZTogc3RyaW5nXG4gIHZhbHVlczogYW55XG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/Upload.d.ts b/src/main/webapp/js/model/Upload.d.ts new file mode 100644 index 00000000000..a7e9da125c6 --- /dev/null +++ b/src/main/webapp/js/model/Upload.d.ts @@ -0,0 +1,3 @@ +import '../jquery.whenAll'; +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/Upload.js b/src/main/webapp/js/model/Upload.js new file mode 100644 index 00000000000..714c282850e --- /dev/null +++ b/src/main/webapp/js/model/Upload.js @@ -0,0 +1,168 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import $ from 'jquery'; +import fetch from '../../react-component/utils/fetch'; +import '../jquery.whenAll'; +function fileMatches(file, model) { + return file === model.get('file'); +} +function checkValidation(model) { + if (model.get('id')) { + model.set('validating', true); + //wait for solr + setTimeout(function () { + ; + $.whenAll + .apply(this, [ + fetch('./internal/metacard/' + model.get('id') + '/attribute/validation') + .then(function (response) { return response.json(); }) + .then(function (response) { + model.set({ + issues: model.get('issues') || response.length > 0, + }); + }), + fetch('./internal/metacard/' + model.get('id') + '/validation') + .then(function (response) { return response.json(); }) + .then(function (response) { + model.set({ + issues: model.get('issues') || response.length > 0, + }); + }), + ]) + .always(function () { + model.set({ + validating: false, + }); + }); + }, 2000); + } +} +export default Backbone.Model.extend({ + options: undefined, + defaults: function () { + return { + id: undefined, + children: undefined, + result: undefined, + file: undefined, + percentage: 0, + sending: false, + success: false, + error: false, + message: '', + validating: false, + issues: false, + }; + }, + bindCallbacks: function () { + this.handleUploadProgress = this.handleUploadProgress.bind(this); + this.handleSending = this.handleSending.bind(this); + this.handleSuccess = this.handleSuccess.bind(this); + this.handleError = this.handleError.bind(this); + this.handleComplete = this.handleComplete.bind(this); + this.handleQueueComplete = this.handleQueueComplete.bind(this); + }, + // @ts-expect-error ts-migrate(6133) FIXME: 'attributes' is declared but its value is never re... Remove this comment to see the full error message + initialize: function (attributes, options) { + this.bindCallbacks(); + this.options = options; + this.setupDropzoneListeners(); + }, + setupDropzoneListeners: function () { + if (this.options.dropzone) { + this.options.dropzone.on('sending', this.handleSending); + this.options.dropzone.on('uploadprogress', this.handleUploadProgress); + this.options.dropzone.on('error', this.handleError); + this.options.dropzone.on('success', this.handleSuccess); + this.options.dropzone.on('complete', this.handleComplete); + this.options.dropzone.on('queuecomplete', this.handleQueueComplete); + } + }, + handleSending: function (file) { + if (fileMatches(file, this)) { + this.set({ + sending: true, + }); + } + }, + handleUploadProgress: function (file, percentage) { + if (fileMatches(file, this)) { + this.set('percentage', percentage); + } + }, + handleError: function (file) { + if (fileMatches(file, this)) { + var message = file.name + ' could not be uploaded successfully.'; + this.set({ + error: true, + message: message, + }); + } + }, + hasChildren: function () { + return this.get('children') && this.get('children').length > 1; + }, + handleQueueComplete: function () { + var _this = this; + // https://github.com/enyo/dropzone/blob/v4.3.0/dist/dropzone.js#L56 + // if we remove callbacks too early this loop will fail, look to see if updating to latest fixes this + setTimeout(function () { + _this.unlistenToDropzone(); + }, 0); + }, + unlistenToDropzone: function () { + this.options.dropzone.off('sending', this.handleSending); + this.options.dropzone.off('queuecomplete', this.handleQueueComplete); + this.options.dropzone.off('uploadprogress', this.handleUploadProgress); + this.options.dropzone.off('success', this.handleSuccess); + this.options.dropzone.off('error', this.handleError); + this.options.dropzone.off('complete', this.handleComplete); + }, + handleSuccess: function (file) { + if (fileMatches(file, this)) { + var message = "".concat(file.name, " uploaded successfully."); + var addedIdsHeader = file.xhr.getResponseHeader('added-ids'); + var children = addedIdsHeader ? addedIdsHeader.split(',') : undefined; + if (children && children.length > 1) { + message += " ".concat(children.length, " items found."); + } + this.set({ + id: file.xhr.getResponseHeader('id'), + children: children, + success: true, + message: message, + }); + checkValidation(this); + } + }, + handleComplete: function (file) { + if (fileMatches(file, this) && file.status === 'canceled') { + this.collection.remove(this); + } + }, + checkValidation: function () { + checkValidation(this); + }, + cancel: function () { + if (this.options.dropzone) { + this.options.dropzone.removeFile(this.get('file')); + if (this.collection) { + this.collection.remove(this); + } + } + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXBsb2FkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL2pzL21vZGVsL1VwbG9hZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxRQUFRLE1BQU0sVUFBVSxDQUFBO0FBQy9CLE9BQU8sQ0FBQyxNQUFNLFFBQVEsQ0FBQTtBQUN0QixPQUFPLEtBQUssTUFBTSxtQ0FBbUMsQ0FBQTtBQUNyRCxPQUFPLG1CQUFtQixDQUFBO0FBQzFCLFNBQVMsV0FBVyxDQUFDLElBQVMsRUFBRSxLQUFVO0lBQ3hDLE9BQU8sSUFBSSxLQUFLLEtBQUssQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUE7QUFDbkMsQ0FBQztBQUNELFNBQVMsZUFBZSxDQUFDLEtBQVU7SUFDakMsSUFBSSxLQUFLLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxFQUFFO1FBQ25CLEtBQUssQ0FBQyxHQUFHLENBQUMsWUFBWSxFQUFFLElBQUksQ0FBQyxDQUFBO1FBQzdCLGVBQWU7UUFDZixVQUFVLENBQUM7WUFDVCxDQUFDO1lBQUMsQ0FBUyxDQUFDLE9BQU87aUJBQ2hCLE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6IGFueSwgbW9kZWw6IGFueSkge1xuICByZXR1cm4gZmlsZSA9PT0gbW9kZWwuZ2V0KCdmaWxlJylcbn1cbmZ1bmN0aW9uIGNoZWNrVmFsaWRhdGlvbihtb2RlbDogYW55KSB7XG4gIGlmIChtb2RlbC5nZXQoJ2lkJykpIHtcbiAgICBtb2RlbC5zZXQoJ3ZhbGlkYXRpbmcnLCB0cnVlKVxuICAgIC8vd2FpdCBmb3Igc29sclxuICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKHRoaXM6IGFueSkge1xuICAgICAgOygkIGFzIGFueSkud2hlbkFsbFxuICAgICAgICAuYXBwbHkodGhpcywgW1xuICAgICAgICAgIGZldGNoKFxuICAgICAgICAgICAgJy4vaW50ZXJuYWwvbWV0YWNhcmQvJyArIG1vZGVsLmdldCgnaWQnKSArICcvYXR0cmlidXRlL3ZhbGlkYXRpb24nXG4gICAgICAgICAgKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiByZXNwb25zZS5qc29uKCkpXG4gICAgICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgbW9kZWwuc2V0KHtcbiAgICAgICAgICAgICAgICBpc3N1ZXM6IG1vZGVsLmdldCgnaXNzdWVzJykgfHwgcmVzcG9uc2UubGVuZ3RoID4gMCxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgIGZldGNoKCcuL2ludGVybmFsL21ldGFjYXJkLycgKyBtb2RlbC5nZXQoJ2lkJykgKyAnL3ZhbGlkYXRpb24nKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiByZXNwb25zZS5qc29uKCkpXG4gICAgICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgbW9kZWwuc2V0KHtcbiAgICAgICAgICAgICAgICBpc3N1ZXM6IG1vZGVsLmdldCgnaXNzdWVzJykgfHwgcmVzcG9uc2UubGVuZ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ZWRJZHNIZWFkZXIuc3BsaXQoJywnKSA6IHVuZGVmaW5lZFxuICAgICAgaWYgKGNoaWxkcmVuICYmIGNoaWxkcmVuLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgbWVzc2FnZSArPSBgICR7Y2hpbGRyZW4ubGVuZ3RofSBpdGVtcyBmb3VuZC5gXG4gICAgICB9XG4gICAgICB0aGlzLnNldCh7XG4gICAgICAgIGlkOiBmaWxlLnhoci5nZXRSZXNwb25zZUhlYWRlcignaWQnKSxcbiAgICAgICAgY2hpbGRyZW4sXG4gICAgICAgIHN1Y2Nlc3M6IHRydWUsXG4gICAgICAgIG1lc3NhZ2UsXG4gICAgICB9KVxuICAgICAgY2hlY2tWYWxpZGF0aW9uKHRoaXMpXG4gICAgfVxuICB9LFxuICBoYW5kbGVDb21wbGV0ZShmaWxlOiBhbnkpIHtcbiAgICBpZiAoZmlsZU1hdGNoZXMoZmlsZSwgdGhpcykgJiYgZmlsZS5zdGF0dXMgPT09ICdjYW5jZWxlZCcpIHtcbiAgICAgIHRoaXMuY29sbGVjdGlvbi5yZW1vdmUodGhpcylcbiAgICB9XG4gIH0sXG4gIGNoZWNrVmFsaWRhdGlvbigpIHtcbiAgICBjaGVja1ZhbGlkYXRpb24odGhpcylcbiAgfSxcbiAgY2FuY2VsKCkge1xuICAgIGlmICh0aGlzLm9wdGlvbnMuZHJvcHpvbmUpIHtcbiAgICAgIHRoaXMub3B0aW9ucy5kcm9wem9uZS5yZW1vdmVGaWxlKHRoaXMuZ2V0KCdmaWxlJykpXG4gICAgICBpZiAodGhpcy5jb2xsZWN0aW9uKSB7XG4gICAgICAgIHRoaXMuY29sbGVjdGlvbi5yZW1vdmUodGhpcylcbiAgICAgIH1cbiAgICB9XG4gIH0sXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/js/model/UploadBatch.d.ts b/src/main/webapp/js/model/UploadBatch.d.ts new file mode 100644 index 00000000000..5298df7f0f6 --- /dev/null +++ b/src/main/webapp/js/model/UploadBatch.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/src/main/webapp/js/model/UploadBatch.js b/src/main/webapp/js/model/UploadBatch.js new file mode 100644 index 00000000000..2db5f9ca1a2 --- /dev/null +++ b/src/main/webapp/js/model/UploadBatch.js @@ -0,0 +1,197 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import UploadModel from './Upload'; +import Backbone from 'backbone'; +import wreqr from '../wreqr'; +import _ from 'underscore'; +import { v4 } from 'uuid'; +var updatePreferences = _.throttle(function () { + ; + wreqr.vent.trigger('preferences:save'); +}, 1000); +export default Backbone.AssociatedModel.extend({ + options: undefined, + defaults: function () { + return { + unseen: true, + uploads: [], + percentage: 0, + errors: 0, + successes: 0, + complete: 0, + amount: 0, + issues: 0, + sending: false, + finished: false, + interrupted: false, + sentAt: undefined, + }; + }, + relations: [ + { + type: Backbone.Many, + key: 'uploads', + relatedModel: UploadModel, + }, + ], + bindCallbacks: function () { + this.handleAddFile = this.handleAddFile.bind(this); + this.handleTotalUploadProgress = this.handleTotalUploadProgress.bind(this); + this.handleSending = this.handleSending.bind(this); + this.handleQueueComplete = this.handleQueueComplete.bind(this); + this.handleSuccess = this.handleSuccess.bind(this); + this.handleError = this.handleError.bind(this); + this.handleComplete = this.handleComplete.bind(this); + }, + // @ts-expect-error ts-migrate(6133) FIXME: 'attributes' is declared but its value is never re... Remove this comment to see the full error message + initialize: function (attributes, options) { + this.bindCallbacks(); + this.options = options; + if (!this.id) { + this.set('id', v4()); + } + this.listenTo(this.get('uploads'), 'add remove reset update', this.handleUploadUpdate); + this.listenTo(this.get('uploads'), 'change:issues', this.handleIssuesUpdates); + this.listenToDropzone(); + }, + listenToDropzone: function () { + if (this.options.dropzone) { + this.options.dropzone.on('addedfile', this.handleAddFile); + this.options.dropzone.on('totaluploadprogress', this.handleTotalUploadProgress); + this.options.dropzone.on('sending', this.handleSending); + this.options.dropzone.on('queuecomplete', this.handleQueueComplete); + this.options.dropzone.on('success', this.handleSuccess); + this.options.dropzone.on('error', this.handleError); + this.options.dropzone.on('complete', this.handleComplete); + } + else { + this.set('interrupted', this.get('interrupted') || !this.get('finished')); + this.set('finished', true); + } + }, + handleAddFile: function (file) { + this.get('uploads').add({ + file: file, + }, { + dropzone: this.options.dropzone, + }); + }, + handleSuccess: function (file) { + if (file.status !== 'canceled') { + this.set('successes', this.get('successes') + 1); + } + }, + handleError: function (file) { + if (file.status !== 'canceled') { + this.set('errors', this.get('errors') + 1); + } + }, + handleComplete: function (file) { + if (file.status === 'success') { + this.set('complete', this.get('complete') + 1); + } + updatePreferences(); + }, + handleSending: function () { + this.set({ + sending: true, + }); + }, + handleTotalUploadProgress: function () { + this.set({ + percentage: this.calculatePercentageDone(), + }); + }, + unlistenToDropzone: function () { + this.options.dropzone.off('addedfile', this.handleAddFile); + this.options.dropzone.off('totaluploadprogress', this.handleTotalUploadProgress); + this.options.dropzone.off('sending', this.handleSending); + this.options.dropzone.off('queuecomplete', this.handleQueueComplete); + this.options.dropzone.off('success', this.handleSuccess); + this.options.dropzone.off('error', this.handleError); + this.options.dropzone.off('complete', this.handleComplete); + }, + handleQueueComplete: function () { + var _this = this; + // https://github.com/enyo/dropzone/blob/v4.3.0/dist/dropzone.js#L56 + // if we remove callbacks too early this loop will fail, look to see if updating to latest fixes this + setTimeout(function () { + _this.unlistenToDropzone(); + }, 0); + this.set({ + finished: true, + percentage: 100, + }); + updatePreferences(); + }, + handleUploadUpdate: function () { + this.set({ + amount: this.get('uploads').length, + }); + }, + handleIssuesUpdates: function () { + this.set({ + issues: this.get('uploads').reduce(function (issues, upload) { + issues += upload.get('issues') ? 1 : 0; + return issues; + }, 0), + }); + }, + clear: function () { + this.cancel(); + this.get('uploads').reset(); + }, + cancel: function () { + if (this.options.dropzone) { + this.options.dropzone.removeAllFiles(true); + } + this.set('finished', true); + }, + start: function () { + if (this.options.dropzone) { + this.set({ + sending: true, + sentAt: Date.now(), //- Math.random() * 14 * 86400000 + }); + wreqr.vent.trigger('uploads:add', this); + this.listenTo(this, 'change', updatePreferences); + this.options.dropzone.options.autoProcessQueue = true; + this.options.dropzone.processQueue(); + } + }, + getTimeComparator: function () { + return this.get('sentAt'); + }, + calculatePercentageDone: function () { + var files = this.options.dropzone.files; + if (files.length === 0) { + return 100; + } + var totalBytes = files.reduce(function (total, file) { + total += file.upload.total; + return total; + }, 0); + var bytesSent = files.reduce(function (total, file) { + total += file.upload.bytesSent; + return total; + }, 0); + var progress = 100 * (bytesSent / totalBytes); + if (progress >= 100 && !this.get('finished')) { + progress = 99; + } + return progress; + }, +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXBsb2FkQmF0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvbW9kZWwvVXBsb2FkQmF0Y2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sV0FBVyxNQUFNLFVBQVUsQ0FBQTtBQUNsQyxPQUFPLFFBQVEsTUFBTSxVQUFVLENBQUE7QUFDL0IsT0FBTyxLQUFLLE1BQU0sVUFBVSxDQUFBO0FBQzVCLE9BQU8sQ0FBQyxNQUFNLFlBQVksQ0FBQTtBQUMxQixPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQ3pCLElBQU0saUJBQWlCLEdBQUcsQ0FBQyxDQUFDLFFBQVEsQ0FBQztJQU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GFueSkgPT4ge1xuICAgICAgdG90YWwgKz0gZmlsZS51cGxvYWQudG90YWxcbiAgICAgIHJldHVybiB0b3RhbFxuICAgIH0sIDApXG4gICAgY29uc3QgYnl0ZXNTZW50ID0gZmlsZXMucmVkdWNlKCh0b3RhbDogYW55LCBmaWxlOiBhbnkpID0+IHtcbiAgICAgIHRvdGFsICs9IGZpbGUudXBsb2FkLmJ5dGVzU2VudFxuICAgICAgcmV0dXJuIHRvdGFsXG4gICAgfSwgMClcbiAgICBsZXQgcHJvZ3Jlc3MgPSAxMDAgKiAoYnl0ZXNTZW50IC8gdG90YWxCeXRlcylcbiAgICBpZiAocHJvZ3Jlc3MgPj0gMTAwICYmICF0aGlzLmdldCgnZmluaXNoZWQnKSkge1xuICAgICAgcHJvZ3Jlc3MgPSA5OVxuICAgIH1cbiAgICByZXR1cm4gcHJvZ3Jlc3NcbiAgfSxcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/model/User.d.ts b/src/main/webapp/js/model/User.d.ts new file mode 100644 index 00000000000..8f59657ab76 --- /dev/null +++ b/src/main/webapp/js/model/User.d.ts @@ -0,0 +1,4 @@ +import 'backbone-associations'; +declare const User: any; +export declare const userModifiableLayerProperties: string[]; +export default User; diff --git a/src/main/webapp/js/model/User.js b/src/main/webapp/js/model/User.js new file mode 100644 index 00000000000..9ef379b0cec --- /dev/null +++ b/src/main/webapp/js/model/User.js @@ -0,0 +1,491 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { Restrictions, Security, } from '../../react-component/utils/security/security'; +import fetch from '../../react-component/utils/fetch'; +import _ from 'underscore'; +import _cloneDeep from 'lodash.clonedeep'; +import _debounce from 'lodash.debounce'; +import wreqr from '../wreqr'; +import Backbone from 'backbone'; +import Alert from './Alert'; +import Common from '../Common'; +import UploadBatch from './UploadBatch'; +import moment from 'moment-timezone'; +import QuerySettings from './QuerySettings'; +import 'backbone-associations'; +import { CommonAjaxSettings } from '../AjaxSettings'; +import { v4 } from 'uuid'; +import { StartupDataStore } from './Startup/startup'; +var User = {}; +var Theme = Backbone.Model.extend({ + defaults: function () { + return { + palette: 'default', + theme: 'dark', + }; + }, +}); +export var userModifiableLayerProperties = [ + 'id', + 'label', + 'alpha', + 'show', + 'order', +]; +function areTheSameLayer(layer1, layer2) { + return _.isEqual(_.omit(layer1, userModifiableLayerProperties), _.omit(layer2, userModifiableLayerProperties)); +} +function isValidLayer(layer) { + var providers = StartupDataStore.Configuration.getImageryProviders(); + return providers.some(function (provider) { return areTheSameLayer(provider, layer); }); +} +// compare to imagery providers and remove any layers that are not in the providers, and add any providers that are not in the layers +function validateMapLayersAgainstProviders(layers) { + var providers = StartupDataStore.Configuration.getImageryProviders(); + // find layers that have been removed from the providers and remove them + var layersToRemove = layers.filter(function (model) { + return !isValidLayer(model.toJSON()); + }); + layers.remove(layersToRemove); + // find providers that have not been added to the layers and add them + var layersToAdd = providers.filter(function (provider) { + return !layers.some(function (model) { + return areTheSameLayer(provider, model.toJSON()); + }); + }); + layers.add(layersToAdd.map(function (provider) { return new User.MapLayer(provider, { parse: true }); })); +} +; +User.MapLayer = Backbone.AssociatedModel.extend({ + defaults: function () { + return { + alpha: 0.5, + show: true, + id: v4(), + }; + }, + blacklist: ['warning'], + toJSON: function () { + return _.omit(this.attributes, this.blacklist); + }, + shouldShowLayer: function () { + return this.get('show') && this.get('alpha') > 0; + }, + parse: function (resp) { + var layer = _.clone(resp); + layer.label = 'Type: ' + layer.type; + if (layer.layer) { + layer.label += ' Layer: ' + layer.layer; + } + if (layer.layers) { + layer.label += ' Layers: ' + layer.layers.join(', '); + } + return layer; + }, +}); +User.MapLayers = Backbone.Collection.extend({ + model: User.MapLayer, + defaults: function () { + return _.map(_.values(StartupDataStore.Configuration.getImageryProviders()), function (layerConfig) { return new User.MapLayer(layerConfig, { parse: true }); }); + }, + initialize: function (models) { + var _this = this; + if (!models || models.length === 0) { + this.set(this.defaults()); + } + this.listenTo(this, 'add reset', function () { + validateMapLayersAgainstProviders(_this); + }); + validateMapLayersAgainstProviders(this); + }, + comparator: function (model) { + return model.get('order'); + }, + getMapLayerConfig: function (url) { + return this.findWhere({ url: url }); + }, + savePreferences: function () { + this.parents[0].savePreferences(); + }, + validate: function () { + validateMapLayersAgainstProviders(this); + }, +}); +User.Preferences = Backbone.AssociatedModel.extend({ + url: './internal/user/preferences', + defaults: function () { + return { + id: 'preferences', + mapLayers: new User.MapLayers(), + resultDisplay: 'List', + resultPreview: ['modified'], + resultFilter: undefined, + resultSort: undefined, + 'inspector-hideEmpty': false, + 'inspector-summaryShown': [], + 'inspector-summaryOrder': [], + 'inspector-detailsOrder': ['title', 'created', 'modified', 'thumbnail'], + 'inspector-detailsHidden': [], + 'results-attributesShownTable': [], + 'results-attributesShownList': [], + homeFilter: 'Owned by anyone', + homeSort: 'Last modified', + homeDisplay: 'Grid', + decimalPrecision: 2, + alerts: [], + alertPersistence: true, + alertExpiration: 2592000000, + visualization: '3dmap', + columnHide: [], + columnOrder: ['title', 'created', 'modified', 'thumbnail'], + columnWidths: [], + hasSelectedColumns: false, + uploads: [], + oauth: [], + fontSize: 16, + resultCount: StartupDataStore.Configuration.getResultCount(), + dateTimeFormat: Common.getDateTimeFormats()['ISO']['millisecond'], + timeZone: Common.getTimeZones()['UTC'], + coordinateFormat: 'degrees', + autoPan: true, + goldenLayout: undefined, + goldenLayoutUpload: undefined, + goldenLayoutMetacard: undefined, + goldenLayoutAlert: undefined, + theme: { + palette: 'custom', + theme: 'dark', + }, + animation: true, + hoverPreview: true, + querySettings: new QuerySettings(), + mapHome: undefined, + }; + }, + relations: [ + { + type: Backbone.Many, + key: 'mapLayers', + relatedModel: User.MapLayer, + collectionType: User.MapLayers, + }, + { + type: Backbone.Many, + key: 'alerts', + relatedModel: Alert, + }, + { + type: Backbone.Many, + key: 'uploads', + relatedModel: UploadBatch, + }, + { + type: Backbone.One, + key: 'theme', + relatedModel: Theme, + }, + { + type: Backbone.One, + key: 'querySettings', + relatedModel: QuerySettings, + }, + ], + initialize: function () { + this.savePreferences = _debounce(this.savePreferences, 1200); + this.handleAlertPersistence(); + this.handleResultCount(); + this.listenTo(wreqr.vent, 'alerts:add', this.addAlert); + this.listenTo(wreqr.vent, 'uploads:add', this.addUpload); + this.listenTo(wreqr.vent, 'preferences:save', this.savePreferences); + this.listenTo(this.get('alerts'), 'remove', this.savePreferences); + this.listenTo(this.get('uploads'), 'remove', this.savePreferences); + this.listenTo(this, 'change:decimalPrecision', this.savePreferences); + this.listenTo(this, 'change:visualization', this.savePreferences); + this.listenTo(this, 'change:fontSize', this.savePreferences); + this.listenTo(this, 'change:goldenLayout', this.savePreferences); + this.listenTo(this, 'change:goldenLayoutUpload', this.savePreferences); + this.listenTo(this, 'change:goldenLayoutMetacard', this.savePreferences); + this.listenTo(this, 'change:goldenLayoutAlert', this.savePreferences); + this.listenTo(this, 'change:mapHome', this.savePreferences); + this.listenTo(this, 'change:theme', this.savePreferences); + }, + handleRemove: function () { + this.savePreferences(); + }, + addUpload: function (upload) { + this.get('uploads').add(upload); + this.savePreferences(); + }, + addAlert: function (alertDetails) { + this.get('alerts').add(alertDetails); + /* + * Add alert to notification core + * Alert will be retrieved and sent to the UI by UserApplication.java (getSubjectPreferences()) on refresh + */ + fetch('./internal/user/notifications', { + method: 'put', + body: JSON.stringify({ alerts: [alertDetails] }), + headers: { + 'Content-Type': 'application/json', + }, + }); + this.savePreferences(); + }, + needsUpdate: function (upToDatePrefs) { + if (_.isEqual(_cloneDeep(upToDatePrefs), this.lastSaved)) { + return false; + } + return true; + }, + savePreferences: function () { + var currentPrefs = this.toJSON(); + if (!this.needsUpdate(currentPrefs)) { + return; + } + this.lastSaved = _cloneDeep(currentPrefs); + this.save(currentPrefs, __assign(__assign({}, CommonAjaxSettings), { drop: true, withoutSet: true, customErrorHandling: true, error: function () { + ; + wreqr.vent.trigger('snack', { + message: 'Issue Authorizing Request: You appear to have been logged out. Please sign in again.', + snackProps: { + alertProps: { + severity: 'error', + }, + }, + }); + } })); + }, + handleResultCount: function () { + this.set('resultCount', Math.min(StartupDataStore.Configuration.getResultCount(), this.get('resultCount'))); + }, + handleAlertPersistence: function () { + if (!this.get('alertPersistence')) { + this.get('alerts').reset(); + this.get('uploads').reset(); + } + else { + var expiration = this.get('alertExpiration'); + this.removeExpiredAlerts(expiration); + this.removeExpiredUploads(expiration); + } + }, + removeExpiredAlerts: function (expiration) { + var expiredAlerts = this.get('alerts').filter(function (alert) { + var recievedAt = alert.getTimeComparator(); + return Date.now() - recievedAt > expiration; + }); + if (expiredAlerts.length === 0) { + return; + } + this.get('alerts').remove(expiredAlerts); + fetch('./internal/user/notifications', { + method: 'delete', + body: JSON.stringify({ alerts: expiredAlerts.map(function (_a) { + var id = _a.id; + return id; + }) }), + headers: { + 'Content-Type': 'application/json', + }, + }); + }, + removeExpiredUploads: function (expiration) { + var expiredUploads = this.get('uploads').filter(function (upload) { + var recievedAt = upload.getTimeComparator(); + return Date.now() - recievedAt > expiration; + }); + this.get('uploads').remove(expiredUploads); + }, + getSummaryShown: function () { + return this.get('inspector-summaryShown'); + }, + getHoverPreview: function () { + return this.get('hoverPreview'); + }, + getQuerySettings: function () { + return this.get('querySettings'); + }, + getDecimalPrecision: function () { + return this.get('decimalPrecision'); + }, + parse: function (data, options) { + if (options && options.drop) { + return {}; + } + return data; + }, +}); +User.Model = Backbone.AssociatedModel.extend({ + defaults: function () { + return { + id: 'user', + preferences: new User.Preferences(), + isGuest: true, + username: 'guest', + userid: 'guest', + roles: ['guest'], + }; + }, + relations: [ + { + type: Backbone.One, + key: 'preferences', + relatedModel: User.Preferences, + }, + ], + getEmail: function () { + return this.get('email'); + }, + getUserId: function () { + return this.get('userid'); + }, + getUserName: function () { + return this.get('username'); + }, + getSummaryShown: function () { + return this.get('preferences').getSummaryShown(); + }, + getHoverPreview: function () { + return this.get('preferences').getHoverPreview(); + }, + getPreferences: function () { + return this.get('preferences'); + }, + savePreferences: function () { + this.get('preferences').savePreferences(); + }, + getQuerySettings: function () { + return this.get('preferences').getQuerySettings(); + }, +}); +User.Response = Backbone.AssociatedModel.extend({ + url: './internal/user', + relations: [ + { + type: Backbone.One, + key: 'user', + relatedModel: User.Model, + }, + ], + defaults: function () { + return { + user: new User.Model(), + }; + }, + initialize: function () { + this.listenTo(this, 'sync', this.handleSync); + this.handleSync(); + }, + handleSync: function () { + this.get('user').get('preferences').handleAlertPersistence(); + this.get('user').get('preferences').handleResultCount(); + }, + getGuestPreferences: function () { + try { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string | null' is not assignable... Remove this comment to see the full error message + return JSON.parse(window.localStorage.getItem('preferences')) || {}; + } + catch (e) { + return {}; + } + }, + getEmail: function () { + return this.get('user').getEmail(); + }, + getUserId: function () { + return this.get('user').getUserId(); + }, + getRoles: function () { + return this.get('user').get('roles'); + }, + getUserName: function () { + return this.get('user').getUserName(); + }, + getPreferences: function () { + return this.get('user').getPreferences(); + }, + savePreferences: function () { + this.get('user').savePreferences(); + }, + getQuerySettings: function () { + return this.get('user').getQuerySettings(); + }, + getSummaryShown: function () { + return this.get('user').getSummaryShown(); + }, + getUserReadableDateTime: function (date) { + return moment + .tz(date, this.get('user').get('preferences').get('timeZone')) + .format(this.get('user').get('preferences').get('dateTimeFormat')['datetimefmt']); + }, + getAmPmDisplay: function () { + var timefmt = this.get('user').get('preferences').get('dateTimeFormat')['timefmt']; + return Common.getTimeFormatsReverseMap()[timefmt].format === '12'; + }, + getDateTimeFormat: function () { + return this.get('user').get('preferences').get('dateTimeFormat')['datetimefmt']; + }, + getTimeZone: function () { + return this.get('user').get('preferences').get('timeZone'); + }, + getHoverPreview: function () { + return this.get('user').getHoverPreview(); + }, + parse: function (body) { + if (body.isGuest) { + return { + user: _.extend({ id: 'user' }, body, { + preferences: _.extend({ id: 'preferences' }, this.getGuestPreferences()), + }), + }; + } + else { + _.extend(body.preferences, { id: 'preferences' }); + return { + user: _.extend({ + id: 'user', + }, body), + }; + } + }, + canRead: function (metacard) { + return new Security(Restrictions.from(metacard)).canRead(this); + }, + canWrite: function (thing) { + var _this = this; + switch (thing.type) { + case 'metacard-properties': + return new Security(Restrictions.from(thing)).canWrite(this); + case 'query-result': + return this.canWrite(thing.get('metacard').get('properties')); + case 'query-result.collection': + default: + if (thing.some !== undefined) { + !thing.some(function (subthing) { + return !_this.canWrite(subthing); + }); + } + else { + return new Security(Restrictions.from(thing)).canWrite(this); + } + } + }, + canShare: function (metacard) { + return new Security(Restrictions.from(metacard)).canShare(this); + }, +}); +export default User; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9qcy9tb2RlbC9Vc2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUNMLFlBQVksRUFDWixRQUFRLEdBQ1QsTUFBTSwrQ0FBK0MsQ0FBQTtBQUN0RCxPQUFPLEtBQUssTUFBTSxtQ0FBbUMsQ0FBQTtBQUNyRCxPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFFMUIsT0FBTyxVQUFVLE1BQU0sa0JBQWtCLENBQUE7QUFDekMsT0FBTyxTQUFTLE1BQU0saUJBQWlCLENBQUE7QUFDdkMsT0FBTyxLQUFLLE1BQU0sVUFBVSxDQUFBO0FBQzVCLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQU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JuIHRoaXMuZ2V0KCd1c2VyJykuZ2V0KCdwcmVmZXJlbmNlcycpLmdldCgndGltZVpvbmUnKVxuICB9LFxuICBnZXRIb3ZlclByZXZpZXcoKSB7XG4gICAgcmV0dXJuIHRoaXMuZ2V0KCd1c2VyJykuZ2V0SG92ZXJQcmV2aWV3KClcbiAgfSxcbiAgcGFyc2UoYm9keTogYW55KSB7XG4gICAgaWYgKGJvZHkuaXNHdWVzdCkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdXNlcjogXy5leHRlbmQoeyBpZDogJ3VzZXInIH0sIGJvZHksIHtcbiAgICAgICAgICBwcmVmZXJlbmNlczogXy5leHRlbmQoXG4gICAgICAgICAgICB7IGlkOiAncHJlZmVyZW5jZXMnIH0sXG4gICAgICAgICAgICB0aGlzLmdldEd1ZXN0UHJlZmVyZW5jZXMoKVxuICAgICAgICAgICksXG4gICAgICAgIH0pLFxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBfLmV4dGVuZChib2R5LnByZWZlcmVuY2VzLCB7IGlkOiAncHJlZmVyZW5jZXMnIH0pXG4gICAgICByZXR1cm4ge1xuICAgICAgICB1c2VyOiBfLmV4dGVuZChcbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZDogJ3VzZXInLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgYm9keVxuICAgICAgICApLFxuICAgICAgfVxuICAgIH1cbiAgfSxcbiAgY2FuUmVhZChtZXRhY2FyZDogYW55KSB7XG4gICAgcmV0dXJuIG5ldyBTZWN1cml0eShSZXN0cmljdGlvbnMuZnJvbShtZXRhY2FyZCkpLmNhblJlYWQodGhpcylcbiAgfSxcbiAgY2FuV3JpdGUodGhpbmc6IGFueSkge1xuICAgIHN3aXRjaCAodGhpbmcudHlwZSkge1xuICAgICAgY2FzZSAnbWV0YWNhcmQtcHJvcGVydGllcyc6XG4gICAgICAgIHJldHVybiBuZXcgU2VjdXJpdHkoUmVzdHJpY3Rpb25zLmZyb20odGhpbmcpKS5jYW5Xcml0ZSh0aGlzKVxuICAgICAgY2FzZSAncXVlcnktcmVzdWx0JzpcbiAgICAgICAgcmV0dXJuIHRoaXMuY2FuV3JpdGUodGhpbmcuZ2V0KCdtZXRhY2FyZCcpLmdldCgncHJvcGVydGllcycpKVxuICAgICAgY2FzZSAncXVlcnktcmVzdWx0LmNvbGxlY3Rpb24nOlxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgaWYgKHRoaW5nLnNvbWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICF0aGluZy5zb21lKChzdWJ0aGluZzogYW55KSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gIXRoaXMuY2FuV3JpdGUoc3VidGhpbmcpXG4gICAgICAgICAgfSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR1cm4gbmV3IFNlY3VyaXR5KFJlc3RyaWN0aW9ucy5mcm9tKHRoaW5nKSkuY2FuV3JpdGUodGhpcylcbiAgICAgICAgfVxuICAgIH1cbiAgfSxcbiAgY2FuU2hhcmUobWV0YWNhcmQ6IGFueSkge1xuICAgIHJldHVybiBuZXcgU2VjdXJpdHkoUmVzdHJpY3Rpb25zLmZyb20obWV0YWNhcmQpKS5jYW5TaGFyZSh0aGlzKVxuICB9LFxufSlcbmV4cG9ydCBkZWZhdWx0IFVzZXJcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/js/model/User.spec.d.ts b/src/main/webapp/js/model/User.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/js/model/User.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/js/model/User.spec.js b/src/main/webapp/js/model/User.spec.js new file mode 100644 index 00000000000..18495d6fe61 --- /dev/null +++ b/src/main/webapp/js/model/User.spec.js @@ -0,0 +1,158 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import user from '../../component/singletons/user-instance'; +import { StartupDataStore } from './Startup/startup'; +import _ from 'underscore'; +import { userModifiableLayerProperties } from './User'; +var exampleProviders1 = [ + { + proxyEnabled: true, + withCredentials: false, + alpha: 1, + name: 'World Topo Map - 1', + show: true, + type: 'AGM', + parameters: { + transparent: true, + format: 'image/png', + }, + url: './proxy/catalog20', + order: 0, + }, + { + proxyEnabled: true, + withCredentials: false, + alpha: 1, + name: 'World Imagery - 3', + show: true, + type: 'AGM', + parameters: { + transparent: true, + format: 'image/png', + }, + url: './proxy/catalog21', + order: 1, + }, +]; +// same as one, but with user modifiable properties changed (order, alpha, show) +var exampleProviders2 = [ + { + proxyEnabled: true, + withCredentials: false, + alpha: 0.7, + name: 'World Imagery - 3', + show: false, + type: 'AGM', + parameters: { + transparent: true, + format: 'image/png', + }, + url: './proxy/catalog21', + order: 0, + }, + { + proxyEnabled: true, + withCredentials: false, + alpha: 0.7, + name: 'World Topo Map - 1', + show: true, + type: 'AGM', + parameters: { + transparent: true, + format: 'image/png', + }, + url: './proxy/catalog20', + order: 1, + }, +]; +// same as one, but with one layer removed +var exampleProviders3 = [ + { + proxyEnabled: true, + withCredentials: false, + alpha: 1, + name: 'World Topo Map - 1', + show: true, + type: 'AGM', + parameters: { + transparent: true, + format: 'image/png', + }, + url: './proxy/catalog20', + order: 0, + }, +]; +describe('user preferences and such are handled correctly', function () { + it('should overwrite user layers if none exist', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.imageryProviders = exampleProviders1; + } + var userLayers = user.get('user>preferences>mapLayers'); + userLayers.reset([]); + expect(userLayers + .toJSON() + .map(function (layer) { return _.omit(layer, userModifiableLayerProperties); })).to.deep.equal(exampleProviders1.map(function (layer) { + return _.omit(layer, userModifiableLayerProperties); + })); + }); + it('should leave user layers alone if the configuration has not updated', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.imageryProviders = exampleProviders1; + } + var userLayers = user.get('user>preferences>mapLayers'); + userLayers.reset(exampleProviders2); + expect(userLayers + .toJSON() + .map(function (layer) { return _.omit(layer, userModifiableLayerProperties); })).to.deep.equal(exampleProviders2.map(function (layer) { + return _.omit(layer, userModifiableLayerProperties); + })); + }); + it('should remove layers that have been removed', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.imageryProviders = exampleProviders3; + } + var userLayers = user.get('user>preferences>mapLayers'); + userLayers.reset(exampleProviders1); + expect(userLayers + .toJSON() + .map(function (layer) { return _.omit(layer, userModifiableLayerProperties); })).to.deep.equal(exampleProviders3.map(function (layer) { + return _.omit(layer, userModifiableLayerProperties); + })); + }); + it('should add layers that have been added', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.imageryProviders = exampleProviders1; + } + var userLayers = user.get('user>preferences>mapLayers'); + userLayers.reset(exampleProviders3); + expect(userLayers + .toJSON() + .map(function (layer) { return _.omit(layer, userModifiableLayerProperties); })).to.deep.equal(exampleProviders1.map(function (layer) { + return _.omit(layer, userModifiableLayerProperties); + })); + }); + it('should handle empty imagery providers', function () { + if (StartupDataStore.Configuration.config) { + StartupDataStore.Configuration.config.imageryProviders = []; + } + var userLayers = user.get('user>preferences>mapLayers'); + userLayers.reset(exampleProviders3); + expect(userLayers + .toJSON() + .map(function (layer) { return _.omit(layer, userModifiableLayerProperties); })).to.deep.equal([].map(function (layer) { return _.omit(layer, userModifiableLayerProperties); })); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXNlci5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21ha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NcbiAgICAgICAgLnRvSlNPTigpXG4gICAgICAgIC5tYXAoKGxheWVyOiBhbnkpID0+IF8ub21pdChsYXllciwgdXNlck1vZGlmaWFibGVMYXllclByb3BlcnRpZXMpKVxuICAgICkudG8uZGVlcC5lcXVhbChcbiAgICAgIFtdLm1hcCgobGF5ZXIpID0+IF8ub21pdChsYXllciwgdXNlck1vZGlmaWFibGVMYXllclByb3BlcnRpZXMpKVxuICAgIClcbiAgfSlcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/requestAnimationFramePolyfill.d.ts b/src/main/webapp/js/requestAnimationFramePolyfill.d.ts new file mode 100644 index 00000000000..ca72b24f952 --- /dev/null +++ b/src/main/webapp/js/requestAnimationFramePolyfill.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ diff --git a/src/main/webapp/js/requestAnimationFramePolyfill.js b/src/main/webapp/js/requestAnimationFramePolyfill.js new file mode 100644 index 00000000000..3874952b293 --- /dev/null +++ b/src/main/webapp/js/requestAnimationFramePolyfill.js @@ -0,0 +1,50 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ +// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating +// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel +// MIT license +// jshint ignore: start +// eslint-disable-next-line no-extra-semi +; +(function () { + var lastTime = 0; + var vendors = ['ms', 'moz', 'webkit', 'o']; + for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message + window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; + window.cancelAnimationFrame = + // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message + window[vendors[x] + 'CancelAnimationFrame'] || + // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message + window[vendors[x] + 'CancelRequestAnimationFrame']; + } + if (!window.requestAnimationFrame) + // @ts-expect-error ts-migrate(2322) FIXME: Type '(callback: any, element: any) => number' is ... Remove this comment to see the full error message + window.requestAnimationFrame = function (callback, element) { + var currTime = new Date().getTime(); + var timeToCall = Math.max(0, 16 - (currTime - lastTime)); + var id = window.setTimeout(function () { + callback(currTime + timeToCall); + }, timeToCall); + lastTime = currTime + timeToCall; + return id; + }; + if (!window.cancelAnimationFrame) + window.cancelAnimationFrame = function (id) { + clearTimeout(id); + }; +})(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdEFuaW1hdGlvbkZyYW1lUG9seWZpbGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvcmVxdWVzdEFuaW1hdGlvbkZyYW1lUG9seWZpbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLHVFQUF1RTtBQUN2RSwyRkFBMkY7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XInIGlzIC4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgd2luZG93LnJlcXVlc3RBbmltYXRpb25GcmFtZSA9IGZ1bmN0aW9uIChjYWxsYmFjazogYW55LCBlbGVtZW50OiBhbnkpIHtcbiAgICAgIGNvbnN0IGN1cnJUaW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKClcbiAgICAgIGNvbnN0IHRpbWVUb0NhbGwgPSBNYXRoLm1heCgwLCAxNiAtIChjdXJyVGltZSAtIGxhc3RUaW1lKSlcbiAgICAgIGNvbnN0IGlkID0gd2luZG93LnNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICBjYWxsYmFjayhjdXJyVGltZSArIHRpbWVUb0NhbGwpXG4gICAgICB9LCB0aW1lVG9DYWxsKVxuICAgICAgbGFzdFRpbWUgPSBjdXJyVGltZSArIHRpbWVUb0NhbGxcbiAgICAgIHJldHVybiBpZFxuICAgIH1cblxuICBpZiAoIXdpbmRvdy5jYW5jZWxBbmltYXRpb25GcmFtZSlcbiAgICB3aW5kb3cuY2FuY2VsQW5pbWF0aW9uRnJhbWUgPSBmdW5jdGlvbiAoaWQpIHtcbiAgICAgIGNsZWFyVGltZW91dChpZClcbiAgICB9XG59KSgpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/js/wreqr.d.ts b/src/main/webapp/js/wreqr.d.ts new file mode 100644 index 00000000000..a76d3daf223 --- /dev/null +++ b/src/main/webapp/js/wreqr.d.ts @@ -0,0 +1,7 @@ +import 'backbone.wreqr'; +declare const _default: { + vent: any; + commands: any; + reqres: any; +}; +export default _default; diff --git a/src/main/webapp/js/wreqr.js b/src/main/webapp/js/wreqr.js new file mode 100644 index 00000000000..811c8589dfa --- /dev/null +++ b/src/main/webapp/js/wreqr.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Backbone from 'backbone'; +import 'backbone.wreqr'; +var wreqr = {}; +wreqr.vent = new Backbone.Wreqr.EventAggregator(); +wreqr.commands = new Backbone.Wreqr.Commands(); +wreqr.reqres = new Backbone.Wreqr.RequestResponse(); +export default wreqr; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JlcXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvanMvd3JlcXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQUMvQixPQUFPLGdCQUFnQixDQUFBO0FBQ3ZCLElBQU0sS0FBSyxHQUFHLEVBQUUsQ0FDZjtBQUFDLEtBQWEsQ0FBQyxJQUFJLEdBQUcsSUFBSyxRQUFnQixDQUFDLEtBQUssQ0FBQyxlQUFlLEVBQUUsQ0FDbkU7QUFBQyxLQUFhLENBQUMsUUFBUSxHQUFHLElBQUssUUFBZ0IsQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFLENBQ2hFO0FBQUMsS0FBYSxDQUFDLE1BQU0sR0FBRyxJQUFLLFFBQWdCLENBQUMsS0FBSyxDQUFDLGVBQWUsRUFBRSxDQUFBO0FBQ3RFLGVBQWUsS0FJZCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNv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MgYW55KS5jb21tYW5kcyA9IG5ldyAoQmFja2JvbmUgYXMgYW55KS5XcmVxci5Db21tYW5kcygpXG47KHdyZXFyIGFzIGFueSkucmVxcmVzID0gbmV3IChCYWNrYm9uZSBhcyBhbnkpLldyZXFyLlJlcXVlc3RSZXNwb25zZSgpXG5leHBvcnQgZGVmYXVsdCB3cmVxciBhcyB7XG4gIHZlbnQ6IGFueVxuICBjb21tYW5kczogYW55XG4gIHJlcXJlczogYW55XG59XG4iXX0= \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/DrawHelper.css b/src/main/webapp/lib/cesium-drawhelper/DrawHelper.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/DrawHelper.css rename to src/main/webapp/lib/cesium-drawhelper/DrawHelper.css diff --git a/src/main/webapp/lib/cesium-drawhelper/DrawHelper.d.ts b/src/main/webapp/lib/cesium-drawhelper/DrawHelper.d.ts new file mode 100644 index 00000000000..d1cafb1cc09 --- /dev/null +++ b/src/main/webapp/lib/cesium-drawhelper/DrawHelper.d.ts @@ -0,0 +1,26 @@ +declare const DrawHelper: { + (this: any, cesiumWidget: any): void; + ExtentPrimitive: { + (this: any, this: any, options: any): void; + prototype: any; + }; + PolygonPrimitive: { + (this: any, this: any, options: any): void; + prototype: any; + }; + CirclePrimitive: { + (this: any, this: any, options: any): void; + prototype: any; + }; + EllipsePrimitive: { + (this: any, options: any): void; + prototype: any; + }; + PolylinePrimitive: { + (this: any, options: any): void; + prototype: any; + }; + BillboardGroup(drawHelper: any, options: any): void; + DrawHelperWidget: (this: any, this: any, drawHelper: any, options: any) => void; +}; +export default DrawHelper; diff --git a/src/main/webapp/lib/cesium-drawhelper/DrawHelper.js b/src/main/webapp/lib/cesium-drawhelper/DrawHelper.js new file mode 100644 index 00000000000..662ec1c756e --- /dev/null +++ b/src/main/webapp/lib/cesium-drawhelper/DrawHelper.js @@ -0,0 +1,1793 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/** + * Created by thomas on 9/01/14. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * (c) www.geocento.com + * www.metaaps.com + * + */ +/* eslint-disable */ +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message +import Cesium from 'cesium/Build/Cesium/Cesium'; +import * as Turf from '@turf/turf'; +import utility from '../../component/visualization/maps/cesium/utility'; +import _ from 'lodash'; +import dragHalfSvg from '!!raw-loader!./drag-half.svg'; +import vertexSvg from '!!raw-loader!./vertex.svg'; +import { contrastingColor } from '../../react-component/location/location-color-selector'; +// Avoid conflict with the name _, which DrawHelper uses a lot +var lodash = _; +var DrawHelper = (function () { + // static variables + var ellipsoid = Cesium.Ellipsoid.WGS84; + // constructor + function _(cesiumWidget) { + this._scene = cesiumWidget.scene; + this._tooltip = createTooltip(cesiumWidget.container); + this._surfaces = []; + this.initialiseHandlers(); + this.enhancePrimitives(); + } + _.prototype.initialiseHandlers = function () { + var scene = this._scene; + // scene events + var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas); + function callPrimitiveCallback(name, position) { + var pickedObject = scene.pick(position); + if (pickedObject && + pickedObject.primitive && + pickedObject.primitive[name]) { + pickedObject.primitive[name](position); + } + } + handler.setInputAction(function (movement) { + callPrimitiveCallback('leftClick', movement.position); + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); + handler.setInputAction(function (movement) { + callPrimitiveCallback('leftDoubleClick', movement.position); + }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK); + handler.setInputAction(function (movement) { + callPrimitiveCallback('rightClick', movement.position); + }, Cesium.ScreenSpaceEventType.RIGHT_CLICK); + var mouseOutObject; + handler.setInputAction(function (movement) { + var pickedObject = scene.pick(movement.endPosition); + if (mouseOutObject && + (!pickedObject || mouseOutObject != pickedObject.primitive)) { + !(mouseOutObject.isDestroyed && mouseOutObject.isDestroyed()) && + mouseOutObject.mouseOut(movement.endPosition); + mouseOutObject = null; + } + if (pickedObject && pickedObject.primitive) { + pickedObject = pickedObject.primitive; + if (pickedObject.mouseOut) { + mouseOutObject = pickedObject; + } + if (pickedObject.mouseMove) { + pickedObject.mouseMove(movement.endPosition); + } + } + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + handler.setInputAction(function (movement) { + callPrimitiveCallback('leftUp', movement.position); + }, Cesium.ScreenSpaceEventType.LEFT_UP); + handler.setInputAction(function (movement) { + callPrimitiveCallback('leftDown', movement.position); + }, Cesium.ScreenSpaceEventType.LEFT_DOWN); + }; + _.prototype.setListener = function (primitive, type, callback) { + primitive[type] = callback; + }; + // register event handling for an editable shape + // shape should implement setEditMode and setHighlighted + _.prototype.registerEditableShape = function (surface) { + var _self = this; + // handlers for interactions + // highlight polygon when mouse is entering + setListener(surface, 'mouseMove', function (position) { + surface.setHighlighted(true); + if (!surface._editMode) { + _self._tooltip.showAt(position, 'Click to edit this shape'); + } + }); + // hide the highlighting when mouse is leaving the polygon + setListener(surface, 'mouseOut', function () { + surface.setHighlighted(false); + _self._tooltip.setVisible(false); + }); + setListener(surface, 'leftClick', function () { + surface.setEditMode(true); + }); + }; + _.prototype.startDrawing = function (cleanUp) { + // check for cleanUp first + if (this.editCleanUp) { + this.editCleanUp(); + } + this.editCleanUp = cleanUp; + }; + _.prototype.stopDrawing = function () { + // check for cleanUp first + if (this.editCleanUp) { + this.editCleanUp(); + this.editCleanUp = null; + } + }; + // make sure only one shape is highlighted at a time + _.prototype.disableAllHighlights = function () { + this.setHighlighted(undefined); + }; + _.prototype.setHighlighted = function (surface) { + if (this._highlightedSurface && + !this._highlightedSurface.isDestroyed() && + this._highlightedSurface != surface) { + this._highlightedSurface.setHighlighted(false); + } + this._highlightedSurface = surface; + }; + _.prototype.disableAllEditMode = function () { + this.setEdited(undefined); + }; + _.prototype.setEdited = function (surface) { + if (this._editedSurface && !this._editedSurface.isDestroyed()) { + this._editedSurface.setEditMode(false); + } + this._editedSurface = surface; + }; + var material = Cesium.Material.fromType(Cesium.Material.ColorType); + material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 0.5); + var defaultShapeOptions = { + ellipsoid: Cesium.Ellipsoid.WGS84, + textureRotationAngle: 0.0, + height: 0.0, + asynchronous: true, + show: true, + debugShowBoundingVolume: false, + }; + var defaultSurfaceOptions = copyOptions(defaultShapeOptions, { + appearance: new Cesium.EllipsoidSurfaceAppearance({ + aboveGround: false, + }), + material: material, + granularity: Math.PI / 180.0, + }); + var defaultPolygonOptions = copyOptions(defaultShapeOptions, {}); + var defaultExtentOptions = copyOptions(defaultShapeOptions, {}); + var defaultCircleOptions = copyOptions(defaultShapeOptions, {}); + var defaultEllipseOptions = copyOptions(defaultSurfaceOptions, { + rotation: 0, + }); + var defaultPolylineOptions = copyOptions(defaultShapeOptions, { + width: 5, + geodesic: true, + granularity: 10000, + appearance: new Cesium.PolylineMaterialAppearance({ + aboveGround: false, + }), + material: material, + }); + // Cesium.Polygon.prototype.setStrokeStyle = setStrokeStyle; + // + // Cesium.Polygon.prototype.drawOutline = drawOutline; + // + var ChangeablePrimitive = (function () { + function _() { } + _.prototype.initialiseOptions = function (options) { + fillOptions(this, options); + this._ellipsoid = undefined; + this._granularity = undefined; + this._height = undefined; + this._textureRotationAngle = undefined; + this._id = undefined; + // set the flags to initiate a first drawing + this._createPrimitive = true; + this._primitive = undefined; + this._outlinePolygon = undefined; + }; + _.prototype.setAttribute = function (name, value) { + this[name] = value; + this._createPrimitive = true; + }; + _.prototype.getAttribute = function (name) { + return this[name]; + }; + /** + * @private + */ + _.prototype.update = function (context, frameState, commandList) { + if (!Cesium.defined(this.ellipsoid)) { + throw new Cesium.DeveloperError('this.ellipsoid must be defined.'); + } + if (!Cesium.defined(this.appearance)) { + throw new Cesium.DeveloperError('this.material must be defined.'); + } + if (this.granularity < 0.0) { + throw new Cesium.DeveloperError('this.granularity and scene2D/scene3D overrides must be greater than zero.'); + } + if (!this.show) { + return; + } + if (!this._createPrimitive && !Cesium.defined(this._primitive)) { + // No positions/hierarchy to draw + return; + } + if (this._createPrimitive || + this._ellipsoid !== this.ellipsoid || + this._granularity !== this.granularity || + this._height !== this.height || + this._textureRotationAngle !== this.textureRotationAngle || + this._id !== this.id) { + var geometry = this.getGeometry(); + if (!geometry) { + return; + } + this._createPrimitive = false; + this._ellipsoid = this.ellipsoid; + this._granularity = this.granularity; + this._height = this.height; + this._textureRotationAngle = this.textureRotationAngle; + this._id = this.id; + this._primitive = this._primitive && this._primitive.destroy(); + this._primitive = new Cesium.Primitive({ + geometryInstances: new Cesium.GeometryInstance({ + geometry: geometry, + id: this.id, + pickPrimitive: this, + }), + appearance: this.appearance, + asynchronous: this.asynchronous, + }); + this._outlinePolygon = + this._outlinePolygon && this._outlinePolygon.destroy(); + if (this.buffer && this.getOutlineGeometry) { + var outlineGeometry = this.getOutlineGeometry(); + if (outlineGeometry) { + // create the highlighting frame + this._outlinePolygon = new Cesium.Primitive({ + geometryInstances: new Cesium.GeometryInstance({ + geometry: outlineGeometry, + attributes: { + color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString(contrastingColor)), + }, + }), + appearance: new Cesium.PolylineMaterialAppearance({ + material: Cesium.Material.fromType('Color', { + color: Cesium.Color.fromCssColorString(contrastingColor), + }), + }), + }); + } + } + } + var primitive = this._primitive; + primitive.appearance.material = this.material; + primitive.debugShowBoundingVolume = this.debugShowBoundingVolume; + primitive.update(context, frameState, commandList); + if (this._outlinePolygon) { + this._outlinePolygon.update(context, frameState, commandList); + } + }; + _.prototype.isDestroyed = function () { + return false; + }; + _.prototype.destroy = function () { + this._primitive = this._primitive && this._primitive.destroy(); + return Cesium.destroyObject(this); + }; + _.prototype.setStrokeStyle = function (strokeColor, strokeWidth) { + if (!this.strokeColor || + !this.strokeColor.equals(strokeColor) || + this.strokeWidth != strokeWidth) { + this._createPrimitive = true; + this.strokeColor = strokeColor; + this.strokeWidth = strokeWidth; + } + }; + return _; + })(); + _.ExtentPrimitive = (function () { + // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. + function _(options) { + if (!Cesium.defined(options.extent)) { + throw new Cesium.DeveloperError('Extent is required'); + } + options = copyOptions(options, defaultSurfaceOptions); + this.initialiseOptions(options); + this.setExtent(options.extent); + } + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + _.prototype = new ChangeablePrimitive(); + _.prototype.setExtent = function (extent) { + this.setAttribute('extent', extent); + }; + _.prototype.getExtent = function () { + return this.getAttribute('extent'); + }; + _.prototype.getGeometry = function () { + if (!Cesium.defined(this.extent)) { + return; + } + var positions = [ + Cesium.Cartesian3.fromRadians(this.extent.west, this.extent.south), + Cesium.Cartesian3.fromRadians(this.extent.west, this.extent.north), + Cesium.Cartesian3.fromRadians(this.extent.east, this.extent.north), + Cesium.Cartesian3.fromRadians(this.extent.east, this.extent.south), + Cesium.Cartesian3.fromRadians(this.extent.west, this.extent.south), + ]; + // Display a PolygonGeometry instead of a RectangleGeometry because RectangleGeometries + // appear to always wrap the long way around the antimeridian. + return Cesium.PolygonGeometry.fromPositions({ + positions: positions, + height: this.height, + stRotation: this.textureRotationAngle, + ellipsoid: this.ellipsoid, + granularity: this.granularity, + }); + }; + _.prototype.getOutlineGeometry = function () { + return new Cesium.RectangleOutlineGeometry({ + rectangle: this.extent, + }); + }; + return _; + })(); + _.PolygonPrimitive = (function () { + // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. + function _(options) { + options = copyOptions(options, defaultSurfaceOptions); + this.initialiseOptions(options); + this.isPolygon = true; + } + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + _.prototype = new ChangeablePrimitive(); + _.prototype.setPositions = function (positions) { + this.setAttribute('positions', positions); + }; + _.prototype.getPositions = function () { + return this.getAttribute('positions'); + }; + _.prototype.getGeometry = function () { + if (!Cesium.defined(this.positions) || this.positions.length < 3) { + return; + } + return Cesium.PolygonGeometry.fromPositions({ + positions: this.positions, + height: this.height, + stRotation: this.textureRotationAngle, + ellipsoid: this.ellipsoid, + granularity: this.granularity, + }); + }; + _.prototype.getOutlineGeometry = function () { + if (!Cesium.defined(this.positions) || + this.positions.length < 3 || + !this.buffer) { + return; + } + var coordinates = this.positions.map(function (pos) { + var cartographic = Cesium.Cartographic.fromCartesian(pos); + return [ + Cesium.Math.toDegrees(cartographic.longitude), + Cesium.Math.toDegrees(cartographic.latitude), + cartographic.altitude, + ]; + }); + var adjustedPolygon = Turf.polygon([coordinates]); + utility.adjustGeoCoords(adjustedPolygon); + var bufferedPolygon = Turf.buffer(adjustedPolygon, Math.max(this.buffer, 1), { + units: 'meters', + }); + if (!bufferedPolygon) { + return; + } + // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments + utility.adjustGeoCoords(bufferedPolygon); + var outlinePositions = bufferedPolygon.geometry.coordinates[0].map(function (coord) { return Cesium.Cartesian3.fromDegrees(coord[0], coord[1], coord[2]); }); + return new Cesium.PolylineGeometry({ + positions: outlinePositions, + height: this.height, + width: this.width < 1 ? 1 : this.width, + ellipsoid: this.ellipsoid, + }); + }; + return _; + })(); + _.CirclePrimitive = (function () { + // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. + function _(options) { + if (!(Cesium.defined(options.center) && Cesium.defined(options.radius))) { + throw new Cesium.DeveloperError('Center and radius are required'); + } + options = copyOptions(options, defaultSurfaceOptions); + this.initialiseOptions(options); + this.setRadius(options.radius); + } + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + _.prototype = new ChangeablePrimitive(); + _.prototype.setCenter = function (center) { + this.setAttribute('center', center); + }; + _.prototype.setRadius = function (radius) { + this.setAttribute('radius', Math.max(0.1, radius)); + }; + _.prototype.getCenter = function () { + return this.getAttribute('center'); + }; + _.prototype.getRadius = function () { + return this.getAttribute('radius'); + }; + _.prototype.getGeometry = function () { + if (!(Cesium.defined(this.center) && Cesium.defined(this.radius))) { + return; + } + return new Cesium.CircleGeometry({ + center: this.center, + radius: this.radius, + height: this.height, + stRotation: this.textureRotationAngle, + ellipsoid: this.ellipsoid, + granularity: this.granularity, + }); + }; + _.prototype.getOutlineGeometry = function () { + return new Cesium.CircleOutlineGeometry({ + center: this.getCenter(), + radius: this.getRadius(), + }); + }; + return _; + })(); + _.EllipsePrimitive = (function () { + function _(options) { + if (!(Cesium.defined(options.center) && + Cesium.defined(options.semiMajorAxis) && + Cesium.defined(options.semiMinorAxis))) { + throw new Cesium.DeveloperError('Center and semi major and semi minor axis are required'); + } + options = copyOptions(options, defaultEllipseOptions); + this.initialiseOptions(options); + } + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + _.prototype = new ChangeablePrimitive(); + _.prototype.setCenter = function (center) { + this.setAttribute('center', center); + }; + _.prototype.setSemiMajorAxis = function (semiMajorAxis) { + if (semiMajorAxis < this.getSemiMinorAxis()) + return; + this.setAttribute('semiMajorAxis', semiMajorAxis); + }; + _.prototype.setSemiMinorAxis = function (semiMinorAxis) { + if (semiMinorAxis > this.getSemiMajorAxis()) + return; + this.setAttribute('semiMinorAxis', semiMinorAxis); + }; + _.prototype.setRotation = function (rotation) { + return this.setAttribute('rotation', rotation); + }; + _.prototype.getCenter = function () { + return this.getAttribute('center'); + }; + _.prototype.getSemiMajorAxis = function () { + return this.getAttribute('semiMajorAxis'); + }; + _.prototype.getSemiMinorAxis = function () { + return this.getAttribute('semiMinorAxis'); + }; + _.prototype.getRotation = function () { + return this.getAttribute('rotation'); + }; + _.prototype.getGeometry = function () { + if (!(Cesium.defined(this.center) && + Cesium.defined(this.semiMajorAxis) && + Cesium.defined(this.semiMinorAxis))) { + return; + } + return new Cesium.EllipseGeometry({ + ellipsoid: this.ellipsoid, + center: this.center, + semiMajorAxis: this.semiMajorAxis, + semiMinorAxis: this.semiMinorAxis, + rotation: this.rotation, + height: this.height, + vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT, + stRotation: this.textureRotationAngle, + // @ts-expect-error ts-migrate(1117) FIXME: An object literal cannot have multiple properties ... Remove this comment to see the full error message + ellipsoid: this.ellipsoid, + granularity: this.granularity, + }); + }; + _.prototype.getOutlineGeometry = function () { + return new Cesium.EllipseOutlineGeometry({ + center: this.getCenter(), + semiMajorAxis: this.getSemiMajorAxis(), + semiMinorAxis: this.getSemiMinorAxis(), + rotation: this.getRotation(), + }); + }; + return _; + })(); + _.PolylinePrimitive = (function () { + function _(options) { + options = copyOptions(options, defaultPolylineOptions); + this.initialiseOptions(options); + } + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + _.prototype = new ChangeablePrimitive(); + _.prototype.setPositions = function (positions) { + this.setAttribute('positions', positions); + }; + _.prototype.setWidth = function (width) { + this.setAttribute('width', width); + }; + _.prototype.setGeodesic = function (geodesic) { + this.setAttribute('geodesic', geodesic); + }; + _.prototype.getPositions = function () { + return this.getAttribute('positions'); + }; + _.prototype.getWidth = function () { + return this.getAttribute('width'); + }; + _.prototype.getGeodesic = function () { + return this.getAttribute('geodesic'); + }; + _.prototype.getGeometry = function () { + if (!Cesium.defined(this.positions) || this.positions.length < 2) { + return; + } + return new Cesium.PolylineGeometry({ + positions: this.positions, + height: this.height, + width: this.width < 1 ? 1 : this.width, + vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT, + ellipsoid: this.ellipsoid, + }); + }; + _.prototype.getOutlineGeometry = function () { + if (!Cesium.defined(this.positions) || + this.positions.length < 2 || + !this.buffer) { + return; + } + var coordinates = this.positions.map(function (pos) { + var cartographic = Cesium.Cartographic.fromCartesian(pos); + return [ + Cesium.Math.toDegrees(cartographic.longitude), + Cesium.Math.toDegrees(cartographic.latitude), + cartographic.altitude, + ]; + }); + var turfLine = Turf.lineString(coordinates); + utility.adjustGeoCoords(turfLine); + var bufferedLine = Turf.buffer(turfLine, Math.max(this.buffer, 1), { + units: 'meters', + }); + if (!bufferedLine) { + return; + } + // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments + utility.adjustGeoCoords(bufferedLine); + var outlinePositions = bufferedLine.geometry.coordinates[0].map(function (coord) { return Cesium.Cartesian3.fromDegrees(coord[0], coord[1], coord[2]); }); + return new Cesium.PolylineGeometry({ + positions: outlinePositions, + height: this.height, + width: this.width < 1 ? 1 : this.width, + vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT, + ellipsoid: this.ellipsoid, + }); + }; + return _; + })(); + /* + Create our own Image objects and pass them, instead of URLS, to the + BillboardCollections. This ensures the shape editing controls will always + be displayed immediately after the user clicks the Draw button, and without + requiring any user interaction with the map. If we used unloaded images + (e.g., image URLs), as we did previously, then sometimes the shape editing + controls would not be displayed until the user interacted with the map, + like moving it or zooming in or out. This is because we have Cesium's + requestRenderMode enabled. Sometimes, the image was not loaded by the time + the render request for the drawing primitive was made, and another render + request (triggered, for example, by moving the map) had to be made for + it to be shown. + */ + var vertexImage = new Image(); + vertexImage.src = "data:image/svg+xml;base64,".concat(window.btoa(vertexSvg)); + var dragHalfImage = new Image(); + dragHalfImage.src = "data:image/svg+xml;base64,".concat(window.btoa(dragHalfSvg)); + var defaultBillboard = { + image: vertexImage, + shiftX: 0, + shiftY: 0, + }; + var dragBillboard = { + image: vertexImage, + shiftX: 0, + shiftY: 0, + }; + var dragHalfBillboard = { + image: dragHalfImage, + shiftX: 0, + shiftY: 0, + }; + _.prototype.createBillboardGroup = function (points, options, callbacks) { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var markers = new _.BillboardGroup(this, options); + markers.addBillboards(points, callbacks); + return markers; + }; + _.BillboardGroup = function (drawHelper, options) { + ; + this._drawHelper = drawHelper; + this._scene = drawHelper._scene; + this._options = copyOptions(options, defaultBillboard); + // create one common billboard collection for all billboards + var b = new Cesium.BillboardCollection(); + this._scene.primitives.add(b); + this._billboards = b; + this._orderedBillboards = []; + }; + _.BillboardGroup.prototype.createBillboard = function (position, callbacks) { + var billboard = this._billboards.add({ + show: true, + position: position, + pixelOffset: new Cesium.Cartesian2(this._options.shiftX, this._options.shiftY), + eyeOffset: new Cesium.Cartesian3(0.0, 0.0, 0.0), + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.CENTER, + scale: 1.0, + image: this._options.image, + color: new Cesium.Color(1.0, 1.0, 1.0, 1.0), + }); + // if editable + if (callbacks) { + var _self = this; + var screenSpaceCameraController_1 = this._scene.screenSpaceCameraController; + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function enableRotation(enable) { + screenSpaceCameraController_1.enableRotate = enable; + } + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function getIndex() { + // find index + for (var i = 0, I = _self._orderedBillboards.length; i < I && _self._orderedBillboards[i] != billboard; ++i) + ; + return i; + } + if (callbacks.dragHandlers) { + // eslint-disable-next-line no-redeclare + var _self = this; + setListener(billboard, 'leftDown', function (position) { + // TODO - start the drag handlers here + // create handlers for mouseOut and leftUp for the billboard and a mouseMove + function onDrag(position) { + billboard.position = position; + // find index + for (var i = 0, I = _self._orderedBillboards.length; i < I && _self._orderedBillboards[i] != billboard; ++i) + ; + callbacks.dragHandlers.onDrag && + callbacks.dragHandlers.onDrag(getIndex(), position); + } + function onDragEnd(position) { + handler.destroy(); + enableRotation(true); + callbacks.dragHandlers.onDragEnd && + callbacks.dragHandlers.onDragEnd(getIndex(), position); + } + var handler = new Cesium.ScreenSpaceEventHandler(_self._scene.canvas); + handler.setInputAction(function (movement) { + var cartesian = _self._scene.camera.pickEllipsoid(movement.endPosition, ellipsoid); + if (cartesian) { + onDrag(cartesian); + } + else { + onDragEnd(cartesian); + } + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + handler.setInputAction(function (movement) { + onDragEnd(_self._scene.camera.pickEllipsoid(movement.position, ellipsoid)); + }, Cesium.ScreenSpaceEventType.LEFT_UP); + enableRotation(false); + callbacks.dragHandlers.onDragStart && + callbacks.dragHandlers.onDragStart(getIndex(), _self._scene.camera.pickEllipsoid(position, ellipsoid)); + }); + } + if (callbacks.onRightClick) { + setListener(billboard, 'rightClick', function () { + callbacks.onRightClick(getIndex()); + }); + } + if (callbacks.onClick) { + setListener(billboard, 'leftClick', function () { + callbacks.onClick(getIndex()); + }); + } + if (callbacks.tooltip) { + setListener(billboard, 'mouseMove', function (position) { + _self._drawHelper._tooltip.showAt(position, callbacks.tooltip()); + }); + setListener(billboard, 'mouseOut', function () { + _self._drawHelper._tooltip.setVisible(false); + }); + } + } + return billboard; + }; + _.BillboardGroup.prototype.insertBillboard = function (index, position, callbacks) { + this._orderedBillboards.splice(index, 0, this.createBillboard(position, callbacks)); + }; + _.BillboardGroup.prototype.addBillboard = function (position, callbacks) { + this._orderedBillboards.push(this.createBillboard(position, callbacks)); + }; + _.BillboardGroup.prototype.addBillboards = function (positions, callbacks) { + var index = 0; + for (; index < positions.length; index++) { + this.addBillboard(positions[index], callbacks); + } + }; + _.BillboardGroup.prototype.updateBillboardsPositions = function (positions) { + var index = 0; + for (; index < positions.length; index++) { + this.getBillboard(index).position = positions[index]; + } + }; + _.BillboardGroup.prototype.countBillboards = function () { + return this._orderedBillboards.length; + }; + _.BillboardGroup.prototype.getBillboard = function (index) { + return this._orderedBillboards[index]; + }; + _.BillboardGroup.prototype.removeBillboard = function (index) { + this._billboards.remove(this.getBillboard(index)); + this._orderedBillboards.splice(index, 1); + }; + _.BillboardGroup.prototype.remove = function () { + this._billboards = + this._billboards && + this._scene.primitives.remove(this._billboards) && + this._billboards.removeAll() && + this._billboards.destroy(); + }; + _.BillboardGroup.prototype.setOnTop = function () { + this._scene.primitives.raiseToTop(this._billboards); + }; + _.prototype.startDrawingMarker = function (options) { + // eslint-disable-next-line no-redeclare + var options = copyOptions(options, defaultBillboard); + this.startDrawing(function () { + markers.remove(); + mouseHandler.destroy(); + tooltip.setVisible(false); + }); + var _self = this; + var scene = this._scene; + // @ts-expect-error ts-migrate(6133) FIXME: 'primitives' is declared but its value is never re... Remove this comment to see the full error message + var primitives = scene.primitives; + var tooltip = this._tooltip; + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var markers = new _.BillboardGroup(this, options); + var mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas); + // Now wait for start + mouseHandler.setInputAction(function (movement) { + if (movement.position != null) { + var cartesian = scene.camera.pickEllipsoid(movement.position, ellipsoid); + if (cartesian) { + markers.addBillboard(cartesian); + _self.stopDrawing(); + options.callback(cartesian); + } + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); + mouseHandler.setInputAction(function (movement) { + var position = movement.endPosition; + if (position != null) { + var cartesian = scene.camera.pickEllipsoid(position, ellipsoid); + if (cartesian) { + tooltip.showAt(position, '

Click to add your marker. Position is:

' + + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + getDisplayLatLngString(ellipsoid.cartesianToCartographic(cartesian))); + } + else { + tooltip.showAt(position, '

Click on the globe to add your marker.

'); + } + } + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + }; + _.prototype.startDrawingPolygon = function (options) { + // eslint-disable-next-line no-redeclare + var options = copyOptions(options, defaultSurfaceOptions); + this.startDrawingPolyshape(true, options); + }; + _.prototype.startDrawingPolyline = function (options) { + // eslint-disable-next-line no-redeclare + var options = copyOptions(options, defaultPolylineOptions); + this.startDrawingPolyshape(false, options); + }; + _.prototype.startDrawingPolyshape = function (isPolygon, options) { + this.startDrawing(function () { + primitives.remove(poly); + markers.remove(); + mouseHandler.destroy(); + tooltip.setVisible(false); + }); + var _self = this; + var scene = this._scene; + var primitives = scene.primitives; + var tooltip = this._tooltip; + var minPoints = isPolygon ? 3 : 2; + var poly; + if (isPolygon) { + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + poly = new DrawHelper.PolygonPrimitive(options); + } + else { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + poly = new DrawHelper.PolylinePrimitive(options); + } + poly.asynchronous = false; + primitives.add(poly); + var positions = []; + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var markers = new _.BillboardGroup(this, defaultBillboard); + var mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas); + // Now wait for start + mouseHandler.setInputAction(function (movement) { + if (movement.position != null) { + var cartesian = scene.camera.pickEllipsoid(movement.position, ellipsoid); + if (cartesian) { + // first click + if (positions.length == 0) { + // If user clicks, they have started drawing, so disable editing + _self.disableAllEditMode(); + positions.push(cartesian.clone()); + markers.addBillboard(positions[0]); + } + if (positions.length >= minPoints) { + poly.positions = positions; + poly._createPrimitive = true; + } + // add new point to polygon + // this one will move with the mouse + positions.push(cartesian); + // add marker at the new position + markers.addBillboard(cartesian); + } + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); + mouseHandler.setInputAction(function (movement) { + var position = movement.endPosition; + if (position != null) { + if (positions.length == 0) { + var feature = scene.pick(position); + var isBillboard = (feature === null || feature === void 0 ? void 0 : feature.primitive) && feature.primitive instanceof Cesium.Billboard; + // Show this tooltip only if the mouse isn't over a billboard. The billboards shown for + // editing have their own tooltips and we want to show those instead. + if (!isBillboard) { + tooltip.showAt(position, 'Click to add first point'); + } + } + else { + var cartesian = scene.camera.pickEllipsoid(position, ellipsoid); + if (cartesian) { + positions.pop(); + // make sure it is slightly different + cartesian.y += 1 + Math.random(); + positions.push(cartesian); + if (positions.length >= minPoints) { + poly.positions = positions; + poly._createPrimitive = true; + } + // update marker + markers.getBillboard(positions.length - 1).position = cartesian; + // show tooltip + tooltip.showAt(position, "Click to add new point (".concat(positions.length, ")\n ").concat(positions.length >= minPoints + ? '
Double click to finish drawing' + : '')); + if (isPolygon && positions.length === 2) { + // Request a render so the first polygon point will be displayed before the user + // has clicked the second point. After the user has clicked to create a point, + // the length of positions will be (# of points) + 1, because the last point is + // wherever the mouse is. Renders will always happen on mouse movement when + // positions.length is greater than 2, due to _createPrimitive being enabled above. + scene.requestRender(); + } + } + } + } + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + mouseHandler.setInputAction(function (movement) { + var position = movement.position; + if (position != null) { + if (positions.length < minPoints + 2) { + return; + } + else { + var cartesian = scene.camera.pickEllipsoid(position, ellipsoid); + if (cartesian) { + _self.stopDrawing(); + if (typeof options.callback == 'function') { + //https://github.com/leforthomas/cesium-drawhelper/issues/13 + //need to remove last 2 positions since those are from finishing the drawing + options.callback(positions.slice(0, positions.length - 2)); + } + } + } + } + }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK); + }; + function getExtentCorners(value) { + return ellipsoid.cartographicArrayToCartesianArray([ + Cesium.Rectangle.northwest(value), + Cesium.Rectangle.northeast(value), + Cesium.Rectangle.southeast(value), + Cesium.Rectangle.southwest(value), + ]); + } + _.prototype.startDrawingExtent = function (options) { + // eslint-disable-next-line no-redeclare + var options = copyOptions(options, defaultSurfaceOptions); + this.startDrawing(function () { + if (extent != null) { + primitives.remove(extent); + } + markers === null || markers === void 0 ? void 0 : markers.remove(); + mouseHandler.destroy(); + tooltip.setVisible(false); + }); + var _self = this; + var scene = this._scene; + var primitives = this._scene.primitives; + var tooltip = this._tooltip; + var firstPoint = null; + var extent = null; + var markers = null; + var mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas); + function updateExtent(value) { + if (extent == null) { + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + extent = new DrawHelper.ExtentPrimitive(__assign(__assign({}, options), { extent: value })); + extent.asynchronous = false; + primitives.add(extent); + } + extent.extent = value; + // update the markers + var corners = getExtentCorners(value); + // create if they do not yet exist + if (markers == null) { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + markers = new _.BillboardGroup(_self, defaultBillboard); + markers.addBillboards(corners); + } + else { + markers.updateBillboardsPositions(corners); + } + } + // Now wait for start + mouseHandler.setInputAction(function (movement) { + if (movement.position != null) { + var cartesian = scene.camera.pickEllipsoid(movement.position, ellipsoid); + if (cartesian) { + if (extent == null) { + // If user clicks, they have started drawing, so disable editing + _self.disableAllEditMode(); + // create the rectangle + firstPoint = ellipsoid.cartesianToCartographic(cartesian); + var value = getExtent(firstPoint, firstPoint); + updateExtent(value); + } + else { + _self.stopDrawing(); + if (typeof options.callback == 'function') { + options.callback(getExtent(firstPoint, ellipsoid.cartesianToCartographic(cartesian))); + } + } + } + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); + mouseHandler.setInputAction(function (movement) { + var position = movement.endPosition; + if (position != null) { + if (extent == null) { + var feature = scene.pick(position); + var isBillboard = (feature === null || feature === void 0 ? void 0 : feature.primitive) && feature.primitive instanceof Cesium.Billboard; + // Show this tooltip only if the mouse isn't over a billboard. The billboards shown for + // editing have their own tooltips and we want to show those instead. + if (!isBillboard) { + tooltip.showAt(position, 'Click to start drawing rectangle'); + } + } + else { + var cartesian = scene.camera.pickEllipsoid(position, ellipsoid); + if (cartesian) { + extent._createPrimitive = true; + var value = getExtent(firstPoint, ellipsoid.cartesianToCartographic(cartesian)); + updateExtent(value); + tooltip.showAt(position, 'Drag to change rectangle extent
Click again to finish drawing'); + } + } + } + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + }; + _.prototype.startDrawingCircle = function (options) { + // eslint-disable-next-line no-redeclare + var options = copyOptions(options, defaultSurfaceOptions); + this.startDrawing(function cleanUp() { + if (circle != null) { + primitives.remove(circle); + } + markers === null || markers === void 0 ? void 0 : markers.remove(); + mouseHandler.destroy(); + tooltip.setVisible(false); + }); + var _self = this; + var scene = this._scene; + var primitives = this._scene.primitives; + var tooltip = this._tooltip; + var circle = null; + var markers = null; + var mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas); + // Now wait for start + mouseHandler.setInputAction(function (movement) { + if (movement.position != null) { + var cartesian = scene.camera.pickEllipsoid(movement.position, ellipsoid); + if (cartesian) { + if (circle == null) { + // If user clicks, they have started drawing, so disable editing + _self.disableAllEditMode(); + // create the circle + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + circle = new _.CirclePrimitive({ + center: cartesian, + radius: 0, + asynchronous: false, + material: options.material, + }); + primitives.add(circle); + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + markers = new _.BillboardGroup(_self, defaultBillboard); + markers.addBillboards([cartesian]); + } + else { + if (typeof options.callback == 'function') { + options.callback(circle.getCenter(), circle.getRadius()); + } + _self.stopDrawing(); + } + } + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); + mouseHandler.setInputAction(function (movement) { + var position = movement.endPosition; + if (position != null) { + if (circle == null) { + var feature = scene.pick(position); + var isBillboard = (feature === null || feature === void 0 ? void 0 : feature.primitive) && feature.primitive instanceof Cesium.Billboard; + // Show this tooltip only if the mouse isn't over a billboard. The billboards shown for + // editing have their own tooltips and we want to show those instead. + if (!isBillboard) { + tooltip.showAt(position, 'Click to start drawing the circle'); + } + } + else { + var cartesian = scene.camera.pickEllipsoid(position, ellipsoid); + if (cartesian) { + circle.setRadius(Cesium.Cartesian3.distance(circle.getCenter(), cartesian)); + markers.updateBillboardsPositions(cartesian); + tooltip.showAt(position, 'Move mouse to change circle radius
Click again to finish drawing'); + } + } + } + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + }; + _.prototype.enhancePrimitives = function () { + var drawHelper = this; + Cesium.Billboard.prototype.setEditable = function () { + if (this._editable) { + return; + } + this._editable = true; + var billboard = this; + var _self = this; + function enableRotation(enable) { + drawHelper._scene.screenSpaceCameraController.enableRotate = enable; + } + setListener(billboard, 'leftDown', function () { + // TODO - start the drag handlers here + // create handlers for mouseOut and leftUp for the billboard and a mouseMove + function onDrag(position) { + billboard.position = position; + _self.executeListeners({ name: 'drag', positions: position }); + } + function onDragEnd(position) { + handler.destroy(); + enableRotation(true); + _self.executeListeners({ name: 'dragEnd', positions: position }); + } + var handler = new Cesium.ScreenSpaceEventHandler(drawHelper._scene.canvas); + handler.setInputAction(function (movement) { + var cartesian = drawHelper._scene.camera.pickEllipsoid(movement.endPosition, ellipsoid); + if (cartesian) { + onDrag(cartesian); + } + else { + onDragEnd(cartesian); + } + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); + handler.setInputAction(function (movement) { + onDragEnd(drawHelper._scene.camera.pickEllipsoid(movement.position, ellipsoid)); + }, Cesium.ScreenSpaceEventType.LEFT_UP); + enableRotation(false); + }); + enhanceWithListeners(billboard); + }; + function setHighlighted(highlighted) { + // if no change + // if already highlighted, the outline polygon will be available + if (this._highlighted && this._highlighted == highlighted) { + return; + } + // disable if already in edit mode + if (this._editMode === true) { + return; + } + this._highlighted = highlighted; + // highlight by creating an outline polygon matching the polygon points + if (highlighted) { + // make sure all other shapes are not highlighted + drawHelper.setHighlighted(this); + this._strokeColor = this.strokeColor; + this.setStrokeStyle(Cesium.Color.fromCssColorString('white'), this.strokeWidth); + } + else { + if (this._strokeColor) { + this.setStrokeStyle(this._strokeColor, this.strokeWidth); + } + else { + this.setStrokeStyle(undefined, undefined); + } + } + } + function setEditMode(editMode) { + // if no change + if (this._editMode == editMode) { + return; + } + // make sure all other shapes are not in edit mode before starting the editing of this shape + drawHelper.disableAllHighlights(); + // display markers + if (editMode) { + drawHelper.setEdited(this); + var _self_1 = this; + // create the markers and handlers for the editing + if (this._markers == null) { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var markers_1 = new _.BillboardGroup(drawHelper, dragBillboard); + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var editMarkers_1 = new _.BillboardGroup(drawHelper, dragHalfBillboard); + // function for updating the edit markers around a certain point + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function updateHalfMarkers(index, positions) { + // update the half markers before and after the index + var editIndex = index - 1 < 0 ? positions.length - 1 : index - 1; + if (editIndex < editMarkers_1.countBillboards()) { + editMarkers_1.getBillboard(editIndex).position = + calculateHalfMarkerPosition(editIndex); + } + editIndex = index; + if (editIndex < editMarkers_1.countBillboards()) { + editMarkers_1.getBillboard(editIndex).position = + calculateHalfMarkerPosition(editIndex); + } + } + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function onEdited() { + _self_1.executeListeners({ + name: 'onEdited', + positions: _self_1.positions, + }); + } + var handleMarkerChanges_1 = { + dragHandlers: { + onDrag: function (index, position) { + _self_1.positions[index] = position; + updateHalfMarkers(index, _self_1.positions); + _self_1._createPrimitive = true; + }, + onDragEnd: function () { + _self_1._createPrimitive = true; + onEdited(); + }, + }, + onRightClick: function (index) { + // Need to count unique points because polygon-display adds the first point to the end. + var uniquePoints = lodash.uniqWith(_self_1.positions, Cesium.Cartesian3.equals).length; + var minPointsForRemoval = _self_1.isPolygon ? 4 : 3; + if (uniquePoints < minPointsForRemoval) { + return; + } + // remove the point and the corresponding markers + _self_1.positions.splice(index, 1); + _self_1._createPrimitive = true; + markers_1.removeBillboard(index); + editMarkers_1.removeBillboard(index); + updateHalfMarkers(index, _self_1.positions); + onEdited(); + drawHelper._scene.requestRender(); + }, + tooltip: function () { + var msg = 'Drag to move'; + // Need to count unique points because polygon-display adds the first point to the end. + var uniquePoints = lodash.uniqWith(_self_1.positions, Cesium.Cartesian3.equals).length; + var minPointsForRemoval = _self_1.isPolygon ? 4 : 3; + if (uniquePoints >= minPointsForRemoval) { + msg += '
Right click to remove'; + } + return msg; + }, + }; + // add billboards and keep an ordered list of them for the polygon edges + markers_1.addBillboards(_self_1.positions, handleMarkerChanges_1); + this._markers = markers_1; + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function calculateHalfMarkerPosition(index) { + var positions = _self_1.positions; + return ellipsoid.cartographicToCartesian(new Cesium.EllipsoidGeodesic(ellipsoid.cartesianToCartographic(positions[index]), ellipsoid.cartesianToCartographic(positions[index < positions.length - 1 ? index + 1 : 0])).interpolateUsingFraction(0.5)); + } + var halfPositions = []; + var index = 0; + var length_1 = _self_1.positions.length + (this.isPolygon ? 0 : -1); + for (; index < length_1; index++) { + halfPositions.push(calculateHalfMarkerPosition(index)); + } + var handleEditMarkerChanges_1 = { + dragHandlers: { + onDragStart: function (index, position) { + // add a new position to the polygon but not a new marker yet + ; + this.index = index + 1; + _self_1.positions.splice(this.index, 0, position); + _self_1._createPrimitive = true; + }, + onDrag: function (_index, position) { + _self_1.positions[this.index] = position; + _self_1._createPrimitive = true; + }, + onDragEnd: function (_index, position) { + // create new sets of makers for editing + markers_1.insertBillboard(this.index, position, handleMarkerChanges_1); + editMarkers_1.getBillboard(this.index - 1).position = + calculateHalfMarkerPosition(this.index - 1); + editMarkers_1.insertBillboard(this.index, calculateHalfMarkerPosition(this.index), handleEditMarkerChanges_1); + _self_1._createPrimitive = true; + onEdited(); + }, + }, + tooltip: function () { + return 'Drag to create a new point'; + }, + }; + editMarkers_1.addBillboards(halfPositions, handleEditMarkerChanges_1); + this._editMarkers = editMarkers_1; + // set on top of the polygon + markers_1.setOnTop(); + editMarkers_1.setOnTop(); + } + this._editMode = true; + } + else { + if (this._markers != null) { + this._markers.remove(); + this._editMarkers.remove(); + this._markers = null; + this._editMarkers = null; + } + this._editMode = false; + } + } + DrawHelper.PolylinePrimitive.prototype.setEditable = function () { + if (this.setEditMode) { + return; + } + var polyline = this; + polyline.isPolygon = false; + polyline.asynchronous = false; + polyline.setEditMode = setEditMode; + var originalWidth = this.width; + polyline.setHighlighted = function (highlighted) { + // disable if already in edit mode + if (this._editMode === true) { + return; + } + if (highlighted) { + drawHelper.setHighlighted(this); + this.setWidth(originalWidth * 2); + } + else { + this.setWidth(originalWidth); + } + }; + polyline.getExtent = function () { + return Cesium.Extent.fromCartographicArray(ellipsoid.cartesianArrayToCartographicArray(this.positions)); + }; + enhanceWithListeners(polyline); + polyline.setEditMode(true); + }; + DrawHelper.PolygonPrimitive.prototype.setEditable = function () { + if (this.setEditMode) { + return; + } + var polygon = this; + polygon.asynchronous = false; + polygon.setEditMode = setEditMode; + polygon.setHighlighted = setHighlighted; + enhanceWithListeners(polygon); + polygon.setEditMode(true); + }; + DrawHelper.ExtentPrimitive.prototype.setEditable = function () { + if (this.setEditMode) { + return; + } + var extent = this; + extent.asynchronous = false; + extent.setEditMode = function (editMode) { + // if no change + if (this._editMode == editMode) { + return; + } + drawHelper.disableAllHighlights(); + // display markers + if (editMode) { + // make sure all other shapes are not in edit mode before starting the editing of this shape + drawHelper.setEdited(this); + // create the markers and handlers for the editing + if (this._markers == null) { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var markers_2 = new _.BillboardGroup(drawHelper, dragBillboard); + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function onEdited() { + extent.executeListeners({ + name: 'onEdited', + extent: extent.extent, + }); + } + var handleMarkerChanges = { + dragHandlers: { + onDrag: function (index, position) { + var corner = markers_2.getBillboard((index + 2) % 4).position; + extent.setExtent(getExtent(ellipsoid.cartesianToCartographic(corner), ellipsoid.cartesianToCartographic(position))); + markers_2.updateBillboardsPositions(getExtentCorners(extent.extent)); + }, + onDragEnd: function () { + onEdited(); + }, + }, + tooltip: function () { + return 'Drag to change the corners of this extent'; + }, + }; + markers_2.addBillboards(getExtentCorners(extent.extent), handleMarkerChanges); + this._markers = markers_2; + markers_2.setOnTop(); + } + this._editMode = true; + } + else { + if (this._markers != null) { + this._markers.remove(); + this._markers = null; + } + this._editMode = false; + } + }; + extent.setHighlighted = setHighlighted; + enhanceWithListeners(extent); + extent.setEditMode(true); + }; + _.EllipsePrimitive.prototype.setEditable = function () { + if (this.setEditMode) { + return; + } + var ellipse = this; + var scene = drawHelper._scene; + ellipse.asynchronous = false; + drawHelper.registerEditableShape(ellipse); + ellipse.setEditMode = function (editMode) { + // if no change + if (this._editMode == editMode) { + return; + } + drawHelper.disableAllHighlights(); + // display markers + if (editMode) { + // make sure all other shapes are not in edit mode before starting the editing of this shape + drawHelper.setEdited(this); + var _self_2 = this; + // create the markers and handlers for the editing + if (this._markers == null) { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var markers_3 = new _.BillboardGroup(drawHelper, dragBillboard); + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function getMarkerPositions() { + return Cesium.Shapes.computeEllipseBoundary(ellipsoid, ellipse.getCenter(), ellipse.getSemiMajorAxis(), ellipse.getSemiMinorAxis(), ellipse.getRotation() + Math.PI / 2, Math.PI / 2.0).splice(0, 4); + } + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function onEdited() { + ellipse.executeListeners({ + name: 'onEdited', + center: ellipse.getCenter(), + semiMajorAxis: ellipse.getSemiMajorAxis(), + semiMinorAxis: ellipse.getSemiMinorAxis(), + rotation: 0, + }); + } + var handleMarkerChanges = { + dragHandlers: { + onDrag: function (index, position) { + var distance = Cesium.Cartesian3.distance(ellipse.getCenter(), position); + if (index % 2 == 0) { + ellipse.setSemiMajorAxis(distance); + } + else { + ellipse.setSemiMinorAxis(distance); + } + markers_3.updateBillboardsPositions(getMarkerPositions()); + }, + onDragEnd: function () { + onEdited(); + }, + }, + tooltip: function () { + return 'Drag to change the excentricity and radius'; + }, + }; + markers_3.addBillboards(getMarkerPositions(), handleMarkerChanges); + this._markers = markers_3; + // add a handler for clicking in the globe + this._globeClickhandler = new Cesium.ScreenSpaceEventHandler(scene.canvas); + this._globeClickhandler.setInputAction(function (movement) { + var pickedObject = scene.pick(movement.position); + if (!(pickedObject && pickedObject.primitive)) { + _self_2.setEditMode(false); + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); + // set on top of the polygon + markers_3.setOnTop(); + } + this._editMode = true; + } + else { + if (this._markers != null) { + this._markers.remove(); + this._markers = null; + this._globeClickhandler.destroy(); + } + this._editMode = false; + } + }; + ellipse.setHighlighted = setHighlighted; + enhanceWithListeners(ellipse); + ellipse.setEditMode(false); + }; + _.CirclePrimitive.prototype.getCircleCartesianCoordinates = function (granularity) { + var geometry = Cesium.CircleOutlineGeometry.createGeometry(new Cesium.CircleOutlineGeometry({ + ellipsoid: ellipsoid, + center: this.getCenter(), + radius: this.getRadius(), + granularity: granularity, + })); + var count = 0, value, values = []; + for (; count < geometry.attributes.position.values.length; count += 3) { + value = geometry.attributes.position.values; + values.push(new Cesium.Cartesian3(value[count], value[count + 1], value[count + 2])); + } + return values; + }; + _.CirclePrimitive.prototype.setEditable = function () { + if (this.setEditMode) { + return; + } + var circle = this; + circle.asynchronous = false; + circle.setEditMode = function (editMode) { + // if no change + if (this._editMode == editMode) { + return; + } + drawHelper.disableAllHighlights(); + // display markers + if (editMode) { + // make sure all other shapes are not in edit mode before starting the editing of this shape + drawHelper.setEdited(this); + var _self_3 = this; + // create the markers and handlers for the editing + if (this._markers == null) { + // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message + var markers_4 = new _.BillboardGroup(drawHelper, dragBillboard); + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function getMarkerPositions() { + return _self_3.getCircleCartesianCoordinates(Cesium.Math.PI_OVER_TWO); + } + // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message + function onEdited() { + circle.executeListeners({ + name: 'onEdited', + center: circle.getCenter(), + radius: circle.getRadius(), + }); + } + var handleMarkerChanges = { + dragHandlers: { + onDrag: function (_index, position) { + circle.setRadius(Cesium.Cartesian3.distance(circle.getCenter(), position)); + markers_4.updateBillboardsPositions(getMarkerPositions()); + }, + onDragEnd: function () { + onEdited(); + }, + }, + tooltip: function () { + return 'Drag to change the radius'; + }, + }; + markers_4.addBillboards(getMarkerPositions(), handleMarkerChanges); + this._markers = markers_4; + markers_4.setOnTop(); + } + this._editMode = true; + } + else { + if (this._markers != null) { + this._markers.remove(); + this._markers = null; + } + this._editMode = false; + } + }; + circle.setHighlighted = setHighlighted; + enhanceWithListeners(circle); + circle.setEditMode(true); + }; + }; + _.DrawHelperWidget = (function () { + // constructor + // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. + function _(drawHelper, options) { + // container must be specified + if (!Cesium.defined(options.container)) { + throw new Cesium.DeveloperError('Container is required'); + } + var drawOptions = { + markerIcon: './img/glyphicons_242_google_maps.png', + polylineIcon: './img/glyphicons_097_vector_path_line.png', + polygonIcon: './img/glyphicons_096_vector_path_polygon.png', + circleIcon: './img/glyphicons_095_vector_path_circle.png', + extentIcon: './img/glyphicons_094_vector_path_square.png', + clearIcon: './img/glyphicons_067_cleaning.png', + polylineDrawingOptions: defaultPolylineOptions, + polygonDrawingOptions: defaultPolygonOptions, + extentDrawingOptions: defaultExtentOptions, + circleDrawingOptions: defaultCircleOptions, + }; + fillOptions(options, drawOptions); + var _self = this; + var toolbar = document.createElement('DIV'); + toolbar.className = 'toolbar'; + options.container.appendChild(toolbar); + function addIcon(_id, url, title, callback) { + var div = document.createElement('DIV'); + div.className = 'button'; + div.title = title; + toolbar.appendChild(div); + div.onclick = callback; + var span = document.createElement('SPAN'); + div.appendChild(span); + var image = document.createElement('IMG'); + image.src = url; + span.appendChild(image); + return div; + } + var scene = drawHelper._scene; + addIcon('marker', options.markerIcon, 'Click to start drawing a 2D marker', function () { + drawHelper.startDrawingMarker({ + callback: function (position) { + _self.executeListeners({ + name: 'markerCreated', + position: position, + }); + }, + }); + }); + addIcon('polyline', options.polylineIcon, 'Click to start drawing a 2D polyline', function () { + drawHelper.startDrawingPolyline({ + callback: function (positions) { + _self.executeListeners({ + name: 'polylineCreated', + positions: positions, + }); + }, + }); + }); + addIcon('polygon', options.polygonIcon, 'Click to start drawing a 2D polygon', function () { + drawHelper.startDrawingPolygon({ + callback: function (positions) { + _self.executeListeners({ + name: 'polygonCreated', + positions: positions, + }); + }, + }); + }); + addIcon('extent', options.extentIcon, 'Click to start drawing an Extent', function () { + drawHelper.startDrawingExtent({ + callback: function (extent) { + _self.executeListeners({ name: 'extentCreated', extent: extent }); + }, + }); + }); + addIcon('circle', options.circleIcon, 'Click to start drawing a Circle', function () { + drawHelper.startDrawingCircle({ + callback: function (center, radius) { + _self.executeListeners({ + name: 'circleCreated', + center: center, + radius: radius, + }); + }, + }); + }); + // add a clear button at the end + // add a divider first + var div = document.createElement('DIV'); + div.className = 'divider'; + toolbar.appendChild(div); + addIcon('clear', options.clearIcon, 'Remove all primitives', function () { + scene.primitives.removeAll(); + }); + enhanceWithListeners(this); + } + return _; + })(); + _.prototype.addToolbar = function (container, options) { + options = copyOptions(options, { container: container }); + // @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 2. + return new _.DrawHelperWidget(this, options); + }; + function getExtent(mn, mx) { + var e = new Cesium.Rectangle(); + // Re-order so west < east and south < north + e.west = Math.min(mn.longitude, mx.longitude); + e.east = Math.max(mn.longitude, mx.longitude); + e.south = Math.min(mn.latitude, mx.latitude); + e.north = Math.max(mn.latitude, mx.latitude); + // Check for approx equal (shouldn't require abs due to re-order) + var epsilon = Cesium.Math.EPSILON7; + if (e.east - e.west < epsilon) { + e.east += epsilon * 2.0; + } + if (e.north - e.south < epsilon) { + e.north += epsilon * 2.0; + } + return e; + } + function createTooltip(frameDiv) { + // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. + var tooltip = function (frameDiv) { + var div = document.createElement('DIV'); + div.className = 'twipsy right pointer-events-none'; + var arrow = document.createElement('DIV'); + arrow.className = 'twipsy-arrow'; + div.appendChild(arrow); + var title = document.createElement('DIV'); + title.className = 'twipsy-inner'; + div.appendChild(title); + this._div = div; + this._title = title; + // add to frame div and display coordinates + frameDiv.appendChild(div); + }; + tooltip.prototype.setVisible = function (visible) { + this._div.style.display = visible ? 'block' : 'none'; + }; + tooltip.prototype.showAt = function (position, message) { + if (position && message) { + this.setVisible(true); + this._title.innerHTML = message; + this._div.style.left = position.x + 15 + 'px'; + this._div.style.top = position.y + 7 - this._div.clientHeight / 2 + 'px'; + } + }; + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + return new tooltip(frameDiv); + } + function getDisplayLatLngString(cartographic, precision) { + return (cartographic.longitude.toFixed(precision || 3) + + ', ' + + cartographic.latitude.toFixed(precision || 3)); + } + function clone(from, to) { + if (from == null || typeof from != 'object') + return from; + if (from.constructor != Object && from.constructor != Array) + return from; + if (from.constructor == Date || + from.constructor == RegExp || + from.constructor == Function || + from.constructor == String || + from.constructor == Number || + from.constructor == Boolean) + return new from.constructor(from); + to = to || new from.constructor(); + for (var name_1 in from) { + to[name_1] = + typeof to[name_1] == 'undefined' ? clone(from[name_1], null) : to[name_1]; + } + return to; + } + function fillOptions(options, defaultOptions) { + options = options || {}; + var option; + for (option in defaultOptions) { + if (options[option] === undefined) { + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + options[option] = clone(defaultOptions[option]); + } + } + } + // shallow copy + function copyOptions(options, defaultOptions) { + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + var newOptions = clone(options), option; + for (option in defaultOptions) { + if (newOptions[option] === undefined) { + // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. + newOptions[option] = clone(defaultOptions[option]); + } + } + return newOptions; + } + function setListener(primitive, type, callback) { + primitive[type] = callback; + } + function enhanceWithListeners(element) { + element._listeners = {}; + element.addListener = function (name, callback) { + this._listeners[name] = this._listeners[name] || []; + this._listeners[name].push(callback); + return this._listeners[name].length; + }; + element.executeListeners = function (event, defaultCallback) { + if (this._listeners[event.name] && + this._listeners[event.name].length > 0) { + var index = 0; + for (; index < this._listeners[event.name].length; index++) { + this._listeners[event.name][index](event); + } + } + else { + if (defaultCallback) { + defaultCallback(event); + } + } + }; + } + return _; +})(); +export default DrawHelper; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRHJhd0hlbHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9saWIvY2VzaXVtLWRyYXdoZWxwZXIvRHJhd0hlbHBlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKOzs7Ozs7OztHQVFHO0FBQ0gsb0JBQW9CO0FBQ3BCLG1KQUFtSjtBQUNuSixPQUFPLE1BQU0sTUFBTSw0QkFBNEIsQ0FBQTtBQUMvQyxPQUFPLEtBQUssSUFBSSxNQUFNLFlBQVksQ0FBQTtBQUNsQyxPQUFPLE9BQU8sTUFBTSxtREFBbUQsQ0FBQTtBQUN2RSxPQUFPLENBQUMsTUFBTSxRQUFRLENBQUE7QUFDdEIsT0FBTyxXQUFXLE1BQU0sOEJBQThCLENBQUE7QUFDdEQsT0FBTyxTQUFTLE1BQU0sMkJBQTJCLENBQUE7QUFDakQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sd0RBQXdELENBQUE7QUFDekYsOERBQThEO0FBQzlELElBQU0sTUFBT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yBmb3IgbW91c2VPdXQgYW5kIGxlZnRVcCBmb3IgdGhlIGJpbGxib2FyZCBhbmQgYSBtb3VzZU1vdmVcbiAgICAgICAgICBmdW5jdGlvbiBvbkRyYWcocG9zaXRpb246IGFueSkge1xuICAgICAgICAgICAgYmlsbGJvYXJkLnBvc2l0aW9uID0gcG9zaXRpb25cbiAgICAgICAgICAgIC8vIGZpbmQgaW5kZXhcbiAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgIGxldCBpID0gMCwgSSA9IF9zZWxmLl9vcmRlcmVkQmlsbGJvYXJkcy5sZW5ndGg7XG4gICAgICAgICAgICAgIGkgPCBJICYmIF9zZWxmLl9vcmRlcmVkQmlsbGJvYXJkc1tpXSAhPSBiaWxsYm9hcmQ7XG4gICAgICAgICAgICAgICsraVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhbGxiYWNrcy5kcmFnSGFuZGxlcnMub25EcmFnICYmXG4gICAgICAgICAgICAgIGNhbGxiYWNrcy5kcmFnSGFuZGxlcnMub25EcmFnKGdldEluZGV4KCksIHBvc2l0aW9uKVxuICAgICAgICAgIH1cbiAgICAgICAgICBmdW5jdGlvbiBvbkRyYWdFbmQocG9zaXRpb246IGFueSkge1xuICAgICAgICAgICAgaGFuZGxlci5kZXN0cm95KClcbiAgICAgICAgICAgIGVuYWJsZVJvdGF0aW9uKHRydWUpXG4gICAgICAgICAgICBjYWxsYmFja3MuZHJhZ0hhbmRsZXJzLm9uRHJhZ0VuZCAmJlxuICAgICAgICAgICAgICBjYWxsYmFja3MuZHJhZ0hhbmRsZXJzLm9uRHJhZ0VuZChnZXRJbmRleCgpLCBwb3NpdGlvbilcbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIGhhbmRsZXIgPSBuZXcgQ2VzaXVtLlNjcmVlblNwYWNlRXZlbnRIYW5kbGVyKF9zZWxmLl9zY2VuZS5jYW52YXMpXG4gICAgICAgICAgaGFuZGxlci5zZXRJbnB1dEFjdGlvbigobW92ZW1lbnQ6IGFueSkgPT4ge1xuICAgICAgICAgICAgY29uc3QgY2FydGVzaWFuID0gX3NlbGYuX3NjZW5lLmNhbWVyYS5waWNrRWxsaXBzb2lkKFxuICAgICAgICAgICAgICBtb3ZlbWVudC5lbmRQb3NpdGlvbixcbiAgICAgICAgICAgICAgZWxsaXBzb2lkXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBpZiAoY2FydGVzaWFuKSB7XG4gICAgICAgICAgICAgIG9uRHJhZyhjYXJ0ZXNpYW4pXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBvbkRyYWdFbmQoY2FydGVzaWFuKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sIENlc2l1bS5TY3JlZW5TcGFjZUV2ZW50VHlwZS5NT1VTRV9NT1ZFKVxuICAgICAgICAgIGhhbmRsZXIuc2V0SW5wdXRBY3Rpb24oKG1vdmVtZW50OiBhbnkpID0+IHtcbiAgICAgICAgICAgIG9uRHJhZ0VuZChcbiAgICAgICAgICAgICAgX3NlbGYuX3NjZW5lLmNhbWVyYS5waWNrRWxsaXBzb2lkKG1vdmVtZW50LnBvc2l0aW9uLCBlbGxpcHNvaWQpXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSwgQ2VzaXVtLlNjcmVlblNwYWNlRXZlbnRUeXBlLkxFRlRfVVApXG4gICAgICAgICAgZW5hYmxlUm90YXRpb24oZmFsc2UpXG4gICAgICAgICAgY2FsbGJhY2tzLmRyYWdIYW5kbGVycy5vbkRyYWdTdGFydCAmJlxuICAgICAgICAgICAgY2FsbGJhY2tzLmRyYWdIYW5kbGVycy5vbkRyYWdTdGFydChcbiAgICAgICAgICAgICAgZ2V0SW5kZXgoKSxcbiAgICAgICAgICAgICAgX3NlbGYuX3NjZW5lLmNhbWVyYS5waWNrRWxsaXBzb2lkKHBvc2l0aW9uLCBlbGxpcHNvaWQpXG4gICAgICAgICAgICApXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgICBpZi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gICAgICAgICAgIHRvb2x0aXAuc2hvd0F0KFxuICAgICAgICAgICAgICBwb3NpdGlvbixcbiAgICAgICAgICAgICAgYENsaWNrIHRvIGFkZCBuZXcgcG9pbnQgKCR7cG9zaXRpb25zLmxlbmd0aH0pXG4gICAgICAgICAgICAgICAke1xuICAgICAgICAgICAgICAgICBwb3NpdGlvbnMubGVuZ3RoID49IG1pblBvaW50c1xuICAgICAgICAgICAgICAgICAgID8gJzxicj5Eb3VibGUgY2xpY2sgdG8gZmluaXNoIGRyYXdpbmcnXG4gICAgICAgICAgICAgICAgICAgOiAnJ1xuICAgICAgICAgICAgICAgfWBcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGlmIChpc1BvbHlnb24gJiYgcG9zaXRpb25zLmxlbmd0aCA9PT0gMikge1xuICAgICAgICAgICAgICAvLyBSZXF1ZXN0IGEgcmVuZGVyIHNvIHRoZSBmaXJzdCBwb2x5Z29uIHBvaW50IHdpbGwgYmUgZGlzcGxheWVkIGJlZm9yZSB0aGUgdXNlclxuICAgICAgICAgICAgICAvLyBoYXMgY2xpY2tlZCB0aGUgc2Vjb25kIHBvaW50LiBBZnRlciB0aGUgdXNlciBoYXMgY2xpY2tlZCB0byBjcmVhdGUgYSBwb2ludCxcbiAgICAgICAgICAgICAgLy8gdGhlIGxlbmd0aCBvZiBwb3NpdGlvbnMgd2lsbCBiZSAoIyBvZiBwb2ludHMpICsgMSwgYmVjYXVzZSB0aGUgbGFzdCBwb2ludCBpc1xuICAgICAgICAgICAgICAvLyB3aGVyZXZlciB0aGUgbW91c2UgaXMuIFJlbmRlcnMgd2lsbCBhbHdheXMgaGFwcGVuIG9uIG1vdXNlIG1vdmVtZW50IHdoZW5cbiAgICAgICAgICAgICAgLy8gcG9zaXRpb25zLmxlbmd0aCBpcyBncmVhdGVyIHRoYW4gMiwgZHVlIHRvIF9jcmVhdGVQcmltaXRpdmUgYmVpbmcgZW5hYmxlZCBhYm92ZS5cbiAgICAgICAgICAgICAgc2Nlb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xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBfc2VsZi5zdG9wRHJhd2luZygpXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuY2FsbGJhY2sgPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvcHRpb25zLmNhbGxiYWNrKFxuICAgICAgICAgICAgICAgIGdldEV4dGVudChcbiAgICAgICAgICAgICAgICAgIGZpcnN0UG9pbnQsXG4gICAgICAgICAgICAgICAgICBlbGxpcHNvaWQuY2FydGVzaWFuVG9DYXJ0b2dyYXBoaWMoY2FydGVzaWFuKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sIENlc2l1bS5TY3JlZW5TcGFjZUV2ZW50VHlwZS5MRUZUX0NMSUNLKVxuICAgIG1vdXNlSGFuZGxlci5zZXRJbnB1dEFjdGlvbigobW92ZW1lbnQ6IGFueSkgPT4ge1xuICAgICAgY29uc3QgcG9zaXRpb24gPSBtb3ZlbWVudC5lbmRQb3NpdGlvblxuICAgICAgaWYgKHBvc2l0aW9uICE9IG51bGwpIHtcbiAgICAgICAgaWYgKGV4dGVudCA9PSBudWxsKSB7XG4gICAgICAgICAgY29uc3QgZmVhdHVyZSA9IHNjZW5lLnBpY2socG9zaXRpb24pXG4gICAgICAgICAgY29uc3QgaXNCaWxsYm9hcmQgPVxuICAgICAgICAgICAgZmVhdHVyZT8ucHJpbWl0aXZlICYmIGZlYXR1cmUucHJpbWl0aXZlIGluc3RhbmNlb2YgQ2VzaXVtLkJpbGxib2FyZFxuICAgICAgICAgIC8vIFNob3cgdGhpcyB0b29sdGlwIG9ubHkgaWYgdGhlIG1vdXNlIGlzbid0IG92ZXIgYSBiaWxsYm9hcmQuIFRoZSBiaWxsYm9hcmRzIHNob3duIGZvclxuICAgICAgICAgIC8vIGVkaXRpbmcgaGF2ZSB0aGV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SBlbHNlIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5jYWxsYmFjayA9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgIG9wdGlvbnMuY2FsbGJhY2soY2lyY2xlLmdldENlbnRlcigpLCBjaXJjbGUuZ2V0UmFkaXVzKCkpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfc2VsZi5zdG9wRHJhd2luZygpXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSwgQ2VzaXVtLlNjcmVlblNwYWNlRXZlbnRUeXBlLkxFRlRfQ0xJQ0spXG4gICAgbW91c2VIYW5kbGVyLnNldElucHV0QWN0aW9uKChtb3ZlbWVudDogYW55KSA9PiB7XG4gICAgICBjb25zdCBwb3NpdGlvbiA9IG1vdmVtZW50LmVuZFBvc2l0aW9uXG4gICAgICBpZiAocG9zaXRpb24gIT0gbnVsbCkge1xuICAgICAgICBpZiAoY2lyY2xlID09IG51bGwpIHtcbiAgICAgICAgICBjb25zdCBmZWF0dXJlID0gc2NlbmUucGljayhwb3NpdGlvbilcbiAgICAgICAgICBjb25zdCBpc0JpbGxib2FyZCA9XG4gICAgICAgICAgICBmZWF0dXJlPy5wcmltaXRpdmUgJiYgZmVhdHVyZS5wcmltaXRpdmUgaW5zdGFuY2VvZiBDZXNpdW0uQmlsbGJvYXJkXG4gICAgICAgICAgLy8gU2hvdyB0aGlzIHRvb2x0aXAgb25seSBpZiB0aGUgbW91c2UgaXNuJ3Qgb3ZlciBhIGJpbGxib2FyZC4gVGhlIGJpbGxib2FyZHMgc2hvd24gZm9yXG4gICAgICAgICAgLy8gZWRpdGluZyBoYXZlIHRoZWlyIG93biB0b29sdGlwcyBhbmQgd2Ugd2FudCB0byBzaG93IHRob3NlIGluc3RlYWQuXG4gICAgICAgICAgaWYgKCFpc0JpbGxib2FyZCkge1xuICAgICAgICAgICAgdG9vbHRpcC5zaG93QXQocG9zaXRpb24sICdDbGljayB0byB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ICAgZWRpdEluZGV4ID0gaW5kZXhcbiAgICAgICAgICAgIGlmIChlZGl0SW5kZXggPCBlZGl0TWFya2Vycy5jb3VudEJpbGxib2FyZHMoKSkge1xuICAgICAgICAgICAgICBlZGl0TWFya2Vycy5nZXRCaWxsYm9hcmQoZWRpdEluZGV4KS5wb3NpdGlvbiA9XG4gICAgICAgICAgICAgICAgY2FsY3VsYXRlSGFsZk1hcmtlclBvc2l0aW9uKGVkaXRJbmRleClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDEyNTIpIEZJWE1FOiBGdW5jdGlvbiBkZWNsYXJhdGlvbnMgYXJlIG5vdCBhbGxvd2VkIGluc2lkZSBibG9jay4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgICAgICAgZnVuY3Rpb24gb25FZGl0ZWQoKSB7XG4gICAgICAgICAgICBfc2VsZi5leGVjdXRlTGlzdGVuZXJzKHtcbiAgICAgICAgICAgICAgbmFtZTogJ29uRWRpdGVkJyxcbiAgICAgICAgICAgICAgcG9zaXRpb25zOiBfc2VsZi5wb3NpdGlvbnMsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCBoYW5kbGVNYXJrZXJDaGFuZ2VzID0ge1xuICAgICAgICAgICAgZHJhZ0hhbmRsZXJzOiB7XG4gICAgICAgICAgICAgIG9uRHJhZyhpbmRleDogYW55LCBwb3NpdGlvbjogYW55KSB7XG4gICAgICAgICAgICAgICAgX3NlbGYucG9zaXRpb25zW2luZGV4XSA9IHBvc2l0aW9uXG4gICAgICAgICAgICAgICAgdXBkYXRlSGFsZk1hcmtlcnMoaW5kZXgsIF9zZWxmLnBvc2l0aW9ucylcbiAgICAgICAgICAgICAgICBfc2VsZi5fY3JlYXRlUHJpbWl0aXZlID0gdHJ1ZVxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBvbkRyYWdFbmQoKSB7XG4gICAgICAgICAgICAgICAgX3NlbGYuX2NyZWF0ZVByaW1pdGl2ZSA9IHRydWVcbiAgICAgICAgICAgICAgICBvbkVkaXRlZCgpXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb25SaWdodENsaWNrKGluZGV4OiBhbnkpIHtcbiAgICAgICAgICAgICAgLy8gTmVlZCB0byBjb3VudCB1bmlxdWUgcG9pbnRzIGJlY2F1c2UgcG9seWdvbi1kaXNwbGF5IGFkZHMgdGhlIGZpcnN0IHBvaW50IHRvIHRoZSBlbmQuXG4gICAgICAgICAgICAgIGNvbnN0IHVuaXF1ZVBvaW50cyA9IGxvZGFzaC51bmlxV2l0aChcbiAgICAgICAgICAgICAgICBfc2VsZi5wb3NpdGlvbnMsXG4gICAgICAgICAgICAgICAgQ2VzaXVtLkNhcnRlc2lhbjMuZXF1YWxzXG4gICAgICAgICAgICAgICkubGVuZ3RoXG4gICAgICAgICAgICAgIGNvbnN0IG1pblBvaW50c0ZvclJlbW92YWwgPSBfc2VsZi5pc1BvbHlnb24gPyA0IDogM1xuICAgICAgICAgICAgICBpZiAodW5pcXVlUG9pbnRzIDwgbWluUG9pbnRzRm9yUmVtb3ZhbCkge1xuICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIC8vIHJlbW92ZSB0aGUgcG9pbnQgYW5kIHRoZSBjb3JyZXNwb25kaW5nIG1hcmtlcnNcbiAgICAgICAgICAgICAgX3NlbGYucG9zaXRpb25zLnNwbGljZShpbmRleCwgMSlcbiAgICAgICAgICAgICAgX3NlbGYuX2NyZWF0ZVByaW1pdGl2ZSA9IHRydWVcbiAgICAgICAgICAgICAgbWFya2Vycy5yZW1vdmVCaWxsYm9hcmQoaW5kZXgpXG4gICAgICAgICAgICAgIGVkaXRNYXJrZXJzLnJlbW92ZUJpbGxib2FyZChpbmRleClcbiAgICAgICAgICAgICAgdXBkYXRlSGFsZk1hcmtlcnMoaW5kZXgsIF9zZWxmLnBvc2l0aW9ucylcbiAgICAgICAgICAgICAgb25FZGl0ZWQoKVxuICAgICAgICAgICAgICBkcmF3SGVscGVyLl9zY2VuZS5yZXF1ZXN0UmVuZGVyKClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB0b29sdGlwKCkge1xuICAgICAgICAgICAgICBsZXQgbXNnID0gJ0RyYWcgdG8gbW92ZSdcbiAgICAgICAgICAgICAgLy8gTmVlZCB0byBjb3VudCB1bmlxdWUgcG9pbnRzIGJlY2F1c2UgcG9seWdvbi1kaXNwbGF5IGFkZHMgdGhlIGZpcnN0IHBvaW50IHRvIHRoZSBlbmQuXG4gICAgICAgICAgICAgIGNvbnN0IHVuaXF1ZVBvaW50cyA9IGxvZGFzaC51bmlxV2l0aChcbiAgICAgICAgICAgICAgICBfc2VsZi5wb3NpdGlvbnMsXG4gICAgICAgICAgICAgICAgQ2VzaXVtLkNhcnRlc2lhbjMuZXF1YWxzXG4gICAgICAgICAgICAgICkubGVuZ3RoXG4gICAgICAgICAgICAgIGNvbnN0IG1pblBvaW50c0ZvclJlbW92YWwgPSBfc2VsZi5pc1BvbHlnb24gPyA0IDogM1xuICAgICAgICAgICAgICBpZiAodW5pcXVlUG9pbnRzID49IG1pblBvaW50c0ZvclJlbW92YWwpIHtcbiAgICAgICAgICAgICAgICBtc2cgKz0gJzxicj5SaWdodCBjbGljayB0byByZW1vdmUnXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgcmV0dXJuIG1zZ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gYWRkIGJpbGxib2FyZHMgYW5kIGtlZXAgYW4gb3JkZXJlZCBsaXN0IG9mIHRoZW0gZm9yIHRoZSBwb2x5Z29uIGVkZ2VzXG4gICAgICAgICAgbWFya2Vycy5hZGRCaWxsYm9hcmRzKF9zZWxmLn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RpdGluZ1xuICAgICAgICAgICAgICAgIG1hcmtlcnMuaW5zZXJ0QmlsbGJvYXJkKFxuICAgICAgICAgICAgICAgICAgKHRoaXMgYXMgYW55KS5pbmRleCxcbiAgICAgICAgICAgICAgICAgIHBvc2l0aW9uLFxuICAgICAgICAgICAgICAgICAgaGFuZGxlTWFya2VyQ2hhbmdlc1xuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBlZGl0TWFya2Vycy5nZXRCaWxsYm9hcmQoKHRoaXMgYXMgYW55KS5pbmRleCAtIDEpLnBvc2l0aW9uID1cbiAgICAgICAgICAgICAgICAgIGNhbGN1bGF0ZUhhbGZNYXJrZXJQb3NpdGlvbigodGhpcyBhcyBhbnkpLmluZGV4IC0gMSlcbiAgICAgICAgICAgICAgICBlZGl0TWFya2Vycy5pbnNlcnRCaWxsYm9hcmQoXG4gICAgICAgICAgICAgICAgICAodGhpcyBhcyBhbnkpLmluZGV4LFxuICAgICAgICAgICAgICAgICAgY2FsY3VsYXRlSGFsZk1hcmtlclBvc2l0aW9uKCh0aGlzIGFzIGFueSkuaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgaGFuZGxlRWRpdE1hcmtlckNoYW5nZXNcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgX3NlbGYuX2NyZWF0ZVByaW1pdGl2ZSA9IHRydWVcbiAgICAgICAgICAgICAgICBvbkVkaXRlZCgpXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdG9vbHRpcCgpIHtcbiAgICAgICAgICAgICAgcmV0dXJuICdEcmFnIHRvIGNyZWF0ZSBhIG5ldyBwb2ludCdcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfVxuICAgICAgICAgIGVkaXRNYXJrZXJzLmFkZEJpbGxib2FyZHMoaGFsZlBvc2l0aW9ucywgaGFuZGxlRWRpdE1hcmtlckNoYW5nZXMpXG4gICAgICAgICAgdGhpcy5fZWRpdE1hcmtl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jb25zdHJ1Y3Qgcy4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgICAgICAgICBjb25zdCBtYXJrZXJzID0gbmV3IF8uQmlsbGJvYXJkR3JvdXAoZHJhd0hlbHBlciwgZHJhZ0JpbGxib2FyZClcbiAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgxMjUyKSBGSVhNRTogRnVuY3Rpb24gZGVjbGFyYXRpb25zIGFyZSBub3QgYWxsb3dlZCBpbnNpZGUgYmxvY2suLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgICAgICAgZnVuY3Rpb24gb25FZGl0ZWQoKSB7XG4gICAgICAgICAgICAgIGV4dGVudC5leGVjdXRlTGlzdGVuZXJzKHtcbiAgICAgICAgICAgICAgICBuYW1lOiAnb25FZGl0ZWQnLFxuICAgICAgICAgICAgICAgIGV4dGVudDogZXh0ZW50LmV4dGVudCxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGhhbmRsZU1hcmtlckNoYW5nZXMgPSB7XG4gICAgICAgICAgICAgIGRyYWdIYW5kbGVyczoge1xuICAgICAgICAgICAgICAgIG9uRHJhZyhpbmRleDogYW55LCBwb3NpdGlvbjogYW55KSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBjb3JuZXIgPSBtYXJrZXJzLmdldEJpbGxib2FyZCgoaW5kZXggKyAyKSAlIDQpLnBvc2l0aW9uXG4gICAgICAgICAgICAgICAgICBleHRlbnQuc2V0RXh0ZW50KFxuICAgICAgICAgICAgICAgICAgICBnZXRFeHRlbnQoXG4gICAgICAgICAgICAgICAgICAgICAgZWxsaXBzb2lkLmNhcnRlc2lhblRvQ2FydG9ncmFwaGljKGNvcm5lciksXG4gICAgICAgICAgICAgICAgICAgICAgZWxsaXBzb2lkLmNhcnRlc2lhblRvQ2FydG9ncmFwaGljKHBvc2l0aW9uKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBtYXJrZXJzLnVwZGF0ZUJpbGxib2FyZHNQb3NpdGlvbnMoXG4gICAgICAgICAgICAgICAgICAgIGdldEV4dGVudENvcm5lcnMoZXh0ZW50LmV4dGVudClcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG9uRHJhZ0VuZCgpIHtcbiAgICAgICAgICAgICAgICAgIG9uRWRpdGVkKClcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB0b29sdGlwKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAnRHJhZyB0byBjaGFuZ2UgdGhlIGNvcm5lcnMgb2YgdGhpcyBleHRlbnQnXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBtYXJrZXJzLmFkZEJpbGxib2FyZHMoXG4gICAgICAgICAgICAgIGdldEV4dGVudENvcm5lcnMoZXh0ZW50LmV4dGVudCksXG4gICAgICAgICAgICAgIGhhbmRsZU1hcmtlckNoYW5nZXNcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHRoaXMuX21hcmtlcnMgPSBtYXJrZXJzXG4gICAgICAgICAgICBtYXJrZXJzLnNldE9uVG9wKClcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhpcy5fZWRpdE1vZGUgPSB0cnVlXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKHRoaXMuX21hcmtlcnMgIT0gbnVsbCkge1xuICAgICAgICAgICAgdGhpcy5fbWFya2Vycy5yZW1vdmUoKVxuICAgICAgICAgICAgdGhpcy5fbWFya2VycyA9IG51bGxcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhpcy5fZWRpdE1vZGUgP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G4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICBpZiAoaW5kZXggJSAyID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZWxsaXBzZS5zZXRTZW1pTWFqb3JBeGlzKGRpc3RhbmNlKVxuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxsaXBzZS5zZXRTZW1pTWlub3JBeGlzKGRpc3RhbmNlKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgbWFya2Vycy51cGRhdGVCaWxsYm9hcmRzUG9zaXRpb25zKGdldE1hcmtlclBvc2l0aW9ucygpKVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb25EcmFnRW5kKCkge1xuICAgICAgICAgICAgICAgICAgb25FZGl0ZWQoKVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHRvb2x0aXAoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICdEcmFnIHRvIGNoYW5nZSB0aGUgZXhjZW50cmljaXR5IGFuZCByYWRpdXMnXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBtYXJrZXJzLmFkZEJpbGxib2FyZHMoZ2V0TWFya2VyUG9zaXRpb25zKCksIGhhbmRsZU1hcmtlckNoYW5nZXMpXG4gICAgICAgICAgICB0aGlzLl9tYXJrZXJzID0gbWFya2Vyc1xuICAgICAgICAgICAgLy8gYWRkIGEgaGFuZGxlciBmb3IgY2xpY2tpbmcgaW4gdGhlIGdsb2JlXG4gICAgICAgICAgICB0aGlzLl9nbG9iZUNsaWNraGFuZGxlciA9IG5ldyBDZXNpdW0uU2NyZWVuU3BhY2VFdmVudEhhbmRsZXIoXG4gICAgICAgICAgICAgIHNjZW5lLmNhbnZhc1xuICAgICAgICAgICAgKVxuICAgICAgICAgICAgdGhpcy5fZ2xvYmVDbGlja2hhbmRsZXIu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lvbiAoXG4gICAgICBncmFudWxhcml0eTogYW55XG4gICAgKSB7XG4gICAgICBjb25zdCBnZW9tZXRyeSA9IENlc2l1bS5DaXJjbGVPdXRsaW5lR2VvbWV0cnkuY3JlYXRlR2VvbWV0cnkoXG4gICAgICAgIG5ldyBDZXNpdW0uQ2lyY2xlT3V0bGluZUdlb21ldHJ5KHtcbiAgICAgICAgICBlbGxpcHNvaWQsXG4gICAgICAgICAgY2VudGVyOiB0aGlzLmdldENlbnRlcigpLFxuICAgICAgICAgIHJhZGl1czogdGhpcy5nZXRSYWRpdXMoKSxcbiAgICAgICAgICBncmFudWxhcml0eSxcbiAgICAgICAgfSlcbiAgICAgIClcbiAgICAgIGxldCBjb3VudCA9IDAsXG4gICAgICAgIHZhbHVlLFxuICAgICAgICB2YWx1ZXMgPSBbXVxuICAgICAgZm9yICg7IGNvdW50IDwgZ2VvbWV0cnkuYXR0cmlidXRlcy5wb3NpdGlvbi52YWx1ZXMubGVuZ3RoOyBjb3VudCArPSAzKSB7XG4gICAgICAgIHZhbHVlID0gZ2VvbWV0cnkuYXR0cmlidXRlcy5wb3NpdGlvbi52YWx1ZXNcbiAgICAgICAgdmFsdWVzLnB1c2goXG4gICAgICAgICAgbmV3IENlc2l1bS5DYXJ0ZXNpYW4zKFxuICAgICAgICAgICAgdmFsdWVbY291bnRdLFxuICAgICAgICAgICAgdmFsdWVbY291bnQgKyAxXSxcbiAgICAgICAgICAgIHZhbHVlW2NvdW50ICsgMl1cbiAgICAgICAgICApXG4gICAgICAgIClcbiAgICAgIH1cbiAgICAgIHJldHVybiB2YWx1ZXNcbiAgICB9XG4gICAgXy5DaXJjbGVQcmltaXRpdmUucHJvdG90eXBlLnNldEVkaXRhYmxlID0gZnVuY3Rpb24gKCkge1xuICAgICAgaWYgKHRoaXMuc2V0RWRpdE1vZGUpIHtcbiAgICAgICAgcmV0dXJuXG4gICAgICB9XG4gICAgICBjb25zdCBjaXJjbGUgPSB0aGlzXG4gICAgICBjaXJjbGU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MTI1MikgRklYTUU6IEZ1bmN0aW9uIGRlY2xhcmF0aW9ucyBhcmUgbm90IGFsbG93ZWQgaW5zaWRlIGJsb2NrLi4uIFJlbW92ZSB0aGlzIGNvbW1lbnQgdG8gc2VlIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2VcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldE1hcmtlclBvc2l0aW9ucygpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIF9zZWxmLmdldENpcmNsZUNhcnRlc2lhbkNvb3JkaW5hdGVzKFxuICAgICAgICAgICAgICAgIENlc2l1bS5NYXRoLlBJX09WRVJfVFdPXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgxMjUyKSBGSVhNRTogRnVuY3Rpb24gZGVjbGFyYXRpb25zIGFyZSBub3QgYWxsb3dlZCBpbnNpZGUgYmxvY2suLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgICAgICAgZnVuY3Rpb24gb25FZGl0ZWQoKSB7XG4gICAgICAgICAgICAgIGNpcmNsZS5leGVjdXRlTGlzdGVuZXJzKHtcbiAgICAgICAgICAgICAgICBuYW1lOiAnb25FZGl0ZWQnLFxuICAgICAgICAgICAgICAgIGNlbnRlcjogY2lyY2xlLmdldENlbnRlcigpLFxuICAgICAgICAgICAgICAgIHJhZGl1czogY2lyY2xlLmdldFJhZGl1cygpLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgaGFuZGxlTWFya2VyQ2hhbmdlcyA9IHtcbiAgICAgICAgICAgICAgZHJhZ0hhbmRsZXJzOiB7XG4gICAgICAgICAgICAgICAgb25EcmFnKF9pbmRleDogYW55LCBwb3NpdGlvbjogYW55KSB7XG4gICAgICAgICAgICAgICAgICBjaXJjbGUuc2V0UmFkaXVzKFxuICAgICAgICAgICAgICAgICAgICBDZXNpdW0uQ2FydGVzaWFuMy5kaXN0YW5jZShjaXJjbGUuZ2V0Q2VudGVyKCksIHBvc2l0aW9uKVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgbWFya2Vycy51cGRhdGVCaWxsYm9hcmRzUG9zaXRpb25zKGdldE1hcmtlclBvc2l0aW9ucygpKVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgb25EcmFnRW5kKCkge1xuICAgICAgICAgICAgICAgICAgb25FZGl0ZWQoKVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHRvb2x0aXAoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICdEcmFnIHRvIGNoYW5nZSB0aGUgcmFkaXVzJ1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFya2Vycy5hZGRCaWxsYm9hcmRzKGdldE1hcmtlclBvc2l0aW9ucygpLCBoYW5kbGVNYXJrZXJDaGFuZ2VzKVxuICAgICAgICAgICAgdGhpcy5fbWFya2VycyA9IG1hcmtlcnNcbiAgICAgICAgICAgIG1hcmtlcnMuc2V0T25Ub3AoKVxuICAgICAgICAgIH1cbiAgICAgICAgICB0aGlzLl9lZGl0TW9kZSA9IHRydWVcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAodGhpcy5fbWFya2VycyAhPSBudWxsKSB7XG4gICAgICAgICAgICB0aGlzLl9tYXJrZXJzLnJlbW92ZSgpXG4gICAgICAgICAgICB0aGlzLl9tYXJrZXJzID0gbnVsbFxuICAgICAgICAgIH1cbiAgICAgICAgICB0aGlzLl9lZGl0TW9kZSA9IGZhbHNlXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGNpcmNsZS5zZXRIaWdobGlnaHRlZCA9IHNldEhpZ2hsaWdodGVkXG4gICAgICBlbmhhbmNlV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ZUVsZW1lbnQoJ0lNRycpXG4gICAgICAgIDsoaW1hZ2UgYXMgYW55KS5zcmMgPSB1cmxcbiAgICAgICAgc3Bhbi5hcHBlbmRDaGlsZChpbWFnZSlcbiAgICAgICAgcmV0dXJuIGRpdlxuICAgICAgfVxuICAgICAgY29uc3Qgc2NlbmUgPSBkcmF3SGVscGVyLl9zY2VuZVxuICAgICAgYWRkSWNvbihcbiAgICAgICAgJ21hcmtlcicsXG4gICAgICAgIG9wdGlvbnMubWFya2VySWNvbixcbiAgICAgICAgJ0NsaWNrIHRvIHN0YXJ0IGRyYXdpbmcgYSAyRCBtYXJrZXInLFxuICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgZHJhd0hlbHBlci5zdGFydERyYXdpbmdNYXJrZXIoe1xuICAgICAgICAgICAgY2FsbGJhY2socG9zaXRpb246IGFueSkge1xuICAgICAgICAgICAgICBfc2VsZi5leGVjdXRlTGlzdGVuZXJzKHtcbiAgICAgICAgICAgICAgICBuYW1lOiAnbWFya2VyQ3JlYXRlZCcsXG4gICAgICAgICAgICAgICAgcG9zaXRpb24sXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIClcbiAgICAgIGFkZEljb24oXG4gICAgICAgICdwb2x5bGluZScsXG4gICAgICAgIG9wdGlvbnMucG9seWxpbmVJY29uLFxuICAgICAgICAnQ2xpY2sgdG8gc3RhcnQgZHJhd2luZyBhIDJEIHBvbHlsaW5lJyxcbiAgICAgICAgKCkgPT4ge1xuICAgICAgICAgIGRyYXdIZWxwZXIuc3RhcnREcmF3aW5nUG9seWxpbmUoe1xuICAgICAgICAgICAgY2FsbGJhY2socG9zaXRpb25zOiBhbnkpIHtcbiAgICAgICAgICAgICAgX3NlbGYuZXhlY3V0ZUxpc3RlbmVycyh7XG4gICAgICAgICAgICAgICAgbmFtZTogJ3BvbHlsaW5lQ3JlYXRlZCcsXG4gICAgICAgICAgICAgICAgcG9zaXRpb25zLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICApXG4gICAgICBhZGRJY29uKFxuICAgICAgICAncG9seWdvbicsXG4gICAgICAgIG9wdGlvbnMucG9seWdvbkljb24sXG4gICAgICAgICdDbGljayB0byBzdGFydCBkcmF3aW5nIGEgMkQgcG9seWdvbicsXG4gICAgICAgICgpID0+IHtcbiAgICAgICAgICBkcmF3SGVscGVyLnN0YXJ0RHJhd2luZ1BvbHlnb24oe1xuICAgICAgICAgICAgY2FsbGJhY2socG9zaXRpb25zOiBhbnkpIHtcbiAgICAgICAgICAgICAgX3NlbGYuZXhlY3V0ZUxpc3RlbmVycyh7XG4gICAgICAgICAgICAgICAgbmFtZTogJ3BvbHlnb25DcmVhdGVkJyxcbiAgICAgICAgICAgICAgICBwb3NpdGlvbnMsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIClcbiAgICAgIGFkZEljb24oXG4gICAgICAgICdleHRlbnQnLFxuICAgICAgICBvcHRpb25zLmV4dGVudEljb24sXG4gICAgICAgICdDbGljayB0byBzdGFydCBkcmF3aW5nIGFuIEV4dGVudCcsXG4gICAgICAgICgpID0+IHtcbiAgICAgICAgICBkcmF3SGVscGVyLnN0YXJ0RHJhd2luZ0V4dGVudCh7XG4gICAgICAgICAgICBjYWxsYmFjayhleHRlbnQ6IGFueSkge1xuICAgICAgICAgICAgICBfc2VsZi5leGVjdXRlTGlzdGVuZXJzKHsgbmFtZTogJ2V4dGVudENyZWF0ZWQnLCBleHRlbnQgfSlcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgKVxuICAgICAgYWRkSWNvbihcbiAgICAgICAgJ2NpcmNsZScsXG4gICAgICAgIG9wdGlvbnMuY2lyY2xlSWNvbixcbiAgICAgICAgJ0NsaWNrIHRvI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gICAgZWxlbWVudC5leGVjdXRlTGlzdGVuZXJzID0gZnVuY3Rpb24gKGV2ZW50OiBhbnksIGRlZmF1bHRDYWxsYmFjazogYW55KSB7XG4gICAgICBpZiAoXG4gICAgICAgIHRoaXMuX2xpc3RlbmVyc1tldmVudC5uYW1lXSAmJlxuICAgICAgICB0aGlzLl9saXN0ZW5lcnNbZXZlbnQubmFtZV0ubGVuZ3RoID4gMFxuICAgICAgKSB7XG4gICAgICAgIGxldCBpbmRleCA9IDBcbiAgICAgICAgZm9yICg7IGluZGV4IDwgdGhpcy5fbGlzdGVuZXJzW2V2ZW50Lm5hbWVdLmxlbmd0aDsgaW5kZXgrKykge1xuICAgICAgICAgIHRoaXMuX2xpc3RlbmVyc1tldmVudC5uYW1lXVtpbmRleF0oZXZlbnQpXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChkZWZhdWx0Q2FsbGJhY2spIHtcbiAgICAgICAgICBkZWZhdWx0Q2FsbGJhY2soZXZlbnQpXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgcmV0dXJuIF9cbn0pKClcbmV4cG9ydCBkZWZhdWx0IERyYXdIZWxwZXJcbiJdfQ== \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/drag-half.svg b/src/main/webapp/lib/cesium-drawhelper/drag-half.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/drag-half.svg rename to src/main/webapp/lib/cesium-drawhelper/drag-half.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/vertex.svg b/src/main/webapp/lib/cesium-drawhelper/vertex.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/vertex.svg rename to src/main/webapp/lib/cesium-drawhelper/vertex.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_222222_256x240.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_222222_256x240.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_222222_256x240.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_222222_256x240.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_454545_256x240.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_454545_256x240.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_454545_256x240.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_454545_256x240.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_888888_256x240.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_888888_256x240.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_888888_256x240.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_888888_256x240.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png b/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png rename to src/main/webapp/lib/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.css b/src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.css rename to src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.css diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.min.css b/src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.min.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.min.css rename to src/main/webapp/lib/jquery/css/smoothness/jquery-ui-1.9.1.custom.min.css diff --git a/src/main/webapp/react-component/about/container.d.ts b/src/main/webapp/react-component/about/container.d.ts new file mode 100644 index 00000000000..5c78d7790dc --- /dev/null +++ b/src/main/webapp/react-component/about/container.d.ts @@ -0,0 +1,3 @@ +/// +declare const AboutContainer: () => JSX.Element; +export default AboutContainer; diff --git a/src/main/webapp/react-component/about/container.js b/src/main/webapp/react-component/about/container.js new file mode 100644 index 00000000000..f68294863ca --- /dev/null +++ b/src/main/webapp/react-component/about/container.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import About from './presentation'; +import moment from 'moment'; +import { Environment } from '../../js/Environment'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +var AboutContainer = function () { + var config = useConfiguration().config; + return (React.createElement(About, { date: moment(Environment.commitDate).format('MMMM Do YYYY'), branding: (config === null || config === void 0 ? void 0 : config.customBranding) || '', isDirty: Environment.isDirty, commitHash: Environment.commitHash, commitDate: Environment.commitDate, product: (config === null || config === void 0 ? void 0 : config.product) || '', version: (config === null || config === void 0 ? void 0 : config.version) || '' })); +}; +export default AboutContainer; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9hYm91dC9jb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEtBQUssTUFBTSxnQkFBZ0IsQ0FBQTtBQUNsQyxPQUFPLE1BQU0sTUFBTSxRQUFRLENBQUE7QUFDM0IsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHNCQUFzQixDQUFBO0FBQ2xELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDRDQUE0QyxDQUFBO0FBRTdFLElBQU0sY0FBYyxHQUFHO0lBQ2IsSUFBQSxNQUFNLEdBQUssZ0JBQWdCLEVBQUUsT0FBdkIsQ0FBdUI7SUFDckMsT0FBTyxDQUNMLG9CQUFDLEtBQUssSUFDSixJQUFJLEVBQUUsTUFBTSxDQUFDLFdBQVcsQ0FBQyxVQUFVLENBQUMsQ0FBQyxNQUFNLENBQUMsY0FBYyxDQUFDLEVBQzNELFFBQVEsRUFBRSxDQUFBLE1BQU0sYUFBTixNQUFNLHVCQUFOLE1BQU0sQ0FBRSxjQUFjLEtBQUksRUFBRSxFQUN0QyxPQUFPLEVBQUUsV0FBVyxDQUFDLE9BQU8sRUFDNUIsVUFBVSxFQUFFLFdBQVcsQ0FBQyxVQUFVLEVBQ2xDLFVBQVUsRUFBRSxXQUFXLENBQ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== \ No newline at end of file diff --git a/src/main/webapp/react-component/about/index.d.ts b/src/main/webapp/react-component/about/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/about/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/about/index.js b/src/main/webapp/react-component/about/index.js new file mode 100644 index 00000000000..f98407861ee --- /dev/null +++ b/src/main/webapp/react-component/about/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2Fib3V0L2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGFBQWEsQ0FBQSIsInNvdX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p/react-component/about/presentation.d.ts new file mode 100644 index 00000000000..019533874fa --- /dev/null +++ b/src/main/webapp/react-component/about/presentation.d.ts @@ -0,0 +1,12 @@ +/// +interface Props { + branding: string; + product: string; + version: string; + commitHash: string; + commitDate: string; + isDirty: boolean; + date: string; +} +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/about/presentation.js b/src/main/webapp/react-component/about/presentation.js new file mode 100644 index 00000000000..4323ae9090b --- /dev/null +++ b/src/main/webapp/react-component/about/presentation.js @@ -0,0 +1,53 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { CustomElement } from '../styles/mixins'; +import { hot } from 'react-hot-loader'; +import Divider from '@mui/material/Divider'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", " overflow: auto;\n padding: ", " 0px;\n\n .about-content {\n margin: auto;\n max-width: ", ";\n padding: 0px\n ", ";\n }\n\n .content-version,\n .version-message {\n padding: ", ";\n }\n"], ["\n ", " overflow: auto;\n padding: ", " 0px;\n\n .about-content {\n margin: auto;\n max-width: ", ";\n padding: 0px\n ", ";\n }\n\n .content-version,\n .version-message {\n padding: ", ";\n }\n"])), CustomElement, function (props) { return props.theme.minimumSpacing; }, function (props) { + return props.theme.screenBelow(props.theme.mediumScreenSize) + ? '100%' + : '1200px'; +}, function (props) { + return props.theme.screenBelow(props.theme.mediumScreenSize) + ? '20px' + : '100px'; +}, function (props) { return props.theme.minimumSpacing; }); +export default hot(module)(function (props) { + return (React.createElement(Root, null, + React.createElement("div", { className: "about-content is-large-font" }, + React.createElement("div", null, + React.createElement("span", { "data-id": "branding-label", className: "is-bold" }, props.branding), + React.createElement("span", { "data-id": "product-label" }, + " ", + props.product)), + React.createElement(Divider, { orientation: "horizontal", variant: "fullWidth", className: "my-3" }), + React.createElement("div", { className: "content-version" }, + React.createElement("div", null, + React.createElement("div", { className: "version-title" }, "Version"), + React.createElement("div", { "data-id": "version-label", className: "version-message is-medium-font" }, props.version)), + React.createElement(Divider, { orientation: "horizontal", variant: "fullWidth", className: "my-3" }), + React.createElement("div", null, + React.createElement("div", { className: "version-title" }, "Unique Identifier"), + React.createElement("div", { "data-id": "unique-identifier-label", className: "version-message is-medium-font" }, "".concat(props.commitHash, " ").concat(props.isDirty ? 'with Changes' : ''))), + React.createElement(Divider, { orientation: "horizontal", variant: "fullWidth", className: "my-3" }), + React.createElement("div", null, + React.createElement("div", { className: "version-title" }, "Release Date"), + React.createElement("div", { "data-id": "release-date-label", className: "version-message is-medium-font" }, props.date)))))); +}); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9hYm91dC9wcmVzZW50YXRpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7QUFDdEMsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ2hELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLE9BQU8sT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WZhdWx0IGhvdChtb2R1bGUpKChwcm9wczogUHJvcHMpID0+IHtcbiAgcmV0dXJuIChcbiAgICA8Um9vdD5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiYWJvdXQtY29udGVudCBpcy1sYXJnZS1mb250XCI+XG4gICAgICAgIDxkaXY+XG4gICAgICAgICAgPHNwYW4gZGF0YS1pZD1cImJyYW5kaW5nLWxhYmVsXCIgY2xhc3NOYW1lPVwiaXMtYm9sZFwiPlxuICAgICAgICAgICAge3Byb3BzLmJyYW5kaW5nfVxuICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICA8c3BhbiBkYXRhLWlkPVwicHJvZHVjdC1sYWJlbFwiPiB7cHJvcHMucHJvZHVjdH08L3NwYW4+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8RGl2aWRlclxuICAgICAgICAgIG9yaWVudGF0aW9uPVwiaG9yaXpvbnRhbFwiXG4gICAgICAgICAgdmFyaWFudD1cImZ1bGxXaWR0aFwiXG4gICAgICAgICAgY2xhc3NOYW1lPVwibXktM1wiXG4gICAgICAgIC8+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiY29udGVudC12ZXJzaW9uXCI+XG4gICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwidmVyc2lvbi10aXRsZVwiPlZlcnNpb248L2Rpdj5cbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgZGF0YS1pZD1cInZlcnNpb24tbGFiZWxcIlxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ2ZXJzaW9uLW1lc3NhZ2UgaXMtbWVkaXVtLWZvbnRcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICB7cHJvcHMudmVyc2lvbn1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDxEaXZpZGVyXG4gICAgICAgICAgICBvcmllbnRhdGlvbj1cImhvcml6b250YWxcIlxuICAgICAgICAgICAgdmFyaWFudD1cImZ1bGxXaWR0aFwiXG4gICAgICAgICAgICBjbGFzc05hbWU9XCJteS0zXCJcbiAgICAgICAgICAvPlxuICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInZlcnNpb24tdGl0bGVcIj5VbmlxdWUgSWRlbnRpZmllcjwvZGl2PlxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICBkYXRhLWlkPVwidW5pcXVlLWlkZW50aWZpZXItbGFiZWxcIlxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJ2ZXJzaW9uLW1lc3NhZ2UgaXMtbWVkaXVtLWZvbnRcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICB7YCR7cHJvcHMuY29tbWl0SGFzaH0gJHtwcm9wcy5pc0RpcnR5ID8gJ3dpdGggQ2hhbmdlcycgOiAnJ31gfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPERpdmlkZXJcbiAgICAgICAgICAgIG9yaWVudGF0aW9uPVwiaG9yaXpvbnRhbFwiXG4gICAgICAgICAgICB2YXJpYW50PVwiZnVsbFdpZHRoXCJcbiAgICAgICAgICAgIGNsYXNzTmFtZT1cIm15LTNcIlxuICAgICAgICAgIC8+XG4gICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwidmVyc2lvbi10aXRsZVwiPlJlbGVhc2UgRGF0ZTwvZGl2PlxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICBkYXRhLWlkPVwicmVsZWFzZS1kYXRlLWxhYmVsXCJcbiAgICAgICAgICAgICAgY2xhc3NOYW1lPVwidmVyc2lvbi1tZXNzYWdlIGlzLW1lZGl1bS1mb250XCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAge3Byb3BzLmRhdGV9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L1Jvb3Q+XG4gIClcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/alert-settings/container.d.ts b/src/main/webapp/react-component/alert-settings/container.d.ts new file mode 100644 index 00000000000..2aaa89a4518 --- /dev/null +++ b/src/main/webapp/react-component/alert-settings/container.d.ts @@ -0,0 +1,68 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { WithBackboneProps } from '../backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/alert-settings/container.js b/src/main/webapp/react-component/alert-settings/container.js new file mode 100644 index 00000000000..5b2c325efa9 --- /dev/null +++ b/src/main/webapp/react-component/alert-settings/container.js @@ -0,0 +1,60 @@ +import { __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import user from '../../component/singletons/user-instance'; +import AlertSettingsComponent from './presentation'; +import withListenTo from '../backbone-container'; +import { hot } from 'react-hot-loader'; +var save = function (value) { + var preferences = user.get('user').get('preferences'); + preferences.set(value); + preferences.savePreferences(); +}; +var onExpirationChange = function (value) { + save({ + alertExpiration: value, + }); +}; +var onPersistenceChange = function (value) { + save({ + alertPersistence: value, + }); +}; +var mapBackboneToState = function () { + return { + persistence: user.get('user').get('preferences').get('alertPersistence'), + expiration: user.get('user').get('preferences').get('alertExpiration'), + }; +}; +var AlertSettings = /** @class */ (function (_super) { + __extends(AlertSettings, _super); + function AlertSettings(props) { + var _this = _super.call(this, props) || this; + _this.updateState = function () { + _this.setState(mapBackboneToState()); + }; + _this.state = mapBackboneToState(); + _this.props.listenTo(user.get('user').get('preferences'), 'change', _this.updateState); + return _this; + } + AlertSettings.prototype.render = function () { + var _a = this.state, persistence = _a.persistence, expiration = _a.expiration; + return (React.createElement(AlertSettingsComponent, { persistence: persistence, expiration: expiration, onPersistenceChange: onPersistenceChange, onExpirationChange: onExpirationChange })); + }; + return AlertSettings; +}(React.Component)); +export default hot(module)(withListenTo(AlertSettings)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9hbGVydC1zZXR0aW5ncy9jb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxJQUFJLE1BQU0sMENBQTBDLENBQUE7QUFDM0QsT0FBTyxzQkFBc0IsTUFBTSxnQkFBZ0IsQ0FBQTt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wcywgU3RhdGU+IHtcbiAgY29uc3RydWN0b3IocHJvcHM6IFByb3BzKSB7XG4gICAgc3VwZXIocHJvcHMpXG4gICAgdGhpcy5zdGF0ZSA9IG1hcEJhY2tib25lVG9TdGF0ZSgpXG4gICAgdGhpcy5wcm9wcy5saXN0ZW5UbyhcbiAgICAgIHVzZXIuZ2V0KCd1c2VyJykuZ2V0KCdwcmVmZXJlbmNlcycpLFxuICAgICAgJ2NoYW5nZScsXG4gICAgICB0aGlzLnVwZGF0ZVN0YXRlXG4gICAgKVxuICB9XG4gIHVwZGF0ZVN0YXRlID0gKCkgPT4ge1xuICAgIHRoaXMuc2V0U3RhdGUobWFwQmFja2JvbmVUb1N0YXRlKCkpXG4gIH1cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHsgcGVyc2lzdGVuY2UsIGV4cGlyYXRpb24gfSA9IHRoaXMuc3RhdGVcbiAgICByZXR1cm4gKFxuICAgICAgPEFsZXJ0U2V0dGluZ3NDb21wb25lbnRcbiAgICAgICAgcGVyc2lzdGVuY2U9e3BlcnNpc3RlbmNlfVxuICAgICAgICBleHBpcmF0aW9uPXtleHBpcmF0aW9ufVxuICAgICAgICBvblBlcnNpc3RlbmNlQ2hhbmdlPXtvblBlcnNpc3RlbmNlQ2hhbmdlfVxuICAgICAgICBvbkV4cGlyYXRpb25DaGFuZ2U9e29uRXhwaXJhdGlvbkNoYW5nZX1cbiAgICAgIC8+XG4gICAgKVxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKHdpdGhMaXN0ZW5UbyhBbGVydFNldHRpbmdzKSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/alert-settings/index.d.ts b/src/main/webapp/react-component/alert-settings/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/alert-settings/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/alert-settings/index.js b/src/main/webapp/react-component/alert-settings/index.js new file mode 100644 index 00000000000..de4e793d9cf --- /dev/null +++ b/src/main/webapp/react-component/alert-settings/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2FsZXJ0LXNldHRpbmdzL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGFBQWEsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vY29udGFpbmVyJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/alert-settings/presentation.d.ts b/src/main/webapp/react-component/alert-settings/presentation.d.ts new file mode 100644 index 00000000000..a0975b6e3d2 --- /dev/null +++ b/src/main/webapp/react-component/alert-settings/presentation.d.ts @@ -0,0 +1,9 @@ +/// +type Props = { + persistence: boolean; + expiration: number; + onExpirationChange: (v: number) => any; + onPersistenceChange: (v: boolean) => any; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/alert-settings/presentation.js b/src/main/webapp/react-component/alert-settings/presentation.js new file mode 100644 index 00000000000..f99512b2381 --- /dev/null +++ b/src/main/webapp/react-component/alert-settings/presentation.js @@ -0,0 +1,90 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +var millisecondsInDay = 24 * 60 * 60 * 1000; +var expireOptions = [ + { + label: '1 Day', + value: millisecondsInDay, + }, + { + label: '2 Days', + value: 2 * millisecondsInDay, + }, + { + label: '4 Days', + value: 4 * millisecondsInDay, + }, + { + label: '1 Week', + value: 7 * millisecondsInDay, + }, + { + label: '2 Weeks', + value: 14 * millisecondsInDay, + }, + { + label: '1 Month', + value: 30 * millisecondsInDay, + }, + { + label: '2 Months', + value: 60 * millisecondsInDay, + }, + { + label: '4 Months', + value: 120 * millisecondsInDay, + }, + { + label: '6 Months', + value: 180 * millisecondsInDay, + }, + { + label: '1 Year', + value: 365 * millisecondsInDay, + }, +]; +var keepNotificationsOptions = [ + { + label: 'Yes', + value: true, + }, + { + label: 'No', + value: false, + }, +]; +var render = function (props) { + var persistence = props.persistence, expiration = props.expiration, onExpirationChange = props.onExpirationChange, onPersistenceChange = props.onPersistenceChange; + return (React.createElement("div", { className: "p-2 w-full h-full overflow-auto" }, + React.createElement("div", { className: "editor-properties" }, + React.createElement("div", null, + React.createElement(Autocomplete, { size: "small", options: keepNotificationsOptions, onChange: function (_e, newValue) { + onPersistenceChange(newValue.value); + }, isOptionEqualToValue: function (option) { return option.value === persistence; }, getOptionLabel: function (option) { + return option.label; + }, disableClearable: true, value: keepNotificationsOptions.find(function (choice) { return choice.value === persistence; }), renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Keep notifications after logging out", variant: "outlined" }))); } })), + React.createElement("div", { className: "pt-2" }, persistence ? (React.createElement(Autocomplete, { size: "small", options: expireOptions, onChange: function (_e, newValue) { + onExpirationChange(newValue.value); + }, isOptionEqualToValue: function (option) { return option.value === expiration; }, getOptionLabel: function (option) { + return option.label; + }, disableClearable: true, value: expireOptions.find(function (choice) { return choice.value === expiration; }), renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Expire after", variant: "outlined" }))); } })) : null)))); +}; +export default hot(module)(render); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9hbGVydC1zZXR0aW5ncy9wcmVzZW50YXRpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sWUFBWSxNQUFNLDRCQUE0QixDQUFBO0FBQ3JELE9BQU8sU0FBUyxNQUFNLHlCQUF5QixDQUFBO0FBUS9DLElBQU0saUJBQWlCLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsSUFBSSxDQUFBO0FBQzdDLElBQU0sYUFBYSxHQUFHO0lBQ3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G4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgaXNPcHRpb25FcXVhbFRvVmFsdWU9eyhvcHRpb24pID0+IG9wdGlvbi52YWx1ZSA9PT0gcGVyc2lzdGVuY2V9XG4gICAgICAgICAgICBnZXRPcHRpb25MYWJlbD17KG9wdGlvbikgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gb3B0aW9uLmxhYmVsXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgZGlzYWJsZUNsZWFyYWJsZVxuICAgICAgICAgICAgdmFsdWU9e2tlZXBOb3RpZmljYXRpb25zT3B0aW9ucy5maW5kKFxuICAgICAgICAgICAgICAoY2hvaWNlKSA9PiBjaG9pY2UudmFsdWUgPT09IHBlcnNpc3RlbmNlXG4gICAgICAgICAgICApfVxuICAgICAgICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IChcbiAgICAgICAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgICAgICAgIHsuLi5wYXJhbXN9XG4gICAgICAgICAgICAgICAgbGFiZWw9XCJLZWVwIG5vdGlmaWNhdGlvbnMgYWZ0ZXIgbG9nZ2luZyBvdXRcIlxuICAgICAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInB0LTJcIj5cbiAgICAgICAgICB7cGVyc2lzdGVuY2UgPyAoXG4gICAgICAgICAgICA8QXV0b2NvbXBsZXRlXG4gICAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICAgIG9wdGlvbnM9e2V4cGlyZU9wdGlvbnN9XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXsoX2U6IGFueSwgbmV3VmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICBvbkV4cGlyYXRpb25DaGFuZ2UobmV3VmFsdWUudmFsdWUpXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIGlzT3B0aW9uRXF1YWxUb1ZhbHVlPXsob3B0aW9uKSA9PiBvcHRpb24udmFsdWUgPT09IGV4cGlyYXRpb259XG4gICAgICAgICAgICAgIGdldE9wdGlvbkxhYmVsPXsob3B0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9wdGlvbi5sYWJlbFxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBkaXNhYmxlQ2xlYXJhYmxlXG4gICAgICAgICAgICAgIHZhbHVlPXtleHBpcmVPcHRpb25zLmZpbmQoXG4gICAgICAgICAgICAgICAgKGNob2ljZSkgPT4gY2hvaWNlLnZhbHVlID09PSBleHBpcmF0aW9uXG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIHJlbmRlcklucHV0PXsocGFyYW1zKSA9PiAoXG4gICAgICAgICAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgICAgICAgICAgey4uLnBhcmFtc31cbiAgICAgICAgICAgICAgICAgIGxhYmVsPVwiRXhwaXJlIGFmdGVyXCJcbiAgICAgICAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkocmVuZGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/attribute-settings/attribute-settings.d.ts b/src/main/webapp/react-component/attribute-settings/attribute-settings.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/react-component/attribute-settings/attribute-settings.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/attribute-settings/attribute-settings.js b/src/main/webapp/react-component/attribute-settings/attribute-settings.js new file mode 100644 index 00000000000..9f46b8441a6 --- /dev/null +++ b/src/main/webapp/react-component/attribute-settings/attribute-settings.js @@ -0,0 +1,87 @@ +import { __assign, __makeTemplateObject, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import user from '../../component/singletons/user-instance'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n padding: ", ";\n"], ["\n overflow: hidden;\n padding: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }); +var Options = [ + { + label: 'Default', + value: undefined, + }, + { + label: 'One', + value: 1, + }, + { + label: 'Two', + value: 2, + }, + { + label: 'Three', + value: 3, + }, + { + label: 'Four', + value: 4, + }, + { + label: 'Five', + value: 5, + }, + { + label: 'Six', + value: 6, + }, + { + label: 'Seven', + value: 7, + }, + { + label: 'Eight', + value: 8, + }, + { + label: 'Nine', + value: 9, + }, + { + label: 'Ten', + value: 10, + }, +]; +var getDecimalPrecision = function () { + return user.get('user').get('preferences').get('decimalPrecision'); +}; +var AttributeSettings = function () { + var initState = Options.find(function (option) { return option.value === getDecimalPrecision(); }); + var _a = __read(React.useState(initState), 2), decimalPrecision = _a[0], setDecimalPrecision = _a[1]; + return (React.createElement(Root, null, + React.createElement(Autocomplete, { id: "decimal-precision-picker", disableClearable: true, autoComplete: true, size: 'small', onChange: function (_event, newPrecision) { + setDecimalPrecision(newPrecision); + user.getPreferences().set({ + decimalPrecision: newPrecision.value, + }); + }, isOptionEqualToValue: function (option, value) { + return option.value === value.value; + }, options: Options, getOptionLabel: function (option) { return option.label; }, style: { width: '100%', paddingTop: '2em' }, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Decimal Precision", variant: "outlined" }))); }, value: decimalPrecision }))); +}; +export default hot(module)(AttributeSettings); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0cmlidXRlLXNldHRpbmdzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9hdHRyaWJ1dGUtc2V0dGluZ3MvYXR0cmlidXRlLXNldHRpbmdzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sSUFBSSxNQUFNLDBDQUEwQyxDQUFBO0FBQzNELE9BQU8sWUFBWSxNQUFNLDRCQUE0QixDQUFBO0FBQ3JELE9BQU8sU0FBUyxNQUFNLHlCQUF5QixDQUFBO0FBQy9DLE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUV0QyxJQUFNLElBQUksR0FBRyxNQUFNLENBQUMsR0FBRyw4R0FBQSxvQ0FFVixFQUFxQyxLQUNqRCxLQURZLFVBQUMsS0FBSyxJQUFLLE9BQUEsS0FBSyxDQUFDLEtBQUssQ0FBQyxjQUFjLEVBQTFCLENBQTBCLENBQ2pELENBQUE7QUFPRCxJQUFNLE9BQU8sR0FBRztJQUNkO1FBQ0UsS0FB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GFueSwgbmV3UHJlY2lzaW9uOiBQcmVjaXNpb25PcHRpb24pID0+IHtcbiAgICAgICAgICBzZXREZWNpbWFsUHJlY2lzaW9uKG5ld1ByZWNpc2lvbilcbiAgICAgICAgICB1c2VyLmdldFByZWZlcmVuY2VzKCkuc2V0KHtcbiAgICAgICAgICAgIGRlY2ltYWxQcmVjaXNpb246IG5ld1ByZWNpc2lvbi52YWx1ZSxcbiAgICAgICAgICB9KVxuICAgICAgICB9fVxuICAgICAgICBpc09wdGlvbkVxdWFsVG9WYWx1ZT17KG9wdGlvbiwgdmFsdWUpID0+IHtcbiAgICAgICAgICByZXR1cm4gb3B0aW9uLnZhbHVlID09PSB2YWx1ZS52YWx1ZVxuICAgICAgICB9fVxuICAgICAgICBvcHRpb25zPXtPcHRpb25zfVxuICAgICAgICBnZXRPcHRpb25MYWJlbD17KG9wdGlvbikgPT4gb3B0aW9uLmxhYmVsfVxuICAgICAgICBzdHlsZT17eyB3aWR0aDogJzEwMCUnLCBwYWRkaW5nVG9wOiAnMmVtJyB9fVxuICAgICAgICByZW5kZXJJbnB1dD17KHBhcmFtcykgPT4gKFxuICAgICAgICAgIDxUZXh0RmllbGQgey4uLnBhcmFtc30gbGFiZWw9XCJEZWNpbWFsIFByZWNpc2lvblwiIHZhcmlhbnQ9XCJvdXRsaW5lZFwiIC8+XG4gICAgICAgICl9XG4gICAgICAgIHZhbHVlPXtkZWNpbWFsUHJlY2lzaW9ufVxuICAgICAgLz5cbiAgICA8L1Jvb3Q+XG4gIClcbn1cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKEF0dHJpYnV0ZVNldHRpbmdzKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/attribute-settings/index.d.ts b/src/main/webapp/react-component/attribute-settings/index.d.ts new file mode 100644 index 00000000000..3f4c85df581 --- /dev/null +++ b/src/main/webapp/react-component/attribute-settings/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './attribute-settings'; diff --git a/src/main/webapp/react-component/attribute-settings/index.js b/src/main/webapp/react-component/attribute-settings/index.js new file mode 100644 index 00000000000..c2a574ad2d6 --- /dev/null +++ b/src/main/webapp/react-component/attribute-settings/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './attribute-settings'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2F0dHJpYnV0ZS1zZXR0aW5ncy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vYXR0cmlidXRlLXNldHRpbmdzJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.d.ts b/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.d.ts new file mode 100644 index 00000000000..db645c3c931 --- /dev/null +++ b/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.d.ts @@ -0,0 +1,15 @@ +/// +import { Suggestion } from '../location/gazetteer'; +import { TextFieldProps } from '@mui/material/TextField'; +type Props = { + suggester: (input: string) => Promise; + onChange: (suggestion?: Suggestion) => Promise; + debounce?: number; + minimumInputLength?: number; + onError?: any; + value: any; + placeholder?: string; + variant?: TextFieldProps['variant']; +}; +declare const GazetteerAutoComplete: ({ suggester, debounce, minimumInputLength, onError, value, ...props }: Props) => JSX.Element; +export default GazetteerAutoComplete; diff --git a/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.js b/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.js new file mode 100644 index 00000000000..a91f8e69d1d --- /dev/null +++ b/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.js @@ -0,0 +1,98 @@ +import { __assign, __awaiter, __generator, __read, __rest } from "tslib"; +import React, { useCallback, useEffect, useState } from 'react'; +import _debounce from 'lodash/debounce'; +import Autocomplete from '@mui/material/Autocomplete'; +import CircularProgress from '@mui/material/CircularProgress'; +import TextField from '@mui/material/TextField'; +import Button from '@mui/material/Button'; +import Chip from '@mui/material/Chip'; +import RoomIcon from '@mui/icons-material/Room'; +import DeleteIcon from '@mui/icons-material/Clear'; +var GazetteerAutoComplete = function (_a) { + var suggester = _a.suggester, _b = _a.debounce, debounce = _b === void 0 ? 350 : _b, _c = _a.minimumInputLength, minimumInputLength = _c === void 0 ? 3 : _c, onError = _a.onError, value = _a.value, props = __rest(_a, ["suggester", "debounce", "minimumInputLength", "onError", "value"]); + var _d = __read(React.useState(value), 2), selected = _d[0], setSelected = _d[1]; + var _e = __read(useState(value), 2), input = _e[0], setInput = _e[1]; + var _f = __read(useState(false), 2), loading = _f[0], setLoading = _f[1]; + var _g = __read(useState([]), 2), suggestions = _g[0], setSuggestions = _g[1]; + var _h = __read(useState(null), 2), error = _h[0], setError = _h[1]; + var fetchSuggestionsFunc = function (input) { return __awaiter(void 0, void 0, void 0, function () { + var suggestions_1, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!!(input.length < minimumInputLength)) return [3 /*break*/, 5]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, suggester(input)]; + case 2: + suggestions_1 = _a.sent(); + setSuggestions(suggestions_1); + setLoading(false); + return [3 /*break*/, 4]; + case 3: + e_1 = _a.sent(); + setLoading(false); + setError('Endpoint unavailable'); + if (typeof onError === 'function') + onError(e_1); + return [3 /*break*/, 4]; + case 4: return [3 /*break*/, 6]; + case 5: + setLoading(false); + _a.label = 6; + case 6: return [2 /*return*/]; + } + }); + }); }; + var fetchSuggestions = useCallback(_debounce(fetchSuggestionsFunc, debounce), []); + useEffect(function () { + fetchSuggestions(input); + }, [input]); + var onChange = function (input) { + setInput(input); + setLoading(true); + setSuggestions([]); + setError(null); + }; + var onValueSelect = function (_event, suggestion) { + if (suggestion) { + props.onChange(suggestion); + } + else { + setInput(''); + } + }; + var placeholder = input.length < minimumInputLength + ? "Please enter ".concat(minimumInputLength, " or more characters") + : undefined; + var getNoOptionsText = function () { + if (!input) { + return 'Start typing to see suggestions'; + } + else if (input.length < minimumInputLength) { + var charactersToType = minimumInputLength - input.length; + var pluralCharacter = charactersToType === 1 ? '' : 's'; + return "Type ".concat(charactersToType, " more character").concat(pluralCharacter, " to see suggestions"); + } + else { + return error || 'No results found'; + } + }; + React.useEffect(function () { + setSelected(Boolean(value)); + }, [value]); + if (selected) { + return (React.createElement(Chip, { className: "w-full px-2 justify-start rounded", style: { height: '42px' }, avatar: React.createElement(RoomIcon, null), label: React.createElement("div", { className: "flex flex-row flex-nowrap items-center" }, + React.createElement("div", { className: "shrink w-full truncate" }, value), + React.createElement(Button, { color: "primary", className: "shrink-0", onClick: function () { + props.onChange(undefined); + } }, + React.createElement(DeleteIcon, null))), variant: "outlined" })); + } + return (React.createElement(Autocomplete, { "data-id": "autocomplete", getOptionLabel: function (suggestion) { return suggestion.name; }, options: suggestions, loading: loading, loadingText: "Searching...", size: "small", onChange: onValueSelect, onBlur: function () { return setInput(''); }, noOptionsText: getNoOptionsText(), autoHighlight: true, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { variant: props.variant || 'outlined', className: "my-0", size: "small", autoFocus: true, value: input, placeholder: props.placeholder || placeholder, onChange: function (e) { return onChange(e.target.value); }, InputProps: __assign(__assign({}, params.InputProps), { endAdornment: (React.createElement(React.Fragment, null, + loading && React.createElement(CircularProgress, { color: "inherit", size: 20 }), + params.InputProps.endAdornment)) }) }))); } })); +}; +export default GazetteerAutoComplete; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2F6ZXR0ZWVyLWF1dG9jb21wbGV0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvYXV0by1jb21wbGV0ZS9nYXpldHRlZXItYXV0b2NvbXBsZXRlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxXQUFXLEVBQUUsU0FBUyxFQUFFLFFBQVEsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUMvRCxPQUFPLFNBQVMsTUFBTSxpQkFBaUIsQ0FBQTtBQUV2QyxPQUFPLFlBQVksTUFBTSw0QkFBNEIsQ0FBQTtBQUNyRCxPQUFPLGdCQUFnQixNQUFNLGdDQUFnQyxDQUFBO0FBQzdELE9BQU8sU0FBNkIsTUFBTSx5QkFBeUIsQ0FBQTtBQUNuRSxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLElBQUksTUFBTSxvQkFBb0IsQ0FBQTtBQUNyQyxPQUFPLFFBQVEsTUFBTSwwQkFBMEIsQ0FBQTtBQUMvQyxPQUFPLFVBQVUsTUFBTSwyQkFBMkIsQ0FBQTtBQWFsRCxJQUFNLHFCQUFxQixHQUFH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dH1cbiAgICAgIG9uQmx1cj17KCkgPT4gc2V0SW5wdXQoJycpfVxuICAgICAgbm9PcHRpb25zVGV4dD17Z2V0Tm9PcHRpb25zVGV4dCgpfVxuICAgICAgYXV0b0hpZ2hsaWdodFxuICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IChcbiAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgIHsuLi5wYXJhbXN9XG4gICAgICAgICAgdmFyaWFudD17cHJvcHMudmFyaWFudCB8fCAnb3V0bGluZWQnfVxuICAgICAgICAgIGNsYXNzTmFtZT1cIm15LTBcIlxuICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgYXV0b0ZvY3VzXG4gICAgICAgICAgdmFsdWU9e2lucHV0fVxuICAgICAgICAgIHBsYWNlaG9sZGVyPXtwcm9wcy5wbGFjZWhvbGRlciB8fCBwbGFjZWhvbGRlcn1cbiAgICAgICAgICBvbkNoYW5nZT17KGUpID0+IG9uQ2hhbmdlKGUudGFyZ2V0LnZhbHVlKX1cbiAgICAgICAgICBJbnB1dFByb3BzPXt7XG4gICAgICAgICAgICAuLi5wYXJhbXMuSW5wdXRQcm9wcyxcbiAgICAgICAgICAgIGVuZEFkb3JubWVudDogKFxuICAgICAgICAgICAgICA8PlxuICAgICAgICAgICAgICAgIHtsb2FkaW5nICYmIDxDaXJjdWxhclByb2dyZXNzIGNvbG9yPVwiaW5oZXJpdFwiIHNpemU9ezIwfSAvPn1cbiAgICAgICAgICAgICAgICB7cGFyYW1zLklucHV0UHJvcHMuZW5kQWRvcm5tZW50fVxuICAgICAgICAgICAgICA8Lz5cbiAgICAgICAgICAgICksXG4gICAgICAgICAgfX1cbiAgICAgICAgLz5cbiAgICAgICl9XG4gICAgLz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBHYXpldHRlZXJBdXRvQ29tcGxldGVcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/backbone-container/backbone-container.d.ts b/src/main/webapp/react-component/backbone-container/backbone-container.d.ts new file mode 100644 index 00000000000..9940a39fc0e --- /dev/null +++ b/src/main/webapp/react-component/backbone-container/backbone-container.d.ts @@ -0,0 +1,73 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { Subtract } from '../../typescript'; +export type WithBackboneProps = { + listenTo: (object: any, events: string, callback: Function) => any; + stopListening: (object?: any, events?: string | undefined, callback?: Function | undefined) => any; + listenToOnce: (object: any, events: string, callback: Function) => any; +}; +declare const withListenTo:

(Component: React.ComponentType>) => { + new (props: Subtract | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: Subtract, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default withListenTo; diff --git a/src/main/webapp/react-component/backbone-container/backbone-container.js b/src/main/webapp/react-component/backbone-container/backbone-container.js new file mode 100644 index 00000000000..2b1bf166375 --- /dev/null +++ b/src/main/webapp/react-component/backbone-container/backbone-container.js @@ -0,0 +1,39 @@ +import { __assign, __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import Backbone from 'backbone'; +var withListenTo = function (Component) { + return /** @class */ (function (_super) { + __extends(BackboneContainer, _super); + function BackboneContainer() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.backbone = new Backbone.Model({}); + return _this; + } + BackboneContainer.prototype.componentWillUnmount = function () { + this.backbone.stopListening(); + this.backbone.destroy(); + }; + BackboneContainer.prototype.render = function () { + return ( + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ listenTo: any; stopListening: any; listenT... Remove this comment to see the full error message + React.createElement(Component, __assign({ listenTo: this.backbone.listenTo.bind(this.backbone), stopListening: this.backbone.stopListening.bind(this.backbone), listenToOnce: this.backbone.listenToOnce.bind(this.backbone) }, this.props))); + }; + return BackboneContainer; + }(React.Component)); +}; +export default withListenTo; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFja2JvbmUtY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9iYWNrYm9uZS1jb250YWluZXIvYmFja2JvbmUtY29udGFpbmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRzlCLE9BQU8sUUFBUSxNQUFNLFVBQVUsQ0FBQTtBQVkvQixJQUFNLFlBQVksR0FBRyxVQUNuQixTQUEwRDtJQUUxRDtRQUF1QyxxQ0FHdEM7UUFITTtZQUFBLHFFQW9CTjtZQWhCQyxjQUFRLEdBQVEsSUFBSSxRQUFRLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFBOztRQWdCeEMsQ0FBQztRQWZDLGdEQUFvQixHQUFwQjtZQUNFLElBQUksQ0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N0ZW5Ub09uY2UuYmluZCh0aGlzLmJhY2tib25lKX1cbiAgICAgICAgICB7Li4udGhpcy5wcm9wc31cbiAgICAgICAgLz5cbiAgICAgIClcbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgd2l0aExpc3RlblRvXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/backbone-container/index.d.ts b/src/main/webapp/react-component/backbone-container/index.d.ts new file mode 100644 index 00000000000..0694bdde243 --- /dev/null +++ b/src/main/webapp/react-component/backbone-container/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default, WithBackboneProps } from './backbone-container'; diff --git a/src/main/webapp/react-component/backbone-container/index.js b/src/main/webapp/react-component/backbone-container/index.js new file mode 100644 index 00000000000..2c98bddcdca --- /dev/null +++ b/src/main/webapp/react-component/backbone-container/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './backbone-container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi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0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGRlZmF1bHQsIFdpdGhCYWNrYm9uZVByb3BzIH0gZnJvbSAnLi9iYWNrYm9uZS1jb250YWluZXInXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/button/split-button/zoomToHome.d.ts b/src/main/webapp/react-component/button/split-button/zoomToHome.d.ts new file mode 100644 index 00000000000..145d387c182 --- /dev/null +++ b/src/main/webapp/react-component/button/split-button/zoomToHome.d.ts @@ -0,0 +1,8 @@ +/// +type voidFunc = () => void; +type Props = { + goHome: voidFunc; + saveHome: voidFunc; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/button/split-button/zoomToHome.js b/src/main/webapp/react-component/button/split-button/zoomToHome.js new file mode 100644 index 00000000000..061d0a0b176 --- /dev/null +++ b/src/main/webapp/react-component/button/split-button/zoomToHome.js @@ -0,0 +1,48 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import Button from '@mui/material/Button'; +import { hot } from 'react-hot-loader'; +import { useMenuState } from '../../../component/menu-state/menu-state'; +import HomeIcon from '@mui/icons-material/Home'; +import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; +import Popover from '@mui/material/Popover'; +import RoomIcon from '@mui/icons-material/Room'; +import Paper from '@mui/material/Paper'; +import { Elevations } from '../../../component/theme/theme'; +var ZoomToHome = function (props) { + var saveHome = props.saveHome, goHome = props.goHome; + var menuState = useMenuState(); + return (React.createElement(React.Fragment, null, + React.createElement("div", { className: "flex flex-row items-stretch" }, + React.createElement(Button, __assign({ size: "small", "data-id": "home-button" }, menuState.MuiButtonProps, { className: "border border-r-2 Mui-border-divider", onClick: goHome }), + React.createElement("div", { className: "flex flex-row items-center" }, + React.createElement(HomeIcon, null))), + React.createElement("div", { className: "Mui-bg-default w-min my-2" }), + React.createElement(Button, __assign({ size: "small", "data-id": "home-dropdown" }, menuState.MuiButtonProps), + React.createElement(KeyboardArrowDownIcon, null))), + React.createElement(Popover, __assign({}, menuState.MuiPopoverProps), + React.createElement(Paper, { elevation: Elevations.overlays, className: "p-2" }, + React.createElement(Button, { size: "small", "data-id": "set-home-button", className: "p-2", onClick: function () { + saveHome(); + menuState.handleClose(); + }, title: "Save Current View as Home Location" }, + React.createElement("span", null, + "Set Home", + React.createElement(RoomIcon, null))))))); +}; +export default hot(module)(ZoomToHome); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiem9vbVRvSG9tZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvYnV0dG9uL3NwbGl0LWJ1dHRvbi96b29tVG9Ib21lLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sMENBQTBDLENBQUE7QUFDdkUsT0FBTyx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ICAgICA8L2Rpdj5cbiAgICAgIDxQb3BvdmVyIHsuLi5tZW51U3RhdGUuTXVpUG9wb3ZlclByb3BzfT5cbiAgICAgICAgPFBhcGVyIGVsZXZhdGlvbj17RWxldmF0aW9ucy5vdmVybGF5c30gY2xhc3NOYW1lPVwicC0yXCI+XG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgICAgICAgIGRhdGEtaWQ9XCJzZXQtaG9tZS1idXR0b25cIlxuICAgICAgICAgICAgY2xhc3NOYW1lPVwicC0yXCJcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgc2F2ZUhvbWUoKVxuICAgICAgICAgICAgICBtZW51U3RhdGUuaGFuZGxlQ2xvc2UoKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIHRpdGxlPVwiU2F2ZSBDdXJyZW50IFZpZXcgYXMgSG9tZSBMb2NhdGlvblwiXG4gICAgICAgICAgPlxuICAgICAgICAgICAgPHNwYW4+XG4gICAgICAgICAgICAgIFNldCBIb21lXG4gICAgICAgICAgICAgIDxSb29tSWNvbiAvPlxuICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICA8L1BhcGVyPlxuICAgICAgPC9Qb3BvdmVyPlxuICAgIDwvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFpvb21Ub0hvbWUpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/card/card.d.ts b/src/main/webapp/react-component/card/card.d.ts new file mode 100644 index 00000000000..412c5ea5dd3 --- /dev/null +++ b/src/main/webapp/react-component/card/card.d.ts @@ -0,0 +1,43 @@ +import * as React from 'react'; +import { CardProps } from '@mui/material/Card'; +import { CardHeaderProps } from '@mui/material/CardHeader'; +import { CardActionsProps } from '@mui/material/CardActions'; +import { CardContentProps } from '@mui/material/CardContent'; +import { CardActionAreaProps } from '@mui/material/CardActionArea'; +import { TypographyProps } from '@mui/material/Typography'; +export declare const ZeroWidthSpace: () => JSX.Element; +export declare const WrappedHeader: ({ title, ...otherProps }: CardHeaderProps) => JSX.Element; +export declare const WrappedCard: React.ComponentType>; +export declare const WrappedCardActions: React.ComponentType>; +export declare const WrappedCardContent: React.ComponentType>; +export declare const WrappedCardContentLabel: (props: TypographyProps) => JSX.Element; +export declare const WrappedCardContentValue: ({ children, ...otherProps }: TypographyProps) => JSX.Element; +export declare const WrappedCardActionArea: import("styled-components").StyledComponent & React.RefAttributes>, import("styled-components").DefaultTheme, { + classes?: Partial | undefined; + focusVisibleClassName?: string | undefined; + sx?: import("@mui/system").SxProps | undefined; +} & Omit<{ + action?: React.Ref | undefined; + centerRipple?: boolean | undefined; + children?: React.ReactNode; + classes?: Partial | undefined; + disabled?: boolean | undefined; + disableRipple?: boolean | undefined; + disableTouchRipple?: boolean | undefined; + focusRipple?: boolean | undefined; + focusVisibleClassName?: string | undefined; + LinkComponent?: React.ElementType | undefined; + onFocusVisible?: React.FocusEventHandler | undefined; + sx?: import("@mui/system").SxProps | undefined; + tabIndex?: number | undefined; + TouchRippleProps?: Partial | undefined; + touchRippleRef?: React.Ref | undefined; +}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit, HTMLButtonElement>, "ref"> & { + ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; +}, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "disabled" | "sx" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef">, never>; +type CreateCardProps = { + text: string; + cardProps?: CardProps; +}; +export declare const CreateCard: import("styled-components").StyledComponent>, import("styled-components").DefaultTheme, CreateCardProps, never>; +export {}; diff --git a/src/main/webapp/react-component/card/card.js b/src/main/webapp/react-component/card/card.js new file mode 100644 index 00000000000..64d5fa79ce9 --- /dev/null +++ b/src/main/webapp/react-component/card/card.js @@ -0,0 +1,54 @@ +import { __assign, __makeTemplateObject, __rest } from "tslib"; +import * as React from 'react'; +import Card from '@mui/material/Card'; +import CardHeader from '@mui/material/CardHeader'; +import CardActions from '@mui/material/CardActions'; +import CardContent from '@mui/material/CardContent'; +import CardActionArea from '@mui/material/CardActionArea'; +import Typography from '@mui/material/Typography'; +import styled from 'styled-components'; +import CreateIcon from '@mui/icons-material/AddBox'; +export var ZeroWidthSpace = function () { + return React.createElement(React.Fragment, null, String.fromCharCode(8203)); +}; +export var WrappedHeader = function (_a) { + var title = _a.title, otherProps = __rest(_a, ["title"]); + return (React.createElement(CardHeader, __assign({ title: React.createElement(React.Fragment, null, + title, + React.createElement(ZeroWidthSpace, null)) }, otherProps))); +}; +export var WrappedCard = styled(React.forwardRef(function (props, ref) { + return React.createElement(Card, __assign({}, props, { ref: ref })); +}))(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""]))); +export var WrappedCardActions = styled(React.forwardRef(function (props, ref) { + return React.createElement(CardActions, __assign({}, props, { ref: ref })); +}))(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""]))); +export var WrappedCardContent = styled(React.forwardRef(function (props, ref) { + return React.createElement(CardContent, __assign({}, props, { ref: ref })); +}))(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""]))); +export var WrappedCardContentLabel = function (props) { + return React.createElement(Typography, __assign({}, props, { noWrap: true, style: { opacity: 0.6 } })); +}; +export var WrappedCardContentValue = function (_a) { + var children = _a.children, otherProps = __rest(_a, ["children"]); + return (React.createElement(Typography, __assign({}, otherProps, { noWrap: true }), + children, + React.createElement(ZeroWidthSpace, null))); +}; +export var WrappedCardActionArea = styled(React.forwardRef(function (props, ref) { + return React.createElement(CardActionArea, __assign({}, props, { ref: ref })); +}))(templateObject_4 || (templateObject_4 = __makeTemplateObject([""], [""]))); +export var CreateCard = styled(React.forwardRef(function (props, ref) { + return (React.createElement(WrappedCard, __assign({}, props.cardProps, { ref: ref }), + React.createElement(WrappedCardActionArea, { style: { + height: '100%', + textAlign: 'center', + } }, + React.createElement(WrappedCardContent, null, + React.createElement(CreateIcon, { style: { + fontSize: '7rem', + } }), + React.createElement("h1", null, props.text))))); +}))(templateObject_5 || (templateObject_5 = __makeTemplateObject([""], [""]))); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvY2FyZC9jYXJkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxJQUFtQixNQUFNLG9CQUFvQixDQUFBO0FBQ3BELE9BQU8sVUFBK0IsTUFBTSwwQkFBMEIsQ0FBQTtBQUN0RSxPQUFPLFdBQWlDLE1BQU0sMkJBQTJCLENBQUE7QUFDekUsT0FBTyxXQUFpQyxNQUFNLDJCQUEyQixDQUFBO0FBQ3pFLE9BQU8sY0FFTixNQUFNLDhCQUE4QixDQUFBO0FBQ3JDLE9BQU8sVUFBK0IsTUFBTSwwQkFBMEIsQ0FBQTtBQUN0RSxPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLFVBQVUsTUFBTSw0QkFBNEIsQ0FBQTtBQUVuRCxNQUFNLENBQUMsSUFBTSxjQUFjLEdBQUc7SUFDNUIsT0FBTywwQ0FBRyxNQUFNLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxDQUFJLENBQUE7QUFDekMsQ0FBQyxDQUFBO0FBRUQsTUFBTSxDQUFDLElBQU0sYUFBYSxHQUFHLFVBQUMsRUFBeUM7SUFBdkMsSUFBQSxLQUFL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cmluZ1xuICBjYXJkUHJvcHM/OiBDYXJkUHJvcHNcbn1cblxuZXhwb3J0IGNvbnN0IENyZWF0ZUNhcmQgPSBzdHlsZWQoXG4gIFJlYWN0LmZvcndhcmRSZWYoKHByb3BzOiBDcmVhdGVDYXJkUHJvcHMsIHJlZjogUmVhY3QuUmVmPGFueT4pID0+IHtcbiAgICByZXR1cm4gKFxuICAgICAgPFdyYXBwZWRDYXJkIHsuLi5wcm9wcy5jYXJkUHJvcHN9IHJlZj17cmVmfT5cbiAgICAgICAgPFdyYXBwZWRDYXJkQWN0aW9uQXJlYVxuICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICBoZWlnaHQ6ICcxMDAlJyxcbiAgICAgICAgICAgIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gICAgICAgICAgfX1cbiAgICAgICAgPlxuICAgICAgICAgIDxXcmFwcGVkQ2FyZENvbnRlbnQ+XG4gICAgICAgICAgICA8Q3JlYXRlSWNvblxuICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgIGZvbnRTaXplOiAnN3JlbScsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAgPGgxPntwcm9wcy50ZXh0fTwvaDE+XG4gICAgICAgICAgPC9XcmFwcGVkQ2FyZENvbnRlbnQ+XG4gICAgICAgIDwvV3JhcHBlZENhcmRBY3Rpb25BcmVhPlxuICAgICAgPC9XcmFwcGVkQ2FyZD5cbiAgICApXG4gIH0pXG4pPENyZWF0ZUNhcmRQcm9wcz5gYFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/card/index.d.ts b/src/main/webapp/react-component/card/index.d.ts new file mode 100644 index 00000000000..ceadc29184a --- /dev/null +++ b/src/main/webapp/react-component/card/index.d.ts @@ -0,0 +1 @@ +export { WrappedCard as Card, WrappedCardActions as CardActions, WrappedCardContent as CardContent, WrappedHeader as CardHeader, WrappedCardActionArea as CardActionArea, WrappedCardContentLabel as CardContentLabel, WrappedCardContentValue as CardContentValue, CreateCard, } from './card'; diff --git a/src/main/webapp/react-component/card/index.js b/src/main/webapp/react-component/card/index.js new file mode 100644 index 00000000000..97a75ce9062 --- /dev/null +++ b/src/main/webapp/react-component/card/index.js @@ -0,0 +1,2 @@ +export { WrappedCard as Card, WrappedCardActions as CardActions, WrappedCardContent as CardContent, WrappedHeader as CardHeader, WrappedCardActionArea as CardActionArea, WrappedCardContentLabel as CardContentLabel, WrappedCardContentValue as CardContentValue, CreateCard, } from './card'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2NhcmQvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxXQUFXLElBQUksSUFBSSxFQUNuQixrQkFBa0IsSUFBSSxXQUFXLEVBQ2pDLGtCQUFrQixJQUFJLFdBQVcsRUFDakMsYUFBYSxJQUFJLFVBQVUsRUFDM0IscUJBQXFCLElBQUksY0FBYyxFQUN2Qyx1QkFBdUIsSUFBSSxnQkFBZ0IsRUFDM0MsdUJBQXVCLElBQUksZ0JBQWdCLEVBQzNDLFVBQVUsR0FDWCxNQUFNLFFBQVEsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7XG4gIFdyYXBwZWRDYXJkIGFzIENhcmQsXG4gIFdyYXBwZWRDYXJkQWN0aW9ucyBhcyBDYXJkQWN0aW9ucyxcbiAgV3JhcHBlZENhcmRDb250ZW50IGFzIENhcmRDb250ZW50LFxuICBXcmFwcGVkSGVhZGVyIGFzIENhcmRIZWFkZXIsXG4gIFdyYXBwZWRDYXJkQWN0aW9uQXJlYSBhcyBDYXJkQWN0aW9uQXJlYSxcbiAgV3JhcHBlZENhcmRDb250ZW50TGFiZWwgYXMgQ2FyZENvbnRlbnRMYWJlbCxcbiAgV3JhcHBlZENhcmRDb250ZW50VmFsdWUgYXMgQ2FyZENvbnRlbnRWYWx1ZSxcbiAgQ3JlYXRlQ2FyZCxcbn0gZnJvbSAnLi9jYXJkJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/copy-coordinates/copy-coordinates.d.ts b/src/main/webapp/react-component/copy-coordinates/copy-coordinates.d.ts new file mode 100644 index 00000000000..c0bb5a3af77 --- /dev/null +++ b/src/main/webapp/react-component/copy-coordinates/copy-coordinates.d.ts @@ -0,0 +1,13 @@ +/// +type Props = { + coordinateValues: { + dms: string; + lat: string; + lon: string; + mgrs: string; + utmUps: string; + }; + closeParent: () => void; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/copy-coordinates/copy-coordinates.js b/src/main/webapp/react-component/copy-coordinates/copy-coordinates.js new file mode 100644 index 00000000000..a14febe79b9 --- /dev/null +++ b/src/main/webapp/react-component/copy-coordinates/copy-coordinates.js @@ -0,0 +1,115 @@ +import { __assign, __awaiter, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import { useMenuState } from '../../component/menu-state/menu-state'; +import Popover from '@mui/material/Popover'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import useSnack from '../../component/hooks/useSnack'; +var generateClipboardHandler = function (_a) { + var text = _a.text, closeParent = _a.closeParent, addSnack = _a.addSnack; + return function () { return __awaiter(void 0, void 0, void 0, function () { + var e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, 3, 4]); + return [4 /*yield*/, navigator.clipboard.writeText(text)]; + case 1: + _a.sent(); + addSnack("Copied to clipboard: ".concat(text), { + alertProps: { + severity: 'success', + }, + }); + return [3 /*break*/, 4]; + case 2: + e_1 = _a.sent(); + addSnack("Unable to copy ".concat(text, " to clipboard."), { + alertProps: { + severity: 'error', + }, + // Longer timeout to give the user a chance to copy the coordinates from the snack. + timeout: 10000, + }); + return [3 /*break*/, 4]; + case 3: + closeParent(); + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); }; +}; +var render = function (props) { + var _a = props.coordinateValues, dms = _a.dms, lat = _a.lat, lon = _a.lon, mgrs = _a.mgrs, utmUps = _a.utmUps; + var closeParent = props.closeParent; + var menuState = useMenuState(); + var addSnack = useSnack(); + return (React.createElement(React.Fragment, null, + React.createElement(Button, __assign({ className: "metacard-interaction interaction-copy-coordinates" }, menuState.MuiButtonProps), + "Copy Coordinates as", + React.createElement(ExpandMoreIcon, null)), + React.createElement(Popover, __assign({}, menuState.MuiPopoverProps), + React.createElement("div", { className: "flex flex-col" }, + React.createElement(Button, { "data-help": "Copies the coordinates to your clipboard.", onClick: generateClipboardHandler({ + text: "".concat(lat, " ").concat(lon), + closeParent: closeParent, + addSnack: addSnack, + }) }, + React.createElement("div", null, + React.createElement("div", { className: "opacity-75" }, "Decimal Degrees (DD)"), + lat + ' ' + lon)), + React.createElement(Button, { "data-help": "Copies the DMS coordinates to your clipboard.", onClick: generateClipboardHandler({ + text: dms, + closeParent: closeParent, + addSnack: addSnack, + }) }, + React.createElement("div", null, + React.createElement("div", { className: "opacity-75" }, "Degrees Minutes Seconds (DMS)"), + dms)), + mgrs ? (React.createElement(Button, { "data-help": "Copies the MGRS coordinates to your clipboard.", onClick: generateClipboardHandler({ + text: mgrs, + closeParent: closeParent, + addSnack: addSnack, + }) }, + React.createElement("div", null, + React.createElement("div", { className: "opacity-75" }, "MGRS"), + mgrs))) : null, + React.createElement(Button, { "data-help": "Copies the UTM/UPS coordinates to your clipboard.", onClick: generateClipboardHandler({ + text: utmUps, + closeParent: closeParent, + addSnack: addSnack, + }) }, + React.createElement("div", null, + React.createElement("div", { className: "opacity-75" }, "UTM/UPS"), + utmUps)), + React.createElement(Button, { "data-help": "Copies the WKT of the coordinates to your clipboard.", onClick: generateClipboardHandler({ + text: "POINT (".concat(lon, " ").concat(lat, ")"), + closeParent: closeParent, + addSnack: addSnack, + }) }, + React.createElement("div", null, + React.createElement("div", { className: "opacity-75" }, "Well Known (WKT)"), + "POINT (", + lon, + " ", + lat, + ")")))))); +}; +export default hot(module)(render); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29weS1jb29yZGluYXRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvY29weS1jb29yZGluYXRlcy9jb3B5LWNvb3JkaW5hdGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sdUNBQXVDLENBQUE7QUFDcEUsT0FBTyxPQUFPLE1BQU0sdUJBQXVCLENBQUE7QUFDM0MsT0FBTyxjQUFjLE1BQU0sZ0NBQWdDLENBQUE7QUFDM0QsT0FBTyxRQUFRLE1BQU0sZ0NBQWdDLENBQUE7QUFjckQsSUFBTSx3QkFBd0IsR0FBRyxVQUFDLEVBU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gICA8ZGl2IGNsYXNzTmFtZT1cIm9wYWNpdHktNzVcIj5EZWNpbWFsIERlZ3JlZXMgKEREKTwvZGl2PlxuICAgICAgICAgICAgICB7bGF0ICsgJyAnICsgbG9ufVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgZGF0YS1oZWxwPVwiQ29waWVzIHRoZSBETVMgY29vcmRpbmF0ZXMgdG8geW91ciBjbGlwYm9hcmQuXCJcbiAgICAgICAgICAgIG9uQ2xpY2s9e2dlbmVyYXRlQ2xpcGJvYXJkSGFuZGxlcih7XG4gICAgICAgICAgICAgIHRleHQ6IGRtcyxcbiAgICAgICAgICAgICAgY2xvc2VQYXJlbnQsXG4gICAgICAgICAgICAgIGFkZFNuYWNrLFxuICAgICAgICAgICAgfSl9XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJvcGFjaXR5LTc1XCI+RGVncmVlcyBNaW51dGVzIFNlY29uZHMgKERNUyk8L2Rpdj5cbiAgICAgICAgICAgICAge2Rtc31cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIHttZ3JzID8gKFxuICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICBkYXRhLWhlbHA9XCJDb3BpZXMgdGhlIE1HUlMgY29vcmRpbmF0ZXMgdG8geW91ciBjbGlwYm9hcmQuXCJcbiAgICAgICAgICAgICAgb25DbGljaz17Z2VuZXJhdGVDbGlwYm9hcmRIYW5kbGVyKHtcbiAgICAgICAgICAgICAgICB0ZXh0OiBtZ3JzLFxuICAgICAgICAgICAgICAgIGNsb3NlUGFyZW50LFxuICAgICAgICAgICAgICAgIGFkZFNuYWNrLFxuICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cIm9wYWNpdHktNzVcIj5NR1JTPC9kaXY+XG4gICAgICAgICAgICAgICAge21ncnN9XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgZGF0YS1oZWxwPVwiQ29waWVzIHRoZSBVVE0vVVBTIGNvb3JkaW5hdGVzIHRvIHlvdXIgY2xpcGJvYXJkLlwiXG4gICAgICAgICAgICBvbkNsaWNrPXtnZW5lcmF0ZUNsaXBib2FyZEhhbmRsZXIoe1xuICAgICAgICAgICAgICB0ZXh0OiB1dG1VcHMsXG4gICAgICAgICAgICAgIGNsb3NlUGFyZW50LFxuICAgICAgICAgICAgICBhZGRTbmFjayxcbiAgICAgICAgICAgIH0pfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwib3BhY2l0eS03NVwiPlVUTS9VUFM8L2Rpdj5cbiAgICAgICAgICAgICAge3V0bVVwc31cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgIGRhdGEtaGVscD1cIkNvcGllcyB0aGUgV0tUIG9mIHRoZSBjb29yZGluYXRlcyB0byB5b3VyIGNsaXBib2FyZC5cIlxuICAgICAgICAgICAgb25DbGljaz17Z2VuZXJhdGVDbGlwYm9hcmRIYW5kbGVyKHtcbiAgICAgICAgICAgICAgdGV4dDogYFBPSU5UICgke2xvbn0gJHtsYXR9KWAsXG4gICAgICAgICAgICAgIGNsb3NlUGFyZW50LFxuICAgICAgICAgICAgICBhZGRTbmFjayxcbiAgICAgICAgICAgIH0pfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwib3BhY2l0eS03NVwiPldlbGwgS25vd24gKFdLVCk8L2Rpdj5cbiAgICAgICAgICAgICAgUE9JTlQgKHtsb259IHtsYXR9KVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9Qb3BvdmVyPlxuICAgIDwvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKHJlbmRlcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/copy-coordinates/index.d.ts b/src/main/webapp/react-component/copy-coordinates/index.d.ts new file mode 100644 index 00000000000..b2d7698fe9b --- /dev/null +++ b/src/main/webapp/react-component/copy-coordinates/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './copy-coordinates'; diff --git a/src/main/webapp/react-component/copy-coordinates/index.js b/src/main/webapp/react-component/copy-coordinates/index.js new file mode 100644 index 00000000000..a9694b16e0c --- /dev/null +++ b/src/main/webapp/react-component/copy-coordinates/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './copy-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haWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL2NvcHktY29vcmRpbmF0ZXMnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/distance-info/distance-info.d.ts b/src/main/webapp/react-component/distance-info/distance-info.d.ts new file mode 100644 index 00000000000..6224450ef55 --- /dev/null +++ b/src/main/webapp/react-component/distance-info/distance-info.d.ts @@ -0,0 +1,111 @@ +/// +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { WithBackboneProps } from '../backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default<{ + map: import("backbone").Model; + } & WithBackboneProps, WithBackboneProps> | Readonly; + } & WithBackboneProps, WithBackboneProps>>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly; + } & WithBackboneProps, WithBackboneProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly; + } & WithBackboneProps, WithBackboneProps>>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default<{ + map: import("backbone").Model; + } & WithBackboneProps, WithBackboneProps>, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly; + } & WithBackboneProps, WithBackboneProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly; + } & WithBackboneProps, WithBackboneProps>>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/distance-info/distance-info.js b/src/main/webapp/react-component/distance-info/distance-info.js new file mode 100644 index 00000000000..a3a9b5db044 --- /dev/null +++ b/src/main/webapp/react-component/distance-info/distance-info.js @@ -0,0 +1,66 @@ +import { __assign, __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import withListenTo from '../backbone-container'; +import DistanceInfoPresentation from './presentation'; +var LEFT_OFFSET = 390; +var TOP_OFFSET = 180; +var mapPropsToState = function (props) { + var map = props.map; + var distance = map.get('currentDistance'); + return { + showDistance: map.get('measurementState') === 'START' && distance, + currentDistance: distance, + left: map.get('distanceInfo')['left'] - LEFT_OFFSET + 'px', + top: map.get('distanceInfo')['top'] - TOP_OFFSET + 'px', + }; +}; +var DistanceInfo = /** @class */ (function (_super) { + __extends(DistanceInfo, _super); + function DistanceInfo(props) { + var _this = _super.call(this, props) || this; + _this.listenToMap = function () { + var _a = _this.props, listenTo = _a.listenTo, map = _a.map; + listenTo(map, 'change:currentDistance', _this.handleDistanceChange); + listenTo(map, 'change:measurementState', _this.handleMeasurementStateChange); + }; + _this.handleDistanceChange = function () { + _this.setState(mapPropsToState(_this.props)); + }; + _this.handleMeasurementStateChange = function () { + _this.setState(mapPropsToState(_this.props)); + }; + _this.state = __assign(__assign({}, mapPropsToState(props)), { showDistance: false }); + return _this; + } + DistanceInfo.prototype.componentDidMount = function () { + this.listenToMap(); + }; + DistanceInfo.prototype.componentWillUnmount = function () { + var _a = this.props, stopListening = _a.stopListening, map = _a.map; + stopListening(map, 'change:currentDistance', this.handleDistanceChange); + stopListening(map, 'change:measurementState', this.handleMeasurementStateChange); + }; + DistanceInfo.prototype.render = function () { + return this.state.showDistance ? ( + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ showDistance: Boolean; currentDistance: Nu... Remove this comment to see the full error message + React.createElement(DistanceInfoPresentation, __assign({}, this.state))) : null; + }; + return DistanceInfo; +}(React.Component)); +export default hot(module)(withListenTo(DistanceInfo)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzdGFuY2UtaW5mby5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvZGlzdGFuY2UtaW5mby9kaXN0YW5jZS1pbmZvLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLFlBQW1DLE1BQU0sdUJBQXVCLENBQUE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tYXBQcm9wc1RvU3RhdGUodGhpcy5wcm9wcykpXG4gIH1cblxuICBoYW5kbGVNZWFzdXJlbWVudFN0YXRlQ2hhbmdlID0gKCkgPT4ge1xuICAgIHRoaXMuc2V0U3RhdGUobWFwUHJvcHNUb1N0YXRlKHRoaXMucHJvcHMpKVxuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiB0aGlzLnN0YXRlLnNob3dEaXN0YW5jZSA/IChcbiAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyMzIyKSBGSVhNRTogVHlwZSAneyBzaG93RGlzdGFuY2U6IEJvb2xlYW47IGN1cnJlbnREaXN0YW5jZTogTnUuLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgPERpc3RhbmNlSW5mb1ByZXNlbnRhdGlvbiB7Li4udGhpcy5zdGF0ZX0gLz5cbiAgICApIDogbnVsbFxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKHdpdGhMaXN0ZW5UbyhEaXN0YW5jZUluZm8pKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/distance-info/index.d.ts b/src/main/webapp/react-component/distance-info/index.d.ts new file mode 100644 index 00000000000..9fafea81805 --- /dev/null +++ b/src/main/webapp/react-component/distance-info/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './distance-info'; diff --git a/src/main/webapp/react-component/distance-info/index.js b/src/main/webapp/react-component/distance-info/index.js new file mode 100644 index 00000000000..48e6940974c --- /dev/null +++ b/src/main/webapp/react-component/distance-info/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './distance-info'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2Rpc3RhbmNlLWluZm8vaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0saUJBQWlCLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL2Rpc3RhbmNlLWluZm8nXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/distance-info/presentation.d.ts b/src/main/webapp/react-component/distance-info/presentation.d.ts new file mode 100644 index 00000000000..792a2031e32 --- /dev/null +++ b/src/main/webapp/react-component/distance-info/presentation.d.ts @@ -0,0 +1,8 @@ +/// +type Props = { + currentDistance: number; + left: number; + top: number; +}; +declare const render: (props: Props) => JSX.Element; +export default render; diff --git a/src/main/webapp/react-component/distance-info/presentation.js b/src/main/webapp/react-component/distance-info/presentation.js new file mode 100644 index 00000000000..6eecc9b7a3a --- /dev/null +++ b/src/main/webapp/react-component/distance-info/presentation.js @@ -0,0 +1,42 @@ +import { __assign, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import DistanceUtils from '../../js/DistanceUtils'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: 'Inconsolata', 'Lucida Console', monospace;\n background: ", ";\n display: block;\n width: auto;\n height: auto;\n font-size: ", ";\n position: absolute;\n text-align: left;\n padding: ", ";\n max-width: 50%;\n"], ["\n font-family: 'Inconsolata', 'Lucida Console', monospace;\n background: ", ";\n display: block;\n width: auto;\n height: auto;\n font-size: ", ";\n position: absolute;\n text-align: left;\n padding: ", ";\n max-width: 50%;\n"])), function (props) { return props.theme.backgroundModal; }, function (props) { return props.theme.mediumFontSize; }, function (props) { return props.theme.minimumSpacing; }); +var DistanceInfoText = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n" + /* + * Formats the current distance value to a string with the appropriate unit of measurement. + */ +]))); +/* + * Formats the current distance value to a string with the appropriate unit of measurement. + */ +var getDistanceText = function (distance) { + // use meters when distance is under 1000m and convert to kilometers when ≥1000m + var distanceText = distance < 1000 + ? "".concat(distance, " m") + : "".concat(DistanceUtils.getDistanceFromMeters(distance, 'kilometers').toFixed(2), " km"); + return distanceText; +}; +var render = function (props) { + var distance = props.currentDistance ? props.currentDistance : 0; + return (React.createElement(Root, __assign({}, props, { style: { left: props.left, top: props.top } }), + React.createElement(DistanceInfoText, null, getDistanceText(distance)))); +}; +export default render; +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9u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c3RhbmNlIDogMFxuXG4gIHJldHVybiAoXG4gICAgPFJvb3Qgey4uLnByb3BzfSBzdHlsZT17eyBsZWZ0OiBwcm9wcy5sZWZ0LCB0b3A6IHByb3BzLnRvcCB9fT5cbiAgICAgIDxEaXN0YW5jZUluZm9UZXh0PntnZXREaXN0YW5jZVRleHQoZGlzdGFuY2UpfTwvRGlzdGFuY2VJbmZvVGV4dD5cbiAgICA8L1Jvb3Q+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgcmVuZGVyXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.d.ts b/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.d.ts new file mode 100644 index 00000000000..e5eefece701 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.d.ts @@ -0,0 +1,44 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { AttributeTypes } from '../../../js/model/Startup/startup.types'; +import React from 'react'; +type ComparatorType = { + value: string; + label: string; +}; +export declare const dateComparators: ComparatorType[]; +export declare const geometryComparators: ComparatorType[]; +export declare const stringComparators: ComparatorType[]; +export declare const numberComparators: { + value: string; + label: string; +}[]; +export declare const booleanComparators: ComparatorType[]; +export declare const TypeToComparators: { + [key in AttributeTypes]: ComparatorType[]; +}; +export declare const getComparators: (attribute: string) => ComparatorType[]; +export declare const ComparatorContext: React.Context<{ + getComparators: (attribute: string) => ComparatorType[]; +}>; +export declare function DefaultComparatorProvider({ children, }: { + children: React.ReactNode; +}): JSX.Element; +export declare function useComparators(): { + getComparators: (attribute: string) => ComparatorType[]; +}; +export declare function useGetComparators(): (attribute: string) => ComparatorType[]; +export declare function useComparatorsForAttribute(attribute: string): ComparatorType[]; +export {}; diff --git a/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.js b/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.js new file mode 100644 index 00000000000..3804d3b549a --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.js @@ -0,0 +1,155 @@ +import { __read } from "tslib"; +import { getAttributeType } from '../filterHelper'; +import React from 'react'; +// verified +export var dateComparators = [ + { + value: 'BEFORE', + label: 'BEFORE', + }, + { + value: 'AFTER', + label: 'AFTER', + }, + { + value: 'RELATIVE', + label: 'WITHIN THE LAST', + }, + { + value: 'DURING', + label: 'BETWEEN', + }, + { + value: 'IS NULL', + label: 'IS EMPTY', + }, + { + value: 'AROUND', + label: 'AROUND', + }, +]; +// verified +export var geometryComparators = [ + { + value: 'GEOMETRY', + label: 'INTERSECTS', + }, + { + value: 'IS NULL', + label: 'IS EMPTY', + }, +]; +// verified +export var stringComparators = [ + { + value: 'ILIKE', + label: 'CONTAINS', + }, + { + value: 'LIKE', + label: 'MATCHCASE', + }, + { + value: '=', + label: '=', + }, + { + value: 'FILTER FUNCTION proximity', + label: 'NEAR', + }, + { + value: 'BOOLEAN_TEXT_SEARCH', + label: 'BOOLEAN', + }, + { + value: 'IS NULL', + label: 'IS EMPTY', + }, +]; +// verified +export var numberComparators = [ + { + value: '>', + label: '>', + }, + { + value: '<', + label: '<', + }, + { + value: '=', + label: '=', + }, + { + value: '>=', + label: '>=', + }, + { + value: '<=', + label: '<=', + }, + { + value: 'BETWEEN', + label: 'RANGE', + }, + { + value: 'IS NULL', + label: 'IS EMPTY', + }, +]; +// verified +export var booleanComparators = [ + { + value: '=', + label: '=', + }, + { + value: 'IS NULL', + label: 'IS EMPTY', + }, +]; +export var TypeToComparators = { + STRING: stringComparators, + DATE: dateComparators, + LONG: numberComparators, + DOUBLE: numberComparators, + FLOAT: numberComparators, + INTEGER: numberComparators, + SHORT: numberComparators, + LOCATION: geometryComparators, + GEOMETRY: geometryComparators, + BOOLEAN: booleanComparators, + XML: [], + OBJECT: [], + BINARY: [], +}; +export var getComparators = function (attribute) { + var comparators = TypeToComparators[getAttributeType(attribute)] || []; + // IS NULL checks do not work on these + if (attribute === 'anyGeo' || attribute === 'anyText') { + comparators = comparators.filter(function (comparator) { return comparator.value !== 'IS NULL'; }); + } + return comparators; +}; +export var ComparatorContext = React.createContext({ + getComparators: getComparators, +}); +export function DefaultComparatorProvider(_a) { + var children = _a.children; + return (React.createElement(ComparatorContext.Provider, { value: { getComparators: getComparators } }, children)); +} +export function useComparators() { + return React.useContext(ComparatorContext); +} +export function useGetComparators() { + return useComparators().getComparators; +} +export function useComparatorsForAttribute(attribute) { + var comparators = useGetComparators(); + var _a = __read(React.useState(comparators(attribute)), 2), comparatorList = _a[0], setComparatorList = _a[1]; + React.useEffect(function () { + setComparatorList(comparators(attribute)); + }, [attribute, comparators]); + return comparatorList; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGFyYXRvclV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9maWx0ZXIvZmlsdGVyLWNvbXBhcmF0b3IvY29tcGFyYXRvclV0aWxzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBZUEsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFDbEQsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBR3pCLFdBQVc7QUFDWCxNQUFNLENBQUMsSUFBTSxlQUFlLEdBQUc7SUFDN0I7UUFDRSxLQUFLLEVBQUUsUUFBUTtRQUNmLEtBQUssRUFBRSxRQUFRO0tBQ2hCO0lBQ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RvckNvbnRleHQuUHJvdmlkZXIgdmFsdWU9e3sgZ2V0Q29tcGFyYXRvcnMgfX0+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgPC9Db21wYXJhdG9yQ29udGV4dC5Qcm92aWRlcj5cbiAgKVxufVxuXG5leHBvcnQgZnVuY3Rpb24gdXNlQ29tcGFyYXRvcnMoKSB7XG4gIHJldHVybiBSZWFjdC51c2VDb250ZXh0KENvbXBhcmF0b3JDb250ZXh0KVxufVxuXG5leHBvcnQgZnVuY3Rpb24gdXNlR2V0Q29tcGFyYXRvcnMoKSB7XG4gIHJldHVybiB1c2VDb21wYXJhdG9ycygpLmdldENvbXBhcmF0b3JzXG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2VDb21wYXJhdG9yc0ZvckF0dHJpYnV0ZShhdHRyaWJ1dGU6IHN0cmluZykge1xuICBjb25zdCBjb21wYXJhdG9ycyA9IHVzZUdldENvbXBhcmF0b3JzKClcbiAgY29uc3QgW2NvbXBhcmF0b3JMaXN0LCBzZXRDb21wYXJhdG9yTGlzdF0gPSBSZWFjdC51c2VTdGF0ZTxDb21wYXJhdG9yVHlwZVtdPihcbiAgICBjb21wYXJhdG9ycyhhdHRyaWJ1dGUpXG4gIClcbiAgUmVhY3QudXNlRWZmZWN0KCgpID0+IHtcbiAgICBzZXRDb21wYXJhdG9yTGlzdChjb21wYXJhdG9ycyhhdHRyaWJ1dGUpKVxuICB9LCBbYXR0cmlidXRlLCBjb21wYXJhdG9yc10pXG4gIHJldHVybiBjb21wYXJhdG9yTGlzdFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.d.ts b/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.d.ts new file mode 100644 index 00000000000..6f2e0fa0230 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.d.ts @@ -0,0 +1,10 @@ +/// +import { TextFieldProps } from '@mui/material/TextField'; +import { FilterClass } from '../../../component/filter-builder/filter.structure'; +type Props = { + filter: FilterClass; + setFilter: (filter: FilterClass) => void; + textFieldProps?: TextFieldProps; +}; +declare const FilterComparator: ({ filter, setFilter, textFieldProps }: Props) => JSX.Element | null; +export default FilterComparator; diff --git a/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.js b/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.js new file mode 100644 index 00000000000..16e0166fc6f --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.js @@ -0,0 +1,39 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React, { useEffect } from 'react'; +import MenuItem from '@mui/material/MenuItem'; +import TextField from '@mui/material/TextField'; +import { FilterClass, isBasicDatatypeClass, } from '../../../component/filter-builder/filter.structure'; +import { useComparatorsForAttribute } from './comparatorUtils'; +var FilterComparator = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter, textFieldProps = _a.textFieldProps; + var comparators = useComparatorsForAttribute(filter.property); + useEffect(function () { + var _a; + if (!comparators.map(function (comparator) { return comparator.value; }).includes(filter.type)) { + setFilter(new FilterClass(__assign(__assign({}, filter), { type: (_a = comparators[0]) === null || _a === void 0 ? void 0 : _a.value }))); + } + }, [filter, setFilter, comparators]); + if (isBasicDatatypeClass(filter)) { + return null; + } + return (React.createElement(TextField, __assign({ "data-id": "filter-comparator-select", fullWidth: true, variant: "outlined", select: true, value: filter.type, onChange: function (e) { + var newType = e.target.value; + setFilter(new FilterClass(__assign(__assign({}, filter), { type: newType }))); + }, size: "small" }, textFieldProps), comparators.map(function (comparator) { return (React.createElement(MenuItem, { value: comparator.value, key: comparator.label }, comparator.label)); }))); +}; +export default FilterComparator; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWNvbXBhcmF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2ZpbHRlci9maWx0ZXItY29tcGFyYXRvci9maWx0ZXItY29tcGFyYXRvci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssRUFBRSxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUN4QyxPQUFPLFFBQVEsTUFBTSx3QkFBd0IsQ0FBQTtBQUM3QyxPQUFPLFNBQTZCLE1BQU0seUJBQXlCLENBQUE7QUFDbkUsT0FBTyxFQUNMLFdBQVcsRUFDWCxvQkFBb0IsR0FDckIsTUFBTSxvREFBb0QsQ0FBQTtBQUMzRCxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQVE5RCxJQUFNLGdCQUFnQixHQUFHLFVBQUMsRUFBNEM7UUFBMUMsTUFBTSxZQUFBLEVBQUUsU0FBUyxlQUFBLEVBQUUsY0FBYyxvQkFBQTtJQUMzRCxJQUFNLFdBQVcsR0FBRywwQkFBMEIsQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUE7SUFDL0QsU0FBUyxDQUFDOztRQUNSLElBQ0UsQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLFVBQUMsVUFBVSxJQUFLLE9BQUEsVUFBVSxDQUFDLEtBQUssRUFBaEIsQ0FBZ0IsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEVBQ3hFO1lBQ0EsU0FB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KVxuXG4gIGlmIChpc0Jhc2ljRGF0YXR5cGVDbGFzcyhmaWx0ZXIpKSB7XG4gICAgcmV0dXJuIG51bGxcbiAgfVxuXG4gIHJldHVybiAoXG4gICAgPFRleHRGaWVsZFxuICAgICAgZGF0YS1pZD1cImZpbHRlci1jb21wYXJhdG9yLXNlbGVjdFwiXG4gICAgICBmdWxsV2lkdGhcbiAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICBzZWxlY3RcbiAgICAgIHZhbHVlPXtmaWx0ZXIudHlwZX1cbiAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICBjb25zdCBuZXdUeXBlID0gZS50YXJnZXQudmFsdWUgYXMgRmlsdGVyQ2xhc3NbJ3R5cGUnXVxuICAgICAgICBzZXRGaWx0ZXIoXG4gICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgIC4uLmZpbHRlcixcbiAgICAgICAgICAgIHR5cGU6IG5ld1R5cGUsXG4gICAgICAgICAgfSlcbiAgICAgICAgKVxuICAgICAgfX1cbiAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICB7Li4udGV4dEZpZWxkUHJvcHN9XG4gICAgPlxuICAgICAge2NvbXBhcmF0b3JzLm1hcCgoY29tcGFyYXRvcikgPT4gKFxuICAgICAgICA8TWVudUl0ZW0gdmFsdWU9e2NvbXBhcmF0b3IudmFsdWV9IGtleT17Y29tcGFyYXRvci5sYWJlbH0+XG4gICAgICAgICAge2NvbXBhcmF0b3IubGFiZWx9XG4gICAgICAgIDwvTWVudUl0ZW0+XG4gICAgICApKX1cbiAgICA8L1RleHRGaWVsZD5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBGaWx0ZXJDb21wYXJhdG9yXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-comparator/index.d.ts b/src/main/webapp/react-component/filter/filter-comparator/index.d.ts new file mode 100644 index 00000000000..866467f0c36 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-comparator/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './filter-comparator'; diff --git a/src/main/webapp/react-component/filter/filter-comparator/index.js b/src/main/webapp/react-component/filter/filter-comparator/index.js new file mode 100644 index 00000000000..ef0c32d7970 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-comparator/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './filter-comparator'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2ZpbHRlci9maWx0ZXItY29tcGFyYXRvci9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vZmlsdGVyLWNvbXBhcmF0b3InXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.d.ts b/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.d.ts new file mode 100644 index 00000000000..38d9cdc5cf0 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.d.ts @@ -0,0 +1,10 @@ +/// +import { TextFieldProps } from '@mui/material/TextField'; +type CustomInputOrDefaultType = { + value: string; + onChange: (e: string) => void; + props?: Partial; +}; +export declare const CustomInputOrDefaultPostValidation: ({ value, onChange, props, }: CustomInputOrDefaultType) => JSX.Element; +export declare const CustomInputOrDefault: (props: CustomInputOrDefaultType) => JSX.Element | null; +export {}; diff --git a/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.js b/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.js new file mode 100644 index 00000000000..7b50c95fe52 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.js @@ -0,0 +1,71 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import extension from '../../../extension-points'; +import TextField from '@mui/material/TextField'; +import { EnterKeySubmitProps } from '../../../component/custom-events/enter-key-submit'; +var validateShape = function (_a) { + var value = _a.value, onChange = _a.onChange; + if (typeof value !== 'string') { + var booleanText = value === null || value === void 0 ? void 0 : value.text; + if (booleanText) { + onChange(booleanText); + } + else { + onChange(''); + } + } +}; +var ShapeValidator = function (props) { + var value = props.value; + var _a = __read(React.useState(false), 2), isValid = _a[0], setIsValid = _a[1]; + React.useEffect(function () { + if (typeof value !== 'string') { + setIsValid(false); + validateShape(props); + } + else { + setIsValid(true); + } + }, [value]); + if (isValid) { + return React.createElement(CustomInputOrDefaultPostValidation, __assign({}, props)); + } + return null; +}; +export var CustomInputOrDefaultPostValidation = function (_a) { + var value = _a.value, onChange = _a.onChange, props = _a.props; + var textValue = value; + //Clear out value when switching between structured string inputs (e.g. NEAR) + if (typeof textValue !== 'string') { + textValue = (value === null || value === void 0 ? void 0 : value.text) || ''; + } + // call out to extension, if extension handles it, great, if not fallback to this + var componentToReturn = extension.customFilterInput({ + value: textValue, + onChange: onChange, + }); + if (componentToReturn) { + return componentToReturn; + } + else { + return (React.createElement(TextField, __assign({ value: textValue, onChange: function (e) { + onChange(e.target.value); + } }, EnterKeySubmitProps, props))); + } +}; +export var CustomInputOrDefault = ShapeValidator; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tSW5wdXRPckRlZmF1bHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2ZpbHRlci9maWx0ZXItaW5wdXQvY3VzdG9tSW5wdXRPckRlZmF1bHQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxTQUFTLE1BQU0sMkJBQTJCLENBQUE7QUFDakQsT0FBTyxTQUFTLE1BQU0seUJBQXlCLENBQUE7QUFFL0MsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sbURBQW1ELENBQUE7QUFTdkYsSUFBTSxhQUFhLEdBQUcsVUFBQyxFQUE2QztRQUEzQyxLQUFLLFdBQUEsRUFBRSxRQUFRLGNBQUE7SUFDdEMsSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRLEVBQUU7UUFDN0IsSUFBTSxXQUFXLEdBQUksS0FBeUIsYUFBekIsS0FBSyx1Q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HN9XG4gICAgICAgIHsuLi5wcm9wc31cbiAgICAgIC8+XG4gICAgKVxuICB9XG59XG5cbmV4cG9ydCBjb25zdCBDdXN0b21JbnB1dE9yRGVmYXVsdCA9IFNoYXBlVmFsaWRhdG9yXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-input/enum-input.d.ts b/src/main/webapp/react-component/filter/filter-input/enum-input.d.ts new file mode 100644 index 00000000000..6acd7246f49 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/enum-input.d.ts @@ -0,0 +1,6 @@ +/// +export declare const EnumInput: ({ options, onChange, value, }: { + options: string[]; + onChange: (val: any) => void; + value: string; +}) => JSX.Element; diff --git a/src/main/webapp/react-component/filter/filter-input/enum-input.js b/src/main/webapp/react-component/filter/filter-input/enum-input.js new file mode 100644 index 00000000000..3b4d8ff1a95 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/enum-input.js @@ -0,0 +1,37 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import { dispatchEnterKeySubmitEvent } from '../../../component/custom-events/enter-key-submit'; +export var EnumInput = function (_a) { + var options = _a.options, onChange = _a.onChange, value = _a.value; + var _b = __read(React.useState(false), 2), isOpen = _b[0], setIsOpen = _b[1]; + return (React.createElement(Autocomplete, { onOpen: function () { + setIsOpen(true); + }, onClose: function () { + setIsOpen(false); + }, open: isOpen, fullWidth: true, size: "small", options: options, onChange: function (_e, newValue) { + onChange(newValue); + }, disableClearable: true, value: value, renderInput: function (params) { return React.createElement(TextField, __assign({}, params, { variant: "outlined" })); }, + // in this case do press so since the dropdown will close before keyup fires + onKeyPress: function (e) { + if (e.key === 'Enter' && !isOpen) { + dispatchEnterKeySubmitEvent(e); + } + } })); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bS1pbnB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvZmlsdGVyL2ZpbHRlci1pbnB1dC9lbnVtLWlucHV0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUN6QixPQUFPLFlBQVksTUFBTSw0QkFBNEIsQ0FBQTtBQUNyRCxPQUFPLFNBQVMsTUFBTSx5QkFBeUIsQ0FBQTtBQUMvQyxPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxtREFBbUQsQ0FBQTtBQUUvRixNQUFNLENBQUMsSUFBTSxTQUFTLEdBQUcsVUFBQyxFQVF6QjtRQVBDLE9BQU8sYUFBQSxFQUNQLFFBQVEsY0FBQSxFQUNSLEtBQUssV0FBQTtJQU1DLElBQUEsS0FBQSxPQUFzQixLQUFLLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxJQUFBLEVBQTFDLE1BQU0sUUFBQSxFQUFFLFNBQVMsUUFBeUIsQ0FBQTtJQUVqRCxPQUFPLENBQ0wsb0JBQUMsWUFBWSxJQUNYLE1BQU0sRUFBRTtZQUNOLFNBQVMsQ0FBQyxJQUFJLENBQUMsQ0FBQTtRQUNqQixDQUFDLEVBQ0QsT0FBTyxFQUFFO1lBQ1AsU0FBUyxDQUFDLEtBQUssQ0FBQyxDQUFBO1FB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XSA9IFJlYWN0LnVzZVN0YXRlKGZhbHNlKVxuXG4gIHJldHVybiAoXG4gICAgPEF1dG9jb21wbGV0ZVxuICAgICAgb25PcGVuPXsoKSA9PiB7XG4gICAgICAgIHNldElzT3Blbih0cnVlKVxuICAgICAgfX1cbiAgICAgIG9uQ2xvc2U9eygpID0+IHtcbiAgICAgICAgc2V0SXNPcGVuKGZhbHNlKVxuICAgICAgfX1cbiAgICAgIG9wZW49e2lzT3Blbn1cbiAgICAgIGZ1bGxXaWR0aFxuICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgIG9wdGlvbnM9e29wdGlvbnN9XG4gICAgICBvbkNoYW5nZT17KF9lOiBhbnksIG5ld1ZhbHVlOiBzdHJpbmcpID0+IHtcbiAgICAgICAgb25DaGFuZ2UobmV3VmFsdWUpXG4gICAgICB9fVxuICAgICAgZGlzYWJsZUNsZWFyYWJsZVxuICAgICAgdmFsdWU9e3ZhbHVlfVxuICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IDxUZXh0RmllbGQgey4uLnBhcmFtc30gdmFyaWFudD1cIm91dGxpbmVkXCIgLz59XG4gICAgICAvLyBpbiB0aGlzIGNhc2UgZG8gcHJlc3Mgc28gc2luY2UgdGhlIGRyb3Bkb3duIHdpbGwgY2xvc2UgYmVmb3JlIGtleXVwIGZpcmVzXG4gICAgICBvbktleVByZXNzPXsoZSkgPT4ge1xuICAgICAgICBpZiAoZS5rZXkgPT09ICdFbnRlcicgJiYgIWlzT3Blbikge1xuICAgICAgICAgIGRpc3BhdGNoRW50ZXJLZXlTdWJtaXRFdmVudChlKVxuICAgICAgICB9XG4gICAgICB9fVxuICAgIC8+XG4gIClcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-input/filter-input.d.ts b/src/main/webapp/react-component/filter/filter-input/filter-input.d.ts new file mode 100644 index 00000000000..e971582b376 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/filter-input.d.ts @@ -0,0 +1,41 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { getAttributeType as defaultGetAttributeType } from '../filterHelper'; +import { FilterClass } from '../../../component/filter-builder/filter.structure'; +import { ValidationResult } from '../../location/validators'; +export type Props = { + filter: FilterClass; + setFilter: (filter: FilterClass) => void; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; + getAttributeType?: typeof defaultGetAttributeType; +}; +export declare const FilterInputContext: React.Context<{ + resourceSizeIdentifiers: string[]; +}>; +/** + * This is how we determine when we should show the resource size input. + * The default provider uses the configuration to get the resource size identifiers. + * + * If you want to show the resource size input for a custom filter, + * you can create a custom provider and wrap your filter input with it. + */ +export declare const DefaultFilterInputProvider: ({ children, }: { + children: React.ReactNode; +}) => JSX.Element; +declare const FilterInput: ({ filter, setFilter, errorListener, getAttributeType, }: Props) => JSX.Element | null; +export default FilterInput; diff --git a/src/main/webapp/react-component/filter/filter-input/filter-input.js b/src/main/webapp/react-component/filter/filter-input/filter-input.js new file mode 100644 index 00000000000..ee4865fb721 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/filter-input.js @@ -0,0 +1,127 @@ +import { __assign, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { getAttributeType as defaultGetAttributeType } from '../filterHelper'; +import LocationInput from './filter-location-input'; +import { DateField } from '../../../component/fields/date'; +import { NearField } from '../../../component/fields/near'; +import { NumberRangeField } from '../../../component/fields/number-range'; +import { DateRangeField } from '../../../component/fields/date-range'; +import { DateRelativeField } from '../../../component/fields/date-relative'; +import { FilterClass, } from '../../../component/filter-builder/filter.structure'; +import { IntegerField } from '../../../component/fields/integer'; +import { FloatField } from '../../../component/fields/float'; +import { BooleanField } from '../../../component/fields/boolean'; +import { DateAroundField } from '../../../component/fields/date-around'; +import { CustomInputOrDefault } from './customInputOrDefault'; +import BooleanSearchBar from '../../../component/boolean-search-bar/boolean-search-bar'; +import { EnterKeySubmitProps } from '../../../component/custom-events/enter-key-submit'; +import { EnumInput } from './enum-input'; +import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks'; +import { ReservedBasicDatatype } from '../../../component/reserved-basic-datatype/reserved.basic-datatype'; +import { BasicDataTypePropertyName } from '../../../component/filter-builder/reserved.properties'; +import { ResourceSizeField } from '../../../component/fields/resource-size'; +import { ResourceSizeRangeField } from '../../../component/fields/resource-size-range'; +import { useConfiguration } from '../../../js/model/Startup/configuration.hooks'; +export var FilterInputContext = React.createContext({ + resourceSizeIdentifiers: [], +}); +/** + * This is how we determine when we should show the resource size input. + * The default provider uses the configuration to get the resource size identifiers. + * + * If you want to show the resource size input for a custom filter, + * you can create a custom provider and wrap your filter input with it. + */ +export var DefaultFilterInputProvider = function (_a) { + var children = _a.children; + var resourceSizeIdentifiers = useConfiguration().getResourceSizeIdentifiers(); + return (React.createElement(FilterInputContext.Provider, { value: { + resourceSizeIdentifiers: resourceSizeIdentifiers, + } }, children)); +}; +function useResourceSizeIdentifiers() { + return React.useContext(FilterInputContext); +} +var FilterInput = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter, errorListener = _a.errorListener, _b = _a.getAttributeType, getAttributeType = _b === void 0 ? defaultGetAttributeType : _b; + var resourceSizeIdentifiers = useResourceSizeIdentifiers().resourceSizeIdentifiers; + var type = getAttributeType(filter.property); + var MetacardDefinitions = useMetacardDefinitions(); + var value = filter.value; + var onChange = function (val) { + var context = filter.context, rest = __rest(filter, ["context"]); // most filters don't need context, and if they do they are using setFilter directly, not onChange + setFilter(new FilterClass(__assign(__assign({}, rest), { value: val }))); + }; + if (filter.property === BasicDataTypePropertyName) { + return (React.createElement(ReservedBasicDatatype, { onChange: onChange, value: value })); + } + if (resourceSizeIdentifiers.includes(filter.property)) { + switch (filter.type) { + case 'BETWEEN': + return React.createElement(ResourceSizeRangeField, { filter: filter, setFilter: setFilter }); + case 'IS NULL': + return null; + default: + return React.createElement(ResourceSizeField, { filter: filter, setFilter: setFilter }); + } + } + switch (filter.type) { + case 'IS NULL': + return null; + case 'BOOLEAN_TEXT_SEARCH': + return (React.createElement(BooleanSearchBar, { value: value, onChange: onChange, property: filter.property })); + case 'FILTER FUNCTION proximity': + return (React.createElement(NearField, { value: value, onChange: onChange })); + case 'DURING': + return (React.createElement(DateRangeField, { value: value, onChange: onChange })); + case 'RELATIVE': + return (React.createElement(DateRelativeField, { value: value, onChange: onChange })); + case 'AROUND': + return (React.createElement(DateAroundField, { value: value, onChange: onChange })); + case 'BETWEEN': + return (React.createElement(NumberRangeField, { value: value, type: type === 'INTEGER' ? 'integer' : 'float', onChange: onChange })); + } + switch (type) { + case 'BOOLEAN': + return (React.createElement(BooleanField, { value: value, onChange: onChange })); + case 'DATE': + return React.createElement(DateField, { onChange: onChange, value: value }); + case 'LOCATION': + return (React.createElement(LocationInput, { value: value, onChange: onChange, errorListener: errorListener })); + case 'FLOAT': + return (React.createElement(FloatField, { value: value, onChange: onChange })); + case 'INTEGER': + return (React.createElement(IntegerField, { value: value, onChange: onChange })); + } + var textValue = value; + var enumForAttr = MetacardDefinitions.getEnum(filter.property); + if (enumForAttr.length > 0) { + var allEnumForAttr = []; + if (enumForAttr) { + allEnumForAttr = allEnumForAttr.concat(enumForAttr); + } + return (React.createElement(EnumInput, __assign({ options: allEnumForAttr, onChange: onChange, value: textValue }, EnterKeySubmitProps))); + } + return (React.createElement(CustomInputOrDefault, { value: textValue, onChange: onChange, props: { + fullWidth: true, + variant: 'outlined', + type: 'text', + size: 'small', + } })); +}; +export default FilterInput; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWlucHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9maWx0ZXIvZmlsdGVyLWlucHV0L2ZpbHRlci1pbnB1dC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxFQUFFLGdCQUFnQixJQUFJLHVCQUF1QixFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFDN0UsT0FBTyxhQUFhLE1BQU0seUJBQXlCLENBQUE7QUFFbkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdDQUFnQyxDQUFBO0FBQzFELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQTtBQUMxRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQTtBQUN6RSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sc0NBQXNDLENBQUE7QUFDckUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0seUNBQXlDLENBQUE7QUFDM0UsT0FBTyxFQUVMLFdBQVcsR0FFWixNQUFNLG9EQUFvRCxDQUFBO0FBQzNELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQTtBQUNoRSxPQUFP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0ZXh0JyxcbiAgICAgICAgc2l6ZTogJ3NtYWxsJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBGaWx0ZXJJbnB1dFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-input/filter-location-input.d.ts b/src/main/webapp/react-component/filter/filter-input/filter-location-input.d.ts new file mode 100644 index 00000000000..e6678586217 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/filter-location-input.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: ({ onChange, value, errorListener }: any) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/filter/filter-input/filter-location-input.js b/src/main/webapp/react-component/filter/filter-input/filter-location-input.js new file mode 100644 index 00000000000..a43ca8140e0 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/filter-location-input.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import LocationView from '../../location/location'; +import { hot } from 'react-hot-loader'; +/** + * consolidated with location since there is no reason for indirection here, we should delete this + */ +var LocationInput = function (_a) { + var onChange = _a.onChange, value = _a.value, errorListener = _a.errorListener; + return (React.createElement(LocationView, { onChange: onChange, value: value, errorListener: errorListener })); +}; +export default hot(module)(LocationInput); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWxvY2F0aW9uLWlucHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd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AgIGVycm9yTGlzdGVuZXI9e2Vycm9yTGlzdGVuZXJ9XG4gICAgLz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShMb2NhdGlvbklucHV0KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-input/index.d.ts b/src/main/webapp/react-component/filter/filter-input/index.d.ts new file mode 100644 index 00000000000..273df5edac2 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './filter-input'; diff --git a/src/main/webapp/react-component/filter/filter-input/index.js b/src/main/webapp/react-component/filter/filter-input/index.js new file mode 100644 index 00000000000..6cde5dd059a --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-input/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './filter-input'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcH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ZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL2ZpbHRlci1pbnB1dCdcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter-property.d.ts b/src/main/webapp/react-component/filter/filter-property.d.ts new file mode 100644 index 00000000000..6524aca9157 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-property.d.ts @@ -0,0 +1,3 @@ +/// +import { Props } from './filter'; +export declare const FilterProperty: ({ filter, setFilter }: Props) => JSX.Element; diff --git a/src/main/webapp/react-component/filter/filter-property.js b/src/main/webapp/react-component/filter/filter-property.js new file mode 100644 index 00000000000..85e7ee8bd5f --- /dev/null +++ b/src/main/webapp/react-component/filter/filter-property.js @@ -0,0 +1,39 @@ +import { __assign } from "tslib"; +import * as React from 'react'; +import { getGroupedFilteredAttributes } from './filterHelper'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import { FilterClass } from '../../component/filter-builder/filter.structure'; +import { getComparators } from './filter-comparator/comparatorUtils'; +import { FilterContext } from './filter'; +export var FilterProperty = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter; + var limitedAttributeList = React.useContext(FilterContext).limitedAttributeList; + var attributeList = limitedAttributeList; + var groups = 1; + if (!attributeList) { + var groupedFilteredAttributes = getGroupedFilteredAttributes(); + attributeList = groupedFilteredAttributes.attributes; + groups = groupedFilteredAttributes.groups.length; + } + var property = filter.property; + var currentSelectedAttribute = attributeList.find(function (attrInfo) { return attrInfo.value === property; }); + var groupBy = groups > 1 ? function (option) { return option.group; } : undefined; + return (React.createElement(Autocomplete, { "data-id": "filter-type-autocomplete", fullWidth: true, size: "small", options: attributeList, groupBy: groupBy, getOptionLabel: function (option) { return option.label; }, isOptionEqualToValue: function (option, value) { return option.value === value.value; }, onChange: function (_e, newValue) { + /** + * should update both the property and the type, since type is restricted based on property + */ + var newProperty = newValue.value; + var comparators = getComparators(newProperty); + var updates = { + property: newProperty, + type: !comparators + .map(function (comparator) { return comparator.value; }) + .includes(filter.type) + ? comparators[0].value + : filter.type, + }; + setFilter(new FilterClass(__assign(__assign({}, filter), updates))); + }, disableClearable: true, value: currentSelectedAttribute, renderInput: function (params) { return React.createElement(TextField, __assign({}, params, { variant: "outlined" })); } })); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLXByb3BlcnR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9maWx0ZXIvZmlsdGVyLXByb3BlcnR5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFhLDRCQUE0QixFQUFFLE1BQU0sZ0JBQWdCLENBQUE7QUFDeEUsT0FBTyxZQUFZLE1BQU0sNEJBQTRCLENBQUE7QUFDckQsT0FBTyxTQUFTLE1BQU0seUJBQXlCLENBQUE7QUFDL0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGlEQUFpRCxDQUFBO0FBQzdFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQTtBQUNwRSxPQUFPLEVBQVMsYUFBYSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBRS9DLE1BQU0sQ0FBQyxJQUFNLGNBQWMsR0FBRyxVQUFDLEVBQTRCO1FBQTFCLE1BQU0sWUFBQSxFQUFFLFNBQVMsZUFBQTtJQUN4QyxJQUFBLG9CQUFvQixHQUFLLEtBQUssQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDLHFCQUFwQyxDQUFvQztJQUNoRSxJQUFJLGFBQWEsR0FBR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VxuICAgICAgICAgICAgPyAoY29tcGFyYXRvcnNbMF0udmFsdWUgYXMgRmlsdGVyQ2xhc3NbJ3R5cGUnXSlcbiAgICAgICAgICAgIDogZmlsdGVyLnR5cGUsXG4gICAgICAgIH1cblxuICAgICAgICBzZXRGaWx0ZXIoXG4gICAgICAgICAgbmV3IEZpbHRlckNsYXNzKHtcbiAgICAgICAgICAgIC4uLmZpbHRlcixcbiAgICAgICAgICAgIC4uLnVwZGF0ZXMsXG4gICAgICAgICAgfSlcbiAgICAgICAgKVxuICAgICAgfX1cbiAgICAgIGRpc2FibGVDbGVhcmFibGVcbiAgICAgIHZhbHVlPXtjdXJyZW50U2VsZWN0ZWRBdHRyaWJ1dGV9XG4gICAgICByZW5kZXJJbnB1dD17KHBhcmFtcykgPT4gPFRleHRGaWVsZCB7Li4ucGFyYW1zfSB2YXJpYW50PVwib3V0bGluZWRcIiAvPn1cbiAgICAvPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filter.d.ts b/src/main/webapp/react-component/filter/filter.d.ts new file mode 100644 index 00000000000..08336cab23a --- /dev/null +++ b/src/main/webapp/react-component/filter/filter.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { Attribute } from './filterHelper'; +import { FilterClass } from '../../component/filter-builder/filter.structure'; +import { ValidationResult } from '../location/validators'; +export type Props = { + filter: FilterClass; + setFilter: (filter: FilterClass) => void; + errorListener?: (validationResults: { + [key: string]: ValidationResult | undefined; + }) => void; +}; +export declare const FilterContext: React.Context<{ + limitedAttributeList: Attribute[] | undefined; +}>; +declare const _default: ({ filter, setFilter, errorListener }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/filter/filter.js b/src/main/webapp/react-component/filter/filter.js new file mode 100644 index 00000000000..2f4a233ac85 --- /dev/null +++ b/src/main/webapp/react-component/filter/filter.js @@ -0,0 +1,39 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import FilterComparator from './filter-comparator'; +import FilterInput from './filter-input'; +import Grid from '@mui/material/Grid'; +import { hot } from 'react-hot-loader'; +import { FilterProperty } from './filter-property'; +import { DefaultComparatorProvider } from './filter-comparator/comparatorUtils'; +import { DefaultFilterInputProvider } from './filter-input/filter-input'; +export var FilterContext = React.createContext({ + limitedAttributeList: undefined, +}); +var Filter = function (_a) { + var filter = _a.filter, setFilter = _a.setFilter, errorListener = _a.errorListener; + return (React.createElement(Grid, { container: true, direction: "column", alignItems: "center", className: "w-full" }, + React.createElement(Grid, { item: true, className: "w-full pb-2" }, + React.createElement(FilterProperty, { filter: filter, setFilter: setFilter, errorListener: errorListener })), + React.createElement(Grid, { item: true, className: "w-full pb-2" }, + React.createElement(DefaultComparatorProvider, null, + React.createElement(FilterComparator, { filter: filter, setFilter: setFilter }))), + React.createElement(Grid, { "data-id": "filter-input", item: true, className: "w-full" }, + React.createElement(DefaultFilterInputProvider, null, + React.createElement(FilterInput, { filter: filter, setFilter: setFilter, errorListener: errorListener }))))); +}; +export default hot(module)(Filter); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVy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lcj17ZmlsdGVyfVxuICAgICAgICAgIHNldEZpbHRlcj17c2V0RmlsdGVyfVxuICAgICAgICAgIGVycm9yTGlzdGVuZXI9e2Vycm9yTGlzdGVuZXJ9XG4gICAgICAgIC8+XG4gICAgICA8L0dyaWQ+XG4gICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbCBwYi0yXCI+XG4gICAgICAgIDxEZWZhdWx0Q29tcGFyYXRvclByb3ZpZGVyPlxuICAgICAgICAgIDxGaWx0ZXJDb21wYXJhdG9yIGZpbHRlcj17ZmlsdGVyfSBzZXRGaWx0ZXI9e3NldEZpbHRlcn0gLz5cbiAgICAgICAgPC9EZWZhdWx0Q29tcGFyYXRvclByb3ZpZGVyPlxuICAgICAgPC9HcmlkPlxuICAgICAgPEdyaWQgZGF0YS1pZD1cImZpbHRlci1pbnB1dFwiIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsXCI+XG4gICAgICAgIDxEZWZhdWx0RmlsdGVySW5wdXRQcm92aWRlcj5cbiAgICAgICAgICA8RmlsdGVySW5wdXRcbiAgICAgICAgICAgIGZpbHRlcj17ZmlsdGVyfVxuICAgICAgICAgICAgc2V0RmlsdGVyPXtzZXRGaWx0ZXJ9XG4gICAgICAgICAgICBlcnJvckxpc3RlbmVyPXtlcnJvckxpc3RlbmVyfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvRGVmYXVsdEZpbHRlcklucHV0UHJvdmlkZXI+XG4gICAgICA8L0dyaWQ+XG4gICAgPC9HcmlkPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKEZpbHRlcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/filterHelper.d.ts b/src/main/webapp/react-component/filter/filterHelper.d.ts new file mode 100644 index 00000000000..600978432da --- /dev/null +++ b/src/main/webapp/react-component/filter/filterHelper.d.ts @@ -0,0 +1,13 @@ +import { AttributeTypes } from '../../js/model/Startup/startup.types'; +export type Attribute = { + label: string; + value: string; + description: string | undefined; + group?: string; +}; +export declare const getGroupedFilteredAttributes: () => { + groups: string[]; + attributes: Attribute[]; +}; +export declare const getFilteredAttributeList: (group?: string) => Attribute[]; +export declare const getAttributeType: (attribute: string) => AttributeTypes; diff --git a/src/main/webapp/react-component/filter/filterHelper.js b/src/main/webapp/react-component/filter/filterHelper.js new file mode 100644 index 00000000000..8af075a8872 --- /dev/null +++ b/src/main/webapp/react-component/filter/filterHelper.js @@ -0,0 +1,81 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { BasicDataTypePropertyName } from '../../component/filter-builder/reserved.properties'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +var toAttribute = function (attribute, group) { + var _a; + return { + label: attribute.alias || attribute.id, + value: attribute.id, + description: (((_a = StartupDataStore.Configuration.config) === null || _a === void 0 ? void 0 : _a.attributeDescriptions) || {})[attribute.id], + group: group, + }; +}; +export var getGroupedFilteredAttributes = function () { + var allAttributes = StartupDataStore.MetacardDefinitions.getSortedAttributes().reduce(function (attributes, attr) { + attributes[attr.id] = attr; + return attributes; + }, {}); + var validCommonAttributes = StartupDataStore.Configuration.getCommonAttributes().reduce(function (attributes, id) { + var attribute = allAttributes[id]; + if (attribute) { + attributes.push(toAttribute(attribute, 'Commonly Used Attributes')); + } + return attributes; + }, []); + var basicDataTypeAttributeDefinition = StartupDataStore.MetacardDefinitions.getAttributeDefinition(BasicDataTypePropertyName); + var groupedFilteredAttributes = validCommonAttributes + .concat([ + toAttribute(basicDataTypeAttributeDefinition, 'Special Attributes'), + ]) + .concat(getFilteredAttributeList('All Attributes')); + var groups = validCommonAttributes.length > 0 + ? ['Commonly Used Attributes', 'Special Attributes', 'All Attributes'] + : ['Special Attributes', 'All Attributes']; + return { + groups: groups, + attributes: groupedFilteredAttributes, + }; +}; +export var getFilteredAttributeList = function (group) { + return StartupDataStore.MetacardDefinitions.getSortedAttributes() + .filter(function (_a) { + var id = _a.id; + return id === 'anyText' || + id === 'anyGeo' || + id === BasicDataTypePropertyName || + (!StartupDataStore.MetacardDefinitions.isHiddenAttribute(id) && + id !== 'thumbnail'); + }) + .map(function (attr) { return toAttribute(attr, group); }); +}; +export var getAttributeType = function (attribute) { + var _a; + var type = (_a = StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute]) === null || _a === void 0 ? void 0 : _a.type; + if (type === 'GEOMETRY') + return 'LOCATION'; + if (isIntegerType(type)) + return 'INTEGER'; + if (isFloatType(type)) + return 'FLOAT'; + return type; +}; +var isIntegerType = function (type) { + return type === 'INTEGER' || type === 'SHORT' || type === 'LONG'; +}; +var isFloatType = function (type) { + return type === 'FLOAT' || type === 'DOUBLE'; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVySGVscGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9maWx0ZXIvZmlsdGVySGVscGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sb0RBQW9ELENBQUE7QUFDOUYsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZ0NBQWdDLENBQUE7QUFZakUsSUFBTSxXQUFXLEdBQUcsVUFDbEIsU0FBa0MsRUFDbEMsS0FBYzs7SUFFZCxPQUFPO1FBQ0wsS0FBSyxFQUFFLFNBQ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ClbYXR0cmlidXRlXT8udHlwZVxuICBpZiAodHlwZSA9PT0gJ0dFT01FVFJZJykgcmV0dXJuICdMT0NBVElPTidcbiAgaWYgKGlzSW50ZWdlclR5cGUodHlwZSkpIHJldHVybiAnSU5URUdFUidcbiAgaWYgKGlzRmxvYXRUeXBlKHR5cGUpKSByZXR1cm4gJ0ZMT0FUJ1xuICByZXR1cm4gdHlwZVxufVxuY29uc3QgaXNJbnRlZ2VyVHlwZSA9ICh0eXBlOiBzdHJpbmcpID0+IHtcbiAgcmV0dXJuIHR5cGUgPT09ICdJTlRFR0VSJyB8fCB0eXBlID09PSAnU0hPUlQnIHx8IHR5cGUgPT09ICdMT05HJ1xufVxuY29uc3QgaXNGbG9hdFR5cGUgPSAodHlwZTogc3RyaW5nKSA9PiB7XG4gIHJldHVybiB0eXBlID09PSAnRkxPQVQnIHx8IHR5cGUgPT09ICdET1VCTEUnXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/filter/index.d.ts b/src/main/webapp/react-component/filter/index.d.ts new file mode 100644 index 00000000000..19568c82805 --- /dev/null +++ b/src/main/webapp/react-component/filter/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './filter'; diff --git a/src/main/webapp/react-component/filter/index.js b/src/main/webapp/react-component/filter/index.js new file mode 100644 index 00000000000..be4eb732e72 --- /dev/null +++ b/src/main/webapp/react-component/filter/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './filter'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2ZpbHRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFVBQVUsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vZmlsdGVyJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/grid/grid.d.ts b/src/main/webapp/react-component/grid/grid.d.ts new file mode 100644 index 00000000000..e0fb39d6ab3 --- /dev/null +++ b/src/main/webapp/react-component/grid/grid.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { GridProps } from '@mui/material/Grid'; +export declare const WrappedGrid: React.ComponentType>; +type CardGridProps = { + gridProps?: GridProps; + gridItemProps?: GridProps; + children?: React.ReactNode; +}; +export declare const WrappedCardGridItem: ({ children, gridItemProps, }: CardGridProps) => JSX.Element; +export declare const WrappedCardGrid: React.ComponentType>; +export {}; diff --git a/src/main/webapp/react-component/grid/grid.js b/src/main/webapp/react-component/grid/grid.js new file mode 100644 index 00000000000..db6870a829d --- /dev/null +++ b/src/main/webapp/react-component/grid/grid.js @@ -0,0 +1,18 @@ +import { __assign, __makeTemplateObject } from "tslib"; +import * as React from 'react'; +import Grid from '@mui/material/Grid'; +import styled from 'styled-components'; +export var WrappedGrid = styled(React.forwardRef(function (props, ref) { + return React.createElement(Grid, __assign({}, props, { ref: ref })); +}))(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""]))); +var GridItem = styled(WrappedGrid)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n > * {\n height: 100%;\n }\n"], ["\n > * {\n height: 100%;\n }\n"]))); +export var WrappedCardGridItem = function (_a) { + var children = _a.children, gridItemProps = _a.gridItemProps; + return (React.createElement(GridItem, __assign({}, gridItemProps, { item: true, xs: 12, sm: 6, md: 4, lg: 3, xl: 2 }), children)); +}; +export var WrappedCardGrid = styled(function (_a) { + var gridProps = _a.gridProps, children = _a.children; + return (React.createElement(WrappedGrid, __assign({ container: true, spacing: 3, direction: "row", justifyContent: "flex-start", wrap: "wrap" }, gridProps), children)); +})(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""]))); +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvZ3JpZC9ncmlkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxJQUFtQixNQUFNLG9CQUFvQixDQUFBO0FBQ3BELE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBRXRDLE1BQU0sQ0FBQyxJQUFNLFdBQVcsR0FBRyxNQUFNLENBQy9CLEtBQUssQ0FBQyxVQUFVLENBQUMsVUFBQyxLQUFnQixFQUFFLEdBQW1CO0lBQ3JELE9BQU8sb0JBQUMsSUFBSSxlQUFLLEtBQUssSUFBRSxHQUFHLEVBQUUsR0FBRyxJQUFJLENBQUE7QUFDdEMsQ0FBQyxDQUFDLENBQ0gscUVBQVcsRUFBRSxJQUEyRCxDQUFBO0FBRXpFLElBQU0sUUFBUSxHQUFHLE1BQU0sQ0FBQyxXQUFXLEN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CJ3cmFwXCJcbiAgICAgICAgey4uLmdyaWRQcm9wc31cbiAgICAgID5cbiAgICAgICAge2NoaWxkcmVufVxuICAgICAgPC9XcmFwcGVkR3JpZD5cbiAgICApXG4gIH1cbik8Q2FyZEdyaWRQcm9wcz5gYCBhcyBSZWFjdC5Db21wb25lbnRUeXBlPFxuICBSZWFjdC5Qcm9wc1dpdGhDaGlsZHJlbjxDYXJkR3JpZFByb3BzPlxuPlxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/grid/index.d.ts b/src/main/webapp/react-component/grid/index.d.ts new file mode 100644 index 00000000000..00dfc66bcf8 --- /dev/null +++ b/src/main/webapp/react-component/grid/index.d.ts @@ -0,0 +1 @@ +export { WrappedGrid as Grid, WrappedCardGrid as CardGrid, WrappedCardGridItem as CardGridItem, } from './grid'; diff --git a/src/main/webapp/react-component/grid/index.js b/src/main/webapp/react-component/grid/index.js new file mode 100644 index 00000000000..c2116051318 --- /dev/null +++ b/src/main/webapp/react-component/grid/index.js @@ -0,0 +1,2 @@ +export { WrappedGrid as Grid, WrappedCardGrid as CardGrid, WrappedCardGridItem as CardGridItem, } from './grid'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2dyaWQvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxXQUFXLElBQUksSUFBSSxFQUNuQixlQUFlLElBQUksUUFBUSxFQUMzQixtQkFBbUIsSUFBSSxZQUFZLEdBQ3BDLE1BQU0sUUFBUSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHtcbiAgV3JhcHBlZEdyaWQgYXMgR3JpZCxcbiAgV3JhcHBlZENhcmRHcmlkIGFzIENhcmRHcmlkLFxuICBXcmFwcGVkQ2FyZEdyaWRJdGVtIGFzIENhcmRHcmlkSXRlbSxcbn0gZnJvbSAnLi9ncmlkJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/group/index.d.ts b/src/main/webapp/react-component/group/index.d.ts new file mode 100644 index 00000000000..e5d722742ae --- /dev/null +++ b/src/main/webapp/react-component/group/index.d.ts @@ -0,0 +1,3 @@ +/// +declare const Group: (props: any) => JSX.Element; +export default Group; diff --git a/src/main/webapp/react-component/group/index.js b/src/main/webapp/react-component/group/index.js new file mode 100644 index 00000000000..db0faaf67eb --- /dev/null +++ b/src/main/webapp/react-component/group/index.js @@ -0,0 +1,19 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +var Group = function (props) { return (React.createElement("div", __assign({ className: "flex flex-row items-center flex-nowrap w-full" }, props), props.children)); }; +export default Group; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2dyb3VwL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUV6QixJQUFNLEtBQUssR0FBRyxVQUFDLEtBQVUsSUFBSyxPQUFBLENBQzVCLHNDQUFL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lcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCdcblxuY29uc3QgR3JvdXAgPSAocHJvcHM6IGFueSkgPT4gKFxuICA8ZGl2IGNsYXNzTmFtZT1cImZsZXggZmxleC1yb3cgaXRlbXMtY2VudGVyIGZsZXgtbm93cmFwIHctZnVsbFwiIHsuLi5wcm9wc30+XG4gICAge3Byb3BzLmNoaWxkcmVufVxuICA8L2Rpdj5cbilcblxuZXhwb3J0IGRlZmF1bHQgR3JvdXBcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/hoc/utils/index.d.ts b/src/main/webapp/react-component/hoc/utils/index.d.ts new file mode 100644 index 00000000000..1289c64651e --- /dev/null +++ b/src/main/webapp/react-component/hoc/utils/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { FC } from './utils'; diff --git a/src/main/webapp/react-component/hoc/utils/index.js b/src/main/webapp/react-component/hoc/utils/index.js new file mode 100644 index 00000000000..491c9df2ad6 --- /dev/null +++ b/src/main/webapp/react-component/hoc/utils/index.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2hvYy91dGlscy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIs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/react-component/hoc/utils/utils.d.ts new file mode 100644 index 00000000000..248121c3394 --- /dev/null +++ b/src/main/webapp/react-component/hoc/utils/utils.d.ts @@ -0,0 +1,16 @@ +/// +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export type FC

= (props: P) => JSX.Element; diff --git a/src/main/webapp/react-component/hoc/utils/utils.js b/src/main/webapp/react-component/hoc/utils/utils.js new file mode 100644 index 00000000000..d16d77fc367 --- /dev/null +++ b/src/main/webapp/react-component/hoc/utils/utils.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2hvYy91dGlscy91dGlscy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHR5cGUgRkM8UD4gPSAocHJvcHM6IFApID0+IEpTWC5FbGVtZW50XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/index.d.ts b/src/main/webapp/react-component/layer-item/index.d.ts new file mode 100644 index 00000000000..b142a7d6e37 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/index.d.ts @@ -0,0 +1,37 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export type LayerInfo = { + name: string; + id: string; + warning: string; + isRemovable: boolean; +}; +export type Order = { + order: number; + isBottom: boolean; + isTop: boolean; +}; +export type Visibility = { + alpha: number; + show: boolean; +}; +export type Actions = { + updateLayerShow: () => void; + updateLayerAlpha: (e: any) => void; + moveDown: (e: any) => void; + moveUp: (e: any) => void; + onRemove: () => void; +}; +export { default } from './layer-item'; diff --git a/src/main/webapp/react-component/layer-item/index.js b/src/main/webapp/react-component/layer-item/index.js new file mode 100644 index 00000000000..ee97759feac --- /dev/null +++ b/src/main/webapp/react-component/layer-item/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './layer-item'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xheWVyLWl0ZW0vaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUE0QkosT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGNBQWMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29y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lwZSBWaXNpYmlsaXR5ID0ge1xuICBhbHBoYTogbnVtYmVyXG4gIHNob3c6IGJvb2xlYW5cbn1cblxuZXhwb3J0IHR5cGUgQWN0aW9ucyA9IHtcbiAgdXBkYXRlTGF5ZXJTaG93OiAoKSA9PiB2b2lkXG4gIHVwZGF0ZUxheWVyQWxwaGE6IChlOiBhbnkpID0+IHZvaWRcbiAgbW92ZURvd246IChlOiBhbnkpID0+IHZvaWRcbiAgbW92ZVVwOiAoZTogYW55KSA9PiB2b2lkXG4gIG9uUmVtb3ZlOiAoKSA9PiB2b2lkXG59XG5cbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL2xheWVyLWl0ZW0nXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/layer-item.d.ts b/src/main/webapp/react-component/layer-item/layer-item.d.ts new file mode 100644 index 00000000000..5e74429c7d7 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/layer-item.d.ts @@ -0,0 +1,10 @@ +/// +/// +type ContainerProps = { + layer: Backbone.Model; + sortable: any; + updateOrdering: any; + focusModel: any; +}; +declare const _default: (props: ContainerProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/layer-item/layer-item.js b/src/main/webapp/react-component/layer-item/layer-item.js new file mode 100644 index 00000000000..da51086bd25 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/layer-item.js @@ -0,0 +1,86 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import LayerItemPresentation from './presentation/layer-item'; +import { useListenTo } from '../../component/selection-checkbox/useBackbone.hook'; +var mapPropsToState = function (props) { + var layer = props.layer; + var show = layer.get('show'); + var alpha = layer.get('alpha'); + var order = layer.get('order'); + var isBottom = layer.collection.last().id === layer.id; + var isTop = layer.collection.first().id === layer.id; + return { + order: { order: order, isBottom: isBottom, isTop: isTop }, + visibility: { show: show, alpha: alpha }, + }; +}; +var LayerItem = function (props) { + var _a = __read(React.useState(mapPropsToState(props)), 2), state = _a[0], setState = _a[1]; + useListenTo(props.layer, 'change:show change:alpha change:order', function () { + setState(mapPropsToState(props)); + }); + useListenTo(props.layer.collection, 'sort remove add', function () { + setState(mapPropsToState(props)); + }); + var layer = props.layer; + var id = layer.get('id'); + var layerInfo = { + name: layer.get('name'), + warning: layer.get('warning'), + isRemovable: layer.has('userRemovable'), + id: id, + }; + var actions = { + updateLayerShow: function () { + var show = state.visibility.show; + props.layer.set('show', !show); + }, + updateLayerAlpha: function (e) { + props.layer.set('alpha', e.target.value); + }, + moveDown: function () { + var focusModel = props.focusModel, layer = props.layer, sortable = props.sortable, updateOrdering = props.updateOrdering; + var ordering = sortable.toArray(); + var currentIndex = ordering.indexOf(layer.id); + ordering.splice(currentIndex, 1); + ordering.splice(currentIndex + 1, 0, layer.id); + sortable.sort(ordering); + focusModel.setDown(layer.id); + updateOrdering(); + }, + moveUp: function () { + var layer = props.layer, sortable = props.sortable, focusModel = props.focusModel, updateOrdering = props.updateOrdering; + var ordering = sortable.toArray(); + var currentIndex = ordering.indexOf(layer.id); + ordering.splice(currentIndex - 1, 0, layer.id); + ordering.splice(currentIndex + 1, 1); + sortable.sort(ordering); + focusModel.setUp(layer.id); + updateOrdering(); + }, + onRemove: function () { + var layer = props.layer; + layer.collection.remove(layer); + }, + }; + var presProps = __assign(__assign({}, state), { layerInfo: layerInfo, actions: actions, options: { focusModel: props.focusModel } }); + return (React.createElement("div", { className: "layer-item", "data-id": id, "layer-id": id }, + React.createElement(LayerItemPresentation, __assign({}, presProps)))); +}; +export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C5zZXRVcChsYXllci5pZClcbiAgICAgIHVwZGF0ZU9yZGVyaW5nKClcbiAgICB9LFxuICAgIG9uUmVtb3ZlOiAoKSA9PiB7XG4gICAgICBjb25zdCB7IGxheWVyIH0gPSBwcm9wc1xuICAgICAgbGF5ZXIuY29sbGVjdGlvbi5yZW1vdmUobGF5ZXIpXG4gICAgfSxcbiAgfVxuXG4gIGNvbnN0IHByZXNQcm9wcyA9IHtcbiAgICAuLi5zdGF0ZSxcbiAgICBsYXllckluZm8sXG4gICAgYWN0aW9uczogYWN0aW9ucyxcbiAgICBvcHRpb25zOiB7IGZvY3VzTW9kZWw6IHByb3BzLmZvY3VzTW9kZWwgfSxcbiAgfVxuXG4gIHJldHVybiAoXG4gICAgPGRpdiBjbGFzc05hbWU9XCJsYXllci1pdGVtXCIgZGF0YS1pZD17aWR9IGxheWVyLWlkPXtpZH0+XG4gICAgICA8TGF5ZXJJdGVtUHJlc2VudGF0aW9uIHsuLi5wcmVzUHJvcHN9IC8+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoTGF5ZXJJdGVtKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/presentation/alpha.d.ts b/src/main/webapp/react-component/layer-item/presentation/alpha.d.ts new file mode 100644 index 00000000000..392345dcf1c --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/alpha.d.ts @@ -0,0 +1,3 @@ +/// +import { PresentationProps } from '.'; +export declare const LayerAlpha: (props: PresentationProps) => JSX.Element; diff --git a/src/main/webapp/react-component/layer-item/presentation/alpha.js b/src/main/webapp/react-component/layer-item/presentation/alpha.js new file mode 100644 index 00000000000..0dab638d425 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/alpha.js @@ -0,0 +1,35 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import { DisabledBehavior } from '.'; +var Alpha = styled.input.attrs({ + min: '0', + max: '1', + step: '0.01', + type: 'range', +})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n vertical-align: middle !important;\n"], ["\n display: inline-block;\n vertical-align: middle !important;\n"]))); +var AlphaDisabled = styled(Alpha)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), function (props) { return DisabledBehavior(props.theme); }); +var AlphaEnabled = styled(Alpha)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n opacity: 1;\n cursor: default !important;\n"], ["\n opacity: 1;\n cursor: default !important;\n"]))); +var render = function (props) { + var _a = props.visibility, show = _a.show, alpha = _a.alpha; + var updateLayerAlpha = props.actions.updateLayerAlpha; + return show ? (React.createElement(AlphaEnabled, { "data-id": "alpha-slider", onChange: updateLayerAlpha, value: alpha })) : (React.createElement(AlphaDisabled, { "data-id": "alpha-slider", onChange: updateLayerAlpha, value: alpha, disabled: true })); +}; +export var LayerAlpha = hot(module)(render); +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxwaGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xheWVyLWl0ZW0vcHJlc2VudGF0aW9uL2FscGhhLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Oz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0dXJuIHNob3cgPyAoXG4gICAgPEFscGhhRW5hYmxlZFxuICAgICAgZGF0YS1pZD1cImFscGhhLXNsaWRlclwiXG4gICAgICBvbkNoYW5nZT17dXBkYXRlTGF5ZXJBbHBoYX1cbiAgICAgIHZhbHVlPXthbHBoYX1cbiAgICAvPlxuICApIDogKFxuICAgIDxBbHBoYURpc2FibGVkXG4gICAgICBkYXRhLWlkPVwiYWxwaGEtc2xpZGVyXCJcbiAgICAgIG9uQ2hhbmdlPXt1cGRhdGVMYXllckFscGhhfVxuICAgICAgdmFsdWU9e2FscGhhfVxuICAgICAgZGlzYWJsZWRcbiAgICAvPlxuICApXG59XG5cbmV4cG9ydCBjb25zdCBMYXllckFscGhhID0gaG90KG1vZHVsZSkocmVuZGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/presentation/index.d.ts b/src/main/webapp/react-component/layer-item/presentation/index.d.ts new file mode 100644 index 00000000000..7d3db11b262 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/index.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { GrabCursor, IsButton, HighlightBehavior, DisabledBehavior, } from '../../styles/mixins'; +import { LayerInfo, Order, Visibility, Actions } from '..'; +export type PresentationProps = { + layerInfo: LayerInfo; + order: Order; + visibility: Visibility; + actions: Actions; + options?: any; +}; +export { default as LayerRearrange } from './rearrange'; +export { LayerInteractions } from './interactions'; +export { LayerAlpha } from './alpha'; +export { LayerName } from './name'; +export { default } from './layer-item'; diff --git a/src/main/webapp/react-component/layer-item/presentation/index.js b/src/main/webapp/react-component/layer-item/presentation/index.js new file mode 100644 index 00000000000..45dddfccc3e --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/index.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { GrabCursor, IsButton, HighlightBehavior, DisabledBehavior, } from '../../styles/mixins'; +export { default as LayerRearrange } from './rearrange'; +export { LayerInteractions } from './interactions'; +export { LayerAlpha } from './alpha'; +export { LayerName } from './name'; +export { default } from './layer-item'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xheWVyLWl0ZW0vcHJlc2VudGF0aW9uL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBRUosT0FBTyxFQUNMLFVBQVUsRUFDVixRQUFRLEVBQ1IsaUJBQWlCLEVBQ2pCLGdCQUFnQixHQUNqQixNQUFNLHFCQUFxQixDQUFBO0FBVzVCLE9BQU8sRUFBRSxPQUFPLElBQUksY0FBYyxFQUFFLE1BQU0sYUFBYSxDQUFBO0FBQ3ZELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBQ2xELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxTQUFTLENBQUE7QUFDcEMsT0FB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XG5cbmV4cG9ydCB7XG4gIEdyYWJDdXJzb3IsXG4gIElzQnV0dG9uLFxuICBIaWdobGlnaHRCZWhhdmlvcixcbiAgRGlzYWJsZWRCZWhhdmlvcixcbn0gZnJvbSAnLi4vLi4vc3R5bGVzL21peGlucydcblxuaW1wb3J0IHsgTGF5ZXJJbmZvLCBPcmRlciwgVmlzaWJpbGl0eSwgQWN0aW9ucyB9IGZyb20gJy4uJ1xuZXhwb3J0IHR5cGUgUHJlc2VudGF0aW9uUHJvcHMgPSB7XG4gIGxheWVySW5mbzogTGF5ZXJJbmZvXG4gIG9yZGVyOiBPcmRlclxuICB2aXNpYmlsaXR5OiBWaXNpYmlsaXR5XG4gIGFjdGlvbnM6IEFjdGlvbnNcbiAgb3B0aW9ucz86IGFueVxufVxuXG5leHBvcnQgeyBkZWZhdWx0IGFzIExheWVyUmVhcnJhbmdlIH0gZnJvbSAnLi9yZWFycmFuZ2UnXG5leHBvcnQgeyBMYXllckludGVyYWN0aW9ucyB9IGZyb20gJy4vaW50ZXJhY3Rpb25zJ1xuZXhwb3J0IHsgTGF5ZXJBbHBoYSB9IGZyb20gJy4vYWxwaGEnXG5leHBvcnQgeyBMYXllck5hbWUgfSBmcm9tICcuL25hbWUnXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi9sYXllci1pdGVtJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/presentation/interactions.d.ts b/src/main/webapp/react-component/layer-item/presentation/interactions.d.ts new file mode 100644 index 00000000000..a127f06d7e9 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/interactions.d.ts @@ -0,0 +1,3 @@ +/// +import { PresentationProps } from '.'; +export declare const LayerInteractions: (props: PresentationProps) => JSX.Element; diff --git a/src/main/webapp/react-component/layer-item/presentation/interactions.js b/src/main/webapp/react-component/layer-item/presentation/interactions.js new file mode 100644 index 00000000000..8b8471150d3 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/interactions.js @@ -0,0 +1,49 @@ +import { __assign, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import { IsButton, HighlightBehavior } from '.'; +var Interactions = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: right;\n"], ["\n text-align: right;\n"]))); +var InteractionsButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n ", ";\n width: ", ";\n height: ", ";\n vertical-align: top;\n"], ["\n ", ";\n ", ";\n width: ", ";\n height: ", ";\n vertical-align: top;\n"])), function (props) { return IsButton(props.theme); }, function (props) { + return HighlightBehavior({ initialOpacity: props.theme.minimumOpacity }); +}, function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }); +var Warning = styled(InteractionsButton)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-block;\n color: ", ";\n cursor: default;\n"], ["\n display: inline-block;\n color: ", ";\n cursor: default;\n" + /* stylelint-disable block-no-empty */ +])), function (props) { return props.theme.warningColor; }); +/* stylelint-disable block-no-empty */ +var Remove = styled(InteractionsButton)(templateObject_4 || (templateObject_4 = __makeTemplateObject([""], [""]))); +var Show = styled(InteractionsButton)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: relative;\n display: inline-block !important;\n vertical-align: middle;\n"], ["\n position: relative;\n display: inline-block !important;\n vertical-align: middle;\n"]))); +var ShowIcon = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: inline;\n"], ["\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n display: inline;\n"]))); +var ContentShow = function (_a) { + var visibility = _a.visibility; + var className = "fa ".concat(visibility.show ? 'fa-eye' : 'fa-eye-slash'); + return React.createElement(ShowIcon, { className: className }); +}; +var render = function (props) { + var _a = props.layerInfo, isRemovable = _a.isRemovable, _b = _a.warning, warning = _b === void 0 ? '' : _b; + var _c = props.actions, updateLayerShow = _c.updateLayerShow, onRemove = _c.onRemove; + return (React.createElement(Interactions, null, + warning !== '' && (React.createElement(Warning, { "data-id": "view-warnings-button", "data-help": "View map layer warnings.", title: warning }, + React.createElement("span", { className: " fa fa-warning" }))), + isRemovable && (React.createElement(Remove, { "data-id": "remove-layer-button", "data-help": "Remove map layer from user preferences.", title: "Remove map layer from user preferences.", onClick: onRemove }, + React.createElement("span", { className: "fa fa-minus" }))), + React.createElement(Show, { "data-id": "visibility-button", "data-help": "Toggle layer visibility.", title: "Toggle layer visibility.", onClick: updateLayerShow }, + React.createElement(ContentShow, __assign({}, props))))); +}; +export var LayerInteractions = hot(module)(render); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJhY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9sYXllci1pdGVtL3ByZXNlbnRhdGlvbi9pbnRlcmFjdGlvbnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7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AgICAgID5cbiAgICAgICAgPENvbnRlbnRTaG93IHsuLi5wcm9wc30gLz5cbiAgICAgIDwvU2hvdz5cbiAgICA8L0ludGVyYWN0aW9ucz5cbiAgKVxufVxuXG5leHBvcnQgY29uc3QgTGF5ZXJJbnRlcmFjdGlvbnMgPSBob3QobW9kdWxlKShyZW5kZXIpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/presentation/layer-item.d.ts b/src/main/webapp/react-component/layer-item/presentation/layer-item.d.ts new file mode 100644 index 00000000000..582431d51a1 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/layer-item.d.ts @@ -0,0 +1,4 @@ +/// +import { PresentationProps } from '.'; +declare const _default: (props: PresentationProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/layer-item/presentation/layer-item.js b/src/main/webapp/react-component/layer-item/presentation/layer-item.js new file mode 100644 index 00000000000..01040cb389f --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/layer-item.js @@ -0,0 +1,37 @@ +import { __assign, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import { LayerRearrange, LayerAlpha, LayerInteractions, LayerName } from '.'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n white-space: nowrap;\n width: 100%;\n overflow: hidden;\n position: relative;\n border: 2px solid rgba(255, 255, 255, 0.1);\n border-top: ", ";\n"], ["\n display: block;\n white-space: nowrap;\n width: 100%;\n overflow: hidden;\n position: relative;\n border: 2px solid rgba(255, 255, 255, 0.1);\n border-top: ", ";\n"])), function (props) { + if (!props.order.isTop) { + return 'none'; + } + return; +}); +var LayerPropertiesRoot = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n vertical-align: middle;\n padding: 0 ", ";\n margin-left: ", ";\n width: calc(100% - ", ");\n border-left: 2px solid rgba(255, 255, 255, 0.1);\n"], ["\n display: inline-block;\n vertical-align: middle;\n padding: 0 ", ";\n margin-left: ", ";\n width: calc(100% - ", ");\n border-left: 2px solid rgba(255, 255, 255, 0.1);\n"])), function (props) { return props.theme.mediumSpacing; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }); +var render = function (props) { + return (React.createElement(Root, __assign({}, props), + React.createElement(LayerRearrange, __assign({}, props)), + React.createElement(LayerPropertiesRoot, null, + React.createElement(LayerName, __assign({}, props)), + React.createElement(LayerAlpha, __assign({}, props)), + React.createElement(LayerInteractions, __assign({}, props))))); +}; +export default hot(module)(render); +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXItaXRlbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbGF5ZXItaXRlbS9wcmVzZW50YXRpb24vbGF5ZXItaXRlbS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFHdEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxVQUFVLEVBQUUsaU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1LCAwLjEpO1xuYFxuXG5jb25zdCByZW5kZXIgPSAocHJvcHM6IFByZXNlbnRhdGlvblByb3BzKSA9PiB7XG4gIHJldHVybiAoXG4gICAgPFJvb3Qgey4uLnByb3BzfT5cbiAgICAgIDxMYXllclJlYXJyYW5nZSB7Li4ucHJvcHN9IC8+XG4gICAgICA8TGF5ZXJQcm9wZXJ0aWVzUm9vdD5cbiAgICAgICAgPExheWVyTmFtZSB7Li4ucHJvcHN9IC8+XG4gICAgICAgIDxMYXllckFscGhhIHsuLi5wcm9wc30gLz5cbiAgICAgICAgPExheWVySW50ZXJhY3Rpb25zIHsuLi5wcm9wc30gLz5cbiAgICAgIDwvTGF5ZXJQcm9wZXJ0aWVzUm9vdD5cbiAgICA8L1Jvb3Q+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkocmVuZGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/presentation/name.d.ts b/src/main/webapp/react-component/layer-item/presentation/name.d.ts new file mode 100644 index 00000000000..142b09688fa --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/name.d.ts @@ -0,0 +1,3 @@ +/// +import { PresentationProps } from '.'; +export declare const LayerName: (props: PresentationProps) => JSX.Element; diff --git a/src/main/webapp/react-component/layer-item/presentation/name.js b/src/main/webapp/react-component/layer-item/presentation/name.js new file mode 100644 index 00000000000..e9394380e52 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/name.js @@ -0,0 +1,30 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import { DisabledBehavior } from '.'; +var Name = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n line-height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n line-height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (props) { return props.theme.minimumButtonSize; }); +var NameDisabled = styled(Name)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n cursor: text !important;\n"], ["\n ", ";\n cursor: text !important;\n"])), function (props) { return DisabledBehavior(props.theme); }); +var NameEnabled = styled(Name)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n opacity: 1;\n"], ["\n opacity: 1;\n"]))); +var render = function (props) { + var _a = props.layerInfo.name, name = _a === void 0 ? 'Untitled' : _a; + var show = props.visibility.show; + return show ? (React.createElement(NameEnabled, { title: name }, name)) : (React.createElement(NameDisabled, { title: name }, name)); +}; +export var LayerName = hot(module)(render); +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmFtZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbGF5ZXItaXRlbS9wcmVzZW50YXRpb24vbmFtZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFxQixnQkFBZ0IsRUFBRSxNQUFNLEdBQUcsQ0FBQTtBQUV2RC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udGF0aW9uUHJvcHMsIERpc2FibGVkQmVoYXZpb3IgfSBmcm9tICcuJ1xuXG5jb25zdCBOYW1lID0gc3R5bGVkLmRpdmBcbiAgbGluZS1oZWlnaHQ6ICR7KHByb3BzKSA9PiBwcm9wcy50aGVtZS5taW5pbXVtQnV0dG9uU2l6ZX07XG4gIG92ZXJmbG93OiBoaWRkZW47XG4gIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuYFxuY29uc3QgTmFtZURpc2FibGVkID0gc3R5bGVkKE5hbWUpYFxuICAkeyhwcm9wcykgPT4gRGlzYWJsZWRCZWhhdmlvcihwcm9wcy50aGVtZSl9O1xuICBjdXJzb3I6IHRleHQgIWltcG9ydGFudDtcbmBcblxuY29uc3QgTmFtZUVuYWJsZWQgPSBzdHlsZWQoTmFtZSlgXG4gIG9wYWNpdHk6IDE7XG5gXG5cbmNvbnN0IHJlbmRlciA9IChwcm9wczogUHJlc2VudGF0aW9uUHJvcHMpID0+IHtcbiAgY29uc3QgeyBuYW1lID0gJ1VudGl0bGVkJyB9ID0gcHJvcHMubGF5ZXJJbmZvXG4gIGNvbnN0IHsgc2hvdyB9ID0gcHJvcHMudmlzaWJpbGl0eVxuICByZXR1cm4gc2hvdyA/IChcbiAgICA8TmFtZUVuYWJsZWQgdGl0bGU9e25hbWV9PntuYW1lfTwvTmFtZUVuYWJsZWQ+XG4gICkgOiAoXG4gICAgPE5hbWVEaXNhYmxlZCB0aXRsZT17bmFtZX0+e25hbWV9PC9OYW1lRGlzYWJsZWQ+XG4gIClcbn1cblxuZXhwb3J0IGNvbnN0IExheWVyTmFtZSA9IGhvdChtb2R1bGUpKHJlbmRlcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/layer-item/presentation/rearrange.d.ts b/src/main/webapp/react-component/layer-item/presentation/rearrange.d.ts new file mode 100644 index 00000000000..141161254da --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/rearrange.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { PresentationProps } from '.'; +declare class LayerRearrange extends React.Component { + private down; + private up; + constructor(props: PresentationProps); + componentDidMount(): void; + render(): JSX.Element; +} +declare const _default: typeof LayerRearrange; +export default _default; diff --git a/src/main/webapp/react-component/layer-item/presentation/rearrange.js b/src/main/webapp/react-component/layer-item/presentation/rearrange.js new file mode 100644 index 00000000000..069f81127c6 --- /dev/null +++ b/src/main/webapp/react-component/layer-item/presentation/rearrange.js @@ -0,0 +1,71 @@ +import { __extends, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import { IsButton, HighlightBehavior, GrabCursor } from '.'; +/* stylelint-disable block-no-empty */ +var Rearrange = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""]))); +var RearrangeButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n ", ";\n z-index: 1;\n position: absolute;\n height: calc(0.5 * ", ");\n line-height: calc(0.5 * ", ");\n"], ["\n ", ";\n ", ";\n z-index: 1;\n position: absolute;\n height: calc(0.5 * ", ");\n line-height: calc(0.5 * ", ");\n"])), function (props) { return IsButton(props.theme); }, HighlightBehavior({ initialOpacity: 0 }), function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }); +var Down = styled(RearrangeButton)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n top: calc(100% - 0.5 * ", ");\n"], ["\n top: calc(100% - 0.5 * ", ");\n"])), function (props) { return props.theme.minimumButtonSize; }); +var Up = styled(RearrangeButton)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n top: 0px;\n"], ["\n top: 0px;\n"]))); +var RearrangeIcon = styled.span(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n"], ["\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n"]))); +var Drag = styled.button(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", ";\n ", ";\n ", ";\n vertical-align: middle;\n position: absolute;\n top: 0px;\n height: 100%;\n"], ["\n ", ";\n ", ";\n ", ";\n vertical-align: middle;\n position: absolute;\n top: 0px;\n height: 100%;\n"])), function (props) { return IsButton(props.theme); }, function (props) { + return HighlightBehavior({ initialOpacity: props.theme.minimumOpacity }); +}, GrabCursor); +var RearrangeUp = function (props, forwardedRef) { + var isTop = props.order.isTop; + var handleClick = props.actions.moveUp; + return (!isTop && (React.createElement(Up, { ref: forwardedRef, onClick: handleClick }, + React.createElement(RearrangeIcon, { className: "fa fa-angle-up" })))); +}; +var RearrangeDown = function (props, forwardedRef) { + var isBottom = props.order.isBottom; + var handleClick = props.actions.moveDown; + return (!isBottom && (React.createElement(Down, { ref: forwardedRef, onClick: handleClick }, + React.createElement(RearrangeIcon, { className: "fa fa-angle-down" })))); +}; +var LayerRearrange = /** @class */ (function (_super) { + __extends(LayerRearrange, _super); + function LayerRearrange(props) { + var _this = _super.call(this, props) || this; + _this.down = React.createRef(); + _this.up = React.createRef(); + return _this; + } + LayerRearrange.prototype.componentDidMount = function () { + var _a = this.props.order, isTop = _a.isTop, isBottom = _a.isBottom; + var id = this.props.layerInfo.id; + var focusModel = this.props.options.focusModel; + if (focusModel.id === id) { + var focusRef_1 = focusModel.isUp() ? this.up : this.down; + focusRef_1 = isTop ? this.down : focusRef_1; + focusRef_1 = isBottom ? this.up : focusRef_1; + setTimeout(function () { return focusRef_1.current.focus(); }, 0); + } + }; + LayerRearrange.prototype.render = function () { + return (React.createElement(Rearrange, null, + RearrangeUp(this.props, this.up), + RearrangeDown(this.props, this.down), + React.createElement(Drag, { "data-id": "layer-rearrange-button", className: "layer-rearrange" }, + React.createElement("span", { className: "fa fa-arrows-v" })))); + }; + return LayerRearrange; +}(React.Component)); +export default hot(module)(LayerRearrange); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhcnJhbmdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9sYXllci1pdGVtL3ByZXNlbnRhdGlvbi9yZWFycmFuZ2UudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7QUFDdEMsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sRUFBcUIsUUFBUSxFQUFFLGlCQUFpQixFQUFFLFVBQVUsRUFBRSxNQUFNLEdBQUcsQ0FBQTtBQUU5RSxzQ0FBc0M7QUFDdEMsSUFBTSxTQUFTLEdBQUcsTUFBTSxDQUFDLEdBQUcsc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iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/location/base.line.d.ts b/src/main/webapp/react-component/location/base.line.d.ts new file mode 100644 index 00000000000..cc5dc20a250 --- /dev/null +++ b/src/main/webapp/react-component/location/base.line.d.ts @@ -0,0 +1,3 @@ +/// +declare const BaseLine: (props: any) => JSX.Element; +export default BaseLine; diff --git a/src/main/webapp/react-component/location/base.line.js b/src/main/webapp/react-component/location/base.line.js new file mode 100644 index 00000000000..a3e45d20ef9 --- /dev/null +++ b/src/main/webapp/react-component/location/base.line.js @@ -0,0 +1,454 @@ +import { __assign, __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React, { useState, useEffect } from 'react'; +import { ErrorComponent, validateGeo, initialErrorState, } from '../utils/validation'; +import Button from '@mui/material/Button'; +import CloseIcon from '@mui/icons-material/Close'; +import { validateUsngLineOrPoly, validateDmsLineOrPoly, validateUtmUpsLineOrPoly, } from './validators'; +import DmsTextField from './dms-textfield'; +import UtmupsTextField from './utmups-textfield'; +import { Units } from './common'; +import TextField from '../text-field'; +import { Radio, RadioItem } from '../radio/radio'; +import { MinimumSpacing } from './common'; +import _ from 'underscore'; +var coordinatePairRegex = /-?\d{1,3}(\.\d*)?\s-?\d{1,3}(\.\d*)?/g; +function buildWktString(coordinates) { + return '[[' + coordinates.join('],[') + ']]'; +} +function convertWktString(value) { + if (value.includes('MULTI')) { + return convertMultiWkt(value.includes('POLYGON'), value); + } + else if (value.includes('POLYGON') && value.endsWith('))')) { + return convertWkt(value, 4); + } + else if (value.includes('LINESTRING') && value.endsWith(')')) { + return convertWkt(value, 2); + } + return value; +} +function convertWkt(value, numCoords) { + var coordinatePairs = value.match(coordinatePairRegex); + if (!coordinatePairs || coordinatePairs.length < numCoords) { + return value; + } + var coordinates = coordinatePairs.map(function (coord) { + return coord.replace(' ', ','); + }); + return buildWktString(coordinates); +} +function convertMultiWkt(isPolygon, value) { + if (isPolygon && !value.endsWith(')))')) { + return value; + } + else if (!value.endsWith('))')) { + return value; + } + var splitter = isPolygon ? '))' : ')'; + var numPoints = isPolygon ? 4 : 2; + var shapes = value + .split(splitter) + .map(function (shape) { return shape.match(coordinatePairRegex); }); + shapes = shapes + .filter(function (shape) { return shape !== null && shape.length >= numPoints; }) + .map(function (shape) { + return shape.map(function (coordinatePair) { return coordinatePair.replace(' ', ','); }); + }); + return shapes.length === 0 + ? value + : shapes.length === 1 + ? buildWktString(shapes[0]) + : '[' + shapes.map(function (shapeCoords) { return buildWktString(shapeCoords); }) + ']'; +} +function getPolygonValue(currentValue, value) { + // if current value's 1st coord is different + // from value's first coord, then delete value's last coord + try { + var parsedValue = JSON.parse(value); + var parsedCurrentValue = JSON.parse(currentValue); + if (Array.isArray(parsedValue) && + Array.isArray(parsedCurrentValue) && + !_.isEqual(parsedValue[0], parsedCurrentValue[0])) { + parsedValue.splice(-1, 1); + return JSON.stringify(parsedValue); + } + else { + return value; + } + } + catch (e) { + return value; + } +} +var clearValidationResults = function (errorListener) { + errorListener && + errorListener({ + line: undefined, + buffer: undefined, + }); +}; +var LineLatLon = function (props) { + var label = props.label, geometryKey = props.geometryKey, setState = props.setState, setBufferState = props.setBufferState, unitKey = props.unitKey, widthKey = props.widthKey, mode = props.mode, polyType = props.polyType, errorListener = props.errorListener; + var _a = __read(useState(JSON.stringify(props[geometryKey])), 2), currentValue = _a[0], setCurrentValue = _a[1]; + var _b = __read(useState(initialErrorState), 2), baseLineError = _b[0], setBaseLineError = _b[1]; + var _c = __read(useState(initialErrorState), 2), bufferError = _c[0], setBufferError = _c[1]; + useEffect(function () { + var geometryKey = props.geometryKey; + var newValue = typeof props[geometryKey] === 'string' + ? props[geometryKey] + : JSON.stringify(props[geometryKey]); + setCurrentValue(newValue); + if (props.drawing) { + setBaseLineError(initialErrorState); + setBufferError(initialErrorState); + } + else { + var lineValidationResult = validateGeo(mode || polyType, newValue); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBaseLineError(lineValidationResult || initialErrorState); + var bufferValidationResult = validateGeo(widthKey, { + value: props[widthKey], + units: props[unitKey], + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBufferError(bufferValidationResult || initialErrorState); + errorListener && + errorListener({ + line: lineValidationResult, + buffer: bufferValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [ + props.polygon, + props.line, + props.lineWidth, + props.bufferWidth, + props.polygonBufferWidth, + props.lineUnits, + props.polygonBufferUnits, + ]); + return (React.createElement("div", null, + React.createElement("div", { className: "input-location flex flex-col flex-nowrap space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: any; value: string; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: any; value: string; onChange: (valu... Remove this comment to see the full error message + label: label, value: currentValue, onChange: function (value) { + var _a, _b; + value = convertWktString(value.trim()); + if (geometryKey.includes('poly')) { + value = getPolygonValue(currentValue, value); + } + setCurrentValue(value); + try { + setState((_a = {}, _a[geometryKey] = JSON.parse(value), _a)); + } + catch (e) { + // Set state with invalid value to trigger error messaging + setState((_b = {}, _b[geometryKey] = value, _b)); + } + } }), + React.createElement(ErrorComponent, { errorState: baseLineError }), + React.createElement(Units, { value: props[unitKey], onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(unitKey, value) + : setState((_a = {}, _a[unitKey] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + type: "number", label: "Buffer width", value: String(props[widthKey]), onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(widthKey, value) + : setState((_a = {}, _a[widthKey] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: bufferError })))); +}; +var LineDms = function (props) { + var geometryKey = props.geometryKey, dmsPointArray = props.dmsPointArray, setState = props.setState, unitKey = props.unitKey, setBufferState = props.setBufferState, widthKey = props.widthKey, errorListener = props.errorListener; + var _a = __read(useState(initialErrorState), 2), baseLineError = _a[0], setBaseLineError = _a[1]; + var _b = __read(useState(initialErrorState), 2), bufferError = _b[0], setBufferError = _b[1]; + useEffect(function () { + if (props.drawing) { + setBaseLineError(initialErrorState); + setBufferError(initialErrorState); + } + else { + var lineValidationResult = validateDmsLineOrPoly(dmsPointArray, geometryKey); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBaseLineError(lineValidationResult || initialErrorState); + var bufferValidationResult = validateGeo(widthKey, { + value: props[widthKey], + units: props[unitKey], + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBufferError(bufferValidationResult || initialErrorState); + errorListener && + errorListener({ + line: lineValidationResult, + buffer: bufferValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [ + props.polygon, + props.line, + dmsPointArray, + props.lineWidth, + props.bufferWidth, + props.polygonBufferWidth, + props.lineUnits, + props.polygonBufferUnits, + ]); + return (React.createElement("div", null, + React.createElement("div", { className: "input-location flex flex-col flex-nowrap space-y-2" }, dmsPointArray && + dmsPointArray.map(function (point, index) { + return (React.createElement("div", { key: 'point-' + index }, + React.createElement(DmsTextField, { point: point, setPoint: function (point) { + var _a; + var array = __spreadArray([], __read(dmsPointArray), false); + array.splice(index, 1, point); + setState((_a = {}, _a['dmsPointArray'] = array, _a)); + }, deletePoint: function () { + var _a; + var array = __spreadArray([], __read(dmsPointArray), false); + array.splice(index, 1); + setState((_a = {}, _a['dmsPointArray'] = array, _a)); + } }), + React.createElement(MinimumSpacing, null))); + })), + React.createElement(Button, { fullWidth: true, onClick: function () { + var _a; + var array = dmsPointArray ? __spreadArray([], __read(dmsPointArray), false) : []; + array.push({ + lat: '', + lon: '', + latDirection: 'N', + lonDirection: 'E', + }); + setState((_a = {}, _a['dmsPointArray'] = array, _a)); + } }, "Add Point"), + React.createElement(ErrorComponent, { errorState: baseLineError }), + React.createElement(Units, { value: props[unitKey], onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(unitKey, value) + : setState((_a = {}, _a[unitKey] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + type: "number", label: "Buffer width", value: String(props[widthKey]), onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(widthKey, value) + : setState((_a = {}, _a[widthKey] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: bufferError }))); +}; +var LineMgrs = function (props) { + var geometryKey = props.geometryKey, usngPointArray = props.usngPointArray, setState = props.setState, unitKey = props.unitKey, setBufferState = props.setBufferState, widthKey = props.widthKey, errorListener = props.errorListener; + var _a = __read(useState(initialErrorState), 2), baseLineError = _a[0], setBaseLineError = _a[1]; + var _b = __read(useState(initialErrorState), 2), bufferError = _b[0], setBufferError = _b[1]; + useEffect(function () { + if (props.drawing) { + setBaseLineError(initialErrorState); + setBufferError(initialErrorState); + } + else { + var lineValidationResult = validateUsngLineOrPoly(usngPointArray, geometryKey); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBaseLineError(lineValidationResult || initialErrorState); + var bufferValidationResult = validateGeo(widthKey, { + value: props[widthKey], + units: props[unitKey], + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBufferError(bufferValidationResult || initialErrorState); + errorListener && + errorListener({ + line: lineValidationResult, + buffer: bufferValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [ + props.polygon, + props.line, + usngPointArray, + props.lineWidth, + props.bufferWidth, + props.polygonBufferWidth, + props.lineUnits, + props.polygonBufferUnits, + ]); + return (React.createElement("div", null, + React.createElement("div", { className: "input-location flex flex-col flex-nowrap space-y-2" }, + usngPointArray && + usngPointArray.map(function (coord, index) { + return (React.createElement(TextField, { key: 'grid-' + index, + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ key: string; label: string; value: any; on... Remove this comment to see the full error message + label: "Grid", value: coord, onChange: function (value) { + var _a; + var points = __spreadArray([], __read(usngPointArray), false); + points.splice(index, 1, value); + setState((_a = {}, _a['usngPointArray'] = points, _a)); + }, addon: React.createElement(Button, { onClick: function () { + var _a; + var points = __spreadArray([], __read(usngPointArray), false); + points.splice(index, 1); + setState((_a = {}, _a['usngPointArray'] = points, _a)); + } }, + React.createElement(CloseIcon, null)) })); + }), + React.createElement(Button, { fullWidth: true, onClick: function () { + var _a; + var points = usngPointArray ? __spreadArray([], __read(usngPointArray), false) : []; + points.push(''); + setState((_a = {}, _a['usngPointArray'] = points, _a)); + } }, "Add Point"), + React.createElement(ErrorComponent, { errorState: baseLineError }), + React.createElement(Units, { value: props[unitKey], onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(unitKey, value) + : setState((_a = {}, _a[unitKey] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + type: "number", label: "Buffer width", value: String(props[widthKey]), onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(widthKey, value) + : setState((_a = {}, _a[widthKey] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: bufferError })))); +}; +var LineUtmUps = function (props) { + var geometryKey = props.geometryKey, utmUpsPointArray = props.utmUpsPointArray, setState = props.setState, unitKey = props.unitKey, setBufferState = props.setBufferState, widthKey = props.widthKey, errorListener = props.errorListener; + var _a = __read(useState(initialErrorState), 2), baseLineError = _a[0], setBaseLineError = _a[1]; + var _b = __read(useState(initialErrorState), 2), bufferError = _b[0], setBufferError = _b[1]; + useEffect(function () { + if (props.drawing) { + setBaseLineError(initialErrorState); + setBufferError(initialErrorState); + } + else { + var lineValidationResult = validateUtmUpsLineOrPoly(utmUpsPointArray, geometryKey); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBaseLineError(lineValidationResult || initialErrorState); + var bufferValidationResult = validateGeo(widthKey, { + value: props[widthKey], + units: props[unitKey], + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setBufferError(bufferValidationResult || initialErrorState); + errorListener && + errorListener({ + line: lineValidationResult, + buffer: bufferValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [ + props.polygon, + props.line, + utmUpsPointArray, + props.lineWidth, + props.bufferWidth, + props.polygonBufferWidth, + props.lineUnits, + props.polygonBufferUnits, + ]); + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + utmUpsPointArray && + utmUpsPointArray.map(function (point, index) { + return (React.createElement("div", { key: index }, + React.createElement(UtmupsTextField, { point: point, setPoint: function (point) { + var _a; + var points = __spreadArray([], __read(utmUpsPointArray), false); + points.splice(index, 1, point); + setState((_a = {}, _a['utmUpsPointArray'] = points, _a)); + }, deletePoint: function () { + var _a; + var points = __spreadArray([], __read(utmUpsPointArray), false); + points.splice(index, 1); + setState((_a = {}, _a['utmUpsPointArray'] = points, _a)); + } }), + React.createElement(MinimumSpacing, null))); + }), + React.createElement(Button, { fullWidth: true, onClick: function () { + var _a; + var points = utmUpsPointArray ? __spreadArray([], __read(utmUpsPointArray), false) : []; + points.push({ + easting: '', + hemisphere: 'Northern', + northing: '', + zoneNumber: 0, + }); + setState((_a = {}, _a['utmUpsPointArray'] = points, _a)); + } }, "Add Point"), + React.createElement(ErrorComponent, { errorState: baseLineError }), + React.createElement(Units, { value: props[unitKey], onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(unitKey, value) + : setState((_a = {}, _a[unitKey] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + type: "number", label: "Buffer width", value: String(props[widthKey]), onChange: function (value) { + var _a; + typeof setBufferState === 'function' + ? setBufferState(widthKey, value) + : setState((_a = {}, _a[widthKey] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: bufferError }))); +}; +var BaseLine = function (props) { + var setState = props.setState, locationType = props.locationType; + var inputs = { + usng: LineMgrs, + dd: LineLatLon, + dms: LineDms, + utmups: LineUtmUps, + }; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var Component = inputs[locationType] || null; + return (React.createElement("div", null, + React.createElement(Radio, { value: locationType, onChange: function (value) { + var _a; + return setState((_a = {}, _a['locationType'] = value, _a)); + } }, + React.createElement(RadioItem, { value: "dd" }, "Lat/Lon (DD)"), + React.createElement(RadioItem, { value: "dms" }, "Lat/Lon (DMS)"), + React.createElement(RadioItem, { value: "usng" }, "USNG / MGRS"), + React.createElement(RadioItem, { value: "utmups" }, "UTM / UPS")), + React.createElement(MinimumSpacing, null), + Component !== null ? React.createElement(Component, __assign({}, props)) : null)); +}; +export default BaseLine; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxl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VxuICB9LCBbXG4gICAgcHJvcHMucG9seWdvbixcbiAgICBwcm9wcy5saW5lLFxuICAgIGRtc1BvaW50QXJyYXksXG4gICAgcHJvcHMubGluZVdpZHRoLFxuICAgIHByb3BzLmJ1ZmZlcldpZHRoLFxuICAgIHByb3BzLnBvbHlnb25CdWZmZXJXaWR0aCxcbiAgICBwcm9wcy5saW5lVW5pdHMsXG4gICAgcHJvcHMucG9seWdvbkJ1ZmZlclVuaXRzLFxuICBdKVxuXG4gIHJldHVybiAoXG4gICAgPGRpdj5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiaW5wdXQtbG9jYXRpb24gZmxleCBmbGV4LWNvbCBmbGV4LW5vd3JhcCBzcGFjZS15LTJcIj5cbiAgICAgICAge2Rtc1BvaW50QXJyYXkgJiZcbiAgICAgICAgICBkbXNQb2ludEFycmF5Lm1hcCgocG9pbnQ6IGFueSwgaW5kZXg6IGFueSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgPGRpdiBrZXk9eydwb2ludC0nICsgaW5kZXh9PlxuICAgICAgICAgICAgICAgIDxEbXNUZXh0RmllbGRcbiAgICAgICAgICAgICAgICAgIHBvaW50PXtwb2ludH1cbiAgICAgICAgICAgICAgICAgIHNldFBvaW50PXsocG9pbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGFycmF5ID0gWy4uLmRtc1BvaW50QXJyYXldXG4gICAgICAgICAgICAgICAgICAgIGFycmF5LnNwbGljZShpbmRleCwgMSwgcG9pbnQpXG4gICAgICAgICAgICAgICAgICAgIHNldFN0YXRlKHsgWydkbXNQb2ludEFycmF5J106IGFycmF5IH0pXG4gICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgZGVsZXRlUG9pbnQ9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGFycmF5ID0gWy4uLmRtc1BvaW50QXJyYXldXG4gICAgICAgICAgICAgICAgICAgIGFycmF5LnNwbGljZShpbmRleCwgMSlcbiAgICAgICAgICAgICAgICAgICAgc2V0U3RhdGUoeyBbJ2Rtc1BvaW50QXJyYXknXTogYXJyYXkgfSlcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8TWluaW11bVNwYWNpbmcgLz5cbiAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApXG4gICAgICAgICAgfSl9XG4gICAgICA8L2Rpdj5cbiAgICAgIDxCdXR0b25cbiAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICBsZXQgYXJyYXkgPSBkbXNQb2ludEFycmF5ID8gWy4uLmRtc1BvaW50QXJyYXldIDogW11cbiAgICAgICAgICBhcnJheS5wdXNoKHtcbiAgICAgICAgICAgIGxhdDogJycsXG4gICAgICAgICAgICBsb246ICcnLFxuICAgICAgICAgICAgbGF0RGlyZWN0aW9uOiAnTicsXG4gICAgICAgICAgICBsb25EaXJlY3Rpb246ICdFJyxcbiAgICAgICAgICB9KVxuICAgICAgICAgIHNldFN0YXRlKHsgWydkbXNQb2ludEFycmF5J106IGFycmF5IH0pXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIEFkZCBQb2ludFxuICAgICAgPC9CdXR0b24+XG4gICAgICA8RXJyb3JDb21wb25lbnQgZXJyb3JTdGF0ZT17YmFzZUxpbmVFcnJvcn0gLz5cbiAgICAgIDxVbml0c1xuICAgICAgICB2YWx1ZT17cHJvcHNbdW5pdEtleV19XG4gICAgICAgIG9uQ2hhbmdlPXsodmFsdWU6IGFueSkgPT4ge1xuICAgICAgICAgIHR5cGVvZiBzZXRCdWZmZXJTdGF0ZSA9PT0gJ2Z1bmN0aW9uJ1xuICAgICAgICAgICAgPyBzZXRCdWZmZXJTdGF0ZSh1bml0S2V5LCB2YWx1ZSlcbiAgICAgICAgICAgIDogc2V0U3RhdGUoeyBbdW5pdEtleV06IHZ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cbiAgICAgICAgICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoMjMyMikgRklYTUU6IFR5cGUgJ3sga2V5OiBzdHJpbmc7IGxhYmVsOiBzdHJpbmc7IHZhbHVlOiBhbnk7IG9uLi4uIFJlbW92ZSB0aGlzIGNvbW1lbnQgdG8gc2VlIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2VcbiAgICAgICAgICAgICAgICBsYWJlbD1cIkdyaWRcIlxuICAgICAgICAgICAgICAgIHZhbHVlPXtjb29yZH1cbiAgICAgICAgICAgICAgICBvbkNoYW5nZT17KHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBsZXQgcG9pbnRzID0gWy4uLnVzbmdQb2ludEFycmF5XVxuICAgICAgICAgICAgICAgICAgcG9pbnRzLnNwbGljZShpbmRleCwgMSwgdmFsdWUpXG4gICAgICAgICAgICAgICAgICBzZXRTdGF0ZSh7IFsndXNuZ1BvaW50QXJyYXknXTogcG9pbnRzIH0pXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICBhZGRvbj17XG4gICAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICBsZXQgcG9pbnRzID0gWy4uLnVzbmdQb2ludEFycmF5XVxuICAgICAgICAgICAgICAgICAgICAgIHBvaW50cy5zcGxpY2UoaW5kZXgsIDEpXG4gICAgICAgICAgICAgICAgICAgICAgc2V0U3RhdGUoeyBbJ3VzbmdQb2ludEFycmF5J106IHBvaW50cyB9KVxuICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICA8Q2xvc2VJY29uIC8+XG4gICAgICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApXG4gICAgICAgICAgfSl9XG4gICAgICAgIDxCdXR0b25cbiAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICBsZXQgcG9pbnRzID0gdXNuZ1BvaW50QXJyYXkgPyBbLi4udXNuZ1BvaW50QXJyYXldIDogW11cbiAgICAgICAgICAgIHBvaW50cy5wdXNoKCcnKVxuICAgICAgICAgICAgc2V0U3RhdGUoeyBbJ3VzbmdQb2ludEFycmF5J106IHBvaW50cyB9KVxuICAgICAgICAgIH19XG4gICAgICAgID5cbiAgICAgICAgICBBZGQgUG9pbnRcbiAgICAgICAgPC9CdXR0b24+XG4gICAgICAgIDxFcnJvckNvbXBvbmVudCBlcnJvclN0YXRlPXtiYXNlTGluZUVycm9yfSAvPlxuICAgICAgICA8VW5pdHNcbiAgICAgICAgICB2YWx1ZT17cHJvcHNbdW5pdEtleV19XG4gICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogYW55KSA9PiB7XG4gICAgICAgICAgICB0eXBlb2Ygc2V0QnVmZmVyU3RhdGUgPT09ICdmdW5jdGlvbidcbiAgICAgICAgICAgICAgPyBzZXRCdWZmZXJTdGF0ZSh1bml0S2V5LCB2YWx1ZSlcbiAgICAgICAgICAgICAgOiBzZXRTdGF0ZSh7IFt1bml0S2V5XTogdmFsdWUgfSlcbiAgICAgICAgICB9fVxuICAgICAgICA+XG4gICAgICAgICAgPFRleHRGaWVsZFxuICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDIzMjIpIEZJWE1FOiBUeXBlICd7IHR5cGU6IHN0cmluZzsgbGFiZWw6IHN0cmluZzsgdmFsdWU6IHN0cmluZy4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgICAgICAgICB0eXBlPVwibnVtYmVyXCJcbiAgICAgICAgICAgIGxhYmVsPVwiQnVmZmVyIHdpZHR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0LFxuICAgICAgICAgIGJ1ZmZlcjogYnVmZmVyVmFsaWRhdGlvblJlc3VsdCxcbiAgICAgICAgfSlcbiAgICB9XG4gICAgcmV0dXJuICgpID0+IGNsZWFyVmFsaWRhdGlvblJlc3VsdHMoZXJyb3JMaXN0ZW5lcilcbiAgfSwgW1xuICAgIHByb3BzLnBvbHlnb24sXG4gICAgcHJvcHMubGluZSxcbiAgICB1dG1VcHNQb2ludEFycmF5LFxuICAgIHByb3BzLmxpbmVXaWR0aCxcbiAgICBwcm9wcy5idWZmZXJXaWR0aCxcbiAgICBwcm9wcy5wb2x5Z29uQnVmZmVyV2lkdGgsXG4gICAgcHJvcHMubGluZVVuaXRzLFxuICAgIHByb3BzLnBvbHlnb25CdWZmZXJVbml0cyxcbiAgXSlcblxuICByZXR1cm4gKFxuICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LWNvbCBmbGV4LW5vd3JhcCBzcGFjZS15LTJcIj5cbiAgICAgIHt1dG1VcHNQb2ludEFycmF5ICYmXG4gICAgICAgIHV0bVVwc1BvaW50QXJyYXkubWFwKChwb2ludDogYW55LCBpbmRleDogYW55KSA9PiB7XG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXYga2V5PXtpbmRleH0+XG4gICAgICAgICAgICAgIDxVdG11cHNUZXh0RmllbGRcbiAgICAgICAgICAgICAgICBwb2ludD17cG9pbnR9XG4gICAgICAgICAgICAgICAgc2V0UG9pbnQ9eyhwb2ludCkgPT4ge1xuICAgICAgICAgICAgICAgICAgbGV0IHBvaW50cyA9IFsuLi51dG1VcHNQb2ludEFycmF5XVxuICAgICAgICAgICAgICAgICAgcG9pbnRzLnNwbGljZShpbmRleCwgMSwgcG9pbnQpXG4gICAgICAgICAgICAgICAgICBzZXRTdGF0ZSh7IFsndXRtVXBzUG9pbnRBcnJheSddOiBwb2ludHMgfSlcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIGRlbGV0ZVBvaW50PXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICBsZXQgcG9pbnRzID0gWy4uLnV0bVVwc1BvaW50QXJyYXldXG4gICAgICAgICAgICAgICAgICBwb2ludHMuc3BsaWNlKGluZGV4LCAxKVxuICAgICAgICAgICAgICAgICAgc2V0U3RhdGUoeyBbJ3V0bVVwc1BvaW50QXJyYXknXTogcG9pbnRzIH0pXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgPE1pbmltdW1TcGFjaW5nIC8+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICApXG4gICAgICAgIH0pfVxuICAgICAgPEJ1dHRvblxuICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgIGxldCBwb2ludHMgPSB1dG1VcHNQb2ludEFycmF5ID8gWy4uLnV0bVVwc1BvaW50QXJyYXldIDogW11cbiAgICAgICAgICBwb2ludHMucHVzaCh7XG4gICAgICAgICAgICBlYXN0aW5nOiAnJyxcbiAgICAgICAgICAgIGhlbWlzcGhlcmU6ICdOb3J0aGVybicsXG4gICAgICAgICAgICBub3J0aGluZzogJycsXG4gICAgICAgICAgICB6b25lTnVtYmVyOiAwLFxuICAgICAgICAgIH0pXG4gICAgICAgICAgc2V0U3RhdGUoeyBbJ3V0bVVwc1BvaW50QXJyYXknXTogcG9pbnRzIH0pXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIEFkZCBQb2ludFxuICAgICAgPC9CdXR0b24+XG4gICAgICA8RXJyb3JDb21wb25lbnQgZXJyb3JTdGF0ZT17YmFzZUxpbmVFcnJvcn0gLz5cbiAgICAgIDxVbml0c1xuICAgICAgICB2YWx1ZT17cHJvcHNbdW5pdEtleV19XG4gICAgICAgIG9uQ2hhbmdlPXsodmFsdWU6IGFueSkgPT4ge1xuICAgICAgICAgIHR5cGVvZiBzZXRCdWZmZXJTdGF0ZSA9PT0gJ2Z1bmN0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iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/location/bounding-box.d.ts b/src/main/webapp/react-component/location/bounding-box.d.ts new file mode 100644 index 00000000000..1d3cb4e524c --- /dev/null +++ b/src/main/webapp/react-component/location/bounding-box.d.ts @@ -0,0 +1,3 @@ +/// +declare const BoundingBox: (props: any) => JSX.Element; +export default BoundingBox; diff --git a/src/main/webapp/react-component/location/bounding-box.js b/src/main/webapp/react-component/location/bounding-box.js new file mode 100644 index 00000000000..36cf6cc8721 --- /dev/null +++ b/src/main/webapp/react-component/location/bounding-box.js @@ -0,0 +1,355 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React, { useState, useEffect } from 'react'; +import { validateGeo, ErrorComponent, initialErrorState, initialErrorStateWithDefault, } from '../utils/validation'; +import Group from '../group'; +import Label from './label'; +import TextField from '../text-field'; +import { Radio, RadioItem } from '../radio/radio'; +import { Zone, Hemisphere, MinimumSpacing } from './common'; +import { DmsLatitude, DmsLongitude, } from '../../component/location-new/geo-components/coordinates'; +import DirectionInput from '../../component/location-new/geo-components/direction'; +import { Direction } from '../../component/location-new/utils/dms-utils'; +var clearValidationResults = function (errorListener) { + errorListener && + errorListener({ + bbox: undefined, + bboxUL: undefined, + bboxLR: undefined, + }); +}; +var BoundingBoxLatLonDd = function (props) { + var north = props.north, east = props.east, south = props.south, west = props.west, setState = props.setState, errorListener = props.errorListener; + var _a = __read(useState(initialErrorStateWithDefault), 2), ddError = _a[0], setDdError = _a[1]; + useEffect(function () { + if (props.drawing) { + setDdError(initialErrorStateWithDefault); + } + else { + var validationResults = [ + validateGeo('lon', west), + validateGeo('lon', east), + validateGeo('lat', north), + validateGeo('lat', south), + validateGeo('bbox', { north: north, south: south, west: west, east: east }), + ]; + var validationResult = validationResults.find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setDdError(validationResult || initialErrorStateWithDefault); + errorListener && errorListener({ bbox: validationResult }); + } + return function () { return clearValidationResults(errorListener); }; + }, [props.east, props.west, props.south, props.north]); + function clampDd(key, value) { + var _a; + var coordinateType = key.includes('east') || key.includes('west') ? 'lon' : 'lat'; + // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message + var defaultValue = validateGeo(coordinateType, value).defaultValue; + setState((_a = {}, _a[key] = defaultValue || value, _a)); + } + return (React.createElement("div", { className: "input-location flex flex-col flex-nowrap space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "West", value: west !== undefined ? String(west) : west, onChange: function (value) { return clampDd('west', value); }, type: "number", step: "any", min: -180, max: 180, addon: "\u00B0" }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "South", value: south !== undefined ? String(south) : south, onChange: function (value) { return clampDd('south', value); }, type: "number", step: "any", min: -90, max: 90, addon: "\u00B0" }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "East", value: east !== undefined ? String(east) : east, onChange: function (value) { return clampDd('east', value); }, type: "number", step: "any", min: -180, max: 180, addon: "\u00B0" }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "North", value: north !== undefined ? String(north) : north, onChange: function (value) { return clampDd('north', value); }, type: "number", step: "any", min: -90, max: 90, addon: "\u00B0" }), + React.createElement(ErrorComponent, { errorState: ddError }))); +}; +var BoundingBoxLatLonDms = function (props) { + var dmsSouth = props.dmsSouth, dmsNorth = props.dmsNorth, dmsWest = props.dmsWest, dmsEast = props.dmsEast, dmsSouthDirection = props.dmsSouthDirection, dmsNorthDirection = props.dmsNorthDirection, dmsWestDirection = props.dmsWestDirection, dmsEastDirection = props.dmsEastDirection, setState = props.setState, errorListener = props.errorListener; + var _a = __read(useState(initialErrorStateWithDefault), 2), dmsError = _a[0], setDmsError = _a[1]; + var latitudeDirections = [Direction.North, Direction.South]; + var longitudeDirections = [Direction.East, Direction.West]; + useEffect(function () { + if (props.drawing) { + setDmsError(initialErrorStateWithDefault); + } + else { + var validationResults = [ + validateGeo('dmsLon', dmsWest), + validateGeo('dmsLon', dmsEast), + validateGeo('dmsLat', dmsNorth), + validateGeo('dmsLat', dmsSouth), + validateGeo('bbox', { + isDms: true, + dmsNorthDirection: dmsNorthDirection, + dmsSouthDirection: dmsSouthDirection, + dmsWestDirection: dmsWestDirection, + dmsEastDirection: dmsEastDirection, + north: dmsNorth, + south: dmsSouth, + west: dmsWest, + east: dmsEast, + }), + ]; + var validationResult = validationResults.find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setDmsError(validationResult || initialErrorStateWithDefault); + errorListener && errorListener({ bbox: validationResult }); + } + return function () { return clearValidationResults(errorListener); }; + }, [props.dmsWest, props.dmsSouth, props.dmsEast, props.dmsNorth]); + function clampDms(key, value) { + var _a; + var coordinateType = key.includes('East') || key.includes('West') ? 'dmsLon' : 'dmsLat'; + // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message + var defaultValue = validateGeo(coordinateType, value).defaultValue; + setState((_a = {}, _a[key] = defaultValue || value, _a)); + } + return (React.createElement("div", { className: "input-location flex flex-col flex-nowrap space-y-2" }, + React.createElement(DmsLongitude, { label: "West", value: dmsWest, onChange: function (value) { return clampDms('dmsWest', value); } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dmsWestDirection, onChange: function (value) { + var _a; + return setState((_a = {}, _a['dmsWestDirection'] = value, _a)); + } })), + React.createElement(DmsLatitude, { label: "South", value: dmsSouth, onChange: function (value) { return clampDms('dmsSouth', value); } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dmsSouthDirection, onChange: function (value) { + var _a; + return setState((_a = {}, _a['dmsSouthDirection'] = value, _a)); + } })), + React.createElement(DmsLongitude, { label: "East", value: dmsEast, onChange: function (value) { return clampDms('dmsEast', value); } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dmsEastDirection, onChange: function (value) { + var _a; + return setState((_a = {}, _a['dmsEastDirection'] = value, _a)); + } })), + React.createElement(DmsLatitude, { label: "North", value: dmsNorth, onChange: function (value) { return clampDms('dmsNorth', value); } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dmsNorthDirection, onChange: function (value) { + var _a; + return setState((_a = {}, _a['dmsNorthDirection'] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: dmsError }))); +}; +var BoundingBoxUsngMgrs = function (props) { + var usngbbUpperLeft = props.usngbbUpperLeft, usngbbLowerRight = props.usngbbLowerRight, setState = props.setState, errorListener = props.errorListener; + var _a = __read(useState(initialErrorState), 2), usngError = _a[0], setUsngError = _a[1]; + useEffect(function () { + if (props.drawing) { + setUsngError(initialErrorState); + } + else { + var validationResult = [ + validateGeo('usng', usngbbUpperLeft), + validateGeo('usng', usngbbLowerRight), + validateGeo('bbox', { + isUsng: true, + upperLeft: usngbbUpperLeft, + lowerRight: usngbbLowerRight, + }), + ].find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setUsngError(validationResult || initialErrorState); + errorListener && errorListener({ bbox: validationResult }); + } + return function () { return clearValidationResults(errorListener); }; + }, [props.usngbbUpperLeft, props.usngbbLowerRight]); + return (React.createElement("div", { className: "input-location flex flex-col flex-nowrap space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; style: { minWidth: number; ... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; style: { minWidth: number; ... Remove this comment to see the full error message + label: "Upper Left", style: { minWidth: 200 }, value: usngbbUpperLeft, onChange: function (value) { + var _a; + return setState((_a = {}, _a['usngbbUpperLeft'] = value, _a)); + } }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; style: { minWidth: number; ... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; style: { minWidth: number; ... Remove this comment to see the full error message + label: "Lower Right", style: { minWidth: 200 }, value: usngbbLowerRight, onChange: function (value) { + var _a; + return setState((_a = {}, _a['usngbbLowerRight'] = value, _a)); + } }), + React.createElement(ErrorComponent, { errorState: usngError }))); +}; +var BoundingBoxUtmUps = function (props) { + var utmUpsUpperLeftEasting = props.utmUpsUpperLeftEasting, utmUpsUpperLeftNorthing = props.utmUpsUpperLeftNorthing, utmUpsUpperLeftZone = props.utmUpsUpperLeftZone, utmUpsUpperLeftHemisphere = props.utmUpsUpperLeftHemisphere, utmUpsLowerRightEasting = props.utmUpsLowerRightEasting, utmUpsLowerRightNorthing = props.utmUpsLowerRightNorthing, utmUpsLowerRightZone = props.utmUpsLowerRightZone, utmUpsLowerRightHemisphere = props.utmUpsLowerRightHemisphere, setState = props.setState, errorListener = props.errorListener; + var upperLeft = { + easting: utmUpsUpperLeftEasting, + northing: utmUpsUpperLeftNorthing, + zoneNumber: utmUpsUpperLeftZone, + hemisphere: utmUpsUpperLeftHemisphere, + }; + var lowerRight = { + easting: utmUpsLowerRightEasting, + northing: utmUpsLowerRightNorthing, + zoneNumber: utmUpsLowerRightZone, + hemisphere: utmUpsLowerRightHemisphere, + }; + var _a = __read(useState(initialErrorState), 2), upperLeftError = _a[0], setUpperLeftError = _a[1]; + var _b = __read(useState(initialErrorState), 2), lowerRightError = _b[0], setLowerRightError = _b[1]; + useEffect(function () { + if (props.drawing) { + setUpperLeftError(initialErrorState); + setLowerRightError(initialErrorState); + } + else { + var upperLeftValidationResult = [ + validateGeo('easting', upperLeft), + validateGeo('northing', upperLeft), + validateGeo('zoneNumber', upperLeft), + validateGeo('hemisphere', upperLeft), + ].find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setUpperLeftError(upperLeftValidationResult || initialErrorState); + var lowerRightValidationResult = [ + validateGeo('easting', lowerRight), + validateGeo('northing', lowerRight), + validateGeo('zoneNumber', lowerRight), + validateGeo('hemisphere', lowerRight), + validateGeo('bbox', { isUtmUps: true, upperLeft: upperLeft, lowerRight: lowerRight }), + ].find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setLowerRightError(lowerRightValidationResult || initialErrorState); + errorListener && + errorListener({ + bboxUL: upperLeftValidationResult, + bboxLR: lowerRightValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [ + props.utmUpsUpperLeftEasting, + props.utmUpsUpperLeftNorthing, + props.utmUpsUpperLeftZone, + props.utmUpsUpperLeftHemisphere, + props.utmUpsLowerRightEasting, + props.utmUpsLowerRightNorthing, + props.utmUpsLowerRightZone, + props.utmUpsLowerRightHemisphere, + ]); + return (React.createElement("div", null, + React.createElement("div", { className: "input-location mb-2" }, + React.createElement(Group, null, + React.createElement(Label, null, "Upper Left"), + React.createElement("div", { className: "flex flex-col space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "Easting", value: utmUpsUpperLeftEasting !== undefined + ? String(utmUpsUpperLeftEasting) + : utmUpsUpperLeftEasting, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsUpperLeftEasting'] = value, _a)); + }, addon: "m" }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "Northing", value: utmUpsUpperLeftNorthing !== undefined + ? String(utmUpsUpperLeftNorthing) + : utmUpsUpperLeftNorthing, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsUpperLeftNorthing'] = value, _a)); + }, addon: "m" }), + React.createElement(Zone, { value: utmUpsUpperLeftZone, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsUpperLeftZone'] = value, _a)); + } }), + React.createElement(Hemisphere, { value: utmUpsUpperLeftHemisphere, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsUpperLeftHemisphere'] = value, _a)); + } }))), + React.createElement(ErrorComponent, { errorState: upperLeftError })), + React.createElement("div", { className: "input-location" }, + React.createElement(Group, null, + React.createElement(Label, null, "Lower Right"), + React.createElement("div", { className: "flex flex-col space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "Easting", value: utmUpsLowerRightEasting !== undefined + ? String(utmUpsLowerRightEasting) + : utmUpsLowerRightEasting, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsLowerRightEasting'] = value, _a)); + }, addon: "m" }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "Northing", value: utmUpsLowerRightNorthing !== undefined + ? String(utmUpsLowerRightNorthing) + : utmUpsLowerRightNorthing, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsLowerRightNorthing'] = value, _a)); + }, addon: "m" }), + React.createElement(Zone, { value: utmUpsLowerRightZone, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsLowerRightZone'] = value, _a)); + } }), + React.createElement(Hemisphere, { value: utmUpsLowerRightHemisphere, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsLowerRightHemisphere'] = value, _a)); + } }))), + React.createElement(ErrorComponent, { errorState: lowerRightError })))); +}; +var BoundingBox = function (props) { + var setState = props.setState, locationType = props.locationType; + var inputs = { + dd: BoundingBoxLatLonDd, + dms: BoundingBoxLatLonDms, + usng: BoundingBoxUsngMgrs, + utmUps: BoundingBoxUtmUps, + }; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var Component = inputs[locationType] || null; + return (React.createElement("div", null, + React.createElement(Radio, { value: locationType, onChange: function (value) { + var _a; + return setState((_a = {}, _a['locationType'] = value, _a)); + } }, + React.createElement(RadioItem, { value: "dd" }, "Lat/Lon (DD)"), + React.createElement(RadioItem, { value: "dms" }, "Lat/Lon (DMS)"), + React.createElement(RadioItem, { value: "usng" }, "USNG / MGRS"), + React.createElement(RadioItem, { value: "utmUps" }, "UTM / UPS")), + React.createElement(MinimumSpacing, null), + Component !== null ? React.createElement(Component, __assign({}, props)) : null)); +}; +export default BoundingBox; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm91bmRpbmctYm94LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9sb2NhdGlvbi9ib3VuZGluZy1ib3gudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEVBQUUsRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ2xELE9BQU8sRUFDTCxXQUFXLEVBQ1gsY0FBYyxFQUNkLGlCQUFpQixFQUNqQiw0QkFBNEIsR0FDN0IsTUFBTSxxQkFBcUIsQ0FBQTtBQUM1QixPQUFPLEtBQUssTUFBTSxVQUFVLENBQUE7QUFDNUIsT0FBTyxLQUFLLE1BQU0sU0FBUyxDQUFBO0FBQzNCLE9BQU8sU0FBUyxNQUFNLGVBQWUsQ0FBQTtBQUNyQyxPQUFPLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixD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sdS4uLiBSZW1vdmUgdGhpcyBjb21tZW50IHRvIHNlZSB0aGUgZnVsbCBlcnJvciBtZXNzYWdlXG4gICAgICAgICAgICAgIGxhYmVsPVwiRWFzdGluZ1wiXG4gICAgICAgICAgICAgIHZhbHVlPXtcbiAgICAgICAgICAgICAgICB1dG1VcHNVcHBlckxlZnRFYXN0aW5nICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgID8gU3RyaW5nKHV0bVVwc1VwcGVyTGVmdEVhc3RpbmcpXG4gICAgICAgICAgICAgICAgICA6IHV0bVVwc1VwcGVyTGVmdEVhc3RpbmdcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBvbkNoYW5nZT17KHZhbHVlKSA9PlxuICAgICAgICAgICAgICAgIHNldFN0YXRlKHsgWyd1dG1VcHNVcHBlckxlZnRFYXN0aW5nJ106IHZhbHVlIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYWRkb249XCJtXCJcbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyMzIyKSBGSVhNRTogVHlwZSAneyBsYWJlbDogc3RyaW5nOyB2YWx1ZTogYW55OyBvbkNoYW5nZTogKHZhbHUuLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgICAgICAgICBsYWJlbD1cIk5vcnRoaW5nXCJcbiAgICAgICAgICAgICAgdmFsdWU9e1xuICAgICAgICAgICAgICAgIHV0bVVwc1VwcGVyTGVmdE5vcnRoaW5nICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgID8gU3RyaW5nKHV0bVVwc1VwcGVyTGVmdE5vcnRoaW5nKVxuICAgICAgICAgICAgICAgICAgOiB1dG1VcHNVcHBlckxlZnROb3J0aGluZ1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXsodmFsdWUpID0+XG4gICAgICAgICAgICAgICAgc2V0U3RhdGUoeyBbJ3V0bVVwc1VwcGVyTGVmdE5vcnRoaW5nJ106IHZhbHVlIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYWRkb249XCJtXCJcbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8Wm9uZVxuICAgICAgICAgICAgICB2YWx1ZT17dXRtVXBzVXBwZXJMZWZ0Wm9uZX1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogYW55KSA9PlxuICAgICAgICAgICAgICAgIHNldFN0YXRlKHsgWyd1dG1VcHNVcHBlckxlZnRab25lJ106IHZhbHVlIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8SGVtaXNwaGVyZVxuICAgICAgICAgICAgICB2YWx1ZT17dXRtVXBzVXBwZXJMZWZ0SGVtaXNwaGVyZX1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogYW55KSA9PlxuICAgICAgICAgICAgICAgIHNldFN0YXRlKHsgWyd1dG1VcHNVcHBlckxlZnRIZW1pc3BoZXJlJ106IHZhbHVlIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvR3JvdXA+XG4gICAgICAgIDxFcnJvckNvbXBvbmVudCBlcnJvclN0YXRlPXt1cHBlckxlZnRFcnJvcn0gLz5cbiAgICAgIDwvZGl2PlxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJpbnB1dC1sb2NhdGlvblwiPlxuICAgICAgICA8R3JvdXA+XG4gICAgICAgICAgPExhYmVsPkxvd2VyIFJpZ2h0PC9MYWJlbD5cbiAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImZsZXggZmxleC1jb2wgc3BhY2UteS0yXCI+XG4gICAgICAgICAgICA8VG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aW5nICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgID8gU3RyaW5nKHV0bVVwc0xvd2VyUmlnaHROb3J0aGluZylcbiAgICAgICAgICAgICAgICAgIDogdXRtVXBzTG93ZXJSaWdodE5vcnRoaW5nXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZSkgPT5cbiAgICAgICAgICAgICAgICBzZXRTdGF0ZSh7IFsndXRtVXBzTG93ZXJSaWdodE5vcnRoaW5nJ106IHZhbHVlIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYWRkb249XCJtXCJcbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8Wm9uZVxuICAgICAgICAgICAgICB2YWx1ZT17dXRtVXBzTG93ZXJSaWdodFpvbmV9XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXsodmFsdWU6IGFueSkgPT5cbiAgICAgICAgICAgICAgICBzZXRTdGF0ZSh7IFsndXRtVXBzTG93ZXJSaWdodFpvbmUnXTogdmFsdWUgfSlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDxIZW1pc3BoZXJlXG4gICAgICAgICAgICAgIHZhbHVlPXt1dG1VcHNMb3dlclJpZ2h0SGVtaXNwaGVyZX1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogYW55KSA9PlxuICAgICAgICAgICAgICAgIHNldFN0YXRlKHsgWyd1dG1VcHNMb3dlclJpZ2h0SGVtaXNwaGVyZSddOiB2YWx1ZSB9KVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L0dyb3VwPlxuICAgICAgICA8RXJyb3JDb21wb25lbnQgZXJyb3JTdGF0ZT17bG93ZXJSaWdodEVycm9yfSAvPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuY29uc3QgQm91bmRpb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1JhZGlvPlxuICAgICAgPE1pbmltdW1TcGFjaW5nIC8+XG4gICAgICB7Q29tcG9uZW50ICE9PSBudWxsID8gPENvbXBvbmVudCB7Li4ucHJvcHN9IC8+IDogbnVsbH1cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBCb3VuZGluZ0JveFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/location/common.d.ts b/src/main/webapp/react-component/location/common.d.ts new file mode 100644 index 00000000000..443986f3a9f --- /dev/null +++ b/src/main/webapp/react-component/location/common.d.ts @@ -0,0 +1,6 @@ +/// +declare const Units: ({ value, onChange, children }: any) => JSX.Element; +declare const Zone: ({ value, onChange }: any) => JSX.Element; +declare const Hemisphere: ({ value, onChange }: any) => JSX.Element; +declare const MinimumSpacing: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>; +export { Units, Zone, Hemisphere, MinimumSpacing }; diff --git a/src/main/webapp/react-component/location/common.js b/src/main/webapp/react-component/location/common.js new file mode 100644 index 00000000000..6998cedbec7 --- /dev/null +++ b/src/main/webapp/react-component/location/common.js @@ -0,0 +1,64 @@ +import { __assign, __makeTemplateObject, __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import styled from 'styled-components'; +import Group from '../group'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import Label from './label'; +var Units = function (_a) { + var value = _a.value, onChange = _a.onChange, children = _a.children; + return (React.createElement(Group, null, + children, + React.createElement(Autocomplete, { fullWidth: true, disableClearable: true, options: [ + 'meters', + 'kilometers', + 'feet', + 'yards', + 'miles', + 'nautical miles', + ], renderInput: function (params) { + return React.createElement(TextField, __assign({}, params, { label: "", variant: "outlined" })); + }, value: value, onChange: function (_event, newVal) { + onChange(newVal); + }, size: "small", style: { minWidth: '200px' } }))); +}; +// create an array of 1-60 for zones +var range = __spreadArray([], __read(Array(61).keys()), false).map(function (val) { return val.toString(); }).slice(1); +var Zone = function (_a) { + var value = _a.value, onChange = _a.onChange; + return (React.createElement(Group, null, + React.createElement(Label, null, "Zone"), + React.createElement(Autocomplete, { className: "w-full shrink", disableClearable: true, options: range, renderInput: function (params) { + return React.createElement(TextField, __assign({}, params, { label: "", variant: "outlined" })); + }, value: value.toString(), onChange: function (_event, newVal) { + onChange(parseInt(newVal)); + }, size: "small" }))); +}; +var Hemisphere = function (_a) { + var value = _a.value, onChange = _a.onChange; + return (React.createElement(Group, null, + React.createElement(Label, null, "Hemisphere"), + React.createElement(Autocomplete, { className: "w-full shrink", disableClearable: true, options: ['Northern', 'Southern'], renderInput: function (params) { + return React.createElement(TextField, __assign({}, params, { label: "", variant: "outlined" })); + }, value: value, onChange: function (_event, newVal) { + onChange(newVal); + }, size: "small" }))); +}; +var MinimumSpacing = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n"], ["\n height: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }); +export { Units, Zone, Hemisphere, MinimumSpacing }; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9sb2NhdGlvbi9jb21tb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT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uZXhwb3J0IHsgVW5pdHMsIFpvbmUsIEhlbWlzcGhlcmUsIE1pbmltdW1TcGFjaW5nIH1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/location/dms-textfield.d.ts b/src/main/webapp/react-component/location/dms-textfield.d.ts new file mode 100644 index 00000000000..2273d0faa5a --- /dev/null +++ b/src/main/webapp/react-component/location/dms-textfield.d.ts @@ -0,0 +1,14 @@ +/// +type Direction = 'N' | 'S' | 'E' | 'W'; +type Point = { + latDirection: Direction; + lonDirection: Direction; + lat: string; + lon: string; +}; +declare const DmsTextfield: ({ point, setPoint, deletePoint, }: { + point: Point; + setPoint: (point: Point) => void; + deletePoint: () => void; +}) => JSX.Element; +export default DmsTextfield; diff --git a/src/main/webapp/react-component/location/dms-textfield.js b/src/main/webapp/react-component/location/dms-textfield.js new file mode 100644 index 00000000000..e0707b2cf1a --- /dev/null +++ b/src/main/webapp/react-component/location/dms-textfield.js @@ -0,0 +1,51 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import CloseIcon from '@mui/icons-material/Close'; +import IconButton from '@mui/material/IconButton'; +import { DmsLatitude, DmsLongitude, } from '../../component/location-new/geo-components/coordinates'; +import DirectionInput from '../../component/location-new/geo-components/direction'; +var DmsTextfield = function (_a) { + var point = _a.point, setPoint = _a.setPoint, deletePoint = _a.deletePoint; + return (React.createElement("div", null, + React.createElement("div", { className: "flex flex-row items-center flex-nowrap" }, + React.createElement("div", { className: "flex flex-col space-y-2 flex-nowrap shrink w-full" }, + React.createElement(DmsLatitude, { label: "Latitude", value: point.lat, onChange: function (value) { + setPoint(__assign(__assign({}, point), { lat: value })); + } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: ['N', 'S'], value: point.latDirection, onChange: function (value) { + setPoint(__assign(__assign({}, point), { latDirection: value })); + } })), + React.createElement(DmsLongitude, { label: "Longitude", value: point.lon, onChange: function (value) { + setPoint(__assign(__assign({}, point), { lon: value })); + } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: ['E', 'W'], value: point.lonDirection, onChange: function (value) { + setPoint(__assign(__assign({}, point), { lonDirection: value })); + } }))), + React.createElement("div", { className: "shrink-0 grow-0" }, + React.createElement(IconButton, { onClick: deletePoint, size: "large" }, + React.createElement(CloseIcon, null)))))); +}; +export default DmsTextfield; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG1zLXRleHRmaWVsZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbG9jYXRpb24vZG1zLXRleHRmaWVsZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxTQUFTLE1BQU0sMkJBQTJCLENBQUE7QUFDakQsT0FBTyxVQUFVLE1BQU0sMEJBQTBCLENBQUE7QUFDakQsT0FBTyxFQUNMLFdBQVcsRUFDWCxZQUFZLEdBQ2IsTUFBTSx5REFBeUQsQ0FBQTtBQUNoRSxPQUFPLGNBQWMsTUFBTSx1REFBdUQsQ0FBQTtBQVdsRixJQUFNLFlBQVksR0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BQb2ludCkgPT4gdm9pZFxuICBkZWxldGVQb2ludDogKCkgPT4gdm9pZFxufSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXY+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cImZsZXggZmxleC1yb3cgaXRlbXMtY2VudGVyIGZsZXgtbm93cmFwXCI+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBmbGV4LWNvbCBzcGFjZS15LTIgZmxleC1ub3dyYXAgc2hyaW5rIHctZnVsbFwiPlxuICAgICAgICAgIDxEbXNMYXRpdHVkZVxuICAgICAgICAgICAgbGFiZWw9XCJMYXRpdHVkZVwiXG4gICAgICAgICAgICB2YWx1ZT17cG9pbnQubGF0fVxuICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgIHNldFBvaW50KHtcbiAgICAgICAgICAgICAgICAuLi5wb2ludCxcbiAgICAgICAgICAgICAgICBsYXQ6IHZhbHVlLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICA+XG4gICAgICAgICAgICA8RGlyZWN0aW9uSW5wdXRcbiAgICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvciB0cy1taWdyYXRlKDI3NjkpIEZJWE1FOiBObyBvdmVybG9hZCBtYXRjaGVzIHRoaXMgY2FsbC5cbiAgICAgICAgICAgICAgb3B0aW9ucz17WydOJywgJ1MnXX1cbiAgICAgICAgICAgICAgdmFsdWU9e3BvaW50LmxhdERpcmVjdGlvbn1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogYW55KSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0UG9pbnQoe1xuICAgICAgICAgICAgICAgICAgLi4ucG9pbnQsXG4gICAgICAgICAgICAgICAgICBsYXREaXJlY3Rpb246IHZhbHVlLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvRG1zTGF0aXR1ZGU+XG4gICAgICAgICAgPERtc0xvbmdpdHVkZVxuICAgICAgICAgICAgbGFiZWw9XCJMb25naXR1ZGVcIlxuICAgICAgICAgICAgdmFsdWU9e3BvaW50Lmxvbn1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsodmFsdWU6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICBzZXRQb2ludCh7XG4gICAgICAgICAgICAgICAgLi4ucG9pbnQsXG4gICAgICAgICAgICAgICAgbG9uOiB2YWx1ZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPERpcmVjdGlvbklucHV0XG4gICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyNzY5KSBGSVhNRTogTm8gb3ZlcmxvYWQgbWF0Y2hlcyB0aGlzIGNhbGwuXG4gICAgICAgICAgICAgIG9wdGlvbnM9e1snRScsICdXJ119XG4gICAgICAgICAgICAgIHZhbHVlPXtwb2ludC5sb25EaXJlY3Rpb259XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXsodmFsdWU6IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgIHNldFBvaW50KHtcbiAgICAgICAgICAgICAgICAgIC4uLnBvaW50LFxuICAgICAgICAgICAgICAgICAgbG9uRGlyZWN0aW9uOiB2YWx1ZSxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L0Rtc0xvbmdpdHVkZT5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPVwic2hyaW5rLTAgZ3Jvdy0wXCI+XG4gICAgICAgICAgPEljb25CdXR0b24gb25DbGljaz17ZGVsZXRlUG9pbnR9IHNpemU9XCJsYXJnZVwiPlxuICAgICAgICAgICAgPENsb3NlSWNvbiAvPlxuICAgICAgICAgIDwvSWNvbkJ1dHRvbj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBEbXNUZXh0ZmllbGRcbiJdfQ== \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer-france-test-data.json b/src/main/webapp/react-component/location/gazetteer-france-test-data.json similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer-france-test-data.json rename to src/main/webapp/react-component/location/gazetteer-france-test-data.json diff --git a/src/main/webapp/react-component/location/gazetteer.d.ts b/src/main/webapp/react-component/location/gazetteer.d.ts new file mode 100644 index 00000000000..48c877221aa --- /dev/null +++ b/src/main/webapp/react-component/location/gazetteer.d.ts @@ -0,0 +1,47 @@ +/// +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { TextFieldProps } from '@mui/material/TextField'; +export declare const getLargestBbox: (polygonCoordinates: any[], isMultiPolygon: boolean) => { + maxX: number; + minX: number; + maxY: number; + minY: number; +}; +type Props = { + value?: string; + setState: any; + fetch?: any; + placeholder?: string; + loadingMessage?: string; + variant?: TextFieldProps['variant']; +}; +export type Suggestion = { + id: string; + name: string; + geo?: any; + extensionGeo?: GeoFeature; +}; +export type GeoFeature = { + type: string; + geometry: { + type: string; + coordinates: any[][][]; + }; + properties?: any; + id: string; +}; +declare const Gazetteer: (props: Props) => JSX.Element; +export default Gazetteer; diff --git a/src/main/webapp/react-component/location/gazetteer.js b/src/main/webapp/react-component/location/gazetteer.js new file mode 100644 index 00000000000..b0fa2d3b654 --- /dev/null +++ b/src/main/webapp/react-component/location/gazetteer.js @@ -0,0 +1,237 @@ +import { __awaiter, __generator, __read } from "tslib"; +import * as React from 'react'; +import defaultFetch from '../utils/fetch'; +import Keyword from './keyword'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +export var getLargestBbox = function (polygonCoordinates, isMultiPolygon) { + var finalMax = { x: Number.MIN_SAFE_INTEGER, y: Number.MIN_SAFE_INTEGER }; + var finalMin = { x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER }; + var boundingBoxLimit = 75; + var encompassingBoundingBox = { + maxX: Number.MIN_SAFE_INTEGER, + minX: Number.MAX_SAFE_INTEGER, + maxY: Number.MIN_SAFE_INTEGER, + minY: Number.MAX_SAFE_INTEGER, + }; + var maxArea = -1; + var currentArea = -1; + var currentMax; + var currentMin; + polygonCoordinates.map(function (rowCoordinates) { + currentMax = { x: Number.MIN_SAFE_INTEGER, y: Number.MIN_SAFE_INTEGER }; + currentMin = { x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER }; + if (isMultiPolygon) { + rowCoordinates[0].map(function (coordinates) { + currentMax.x = Math.max(coordinates[0], currentMax.x); + currentMax.y = Math.max(coordinates[1], currentMax.y); + currentMin.x = Math.min(coordinates[0], currentMin.x); + currentMin.y = Math.min(coordinates[1], currentMin.y); + encompassingBoundingBox.maxX = Math.max(coordinates[0], encompassingBoundingBox.maxX); + encompassingBoundingBox.maxY = Math.max(coordinates[1], encompassingBoundingBox.maxY); + encompassingBoundingBox.minX = Math.min(coordinates[0], encompassingBoundingBox.minX); + encompassingBoundingBox.minY = Math.min(coordinates[1], encompassingBoundingBox.minY); + }); + } + else { + rowCoordinates.map(function (coordinates) { + currentMax.x = Math.max(coordinates[0], currentMax.x); + currentMax.y = Math.max(coordinates[1], currentMax.y); + currentMin.x = Math.min(coordinates[0], currentMin.x); + currentMin.y = Math.min(coordinates[1], currentMin.y); + encompassingBoundingBox.maxX = Math.max(coordinates[0], encompassingBoundingBox.maxX); + encompassingBoundingBox.maxY = Math.max(coordinates[1], encompassingBoundingBox.maxY); + encompassingBoundingBox.minX = Math.min(coordinates[0], encompassingBoundingBox.minX); + encompassingBoundingBox.minY = Math.min(coordinates[1], encompassingBoundingBox.minY); + }); + } + currentArea = (currentMax.x - currentMin.x) * (currentMax.y - currentMin.y); + if (currentArea > maxArea) { + maxArea = currentArea; + finalMax = currentMax; + finalMin = currentMin; + } + }); + var encompassingBoundingBoxHeight = encompassingBoundingBox.maxY - encompassingBoundingBox.minY; + var encompassingBoundingBoxWidth = encompassingBoundingBox.maxX - encompassingBoundingBox.minX; + return encompassingBoundingBoxWidth >= boundingBoxLimit || + encompassingBoundingBoxHeight >= boundingBoxLimit + ? { + maxX: finalMax.x, + minX: finalMin.x, + maxY: finalMax.y, + minY: finalMin.y, + } + : encompassingBoundingBox; +}; +var Gazetteer = function (props) { + var fetch = props.fetch || defaultFetch; + var expandPoint = function (geo) { + var offset = 0.1; + if (geo.length === 1) { + var point = geo[0]; + return [ + { + lat: point.lat + offset, + lon: point.lon + offset, + }, + { + lat: point.lat + offset, + lon: point.lon - offset, + }, + { + lat: point.lat - offset, + lon: point.lon - offset, + }, + { + lat: point.lat - offset, + lon: point.lon + offset, + }, + ]; + } + return geo; + }; + var extractGeo = function (suggestion) { + return { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + expandPoint(suggestion.geo).map(function (coord) { return [ + coord.lon, + coord.lat, + ]; }), + ], + }, + properties: {}, + id: suggestion.id, + }; + }; + var suggesterWithLiteralSupport = function (input) { return __awaiter(void 0, void 0, void 0, function () { + var res; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fetch("./internal/geofeature/suggestions?q=".concat(encodeURIComponent(input)))]; + case 1: + res = _a.sent(); + return [4 /*yield*/, res.json()]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); }; + var geofeatureWithLiteralSupport = function (suggestion) { return __awaiter(void 0, void 0, void 0, function () { + var id, res, data, finalArea; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (suggestion.id.startsWith('LITERAL')) { + return [2 /*return*/, extractGeo(suggestion)]; + } + id = suggestion.id; + return [4 /*yield*/, fetch("./internal/geofeature?id=".concat(id))]; + case 1: + res = _a.sent(); + return [4 /*yield*/, res.json()]; + case 2: + data = _a.sent(); + finalArea = getLargestBbox(data.geometry.coordinates, isMultiPolygon(data.geometry.coordinates)); + return [2 /*return*/, { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [finalArea.minX, finalArea.minY], + [finalArea.maxX, finalArea.minY], + [finalArea.maxX, finalArea.maxY], + [finalArea.minX, finalArea.maxY], + ], + ], + }, + properties: {}, + id: data.display_name, + }]; + } + }); + }); }; + var getOsmTypeSymbol = function (type) { + switch (type) { + case 'node': + return 'N'; + case 'way': + return 'W'; + case 'relation': + return 'R'; + default: + throw 'Unexpected OSM type ' + type; + } + }; + var suggester = function (input) { return __awaiter(void 0, void 0, void 0, function () { + var res, suggestions; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, window.__global__fetch("https://nominatim.openstreetmap.org/search?format=json&q=".concat(encodeURIComponent(input)))]; + case 1: + res = _a.sent(); + return [4 /*yield*/, res.json()]; + case 2: + suggestions = _a.sent(); + return [2 /*return*/, suggestions.map(function (place) { + return { + id: getOsmTypeSymbol(place.osm_type) + ':' + place.osm_id, + name: place.display_name, + }; + })]; + } + }); + }); }; + var isMultiPolygon = function (coordinates) { + return (coordinates[0][0][0] !== undefined && + coordinates[0][0][0][0] !== undefined); + }; + var geofeature = function (suggestion) { return __awaiter(void 0, void 0, void 0, function () { + var _a, type, id, res, data, boundingBoxLimit, boundingBoxWidth, boundingBoxHeight, finalArea; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = __read(suggestion.id.split(':'), 2), type = _a[0], id = _a[1]; + return [4 /*yield*/, window.__global__fetch("https://nominatim.openstreetmap.org/lookup?format=json&osm_ids=".concat(type).concat(id, "&polygon_geojson=1"))]; + case 1: + res = _b.sent(); + return [4 /*yield*/, res.json()]; + case 2: + data = (_b.sent())[0]; + boundingBoxLimit = 75; + boundingBoxWidth = data.boundingbox[3] - data.boundingbox[2]; + boundingBoxHeight = data.boundingbox[1] - data.boundingbox[0]; + if ((boundingBoxWidth >= boundingBoxLimit || + boundingBoxHeight >= boundingBoxLimit) && + Object.keys(data.address).length === 2) { + finalArea = getLargestBbox(data.geojson.coordinates, isMultiPolygon(data.geojson.coordinates)); + data.boundingbox[0] = finalArea.minY; + data.boundingbox[1] = finalArea.maxY; + data.boundingbox[2] = finalArea.minX; + data.boundingbox[3] = finalArea.maxX; + } + return [2 /*return*/, { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [ + [ + [data.boundingbox[2], data.boundingbox[0]], + [data.boundingbox[3], data.boundingbox[0]], + [data.boundingbox[3], data.boundingbox[1]], + [data.boundingbox[2], data.boundingbox[1]], + ], + ], + }, + properties: {}, + id: data.display_name, + }]; + } + }); + }); }; + return (React.createElement(React.Fragment, null, StartupDataStore.Configuration.getOnlineGazetteer() ? (React.createElement(Keyword, { value: props.value, setState: props.setState, suggester: suggester, geofeature: geofeature, placeholder: props.placeholder, loadingMessage: props.loadingMessage, variant: props.variant })) : (React.createElement(Keyword, { value: props.value, setState: props.setState, suggester: suggesterWithLiteralSupport, geofeature: geofeatureWithLiteralSupport, placeholder: props.placeholder, loadingMessage: props.loadingMessage, variant: props.variant })))); +}; +export default Gazetteer; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2F6ZXR0ZWVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9sb2NhdGlvbi9nYXpldHRlZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3Mi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5hdGVzWzBdLm1hcCgoY29vcmRpbmF0ZXM6IGFueSkgPT4ge1xuICAgICAgICBjdXJyZW50TWF4LnggPSBNYXRoLm1heChjb29yZGluYXRlc1swXSwgY3VycmVudE1heC54KVxuICAgICAgICBjdXJyZW50TWF4LnkgPSBNYXRoLm1heChjb29yZGluYXRlc1sxXSwgY3VycmVudE1heC55KVxuICAgICAgICBjdXJyZW50TWluLnggPSBNYXRoLm1pbihjb29yZGluYXRlc1swXSwgY3VycmVudE1pbi54KVxuICAgICAgICBjdXJyZW50TWluLnkgPSBNYXRoLm1pbihjb29yZGluYXRlc1sxXSwgY3VycmVudE1pbi55KVxuICAgICAgICBlbmNvbXBhc3NpbmdCb3VuZGluZ0JveC5tYXhYID0gTWF0aC5tYXgoXG4gICAgICAgICAgY29vcmRpbmF0ZXNbMF0sXG4gICAgICAgICAgZW5jb21wYXNzaW5nQm91bmRpbmdCb3gubWF4WFxuICAgICAgICApXG4gICAgICAgIGVuY29tcGFzc2luZ0JvdW5kaW5nQm94Lm1heFkgPSBNYXRoLm1heChcbiAgICAgICAgICBjb29yZGluYXRlc1sxXSxcbiAgICAgICAgICBlbmNvbXBhc3NpbmdCb3VuZGluZ0JveC5tYXhZXG4gICAgICAgIClcbiAgICAgICAgZW5jb21wYXNzaW5nQm91bmRpbmdCb3gubWluWCA9IE1hdGgubWluKFxuICAgICAgICAgIGNvb3JkaW5hdGVzWzBdLFxuICAgICAgICAgIGVuY29tcGFzc2luZ0JvdW5kaW5nQm94Lm1pblhcbiAgICAgICAgKVxuICAgICAgICBlbmNvbXBhc3NpbmdCb3VuZGluZ0JveC5taW5ZID0gTWF0aC5taW4oXG4gICAgICAgICAgY29vcmRpbmF0ZXNbMV0sXG4gICAgICAgICAgZW5jb21wYXNzaW5nQm91bmRpbmdCb3gubWluWVxuICAgICAgICApXG4gICAgICB9KVxuICAgIH0gZWxzZSB7XG4gICAgICByb3dDb29yZGluYXRlcy5tYXAoKGNvb3JkaW5hdGVzOiBhbnkpID0+IHtcbiAgICAgICAgY3VycmVudE1heC54ID0gTWF0aC5tYXgoY29vcmRpbmF0ZXNbMF0sIGN1cnJlbnRNYXgueClcbiAgICAgICAgY3VycmVudE1heC55ID0gTWF0aC5tYXgoY29vcmRpbmF0ZXNbMV0sIGN1cnJlbnRNYXgueSlcbiAgICAgICAgY3VycmVudE1pbi54ID0gTWF0aC5taW4oY29vcmRpbmF0ZXNbMF0sIGN1cnJlbnRNaW4ueClcbiAgICAgICAgY3VycmVudE1pbi55ID0gTWF0aC5taW4oY29vcmRpbmF0ZXNbMV0sIGN1cnJlbnRNaW4ueSlcbiAgICAgICAgZW5jb21wYXNzaW5nQm91bmRpbmdCb3gubWF4WCA9IE1hdGgubWF4KFxuICAgICAgICAgIGNvb3JkaW5hdGVzWzBdLFxuICAgICAgICAgIGVuY29tcGFzc2luZ0JvdW5kaW5nQm94Lm1heFhcbiAgICAgICAgKVxuICAgICAgICBlbmNvbXBhc3NpbmdCb3VuZGluZ0JveC5tYXhZID0gTWF0aC5tYXgoXG4gICAgICAgICAgY29vcmRpbmF0ZXNbMV0sXG4gICAgICAgICAgZW5jb21wYXNzaW5nQm91bmRpbmdCb3gubWF4WVxuICAgICAgICApXG4gICAgICAgIGVuY29tcGFzc2luZ0JvdW5kaW5nQm94Lm1pblggPSBNYXRoLm1pbihcbiAgICAgICAgICBjb29yZGluYXRlc1swXSxcbiAgICAgICAgICBlbmNvbXBhc3NpbmdCb3VuZGluZ0JveC5taW5YXG4gICAgICAgIClcbiAgICAgICAgZW5jb21wYXNzaW5nQm91bmRpbmdCb3gubWluWSA9IE1hdGgubWluKFxuICAgICAgICAgIGNvb3JkaW5hdGVzWzFdLFxuICAgICAgICAgIGVuY29tcGFzc2luZ0JvdW5kaW5nQm94Lm1pbllcbiAgICAgICAgKVxuICAgICAgfSlcbiAgICB9XG4gICAgY3VycmVudEFyZWEgPSAoY3VycmVudE1heC54IC0gY3VycmVudE1pbi54KSAqIChjdXJyZW50TWF4LnkgLSB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iBwb2ludC5sYXQgKyBvZmZzZXQsXG4gICAgICAgICAgbG9uOiBwb2ludC5sb24gLSBvZmZzZXQsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBsYXQ6IHBvaW50LmxhdCAtIG9mZnNldCxcbiAgICAgICAgICBsb246IHBvaW50LmxvbiAtIG9mZnNldCxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGxhdDogcG9pbnQubGF0IC0gb2Zmc2V0LFxuICAgICAgICAgIGxvbjogcG9pbnQubG9uICsgb2Zmc2V0LFxuICAgICAgICB9LFxuICAgICAgXVxuICAgIH1cbiAgICByZXR1cm4gZ2VvXG4gIH1cbiAgY29uc3QgZXh0cmFjdEdlbyA9IChzdWdnZXN0aW9uOiBTdWdnZXN0aW9uKSA9PiB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHR5cGU6ICdGZWF0dXJlJyxcbiAgICAgIGdlb21ldHJ5OiB7XG4gICAgICAgIHR5cGU6ICdQb2x5Z29uJyxcbiAgICAgICAgY29vcmRpbmF0ZXM6IFtcbiAgICAgICAgICBleHBhbmRQb2ludChzdWdnZXN0aW9uLmdlbykubWFwKChjb29yZDogYW55KSA9PiBbXG4gICAgICAgICAgICBjb29yZC5sb24sXG4gICAgICAgICAgICBjb29yZC5sYXQsXG4gICAgICAgICAgXSksXG4gICAgICAgIF0sXG4gICAgICB9LFxuICAgICAgcHJvcGVydGllczoge30sXG4gICAgICBpZDogc3VnZ2VzdGlvbi5pZCxcbiAgICB9XG4gIH1cbiAgY29uc3Qgc3VnZ2VzdGVyV2l0aExpdGVyYWxTdXBwb3J0ID0gYXN5bmMgKGlucHV0OiBzdHJpbmcpID0+IHtcbiAgICBjb25zdCByZXMgPSBhd2FpdCBmZXRjaChcbiAgICAgIGAuL2ludGVybmFsL2dlb2ZlYXR1cmUvc3VnZ2VzdGlvbnM/cT0ke2VuY29kZVVSSUNvbXBvbmVudChpbnB1dCl9YFxuICAgIClcbiAgICByZXR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ICAgc2V0U3RhdGU9e3Byb3BzLnNldFN0YXRlfVxuICAgICAgICAgIHN1Z2dlc3Rlcj17c3VnZ2VzdGVyfVxuICAgICAgICAgIGdlb2ZlYXR1cmU9e2dlb2ZlYXR1cmV9XG4gICAgICAgICAgcGxhY2Vob2xkZXI9e3Byb3BzLnBsYWNlaG9sZGVyfVxuICAgICAgICAgIGxvYWRpbmdNZXNzYWdlPXtwcm9wcy5sb2FkaW5nTWVzc2FnZX1cbiAgICAgICAgICB2YXJpYW50PXtwcm9wcy52YXJpYW50fVxuICAgICAgICAvPlxuICAgICAgKSA6IChcbiAgICAgICAgPEtleXdvcmRcbiAgICAgICAgICB2YWx1ZT17cHJvcHMudmFsdWV9XG4gICAgICAgICAgc2V0U3RhdGU9e3Byb3BzLnNldFN0YXRlfVxuICAgICAgICAgIHN1Z2dlc3Rlcj17c3VnZ2VzdGVyV2l0aExpdGVyYWxTdXBwb3J0fVxuICAgICAgICAgIGdlb2ZlYXR1cmU9e2dlb2ZlYXR1cmVXaXRoTGl0ZXJhbFN1cHBvcnR9XG4gICAgICAgICAgcGxhY2Vob2xkZXI9e3Byb3BzLnBsYWNlaG9sZGVyfVxuICAgICAgICAgIGxvYWRpbmdNZXNzYWdlPXtwcm9wcy5sb2FkaW5nTWVzc2FnZX1cbiAgICAgICAgICB2YXJpYW50PXtwcm9wcy52YXJpYW50fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICA8Lz5cbiAgKVxufVxuZXhwb3J0IGRlZmF1bHQgR2F6ZXR0ZWVyXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/location/gazetteer.spec.d.ts b/src/main/webapp/react-component/location/gazetteer.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/react-component/location/gazetteer.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/react-component/location/gazetteer.spec.js b/src/main/webapp/react-component/location/gazetteer.spec.js new file mode 100644 index 00000000000..902fd3deec7 --- /dev/null +++ b/src/main/webapp/react-component/location/gazetteer.spec.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import { mock as mockProperties, unmock as unmockProperties, } from '../../test/mock-api/mock-properties'; +import { getLargestBbox } from './gazetteer'; +var GetLargestBbox; +// @ts-expect-error ts-migrate(2732) FIXME: Cannot find module './gazetteer-france-test-data.j... Remove this comment to see the full error message +import testData from './gazetteer-france-test-data.json'; +describe('getLargestBbox', function () { + before(function () { + mockProperties(); + GetLargestBbox = getLargestBbox; + }); + after(function () { + unmockProperties(); + }); + var expectedAnswer = { + maxX: 7.8125, + minX: -5.1953125, + maxY: 50.77891890432069, + minY: 43.37399002495726, + }; + it('Largest bounding box for France should equal ' + + JSON.stringify(expectedAnswer), function () { + var result = GetLargestBbox(testData[0].geojson.coordinates, true); + expect(result).to.deep.equal(expectedAnswer); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2F6ZXR0ZWVyLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xvY2F0aW9uL2dhemV0dGVlci5zcGVjLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBRTdCLE9BQU8sRUF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ChyZXN1bHQpLnRvLmRlZXAuZXF1YWwoZXhwZWN0ZWRBbnN3ZXIpXG4gICAgfVxuICApXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/location/index.d.ts b/src/main/webapp/react-component/location/index.d.ts new file mode 100644 index 00000000000..fb08c5fbfaa --- /dev/null +++ b/src/main/webapp/react-component/location/index.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import location from './location'; +export default location; diff --git a/src/main/webapp/react-component/location/index.js b/src/main/webapp/react-component/location/index.js new file mode 100644 index 00000000000..76525b21b11 --- /dev/null +++ b/src/main/webapp/react-component/location/index.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import location from './location'; +export default location; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xvY2F0aW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOz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9ydCBsb2NhdGlvbiBmcm9tICcuL2xvY2F0aW9uJ1xuZXhwb3J0IGRlZmF1bHQgbG9jYXRpb25cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/location/keyword.d.ts b/src/main/webapp/react-component/location/keyword.d.ts new file mode 100644 index 00000000000..88009d15525 --- /dev/null +++ b/src/main/webapp/react-component/location/keyword.d.ts @@ -0,0 +1,23 @@ +/// +import { TextFieldProps } from '@mui/material/TextField'; +import { Suggestion, GeoFeature } from './gazetteer'; +type Props = { + setState: any; + fetch?: any; + value?: string; + onError?: (error: any) => void; + suggester?: (input: string) => Promise; + geofeature?: (suggestion: Suggestion) => Promise; + errorMessage?: string; + polygon?: any[]; + polyType?: string; + setBufferState?: any; + polygonBufferWidth?: string; + polygonBufferUnits?: string; + loadingMessage?: string; + minimumInputLength?: number; + placeholder?: string; + variant?: TextFieldProps['variant']; +}; +declare const Keyword: (props: Props) => JSX.Element; +export default Keyword; diff --git a/src/main/webapp/react-component/location/keyword.js b/src/main/webapp/react-component/location/keyword.js new file mode 100644 index 00000000000..be57ad251df --- /dev/null +++ b/src/main/webapp/react-component/location/keyword.js @@ -0,0 +1,183 @@ +import { __awaiter, __generator, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { useState } from 'react'; +import ExtensionPoints from '../../extension-points'; +import GazetteerAutoComplete from '../auto-complete/gazetteer-autocomplete'; +import Polygon from './polygon'; +import MultiPolygon from './multipoly'; +import defaultFetch from '../utils/fetch'; +import useSnack from '../../component/hooks/useSnack'; +var Keyword = function (props) { + var _a = __read(useState(props.value || ''), 2), value = _a[0], setValue = _a[1]; + var _b = __read(useState(false), 2), loading = _b[0], setLoading = _b[1]; + var _c = __read(useState(''), 2), error = _c[0], setError = _c[1]; + var fetch = props.fetch || defaultFetch; + var addSnack = useSnack(); + var polygon = props.polygon, setBufferState = props.setBufferState, polygonBufferWidth = props.polygonBufferWidth, polygonBufferUnits = props.polygonBufferUnits, polyType = props.polyType; + var internalSuggester = function (input) { return __awaiter(void 0, void 0, void 0, function () { + var res, json; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fetch("./internal/geofeature/suggestions?q=".concat(input))]; + case 1: + res = _a.sent(); + return [4 /*yield*/, res.json()]; + case 2: + json = _a.sent(); + return [4 /*yield*/, json.filter(function (_a) { + var id = _a.id; + return !id.startsWith('LITERAL'); + })]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); }; + var suggester = function (input) { return __awaiter(void 0, void 0, void 0, function () { + var suggestions, extensionSuggestions, propsSuggestions, internalSuggestions; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + suggestions = []; + return [4 /*yield*/, ExtensionPoints.suggester(input)]; + case 1: + extensionSuggestions = _a.sent(); + if (extensionSuggestions) { + suggestions = suggestions.concat(extensionSuggestions); + } + if (!props.suggester) return [3 /*break*/, 3]; + return [4 /*yield*/, props.suggester(input)]; + case 2: + propsSuggestions = _a.sent(); + suggestions = suggestions.concat(propsSuggestions); + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, internalSuggester(input)]; + case 4: + internalSuggestions = _a.sent(); + suggestions = suggestions.concat(internalSuggestions); + _a.label = 5; + case 5: return [2 /*return*/, suggestions]; + } + }); + }); }; + var internalGeofeature = function (_a) { + var id = _a.id; + return __awaiter(void 0, void 0, void 0, function () { + var res; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, fetch("./internal/geofeature?id=".concat(id))]; + case 1: + res = _b.sent(); + return [4 /*yield*/, res.json()]; + case 2: return [2 /*return*/, _b.sent()]; + } + }); + }); + }; + var geofeature = function (suggestion) { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!suggestion.extensionGeo) return [3 /*break*/, 1]; + return [2 /*return*/, suggestion.extensionGeo]; + case 1: + if (!props.geofeature) return [3 /*break*/, 3]; + return [4 /*yield*/, props.geofeature(suggestion)]; + case 2: return [2 /*return*/, _a.sent()]; + case 3: return [4 /*yield*/, internalGeofeature(suggestion)]; + case 4: return [2 /*return*/, _a.sent()]; + } + }); + }); }; + var onChange = function (suggestion) { return __awaiter(void 0, void 0, void 0, function () { + var _a, type, geometry, polygon_1, polygon_2, e_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!suggestion) { + props.setState({ hasKeyword: false, value: '', polygon: [] }); + setValue(''); + return [2 /*return*/]; + } + setError(''); + setValue(suggestion.name); + setLoading(true); + _b.label = 1; + case 1: + _b.trys.push([1, 3, , 4]); + return [4 /*yield*/, geofeature(suggestion)]; + case 2: + _a = _b.sent(), type = _a.type, geometry = _a.geometry; + setLoading(false); + switch (geometry.type) { + case 'Polygon': { + polygon_1 = geometry.coordinates[0]; + props.setState({ + hasKeyword: true, + locationId: undefined, + locationType: 'latlon', + polygon: polygon_1, + polyType: 'polygon', + value: suggestion.name, + }); + break; + } + case 'MultiPolygon': { + polygon_2 = geometry.coordinates.map(function (ring) { return ring[0]; }); + props.setState({ + hasKeyword: true, + locationId: undefined, + locationType: 'latlon', + polygon: polygon_2, + polyType: 'multipolygon', + value: suggestion.name, + }); + break; + } + default: { + addSnack('Invalid feature - Unrecognized feature type: ' + + JSON.stringify(type), { + alertProps: { + severity: 'error', + }, + }); + } + } + return [3 /*break*/, 4]; + case 3: + e_1 = _b.sent(); + console.error(e_1); + setLoading(false); + setError(props.errorMessage || 'Geo feature endpoint unavailable'); + props.onError && props.onError(e_1); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }; + return (React.createElement(React.Fragment, null, + React.createElement(GazetteerAutoComplete, { value: value, onChange: onChange, minimumInputLength: props.minimumInputLength || 1, placeholder: props.placeholder || 'Enter a location', suggester: suggester, variant: props.variant }), + loading && (React.createElement("div", { style: { marginTop: 10 } }, + props.loadingMessage || 'Loading geometry...', + ' ', + React.createElement("span", { className: "fa fa-refresh fa-spin" }))), + error && React.createElement("div", null, error), + polyType === 'polygon' && (React.createElement(Polygon, { polygon: polygon, setState: props.setState, polygonBufferWidth: polygonBufferWidth, polygonBufferUnits: polygonBufferUnits, setBufferState: setBufferState, polyType: polyType })), + polyType === 'multipolygon' && (React.createElement(MultiPolygon, { polygon: polygon, setState: props.setState, polygonBufferWidth: polygonBufferWidth, polygonBufferUnits: polygonBufferUnits, setBufferState: setBufferState, polyType: polyType })))); +}; +export default Keyword; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5d29yZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbG9jYXRpb24va2V5d29yZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ2hDLE9BQU8sZUFBZSxNQUFNLHdCQUF3QixDQUFBO0FBQ3BELE9BQU8scUJBQXFCLE1BQU0seUNBQXlDLENBQUE7QUFDM0UsT0FBTyxPQUFPLE1BQU0sV0FBVyxDQUFBO0FBQy9CLE9BQU8sWUFBWSxNQUFNLGFBQWEsQ0FBQTtBQUV0QyxPQUFPLFlBQVksTUFBTSxnQkFBZ0IsQ0FBQTtBQUV6QyxPQUFPLFFBQVEsTUFBTSxnQ0FBZ0MsQ0FBQT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dWUoc3VnZ2VzdGlvbi5uYW1lKVxuICAgIHNldExvYWRpbmcodHJ1ZSlcbiAgICB0cnkge1xuICAgICAgY29uc3QgeyB0eXBlLCBnZW9tZXRyeSB9ID0gYXdhaXQgZ2VvZmVhdHVyZShzdWdnZXN0aW9uKVxuICAgICAgc2V0TG9hZGluZyhmYWxzZSlcblxuICAgICAgc3dpdGNoIChnZW9tZXRyeS50eXBlKSB7XG4gICAgICAgIGNhc2UgJ1BvbHlnb24nOiB7XG4gICAgICAgICAgY29uc3QgcG9seWdvbiA9IGdlb21ldHJ5LmNvb3JkaW5hdGVzWzBdXG4gICAgICAgICAgcHJvcHMuc2V0U3RhdGUoe1xuICAgICAgICAgICAgaGFzS2V5d29yZDogdHJ1ZSxcbiAgICAgICAgICAgIGxvY2F0aW9uSWQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGxvY2F0aW9uVHlwZTogJ2xhdGxvbicsXG4gICAgICAgICAgICBwb2x5Z29uLFxuICAgICAgICAgICAgcG9seVR5cGU6ICdwb2x5Z29uJyxcbiAgICAgICAgICAgIHZhbHVlOiBzdWdnZXN0aW9uLm5hbWUsXG4gICAgICAgICAgfSlcbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgJ011bHRpUG9seWdvbic6IHtcbiAgICAgICAgICAvLyBvdXRlciByaW5nIG9ubHlcbiAgICAgICAgICBjb25zdCBwb2x5Z29uID0gZ2VvbWV0cnkuY29vcmRpbmF0ZXMubWFwKChyaW5nOiBhbnlbXSkgPT4gcmluZ1swXSlcblxuICAgICAgICAgIHByb3BzLnNldFN0YXRlKHtcbiAgICAgICAgICAgIGhhc0tleXdvcmQ6IHRydWUsXG4gICAgICAgICAgICBsb2NhdGlvbklkOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBsb2NhdGlvblR5cGU6ICdsYXRsb24nLFxuICAgICAgICAgICAgcG9seWdvbixcbiAgICAgICAgICAgIHBvbHlUeXBlOiAnbXVsdGlwb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ICAgICAgc2V0QnVmZmVyU3RhdGU9e3NldEJ1ZmZlclN0YXRlfVxuICAgICAgICAgIHBvbHlUeXBlPXtwb2x5VHlwZX1cbiAgICAgICAgLz5cbiAgICAgICl9XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgS2V5d29yZFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/location/label.d.ts b/src/main/webapp/react-component/location/label.d.ts new file mode 100644 index 00000000000..cfdddca98b1 --- /dev/null +++ b/src/main/webapp/react-component/location/label.d.ts @@ -0,0 +1,3 @@ +/// +declare const Label: ({ children }: any) => JSX.Element; +export default Label; diff --git a/src/main/webapp/react-component/location/label.js b/src/main/webapp/react-component/location/label.js new file mode 100644 index 00000000000..86c83114c5c --- /dev/null +++ b/src/main/webapp/react-component/location/label.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +var Label = function (_a) { + var children = _a.children; + return (React.createElement("span", { className: "p-2 shrink-0 grow-0", style: { + minWidth: '120px', + } }, + children, + "\u00A0")); +}; +export default Label; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFiZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xvY2F0aW9uL2xhYmVsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT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yIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXG5cbmNvbnN0IExhYmVsID0gKHsgY2hpbGRyZW4gfTogYW55KSA9PiAoXG4gIDxzcGFuXG4gICAgY2xhc3NOYW1lPVwicC0yIHNocmluay0wIGdyb3ctMFwiXG4gICAgc3R5bGU9e3tcbiAgICAgIG1pbldpZHRoOiAnMTIwcHgnLFxuICAgIH19XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gICAgJm5ic3A7XG4gIDwvc3Bhbj5cbilcblxuZXhwb3J0IGRlZmF1bHQgTGFiZWxcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/location/line.d.ts b/src/main/webapp/react-component/location/line.d.ts new file mode 100644 index 00000000000..3be5e8ed1f0 --- /dev/null +++ b/src/main/webapp/react-component/location/line.d.ts @@ -0,0 +1,3 @@ +/// +declare const Line: (props: any) => JSX.Element; +export default Line; diff --git a/src/main/webapp/react-component/location/line.js b/src/main/webapp/react-component/location/line.js new file mode 100644 index 00000000000..39d6fc9669c --- /dev/null +++ b/src/main/webapp/react-component/location/line.js @@ -0,0 +1,26 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import BaseLine from './base.line'; +var options = { + label: 'Line', + geometryKey: 'line', + unitKey: 'lineUnits', + widthKey: 'lineWidth', +}; +var Line = function (props) { return React.createElement(BaseLine, __assign({}, props, options)); }; +export default Line; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbG9jYXRpb24vbGluZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsT0FBTyxRQUFRLE1BQU0sYUFBYSxDQUFBO0FBRWxDLElBQU0sT0FBTyxHQUFHO0lBQ2QsS0FBSyxFQUFFLE1BQU07SUFDYixXQUFXLEVBQUUsTUFBTTtJQUNuQixPQUFPLEVBQUUsV0FBVztJQUNwQixRQUFRLEVBQUUsV0FBVztDQUN0QixDQUFBO0FBQ0QsSUFBTSxJQUFJLEdBQUcsVUFBQyxLQUFVLElBQUssT0FBQSxvQkFBQyxRQUFRLGVBQUssS0FBSyxFQUFNLE9BQU8sRUFBSSxFQUFwQyxDQUFvQyxDQUFBO0FBRWpFLGVBQWUsSUFBSSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXG5cbmltcG9ydCBCYXNlTGluZSBmcm9tICcuL2Jhc2UubGluZSdcblxuY29uc3Qgb3B0aW9ucyA9IHtcbiAgbGFiZWw6ICdMaW5lJyxcbiAgZ2VvbWV0cnlLZXk6ICdsaW5lJyxcbiAgdW5pdEtleTogJ2xpbmVVbml0cycsXG4gIHdpZHRoS2V5OiAnbGluZVdpZHRoJyxcbn1cbmNvbnN0IExpbmUgPSAocHJvcHM6IGFueSkgPT4gPEJhc2VMaW5lIHsuLi5wcm9wc30gey4uLm9wdGlvbnN9IC8+XG5cbmV4cG9ydCBkZWZhdWx0IExpbmVcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/location/location-color-selector.d.ts b/src/main/webapp/react-component/location/location-color-selector.d.ts new file mode 100644 index 00000000000..4ef6a5aa4b7 --- /dev/null +++ b/src/main/webapp/react-component/location/location-color-selector.d.ts @@ -0,0 +1,22 @@ +/// +export declare const ColorSquare: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>; +type LocationColorSelectorProps = { + setColor: (color: string) => void; +}; +export declare const locationColors: { + purple: string; + yellow: string; + cyan: string; + red: string; + green: string; + blue: string; + violet: string; + orange: string; + teal: string; + grey: string; + black: string; + white: string; +}; +export declare const contrastingColor = "#996600"; +export declare const LocationColorSelector: ({ setColor, }: LocationColorSelectorProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/react-component/location/location-color-selector.js b/src/main/webapp/react-component/location/location-color-selector.js new file mode 100644 index 00000000000..7732aa33a46 --- /dev/null +++ b/src/main/webapp/react-component/location/location-color-selector.js @@ -0,0 +1,52 @@ +import { __makeTemplateObject } from "tslib"; +/* Copyright (c) Connexta, LLC */ +import * as React from 'react'; +import styled from 'styled-components'; +import { Grid } from '@mui/material'; +import Tooltip from '@mui/material/Tooltip/Tooltip'; +import { transparentize } from 'polished'; +var ColorSwatch = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 1.5rem;\n width: 1.5rem;\n min-width: 1.5rem;\n margin: 0.2rem;\n border-radius: 4px;\n background-color: ", ";\n"], ["\n height: 1.5rem;\n width: 1.5rem;\n min-width: 1.5rem;\n margin: 0.2rem;\n border-radius: 4px;\n background-color: ", ";\n"])), function (props) { return props.color; }); +export var ColorSquare = styled(ColorSwatch)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n min-width: ", ";\n background-clip: padding-box;\n &:enabled {\n border: 0.12rem solid\n ", ";\n }\n &:enabled:hover {\n border: 0.15rem solid\n ", ";\n }\n"], ["\n height: ", ";\n width: ", ";\n min-width: ", ";\n background-clip: padding-box;\n &:enabled {\n border: 0.12rem solid\n ", ";\n }\n &:enabled:hover {\n border: 0.15rem solid\n ", ";\n }\n"])), function (props) { return props.size; }, function (props) { return props.size; }, function (props) { return props.size; }, function (props) { return transparentize(0.5, props.palette.text.primary); }, function (props) { return transparentize(0.1, props.palette.text.primary); }); +var ColorGrid = styled(Grid)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 0.5rem;\n"], ["\n padding: 0.5rem;\n"]))); +var ColorPaletteItem = function (_a) { + var title = _a.title, colorValue = _a.colorValue, setColor = _a.setColor; + return (React.createElement(Tooltip, { title: title || '', disableInteractive: true }, + React.createElement(ColorSwatch, { color: colorValue, onClick: function () { return setColor(colorValue); } }))); +}; +export var locationColors = { + purple: '#8E79DD', + yellow: '#EECC66', + cyan: '#33BBEE', + red: '#961E00', + green: '#117733', + blue: '#0022FF', + violet: '#AA4499', + orange: '#EE7733', + teal: '#44AA99', + grey: '#BBBBBB', + black: '#000000', + white: '#FFFFFF', +}; +// a color that is not similar looking to the ones above +export var contrastingColor = '#996600'; +export var LocationColorSelector = function (_a) { + var setColor = _a.setColor; + return (React.createElement(ColorGrid, { container: true, direction: "column", justifyContent: "center", alignItems: "flex-start" }, + React.createElement(Grid, { item: true }, + React.createElement(ColorPaletteItem, { title: 'White', colorValue: locationColors.white, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Grey', colorValue: locationColors.grey, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Black', colorValue: locationColors.black, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Yellow', colorValue: locationColors.yellow, setColor: setColor })), + React.createElement(Grid, { item: true }, + React.createElement(ColorPaletteItem, { title: 'Red', colorValue: locationColors.red, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Green', colorValue: locationColors.green, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Blue', colorValue: locationColors.blue, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Orange', colorValue: locationColors.orange, setColor: setColor })), + React.createElement(Grid, { item: true }, + React.createElement(ColorPaletteItem, { title: 'Cyan', colorValue: locationColors.cyan, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Violet', colorValue: locationColors.violet, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Teal', colorValue: locationColors.teal, setColor: setColor }), + React.createElement(ColorPaletteItem, { title: 'Purple', colorValue: locationColors.purple, setColor: setColor })))); +}; +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24tY29sb3Itc2VsZWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xvY2F0aW9uL2xvY2F0aW9uLWNvbG9yLXNlbGVjdG9yLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsaUNBQWlDO0FBQ2pDLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFDcEMsT0FBTyxPQUFPLE1BQU0sK0JBQStCLENBQUE7QUFDbkQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUV6QyxJQUFNLFdBQVcsR0FBRyxNQUFNLENBQUMsTUFBTSx1TUFBQSw2SEFNWCxFQUEyQixLQUNoRCxLQURxQixVQUFDLEtBQVUsSUFBSyxPQUFBLEtBQUssQ0FBQyxLQUFLLEVBQVgsQ0FBVyxDQUNoRCxDQUFBO0FBRUQsTUFBTSxDQUFDLElBQU0sV0FBVyxHQUFHLE1BQU0sQ0FBQyxXQUFXLENBQUMsMlJBQUEsY0FDbEMsRUFBMEIsY0FDM0IsRUFBMEIsa0JBQ3RCLEVBQTBCLHNGQUlqQyxFQUErRCxnRUFJ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e2xvY2F0aW9uQ29sb3JzLmdyZXl9XG4gICAgICAgICAgc2V0Q29sb3I9e3NldENvbG9yfVxuICAgICAgICAvPlxuICAgICAgICA8Q29sb3JQYWxldHRlSXRlbVxuICAgICAgICAgIHRpdGxlPXsnQmxhY2snfVxuICAgICAgICAgIGNvbG9yVmFsdWU9e2xvY2F0aW9uQ29sb3JzLmJsYWNrfVxuICAgICAgICAgIHNldENvbG9yPXtzZXRDb2xvcn1cbiAgICAgICAgLz5cbiAgICAgICAgPENvbG9yUGFsZXR0ZUl0ZW1cbiAgICAgICAgICB0aXRsZT17J1llbGxvdyd9XG4gICAgICAgICAgY29sb3JWYWx1ZT17bG9jYXRpb25Db2xvcnMueWVsbG93fVxuICAgICAgICAgIHNldENvbG9yPXtzZXRDb2xvcn1cbiAgICAgICAgLz5cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgIDxDb2xvclBhbGV0dGVJdGVtXG4gICAgICAgICAgdGl0bGU9eydSZWQnfVxuICAgICAgICAgIGNvbG9yVmFsdWU9e2xvY2F0aW9uQ29sb3JzLnJlZH1cbiAgICAgICAgICBzZXRDb2xvcj17c2V0Q29sb3J9XG4gICAgICAgIC8+XG4gICAgICAgIDxDb2xvclBhbGV0dGVJdGVtXG4gICAgICAgICAgdGl0bGU9eydHcmVlbid9XG4gICAgICAgICAgY29sb3JWYWx1ZT17bG9jYXRpb25Db2xvcnMuZ3JlZW59XG4gICAgICAgICAgc2V0Q29sb3I9e3NldENvbG9yfVxuICAgICAgICAvPlxuICAgICAgICA8Q29sb3JQYWxldHRlSXRlbVxuICAgICAgICAgIHRpdGxlPXsnQmx1ZSd9XG4gICAgICAgICAgY29sb3JWYWx1ZT17bG9jYXRpb25Db2xvcnMuYmx1ZX1cbiAgICAgICAgICBzZXRDb2xvcj17c2V0Q29sb3J9XG4gICAgICAgIC8+XG4gICAgICAgIDxDb2xvclBhbGV0dGVJdGVtXG4gICAgICAgICAgdGl0bGU9eydPcmFuZ2UnfVxuICAgICAgICAgIGNvbG9yVmFsdWU9e2xvY2F0aW9uQ29sb3JzLm9yYW5nZX1cbiAgICAgICAgICBzZXRDb2xvcj17c2V0Q29sb3J9XG4gICAgICAgIC8+XG4gICAgICA8L0dyaWQ+XG4gICAgICA8R3JpZCBpdGVtPlxuICAgICAgICA8Q29sb3JQYWxldHRlSXRlbVxuICAgICAgICAgIHRpdGxlPXsnQ3lhbid9XG4gICAgICAgICAgY29sb3JWYWx1ZT17bG9jYXRpb25Db2xvcnMuY3lhbn1cbiAgICAgICAgICBzZXRDb2xvcj17c2V0Q29sb3J9XG4gICAgICAgIC8+XG4gICAgICAgIDxDb2xvclBhbGV0dGVJdGVtXG4gICAgICAgICAgdGl0bGU9eydWaW9sZXQnfVxuICAgICAgICAgIGNvbG9yVmFsdWU9e2xvY2F0aW9uQ29sb3JzLnZpb2xldH1cbiAgICAgICAgICBzZXRDb2xvcj17c2V0Q29sb3J9XG4gICAgICAgIC8+XG4gICAgICAgIDxDb2xvclBhbGV0dGVJdGVtXG4gICAgICAgICAgdGl0bGU9eydUZWFsJ31cbiAgICAgICAgICBjb2xvclZhbHVlPXtsb2NhdGlvbkNvbG9ycy50ZWFsfVxuICAgICAgICAgIHNldENvbG9yPXtzZXRDb2xvcn1cbiAgICAgICAgLz5cbiAgICAgICAgPENvbG9yUGFsZXR0ZUl0ZW1cbiAgICAgICAgICB0aXRsZT17J1B1cnBsZSd9XG4gICAgICAgICAgY29sb3JWYWx1ZT17bG9jYXRpb25Db2xvcnMucHVycGxlfVxuICAgICAgICAgIHNldENvbG9yPXtzZXRDb2xvcn1cbiAgICAgICAgLz5cbiAgICAgIDwvR3JpZD5cbiAgICA8L0NvbG9yR3JpZD5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/location/location.d.ts b/src/main/webapp/react-component/location/location.d.ts new file mode 100644 index 00000000000..cb3516b2107 --- /dev/null +++ b/src/main/webapp/react-component/location/location.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +type InputType = { + label: string; + Component: any; +}; +export type InputsType = { + [key: string]: InputType; +}; +export declare const LocationContext: React.Context<{ + filterInputPredicate: (_name: string) => boolean; +}>; +declare const _default: ({ onChange, value, errorListener }: any) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/location/location.js b/src/main/webapp/react-component/location/location.js new file mode 100644 index 00000000000..9ad197cf932 --- /dev/null +++ b/src/main/webapp/react-component/location/location.js @@ -0,0 +1,226 @@ +import { __assign, __read, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import LocationOldModel from '../../component/location-old/location-old'; +import wreqr from '../../js/wreqr'; +import { Drawing, useIsDrawing } from '../../component/singletons/drawing'; +import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook'; +import { hot } from 'react-hot-loader'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import Button from '@mui/material/Button'; +import Line from './line'; +import Polygon from './polygon'; +import PointRadius from './point-radius'; +import BoundingBox from './bounding-box'; +import Gazetteer from './gazetteer'; +import ShapeUtils from '../../js/ShapeUtils'; +import ExtensionPoints from '../../extension-points/extension-points'; +import { useTheme } from '@mui/material/styles'; +import { Popover } from '@mui/material'; +import { ColorSquare, LocationColorSelector } from './location-color-selector'; +import { useMenuState } from '../../component/menu-state/menu-state'; +import { useMetacardDefinitions } from '../../js/model/Startup/metacard-definitions.hooks'; +var BaseInputs = { + line: { + label: 'Line', + Component: Line, + }, + poly: { + label: 'Polygon', + Component: Polygon, + }, + circle: { + label: 'Point-Radius', + Component: PointRadius, + }, + bbox: { + label: 'Bounding Box', + Component: BoundingBox, + }, + keyword: { + label: 'Keyword', + Component: function (_a) { + var setState = _a.setState, keywordValue = _a.keywordValue, props = __rest(_a, ["setState", "keywordValue"]); + return ( + // Offsets className="form-group flow-root" below + React.createElement("div", null, + React.createElement(Gazetteer, __assign({}, props, { value: keywordValue, setState: function (_a) { + var value = _a.value, data = __rest(_a, ["value"]); + setState(__assign({ keywordValue: value }, data)); + }, setBufferState: function (key, value) { + var _a; + return setState((_a = {}, _a[key] = value, _a)); + }, variant: "outlined" })))); + }, + }, +}; +var drawTypes = ['line', 'poly', 'circle', 'bbox']; +function getCurrentValue(_a) { + var locationModel = _a.locationModel; + var modelJSON = locationModel.toJSON(); + var type; + if (modelJSON.polygon !== undefined) { + type = ShapeUtils.isArray3D(modelJSON.polygon) ? 'MULTIPOLYGON' : 'POLYGON'; + } + else if (modelJSON.lat !== undefined && + modelJSON.lon !== undefined && + modelJSON.radius !== undefined) { + type = 'POINTRADIUS'; + } + else if (modelJSON.line !== undefined && + modelJSON.lineWidth !== undefined) { + type = 'LINE'; + } + else if (modelJSON.north !== undefined && + modelJSON.south !== undefined && + modelJSON.east !== undefined && + modelJSON.west !== undefined) { + type = 'BBOX'; + } + return Object.assign(modelJSON, { + type: type, + lineWidth: modelJSON.lineWidth, + radius: modelJSON.radius, + }); +} +function updateMap(_a) { + var locationModel = _a.locationModel; + var mode = locationModel.get('mode'); + if (mode !== undefined && Drawing.isDrawing() !== true) { + ; + wreqr.vent.trigger('search:' + mode + 'display', locationModel); + } +} +export var LocationContext = React.createContext({ + filterInputPredicate: function (_name) { + return true; + }, +}); +var LocationInput = function (_a) { + var onChange = _a.onChange, value = _a.value, errorListener = _a.errorListener; + var MetacardDefinitions = useMetacardDefinitions(); + var inputs = React.useMemo(function () { + return ExtensionPoints.locationTypes(BaseInputs); + }, [ExtensionPoints.locationTypes]); + var locationContext = React.useContext(LocationContext); + var _b = __read(React.useState(new LocationOldModel(value)), 1), locationModel = _b[0]; + var _c = __read(React.useState(locationModel.toJSON()), 2), state = _c[0], setState = _c[1]; + var isDrawing = useIsDrawing(); + var _d = useBackbone(), listenTo = _d.listenTo, stopListening = _d.stopListening; + var _f = useMenuState(), MuiButtonProps = _f.MuiButtonProps, MuiPopoverProps = _f.MuiPopoverProps; + var onDraw = function () { + ; + wreqr.vent.trigger('search:draw' + locationModel.attributes.mode, locationModel); + }; + var onDrawCancel = function () { + ; + wreqr.vent.trigger('search:drawcancel', locationModel); + }; + var onDrawEnd = function () { + ; + wreqr.vent.trigger('search:drawend', locationModel); + }; + var setColor = function (color) { + locationModel.set('color', color); + onDrawEnd(); + }; + React.useEffect(function () { + var callback = function () { return updateMap({ locationModel: locationModel }); }; + listenTo(wreqr.vent, 'search:requestlocationmodels', callback); + return function () { + return stopListening(wreqr.vent, 'search:requestlocationmodels', callback); + }; + }, []); + React.useEffect(function () { + return function () { + setTimeout(function () { + // This is to facilitate clearing out the map, it isn't about the value, but we don't want the changeCallback to fire! + locationModel.set(locationModel.defaults()); + wreqr.vent.trigger('search:removedisplay', locationModel); + onDrawEnd(); + }, 0); + }; + }, []); + React.useEffect(function () { + var callback = function () { return onDraw(); }; + listenTo(wreqr.vent, 'search:requestdrawingmodels', callback); + return function () { + return stopListening(wreqr.vent, 'search:requestdrawingmodels', callback); + }; + }, []); + React.useEffect(function () { + var onChangeCallback = function () { + setState(locationModel.toJSON()); + updateMap({ locationModel: locationModel }); + onChange(getCurrentValue({ locationModel: locationModel })); + }; + listenTo(locationModel, 'change', onChangeCallback); + return function () { + stopListening(locationModel, 'change', onChangeCallback); + }; + }, [onChange]); + React.useEffect(function () { + var onDoubleClickCallback = function (locationId) { + if (locationModel.attributes.locationId === locationId) + onDraw(); + }; + listenTo(wreqr.vent, 'location:doubleClick', onDoubleClickCallback); + return function () { + stopListening(wreqr.vent, 'location:doubleClick', onDoubleClickCallback); + }; + }, [locationModel, state]); + var ComponentToRender = inputs[state.mode] + ? inputs[state.mode].Component + : function () { return null; }; + var options = Object.entries(inputs) + .map(function (entry) { + var _a = __read(entry, 2), key = _a[0], value = _a[1]; + return { + label: value.label, + value: key, + }; + }) + .filter(function (value) { + return locationContext.filterInputPredicate(value.value); + }); + return (React.createElement("div", null, + React.createElement("div", null, + React.createElement(Autocomplete, { className: "mb-2", "data-id": "filter-type-autocomplete", fullWidth: true, size: "small", options: options, getOptionLabel: function (option) { return option.label; }, isOptionEqualToValue: function (option, value) { + return option.value === value.value; + }, onChange: function (_e, newValue) { + locationModel.set('mode', newValue.value); + }, disableClearable: true, value: options.find(function (opt) { return opt.value === state.mode; }) || { + value: '', + label: '', + }, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { variant: "outlined", placeholder: 'Select ' + MetacardDefinitions.getAlias('location') + ' Option' }))); } }), + React.createElement("div", { className: "form-group flow-root" }, + React.createElement(ComponentToRender, __assign({}, state, { setState: function (args) { + locationModel.set(args); // always update the locationModel, that's our "source of truth", above we map this back into state by listening to changes + }, errorListener: errorListener })), + drawTypes.includes(state.mode) ? (React.createElement("div", null, + React.createElement("div", { className: "flex my-1.5 ml-2 align-middle" }, + React.createElement("div", { className: "align-middle my-auto pr-16 mr-1" }, "Color"), + React.createElement(ColorSquare, __assign({ disabled: isDrawing, color: state.color }, MuiButtonProps, useTheme(), { size: '1.8rem' })), + React.createElement(Popover, __assign({}, MuiPopoverProps), + React.createElement(LocationColorSelector, { setColor: setColor }))), + isDrawing && locationModel === Drawing.getDrawModel() ? (React.createElement(Button, { className: "location-draw mt-2", onClick: onDrawCancel, color: "secondary", fullWidth: true }, + React.createElement("span", { className: "ml-2" }, "Cancel Drawing"))) : (React.createElement(Button, { className: "location-draw mt-2", onClick: onDraw, color: "primary", fullWidth: true }, + React.createElement("span", { className: "fa fa-globe" }), + React.createElement("span", { className: "ml-2" }, "Draw"))))) : null)))); +}; +export default hot(module)(LocationInput); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L2xvY2F0aW9uL2xvY2F0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sZ0JBQWdCLE1BQU0sMkNBQTJDLENBQUE7QUFDeEUsT0FBTyxLQUFLLE1BQU0sZ0JBQWdCLENBQUE7QUFDbEMsT0FBTyxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQTtBQUMxRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scURBQXFELENBQUE7QUFDakYsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sWUFBWSxNQUFNLDRCQUE0QixDQUFBO0FBQ3JELE9BQU8sU0FBUyxNQUFNLHlCQUF5QixDQUFBO0FBQy9DLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sSUFBSSxNQUFNLFFBQVEsQ0FBQTtBQUN6QixPQUFPLE9BQU8sTUFBTSxXQUFXLENBQUE7QUFDL0IsT0FBTyxXQUFXLE1BQU0sZ0JBQWdCLENBQUE7QUFDeE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X2UsIG5ld1ZhbHVlKSA9PiB7XG4gICAgICAgICAgICBsb2NhdGlvbk1vZGVsLnNldCgnbW9kZScsIG5ld1ZhbHVlLnZhbHVlKVxuICAgICAgICAgIH19XG4gICAgICAgICAgZGlzYWJsZUNsZWFyYWJsZVxuICAgICAgICAgIHZhbHVlPXtcbiAgICAgICAgICAgIG9wdGlvbnMuZmluZCgob3B0KSA9PiBvcHQudmFsdWUgPT09IHN0YXRlLm1vZGUpIHx8IHtcbiAgICAgICAgICAgICAgdmFsdWU6ICcnLFxuICAgICAgICAgICAgICBsYWJlbDogJycsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJlbmRlcklucHV0PXsocGFyYW1zKSA9PiAoXG4gICAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICAgIHsuLi5wYXJhbXN9XG4gICAgICAgICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgICAgICAgIHBsYWNlaG9sZGVyPXtcbiAgICAgICAgICAgICAgICAnU2VsZWN0ICcgKyBNZXRhY2FyZERlZmluaXRpb25zLmdldEFsaWFzKCdsb2NhdGlvbicpICsgJyBPcHRpb24nXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKX1cbiAgICAgICAgLz5cblxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImZvcm0tZ3JvdXAgZmxvdy1yb290XCI+XG4gICAgICAgICAgey8qIHRoaXMgcGFydCBpcyByZWFsbHkgd2VpcmQsIHdlIHNwbGF0IHN0YXRlIGFzIHNlcGFyYXRlIHByb3BzLCB0aGF0J3Mgd2h5IHdlIHVzZSBkZXN0cnVjdHVyaW5nICovfVxuICAgICAgICAgIDxDb21wb25lbnRUb1JlbmRlclxuICAgICAgICAgICAgey4uLnN0YXRlfVxuICAgICAgICAgICAgc2V0U3RhdGU9eyhhcmdzOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgbG9jYXRpb25Nb2RlbC5zZXQoYXJncykgLy8gYWx3YXlzIHVwZGF0ZSB0aGUgbG9jYXRpb25Nb2RlbCwgdGhhdCdzIG91ciBcInNvdXJjZSBvZiB0cnV0aFwiLCBhYm92ZSB3ZSBtYXAgdGhpcyBiYWNrIGludG8gc3RhdGUgYnkgbGlzdGVuaW5nIHRvIGNoYW5nZXNcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBlcnJvckxpc3RlbmVyPXtlcnJvckxpc3RlbmVyfVxuICAgICAgICAgIC8+XG4gICAgICAgICAge2RyYXdUeXBlcy5pbmNsdWRlcyhzdGF0ZS5tb2RlKSA/IChcbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPVwiZmxleCBteS0xLjUgbWwtMiBhbGlnbi1taWRkbGVcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImFsaWduLW1pZGRsZSBteS1hdXRvIHByLTE2IG1yLTFcIj5Db2xvcjwvZGl2PlxuICAgICAgICAgICAgICAgIDxDb2xvclNxdWFyZVxuICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ9e2lzRHJhd2luZ31cbiAgICAgICAgICAgICAgICAgIGNvbG9yPXtzdGF0ZS5jb2xvcn1cbiAgICAgICAgICAgICAgICAgIHsuLi5NdWlCdXR0b25Qcm9wc31cbiAgICAgICAgICAgICAgICAgIHsuLi51c2VUaGVtZSgpfVxuICAgICAgICAgICAgICAgICAgc2l6ZT17JzEuOHJlbSd9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8UG9wb3ZlciB7Li4uTXVpUG9wb3ZlclByb3BzfT5cbiAgICAgICAgICAgICAgICAgIDxMb2NhdGlvbkNvbG9yU2VsZWN0b3Igc2V0Q29sb3I9e3NldENvbG9yfSAvPlxuICAgICAgICAgICAgICAgIDwvUG9wb3Zlcj5cbiAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgIHtpc0RyYXdpbmcgJiYgbG9jYXRpb25Nb2RlbCA9PT0gRHJhd2luZy5nZXREcmF3TW9kZWwoKSA/IChcbiAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWU9XCJsb2NhdGlvbi1kcmF3IG10LTJcIlxuICAgICAgICAgICAgICAgICAgb25DbGljaz17b25EcmF3Q2FuY2VsfVxuICAgICAgICAgICAgICAgICAgY29sb3I9XCJzZWNvbmRhcnlcIlxuICAgICAgICAgICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwibWwtMlwiPkNhbmNlbCBEcmF3aW5nPC9zcGFuPlxuICAgICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT1cImxvY2F0aW9uLWRyYXcgbXQtMlwiXG4gICAgICAgICAgICAgICAgICBvbkNsaWNrPXtvbkRyYXd9XG4gICAgICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwiZmEgZmEtZ2xvYmVcIiAvPlxuICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwibWwtMlwiPkRyYXc8L3NwYW4+XG4gICAgICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoTG9jYXRpb25JbnB1dClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/location/multipoly.d.ts b/src/main/webapp/react-component/location/multipoly.d.ts new file mode 100644 index 00000000000..ab6fc6e1ec6 --- /dev/null +++ b/src/main/webapp/react-component/location/multipoly.d.ts @@ -0,0 +1,3 @@ +/// +declare const MultiPolygon: (props: any) => JSX.Element; +export default MultiPolygon; diff --git a/src/main/webapp/react-component/location/multipoly.js b/src/main/webapp/react-component/location/multipoly.js new file mode 100644 index 00000000000..b89b2bfa995 --- /dev/null +++ b/src/main/webapp/react-component/location/multipoly.js @@ -0,0 +1,26 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import BaseLine from './base.line'; +var options = { + label: 'MultiPolygon', + geometryKey: 'polygon', + unitKey: 'polygonBufferUnits', + widthKey: 'polygonBufferWidth', +}; +var MultiPolygon = function (props) { return React.createElement(BaseLine, __assign({}, props, options)); }; +export default MultiPolygon; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGlwb2x5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9sb2NhdGlvbi9tdWx0aXBvbHkudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLE9BQU8sUUFBUSxNQUFNLGFBQWEsQ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scy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXG5cbmltcG9ydCBCYXNlTGluZSBmcm9tICcuL2Jhc2UubGluZSdcblxuY29uc3Qgb3B0aW9ucyA9IHtcbiAgbGFiZWw6ICdNdWx0aVBvbHlnb24nLFxuICBnZW9tZXRyeUtleTogJ3BvbHlnb24nLFxuICB1bml0S2V5OiAncG9seWdvbkJ1ZmZlclVuaXRzJyxcbiAgd2lkdGhLZXk6ICdwb2x5Z29uQnVmZmVyV2lkdGgnLFxufVxuXG5jb25zdCBNdWx0aVBvbHlnb24gPSAocHJvcHM6IGFueSkgPT4gPEJhc2VMaW5lIHsuLi5wcm9wc30gey4uLm9wdGlvbnN9IC8+XG5cbmV4cG9ydCBkZWZhdWx0IE11bHRpUG9seWdvblxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/location/point-radius.d.ts b/src/main/webapp/react-component/location/point-radius.d.ts new file mode 100644 index 00000000000..5284111707f --- /dev/null +++ b/src/main/webapp/react-component/location/point-radius.d.ts @@ -0,0 +1,3 @@ +/// +declare const PointRadius: (props: any) => JSX.Element; +export default PointRadius; diff --git a/src/main/webapp/react-component/location/point-radius.js b/src/main/webapp/react-component/location/point-radius.js new file mode 100644 index 00000000000..d3b018885b5 --- /dev/null +++ b/src/main/webapp/react-component/location/point-radius.js @@ -0,0 +1,324 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React, { useState, useEffect } from 'react'; +import { Radio, RadioItem } from '../radio/radio'; +import TextField from '../text-field'; +import { validateGeo, initialErrorState, initialErrorStateWithDefault, ErrorComponent, } from '../utils/validation'; +import { Units, Zone, Hemisphere, MinimumSpacing } from './common'; +import { DmsLatitude, DmsLongitude, } from '../../component/location-new/geo-components/coordinates'; +import DirectionInput from '../../component/location-new/geo-components/direction'; +import { Direction } from '../../component/location-new/utils/dms-utils'; +var clearValidationResults = function (errorListener) { + errorListener && + errorListener({ + point: undefined, + radius: undefined, + }); +}; +var PointRadiusLatLonDd = function (props) { + var lat = props.lat, lon = props.lon, radius = props.radius, radiusUnits = props.radiusUnits, setState = props.setState, errorListener = props.errorListener; + var _a = __read(useState(initialErrorStateWithDefault), 2), ddError = _a[0], setDdError = _a[1]; + var _b = __read(useState(initialErrorState), 2), radiusError = _b[0], setRadiusError = _b[1]; + useEffect(function () { + if (props.drawing) { + setDdError(initialErrorStateWithDefault); + setRadiusError(initialErrorState); + } + else { + var ddValidationResult = [ + validateGeo('lat', lat), + validateGeo('lon', lon), + ].find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message + setDdError(ddValidationResult || initialErrorStateWithDefault); + var radiusValidationResult = validateGeo('radius', { + value: radius, + units: radiusUnits, + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setRadiusError(radiusValidationResult || initialErrorState); + errorListener && + errorListener({ + point: ddValidationResult, + radius: radiusValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [props.lat, props.lon, props.radius, props.radiusUnits]); + function clampDd(key, value) { + var _a; + // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message + var defaultValue = validateGeo(key, value).defaultValue; + setState((_a = {}, _a[key] = defaultValue || value, _a)); + } + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: any; o... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: any; o... Remove this comment to see the full error message + type: "number", label: "Latitude", value: lat !== undefined ? String(lat) : lat, onChange: function (value) { return clampDd('lat', value); }, addon: "\u00B0" }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: any; o... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: any; o... Remove this comment to see the full error message + type: "number", label: "Longitude", value: lon !== undefined ? String(lon) : lon, onChange: function (value) { return clampDd('lon', value); }, addon: "\u00B0" }), + React.createElement(ErrorComponent, { errorState: ddError }), + React.createElement(Units, { value: radiusUnits, onChange: function (value) { + var _a; + return setState((_a = {}, _a['radiusUnits'] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: string; label: string; value: string... Remove this comment to see the full error message + type: "number", label: "Radius", value: String(radius), onChange: function (value) { + var _a; + return setState((_a = {}, _a['radius'] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: radiusError }))); +}; +var PointRadiusLatLonDms = function (props) { + var dmsLat = props.dmsLat, dmsLon = props.dmsLon, dmsLatDirection = props.dmsLatDirection, dmsLonDirection = props.dmsLonDirection, radius = props.radius, radiusUnits = props.radiusUnits, setState = props.setState, errorListener = props.errorListener; + var _a = __read(useState(initialErrorStateWithDefault), 2), dmsError = _a[0], setDmsError = _a[1]; + var _b = __read(useState(initialErrorState), 2), radiusError = _b[0], setRadiusError = _b[1]; + var latitudeDirections = [Direction.North, Direction.South]; + var longitudeDirections = [Direction.East, Direction.West]; + useEffect(function () { + if (props.drawing) { + setDmsError(initialErrorStateWithDefault); + setRadiusError(initialErrorState); + } + else { + var dmsValidationResult = [ + validateGeo('dmsLat', dmsLat), + validateGeo('dmsLon', dmsLon), + ].find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message + setDmsError(dmsValidationResult || initialErrorStateWithDefault); + var radiusValidationResult = validateGeo('radius', { + value: radius, + units: radiusUnits, + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setRadiusError(radiusValidationResult || initialErrorState); + errorListener && + errorListener({ + point: dmsValidationResult, + radius: radiusValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [props.dmsLat, props.dmsLon, props.radius, props.radiusUnits]); + function clampDms(key, value) { + var _a; + // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message + var defaultValue = validateGeo(key, value).defaultValue; + setState((_a = {}, _a[key] = defaultValue || value, _a)); + } + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(DmsLatitude, { label: "Latitude", value: dmsLat, onChange: function (value) { return clampDms('dmsLat', value); } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: latitudeDirections, value: dmsLatDirection, onChange: function (value) { + var _a; + return setState((_a = {}, _a['dmsLatDirection'] = value, _a)); + } })), + React.createElement(DmsLongitude, { label: "Longitude", value: dmsLon, onChange: function (value) { return clampDms('dmsLon', value); } }, + React.createElement(DirectionInput + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + , { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + options: longitudeDirections, value: dmsLonDirection, onChange: function (value) { + var _a; + return setState((_a = {}, _a['dmsLonDirection'] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: dmsError }), + React.createElement(Units, { value: radiusUnits, onChange: function (value) { + var _a; + return setState((_a = {}, _a['radiusUnits'] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: string... Remove this comment to see the full error message + label: "Radius", type: "number", value: String(radius), onChange: function (value) { + var _a; + return setState((_a = {}, _a['radius'] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: radiusError }))); +}; +var PointRadiusUsngMgrs = function (props) { + var usng = props.usng, radius = props.radius, radiusUnits = props.radiusUnits, setState = props.setState, errorListener = props.errorListener; + var _a = __read(useState(initialErrorState), 2), usngError = _a[0], setUsngError = _a[1]; + var _b = __read(useState(initialErrorState), 2), radiusError = _b[0], setRadiusError = _b[1]; + useEffect(function () { + if (props.drawing) { + setUsngError(initialErrorState); + setRadiusError(initialErrorState); + } + else { + var usngValidationResult = validateGeo('usng', usng); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setUsngError(usngValidationResult); + var radiusValidationResult = validateGeo('radius', { + value: radius, + units: radiusUnits, + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setRadiusError(radiusValidationResult || initialErrorState); + errorListener && + errorListener({ + point: usngValidationResult, + radius: radiusValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [props.usng, props.radius, props.radiusUnits]); + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "USNG / MGRS", value: usng, onChange: function (value) { + var _a; + return setState((_a = {}, _a['usng'] = value, _a)); + } }), + React.createElement(ErrorComponent, { errorState: usngError }), + React.createElement(Units, { value: radiusUnits, onChange: function (value) { + var _a; + return setState((_a = {}, _a['radiusUnits'] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: string... Remove this comment to see the full error message + label: "Radius", type: "number", value: String(radius), onChange: function (value) { + var _a; + return setState((_a = {}, _a['radius'] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: radiusError }))); +}; +var PointRadiusUtmUps = function (props) { + var utmUpsEasting = props.utmUpsEasting, utmUpsNorthing = props.utmUpsNorthing, utmUpsZone = props.utmUpsZone, utmUpsHemisphere = props.utmUpsHemisphere, radius = props.radius, radiusUnits = props.radiusUnits, setState = props.setState, errorListener = props.errorListener; + var _a = __read(useState(initialErrorState), 2), utmError = _a[0], setUtmError = _a[1]; + var _b = __read(useState(initialErrorState), 2), radiusError = _b[0], setRadiusError = _b[1]; + useEffect(function () { + if (props.drawing) { + setUtmError(initialErrorState); + setRadiusError(initialErrorState); + } + else { + var utmUps = { + easting: utmUpsEasting, + northing: utmUpsNorthing, + zoneNumber: utmUpsZone, + hemisphere: utmUpsHemisphere, + }; + var utmUpsValidationResult = [ + validateGeo('easting', utmUps), + validateGeo('northing', utmUps), + validateGeo('zoneNumber', utmUps), + validateGeo('hemisphere', utmUps), + ].find(function (validation) { return validation === null || validation === void 0 ? void 0 : validation.error; }); + // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message + setUtmError(utmUpsValidationResult || initialErrorStateWithDefault); + var radiusValidationResult = validateGeo('radius', { + value: radius, + units: radiusUnits, + }); + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message + setRadiusError(radiusValidationResult || initialErrorState); + errorListener && + errorListener({ + point: utmUpsValidationResult, + radius: radiusValidationResult, + }); + } + return function () { return clearValidationResults(errorListener); }; + }, [ + props.utmUpsEasting, + props.utmUpsNorthing, + props.utmUpsZone, + props.utmUpsHemisphere, + props.radius, + props.radiusUnits, + ]); + return (React.createElement("div", { className: "flex flex-col flex-nowrap space-y-2" }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "Easting", value: utmUpsEasting !== undefined ? String(utmUpsEasting) : utmUpsEasting, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsEasting'] = value, _a)); + }, addon: "m" }), + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; value: any; onChange: (valu... Remove this comment to see the full error message + label: "Northing", value: utmUpsNorthing !== undefined ? String(utmUpsNorthing) : utmUpsNorthing, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsNorthing'] = value, _a)); + }, addon: "m" }), + React.createElement(Zone, { value: utmUpsZone, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsZone'] = value, _a)); + } }), + React.createElement(Hemisphere, { value: utmUpsHemisphere, onChange: function (value) { + var _a; + return setState((_a = {}, _a['utmUpsHemisphere'] = value, _a)); + } }), + React.createElement(ErrorComponent, { errorState: utmError }), + React.createElement(Units, { value: radiusUnits, onChange: function (value) { + var _a; + return setState((_a = {}, _a['radiusUnits'] = value, _a)); + } }, + React.createElement(TextField + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: string... Remove this comment to see the full error message + , { + // @ts-expect-error ts-migrate(2322) FIXME: Type '{ label: string; type: string; value: string... Remove this comment to see the full error message + label: "Radius", type: "number", value: String(radius), onChange: function (value) { + var _a; + return setState((_a = {}, _a['radius'] = value, _a)); + } })), + React.createElement(ErrorComponent, { errorState: radiusError }))); +}; +var PointRadius = function (props) { + var setState = props.setState, locationType = props.locationType; + var inputs = { + dd: PointRadiusLatLonDd, + dms: PointRadiusLatLonDms, + usng: PointRadiusUsngMgrs, + utmUps: PointRadiusUtmUps, + }; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var Component = inputs[locationType] || null; + return (React.createElement("div", null, + React.createElement(Radio, { value: locationType, onChange: function (value) { + var _a; + return setState((_a = {}, _a['locationType'] = value, _a)); + } }, + React.createElement(RadioItem, { value: "dd" }, "Lat / Lon (DD)"), + React.createElement(RadioItem, { value: "dms" }, "Lat / Lon (DMS)"), + React.createElement(RadioItem, { value: "usng" }, "USNG / MGRS"), + React.createElement(RadioItem, { value: "utmUps" }, "UTM / UPS")), + React.createElement(MinimumSpacing, null), + React.createElement("div", { className: "input-location" }, Component !== null ? React.createElement(Component, __assign({}, props)) : null))); +}; +export default PointRadius; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9pbnQtcmFkaXVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9sb2NhdGlvbi9wb2ludC1yYWRpdXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEVBQUUsRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ2xELE9BQU8sRUFBRSx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HNcIj5VVE0gLyBVUFM8L1JhZGlvSXRlbT5cbiAgICAgIDwvUmFkaW8+XG4gICAgICA8TWluaW11bVNwYWNpbmcgLz5cbiAgICAgIDxkaXYgY2xhc3NOYW1lPVwiaW5wdXQtbG9jYXRpb25cIj5cbiAgICAgICAge0NvbXBvbmVudCAhPT0gbnVsbCA/IDxDb21wb25lbnQgey4uLnByb3BzfSAvPiA6IG51bGx9XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBQb2ludFJhZGl1c1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/location/polygon.d.ts b/src/main/webapp/react-component/location/polygon.d.ts new file mode 100644 index 00000000000..3f137677ab4 --- /dev/null +++ b/src/main/webapp/react-component/location/polygon.d.ts @@ -0,0 +1,3 @@ +/// +declare const Polygon: (props: any) => JSX.Element; +export default Polygon; diff --git a/src/main/webapp/react-component/location/polygon.js b/src/main/webapp/react-component/location/polygon.js new file mode 100644 index 00000000000..254f6e287df --- /dev/null +++ b/src/main/webapp/react-component/location/polygon.js @@ -0,0 +1,26 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import BaseLine from './base.line'; +var options = { + label: 'Polygon', + geometryKey: 'polygon', + unitKey: 'polygonBufferUnits', + widthKey: 'polygonBufferWidth', +}; +var Polygon = function (props) { return React.createElement(BaseLine, __assign({}, props, options)); }; +export default Polygon; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9seWdvbi5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YXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCdcblxuaW1wb3J0IEJhc2VMaW5lIGZyb20gJy4vYmFzZS5saW5lJ1xuXG5jb25zdCBvcHRpb25zID0ge1xuICBsYWJlbDogJ1BvbHlnb24nLFxuICBnZW9tZXRyeUtleTogJ3BvbHlnb24nLFxuICB1bml0S2V5OiAncG9seWdvbkJ1ZmZlclVuaXRzJyxcbiAgd2lkdGhLZXk6ICdwb2x5Z29uQnVmZmVyV2lkdGgnLFxufVxuXG5jb25zdCBQb2x5Z29uID0gKHByb3BzOiBhbnkpID0+IDxCYXNlTGluZSB7Li4ucHJvcHN9IHsuLi5vcHRpb25zfSAvPlxuXG5leHBvcnQgZGVmYXVsdCBQb2x5Z29uXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/location/utmups-textfield.d.ts b/src/main/webapp/react-component/location/utmups-textfield.d.ts new file mode 100644 index 00000000000..b3ab3ac3cd7 --- /dev/null +++ b/src/main/webapp/react-component/location/utmups-textfield.d.ts @@ -0,0 +1,13 @@ +/// +type UtmUpsPoint = { + easting: number; + northing: number; + zoneNumber: number; + hemisphere: 'Northern' | 'Southern'; +}; +declare const UtmupsTextfield: ({ point, setPoint, deletePoint, }: { + point: UtmUpsPoint; + setPoint: (point: UtmUpsPoint) => void; + deletePoint: () => void; +}) => JSX.Element; +export default UtmupsTextfield; diff --git a/src/main/webapp/react-component/location/utmups-textfield.js b/src/main/webapp/react-component/location/utmups-textfield.js new file mode 100644 index 00000000000..c5d41c5e3ef --- /dev/null +++ b/src/main/webapp/react-component/location/utmups-textfield.js @@ -0,0 +1,47 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import IconButton from '@mui/material/IconButton'; +import CloseIcon from '@mui/icons-material/Close'; +import TextField from '../text-field'; +import { Zone, Hemisphere } from './common'; +var UtmupsTextfield = function (_a) { + var point = _a.point, setPoint = _a.setPoint, deletePoint = _a.deletePoint; + return (React.createElement("div", null, + React.createElement("div", { className: "flex flex-row items-center flex-nowrap" }, + React.createElement("div", { className: "flex flex-col space-y-2 flex-nowrap shrink w-full" }, + React.createElement(TextField, { label: "Easting", + // @ts-expect-error ts-migrate(2322) FIXME: Type 'number' is not assignable to type 'string | ... Remove this comment to see the full error message + value: point.easting, onChange: function (value) { + setPoint(__assign(__assign({}, point), { easting: value })); + }, addon: "m" }), + React.createElement(TextField, { label: "Northing", + // @ts-expect-error ts-migrate(2322) FIXME: Type 'number' is not assignable to type 'string | ... Remove this comment to see the full error message + value: point.northing, onChange: function (value) { + setPoint(__assign(__assign({}, point), { northing: value })); + }, addon: "m" }), + React.createElement(Zone, { value: point.zoneNumber, onChange: function (value) { + setPoint(__assign(__assign({}, point), { zoneNumber: value })); + } }), + React.createElement(Hemisphere, { value: point.hemisphere, onChange: function (value) { + setPoint(__assign(__assign({}, point), { hemisphere: value })); + } })), + React.createElement("div", { className: "shrink-0 grow-0" }, + React.createElement(IconButton, { onClick: deletePoint, size: "large" }, + React.createElement(CloseIcon, null)))))); +}; +export default UtmupsTextfield; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRtdXBzLXRleHRmaWVsZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbG9jYXRpb24vdXRtdXBzLXRleHRmaWVsZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDekIsT0FBTyxVQUFVLE1BQU0sMEJBQTBCLENBQUE7QUFDakQsT0FBTyxTQUFTLE1BQU0sMkJBQTJCLENBQUE7QUFDakQsT0FBTyxTQUFTLE1BQU0sZUFBZSxDQUFBO0FBQ3JDLE9BQU8sRUFBRSxJQUFJLEVBQUUsVUFBVSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBUzNDLElBQU0sZUFBZSxHQUFHLFVBQUMsRUFReEI7UUFQQyxLQUFLLFdBQUEsRUFDTCxRQUFRLGNBQUEsRUFDUixXQUFXLGlCQUFBO0lBTVgsT0FBTyxDQUNMO1FBQ0UsNkJBQUssU0FBUyxFQUFDLHdDQUF3QztZQUNyRCw2QkFBSyxTQUFTLEVBQUMsbURBQW1EO2dCQUNoRSxvQkFBQyxTQUFTLElBQ1IsS0FBSyxFQUFDLFNBQVM7b0JBQ2YsbUpBQW1KO29CQUNuSixLQUFLLEVBQUUsS0FBSyxDQUFDLE9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1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgICAgICAgdmFsdWU9e3BvaW50LmVhc3Rpbmd9XG4gICAgICAgICAgICBvbkNoYW5nZT17KHZhbHVlOiBudW1iZXIpID0+IHtcbiAgICAgICAgICAgICAgc2V0UG9pbnQoe1xuICAgICAgICAgICAgICAgIC4uLnBvaW50LFxuICAgICAgICAgICAgICAgIGVhc3Rpbmc6IHZhbHVlLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGFkZG9uPVwibVwiXG4gICAgICAgICAgLz5cbiAgICAgICAgICA8VGV4dEZpZWxkXG4gICAgICAgICAgICBsYWJlbD1cIk5vcnRoaW5nXCJcbiAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyMzIyKSBGSVhNRTogVHlwZSAnbnVtYmVyJyBpcyBub3QgYXNzaWduYWJsZSB0byB0eXBlICdzdHJpbmcgfCAuLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgICAgICAgdmFsdWU9e3BvaW50Lm5vcnRoaW5nfVxuICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogbnVtYmVyKSA9PiB7XG4gICAgICAgICAgICAgIHNldFBvaW50KHtcbiAgICAgICAgICAgICAgICAuLi5wb2ludCxcbiAgICAgICAgICAgICAgICBub3J0aGluZzogdmFsdWUsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgYWRkb249XCJtXCJcbiAgICAgICAgICAvPlxuICAgICAgICAgIDxab25lXG4gICAgICAgICAgICB2YWx1ZT17cG9pbnQuem9uZU51bWJlcn1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsodmFsdWU6IG51bWJlcikgPT4ge1xuICAgICAgICAgICAgICBzZXRQb2ludCh7XG4gICAgICAgICAgICAgICAgLi4ucG9pbnQsXG4gICAgICAgICAgICAgICAgem9uZU51bWJlcjogdmFsdWUsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9fVxuICAgICAgICAgIC8+XG4gICAgICAgICAgPEhlbWlzcGhlcmVcbiAgICAgICAgICAgIHZhbHVlPXtwb2ludC5oZW1pc3BoZXJlfVxuICAgICAgICAgICAgb25DaGFuZ2U9eyh2YWx1ZTogJ05vcnRoZXJuJyB8ICdTb3V0aGVybicpID0+IHtcbiAgICAgICAgICAgICAgc2V0UG9pbnQoe1xuICAgICAgICAgICAgICAgIC4uLnBvaW50LFxuICAgICAgICAgICAgICAgIGhlbWlzcGhlcmU6IHZhbHVlLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJzaHJpbmstMCBncm93LTBcIj5cbiAgICAgICAgICA8SWNvbkJ1dHRvbiBvbkNsaWNrPXtkZWxldGVQb2ludH0gc2l6ZT1cImxhcmdlXCI+XG4gICAgICAgICAgICA8Q2xvc2VJY29uIC8+XG4gICAgICAgICAgPC9JY29uQnV0dG9uPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IFV0bXVwc1RleHRmaWVsZFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/location/validators.d.ts b/src/main/webapp/react-component/location/validators.d.ts new file mode 100644 index 00000000000..1c5e76edf54 --- /dev/null +++ b/src/main/webapp/react-component/location/validators.d.ts @@ -0,0 +1,42 @@ +type Direction = 'N' | 'S' | 'E' | 'W'; +type Point = { + latDirection: Direction; + lonDirection: Direction; + lat: string; + lon: string; +}; +type DmsCoordinate = { + degrees: string; + minutes: string; + seconds: string; + direction: Direction; +}; +type UtmUpsPoint = { + easting: number; + northing: number; + zoneNumber: number; + hemisphere: 'NORTHERN' | 'SOUTHERN'; +}; +export type ValidationResult = { + error: boolean; + message?: string; + defaultValue?: any; +}; +declare function isUPS(input: string): boolean; +declare function parseDmsCoordinate(coordinate: string): DmsCoordinate | undefined; +declare function validateDmsLineOrPoly(dms: Point[], type: 'line' | 'polygon'): { + error: boolean; + message: string | null; + defaultValue: undefined; +}; +declare function validateUsngLineOrPoly(usng: string[], type: 'line' | 'polygon'): { + error: boolean; + message: string | null; + defaultValue: undefined; +}; +declare function validateUtmUpsLineOrPoly(utmups: UtmUpsPoint[], type: 'line' | 'polygon'): { + error: boolean; + message: string | null; + defaultValue: undefined; +}; +export { validateUsngLineOrPoly, validateDmsLineOrPoly, parseDmsCoordinate, validateUtmUpsLineOrPoly, isUPS, }; diff --git a/src/main/webapp/react-component/location/validators.js b/src/main/webapp/react-component/location/validators.js new file mode 100644 index 00000000000..98bf26f4213 --- /dev/null +++ b/src/main/webapp/react-component/location/validators.js @@ -0,0 +1,205 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as usng from 'usng.js'; +// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. +var converter = new usng.Converter(); +import errorMessages from '../../component/location-new/utils/errors'; +import { validateGeo } from '../utils/validation'; +import _ from 'lodash'; +var dmsRegex = new RegExp('^([0-9_]*)°([0-9_]*)\'([0-9_]*\\.?[0-9_]*)"$'); +function isUPS(input) { + try { + converter.deserializeUPS(input); + return true; + } + catch (err) { + return false; + } +} +function validateUsngGrid(grid) { + //corner case for ups zone + return converter.isUSNG(grid) !== 0 || isUPS(grid); +} +function gridIsBlank(grid) { + return grid.length === 0; +} +function dmsPointIsBlank(point) { + return point.lat === '' || point.lon === ''; +} +function utmUpsIsBlank(point) { + return point.easting || point.hemisphere || point.northing || point.zoneNumber + ? false + : true; +} +function validateUtmUpsPoint(point) { + var validation = validateGeo('easting', point); + return !(validation === null || validation === void 0 ? void 0 : validation.error); +} +function inValidRange(coordinate, maximum) { + var degrees = parseInt(coordinate.degrees); + var minutes = parseInt(coordinate.minutes); + var seconds = parseFloat(coordinate.seconds); + if (isNaN(seconds)) { + return false; + } + if (degrees > maximum || minutes > 60 || seconds > 60) { + return false; + } + if (degrees === maximum && (minutes > 0 || seconds > 0)) { + return false; + } + return true; +} +function replacePlaceholderWithZeros(numString) { + if (numString === void 0) { numString = ''; } + while (numString.includes('_')) { + if (numString.includes('.')) { + numString = numString.replace('_', '0'); + } + else { + numString = numString.replace('_', ''); + numString = '0' + numString; + } + } + return numString; +} +function parseDmsCoordinate(coordinate) { + if (coordinate === undefined) { + return undefined; + } + var matches = dmsRegex.exec(coordinate); + if (!matches) { + return undefined; + } + var degrees = replacePlaceholderWithZeros(matches[1]); + var minutes = replacePlaceholderWithZeros(matches[2]); + var seconds = replacePlaceholderWithZeros(matches[3]); + return { degrees: degrees, minutes: minutes, seconds: seconds }; +} +function validateDmsPoint(point) { + var latitude = parseDmsCoordinate(point.lat); + var longitude = parseDmsCoordinate(point.lon); + if (latitude && longitude) { + return inValidRange(latitude, 90) && inValidRange(longitude, 180); + } + return false; +} +function validateDmsLineOrPoly(dms, type) { + var defaultValue; + if (!dms || dms.some(dmsPointIsBlank)) { + return { error: true, message: errorMessages.invalidList, defaultValue: defaultValue }; + } + var error = false; + var message = null; + switch (type) { + case 'line': + if (!dms.every(validateDmsPoint)) { + error = true; + message = errorMessages.invalidList; + } + else if (dms.length < 2) { + error = true; + message = errorMessages.tooFewPointsLine; + } + break; + case 'polygon': + if (!dms.every(validateDmsPoint)) { + error = true; + message = errorMessages.invalidList; + } + else if (dms.length < 4) { + error = true; + message = errorMessages.tooFewPointsPolygon; + } + else if (!_.isEqual(dms[0], dms.slice(-1)[0])) { + error = true; + message = errorMessages.firstLastPointMismatch; + } + break; + } + return { error: error, message: message, defaultValue: defaultValue }; +} +function validateUsngLineOrPoly(usng, type) { + var defaultValue; + if (!usng || usng.some(gridIsBlank)) { + return { error: true, message: errorMessages.invalidList, defaultValue: defaultValue }; + } + var error = false; + var message = null; + switch (type) { + case 'line': + if (!usng.every(validateUsngGrid)) { + error = true; + message = errorMessages.invalidList; + } + else if (usng.length < 2) { + error = true; + message = errorMessages.tooFewPointsLine; + } + break; + case 'polygon': + if (!usng.every(validateUsngGrid)) { + error = true; + message = errorMessages.invalidList; + } + else if (usng.length < 4) { + error = true; + message = errorMessages.tooFewPointsPolygon; + } + else if (!_.isEqual(usng[0], usng.slice(-1)[0])) { + error = true; + message = errorMessages.firstLastPointMismatch; + } + break; + } + return { error: error, message: message, defaultValue: defaultValue }; +} +function validateUtmUpsLineOrPoly(utmups, type) { + var defaultValue; + if (!utmups || utmups.some(utmUpsIsBlank)) { + return { error: true, message: errorMessages.invalidList, defaultValue: defaultValue }; + } + var error = false; + var message = null; + switch (type) { + case 'line': + if (!utmups.every(validateUtmUpsPoint)) { + error = true; + message = errorMessages.invalidList; + } + else if (utmups.length < 2) { + error = true; + message = errorMessages.tooFewPointsLine; + } + break; + case 'polygon': + if (!utmups.every(validateUtmUpsPoint)) { + error = true; + message = errorMessages.invalidList; + } + else if (utmups.length < 4) { + error = true; + message = errorMessages.tooFewPointsPolygon; + } + else if (!_.isEqual(utmups[0], utmups.slice(-1)[0])) { + error = true; + message = errorMessages.firstLastPointMismatch; + } + break; + } + return { error: error, message: message, defaultValue: defaultValue }; +} +export { validateUsngLineOrPoly, validateDmsLineOrPoly, parseDmsCoordinate, validateUtmUpsLineOrPoly, isUPS, }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4u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BlcnJvck1lc3NhZ2VzLnRvb0Zld1BvaW50c1BvbHlnb25cbiAgICAgIH0gZWxzZSBpZiAoIV8uaXNFcXVhbCh1dG11cHNbMF0sIHV0bXVwcy5zbGljZSgtMSlbMF0pKSB7XG4gICAgICAgIGVycm9yID0gdHJ1ZVxuICAgICAgICBtZXNzYWdlID0gZXJyb3JNZXNzYWdlcy5maXJzdExhc3RQb2ludE1pc21hdGNoXG4gICAgICB9XG4gICAgICBicmVha1xuICB9XG4gIHJldHVybiB7IGVycm9yLCBtZXNzYWdlLCBkZWZhdWx0VmFsdWUgfVxufVxuXG5leHBvcnQge1xuICB2YWxpZGF0ZVVzbmdMaW5lT3JQb2x5LFxuICB2YWxpZGF0ZURtc0xpbmVPclBvbHksXG4gIHBhcnNlRG1zQ29vcmRpbmF0ZSxcbiAgdmFsaWRhdGVVdG1VcHNMaW5lT3JQb2x5LFxuICBpc1VQUyxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/map-actions/container.d.ts b/src/main/webapp/react-component/map-actions/container.d.ts new file mode 100644 index 00000000000..18e750a9e28 --- /dev/null +++ b/src/main/webapp/react-component/map-actions/container.d.ts @@ -0,0 +1,35 @@ +import * as React from 'react'; +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + model: LazyQueryResult; +}; +type State = { + currentOverlayUrl: string; +}; +declare class MapActions extends React.Component { + constructor(props: Props); + getActions: () => { + description: string; + displayName: string; + id: string; + title: string; + url: string; + }[]; + getMapActions: () => { + description: string; + displayName: string; + id: string; + title: string; + url: string; + }[]; + getOverlayActions: () => { + description: string; + url: string; + overlayText: string; + }[]; + getOverlayText: (actionUrl: String) => string; + overlayImage: (event: any) => void; + render(): JSX.Element; +} +declare const _default: typeof MapActions; +export default _default; diff --git a/src/main/webapp/react-component/map-actions/container.js b/src/main/webapp/react-component/map-actions/container.js new file mode 100644 index 00000000000..03ce412556b --- /dev/null +++ b/src/main/webapp/react-component/map-actions/container.js @@ -0,0 +1,78 @@ +import { __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import wreqr from '../../js/wreqr'; +import MapActionsPresentation from './presentation'; +var getActionsWithIdPrefix = function (actions, id) { + return actions.filter(function (action) { return action.id.startsWith(id); }); +}; +var MapActions = /** @class */ (function (_super) { + __extends(MapActions, _super); + function MapActions(props) { + var _this = _super.call(this, props) || this; + _this.getActions = function () { + return _this.props.model.plain.actions; + }; + _this.getMapActions = function () { + return getActionsWithIdPrefix(_this.getActions(), 'catalog.data.metacard.map.'); + }; + _this.getOverlayActions = function () { + var modelOverlayActions = getActionsWithIdPrefix(_this.getActions(), 'catalog.data.metacard.map.overlay.'); + return modelOverlayActions.map(function (modelOverlayAction) { + return { + description: modelOverlayAction.description, + url: modelOverlayAction.url, + overlayText: _this.getOverlayText(modelOverlayAction.url), + }; + }); + }; + _this.getOverlayText = function (actionUrl) { + var overlayTransformerPrefix = 'overlay.'; + var overlayTransformerIndex = actionUrl.lastIndexOf(overlayTransformerPrefix); + if (overlayTransformerIndex >= 0) { + var overlayName = actionUrl.substr(overlayTransformerIndex + overlayTransformerPrefix.length); + return 'Overlay ' + overlayName + ' on the map'; + } + return ''; + }; + _this.overlayImage = function (event) { + var clickedOverlayUrl = event.target.getAttribute('data-url'); + var removeOverlay = clickedOverlayUrl === _this.state.currentOverlayUrl; + if (removeOverlay) { + _this.props.model.currentOverlayUrl = undefined; + _this.setState({ currentOverlayUrl: '' }); + wreqr.vent.trigger('metacard:overlay:remove', _this.props.model.plain.id); + } + else { + _this.props.model.currentOverlayUrl = clickedOverlayUrl; + _this.setState({ currentOverlayUrl: clickedOverlayUrl }); + wreqr.vent.trigger('metacard:overlay', _this.props.model); + } + }; + _this.state = { + currentOverlayUrl: _this.props.model.currentOverlayUrl || '', + }; + return _this; + } + MapActions.prototype.render = function () { + var hasMapActions = this.getMapActions().length !== 0; + return (React.createElement(MapActionsPresentation, { hasMapActions: hasMapActions, overlayActions: this.getOverlayActions(), currentOverlayUrl: this.state.currentOverlayUrl, overlayImage: this.overlayImage })); + }; + return MapActions; +}(React.Component)); +export default hot(module)(MapActions); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tYXAtYWN0aW9ucy9jb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sS0FBSyxNQUFNLGdCQUFnQixDQUFBO0FBQ2xDLE9BQU8sc0JBQXNCLE1BQU0sZ0JBQWdCLENBQUE7QUFRbkQsSUFBTSxzQkFBc0IsR0FBRyxVQUM3QixPQUE0QyxFQUM1QyxFQUFVO0lBRVYsT0FBTyxPQUFPLENBQUMsTUFBTSxDQUFDLFVBQUMsTUFBTSxJQUFLLE9BQUEsTUFBTSxDQUFDLEVBQUUsQ0FBQyxVQUFVLENBQUMsRUFBRSxDQUFDLEVBQXhCLENBQXdCLENBQUMsQ0FBQTtBQUM3RCxDQUFDLENBQUE7QUFDRDtJQUF5Qiw4QkFBNkI7SUFDcEQsb0J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mVybGF5VXJsID0gdW5kZWZpbmVkXG4gICAgICB0aGlzLnNldFN0YXRlKHsgY3VycmVudE92ZXJsYXlVcmw6ICcnIH0pXG4gICAgICA7KHdyZXFyIGFzIGFueSkudmVudC50cmlnZ2VyKFxuICAgICAgICAnbWV0YWNhcmQ6b3ZlcmxheTpyZW1vdmUnLFxuICAgICAgICB0aGlzLnByb3BzLm1vZGVsLnBsYWluLmlkXG4gICAgICApXG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMucHJvcHMubW9kZWwuY3VycmVudE92ZXJsYXlVcmwgPSBjbGlja2VkT3ZlcmxheVVybFxuICAgICAgdGhpcy5zZXRTdGF0ZSh7IGN1cnJlbnRPdmVybGF5VXJsOiBjbGlja2VkT3ZlcmxheVVybCB9KVxuICAgICAgOyh3cmVxciBhcyBhbnkpLnZlbnQudHJpZ2dlcignbWV0YWNhcmQ6b3ZlcmxheScsIHRoaXMucHJvcHMubW9kZWwpXG4gICAgfVxuICB9XG4gIHJlbmRlcigpIHtcbiAgICBjb25zdCBoYXNNYXBBY3Rpb25zID0gdGhpcy5nZXRNYXBBY3Rpb25zKCkubGVuZ3RoICE9PSAwXG4gICAgcmV0dXJuIChcbiAgICAgIDxNYXBBY3Rpb25zUHJlc2VudGF0aW9uXG4gICAgICAgIGhhc01hcEFjdGlvbnM9e2hhc01hcEFjdGlvbnN9XG4gICAgICAgIG92ZXJsYXlBY3Rpb25zPXt0aGlzLmdldE92ZXJsYXlBY3Rpb25zKCl9XG4gICAgICAgIGN1cnJlbnRPdmVybGF5VXJsPXt0aGlzLnN0YXRlLmN1cnJlbnRPdmVybGF5VXJsfVxuICAgICAgICBvdmVybGF5SW1hZ2U9e3RoaXMub3ZlcmxheUltYWdlfVxuICAgICAgLz5cbiAgICApXG4gIH1cbn1cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKE1hcEFjdGlvbnMpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/map-actions/index.d.ts b/src/main/webapp/react-component/map-actions/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/map-actions/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/map-actions/index.js b/src/main/webapp/react-component/map-actions/index.js new file mode 100644 index 00000000000..4f12c645115 --- /dev/null +++ b/src/main/webapp/react-component/map-actions/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21hcC1hY3Rpb25zL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGFBQWEsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vY29udGFpbmVyJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/map-actions/presentation.d.ts b/src/main/webapp/react-component/map-actions/presentation.d.ts new file mode 100644 index 00000000000..9782ad35285 --- /dev/null +++ b/src/main/webapp/react-component/map-actions/presentation.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +type Props = { + overlayActions: any; + currentOverlayUrl: string; + overlayImage: (event: any) => void; + hasMapActions: any; +}; +declare const _default: (props: Props) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/map-actions/presentation.js b/src/main/webapp/react-component/map-actions/presentation.js new file mode 100644 index 00000000000..02012ee3737 --- /dev/null +++ b/src/main/webapp/react-component/map-actions/presentation.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __makeTemplateObject } from "tslib"; +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import styled from 'styled-components'; +import { readableColor } from 'polished'; +var Header = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: left;\n font-size: ", ";\n font-weight: bolder;\n opacity: 0.8;\n"], ["\n text-align: left;\n font-size: ", ";\n font-weight: bolder;\n opacity: 0.8;\n"])), function (props) { return props.theme.largeFontSize; }); +var Divider = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", ";\n margin: ", " 0px;\n background: ", ";\n opacity: 0.1;\n"], ["\n height: ", ";\n margin: ", " 0px;\n background: ", ";\n opacity: 0.1;\n"])), function (props) { return props.theme.borderRadius; }, function (props) { return props.theme.minimumSpacing; }, function (props) { return readableColor(props.theme.backgroundContent); }); +var Actions = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding: 0px ", ";\n"], ["\n padding: 0px ", ";\n"])), function (props) { return props.theme.largeSpacing; }); +var OverlayActionLink = styled.a(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-top: ", ";\n cursor: pointer;\n display: block;\n"], ["\n margin-top: ", ";\n cursor: pointer;\n display: block;\n"])), function (props) { return props.theme.minimumSpacing; }); +var render = function (props) { + var hasMapActions = props.hasMapActions, overlayActions = props.overlayActions, overlayImage = props.overlayImage, currentOverlayUrl = props.currentOverlayUrl; + if (!hasMapActions) { + return null; + } + return (React.createElement(React.Fragment, null, + React.createElement(Header, null, "Map:"), + React.createElement(Divider, null), + React.createElement(Actions, null, overlayActions.map(function (overlayAction) { + return (React.createElement(OverlayActionLink, { "data-url": overlayAction.url, title: overlayAction.description, onClick: overlayImage, key: overlayAction.url }, + overlayAction.overlayText, + overlayAction.url === currentOverlayUrl ? ' (remove)' : '')); + })), + React.createElement(Divider, null))); +}; +export default hot(module)(render); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tYXAtYWN0aW9ucy9wcmVzZW50YXRpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7O0FBRUosT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGt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tU3BhY2luZ307XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgZGlzcGxheTogYmxvY2s7XG5gXG5cbmNvbnN0IHJlbmRlciA9IChwcm9wczogUHJvcHMpID0+IHtcbiAgY29uc3QgeyBoYXNNYXBBY3Rpb25zLCBvdmVybGF5QWN0aW9ucywgb3ZlcmxheUltYWdlLCBjdXJyZW50T3ZlcmxheVVybCB9ID1cbiAgICBwcm9wc1xuXG4gIGlmICghaGFzTWFwQWN0aW9ucykge1xuICAgIHJldHVybiBudWxsXG4gIH1cbiAgcmV0dXJuIChcbiAgICA8PlxuICAgICAgPEhlYWRlcj5NYXA6PC9IZWFkZXI+XG4gICAgICA8RGl2aWRlciAvPlxuICAgICAgPEFjdGlvbnM+XG4gICAgICAgIHtvdmVybGF5QWN0aW9ucy5tYXAoKG92ZXJsYXlBY3Rpb246IE92ZXJsYXlBY3Rpb24pID0+IHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPE92ZXJsYXlBY3Rpb25MaW5rXG4gICAgICAgICAgICAgIGRhdGEtdXJsPXtvdmVybGF5QWN0aW9uLnVybH1cbiAgICAgICAgICAgICAgdGl0bGU9e292ZXJsYXlBY3Rpb24uZGVzY3JpcHRpb259XG4gICAgICAgICAgICAgIG9uQ2xpY2s9e292ZXJsYXlJbWFnZX1cbiAgICAgICAgICAgICAga2V5PXtvdmVybGF5QWN0aW9uLnVybH1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAge292ZXJsYXlBY3Rpb24ub3ZlcmxheVRleHR9XG4gICAgICAgICAgICAgIHtvdmVybGF5QWN0aW9uLnVybCA9PT0gY3VycmVudE92ZXJsYXlVcmwgPyAnIChyZW1vdmUpJyA6ICcnfVxuICAgICAgICAgICAgPC9PdmVybGF5QWN0aW9uTGluaz5cbiAgICAgICAgICApXG4gICAgICAgIH0pfVxuICAgICAgPC9BY3Rpb25zPlxuICAgICAgPERpdmlkZXIgLz5cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShyZW5kZXIpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/map-info/container.d.ts b/src/main/webapp/react-component/map-info/container.d.ts new file mode 100644 index 00000000000..6224450ef55 --- /dev/null +++ b/src/main/webapp/react-component/map-info/container.d.ts @@ -0,0 +1,111 @@ +/// +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { WithBackboneProps } from '../backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default<{ + map: import("backbone").Model; + } & WithBackboneProps, WithBackboneProps> | Readonly; + } & WithBackboneProps, WithBackboneProps>>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly; + } & WithBackboneProps, WithBackboneProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly; + } & WithBackboneProps, WithBackboneProps>>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default<{ + map: import("backbone").Model; + } & WithBackboneProps, WithBackboneProps>, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly; + } & WithBackboneProps, WithBackboneProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly; + } & WithBackboneProps, WithBackboneProps>>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly; + } & WithBackboneProps, WithBackboneProps>>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/map-info/container.js b/src/main/webapp/react-component/map-info/container.js new file mode 100644 index 00000000000..bea80b38c3f --- /dev/null +++ b/src/main/webapp/react-component/map-info/container.js @@ -0,0 +1,75 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import withListenTo from '../backbone-container'; +import MapInfoPresentation from './presentation'; +import { hot } from 'react-hot-loader'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { LayoutContext } from '../../component/golden-layout/visual-settings.provider'; +import { getUserCoordinateFormat } from '../../component/visualization/settings-helpers'; +import user from '../../component/singletons/user-instance'; +var mapPropsToState = function (props) { + var map = props.map; + return { + coordinates: { + lat: map.get('mouseLat'), + lon: map.get('mouseLon'), + }, + attributes: getAttributes(map), + measurementState: map.get('measurementState'), + currentDistance: map.get('currentDistance'), + }; +}; +var getAttributes = function (map) { + if (map.get('targetMetacard') === undefined) { + return []; + } + return StartupDataStore.Configuration.getSummaryShow() + .map(function (attribute) { + var value = map.get('targetMetacard').plain.metacard.properties[attribute]; + return { name: attribute, value: value }; + }) + .filter(function (_a) { + var value = _a.value; + return value !== undefined; + }); +}; +var MapInfo = function (props) { + var _a = React.useContext(LayoutContext), getValue = _a.getValue, onStateChanged = _a.onStateChanged, visualTitle = _a.visualTitle, hasLayoutContext = _a.hasLayoutContext; + var _b = __read(React.useState(mapPropsToState(props)), 2), stateProps = _b[0], setStateProps = _b[1]; + var _c = __read(React.useState('degrees'), 2), coordFormat = _c[0], setCoordFormat = _c[1]; + var listenTo = props.listenTo, map = props.map; + var coordFormatKey = "".concat(visualTitle, "-coordFormat"); + var onChange = function () { return setStateProps(mapPropsToState(props)); }; + React.useEffect(function () { + var userDefaultFormat = getUserCoordinateFormat(); + if (hasLayoutContext) { + setCoordFormat(getValue(coordFormat, userDefaultFormat)); + onStateChanged(function () { + var coordFormat = getValue(coordFormatKey, getUserCoordinateFormat()); + setCoordFormat(coordFormat); + }); + } + else { + setCoordFormat(userDefaultFormat); + props.listenTo(user.get('user').get('preferences'), 'change:coordinateFormat', function () { return setCoordFormat(getUserCoordinateFormat()); }); + } + listenTo(map, 'change:mouseLat change:mouseLon change:targetMetacard change:currentDistance', onChange); + }, []); + return React.createElement(MapInfoPresentation, __assign({}, stateProps, { format: coordFormat })); +}; +export default hot(module)(withListenTo(MapInfo)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tYXAtaW5mby9jb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxZQUFtQyxNQUFNLHVCQUF1QixDQUFBO0FBQ3ZFLE9BQU8sbUJBQW1CLE1BQU0sZ0JBQWdCLENBQUE7QUFDaEQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBRXRDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFBO0FBQ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5mbykpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/map-info/formatting.d.ts b/src/main/webapp/react-component/map-info/formatting.d.ts new file mode 100644 index 00000000000..fe519b0bb7c --- /dev/null +++ b/src/main/webapp/react-component/map-info/formatting.d.ts @@ -0,0 +1,6 @@ +import { Attribute, Coordinates, Format } from '.'; +export declare const formatAttribute: ({ name, value }: Attribute) => string | null; +export declare const formatCoordinates: ({ coordinates, format, }: { + coordinates: Coordinates; + format: Format; +}) => any; diff --git a/src/main/webapp/react-component/map-info/formatting.js b/src/main/webapp/react-component/map-info/formatting.js new file mode 100644 index 00000000000..08e61884685 --- /dev/null +++ b/src/main/webapp/react-component/map-info/formatting.js @@ -0,0 +1,82 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message +import mtgeo from 'mt-geo'; +import * as usngs from 'usng.js'; +// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. +var converter = new usngs.Converter(); +var usngPrecision = 6; +import { validCoordinates } from '.'; +import Common from '../../js/Common'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +export var formatAttribute = function (_a) { + var name = _a.name, value = _a.value; + var definition = StartupDataStore.MetacardDefinitions.getAttributeMap()[name]; + if (definition === undefined) { + return null; + } + var isDate = definition.type === 'DATE'; + var displayName = definition.alias || name; + return "".concat(displayName.toUpperCase(), ": ").concat(isDate ? Common.getHumanReadableDateTime(value) : value); +}; +var formatter = { + degrees: function (_a) { + var lat = _a.lat, lon = _a.lon; + return "".concat(mtgeo.toLat(lat), " ").concat(mtgeo.toLon(lon)); + }, + decimal: function (_a) { + var lat = _a.lat, lon = _a.lon; + return decimalComponent({ lat: lat, lon: lon }); + }, + mgrs: function (_a) { + var lat = _a.lat, lon = _a.lon; + return lat > 84 || lat < -80 + ? 'In UPS Space' + : converter.LLtoUSNG(lat, lon, usngPrecision); + }, + utm: function (_a) { + var lat = _a.lat, lon = _a.lon; + return converter.LLtoUTMUPS(lat, lon); + }, + wkt: function (_a) { + var lat = _a.lat, lon = _a.lon; + return "POINT (".concat(lon, " ").concat(lat, ")"); + }, +}; +export var formatCoordinates = function (_a) { + var coordinates = _a.coordinates, format = _a.format; + if (!(format in formatter)) { + throw "Unrecognized coordinate format value [".concat(format, "]"); + } + return validCoordinates(coordinates) + ? formatter[format](coordinates) + : undefined; +}; +var decimalComponent = function (_a) { + var lat = _a.lat, lon = _a.lon; + var numPlaces = 6; + var latPadding = numPlaces + 4; + var lonPadding = numPlaces + 5; + var formattedLat = lat + .toFixed(numPlaces) + .toString() + .padStart(latPadding, ' '); + var formattedLon = lon + .toFixed(numPlaces) + .toString() + .padStart(lonPadding, ' '); + return "".concat(formattedLat, " ").concat(formattedLon); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0dGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbWFwLWluZm8vZm9ybWF0dGluZy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLG1KQUFtSjtBQUNuSixPQUFPLEtBQUssTUFBTSxRQUFRLENBQUE7QUFDMUIsT0FBTyxLQUFLLEtBQUssTUFBTSxTQUFTLENBQUE7QUFFaEMsNEVBQTRFO0FBQzVFLElBQU0sU0FBUyxHQ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KyA0XG4gIGNvbnN0IGxvblBhZGRpbmcgPSBudW1QbGFjZXMgKyA1XG5cbiAgY29uc3QgZm9ybWF0dGVkTGF0ID0gbGF0XG4gICAgLnRvRml4ZWQobnVtUGxhY2VzKVxuICAgIC50b1N0cmluZygpXG4gICAgLnBhZFN0YXJ0KGxhdFBhZGRpbmcsICcgJylcblxuICBjb25zdCBmb3JtYXR0ZWRMb24gPSBsb25cbiAgICAudG9GaXhlZChudW1QbGFjZXMpXG4gICAgLnRvU3RyaW5nKClcbiAgICAucGFkU3RhcnQobG9uUGFkZGluZywgJyAnKVxuXG4gIHJldHVybiBgJHtmb3JtYXR0ZWRMYXR9ICR7Zm9ybWF0dGVkTG9ufWBcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/map-info/index.d.ts b/src/main/webapp/react-component/map-info/index.d.ts new file mode 100644 index 00000000000..02784918372 --- /dev/null +++ b/src/main/webapp/react-component/map-info/index.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +export type Attribute = { + name: string; + value: string; +}; +export type Coordinates = { + lat: number; + lon: number; +}; +export declare const validCoordinates: ({ lat, lon }: Coordinates) => boolean; +export type Format = 'degrees' | 'decimal' | 'mgrs' | 'utm'; diff --git a/src/main/webapp/react-component/map-info/index.js b/src/main/webapp/react-component/map-info/index.js new file mode 100644 index 00000000000..b09c5498ccc --- /dev/null +++ b/src/main/webapp/react-component/map-info/index.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +export var validCoordinates = function (_a) { + var lat = _a.lat, lon = _a.lon; + return lat !== undefined && lon !== undefined; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21hcC1pbmZvL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBRUosT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGFBQWEsQ0FBQTtBQVVyQyxNQUFNLENBQUMsSUFBTSxnQkFBZ0IsR0FBRyxVQUFDLEVBQXlCO1FBQXZCLEdBQUcsU0FBQSxFQUFFLEdBQUcsU0FBQTtJQUN6QyxPQUFBLEdBQUcsS0FBSyxTQUFTLElBQUksR0FBRyxLQUFLLFNBQVM7QUFBdEMsQ0FBc0MsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlI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Z3JlZXMnIHwgJ2RlY2ltYWwnIHwgJ21ncnMnIHwgJ3V0bSdcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/map-info/presentation.d.ts b/src/main/webapp/react-component/map-info/presentation.d.ts new file mode 100644 index 00000000000..7f3a7b7fc1e --- /dev/null +++ b/src/main/webapp/react-component/map-info/presentation.d.ts @@ -0,0 +1,11 @@ +/// +import { Attribute, Coordinates, Format } from '.'; +type Props = { + format: Format; + attributes: Attribute[]; + coordinates: Coordinates; + measurementState: String; + currentDistance: number; +}; +declare const _default: (props: Props) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/map-info/presentation.js b/src/main/webapp/react-component/map-info/presentation.js new file mode 100644 index 00000000000..95411161c4c --- /dev/null +++ b/src/main/webapp/react-component/map-info/presentation.js @@ -0,0 +1,69 @@ +import { __assign, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import { validCoordinates } from '.'; +import { formatAttribute, formatCoordinates } from './formatting'; +import DistanceUtils from '../../js/DistanceUtils'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: 'Inconsolata', 'Lucida Console', monospace;\n background: ", ";\n display: block;\n width: auto;\n height: auto;\n font-size: ", ";\n position: absolute;\n left: 0px;\n bottom: 0px;\n text-align: left;\n padding: ", ";\n max-width: 50%;\n"], ["\n font-family: 'Inconsolata', 'Lucida Console', monospace;\n background: ", ";\n display: block;\n width: auto;\n height: auto;\n font-size: ", ";\n position: absolute;\n left: 0px;\n bottom: 0px;\n text-align: left;\n padding: ", ";\n max-width: 50%;\n"])), function (props) { return props.theme.backgroundModal; }, function (props) { return props.theme.minimumFontSize; }, function (props) { return props.theme.minimumSpacing; }); +var CoordinateInfo = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n white-space: pre;\n display: inline-block;\n"], ["\n white-space: pre;\n display: inline-block;\n"]))); +var MetacardInfo = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"]))); +var metacardInfo = function (_a) { + var attributes = _a.attributes; + return attributes.map(function (_a) { + var name = _a.name, value = _a.value; + if (name === 'thumbnail') { + return (React.createElement("div", { key: name }, + React.createElement("img", { src: value, style: { maxWidth: '100px', maxHeight: '100px' } }))); + } + else { + return (React.createElement(MetacardInfo, { key: name }, formatAttribute({ name: name, value: value }))); + } + }); +}; +/* + * Formats the current distance value to a string with the appropriate unit of measurement. + */ +var getDistanceText = function (distance) { + // use meters when distance is under 1000m and convert to kilometers when ≥1000m + var distanceText = distance < 1000 + ? "".concat(distance.toFixed(2), " m") + : "".concat(DistanceUtils.getDistanceFromMeters(distance, 'kilometers').toFixed(2), " km"); + return distanceText; +}; +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +var distanceInfo = function (props) { + if (props.measurementState !== 'NONE') { + return (React.createElement(MetacardInfo, null, + "distance: ", + getDistanceText(props.currentDistance))); + } +}; +var render = function (props) { + if (!validCoordinates(props.coordinates)) { + return null; + } + var coordinates = formatCoordinates(props); + return (React.createElement(Root, __assign({}, props), + metacardInfo(props), + distanceInfo(props), + React.createElement(CoordinateInfo, null, + React.createElement("span", { "data-id": "coordinates-label" }, coordinates)))); +}; +export default hot(module)(render); +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJma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peGVkKFxuICAgICAgICAgIDJcbiAgICAgICAgKX0ga21gXG5cbiAgcmV0dXJuIGRpc3RhbmNlVGV4dFxufVxuXG4vLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoNzAzMCkgRklYTUU6IE5vdCBhbGwgY29kZSBwYXRocyByZXR1cm4gYSB2YWx1ZS5cbmNvbnN0IGRpc3RhbmNlSW5mbyA9IChwcm9wczogUHJvcHMpID0+IHtcbiAgaWYgKHByb3BzLm1lYXN1cmVtZW50U3RhdGUgIT09ICdOT05FJykge1xuICAgIHJldHVybiAoXG4gICAgICA8TWV0YWNhcmRJbmZvPlxuICAgICAgICBkaXN0YW5jZToge2dldERpc3RhbmNlVGV4dChwcm9wcy5jdXJyZW50RGlzdGFuY2UpfVxuICAgICAgPC9NZXRhY2FyZEluZm8+XG4gICAgKVxuICB9XG59XG5cbmNvbnN0IHJlbmRlciA9IChwcm9wczogUHJvcHMpID0+IHtcbiAgaWYgKCF2YWxpZENvb3JkaW5hdGVzKHByb3BzLmNvb3JkaW5hdGVzKSkge1xuICAgIHJldHVybiBudWxsXG4gIH1cblxuICBjb25zdCBjb29yZGluYXRlcyA9IGZvcm1hdENvb3JkaW5hdGVzKHByb3BzKVxuICByZXR1cm4gKFxuICAgIDxSb290IHsuLi5wcm9wc30+XG4gICAgICB7bWV0YWNhcmRJbmZvKHByb3BzKX1cbiAgICAgIHtkaXN0YW5jZUluZm8ocHJvcHMpfVxuICAgICAgPENvb3JkaW5hdGVJbmZvPlxuICAgICAgICA8c3BhbiBkYXRhLWlkPVwiY29vcmRpbmF0ZXMtbGFiZWxcIj57Y29vcmRpbmF0ZXN9PC9zcGFuPlxuICAgICAgPC9Db29yZGluYXRlSW5mbz5cbiAgICA8L1Jvb3Q+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkocmVuZGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/map-settings/container.d.ts b/src/main/webapp/react-component/map-settings/container.d.ts new file mode 100644 index 00000000000..a7e4dcad015 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/container.d.ts @@ -0,0 +1,68 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { WithBackboneProps } from '../../react-component/backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/map-settings/container.js b/src/main/webapp/react-component/map-settings/container.js new file mode 100644 index 00000000000..ee9d67762a3 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/container.js @@ -0,0 +1,75 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { useState, useEffect } from 'react'; +import MapSettingsPresentation from './presentation'; +import { hot } from 'react-hot-loader'; +import withListenTo from '../../react-component/backbone-container'; +import Paper from '@mui/material/Paper'; +import { useMenuState } from '../../component/menu-state/menu-state'; +import Button from '@mui/material/Button'; +import Popover from '@mui/material/Popover'; +import user from '../../component/singletons/user-instance'; +import SettingsIcon from '@mui/icons-material/Settings'; +import { Elevations } from '../../component/theme/theme'; +import { getUserCoordinateFormat } from '../../component/visualization/settings-helpers'; +import { LayoutContext } from '../../component/golden-layout/visual-settings.provider'; +var MapSettings = function (props) { + var _a = React.useContext(LayoutContext), getValue = _a.getValue, setValue = _a.setValue, onStateChanged = _a.onStateChanged, visualTitle = _a.visualTitle, hasLayoutContext = _a.hasLayoutContext; + var _b = __read(useState('degrees'), 2), coordFormat = _b[0], setCoordFormat = _b[1]; + var _c = __read(useState(user.get('user').get('preferences').get('autoPan')), 2), autoPan = _c[0], setAutoPan = _c[1]; + var menuState = useMenuState(); + var coordFormatKey = "".concat(visualTitle, "-coordFormat"); + useEffect(function () { + var userDefaultFormat = getUserCoordinateFormat(); + if (hasLayoutContext) { + setCoordFormat(getValue(coordFormatKey, userDefaultFormat)); + onStateChanged(function () { + var coordFormat = getValue(coordFormatKey, getUserCoordinateFormat()); + setCoordFormat(coordFormat); + }); + } + else { + setCoordFormat(userDefaultFormat); + props.listenTo(user.get('user').get('preferences'), 'change:coordinateFormat', function () { return setCoordFormat(getUserCoordinateFormat()); }); + } + props.listenTo(user.get('user').get('preferences'), 'change:autoPan', function (_prefs, value) { return setAutoPan(value); }); + }, []); + var updateCoordFormat = function (coordinateFormat) { + if (hasLayoutContext) { + setValue(coordFormatKey, coordinateFormat); + } + else { + var preferences = user + .get('user') + .get('preferences') + .set({ coordinateFormat: coordinateFormat }); + preferences.savePreferences(); + } + }; + var updateAutoPan = function (_event, autoPan) { + var preferences = user.get('user').get('preferences').set({ autoPan: autoPan }); + preferences.savePreferences(); + }; + return (React.createElement(React.Fragment, null, + React.createElement(Button, __assign({ size: "small", "data-id": "settings-button" }, menuState.MuiButtonProps), + React.createElement(SettingsIcon, null)), + React.createElement(Popover, __assign({}, menuState.MuiPopoverProps), + React.createElement(Paper, { elevation: Elevations.overlays }, + React.createElement(MapSettingsPresentation, { coordFormat: coordFormat, updateCoordFormat: updateCoordFormat, autoPan: autoPan, updateAutoPan: updateAutoPan }))))); +}; +export default hot(module)(withListenTo(MapSettings)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tYXAtc2V0dGluZ3MvY29udGFpbmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQzNDLE9BQU8sdUJBQXVCLE1BQU0sZ0JBQWdCLENBQUE7QUFDcEQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sWUFFTixNQUFNLDBDQUEwQyxDQUFBO0FBQ2pELE9BQU8sS0FBSyxNQUFNLHFCQUFxQixDQUFBO0FBQ3ZDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQTtBQUNwRSxPQUFPLE1BQU0sTUFBTSxzQkFBc0IsQ0FBQTtBQUN6QyxPQUFPLE9BQU8sTUFBTSx1QkFBdUIsQ0FBQTtBQUMzQyxPQUFPLElBQUksTUFBTSwwQ0FBMEMsQ0FBQTtBQUMzRCxPQUFPLFlBQVksTUFBTSw4QkFBOEIsQ0FBQTtBQUN2RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sNkJBQTZCLENBQUE7QUFDeEQsT0FBTyxFQUFFLHVCQUF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AgPC9CdXR0b24+XG4gICAgICA8UG9wb3ZlciB7Li4ubWVudVN0YXRlLk11aVBvcG92ZXJQcm9wc30+XG4gICAgICAgIDxQYXBlciBlbGV2YXRpb249e0VsZXZhdGlvbnMub3ZlcmxheXN9PlxuICAgICAgICAgIDxNYXBTZXR0aW5nc1ByZXNlbnRhdGlvblxuICAgICAgICAgICAgY29vcmRGb3JtYXQ9e2Nvb3JkRm9ybWF0fVxuICAgICAgICAgICAgdXBkYXRlQ29vcmRGb3JtYXQ9e3VwZGF0ZUNvb3JkRm9ybWF0fVxuICAgICAgICAgICAgYXV0b1Bhbj17YXV0b1Bhbn1cbiAgICAgICAgICAgIHVwZGF0ZUF1dG9QYW49e3VwZGF0ZUF1dG9QYW59XG4gICAgICAgICAgLz5cbiAgICAgICAgPC9QYXBlcj5cbiAgICAgIDwvUG9wb3Zlcj5cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKSh3aXRoTGlzdGVuVG8oTWFwU2V0dGluZ3MpKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/map-settings/example-coordinates.d.ts b/src/main/webapp/react-component/map-settings/example-coordinates.d.ts new file mode 100644 index 00000000000..8d016219b38 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/example-coordinates.d.ts @@ -0,0 +1,10 @@ +/// +type Props = { + selected: string; + examples?: { + [index: string]: string; + }; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; +export declare const testComponent: (props: Props) => JSX.Element; diff --git a/src/main/webapp/react-component/map-settings/example-coordinates.js b/src/main/webapp/react-component/map-settings/example-coordinates.js new file mode 100644 index 00000000000..9a0ea1249ab --- /dev/null +++ b/src/main/webapp/react-component/map-settings/example-coordinates.js @@ -0,0 +1,46 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message +import mtgeo from 'mt-geo'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n width: 100%;\n white-space: nowrap;\n padding: ", ";\n position: relative;\n\n &.example-label,\n &.example-value {\n width: 50%;\n display: inline-block;\n vertical-align: middle;\n position: relative;\n }\n\n &.example-label {\n text-align: right;\n }\n"], ["\n display: block;\n width: 100%;\n white-space: nowrap;\n padding: ", ";\n position: relative;\n\n &.example-label,\n &.example-value {\n width: 50%;\n display: inline-block;\n vertical-align: middle;\n position: relative;\n }\n\n &.example-label {\n text-align: right;\n }\n"])), function (props) { return props.theme.minimumSpacing; }); +var Label = styled.label(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n .example-label & {\n vertical-align: middle;\n cursor: auto;\n font-weight: bolder;\n max-width: calc(100% - ", ");\n margin: 0px;\n line-height: 1.4;\n padding: ", " 0px;\n min-height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n word-wrap: normal;\n white-space: normal;\n }\n"], ["\n .example-label & {\n vertical-align: middle;\n cursor: auto;\n font-weight: bolder;\n max-width: calc(100% - ", ");\n margin: 0px;\n line-height: 1.4;\n padding: ", " 0px;\n min-height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n word-wrap: normal;\n white-space: normal;\n }\n"])), function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.minimumButtonSize; }); +var exampleLat = '14.94', exampleLon = '-11.875'; +var defaultExamples = { + degrees: "".concat(mtgeo.toLat(exampleLat), " ").concat(mtgeo.toLon(exampleLon)), + decimal: "".concat(exampleLat, " ").concat(exampleLon), + mgrs: '4Q FL 23009 12331', + utm: '14N 1925mE 1513mN', + wkt: 'POINT (50 40)', +}; +var render = function (props) { + var selected = props.selected, _a = props.examples, examples = _a === void 0 ? defaultExamples : _a; + var example = examples[selected]; + if (typeof example === 'undefined') { + console.warn("Unrecognized coordinate format value [".concat(selected, "]")); + } + return (React.createElement(Root, null, + React.createElement("div", { className: "example-label" }, + React.createElement(Label, null, "Example Coordinates")), + React.createElement("div", { className: "example-value" }, + React.createElement("span", null, example)))); +}; +export default hot(module)(render); +export var testComponent = render; +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhhbXBsZS1jb29yZGluYXRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbWFwLXNldHRpbmdzL2V4YW1wbGUtY29vcmRpbmF0ZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7QUFDdEMsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLG1KQUFtSjtBQUNuSixPQUFPLEtBQUssTUFBTSxRQUFRLENBQUE7QUFPMUIsSUFBTSxJQUFJLEdBQUcsTUFBTSxDQUFDLEdBQUcsa1hBQUEsMEVBSVYsRUFBcUMsbU9BY2pELEtBZFksVUFBQyxLQUFLLElBQUssT0FBQSxLQUFLLENBQUMsS0FBSyxDQUFDLGNBQWMsRUFBMUIsQ0FBMEIsQ0FjakQsQ0FBQTtBQUVELEl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XR9ICR7ZXhhbXBsZUxvbn1gLFxuICBtZ3JzOiAnNFEgRkwgMjMwMDkgMTIzMzEnLFxuICB1dG06ICcxNE4gMTkyNW1FIDE1MTNtTicsXG4gIHdrdDogJ1BPSU5UICg1MCA0MCknLFxufSBhcyB7XG4gIFtpbmRleDogc3RyaW5nXTogc3RyaW5nXG59XG5cbmNvbnN0IHJlbmRlciA9IChwcm9wczogUHJvcHMpID0+IHtcbiAgY29uc3QgeyBzZWxlY3RlZCwgZXhhbXBsZXMgPSBkZWZhdWx0RXhhbXBsZXMgfSA9IHByb3BzXG4gIGNvbnN0IGV4YW1wbGUgPSBleGFtcGxlc1tzZWxlY3RlZF1cbiAgaWYgKHR5cGVvZiBleGFtcGxlID09PSAndW5kZWZpbmVkJykge1xuICAgIGNvbnNvbGUud2FybihgVW5yZWNvZ25pemVkIGNvb3JkaW5hdGUgZm9ybWF0IHZhbHVlIFske3NlbGVjdGVkfV1gKVxuICB9XG4gIHJldHVybiAoXG4gICAgPFJvb3Q+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cImV4YW1wbGUtbGFiZWxcIj5cbiAgICAgICAgPExhYmVsPkV4YW1wbGUgQ29vcmRpbmF0ZXM8L0xhYmVsPlxuICAgICAgPC9kaXY+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cImV4YW1wbGUtdmFsdWVcIj5cbiAgICAgICAgPHNwYW4+e2V4YW1wbGV9PC9zcGFuPlxuICAgICAgPC9kaXY+XG4gICAgPC9Sb290PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKHJlbmRlcilcbmV4cG9ydCBjb25zdCB0ZXN0Q29tcG9uZW50ID0gcmVuZGVyXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/map-settings/example-coordinates.spec.d.ts b/src/main/webapp/react-component/map-settings/example-coordinates.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/example-coordinates.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/react-component/map-settings/example-coordinates.spec.js b/src/main/webapp/react-component/map-settings/example-coordinates.spec.js new file mode 100644 index 00000000000..15ef71c4e74 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/example-coordinates.spec.js @@ -0,0 +1,38 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import { expect } from 'chai'; +import { mount } from 'enzyme'; +import { testComponent as ExampleCoordinates } from './example-coordinates'; +describe('', function () { + var props = { + selected: 'mgrs', + examples: { mgrs: '4Q FL 23009 12331' }, + }; + it('renders', function () { + var wrapper = mount(React.createElement(ExampleCoordinates, { selected: "foo" })); + expect(wrapper.find({ selected: 'foo' }).length).to.equal(1); + }); + it('displays empty example for unknown coordinate type', function () { + var wrapper = mount(React.createElement(ExampleCoordinates, { selected: "foo" })); + expect(wrapper.containsMatchingElement(React.createElement("span", null))).to.equal(true); + }); + it('displays the correct example', function () { + var wrapper = mount(React.createElement(ExampleCoordinates, __assign({}, props))); + expect(wrapper.containsMatchingElement(React.createElement("span", null, "4Q FL 23009 12331"))).to.equal(true); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhhbXBsZS1jb29yZGluYXRlcy5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tYXAtc2V0dGluZ3MvZXhhbXBsZ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F0ZXMgc2VsZWN0ZWQ9XCJmb29cIiAvPilcbiAgICBleHBlY3Qod3JhcHBlci5jb250YWluc01hdGNoaW5nRWxlbWVudCg8c3BhbiAvPikpLnRvLmVxdWFsKHRydWUpXG4gIH0pXG5cbiAgaXQoJ2Rpc3BsYXlzIHRoZSBjb3JyZWN0IGV4YW1wbGUnLCAoKSA9PiB7XG4gICAgY29uc3Qgd3JhcHBlciA9IG1vdW50KDxFeGFtcGxlQ29vcmRpbmF0ZXMgey4uLnByb3BzfSAvPilcbiAgICBleHBlY3QoXG4gICAgICB3cmFwcGVyLmNvbnRhaW5zTWF0Y2hpbmdFbGVtZW50KDxzcGFuPjRRIEZMIDIzMDA5IDEyMzMxPC9zcGFuPilcbiAgICApLnRvLmVxdWFsKHRydWUpXG4gIH0pXG59KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/map-settings/index.d.ts b/src/main/webapp/react-component/map-settings/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/map-settings/index.js b/src/main/webapp/react-component/map-settings/index.js new file mode 100644 index 00000000000..139f9bcdfd0 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21hcC1zZXR0aW5ncy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxhQUFhLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL2NvbnRhaW5lcidcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/map-settings/presentation.d.ts b/src/main/webapp/react-component/map-settings/presentation.d.ts new file mode 100644 index 00000000000..7fda600f284 --- /dev/null +++ b/src/main/webapp/react-component/map-settings/presentation.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +type Props = { + coordFormat: string; + updateCoordFormat: (selected: string) => void; + autoPan: boolean; + updateAutoPan: (event: React.ChangeEvent | React.KeyboardEvent, checked: boolean) => void; +}; +declare const _default: ({ coordFormat, updateCoordFormat, autoPan, updateAutoPan, }: Props) => JSX.Element; +export default _default; +export declare const testComponent: ({ coordFormat, updateCoordFormat, autoPan, updateAutoPan, }: Props) => JSX.Element; diff --git a/src/main/webapp/react-component/map-settings/presentation.js b/src/main/webapp/react-component/map-settings/presentation.js new file mode 100644 index 00000000000..a2265f96f4d --- /dev/null +++ b/src/main/webapp/react-component/map-settings/presentation.js @@ -0,0 +1,65 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import ExampleCoordinates from './example-coordinates'; +import FormGroup from '@mui/material/FormGroup'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Checkbox from '@mui/material/Checkbox'; +import Typography from '@mui/material/Typography'; +import Select from '@mui/material/Select'; +import MenuItem from '@mui/material/MenuItem'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: auto;\n min-width: ", ";\n padding: ", ";\n"], ["\n overflow: auto;\n min-width: ", ";\n padding: ", ";\n"])), function (props) { return props.theme.minimumScreenSize; }, function (props) { return props.theme.minimumSpacing; }); +var coordinateFormatOptions = [ + { label: 'Degrees, Minutes, Seconds', value: 'degrees' }, + { label: 'Decimal', value: 'decimal' }, + { label: 'MGRS', value: 'mgrs' }, + { label: 'UTM/UPS', value: 'utm' }, + { label: 'Well Known Text', value: 'wkt' }, +]; +var render = function (_a) { + var coordFormat = _a.coordFormat, updateCoordFormat = _a.updateCoordFormat, autoPan = _a.autoPan, updateAutoPan = _a.updateAutoPan; + return (React.createElement(Root, null, + React.createElement(FormGroup, { row: true }, + React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { id: "auto-pan-checkbox", autoFocus: true, onKeyPress: function (e) { + if (e.key === 'Enter') { + updateAutoPan(e, !autoPan); + } + }, checked: autoPan, onChange: updateAutoPan, color: "primary", name: "autoPan" }), label: React.createElement(Typography, { variant: "body2" }, "Auto-Pan"), labelPlacement: "start", style: { paddingLeft: '10px' } })), + React.createElement("div", { style: { padding: '0 10px' } }, + React.createElement(Typography, { variant: "body2" }, "Coordinate Format"), + React.createElement(Select, { id: "coordinate-format-select", onChange: function (event) { + updateCoordFormat(event.target.value); + }, value: coordFormat, variant: "outlined", margin: "dense", fullWidth: true, MenuProps: { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left', + }, + transformOrigin: { + vertical: 'top', + horizontal: 'left', + }, + } }, coordinateFormatOptions.map(function (option) { + return (React.createElement(MenuItem, { key: option.value, value: option.value }, + React.createElement(Typography, { variant: "subtitle2" }, option.label))); + }))), + React.createElement(ExampleCoordinates, { selected: coordFormat }))); +}; +export default hot(module)(render); +export var testComponent = render; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tYXAtc2V0dGluZ3MvcHJlc2VudGF0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLGtCQUFrQixNQUFNLHVCQUF1QixDQUFBO0FBQ3RELE9BQU8sU0FBUyxNQUFNLHlCQUF5QixDQUFBO0FBQy9DLE9BQU8sZ0JBQWdCLE1BQU0sZ0NBQWdDLENBQUE7QUFDN0Qs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uXVxuXG5jb25zdCByZW5kZXIgPSAoe1xuICBjb29yZEZvcm1hdCxcbiAgdXBkYXRlQ29vcmRGb3JtYXQsXG4gIGF1dG9QYW4sXG4gIHVwZGF0ZUF1dG9QYW4sXG59OiBQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxSb290PlxuICAgICAgPEZvcm1Hcm91cCByb3c+XG4gICAgICAgIDxGb3JtQ29udHJvbExhYmVsXG4gICAgICAgICAgY29udHJvbD17XG4gICAgICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICAgICAgaWQ9XCJhdXRvLXBhbi1jaGVja2JveFwiXG4gICAgICAgICAgICAgIGF1dG9Gb2N1c1xuICAgICAgICAgICAgICBvbktleVByZXNzPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChlLmtleSA9PT0gJ0VudGVyJykge1xuICAgICAgICAgICAgICAgICAgdXBkYXRlQXV0b1BhbihlLCAhYXV0b1BhbilcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIGNoZWNrZWQ9e2F1dG9QYW59XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXt1cGRhdGVBdXRvUGFufVxuICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICBuYW1lPVwiYXV0b1BhblwiXG4gICAgICAgICAgICAvPlxuICAgICAgICAgIH1cbiAgICAgICAgICBsYWJlbD17PFR5cG9ncmFwaHkgdmFyaWFudD1cImJvZHkyXCI+QXV0by1QYW48L1R5cG9ncmFwaHk+fVxuICAgICAgICAgIGxhYmVsUGxhY2VtZW50PVwic3RhcnRcIlxuICAgICAgICAgIHN0eWxlPXt7IHBhZGRpbmdMZWZ0OiAnMTBweCcgfX1cbiAgICAgICAgLz5cbiAgICAgIDwvRm9ybUdyb3VwPlxuXG4gICAgICA8ZGl2IHN0eWxlPXt7IHBhZGRpbmc6ICcwIDEwcHgnIH19PlxuICAgICAgICA8VHlwb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i5sYWJlbH08L1R5cG9ncmFwaHk+XG4gICAgICAgICAgICAgIDwvTWVudUl0ZW0+XG4gICAgICAgICAgICApXG4gICAgICAgICAgfSl9XG4gICAgICAgIDwvU2VsZWN0PlxuICAgICAgPC9kaXY+XG5cbiAgICAgIDxFeGFtcGxlQ29vcmRpbmF0ZXMgc2VsZWN0ZWQ9e2Nvb3JkRm9ybWF0fSAvPlxuICAgIDwvUm9vdD5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShyZW5kZXIpXG5leHBvcnQgY29uc3QgdGVzdENvbXBvbmVudCA9IHJlbmRlclxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/map-user-settings/coordinate-settings.d.ts b/src/main/webapp/react-component/map-user-settings/coordinate-settings.d.ts new file mode 100644 index 00000000000..4840782b38d --- /dev/null +++ b/src/main/webapp/react-component/map-user-settings/coordinate-settings.d.ts @@ -0,0 +1,3 @@ +/// +declare const CoordinateSettings: () => JSX.Element; +export default CoordinateSettings; diff --git a/src/main/webapp/react-component/map-user-settings/coordinate-settings.js b/src/main/webapp/react-component/map-user-settings/coordinate-settings.js new file mode 100644 index 00000000000..dd430d9afda --- /dev/null +++ b/src/main/webapp/react-component/map-user-settings/coordinate-settings.js @@ -0,0 +1,31 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { useState } from 'react'; +import FormControl from '@mui/material/FormControl'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import RadioGroup from '@mui/material/RadioGroup'; +import Radio from '@mui/material/Radio'; +import Typography from '@mui/material/Typography'; +import { TypedUserInstance } from '../../component/singletons/TypedUser'; +import user from '../../component/singletons/user-instance'; +var coordinateFormatOptions = [ + { label: 'Degrees, Minutes, Seconds (DMS) (Lat/Lon)', value: 'degrees' }, + { label: 'Decimal (Lat/Lon)', value: 'decimal' }, + { label: 'MGRS', value: 'mgrs' }, + { label: 'UTM/UPS (Lat/Lon)', value: 'utm' }, + { label: 'Well Known Text (Lon/Lat)', value: 'wkt' }, +]; +var CoordinateSettings = function () { + var _a = __read(useState(TypedUserInstance.getCoordinateFormat()), 2), coordFormat = _a[0], setCoordFormat = _a[1]; + var updateCoordFormat = function (coordinateFormat) { + var preferences = user.get('user').get('preferences'); + setCoordFormat(coordinateFormat); + preferences.set({ coordinateFormat: coordinateFormat }); + preferences.savePreferences(); + }; + return (React.createElement(FormControl, null, + React.createElement(Typography, { variant: "h6" }, "Coordinate System (CS)"), + React.createElement(RadioGroup, { value: coordFormat, onChange: function (e) { return updateCoordFormat(e.target.value); } }, coordinateFormatOptions.map(function (format) { return (React.createElement(FormControlLabel, { value: format.value, control: React.createElement(Radio, { size: "small", color: "primary" }), label: React.createElement("div", { className: "text-sm" }, format.label) })); })))); +}; +export default CoordinateSettings; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29vcmRpbmF0ZS1zZXR0aW5ncy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbWFwLXVzZXItc2V0dGluZ3MvY29vcmRpbmF0ZS1zZXR0aW5ncy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDaEMsT0FBTyxXQUFXLE1BQU0sMkJBQTJCLENBQUE7QUFDbkQsT0FBTyxnQkFBZ0IsTUFBTSxnQ0FBZ0MsQ0FBQTtBQUM3RCxPQUFPLFVBQVUsTUFBTSwwQkFBMEIsQ0FBQTtBQUNqRCxPQUFPLEtBQUssTUFBTSxxQkFBcUIsQ0FBQTtBQUN2QyxPQUFPLFVBQVUsTUFBTSwwQkFBMEIsQ0FBQTtBQUNqRCxPQUFPLEVBQUUsaUJBQWlCLE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dCB9KVxuICAgIHByZWZlcmVuY2VzLnNhdmVQcmVmZXJlbmNlcygpXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxGb3JtQ29udHJvbD5cbiAgICAgIDxUeXBvZ3JhcGh5IHZhcmlhbnQ9XCJoNlwiPkNvb3JkaW5hdGUgU3lzdGVtIChDUyk8L1R5cG9ncmFwaHk+XG4gICAgICA8UmFkaW9Hcm91cFxuICAgICAgICB2YWx1ZT17Y29vcmRGb3JtYXR9XG4gICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4gdXBkYXRlQ29vcmRGb3JtYXQoZS50YXJnZXQudmFsdWUpfVxuICAgICAgPlxuICAgICAgICB7Y29vcmRpbmF0ZUZvcm1hdE9wdGlvbnMubWFwKChmb3JtYXQpID0+IChcbiAgICAgICAgICA8Rm9ybUNvbnRyb2xMYWJlbFxuICAgICAgICAgICAgdmFsdWU9e2Zvcm1hdC52YWx1ZX1cbiAgICAgICAgICAgIGNvbnRyb2w9ezxSYWRpbyBzaXplPVwic21hbGxcIiBjb2xvcj1cInByaW1hcnlcIiAvPn1cbiAgICAgICAgICAgIGxhYmVsPXs8ZGl2IGNsYXNzTmFtZT1cInRleHQtc21cIj57Zm9ybWF0LmxhYmVsfTwvZGl2Pn1cbiAgICAgICAgICAvPlxuICAgICAgICApKX1cbiAgICAgIDwvUmFkaW9Hcm91cD5cbiAgICA8L0Zvcm1Db250cm9sPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IENvb3JkaW5hdGVTZXR0aW5nc1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/map-user-settings/map-user-settings.d.ts b/src/main/webapp/react-component/map-user-settings/map-user-settings.d.ts new file mode 100644 index 00000000000..8a4f0b63137 --- /dev/null +++ b/src/main/webapp/react-component/map-user-settings/map-user-settings.d.ts @@ -0,0 +1,2 @@ +/// +export declare const MapUserSettings: () => JSX.Element; diff --git a/src/main/webapp/react-component/map-user-settings/map-user-settings.js b/src/main/webapp/react-component/map-user-settings/map-user-settings.js new file mode 100644 index 00000000000..ebc1c01baaa --- /dev/null +++ b/src/main/webapp/react-component/map-user-settings/map-user-settings.js @@ -0,0 +1,9 @@ +import * as React from 'react'; +import CoordinateSettings from './coordinate-settings'; +import MapLayerSettings from '../../component/layers/layers.view'; +export var MapUserSettings = function () { + return (React.createElement(React.Fragment, null, + React.createElement(CoordinateSettings, null), + React.createElement(MapLayerSettings, null))); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLXVzZXItc2V0dGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21hcC11c2VyLXNldHRpbmdzL21hcC11c2VyLXNldHRpbmdzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLGtCQUFrQixNQUFNLHVCQUF1QixDQUFBO0FBQ3RELE9BQU8sZ0JBQWdCLE1BQU0sb0NBQW9DLENBQUE7QUFFakUsTUFBTSxDQUFDLElBQU0sZUFBZSxHQUFHO0lBQzdCLE9BQU8sQ0FDTDtRQUNFLG9CQUFDLGtCQUFrQixPQUFHO1FBQ3RCLG9CQUFDLGdCQUFnQixPQUFHLENBQ25CLENBQ0osQ0FBQTtBQUNILENBQUMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IENvb3JkaW5hdGVTZXR0aW5ncyBmcm9tICcuL2Nvb3JkaW5hdGUtc2V0dGluZ3MnXG5pbXBvcnQgTWFwTGF5ZXJTZXR0aW5ncyBmcm9tICcuLi8uLi9jb21wb25lbnQvbGF5ZXJzL2xheWVycy52aWV3J1xuXG5leHBvcnQgY29uc3QgTWFwVXNlclNldHRpbmdzID0gKCkgPT4ge1xuICByZXR1cm4gKFxuICAgIDw+XG4gICAgICA8Q29vcmRpbmF0ZVNldHRpbmdzIC8+XG4gICAgICA8TWFwTGF5ZXJTZXR0aW5ncyAvPlxuICAgIDwvPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/menu/index.d.ts b/src/main/webapp/react-component/menu/index.d.ts new file mode 100644 index 00000000000..217051d6ee7 --- /dev/null +++ b/src/main/webapp/react-component/menu/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Menu, MenuItem } from './menu'; diff --git a/src/main/webapp/react-component/menu/index.js b/src/main/webapp/react-component/menu/index.js new file mode 100644 index 00000000000..ad07990b254 --- /dev/null +++ b/src/main/webapp/react-component/menu/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Menu, MenuItem } from './menu'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcH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kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgTWVudSwgTWVudUl0ZW0gfSBmcm9tICcuL21lbnUnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/menu/menu.d.ts b/src/main/webapp/react-component/menu/menu.d.ts new file mode 100644 index 00000000000..f49fafe051d --- /dev/null +++ b/src/main/webapp/react-component/menu/menu.d.ts @@ -0,0 +1,72 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +interface MenuProps { + /** Currently selected value of the provided ``. */ + value?: any; + /** + * Determines if multiple items can be selected + * + * @default false + */ + multi?: boolean; + /** + * MenuItems + */ + children?: any; + /** Optional value change handler. */ + onChange: (value: any) => void; + /** Optional className to style root menu element. */ + className?: string; + onClose?: () => void; +} +type MenuState = { + active: boolean; +}; +export declare class Menu extends React.Component { + constructor(props: MenuProps); + chooseActive(): any; + onHover(active: any): void; + getChildren(): (string | number | React.ReactElement> | React.ReactFragment | React.ReactPortal)[]; + getChildrenFrom(children: any): (string | number | React.ReactElement> | React.ReactFragment | React.ReactPortal)[]; + onShift(offset: any): void; + getValue(value: any): any; + onChange(value: any): void; + onKeyDown(e: any): void; + componentDidUpdate(previousProps: MenuProps): void; + render(): JSX.Element; +} +type MenuItemProps = { + /** A value to represent the current Item */ + value?: any; + /** + * Children to display for menu item. + * + * @default value + */ + children?: any; + /** Optional styles for root element. */ + style?: object; + selected?: any; + onClick?: any; + active?: any; + disabled?: any; + onHover?: any; +}; +export declare const MenuItem: { + (props: MenuItemProps): JSX.Element; + displayName: string; +}; +export {}; diff --git a/src/main/webapp/react-component/menu/menu.js b/src/main/webapp/react-component/menu/menu.js new file mode 100644 index 00000000000..7962e793807 --- /dev/null +++ b/src/main/webapp/react-component/menu/menu.js @@ -0,0 +1,181 @@ +import { __assign, __extends, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { useEffect } from 'react'; +import styled from 'styled-components'; +import { readableColor, rgba } from 'polished'; +var mod = function (n, m) { return ((n % m) + m) % m; }; +var MenuRoot = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-height: 50vh;\n position: relative;\n"], ["\n max-height: 50vh;\n position: relative;\n"]))); +var after = "\n ::after {\n display: inline-block;\n content: '\f00c';\n font-family: FontAwesome;\n font-style: normal;\n position: absolute;\n top: 50%;\n right: 0px;\n width: 2.275rem;\n text-align: center;\n transform: translateY(-50%);\n }\n"; +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +var background = function (props) { + if (props.theme.backgroundDropdown !== undefined) { + return rgba(readableColor(props.theme.backgroundDropdown), 0.1); + } +}; +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +var foreground = function (props) { + if (props.theme.backgroundDropdown !== undefined) { + return readableColor(props.theme.backgroundDropdown); + } +}; +var ItemRoot = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n padding: 0px ", ";\n padding-right: ", ";\n box-sizing: border-box;\n height: ", ";\n line-height: ", ";\n cursor: pointer;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n ", "\n", "\n", "\nbackground: ", ";\n color: ", ";\n"], ["\n position: relative;\n padding: 0px ", ";\n padding-right: ", ";\n box-sizing: border-box;\n height: ", ";\n line-height: ", ";\n cursor: pointer;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ", "\n ", "\n", "\n", "\nbackground: ", ";\n color: ", ";\n"])), function (_a) { + var theme = _a.theme; + return theme.minimumSpacing; +}, function (_a) { + var theme = _a.theme; + return theme.minimumButtonSize; +}, function (_a) { + var theme = _a.theme; + return theme.minimumButtonSize; +}, function (_a) { + var theme = _a.theme; + return theme.minimumButtonSize; +}, function (_a) { + var disabled = _a.disabled; + return (disabled ? 'pointer-events : none' : ''); +}, function (_a) { + var theme = _a.theme, active = _a.active, disabled = _a.disabled; + return active && !disabled + ? "box-shadow: inset 0px 0px 0px 1px ".concat(theme.primaryColor, ";") + : ''; +}, function (_a) { + var selected = _a.selected; + return (selected ? 'font-weight: bold;' : ''); +}, function (_a) { + var selected = _a.selected, disabled = _a.disabled; + return (selected && !disabled ? after : ''); +}, function (props) { + return props.active && !props.disabled ? background(props) : 'inherit'; +}, function (props) { return (props.disabled ? 'lightgrey' : foreground); }); +var DocumentListener = function (props) { + useEffect(function () { + document.addEventListener(props.event, props.listener); + return function () { + document.removeEventListener(props.event, props.listener); + }; + }, []); + return null; +}; +var Menu = /** @class */ (function (_super) { + __extends(Menu, _super); + function Menu(props) { + var _this = _super.call(this, props) || this; + _this.state = { active: _this.chooseActive() }; + _this.onKeyDown = _this.onKeyDown.bind(_this); + return _this; + } + Menu.prototype.chooseActive = function () { + var selection = this.props.value; + var active = this.state ? this.state.active : undefined; + var itemNames = this.getChildren().map(function (child) { return child.props.value; }); + if (itemNames.includes(active)) { + return active; + } + else if (itemNames.includes(selection)) { + return selection; + } + else if (itemNames.length > 0) { + return itemNames[0]; + } + else { + return undefined; + } + }; + Menu.prototype.onHover = function (active) { + this.setState({ active: active }); + }; + Menu.prototype.getChildren = function () { + return this.getChildrenFrom(this.props.children); + }; + Menu.prototype.getChildrenFrom = function (children) { + return React.Children.toArray(children).filter(function (o) { return o; }); + }; + Menu.prototype.onShift = function (offset) { + var _this = this; + var values = this.getChildren().map(function (_a) { + var props = _a.props; + return props.value; + }); + var index = values.findIndex(function (value) { return value === _this.state.active; }); + var next = mod(index + offset, values.length); + this.onHover(values[next]); + }; + Menu.prototype.getValue = function (value) { + if (this.props.multi) { + if (this.props.value.indexOf(value) !== -1) { + return this.props.value.filter(function (v) { return v !== value; }); + } + else { + return this.props.value.concat(value); + } + } + else { + return value; + } + }; + Menu.prototype.onChange = function (value) { + this.props.onChange(this.getValue(value)); + if (!this.props.multi && typeof this.props.onClose === 'function') { + this.props.onClose(); + } + }; + Menu.prototype.onKeyDown = function (e) { + switch (e.code) { + case 'ArrowUp': + e.preventDefault(); + this.onShift(-1); + break; + case 'ArrowDown': + e.preventDefault(); + this.onShift(1); + break; + case 'Enter': + e.preventDefault(); + var active = this.state.active; + if (active !== undefined) { + this.onChange(active); + } + break; + } + }; + Menu.prototype.componentDidUpdate = function (previousProps) { + if (previousProps.children !== this.props.children) { + this.setState({ active: this.chooseActive() }); + } + }; + Menu.prototype.render = function () { + var _this = this; + var _a = this.props, multi = _a.multi, value = _a.value, children = _a.children; + var childrenWithProps = this.getChildrenFrom(children).map(function (child) { + return React.cloneElement(child, __assign({ selected: multi + ? value.indexOf(child.props.value) !== -1 + : value === child.props.value, onClick: function () { return _this.onChange(child.props.value); }, active: _this.state.active === child.props.value, onHover: function () { return _this.onHover(child.props.value); } }, child.props)); + }); + return (React.createElement(MenuRoot, { className: this.props.className }, + childrenWithProps, + React.createElement(DocumentListener, { event: "keydown", listener: this.onKeyDown }))); + }; + return Menu; +}(React.Component)); +export { Menu }; +export var MenuItem = function (props) { + var value = props.value, children = props.children, selected = props.selected, onClick = props.onClick, active = props.active, onHover = props.onHover, style = props.style, disabled = props.disabled; + return (React.createElement(ItemRoot, { selected: selected, active: active, style: style, onMouseEnter: function () { return onHover(value); }, onFocus: function () { return onHover(value); }, tabIndex: 0, onClick: function () { return onClick(value); }, disabled: disabled }, children || value)); +}; +MenuItem.displayName = 'MenuItem'; +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbWVudS9tZW51LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDakMsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7QUFDdEMsT0FBTyxFQUFFLGFBQWEsRUFBRSxJQUFJLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFFOUMsSUFBTSxHQUFHLEdBQUcsVUFBQyxDQUFNLEVBQUUsQ0FBTSxJQUFLLE9BQUEsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLEVBQWpCLENBQWlC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vbnN0IHtcbiAgICB2YWx1ZSxcbiAgICBjaGlsZHJlbixcbiAgICBzZWxlY3RlZCxcbiAgICBvbkNsaWNrLFxuICAgIGFjdGl2ZSxcbiAgICBvbkhvdmVyLFxuICAgIHN0eWxlLFxuICAgIGRpc2FibGVkLFxuICB9ID0gcHJvcHNcblxuICByZXR1cm4gKFxuICAgIDxJdGVtUm9vdFxuICAgICAgc2VsZWN0ZWQ9e3NlbGVjdGVkfVxuICAgICAgYWN0aXZlPXthY3RpdmV9XG4gICAgICBzdHlsZT17c3R5bGV9XG4gICAgICBvbk1vdXNlRW50ZXI9eygpID0+IG9uSG92ZXIodmFsdWUpfVxuICAgICAgb25Gb2N1cz17KCkgPT4gb25Ib3Zlcih2YWx1ZSl9XG4gICAgICB0YWJJbmRleD17MH1cbiAgICAgIG9uQ2xpY2s9eygpID0+IG9uQ2xpY2sodmFsdWUpfVxuICAgICAgZGlzYWJsZWQ9e2Rpc2FibGVkfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCB2YWx1ZX1cbiAgICA8L0l0ZW1Sb290PlxuICApXG59XG5cbk1lbnVJdGVtLmRpc3BsYXlOYW1lID0gJ01lbnVJdGVtJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/menu/menu.spec.d.ts b/src/main/webapp/react-component/menu/menu.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/react-component/menu/menu.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/react-component/menu/menu.spec.js b/src/main/webapp/react-component/menu/menu.spec.js new file mode 100644 index 00000000000..2475c895cc6 --- /dev/null +++ b/src/main/webapp/react-component/menu/menu.spec.js @@ -0,0 +1,120 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Enzyme from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +import { expect } from 'chai'; +Enzyme.configure({ adapter: new Adapter() }); +import { Menu, MenuItem } from './menu'; +var shallow = Enzyme.shallow; +describe('

', function () { + it('should not throw an error with no children', function () { + // @ts-expect-error ts-migrate(2741) FIXME: Property 'onChange' is missing in type '{}' but re... Remove this comment to see the full error message + shallow(React.createElement(Menu, null)); + }); + it('should render the correct number of s', function () { + var wrapper = shallow(React.createElement(Menu, { value: "two", onChange: function () { } }, + React.createElement(MenuItem, { value: "one" }), + React.createElement(MenuItem, { value: "two" }), + React.createElement(MenuItem, { value: "three" }))); + expect(wrapper.find('MenuItem').length).to.equal(3); + }); + it('should have the correct selected', function () { + var wrapper = shallow(React.createElement(Menu, { value: "two", onChange: function () { } }, + React.createElement(MenuItem, { value: "one" }), + React.createElement(MenuItem, { value: "two" }), + React.createElement(MenuItem, { value: "three" }))); + expect(wrapper.find({ selected: true }).prop('value')).to.equal('two'); + }); + it('should select the right on click', function (done) { + var onChange = function (value) { + expect(value).to.equal('one'); + done(); + }; + var wrapper = shallow(React.createElement(Menu, { value: "two", onChange: onChange }, + React.createElement(MenuItem, { value: "one" }), + React.createElement(MenuItem, { value: "two" }), + React.createElement(MenuItem, { value: "three" }))); + wrapper.find({ value: 'one' }).prop('onClick')(); + }); + var table = [ + { + events: [], + state: 'two', + }, + { + events: ['ArrowDown'], + state: 'three', + }, + { + events: ['ArrowUp'], + state: 'one', + }, + { + events: ['ArrowDown', 'ArrowDown'], + state: 'one', + }, + { + events: ['ArrowDown', 'ArrowDown', 'ArrowDown'], + state: 'two', + }, + ]; + var mockEvent = function (code) { return ({ + code: code, + preventDefault: function () { }, + }); }; + table.forEach(function (_a) { + var events = _a.events, state = _a.state; + it("should equal value='".concat(state, "' after ").concat(JSON.stringify(events)), function (done) { + var onChange = function (value) { + expect(value).to.equal(state); + done(); + }; + var wrapper = shallow(React.createElement(Menu, { value: "two", onChange: onChange }, + React.createElement(MenuItem, { value: "one" }), + React.createElement(MenuItem, { value: "two" }), + React.createElement(MenuItem, { value: "three" }))); + var listener = wrapper.find('DocumentListener').prop('listener'); + events.forEach(function (event) { + ; + listener(mockEvent(event)); + }); + listener(mockEvent('Enter')); + }); + }); + it('should activate on hover', function () { + var wrapper = shallow(React.createElement(Menu, { value: "two", onChange: function () { } }, + React.createElement(MenuItem, { value: "one" }), + React.createElement(MenuItem, { value: "two" }), + React.createElement(MenuItem, { value: "three" }))); + expect(wrapper.state('active')).to.equal('two'); + wrapper.find({ value: 'one' }).prop('onHover')(); + expect(wrapper.state('active')).to.equal('one'); + }); + it('should support multi', function (done) { + var onChange = function (value) { + expect(value).to.deep.equal(['one', 'two']); + done(); + }; + var wrapper = shallow(React.createElement(Menu, { multi: true, value: ['one'], onChange: onChange }, + React.createElement(MenuItem, { value: "one" }), + React.createElement(MenuItem, { value: "two" }), + React.createElement(MenuItem, { value: "three" }))); + var selected = wrapper.find({ value: 'one' }).prop('selected'); + expect(selected).to.equal(true); + wrapper.find({ value: 'two' }).prop('onClick')(); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZW51L21lbnUuc3BlYy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUN6QixPQUFPLE1BQU0sTUFBTSxRQUFRLENBQUE7QUFDM0IsT0FBTyxPQUFPLE1B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0d29cIiAvPlxuICAgICAgICA8TWVudUl0ZW0gdmFsdWU9XCJ0aHJlZVwiIC8+XG4gICAgICA8L01lbnU+XG4gICAgKVxuICAgIGV4cGVjdCh3cmFwcGVyLnN0YXRlKCdhY3RpdmUnKSkudG8uZXF1YWwoJ3R3bycpXG4gICAgd3JhcHBlci5maW5kKHsgdmFsdWU6ICdvbmUnIH0pLnByb3AoJ29uSG92ZXInKSgpXG4gICAgZXhwZWN0KHdyYXBwZXIuc3RhdGUoJ2FjdGl2ZScpKS50by5lcXVhbCgnb25lJylcbiAgfSlcbiAgaXQoJ3Nob3VsZCBzdXBwb3J0IG11bHRpJywgKGRvbmUpID0+IHtcbiAgICBjb25zdCBvbkNoYW5nZSA9ICh2YWx1ZTogYW55KSA9PiB7XG4gICAgICBleHBlY3QodmFsdWUpLnRvLmRlZXAuZXF1YWwoWydvbmUnLCAndHdvJ10pXG4gICAgICBkb25lKClcbiAgICB9XG4gICAgY29uc3Qgd3JhcHBlciA9IHNoYWxsb3coXG4gICAgICA8TWVudSBtdWx0aSB2YWx1ZT17WydvbmUnXX0gb25DaGFuZ2U9e29uQ2hhbmdlfT5cbiAgICAgICAgPE1lbnVJdGVtIHZhbHVlPVwib25lXCIgLz5cbiAgICAgICAgPE1lbnVJdGVtIHZhbHVlPVwidHdvXCIgLz5cbiAgICAgICAgPE1lbnVJdGVtIHZhbHVlPVwidGhyZWVcIiAvPlxuICAgICAgPC9NZW51PlxuICAgIClcbiAgICBjb25zdCBzZWxlY3RlZCA9IHdyYXBwZXIuZmluZCh7IHZhbHVlOiAnb25lJyB9KS5wcm9wKCdzZWxlY3RlZCcpXG4gICAgZXhwZWN0KHNlbGVjdGVkKS50by5lcXVhbCh0cnVlKVxuICAgIHdyYXBwZXIuZmluZCh7IHZhbHVlOiAndHdvJyB9KS5wcm9wKCdvbkNsaWNrJykoKVxuICB9KVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-actions/container.d.ts b/src/main/webapp/react-component/metacard-actions/container.d.ts new file mode 100644 index 00000000000..8a810ff90d4 --- /dev/null +++ b/src/main/webapp/react-component/metacard-actions/container.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + result: LazyQueryResult; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/metacard-actions/container.js b/src/main/webapp/react-component/metacard-actions/container.js new file mode 100644 index 00000000000..823f3b02943 --- /dev/null +++ b/src/main/webapp/react-component/metacard-actions/container.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import _ from 'underscore'; +import MetacardActionsPresentation from './presentation'; +import { OverridableGetColumnOrder, aliasMap } from '../utils/export'; +var MetacardActions = function (props) { + var model = props.result; + var exportActions = _.sortBy(model.getExportActions().map(function (action) { return ({ + url: action.url + + "&columnOrder=".concat(OverridableGetColumnOrder.get()(), "&aliases=").concat(aliasMap), + title: action.displayName, + }); }), function (action) { return action.title.toLowerCase(); }); + var otherActions = _.sortBy(model.getOtherActions().map(function (action) { return ({ + url: action.url, + title: action.title, + }); }), function (action) { return action.title.toLowerCase(); }); + return (React.createElement(MetacardActionsPresentation, { model: model, exportActions: exportActions, otherActions: otherActions })); +}; +export default hot(module)(MetacardActions); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1hY3Rpb25zL2NvbnRhaW5lci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUVKLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLENBQUMsTUFBTSxZQUFZLENBQUE7QUFDMUIsT0FBTywyQkFBMkIsTUFBTSxnQkFBZ0IsQ0FBQTtBQUV4RCxPQUFPLEVBQUUseUJBQXlCLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFNckUsSUFBTSxlQUFlLEdBQUcsVUFBQyxLQUFZO0lBQ25DLElBQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUE7SUFFMUIsSUFBTSxhQUFhLEdBQUcsQ0FBQyxDQUFDLE1BQU0sQ0FDNUIsS0FBSyxDQUFDLGdCQUFnQixFQUFFLENBQUMsR0FBRyxDQUFDLFVBQUMsTUFBTSxJQUFLLE9BQUEsQ0FBQztRQUN4QyxHQUFHLEVBQ0QsTUFBTSxDQUFDLEdBQUc7WUFDVix1QkFBZ0IseUJBQXlCLENBQUMsR0FBRyxFQUFFLEVBQUUsc0JBQVksUUFBUSxDQUFFO1FBQ3pFLEtBQUssRUFBRSxNQUFNLENB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GlvbnMpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-actions/index.d.ts b/src/main/webapp/react-component/metacard-actions/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/metacard-actions/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/metacard-actions/index.js b/src/main/webapp/react-component/metacard-actions/index.js new file mode 100644 index 00000000000..498a142809b --- /dev/null +++ b/src/main/webapp/react-component/metacard-actions/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21ldGFjYXJkLWFjdGlvbnMvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUF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4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-actions/presentation.d.ts b/src/main/webapp/react-component/metacard-actions/presentation.d.ts new file mode 100644 index 00000000000..0478665311c --- /dev/null +++ b/src/main/webapp/react-component/metacard-actions/presentation.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + model: LazyQueryResult; + exportActions: any; + otherActions: any; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/metacard-actions/presentation.js b/src/main/webapp/react-component/metacard-actions/presentation.js new file mode 100644 index 00000000000..23f6200682e --- /dev/null +++ b/src/main/webapp/react-component/metacard-actions/presentation.js @@ -0,0 +1,61 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __makeTemplateObject } from "tslib"; +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import styled from 'styled-components'; +import { readableColor } from 'polished'; +import MapActions from '../map-actions'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: auto;\n height: 100%;\n padding: 0px ", ";\n"], ["\n overflow: auto;\n height: 100%;\n padding: 0px ", ";\n"])), function (props) { return props.theme.largeSpacing; }); +var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n text-align: left;\n font-size: ", ";\n font-weight: bolder;\n opacity: 0.8;\n"], ["\n text-align: left;\n font-size: ", ";\n font-weight: bolder;\n opacity: 0.8;\n"])), function (props) { return props.theme.largeFontSize; }); +var MapActionsDiv = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-top: ", ";\n"], ["\n margin-top: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }); +var Divider = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: ", ";\n margin: ", " 0px;\n background: ", ";\n opacity: 0.1;\n"], ["\n height: ", ";\n margin: ", " 0px;\n background: ", ";\n opacity: 0.1;\n"])), function (props) { return props.theme.borderRadius; }, function (props) { return props.theme.minimumSpacing; }, function (props) { return readableColor(props.theme.backgroundContent); }); +var Actions = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n padding: 0px ", ";\n"], ["\n padding: 0px ", ";\n"])), function (props) { return props.theme.largeSpacing; }); +var ActionLink = styled.a(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-top: ", ";\n cursor: pointer;\n display: block;\n"], ["\n margin-top: ", ";\n cursor: pointer;\n display: block;\n"])), function (props) { return props.theme.minimumSpacing; }); +var ExportActions = function (props) { + var exportActions = props.exportActions; + return (React.createElement(React.Fragment, null, + React.createElement(Header, null, "Export as:"), + React.createElement(Divider, null), + React.createElement(Actions, { "data-id": "export-actions-container" }, exportActions.map(function (exportAction) { + return (React.createElement(ActionLink, { href: exportAction.url, target: "_blank", key: exportAction.url }, exportAction.title)); + })))); +}; +var OtherActions = function (props) { + var otherActions = props.otherActions; + if (otherActions.length === 0) { + return null; + } + return (React.createElement(React.Fragment, null, + React.createElement(Header, null, "Various:"), + React.createElement(Divider, null), + React.createElement(Actions, { "data-id": "various-actions-container" }, otherActions.map(function (otherAction) { + return (React.createElement(ActionLink, { href: otherAction.url, target: "_blank", key: otherAction.url }, otherAction.title)); + })), + React.createElement(Divider, null))); +}; +var render = function (props) { + var exportActions = props.exportActions, otherActions = props.otherActions, model = props.model; + return (React.createElement(Root, null, + React.createElement(Divider, null), + React.createElement(ExportActions, { exportActions: exportActions }), + React.createElement(Divider, null), + React.createElement(MapActionsDiv, null, + React.createElement(MapActions, { model: model })), + React.createElement(OtherActions, { otherActions: otherActions }))); +}; +export default hot(module)(render); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1hY3Rpb25zL3ByZXNlbnRhdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTs7QUFFSixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7QUFDdEMsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUN4QyxPQUFPLFVBQVUsTUFBTSxnQkFBZ0IsQ0FBQTtBQVN2QyxJQUFNLElBQUksR0FBRyxNQUFNLENBQUMsR0FBRyxpSUFBQSx1REFHTixFQUFtQyxLQUNuRCxLQURnQixVQUFDLEtBQUssSUFBSyxPQUFBLEtBQUssQ0FBQyxLQUFLLENBQUMsWUFBWSxFQUF4QixDQUF3QixDQUNuRCxDQUFBO0FBQ0QsSUFBTSxNQUFNLEdBQUcsTUFBTSxDQUFDLEdB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1pZD1cInZhcmlvdXMtYWN0aW9ucy1jb250YWluZXJcIj5cbiAgICAgICAge290aGVyQWN0aW9ucy5tYXAoKG90aGVyQWN0aW9uOiBhbnkpID0+IHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPEFjdGlvbkxpbmtcbiAgICAgICAgICAgICAgaHJlZj17b3RoZXJBY3Rpb24udXJsfVxuICAgICAgICAgICAgICB0YXJnZXQ9XCJfYmxhbmtcIlxuICAgICAgICAgICAgICBrZXk9e290aGVyQWN0aW9uLnVybH1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAge290aGVyQWN0aW9uLnRpdGxlfVxuICAgICAgICAgICAgPC9BY3Rpb25MaW5rPlxuICAgICAgICAgIClcbiAgICAgICAgfSl9XG4gICAgICA8L0FjdGlvbnM+XG4gICAgICA8RGl2aWRlciAvPlxuICAgIDwvPlxuICApXG59XG5cbmNvbnN0IHJlbmRlciA9IChwcm9wczogUHJvcHMpID0+IHtcbiAgY29uc3QgeyBleHBvcnRBY3Rpb25zLCBvdGhlckFjdGlvbnMsIG1vZGVsIH0gPSBwcm9wc1xuICByZXR1cm4gKFxuICAgIDxSb290PlxuICAgICAgPERpdmlkZXIgLz5cbiAgICAgIDxFeHBvcnRBY3Rpb25zIGV4cG9ydEFjdGlvbnM9e2V4cG9ydEFjdGlvbnN9IC8+XG4gICAgICA8RGl2aWRlciAvPlxuICAgICAgPE1hcEFjdGlvbnNEaXY+XG4gICAgICAgIDxNYXBBY3Rpb25zIG1vZGVsPXttb2RlbH0gLz5cbiAgICAgIDwvTWFwQWN0aW9uc0Rpdj5cbiAgICAgIDxPdGhlckFjdGlvbnMgb3RoZXJBY3Rpb25zPXtvdGhlckFjdGlvbnN9IC8+XG4gICAgPC9Sb290PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKHJlbmRlcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-archive/container.d.ts b/src/main/webapp/react-component/metacard-archive/container.d.ts new file mode 100644 index 00000000000..3fbb82ab769 --- /dev/null +++ b/src/main/webapp/react-component/metacard-archive/container.d.ts @@ -0,0 +1,111 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +import { WithBackboneProps } from '../backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default<{ + results: LazyQueryResult[]; + } & WithBackboneProps, WithBackboneProps> | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default<{ + results: LazyQueryResult[]; + } & WithBackboneProps, WithBackboneProps>, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/metacard-archive/container.js b/src/main/webapp/react-component/metacard-archive/container.js new file mode 100644 index 00000000000..a2db3c45ef9 --- /dev/null +++ b/src/main/webapp/react-component/metacard-archive/container.js @@ -0,0 +1,126 @@ +import { __awaiter, __extends, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import withListenTo from '../backbone-container'; +import fetch from '../utils/fetch'; +import MetacardArchivePresentation from './presentation'; +import wreqr from '../../js/wreqr'; +var MetacardArchive = /** @class */ (function (_super) { + __extends(MetacardArchive, _super); + function MetacardArchive(props) { + var _this = _super.call(this, props) || this; + _this.onArchiveConfirm = function () { return __awaiter(_this, void 0, void 0, function () { + var body, res; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + body = JSON.stringify(this.state.collection.map(function (result) { + return result.plain.id; + })); + this.setState({ loading: true }); + return [4 /*yield*/, fetch('./internal/metacards', { + method: 'DELETE', + headers: { 'Content-Type': 'application/json' }, + body: body, + })]; + case 1: + res = _a.sent(); + if (!res.ok) { + this.setState({ loading: false }); + wreqr.vent.trigger('snack', { + message: 'Unable to archive the selected item(s).', + snackProps: { + alertProps: { + severity: 'error', + }, + }, + }); + return [2 /*return*/]; + } + setTimeout(function () { + _this.setState({ isDeleted: true, loading: false }); + _this.state.collection.forEach(function (result) { + result.plain.metacard.properties['metacard-tags'] = ['deleted']; + result.syncWithPlain(); + }); + _this.refreshResults(); + }, 2000); + return [2 /*return*/]; + } + }); + }); }; + _this.onRestoreConfirm = function () { return __awaiter(_this, void 0, void 0, function () { + var promises; + var _this = this; + return __generator(this, function (_a) { + this.setState({ loading: true }); + promises = this.state.collection.map(function (result) { + var metacardDeletedId = result.plain.metacard.properties['metacard.deleted.id']; + var metacardDeletedVersion = result.plain.metacard.properties['metacard.deleted.version']; + var storeId = result.plain.metacard.properties['source-id']; + return fetch("./internal/history/revert/".concat(metacardDeletedId, "/").concat(metacardDeletedVersion, "/").concat(storeId)); + }); + Promise.all(promises).then(function (responses) { + var isResponseOk = responses.every(function (resp) { + return resp.ok; + }); + if (!isResponseOk) { + _this.setState({ loading: false }); + wreqr.vent.trigger('snack', { + message: 'Unable to restore the selected item(s).', + snackProps: { + alertProps: { + severity: 'error', + }, + }, + }); + } + _this.state.collection.map(function (result) { + result.refreshDataOverNetwork(); + }); + setTimeout(function () { + _this.setState({ isDeleted: false, loading: false }); + }, 2000); + }); + return [2 /*return*/]; + }); + }); }; + _this.refreshResults = function () { + _this.state.collection.forEach(function (result) { + result.refreshDataOverNetwork(); + }); + }; + var collection = props.results; + var isDeleted = collection.some(function (result) { + return result.isDeleted(); + }); + _this.state = { + collection: collection, + isDeleted: isDeleted, + loading: false, + }; + return _this; + } + MetacardArchive.prototype.render = function () { + var _a = this.state, isDeleted = _a.isDeleted, loading = _a.loading; + return (React.createElement(MetacardArchivePresentation, { onArchiveConfirm: this.onArchiveConfirm, onRestoreConfirm: this.onRestoreConfirm, isDeleted: isDeleted, loading: loading })); + }; + return MetacardArchive; +}(React.Component)); +export default hot(module)(withListenTo(MetacardArchive)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1hcmNoaXZlL2NvbnRhaW5lci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFFdEMsT0FBTyxZQUFtQyxNQUFNLHVCQUF1QixDQUFBO0FBQ3ZFLE9BQU8sS0FBSyxNQUFNLGdCQUFnQixDQUFBO0FBQ2xDLE9BQU8sMkJBQTJCLE1BQU0sZ0JBQWdCLENBQUE7QUFDeEQsT0FBTyxLQUFLLE1BQU0sZ0JBQWdCLENBQUE7QUFTbEM7SUFBOEIsbUNBQTZCO0lBQ3pELHlCQUFZLEtB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VxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkod2l0aExpc3RlblRvKE1ldGFjYXJkQXJjaGl2ZSkpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-archive/index.d.ts b/src/main/webapp/react-component/metacard-archive/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/metacard-archive/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/metacard-archive/index.js b/src/main/webapp/react-component/metacard-archive/index.js new file mode 100644 index 00000000000..0bdadcbe104 --- /dev/null +++ b/src/main/webapp/react-component/metacard-archive/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21ldGFjYXJkLWFyY2hpdmUvaW5kZXg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dwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi9jb250YWluZXInXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-archive/presentation.d.ts b/src/main/webapp/react-component/metacard-archive/presentation.d.ts new file mode 100644 index 00000000000..d871af76e68 --- /dev/null +++ b/src/main/webapp/react-component/metacard-archive/presentation.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +type Props = { + onArchiveConfirm: () => Promise; + onRestoreConfirm: () => Promise; + isDeleted: boolean; + loading: boolean; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/metacard-archive/presentation.js b/src/main/webapp/react-component/metacard-archive/presentation.js new file mode 100644 index 00000000000..1dfb29d10e9 --- /dev/null +++ b/src/main/webapp/react-component/metacard-archive/presentation.js @@ -0,0 +1,97 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __awaiter, __generator } from "tslib"; +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import Button from '@mui/material/Button'; +import ProgressButton from '../progress-button'; +import { useDialog } from '../../component/dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogContentText from '@mui/material/DialogContentText'; +import DialogTitle from '@mui/material/DialogTitle'; +import useSnack from '../../component/hooks/useSnack'; +var render = function (props) { + var onArchiveConfirm = props.onArchiveConfirm, onRestoreConfirm = props.onRestoreConfirm, isDeleted = props.isDeleted, loading = props.loading; + var addSnack = useSnack(); + var dialogContext = useDialog(); + return (React.createElement(React.Fragment, null, + React.createElement(DialogTitle, null, + isDeleted ? 'Restore' : 'Delete', + " Item(s)"), + React.createElement(DialogContent, null, + React.createElement(DialogContentText, null, + "Are you sure you want to ", + isDeleted ? 'restore' : 'delete', + "?"), + React.createElement(DialogContentText, null, + "Doing so will ", + isDeleted ? 'include' : 'remove', + " the item(s)", + ' ', + isDeleted ? 'in' : 'from', + " future search results.")), + React.createElement(DialogActions, null, + React.createElement(Button, { onClick: function () { + dialogContext.setProps({ open: false }); + } }, "Cancel"), + React.createElement(ProgressButton, { dataId: "archive-confirm", onClick: function () { return __awaiter(void 0, void 0, void 0, function () { + var _a, err_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 7]); + dialogContext.setProps({ + onClose: function (_event, reason) { + if (reason === 'backdropClick' || + reason === 'escapeKeyDown') { + return; + } + dialogContext.setProps({ + open: false, + }); + }, + }); + if (!isDeleted) return [3 /*break*/, 2]; + return [4 /*yield*/, onRestoreConfirm()]; + case 1: + _a = _b.sent(); + return [3 /*break*/, 4]; + case 2: return [4 /*yield*/, onArchiveConfirm()]; + case 3: + _a = _b.sent(); + _b.label = 4; + case 4: + _a; + addSnack("Successfully ".concat(isDeleted ? "restored" : "deleted")); + return [3 /*break*/, 7]; + case 5: + err_1 = _b.sent(); + console.log('Error: ', err_1); + addSnack("An error occurred while trying to ".concat(isDeleted ? 'restore' : 'delete', "."), { + status: 'error', + }); + return [3 /*break*/, 7]; + case 6: + if (!loading) + dialogContext.setProps({ open: false }); + return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); }, variant: "contained", color: "primary", disabled: loading, loading: loading }, isDeleted ? 'Restore' : 'Delete')))); +}; +export default hot(module)(render); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1hcmNoaXZlL3ByZXNlbnRhdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTs7QUFFSixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxjQUFjLE1BQU0sb0JBQW9CLENBQUE7QUFDL0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ2xELE9BQU8sYUFBYSxNQUFNLDZCQUE2QixDQUFBO0FBQ3ZELE9BQU8sYUFBYSxNQUFNLDZCQUE2QixDQUFBO0FBQ3ZELE9BQU8saUJBQWlCLE1BQU0saUNBQWlDLENBQUE7QUFDL0QsT0FBTyxXQUFXLE1BQU0sMkJBQTJCLENBQUE7QUFDbkQsT0FBTyxRQUFRLE1BQU0sZ0NBQWdDLENBQUE7QUFTckQsSUFBTSxNQUFNLEdBQUcsVUFBQyxLQUFZO0lBQ2xCLElBQUEsZ0JBQWdCLEdBQTJDLEtBQUssaUJBQWhELEVBQUUsZ0JBQWdCLEdBQXlCLEtBQUssaUJBQTlCLEVBQUUsU0FBUyxHQUFjLEtBQUssVUFBbkIsRUFBRSxPQUFPLEdBQUssS0FBSyxRQUFWLENBQVU7SUFDeE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IEl0ZW0ocyk8L0RpYWxvZ1RpdGxlPlxuICAgICAgPERpYWxvZ0NvbnRlbnQ+XG4gICAgICAgIDxEaWFsb2dDb250ZW50VGV4dD5cbiAgICAgICAgICBBcmUgeW91IHN1cmUgeW91IHdhbnQgdG8ge2lzRGVsZXRlZCA/ICdyZXN0b3JlJyA6ICdkZWxldGUnfT9cbiAgICAgICAgPC9EaWFsb2dDb250ZW50VGV4dD5cbiAgICAgICAgPERpYWxvZ0NvbnRlbnRUZXh0PlxuICAgICAgICAgIERvaW5nIHNvIHdpbGwge2lzRGVsZXRlZCA/ICdpbmNsdWRlJyA6ICdyZW1vdmUnfSB0aGUgaXRlbShzKXsnICd9XG4gICAgICAgICAge2lzRGVsZXRlZCA/ICdpbicgOiAnZnJvbSd9IGZ1dHVyZSBzZWFyY2ggcmVzdWx0cy5cbiAgICAgICAgPC9EaWFsb2dDb250ZW50VGV4dD5cbiAgICAgIDwvRGlhbG9nQ29udGVudD5cbiAgICAgIDxEaWFsb2dBY3Rpb25zPlxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgZGlhbG9nQ29udGV4dC5zZXRQcm9wcyh7IG9wZW46IGZhbHNlIH0pXG4gICAgICAgICAgfX1cbiAgICAgICAgPlxuICAgICAgICAgIENhbmNlbFxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgPFByb2dyZXNzQnV0dG9uXG4gICAgICAgICAgZGF0YUlkPVwiYXJjaGl2ZS1jb25maXJtXCJcbiAgICAgICAgICBvbkNsaWNrPXthc3luYyAoKSA9PiB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBkaWFsb2dDb250ZXh0LnNldFByb3BzKHtcbiAgICAgICAgICAgICAgICBvbkNsb3NlOiAoX2V2ZW50LCByZWFzb24pID0+IHtcbiAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgcmVhc29uID09PSAnYmFja2Ryb3BDbGljaycgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVhc29uID09PSAnZXNjYXBlS2V5RG93bidcbiAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGRpYWxvZ0NvbnRleHQuc2V0UHJvcHMoe1xuICAgICAgICAgICAgICAgICAgICBvcGVuOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgaXNEZWxldGVkID8gYXdhaXQgb25SZXN0b3JlQ29uZmlybSgpIDogYXdhaXQgb25BcmNoaXZlQ29uZmlybSgpXG4gICAgICAgICAgICAgIGFkZFNuYWNrKGBTdWNjZXNzZnVsbHkgJHtpc0RlbGV0ZWQgPyBgcmVzdG9yZWRgIDogYGRlbGV0ZWRgfWApXG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgY29uc29sZS5sb2coJ0Vycm9yOiAnLCBlcnIpXG4gICAgICAgICAgICAgIGFkZFNuYWNrKFxuICAgICAgICAgICAgICAgIGBBbiBlcnJvciBvY2N1cnJlZCB3aGlsZSB0cnlpbmcgdG8gJHtcbiAgICAgICAgICAgICAgICAgIGlzRGVsZXRlZCA/ICdyZXN0b3JlJyA6ICdkZWxldGUnXG4gICAgICAgICAgICAgICAgfS5gLFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHN0YXR1czogJ2Vycm9yJyxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgIGlmICghbG9hZGluZykgZGlhbG9nQ29udGV4dC5zZXRQcm9wcyh7IG9wZW46IGZhbHNlIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfX1cbiAgICAgICAgICB2YXJpYW50PVwiY29udGFpbmVkXCJcbiAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgIGRpc2FibGVkPXtsb2FkaW5nfVxuICAgICAgICAgIGxvYWRpbmc9e2xvYWRpbmd9XG4gICAgICAgID5cbiAgICAgICAgICB7aXNEZWxldGVkID8gJ1Jlc3RvcmUnIDogJ0RlbGV0ZSd9XG4gICAgICAgIDwvUHJvZ3Jlc3NCdXR0b24+XG4gICAgICA8L0RpYWxvZ0FjdGlvbnM+XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkocmVuZGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-history/container.d.ts b/src/main/webapp/react-component/metacard-history/container.d.ts new file mode 100644 index 00000000000..cce31f0a677 --- /dev/null +++ b/src/main/webapp/react-component/metacard-history/container.d.ts @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + result: LazyQueryResult; +}; +type State = { + history: any; + selectedVersion: any; + loading: boolean; +}; +declare class MetacardHistory extends React.Component { + constructor(props: Props); + model: LazyQueryResult; + componentDidMount(): void; + getSourceId(): any; + loadData(): void; + onClick: (event: any) => void; + revertToSelectedVersion: () => Promise; + render(): JSX.Element; +} +declare const _default: typeof MetacardHistory; +export default _default; diff --git a/src/main/webapp/react-component/metacard-history/container.js b/src/main/webapp/react-component/metacard-history/container.js new file mode 100644 index 00000000000..c26b38a9acf --- /dev/null +++ b/src/main/webapp/react-component/metacard-history/container.js @@ -0,0 +1,135 @@ +import { __awaiter, __extends, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import fetch from '../utils/fetch'; +import moment from 'moment'; +import MetacardHistoryPresentation from './presentation'; +import { TypedUserInstance } from '../../component/singletons/TypedUser'; +import wreqr from '../../js/wreqr'; +var MetacardHistory = /** @class */ (function (_super) { + __extends(MetacardHistory, _super); + function MetacardHistory(props) { + var _this = _super.call(this, props) || this; + _this.onClick = function (event) { + var selectedVersion = event.currentTarget.getAttribute('data-id'); + _this.setState({ selectedVersion: selectedVersion }); + }; + _this.revertToSelectedVersion = function () { return __awaiter(_this, void 0, void 0, function () { + var id, revertId, res; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.setState({ loading: true }); + id = this.model.plain.id; + revertId = this.state.selectedVersion; + return [4 /*yield*/, fetch("./internal/history/revert/".concat(id, "/").concat(revertId, "/").concat(this.getSourceId()))]; + case 1: + res = _a.sent(); + if (!res.ok) { + this.setState({ loading: false }); + wreqr.vent.trigger('snack', { + message: 'Unable to revert to the selected version', + snackProps: { + alertProps: { + severity: 'error', + }, + }, + }); + return [2 /*return*/]; + } + this.model.plain.metacard.properties['metacard-tags'] = ['revision']; + this.model.syncWithPlain(); + this.model.refreshDataOverNetwork(); + setTimeout(function () { + //let solr flush + _this.model.syncWithPlain(); + if (_this.model.plain.metacard.properties['metacard-tags'].indexOf('revision') >= 0) { + ; + wreqr.vent.trigger('snack', { + message: "Waiting on Reverted Data: It's taking an unusually long time for the reverted data to come back. The item will be put in a revision-like state (read-only) until data returns.", + snackProps: { + alertProps: { + severity: 'warn', + }, + }, + }); + } + _this.loadData(); + }, 2000); + return [2 /*return*/]; + } + }); + }); }; + _this.model = props.result; + _this.state = { + history: [], + selectedVersion: undefined, + loading: true, + }; + return _this; + } + MetacardHistory.prototype.componentDidMount = function () { + this.loadData(); + }; + MetacardHistory.prototype.getSourceId = function () { + var metacardSourceId = this.model.plain.metacard.properties['source-id']; + var harvestedSourceId = this.model.plain.metacard.properties['ext.harvested-from']; + return harvestedSourceId || metacardSourceId; + }; + MetacardHistory.prototype.loadData = function () { + var _this = this; + setTimeout(function () { return __awaiter(_this, void 0, void 0, function () { + var id, res, history; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + id = this.model.plain.id; + return [4 /*yield*/, fetch("./internal/history/".concat(id, "/").concat(this.getSourceId()))]; + case 1: + res = _a.sent(); + if (!res.ok || res.status === 204) { + this.setState({ history: [], loading: false }); + return [2 /*return*/]; + } + return [4 /*yield*/, res.json()]; + case 2: + history = _a.sent(); + history.sort(function (historyItem1, historyItem2) { + return (moment.unix(historyItem2.versioned.seconds) - + moment.unix(historyItem1.versioned.seconds)); + }); + history.forEach(function (historyItem, index) { + historyItem.niceDate = TypedUserInstance.getMomentDate(moment + .unix(historyItem.versioned.seconds) + .valueOf()); + historyItem.versionNumber = history.length - index; + }); + this.setState({ history: history, loading: false }); + return [2 /*return*/]; + } + }); + }); }, 1000); + }; + MetacardHistory.prototype.render = function () { + var _a = this.state, history = _a.history, selectedVersion = _a.selectedVersion, loading = _a.loading; + return (React.createElement(MetacardHistoryPresentation, { onClick: this.onClick, revertToSelectedVersion: this.revertToSelectedVersion, history: history, selectedVersion: selectedVersion, loading: loading, canEdit: TypedUserInstance.canWrite(this.model) })); + }; + return MetacardHistory; +}(React.Component)); +export default hot(module)(MetacardHistory); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1oaXN0b3J5L2NvbnRhaW5lci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLE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blxuICAgICAgICBvbkNsaWNrPXt0aGlzLm9uQ2xpY2t9XG4gICAgICAgIHJldmVydFRvU2VsZWN0ZWRWZXJzaW9uPXt0aGlzLnJldmVydFRvU2VsZWN0ZWRWZXJzaW9ufVxuICAgICAgICBoaXN0b3J5PXtoaXN0b3J5fVxuICAgICAgICBzZWxlY3RlZFZlcnNpb249e3NlbGVjdGVkVmVyc2lvbn1cbiAgICAgICAgbG9hZGluZz17bG9hZGluZ31cbiAgICAgICAgY2FuRWRpdD17VHlwZWRVc2VySW5zdGFuY2UuY2FuV3JpdGUodGhpcy5tb2RlbCl9XG4gICAgICAvPlxuICAgIClcbiAgfVxufVxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoTWV0YWNhcmRIaXN0b3J5KVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-history/index.d.ts b/src/main/webapp/react-component/metacard-history/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/metacard-history/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/metacard-history/index.js b/src/main/webapp/react-component/metacard-history/index.js new file mode 100644 index 00000000000..429264148a7 --- /dev/null +++ b/src/main/webapp/react-component/metacard-history/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21ldGFjYXJkLWhpc3RvcnkvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sYUFBYSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi9jb250YWluZXInXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-history/presentation.d.ts b/src/main/webapp/react-component/metacard-history/presentation.d.ts new file mode 100644 index 00000000000..5d536882f7e --- /dev/null +++ b/src/main/webapp/react-component/metacard-history/presentation.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +type Props = { + onClick: (event: any) => void; + revertToSelectedVersion: () => void; + history: any; + selectedVersion: any; + loading: boolean; + canEdit: boolean; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/metacard-history/presentation.js b/src/main/webapp/react-component/metacard-history/presentation.js new file mode 100644 index 00000000000..d655dacd199 --- /dev/null +++ b/src/main/webapp/react-component/metacard-history/presentation.js @@ -0,0 +1,56 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __makeTemplateObject } from "tslib"; +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import Button from '@mui/material/Button'; +import styled from 'styled-components'; +import LinearProgress from '@mui/material/LinearProgress'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: auto;\n height: 100%;\n\n .metacardHistory-cell {\n float: left;\n padding: 10px;\n text-align: center;\n }\n\n ", ";\n"], ["\n overflow: auto;\n height: 100%;\n\n .metacardHistory-cell {\n float: left;\n padding: 10px;\n text-align: center;\n }\n\n ", ";\n"])), function (props) { + if (props.theme.screenBelow(props.theme.smallScreenSize)) { + return "\n .metacardHistory-body {\n max-height: none;\n overflow: auto;\n }\n \n .metacardHistory-cell {\n display: block;\n width: 100%;\n }\n "; + } + return; +}); +var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 50px;\n"], ["\n height: 50px;\n"]))); +var Row = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n transition: padding ", " linear;\n"], ["\n transition: padding ", " linear;\n" + // prettier-ignore +])), function (props) { return props.theme.transitionTime; }); +// prettier-ignore +var Body = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n max-height: calc(100% - ", "*2 - 20px - ", ");\n overflow: auto;\n overflow-x: hidden;\n width: 100%;\n cursor: pointer;\n display: table;\n content: \" \";\n > *,\n > * > td {\n display: inline-block;\n width: 100%;\n border-top: 1px solid rgba(255, 255, 255, 0.1);\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n }\n > *:hover,\n > *:hover > td {\n border-top: 1px solid rgba(255, 255, 255, 0.2);\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\n }\n"], ["\n max-height: calc(100% - ", "*2 - 20px - ", ");\n overflow: auto;\n overflow-x: hidden;\n width: 100%;\n cursor: pointer;\n display: table;\n content: \" \";\n > *,\n > * > td {\n display: inline-block;\n width: 100%;\n border-top: 1px solid rgba(255, 255, 255, 0.1);\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n }\n > *:hover,\n > *:hover > td {\n border-top: 1px solid rgba(255, 255, 255, 0.2);\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\n }\n"])), function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumSpacing; }); +var Version = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 20%;\n"], ["\n width: 20%;\n"]))); +var Date = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 50%;\n"], ["\n width: 50%;\n"]))); +var Modified = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 30%;\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n width: 30%;\n overflow: hidden;\n text-overflow: ellipsis;\n"]))); +var MetacardHistory = function (props) { + var onClick = props.onClick, revertToSelectedVersion = props.revertToSelectedVersion, history = props.history, selectedVersion = props.selectedVersion, loading = props.loading, canEdit = props.canEdit; + return loading ? (React.createElement(LinearProgress, { className: "w-full h-2" })) : (React.createElement(React.Fragment, null, + React.createElement(Root, null, + React.createElement(Header, null, + React.createElement(Row, null, + React.createElement(Version, { className: "metacardHistory-cell" }, "Version"), + React.createElement(Date, { className: "metacardHistory-cell" }, "Date"), + React.createElement(Modified, { className: "metacardHistory-cell" }, "Modified by"))), + React.createElement(Body, { className: "metacardHistory-body", "data-help": "This is the history of changes to\nthis item. If you have the right permissions, you can click one of the items in the list\nand then click 'Revert to Selected Version' to restore the item to that specific state. No history\nwill be lost in the process. Instead a new version will be created that is equal to the state you\nhave chosen." }, history.map(function (historyItem) { + return (React.createElement(Row, { className: "".concat(selectedVersion === historyItem.id && + ' bg-gray-600 bg-opacity-25'), "data-id": historyItem.id, key: historyItem.id, onClick: onClick }, + React.createElement(Version, { className: "metacardHistory-cell" }, historyItem.versionNumber), + React.createElement(Date, { className: "metacardHistory-cell" }, historyItem.niceDate), + React.createElement(Modified, { className: "metacardHistory-cell" }, historyItem.editedBy))); + })), + selectedVersion && canEdit && (React.createElement(Button, { fullWidth: true, className: "p-2", variant: "contained", color: "primary", onClick: revertToSelectedVersion }, "Revert to selected version"))))); +}; +export default hot(module)(MetacardHistory); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1oaXN0b3J5L3ByZXNlbnRhdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTs7QUFFSixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7QUFDdEMsT0FBTyxjQUFjLE1BQU0sOEJBQThCLENBQUE7QUFXekQsSUFBTSxJQUFJLEdBQUcsTUFBTSxDQUFDLEdBQUcsdU5BQUEsNklBVW5CLEVBZUQsS0FDRixLQWhCRyxVQUFDLEtBQUs7SUFDTixJQUFJLEtBQUssQ0FBQyxLQUFLLENBQUMsV0FBVyxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsZUFBZSxDQUFD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9yeUl0ZW0uaWQgJiZcbiAgICAgICAgICAgICAgICAgICcgYmctZ3JheS02MDAgYmctb3BhY2l0eS0yNSdcbiAgICAgICAgICAgICAgICB9YH1cbiAgICAgICAgICAgICAgICBkYXRhLWlkPXtoaXN0b3J5SXRlbS5pZH1cbiAgICAgICAgICAgICAgICBrZXk9e2hpc3RvcnlJdGVtLmlkfVxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8VmVyc2lvbiBjbGFzc05hbWU9XCJtZXRhY2FyZEhpc3RvcnktY2VsbFwiPlxuICAgICAgICAgICAgICAgICAge2hpc3RvcnlJdGVtLnZlcnNpb25OdW1iZXJ9XG4gICAgICAgICAgICAgICAgPC9WZXJzaW9uPlxuICAgICAgICAgICAgICAgIDxEYXRlIGNsYXNzTmFtZT1cIm1ldGFjYXJkSGlzdG9yeS1jZWxsXCI+XG4gICAgICAgICAgICAgICAgICB7aGlzdG9yeUl0ZW0ubmljZURhdGV9XG4gICAgICAgICAgICAgICAgPC9EYXRlPlxuICAgICAgICAgICAgICAgIDxNb2RpZmllZCBjbGFzc05hbWU9XCJtZXRhY2FyZEhpc3RvcnktY2VsbFwiPlxuICAgICAgICAgICAgICAgICAge2hpc3RvcnlJdGVtLmVkaXRlZEJ5fVxuICAgICAgICAgICAgICAgIDwvTW9kaWZpZWQ+XG4gICAgICAgICAgICAgIDwvUm93PlxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0pfVxuICAgICAgICA8L0JvZHk+XG4gICAgICAgIHtzZWxlY3RlZFZlcnNpb24gJiYgY2FuRWRpdCAmJiAoXG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgICAgICBjbGFzc05hbWU9XCJwLTJcIlxuICAgICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgb25DbGljaz17cmV2ZXJ0VG9TZWxlY3RlZFZlcnNpb259XG4gICAgICAgICAgPlxuICAgICAgICAgICAgUmV2ZXJ0IHRvIHNlbGVjdGVkIHZlcnNpb25cbiAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgKX1cbiAgICAgIDwvUm9vdD5cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShNZXRhY2FyZEhpc3RvcnkpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/archive-interaction.d.ts b/src/main/webapp/react-component/metacard-interactions/archive-interaction.d.ts new file mode 100644 index 00000000000..38fe3227060 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/archive-interaction.d.ts @@ -0,0 +1,5 @@ +/// +import { MetacardInteractionProps } from '.'; +export declare const ArchiveAction: (props: MetacardInteractionProps) => JSX.Element | null; +declare const _default: (props: MetacardInteractionProps) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/metacard-interactions/archive-interaction.js b/src/main/webapp/react-component/metacard-interactions/archive-interaction.js new file mode 100644 index 00000000000..f0688b3d2b1 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/archive-interaction.js @@ -0,0 +1,51 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import MetacardArchive from '../metacard-archive'; +import { MetacardInteraction } from './metacard-interactions'; +import { hot } from 'react-hot-loader'; +import { useDialog } from '../../component/dialog'; +import { Divider } from './metacard-interactions'; +import { TypedUserInstance } from '../../component/singletons/TypedUser'; +export var ArchiveAction = function (props) { + if (!props.model || props.model.length <= 0) { + return null; + } + var isDeleteAction = props.model.some(function (result) { + return !result.isDeleted(); + }); + var canPerformOnAll = props.model.every(function (result) { + return (TypedUserInstance.isAdmin(result) && + !result.isRemote() && + result.isDeleted() !== isDeleteAction); + }); + if (!canPerformOnAll) { + return null; + } + var dialogContext = useDialog(); + return (React.createElement(React.Fragment, null, + React.createElement(Divider, null), + React.createElement(MetacardInteraction, { onClick: function () { + props.onClose(); + if (props.model) { + dialogContext.setProps({ + children: React.createElement(MetacardArchive, { results: props.model }), + open: true, + }); + } + }, icon: isDeleteAction ? 'fa fa-trash' : 'fa fa-undo', text: isDeleteAction ? 'Delete' : 'Restore', help: isDeleteAction ? 'Move item(s) to trash' : 'Move item(s) from trash' }))); +}; +export default hot(module)(ArchiveAction); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJjaGl2ZS1pbnRlcmFjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvbWV0YWNhcmQtaW50ZXJhY3Rpb25zL2FyY2hpdmUtaW50ZXJhY3Rpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLGVBQWUsTUFBTSxxQkFBcUIsQ0FBQTtBQUVqRCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQTtBQUM3RCxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ2xELE9BQU8sRUFBRSx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WN0aW9uID8gJ2ZhIGZhLXRyYXNoJyA6ICdmYSBmYS11bmRvJ31cbiAgICAgICAgdGV4dD17aXNEZWxldGVBY3Rpb24gPyAnRGVsZXRlJyA6ICdSZXN0b3JlJ31cbiAgICAgICAgaGVscD17XG4gICAgICAgICAgaXNEZWxldGVBY3Rpb24gPyAnTW92ZSBpdGVtKHMpIHRvIHRyYXNoJyA6ICdNb3ZlIGl0ZW0ocykgZnJvbSB0cmFzaCdcbiAgICAgICAgfVxuICAgICAgLz5cbiAgICA8Lz5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShBcmNoaXZlQWN0aW9uKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/download-interaction.d.ts b/src/main/webapp/react-component/metacard-interactions/download-interaction.d.ts new file mode 100644 index 00000000000..0d169c46163 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/download-interaction.d.ts @@ -0,0 +1,4 @@ +/// +import { MetacardInteractionProps } from '.'; +declare const _default: ({ model }: MetacardInteractionProps) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/metacard-interactions/download-interaction.js b/src/main/webapp/react-component/metacard-interactions/download-interaction.js new file mode 100644 index 00000000000..76afee77486 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/download-interaction.js @@ -0,0 +1,49 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { MetacardInteraction } from './metacard-interactions'; +import { hot } from 'react-hot-loader'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { useDialog } from '../../component/dialog'; +import { useDownloadComponent } from '../../component/download/download'; +var isDownloadable = function (model) { + return model.some(function (result) { return result.getDownloadUrl(); }); +}; +var DownloadProduct = function (_a) { + var model = _a.model; + var setProps = useDialog().setProps; + var DownloadComponent = useDownloadComponent(); + if (!model || model.length === 0) { + return null; + } + if (!isDownloadable(model)) { + return null; + } + return (React.createElement(MetacardInteraction, { text: "Download", help: "Downloads the result's associated product directly to your machine.", icon: "fa fa-download", onClick: function () { + setProps({ + open: true, + children: React.createElement(DownloadComponent, { lazyResults: model }), + }); + } }, isRemoteResourceCached(model) && (React.createElement("span", { "data-help": "Displayed if the remote resource has been cached locally.", className: "download-cached" }, "Local")))); +}; +var isRemoteResourceCached = function (model) { + if (!model || model.length <= 0) + return false; + return (model[0].isResourceLocal && + model[0].plain.metacard.properties['source-id'] !== + StartupDataStore.Sources.localSourceId); +}; +export default hot(module)(DownloadProduct); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG93bmxvYWQtaW50ZXJhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21ldGFjYXJkLWludGVyYWN0aW9ucy9kb3dubG9hZC1pbnRlcmFjdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRTlCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBQzdELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUV0QyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQTtBQUNqRSxPQUFPLEVBQUUsU0FBUyxFQUFF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S5cIlxuICAgICAgICAgIGNsYXNzTmFtZT1cImRvd25sb2FkLWNhY2hlZFwiXG4gICAgICAgID5cbiAgICAgICAgICBMb2NhbFxuICAgICAgICA8L3NwYW4+XG4gICAgICApfVxuICAgIDwvTWV0YWNhcmRJbnRlcmFjdGlvbj5cbiAgKVxufVxuXG5jb25zdCBpc1JlbW90ZVJlc291cmNlQ2FjaGVkID0gKG1vZGVsOiBMYXp5UXVlcnlSZXN1bHRbXSk6IGJvb2xlYW4gPT4ge1xuICBpZiAoIW1vZGVsIHx8IG1vZGVsLmxlbmd0aCA8PSAwKSByZXR1cm4gZmFsc2VcblxuICByZXR1cm4gKFxuICAgIG1vZGVsWzBdLmlzUmVzb3VyY2VMb2NhbCAmJlxuICAgIG1vZGVsWzBdLnBsYWluLm1ldGFjYXJkLnByb3BlcnRpZXNbJ3NvdXJjZS1pZCddICE9PVxuICAgICAgU3RhcnR1cERhdGFTdG9yZS5Tb3VyY2VzLmxvY2FsU291cmNlSWRcbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShEb3dubG9hZFByb2R1Y3QpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/expand-interaction.d.ts b/src/main/webapp/react-component/metacard-interactions/expand-interaction.d.ts new file mode 100644 index 00000000000..2071ea94e6b --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/expand-interaction.d.ts @@ -0,0 +1,4 @@ +/// +import { MetacardInteractionProps } from '.'; +declare const _default: (props: MetacardInteractionProps) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/metacard-interactions/expand-interaction.js b/src/main/webapp/react-component/metacard-interactions/expand-interaction.js new file mode 100644 index 00000000000..1c79b30d6be --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/expand-interaction.js @@ -0,0 +1,33 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import { Link } from '../../component/link/link'; +import { Divider } from './metacard-interactions'; +var ExpandMetacard = function (props) { + if (!props.model || props.model.length !== 1) { + return null; + } + var id = props.model[0].plain.id; + var to = props.model[0].plain.metacardType === 'metacard.query' + ? "/search/".concat(id) + : "/metacards/".concat(id); + return (React.createElement(React.Fragment, null, + React.createElement(Button, { fullWidth: true, component: Link, to: to, variant: "text", color: "primary", target: "_blank" }, "Open Metacard View"), + React.createElement(Divider, null))); +}; +export default hot(module)(ExpandMetacard); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwYW5kLWludGVyYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1pbnRlcmFjdGlvbnMvZXhwYW5kLWludGVyYWN0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTtBQUNoRCxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0seUJBQXlCLENBQUE7QUFFakQsSUFB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zJ1xuXG5jb25zdCBFeHBhbmRNZXRhY2FyZCA9IChwcm9wczogTWV0YWNhcmRJbnRlcmFjdGlvblByb3BzKSA9PiB7XG4gIGlmICghcHJvcHMubW9kZWwgfHwgcHJvcHMubW9kZWwubGVuZ3RoICE9PSAxKSB7XG4gICAgcmV0dXJuIG51bGxcbiAgfVxuICBsZXQgaWQgPSBwcm9wcy5tb2RlbFswXS5wbGFpbi5pZFxuXG4gIGNvbnN0IHRvID1cbiAgICBwcm9wcy5tb2RlbFswXS5wbGFpbi5tZXRhY2FyZFR5cGUgPT09ICdtZXRhY2FyZC5xdWVyeSdcbiAgICAgID8gYC9zZWFyY2gvJHtpZH1gXG4gICAgICA6IGAvbWV0YWNhcmRzLyR7aWR9YFxuXG4gIHJldHVybiAoXG4gICAgPD5cbiAgICAgIDxCdXR0b25cbiAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgIGNvbXBvbmVudD17TGlua31cbiAgICAgICAgdG89e3RvfVxuICAgICAgICB2YXJpYW50PVwidGV4dFwiXG4gICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXG4gICAgICAgIHRhcmdldD1cIl9ibGFua1wiXG4gICAgICA+XG4gICAgICAgIE9wZW4gTWV0YWNhcmQgVmlld1xuICAgICAgPC9CdXR0b24+XG4gICAgICA8RGl2aWRlciAvPlxuICAgIDwvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKEV4cGFuZE1ldGFjYXJkKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.d.ts b/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.js b/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.js new file mode 100644 index 00000000000..d7787cfd32d --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.js @@ -0,0 +1,20 @@ +import React from 'react'; +import { HashRouter as Router } from 'react-router-dom'; +import ExpandInteraction from './expand-interaction'; +import Enzyme, { mount } from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +Enzyme.configure({ adapter: new Adapter() }); +import { expect } from 'chai'; +describe('smoke test', function () { + it('it handles undefined', function () { + var wrapper = mount(React.createElement(Router, null, + React.createElement(ExpandInteraction, { onClose: function () { }, model: undefined }))); + expect(wrapper.html()).to.eq(''); + }); + it('it handles empty array', function () { + var wrapper = mount(React.createElement(Router, null, + React.createElement(ExpandInteraction, { onClose: function () { }, model: [] }))); + expect(wrapper.html()).to.eq(''); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwYW5kLWludGVyYWN0aW9uLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21ldGFjYXJkLWludGVyYWN0aW9ucy9leHBhbmQtaW50ZXJhY3Rpb24uc3BlYy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQ3pCLE9BQU8sRUFBRSxVQUFVLElBQUksTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdkQsT0FBTyxpQkFBaUIsTUFBTSxzQkFBc0IsQ0FBQTtBQUNwRCxPQUFPLE1BQU0sRUFBRSxFQUFFLEtBQUssRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUN0QyxPQUFPLE9BQU8sTUFBTSxvQ0FBb0MsQ0FBQTtBQUN4RCxNQUFNLENBQUMsU0FBUyxDQUFDLEVBQUUsT0FBTyxFQUFFLElBQUksT0FBTyxFQUFFLEVBQ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UsIHsgbW91bnQgfSBmcm9tICdlbnp5bWUnXG5pbXBvcnQgQWRhcHRlciBmcm9tICdAd29qdGVrbWFqL2VuenltZS1hZGFwdGVyLXJlYWN0LTE3J1xuRW56eW1lLmNvbmZpZ3VyZSh7IGFkYXB0ZXI6IG5ldyBBZGFwdGVyKCkgfSlcbmltcG9ydCB7IGV4cGVjdCB9IGZyb20gJ2NoYWknXG5cbmRlc2NyaWJlKCdzbW9rZSB0ZXN0JywgKCkgPT4ge1xuICBpdCgnaXQgaGFuZGxlcyB1bmRlZmluZWQnLCAoKSA9PiB7XG4gICAgY29uc3Qgd3JhcHBlciA9IG1vdW50KFxuICAgICAgPFJvdXRlcj5cbiAgICAgICAgPEV4cGFuZEludGVyYWN0aW9uIG9uQ2xvc2U9eygpID0+IHt9fSBtb2RlbD17dW5kZWZpbmVkfSAvPlxuICAgICAgPC9Sb3V0ZXI+XG4gICAgKVxuICAgIGV4cGVjdCh3cmFwcGVyLmh0bWwoKSkudG8uZXEoJycpXG4gIH0pXG5cbiAgaXQoJ2l0IGhhbmRsZXMgZW1wdHkgYXJyYXknLCAoKSA9PiB7XG4gICAgY29uc3Qgd3JhcHBlciA9IG1vdW50KFxuICAgICAgPFJvdXRlcj5cbiAgICAgICAgPEV4cGFuZEludGVyYWN0aW9uIG9uQ2xvc2U9eygpID0+IHt9fSBtb2RlbD17W119IC8+XG4gICAgICA8L1JvdXRlcj5cbiAgICApXG4gICAgZXhwZWN0KHdyYXBwZXIuaHRtbCgpKS50by5lcSgnJylcbiAgfSlcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/export-interaction.d.ts b/src/main/webapp/react-component/metacard-interactions/export-interaction.d.ts new file mode 100644 index 00000000000..3f262a2b45a --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/export-interaction.d.ts @@ -0,0 +1,5 @@ +/// +import { MetacardInteractionProps } from '.'; +export declare const ExportActions: (props: MetacardInteractionProps) => JSX.Element | null; +declare const _default: (props: MetacardInteractionProps) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/metacard-interactions/export-interaction.js b/src/main/webapp/react-component/metacard-interactions/export-interaction.js new file mode 100644 index 00000000000..fadd5fee3f0 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/export-interaction.js @@ -0,0 +1,61 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import ResultsExport from '../results-export'; +import { MetacardInteraction } from './metacard-interactions'; +import { hot } from 'react-hot-loader'; +import { getExportResults } from '../utils/export/export'; +import { useDialogState } from '../../component/hooks/useDialogState'; +import Button from '@mui/material/Button'; +import Divider from '@mui/material/Divider'; +import { Dialog, DialogActions, DialogTitle } from '@mui/material'; +export var ExportActions = function (props) { + var _a = __read(React.useState(false), 2), exportSuccessful = _a[0], setExportSuccessful = _a[1]; + var _b = __read(React.useState(false), 2), loading = _b[0], setLoading = _b[1]; + var exportDialogState = useDialogState(); + if (!props.model || props.model.length <= 0) { + return null; + } + if (!props.model[0].parent) { + return null; + } + return (React.createElement(React.Fragment, null, + React.createElement(exportDialogState.MuiDialogComponents.Dialog, __assign({}, exportDialogState.MuiDialogProps, { disableEscapeKeyDown: true, onClose: function (event, reason) { + if (reason === 'backdropClick') { + return; + } + exportDialogState.MuiDialogProps.onClose(event, reason); + } }), + React.createElement(exportDialogState.MuiDialogComponents.DialogTitle, null, + React.createElement("div", { className: "flex flex-row items-center justify-between flex-nowrap w-full" }, "Export")), + React.createElement(Divider, null), + React.createElement(ResultsExport, { results: getExportResults(props.model), lazyQueryResults: props.model[0].parent, setExportSuccessful: setExportSuccessful, exportSuccessful: exportSuccessful, setLoading: setLoading, loading: loading, onClose: function () { + exportDialogState.handleClose(); + } })), + exportSuccessful && (React.createElement(Dialog, { open: exportSuccessful }, + React.createElement(DialogTitle, null, + React.createElement("div", { className: "flex flex-row items-center justify-between flex-nowrap w-full" }, "Export Successful!")), + React.createElement(Divider, null), + React.createElement(DialogActions, null, + React.createElement("div", { className: "pt-2", style: { display: 'flex', justifyContent: 'flex-end' } }, + React.createElement(Button, { color: "primary", onClick: function () { return setExportSuccessful(false); } }, "Close"))))), + React.createElement(MetacardInteraction, { onClick: function () { + props.onClose(); + exportDialogState.handleClick(); + }, icon: "fa fa-share", text: "Export as", help: "Starts the export process for the selected results." }))); +}; +export default hot(module)(ExportActions); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwb3J0LWludGVyYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1pbnRlcmFjdGlvbnMvZXhwb3J0LWludGVyYWN0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sYUFBYSxNQUFNLG1CQUFtQixDQUFBO0FBRTdDLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBQzdELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sc0NBQX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IVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9EaWFsb2dUaXRsZT5cbiAgICAgICAgICA8RGl2aWRlciAvPlxuICAgICAgICAgIDxEaWFsb2dBY3Rpb25zPlxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICBjbGFzc05hbWU9XCJwdC0yXCJcbiAgICAgICAgICAgICAgc3R5bGU9e3sgZGlzcGxheTogJ2ZsZXgnLCBqdXN0aWZ5Q29udGVudDogJ2ZsZXgtZW5kJyB9fVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBzZXRFeHBvcnRTdWNjZXNzZnVsKGZhbHNlKX1cbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIENsb3NlXG4gICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9EaWFsb2dBY3Rpb25zPlxuICAgICAgICA8L0RpYWxvZz5cbiAgICAgICl9XG5cbiAgICAgIDxNZXRhY2FyZEludGVyYWN0aW9uXG4gICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICBwcm9wcy5vbkNsb3NlKClcbiAgICAgICAgICBleHBvcnREaWFsb2dTdGF0ZS5oYW5kbGVDbGljaygpXG4gICAgICAgIH19XG4gICAgICAgIGljb249XCJmYSBmYS1zaGFyZVwiXG4gICAgICAgIHRleHQ9XCJFeHBvcnQgYXNcIlxuICAgICAgICBoZWxwPVwiU3RhcnRzIHRoZSBleHBvcnQgcHJvY2VzcyBmb3IgdGhlIHNlbGVjdGVkIHJlc3VsdHMuXCJcbiAgICAgIC8+XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoRXhwb3J0QWN0aW9ucylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/index.d.ts b/src/main/webapp/react-component/metacard-interactions/index.d.ts new file mode 100644 index 00000000000..c28595ba56d --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/index.d.ts @@ -0,0 +1,18 @@ +/// +import { Divider } from './metacard-interactions'; +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +export type MetacardInteractionProps = { + model?: LazyQueryResult[]; + onClose: () => void; +}; +export type Result = { + get: (key: any) => any; + isResource: () => boolean; + isRevision: () => boolean; + isDeleted: () => boolean; + isRemote: () => boolean; +}; +declare const _default: (props: MetacardInteractionProps) => JSX.Element; +export default _default; +export { Divider }; +export { MetacardInteraction } from './metacard-interactions'; diff --git a/src/main/webapp/react-component/metacard-interactions/index.js b/src/main/webapp/react-component/metacard-interactions/index.js new file mode 100644 index 00000000000..5d8e94a4511 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/index.js @@ -0,0 +1,31 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { Divider } from './metacard-interactions'; +import ExtensionPoints from '../../extension-points'; +var MetacardInteractions = function (props) { + return (React.createElement(React.Fragment, null, ExtensionPoints.metacardInteractions.map(function (Component, i) { + var componentName = Component.toString(); + var key = componentName + '-' + i; + return React.createElement(Component, __assign({ key: key }, props)); + }))); +}; +var Component = MetacardInteractions; +export default hot(module)(Component); +export { Divider }; +export { MetacardInteraction } from './metacard-interactions'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozL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ldGFjYXJkSW50ZXJhY3Rpb25zXG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKENvbXBvbmVudClcblxuZXhwb3J0IHsgRGl2aWRlciB9XG5cbmV4cG9ydCB7IE1ldGFjYXJkSW50ZXJhY3Rpb24gfSBmcm9tICcuL21ldGFjYXJkLWludGVyYWN0aW9ucydcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/metacard-interactions.d.ts b/src/main/webapp/react-component/metacard-interactions/metacard-interactions.d.ts new file mode 100644 index 00000000000..502c22f2935 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/metacard-interactions.d.ts @@ -0,0 +1,11 @@ +/// +export declare const Divider: () => JSX.Element; +type MetacardInteractionProps = { + help: string; + icon: string; + text: string; + onClick: (props: any) => void; + children?: any; +}; +export declare const MetacardInteraction: (props: MetacardInteractionProps) => JSX.Element; +export {}; diff --git a/src/main/webapp/react-component/metacard-interactions/metacard-interactions.js b/src/main/webapp/react-component/metacard-interactions/metacard-interactions.js new file mode 100644 index 00000000000..d3a2a6a29e7 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/metacard-interactions.js @@ -0,0 +1,32 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import MuiDivider from '@mui/material/Divider'; +export var Divider = function () { + return (React.createElement(MuiDivider, { variant: "fullWidth", orientation: "horizontal", className: "my-3" })); +}; +var InteractionIcon = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: center;\n width: ", ";\n display: inline-block;\n line-height: ", ";\n height: ", ";\n"], ["\n text-align: center;\n width: ", ";\n display: inline-block;\n line-height: ", ";\n height: ", ";\n"])), function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }); +var InteractionText = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n line-height: ", ";\n height: ", ";\n display: inline-block;\n"], ["\n line-height: ", ";\n height: ", ";\n display: inline-block;\n"])), function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }); +var Interaction = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n line-height: ", ";\n height: ", ";\n white-space: nowrap;\n padding: ", ";\n cursor: pointer;\n overflow: hidden;\n"], ["\n line-height: ", ";\n height: ", ";\n white-space: nowrap;\n padding: ", ";\n cursor: pointer;\n overflow: hidden;\n"])), function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { return "0px ".concat(props.theme.minimumSpacing); }); +export var MetacardInteraction = function (props) { + return (React.createElement(Interaction, { "data-id": "interaction-container", "data-help": props.help, onClick: function () { return props.onClick(props); } }, + React.createElement(InteractionIcon, { className: props.icon }), + React.createElement(InteractionText, null, props.text), + props.children)); +}; +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmQtaW50ZXJhY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1pbnRlcmFjdGlvbnMvbWV0YWNhcmQtaW50ZXJhY3Rpb25zLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSy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lsZHJlbj86IGFueVxufVxuXG5leHBvcnQgY29uc3QgTWV0YWNhcmRJbnRlcmFjdGlvbiA9IChwcm9wczogTWV0YWNhcmRJbnRlcmFjdGlvblByb3BzKSA9PiB7XG4gIHJldHVybiAoXG4gICAgPEludGVyYWN0aW9uXG4gICAgICBkYXRhLWlkPVwiaW50ZXJhY3Rpb24tY29udGFpbmVyXCJcbiAgICAgIGRhdGEtaGVscD17cHJvcHMuaGVscH1cbiAgICAgIG9uQ2xpY2s9eygpID0+IHByb3BzLm9uQ2xpY2socHJvcHMpfVxuICAgID5cbiAgICAgIDxJbnRlcmFjdGlvbkljb24gY2xhc3NOYW1lPXtwcm9wcy5pY29ufSAvPlxuICAgICAgPEludGVyYWN0aW9uVGV4dD57cHJvcHMudGV4dH08L0ludGVyYWN0aW9uVGV4dD5cbiAgICAgIHtwcm9wcy5jaGlsZHJlbn1cbiAgICA8L0ludGVyYWN0aW9uPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.d.ts b/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.d.ts new file mode 100644 index 00000000000..680e1c3579b --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.d.ts @@ -0,0 +1,5 @@ +/// +import { MetacardInteractionProps } from '.'; +export declare const OverwriteAction: (props: MetacardInteractionProps) => JSX.Element | null; +declare const _default: (props: MetacardInteractionProps) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.js b/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.js new file mode 100644 index 00000000000..28342033fb4 --- /dev/null +++ b/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.js @@ -0,0 +1,44 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { MetacardInteraction } from './metacard-interactions'; +import { hot } from 'react-hot-loader'; +import { useDialog } from '../../component/dialog'; +import { TypedUserInstance } from '../../component/singletons/TypedUser'; +import { MetacardOverwrite } from '../../component/metacard-overwrite/metacard-overwrite.view'; +export var OverwriteAction = function (props) { + if (!props.model || props.model.length !== 1) { + return null; + } + var result = props.model[0]; + if (result.isDeleted() || + result.isRevision() || + result.isRemote() || + !TypedUserInstance.canWrite(result)) { + return null; + } + var dialogContext = useDialog(); + return (React.createElement(MetacardInteraction, { onClick: function () { + props.onClose(); + if (props.model) { + dialogContext.setProps({ + children: (React.createElement(MetacardOverwrite, { title: 'Overwrite', lazyResult: result })), + open: true, + }); + } + }, icon: "fa fa-files-o", text: 'Overwrite', help: "This will overwrite the item content. To restore a previous content, you can click on 'File' in the toolbar, and then click 'Restore Archived Items'." })); +}; +export default hot(module)(OverwriteAction); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcndyaXRlLWludGVyYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1pbnRlcmFjdGlvbnMvb3ZlcndyaXRlLWludGVyYWN0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFOUIsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0seUJBQXlCLENBQUE7QUFDN0QsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNL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Wx0KVxuICApIHtcbiAgICByZXR1cm4gbnVsbFxuICB9XG5cbiAgY29uc3QgZGlhbG9nQ29udGV4dCA9IHVzZURpYWxvZygpXG4gIHJldHVybiAoXG4gICAgPE1ldGFjYXJkSW50ZXJhY3Rpb25cbiAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgcHJvcHMub25DbG9zZSgpXG4gICAgICAgIGlmIChwcm9wcy5tb2RlbCkge1xuICAgICAgICAgIGRpYWxvZ0NvbnRleHQuc2V0UHJvcHMoe1xuICAgICAgICAgICAgY2hpbGRyZW46IChcbiAgICAgICAgICAgICAgPE1ldGFjYXJkT3ZlcndyaXRlIHRpdGxlPXsnT3ZlcndyaXRlJ30gbGF6eVJlc3VsdD17cmVzdWx0fSAvPlxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIG9wZW46IHRydWUsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgfX1cbiAgICAgIGljb249XCJmYSBmYS1maWxlcy1vXCJcbiAgICAgIHRleHQ9eydPdmVyd3JpdGUnfVxuICAgICAgaGVscD1cIlRoaXMgd2lsbCBvdmVyd3JpdGUgdGhlIGl0ZW0gY29udGVudC4gVG8gcmVzdG9yZSBhIHByZXZpb3VzIGNvbnRlbnQsIHlvdSBjYW4gY2xpY2sgb24gJ0ZpbGUnIGluIHRoZSB0b29sYmFyLCBhbmQgdGhlbiBjbGljayAnUmVzdG9yZSBBcmNoaXZlZCBJdGVtcycuXCJcbiAgICAvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKE92ZXJ3cml0ZUFjdGlvbilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-quality/container.d.ts b/src/main/webapp/react-component/metacard-quality/container.d.ts new file mode 100644 index 00000000000..a85fb212e95 --- /dev/null +++ b/src/main/webapp/react-component/metacard-quality/container.d.ts @@ -0,0 +1,20 @@ +import * as React from 'react'; +import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult'; +type Props = { + result: LazyQueryResult; +}; +type State = { + attributeValidation: any; + metacardValidation: any; + loading: boolean; +}; +declare class MetacardQuality extends React.Component { + constructor(props: Props); + model: LazyQueryResult; + componentDidMount(): void; + getData: (res: any, type: string) => any; + checkForDuplicate: (metacardValidation: any) => void; + render(): JSX.Element; +} +declare const _default: typeof MetacardQuality; +export default _default; diff --git a/src/main/webapp/react-component/metacard-quality/container.js b/src/main/webapp/react-component/metacard-quality/container.js new file mode 100644 index 00000000000..3fbbbea899a --- /dev/null +++ b/src/main/webapp/react-component/metacard-quality/container.js @@ -0,0 +1,100 @@ +import { __awaiter, __extends, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import fetch from '../utils/fetch'; +import MetacardQualityPresentation from './presentation'; +import wreqr from '../../js/wreqr'; +var MetacardQuality = /** @class */ (function (_super) { + __extends(MetacardQuality, _super); + function MetacardQuality(props) { + var _this = _super.call(this, props) || this; + _this.getData = function (res, type) { + if (!res.ok) { + ; + wreqr.vent.trigger('snack', { + message: "Unable to retrieve ".concat(type, " Validation Issues"), + snackProps: { + alertProps: { + severity: 'warn', + }, + }, + }); + return []; + } + else { + return res.json(); + } + }; + _this.checkForDuplicate = function (metacardValidation) { + metacardValidation.forEach(function (validationIssue) { + if (validationIssue.message.startsWith('Duplicate data found in catalog')) { + var idRegEx = new RegExp('{(.*?)}'); + var excutedregex = idRegEx.exec(validationIssue.message); + if (excutedregex) { + validationIssue.duplicate = { + ids: excutedregex[1].split(', '), + message: validationIssue.message.split(excutedregex[1]), + }; + } + } + }); + }; + _this.model = props.result; + _this.state = { + attributeValidation: [], + metacardValidation: [], + loading: true, + }; + return _this; + } + MetacardQuality.prototype.componentDidMount = function () { + var _this = this; + setTimeout(function () { + var metacardId = _this.model.plain.id; + var storeId = _this.model.plain.metacard.properties['source-id']; + var attributeValidationRes = fetch("./internal/metacard/".concat(metacardId, "/").concat(storeId, "/attribute/validation")); + var metacardValidationRes = fetch("./internal/metacard/".concat(metacardId, "/").concat(storeId, "/validation")); + Promise.all([attributeValidationRes, metacardValidationRes]).then(function (responses) { return __awaiter(_this, void 0, void 0, function () { + var attributeValidation, metacardValidation; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.getData(responses[0], 'Attribute')]; + case 1: + attributeValidation = _a.sent(); + return [4 /*yield*/, this.getData(responses[1], 'Metacard')]; + case 2: + metacardValidation = _a.sent(); + this.checkForDuplicate(metacardValidation); + this.setState({ + attributeValidation: attributeValidation, + metacardValidation: metacardValidation, + loading: false, + }); + return [2 /*return*/]; + } + }); + }); }); + }, 1000); + }; + MetacardQuality.prototype.render = function () { + var _a = this.state, attributeValidation = _a.attributeValidation, metacardValidation = _a.metacardValidation, loading = _a.loading; + return (React.createElement(MetacardQualityPresentation, { attributeValidation: attributeValidation, metacardValidation: metacardValidation, loading: loading })); + }; + return MetacardQuality; +}(React.Component)); +export default hot(module)(MetacardQuality); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1xdWFsaXR5L2NvbnRhaW5lci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsR0FBRy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bGlkYXRpb25Jc3N1ZS5tZXNzYWdlLnNwbGl0KGV4Y3V0ZWRyZWdleFsxXSksXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSlcbiAgfVxuICByZW5kZXIoKSB7XG4gICAgY29uc3QgeyBhdHRyaWJ1dGVWYWxpZGF0aW9uLCBtZXRhY2FyZFZhbGlkYXRpb24sIGxvYWRpbmcgfSA9IHRoaXMuc3RhdGVcbiAgICByZXR1cm4gKFxuICAgICAgPE1ldGFjYXJkUXVhbGl0eVByZXNlbnRhdGlvblxuICAgICAgICBhdHRyaWJ1dGVWYWxpZGF0aW9uPXthdHRyaWJ1dGVWYWxpZGF0aW9ufVxuICAgICAgICBtZXRhY2FyZFZhbGlkYXRpb249e21ldGFjYXJkVmFsaWRhdGlvbn1cbiAgICAgICAgbG9hZGluZz17bG9hZGluZ31cbiAgICAgIC8+XG4gICAgKVxuICB9XG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShNZXRhY2FyZFF1YWxpdHkpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-quality/index.d.ts b/src/main/webapp/react-component/metacard-quality/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/metacard-quality/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/metacard-quality/index.js b/src/main/webapp/react-component/metacard-quality/index.js new file mode 100644 index 00000000000..f33ee2b3b8a --- /dev/null +++ b/src/main/webapp/react-component/metacard-quality/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L21ldGFjYXJkLXF1YWxpdHkvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sYUFBYSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi9jb250YWluZXInXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/metacard-quality/presentation.d.ts b/src/main/webapp/react-component/metacard-quality/presentation.d.ts new file mode 100644 index 00000000000..6ee8255ccb0 --- /dev/null +++ b/src/main/webapp/react-component/metacard-quality/presentation.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +type Props = { + metacardValidation: any; + attributeValidation: any; + loading: boolean; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/metacard-quality/presentation.js b/src/main/webapp/react-component/metacard-quality/presentation.js new file mode 100644 index 00000000000..f1501186a4c --- /dev/null +++ b/src/main/webapp/react-component/metacard-quality/presentation.js @@ -0,0 +1,79 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __makeTemplateObject } from "tslib"; +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import styled from 'styled-components'; +import LinearProgress from '@mui/material/LinearProgress'; +var Header = styled.h4(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: left;\n padding: ", ";\n"], ["\n text-align: left;\n padding: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }); +var Root = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n overflow: auto;\n\n table {\n width: 100%;\n text-align: center;\n margin-bottom: 40px;\n }\n\n th {\n width: 33%;\n text-align: center;\n }\n\n tr:nth-of-type(even) {\n background: rgba(0, 0, 0, 0.1);\n }\n\n th,\n td {\n padding: 10px;\n }\n\n td + td {\n border-left: 1px solid rgba(100, 100, 100, 0.3);\n }\n\n tbody {\n border-top: 1px solid rgba(100, 100, 100, 0.3);\n }\n"], ["\n overflow: auto;\n\n table {\n width: 100%;\n text-align: center;\n margin-bottom: 40px;\n }\n\n th {\n width: 33%;\n text-align: center;\n }\n\n tr:nth-of-type(even) {\n background: rgba(0, 0, 0, 0.1);\n }\n\n th,\n td {\n padding: 10px;\n }\n\n td + td {\n border-left: 1px solid rgba(100, 100, 100, 0.3);\n }\n\n tbody {\n border-top: 1px solid rgba(100, 100, 100, 0.3);\n }\n"]))); +var MetacardValidation = function (props) { + var metacardValidation = props.metacardValidation; + return (React.createElement(React.Fragment, null, + React.createElement(Header, null, "Metacard Validation Issues"), + React.createElement("table", null, + React.createElement("thead", null, + React.createElement("th", null, "Attribute"), + React.createElement("th", null, "Severity"), + React.createElement("th", null, "Message")), + React.createElement("tbody", null, metacardValidation.map(function (validation, i) { + return (React.createElement("tr", { "data-id": "metacard-validation-issue-container", key: i }, + React.createElement("td", { "data-id": "attribute-value" }, validation.attributes.map(function (attribute, j) { + return React.createElement("div", { key: attribute + j }, attribute); + })), + React.createElement("td", { "data-id": "severity-value" }, validation.severity), + validation.duplicate ? (React.createElement("td", { "data-id": "message-value" }, + validation.duplicate.message[0], + validation.duplicate.ids.map(function (id, index) { + return (React.createElement(React.Fragment, { key: id }, + React.createElement("a", { href: "#metacards/".concat(id) }, id), + index !== validation.duplicate.ids.length - 1 + ? ', ' + : '')); + }), + validation.duplicate.message[1])) : (React.createElement("td", { "data-id": "message-value" }, validation.message)))); + }))))); +}; +var AttributeValidation = function (props) { + var attributeValidation = props.attributeValidation; + return (React.createElement(React.Fragment, null, + React.createElement(Header, null, "Attribute Validation Issues"), + React.createElement("table", null, + React.createElement("thead", null, + React.createElement("th", null, "Attribute"), + React.createElement("th", null, "Warnings"), + React.createElement("th", null, "Errors")), + React.createElement("tbody", null, attributeValidation.map(function (validation, i) { + return (React.createElement("tr", { "data-id": "attribute-validation-issue-container", key: i }, + React.createElement("td", { "data-id": "attribute-value" }, validation.attribute), + React.createElement("td", { "data-id": "warnings-value" }, validation.warnings.map(function (warning, j) { + return React.createElement("div", { key: warning + j }, warning); + })), + React.createElement("td", { "data-id": "errors-value" }, validation.errors.map(function (error, j) { + return React.createElement("div", { key: error + j }, error); + })))); + }))))); +}; +var render = function (props) { + var metacardValidation = props.metacardValidation, attributeValidation = props.attributeValidation, loading = props.loading; + return loading ? (React.createElement(React.Fragment, null, + React.createElement(LinearProgress, { className: "w-full h-2" }))) : (React.createElement(React.Fragment, null, + React.createElement(Root, null, + metacardValidation.length > 0 ? (React.createElement(MetacardValidation, { metacardValidation: metacardValidation })) : (React.createElement(Header, null, "No Metacard Validation Issues to Report")), + attributeValidation.length > 0 ? (React.createElement(AttributeValidation, { attributeValidation: attributeValidation })) : (React.createElement(Header, null, "No Attribute Validation Issues to Report"))))); +}; +export default hot(module)(render); +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9tZXRhY2FyZC1xdWFsaXR5L3ByZXNlbnRhdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTs7QUFFSixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sbUJBQW1CLENBQUE7QUFDdEMsT0FBTyxjQUFjLE1BQU0sOEJBQThCLENBQUE7QUFRekQsSUFBTSxNQUFNLEdBQUcsTUFBTSxDQUFDLEVBQUUsOEdBQUEsb0NBRVgsRUFBcUMsS0FDakQsS0FEWSxVQUFDLEtBQUssSUFBSyxPQUFBLEtBQUssQ0FBQyxLQUFLLENBQUMsY0FBYyxFQUExQixDQUEwQixDQUNqRCxDQUFBO0FBRUQsSUFBTSxJQUFJLEdBQUcsTUFBTSxDQUFDLEdBQUcsMmVBQUEsd2FBOEJ0QixJQUFBLENBQUE7QUFFRCxJQUFNLGtCQUFrQixHQUFHLFVBQUMsS0FBVTtJQUNwQyxJQUFNLGtCQUFrQixHQUFHLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQTtJQUNuRCxPQUFPLENBQ0w7UUFDRSxvQkFBQyxNQUFNLHFDQUFvQztRQU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iPlxuICAgICAgICAgICAgICAgICAgICB7dmFsaWRhdGlvbi5kdXBsaWNhdGUubWVzc2FnZVswXX1cbiAgICAgICAgICAgICAgICAgICAge3ZhbGlkYXRpb24uZHVwbGljYXRlLmlkcy5tYXAoKGlkOiBhbnksIGluZGV4OiBudW1iZXIpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgPFJlYWN0LkZyYWdtZW50IGtleT17aWR9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPXtgI21ldGFjYXJkcy8ke2lkfWB9PntpZH08L2E+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtpbmRleCAhPT0gdmFsaWRhdGlvbi5kdXBsaWNhdGUuaWRzLmxlbmd0aCAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICcsICdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICcnfVxuICAgICAgICAgICAgICAgICAgICAgICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICB7dmFsaWRhdGlvbi5kdXBsaWNhdGUubWVzc2FnZVsxXX1cbiAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICAgIDx0ZCBkYXRhLWlkPVwibWVzc2FnZS12YWx1ZVwiPnt2YWxpZGF0aW9uLm1lc3NhZ2V9PC90ZD5cbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0pfVxuICAgICAgICA8L3Rib2R5PlxuICAgICAgPC90YWJsZT5cbiAgICA8Lz5cbiAgKVxufVxuXG5jb25zdCBBdHRyaWJ1dGVWYWxpZGF0aW9uID0gKHByb3BzOiBhbnkpID0+IHtcbiAgY29uc3QgYX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m1hcCgoZXJyb3I6IHN0cmluZywgajogbnVtYmVyKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiA8ZGl2IGtleT17ZXJyb3IgKyBqfT57ZXJyb3J9PC9kaXY+XG4gICAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0pfVxuICAgICAgICA8L3Rib2R5PlxuICAgICAgPC90YWJsZT5cbiAgICA8Lz5cbiAgKVxufVxuXG5jb25zdCByZW5kZXIgPSAocHJvcHM6IFByb3BzKSA9PiB7XG4gIGNvbnN0IHsgbWV0YWNhcmRWYWxpZGF0aW9uLCBhdHRyaWJ1dGVWYWxpZGF0aW9uLCBsb2FkaW5nIH0gPSBwcm9wc1xuICByZXR1cm4gbG9hZGluZyA/IChcbiAgICA8PlxuICAgICAgPExpbmVhclByb2dyZXNzIGNsYXNzTmFtZT1cInctZnVsbCBoLTJcIiAvPlxuICAgIDwvPlxuICApIDogKFxuICAgIDw+XG4gICAgICA8Um9vdD5cbiAgICAgICAge21ldGFjYXJkVmFsaWRhdGlvbi5sZW5ndGggPiAwID8gKFxuICAgICAgICAgIDxNZXRhY2FyZFZhbGlkYXRpb24gbWV0YWNhcmRWYWxpZGF0aW9uPXttZXRhY2FyZFZhbGlkYXRpb259IC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPEhlYWRlcj5ObyBNZXRhY2FyZCBWYWxpZGF0aW9uIElzc3VlcyB0byBSZXBvcnQ8L0hlYWRlcj5cbiAgICAgICAgKX1cblxuICAgICAgICB7YXR0cmlidXRlVmFsaWRhdGlvbi5sZW5ndGggPiAwID8gKFxuICAgICAgICAgIDxBdHRyaWJ1dGVWYWxpZGF0aW9uIGF0dHJpYnV0ZVZhbGlkYXRpb249e2F0dHJpYnV0ZVZhbGlkYXRpb259IC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPEhlYWRlcj5ObyBBdHRyaWJ1dGUgVmFsaWRhdGlvbiBJc3N1ZXMgdG8gUmVwb3J0PC9IZWFkZXI+XG4gICAgICAgICl9XG4gICAgICA8L1Jvb3Q+XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkocmVuZGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/popup-preview/index.d.ts b/src/main/webapp/react-component/popup-preview/index.d.ts new file mode 100644 index 00000000000..82001c75ea4 --- /dev/null +++ b/src/main/webapp/react-component/popup-preview/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './popup-preview'; diff --git a/src/main/webapp/react-component/popup-preview/index.js b/src/main/webapp/react-component/popup-preview/index.js new file mode 100644 index 00000000000..d73c5ea42c1 --- /dev/null +++ b/src/main/webapp/react-component/popup-preview/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './popup-preview'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6W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d2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cblxuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vcG9wdXAtcHJldmlldydcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/popup-preview/popup-preview.d.ts b/src/main/webapp/react-component/popup-preview/popup-preview.d.ts new file mode 100644 index 00000000000..b87406c6fc5 --- /dev/null +++ b/src/main/webapp/react-component/popup-preview/popup-preview.d.ts @@ -0,0 +1,27 @@ +/// +export type MetacardType = { + getPreview: Function; + getTitle: Function; + id: String; + toJSON: () => any; +}; +export type LocationType = { + left: number; + top: number; +}; +type Props = { + map: any; + selectionInterface: { + getSelectedResults: () => { + models: MetacardType[]; + } & Array; + getActiveSearchResults: () => { + models: MetacardType[]; + } & Array; + clearSelectedResults: () => void; + addSelectedResult: (metacard: MetacardType) => void; + }; + mapModel: any; +}; +declare const _default: (props: Props) => JSX.Element | null; +export default _default; diff --git a/src/main/webapp/react-component/popup-preview/popup-preview.js b/src/main/webapp/react-component/popup-preview/popup-preview.js new file mode 100644 index 00000000000..835af44c71c --- /dev/null +++ b/src/main/webapp/react-component/popup-preview/popup-preview.js @@ -0,0 +1,163 @@ +import { __makeTemplateObject, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import styled from 'styled-components'; +import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: 'Inconsolata', 'Lucida Console', monospace;\n background: ", ";\n display: block;\n width: auto;\n height: auto;\n font-size: ", ";\n position: absolute;\n text-align: left;\n padding: 4px;\n max-height: 290px;\n max-width: 50%;\n transform: translate(-51.25%, -100%);\n\n &::before {\n top: 100%;\n content: ' ';\n border-top: 15px solid ", ";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0;\n width: 0;\n left: 50%;\n position: absolute;\n pointer-events: none;\n }\n"], ["\n font-family: 'Inconsolata', 'Lucida Console', monospace;\n background: ", ";\n display: block;\n width: auto;\n height: auto;\n font-size: ", ";\n position: absolute;\n text-align: left;\n padding: 4px;\n max-height: 290px;\n max-width: 50%;\n transform: translate(-51.25%, -100%);\n\n &::before {\n top: 100%;\n content: ' ';\n border-top: 15px solid ", ";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0;\n width: 0;\n left: 50%;\n position: absolute;\n pointer-events: none;\n }\n"])), function (props) { return props.theme.backgroundModal; }, function (props) { return props.theme.mediumFontSize; }, function (props) { return props.theme.backgroundModal; }); +var Title = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 20px;\n margin: 0;\n padding: 2px 6px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: 'Open Sans', arial, sans-serif;\n"], ["\n font-size: 20px;\n margin: 0;\n padding: 2px 6px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: 'Open Sans', arial, sans-serif;\n"]))); +var Preview = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n min-width: 200px;\n height: 100%;\n min-height: 15px;\n max-height: 250px;\n padding: 2px;\n background-color: ", ";\n border: 1px solid;\n overflow-y: auto;\n overflow-x: auto;\n text-overflow: ellipsis;\n"], ["\n position: relative;\n min-width: 200px;\n height: 100%;\n min-height: 15px;\n max-height: 250px;\n padding: 2px;\n background-color: ", ";\n border: 1px solid;\n overflow-y: auto;\n overflow-x: auto;\n text-overflow: ellipsis;\n"])), function (props) { return props.theme.backgroundContent; }); +var PreviewText = styled.p(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: 'Open Sans', arial, sans-serif;\n font-size: 14px;\n padding: 2px 4px;\n white-space: pre-line;\n"], ["\n font-family: 'Open Sans', arial, sans-serif;\n font-size: 14px;\n padding: 2px 4px;\n white-space: pre-line;\n"]))); +var ClusterList = styled.ul(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin: 1px;\n padding: 1px;\n border: 1px solid;\n"], ["\n margin: 1px;\n padding: 1px;\n border: 1px solid;\n"]))); +var ClusterTitle = styled.li(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: 18px;\n margin: 0;\n padding: 2px 6px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: 'Open Sans', arial, sans-serif;\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n font-size: 18px;\n margin: 0;\n padding: 2px 6px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: 'Open Sans', arial, sans-serif;\n\n &:hover {\n background-color: ", ";\n }\n"])), function (props) { return props.theme.backgroundSlideout; }); +var NO_PREVIEW = 'No preview text available.'; +var STATUS_OK = 200; +var TOP_OFFSET = 60; +var DRAG_SENSITIVITY = 10; +var getLeft = function (location) { + return location ? location.left + 'px' : 0; +}; +var getTop = function (location) { + return location ? location.top - TOP_OFFSET + 'px' : 0; +}; +var extractPreviewText = function (responseHtml) { + var htmlElement = document.createElement('html'); + htmlElement.innerHTML = responseHtml; + var bodyElement = htmlElement.querySelector('body'); + if (bodyElement) { + bodyElement.innerHTML = bodyElement.innerHTML.replace(//gm, '\n'); + return bodyElement.innerText; + } + return NO_PREVIEW; +}; +var getPreviewText = function (_a) { + var targetMetacard = _a.targetMetacard, setPreviewText = _a.setPreviewText; + if (targetMetacard) { + var url = targetMetacard.getPreview(); + var xhr_1 = new XMLHttpRequest(); + xhr_1.addEventListener('load', function () { + if (xhr_1.status === STATUS_OK) { + var previewText = extractPreviewText(xhr_1.responseText); + setPreviewText(previewText !== NO_PREVIEW ? previewText : undefined); + } + }); + xhr_1.open('GET', url); + xhr_1.send(); + } + else { + setPreviewText(undefined); + } +}; +/** + * Get the pixel location from a metacard(s) + * returns { left, top } relative to the map view + */ +var getLocation = function (map, target) { + if (target) { + var location_1 = map.getWindowLocationsOfResults(target); + var coordinates = location_1 ? location_1[0] : undefined; + return coordinates + ? { left: coordinates[0], top: coordinates[1] } + : undefined; + } + return; +}; +var HookPopupPreview = function (props) { + var map = props.map, selectionInterface = props.selectionInterface; + var _a = __read(React.useState(undefined), 2), location = _a[0], setLocation = _a[1]; + var dragRef = React.useRef(0); + var _b = __read(React.useState(false), 2), open = _b[0], setOpen = _b[1]; + var _c = __read(React.useState(undefined), 2), previewText = _c[0], setPreviewText = _c[1]; + var listenTo = useBackbone().listenTo; + var getTarget = function () { + return selectionInterface.getSelectedResults(); + }; + var popupAnimationFrameId; + var startPopupAnimating = function (map) { + if (getTarget().length !== 0) { + popupAnimationFrameId = window.requestAnimationFrame(function () { + var location = getLocation(map, getTarget()); + setLocation(location); + startPopupAnimating(map); + }); + } + }; + var handleCameraMoveEnd = function () { + if (getTarget().length !== 0) { + window.cancelAnimationFrame(popupAnimationFrameId); + } + }; + React.useEffect(function () { + listenTo(selectionInterface.getSelectedResults(), 'reset add remove', function () { + if (selectionInterface.getSelectedResults().length === 1) { + getPreviewText({ + targetMetacard: selectionInterface.getSelectedResults().models[0], + setPreviewText: setPreviewText, + }); + } + setLocation(getLocation(map, getTarget())); + if (selectionInterface.getSelectedResults().length !== 0) { + setOpen(true); + } + }); + map.onMouseTrackingForPopup(function () { + dragRef.current = 0; + }, function () { + dragRef.current += 1; + }, function (_event, mapTarget) { + if (DRAG_SENSITIVITY > dragRef.current) { + setOpen(mapTarget.mapTarget !== undefined); + } + }); + map.onCameraMoveStart(function () { + startPopupAnimating(map); + }); + map.onCameraMoveEnd(function () { + handleCameraMoveEnd(); + }); + return function () { + window.cancelAnimationFrame(popupAnimationFrameId); + }; + }, []); + if (!open) { + return null; + } + return (React.createElement(Root, { style: { left: getLeft(location), top: getTop(location) } }, (function () { + if (selectionInterface.getSelectedResults().length === 1) { + var metacardJSON = selectionInterface + .getSelectedResults() + .models[0].toJSON(); + return (React.createElement(React.Fragment, null, + React.createElement(Title, null, metacardJSON.metacard.properties.title), + previewText && (React.createElement(Preview, null, + React.createElement(PreviewText, null, previewText))))); + } + else if (selectionInterface.getSelectedResults().length > 1) { + return (React.createElement(ClusterList, null, selectionInterface + .getSelectedResults() + .map(function (clusterModel) { + return (React.createElement(ClusterTitle, { key: clusterModel.id, onClick: function () { + selectionInterface.clearSelectedResults(); + selectionInterface.addSelectedResult(clusterModel); + } }, clusterModel.toJSON().metacard.properties.title)); + }))); + } + return; + })())); +}; +export default hot(module)(HookPopupPreview); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wdXAtcHJldmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvcG9wdXAtcHJldmlldy9wb3B1cC1wcmV2aWV3LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scURBQXFELEN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0IG1ldGFjYXJkSlNPTiA9IHNlbGVjdGlvbkludGVyZmFjZVxuICAgICAgICAgICAgLmdldFNlbGVjdGVkUmVzdWx0cygpXG4gICAgICAgICAgICAubW9kZWxzWzBdLnRvSlNPTigpXG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgIDxUaXRsZT57bWV0YWNhcmRKU09OLm1ldGFjYXJkLnByb3BlcnRpZXMudGl0bGV9PC9UaXRsZT5cbiAgICAgICAgICAgICAge3ByZXZpZXdUZXh0ICYmIChcbiAgICAgICAgICAgICAgICA8UHJldmlldz5cbiAgICAgICAgICAgICAgICAgIDxQcmV2aWV3VGV4dD57cHJldmlld1RleHR9PC9QcmV2aWV3VGV4dD5cbiAgICAgICAgICAgICAgICA8L1ByZXZpZXc+XG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8Lz5cbiAgICAgICAgICApXG4gICAgICAgIH0gZWxzZSBpZiAoc2VsZWN0aW9uSW50ZXJmYWNlLmdldFNlbGVjdGVkUmVzdWx0cygpLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPENsdXN0ZXJMaXN0PlxuICAgICAgICAgICAgICB7c2VsZWN0aW9uSW50ZXJmYWNlXG4gICAgICAgICAgICAgICAgLmdldFNlbGVjdGVkUmVzdWx0cygpXG4gICAgICAgICAgICAgICAgLm1hcCgoY2x1c3Rlck1vZGVsOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgIDxDbHVzdGVyVGl0bGVcbiAgICAgICAgICAgICAgICAgICAgICBrZXk9e2NsdXN0ZXJNb2RlbC5pZH1cbiAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb25JbnRlcmZhY2UuY2xlYXJTZWxlY3RlZFJlc3VsdHMoKVxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uSW50ZXJmYWNlLmFkZFNlbGVjdGVkUmVzdWx0KGNsdXN0ZXJNb2RlbClcbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAge2NsdXN0ZXJNb2RlbC50b0pTT04oKS5tZXRhY2FyZC5wcm9wZXJ0aWVzLnRpdGxlfVxuICAgICAgICAgICAgICAgICAgICA8L0NsdXN0ZXJUaXRsZT5cbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgIDwvQ2x1c3Rlckxpc3Q+XG4gICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVyblxuICAgICAgfSkoKX1cbiAgICA8L1Jvb3Q+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoSG9va1BvcHVwUHJldmlldylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/portal/index.d.ts b/src/main/webapp/react-component/portal/index.d.ts new file mode 100644 index 00000000000..7438d5026be --- /dev/null +++ b/src/main/webapp/react-component/portal/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './portal'; diff --git a/src/main/webapp/react-component/portal/index.js b/src/main/webapp/react-component/portal/index.js new file mode 100644 index 00000000000..562d3a7a5c5 --- /dev/null +++ b/src/main/webapp/react-component/portal/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './portal'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3BvcnRhbC9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxVQUFVLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL3BvcnRhbCdcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/portal/portal.d.ts b/src/main/webapp/react-component/portal/portal.d.ts new file mode 100644 index 00000000000..828be943e35 --- /dev/null +++ b/src/main/webapp/react-component/portal/portal.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +declare const Portal: ({ children, }: { + children: React.ReactNode; +}) => React.ReactPortal; +export default Portal; diff --git a/src/main/webapp/react-component/portal/portal.js b/src/main/webapp/react-component/portal/portal.js new file mode 100644 index 00000000000..0b668730d2a --- /dev/null +++ b/src/main/webapp/react-component/portal/portal.js @@ -0,0 +1,43 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +var Portal = function (_a) { + var children = _a.children; + /* + Why this wrapper? Well, styled-components doesn't have a good + abstraction for making a portal yet, so we keep the portal lightly styled + in a wrapper where we feed styled-components. Hence the overflow set + to visible. This allows us to accomplish pretty much exactly what + we want. + */ + var _b = __read(React.useState(document.createElement('react-portal')), 1), wrapper = _b[0]; + React.useEffect(function () { + wrapper.style.position = 'absolute'; + wrapper.style.left = '0px'; + wrapper.style.top = '0px'; + wrapper.style.display = 'block'; + wrapper.style.overflow = 'visible'; + wrapper.style.zIndex = '103'; // use creation / append order from here on out + document.body.appendChild(wrapper); + return function () { + wrapper.remove(); + }; + }, []); + return ReactDOM.createPortal(children, wrapper); +}; +export default Portal; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9ydGFsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9wb3J0YWwvcG9ydGFsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sS0FBSyxRQUFRLE1BQU0sV0FBVyxDQUFBO0FBRXJDLElBQU0sTUFBTSxHQUFHLFVBQUMsRUFJZjtRQUhDLFFBQVEsY0FBQTtJQUlSOzs7Oz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JhcHBlcilcbn1cblxuZXhwb3J0IGRlZmF1bHQgUG9ydGFsXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/progress-button/index.d.ts b/src/main/webapp/react-component/progress-button/index.d.ts new file mode 100644 index 00000000000..f9297c759ef --- /dev/null +++ b/src/main/webapp/react-component/progress-button/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './progress-button'; diff --git a/src/main/webapp/react-component/progress-button/index.js b/src/main/webapp/react-component/progress-button/index.js new file mode 100644 index 00000000000..dbec64f0c76 --- /dev/null +++ b/src/main/webapp/react-component/progress-button/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './progress-button'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3Byb2dyZXNzLWJ1dHRvbi9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE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IHsgZGVmYXVsdCB9IGZyb20gJy4vcHJvZ3Jlc3MtYnV0dG9uJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/progress-button/progress-button.d.ts b/src/main/webapp/react-component/progress-button/progress-button.d.ts new file mode 100644 index 00000000000..e8bd23f41da --- /dev/null +++ b/src/main/webapp/react-component/progress-button/progress-button.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { LinearProgressProps } from '@mui/material/LinearProgress'; +import { ButtonProps } from '@mui/material/Button'; +import { CircularProgressProps } from '@mui/material/CircularProgress'; +type Props = { + children: React.ReactNode; + style?: React.CSSProperties; + disabled?: boolean; + loading?: boolean; + variant?: ButtonProps['variant']; + color?: ButtonProps['color']; + size?: ButtonProps['size']; + progressVariant?: 'circular' | 'linear'; + onClick?: React.MouseEventHandler; + buttonProps?: ButtonProps; + linearProgressProps?: LinearProgressProps; + circularProgressProps?: CircularProgressProps; + className?: string; + dataId?: string; +}; +declare const ProgressButton: (props: Props) => JSX.Element; +export default ProgressButton; diff --git a/src/main/webapp/react-component/progress-button/progress-button.js b/src/main/webapp/react-component/progress-button/progress-button.js new file mode 100644 index 00000000000..89d04b8aa62 --- /dev/null +++ b/src/main/webapp/react-component/progress-button/progress-button.js @@ -0,0 +1,30 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import LinearProgress from '@mui/material/LinearProgress'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; +var ProgressButton = function (props) { + var children = props.children, style = props.style, disabled = props.disabled, loading = props.loading, variant = props.variant, color = props.color, size = props.size, progressVariant = props.progressVariant, onClick = props.onClick, buttonProps = props.buttonProps, linearProgressProps = props.linearProgressProps, circularProgressProps = props.circularProgressProps, className = props.className, dataId = props.dataId; + var Loading = function () { + return progressVariant === 'circular' ? (React.createElement(CircularProgress, __assign({ size: 24, className: "absolute" }, circularProgressProps))) : (React.createElement(LinearProgress, __assign({ className: "absolute w-full h-full opacity-25" }, linearProgressProps))); + }; + return (React.createElement(Button, __assign({ "data-id": dataId, style: style, variant: variant || 'contained', color: color || 'primary', size: size, className: "relative ".concat(className), disabled: loading || disabled, onClick: onClick }, buttonProps), + children, + loading && React.createElement(Loading, null))); +}; +export default ProgressButton; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZ3Jlc3MtYnV0dG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9wcm9ncmVzcy1idXR0b24vcHJvZ3Jlc3MtYnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sY0FFTixNQUFNLDhCQUE4QixDQUFBO0FBQ3JDLE9BQU8sTUFBdUIsTUFBTSxzQkFBc0IsQ0FBQTtBQUMxRCxPQUFPLG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W50PXt2YXJpYW50IHx8ICdjb250YWluZWQnfVxuICAgICAgY29sb3I9e2NvbG9yIHx8ICdwcmltYXJ5J31cbiAgICAgIHNpemU9e3NpemV9XG4gICAgICBjbGFzc05hbWU9e2ByZWxhdGl2ZSAke2NsYXNzTmFtZX1gfVxuICAgICAgZGlzYWJsZWQ9e2xvYWRpbmcgfHwgZGlzYWJsZWR9XG4gICAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgICAgey4uLmJ1dHRvblByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbn1cbiAgICAgIHtsb2FkaW5nICYmIDxMb2FkaW5nIC8+fVxuICAgIDwvQnV0dG9uPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IFByb2dyZXNzQnV0dG9uXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.d.ts b/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.d.ts new file mode 100644 index 00000000000..6c1ae6873ea --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.d.ts @@ -0,0 +1,6 @@ +/// +type Props = { + closeDropdown: () => void; +}; +declare const _default: ({ closeDropdown }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.js b/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.js new file mode 100644 index 00000000000..48cd708ee97 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.js @@ -0,0 +1,51 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import SortSelections from './sort-selections'; +import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook'; +import Grid from '@mui/material/Grid'; +import Button from '@mui/material/Button'; +import user from '../../component/singletons/user-instance'; +var getResultSort = function () { + return user.get('user').get('preferences').get('resultSort') || []; +}; +var PermanentSearchSort = function (_a) { + var closeDropdown = _a.closeDropdown; + var _b = __read(React.useState(getResultSort()), 2), sorts = _b[0], setSorts = _b[1]; + var _c = __read(React.useState(sorts.length > 0), 2), hasSort = _c[0], setHasSort = _c[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:resultSort', function () { + var resultSort = getResultSort(); + setHasSort(resultSort !== undefined && resultSort.length > 0); + setSorts(resultSort); + }); + }, []); + var removeSort = function () { + user.get('user').get('preferences').set('resultSort', ''); + user.get('user').get('preferences').savePreferences(); + closeDropdown(); + }; + var saveSort = function () { + user + .get('user') + .get('preferences') + .set('resultSort', sorts.length === 0 ? undefined : sorts); + user.get('user').get('preferences').savePreferences(); + closeDropdown(); + // once again, something is weird with arrays and backbone? + user.get('user').get('preferences').trigger('change:resultSort'); + }; + return (React.createElement("div", { "data-id": "results-sort-container", className: "min-w-120" }, + React.createElement("div", { className: "pb-2" }, + React.createElement(SortSelections, { value: sorts, onChange: function (newVal) { + setSorts(newVal); + } })), + React.createElement(Grid, { container: true, direction: "row", alignItems: "center", wrap: "nowrap" }, + hasSort ? (React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Button, { "data-id": "remove-all-results-sorts-button", fullWidth: true, onClick: removeSort, variant: "text", color: "secondary" }, "Remove Sort"))) : null, + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Button, { "data-id": "save-results-sorts-button", fullWidth: true, onClick: saveSort, variant: "contained", color: "primary" }, "Save Sort"))))); +}; +export default hot(module)(PermanentSearchSort); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXBoZW1lcmFsLXNlYXJjaC1zb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9xdWVyeS1zb3J0LXNlbGVjdGlvbi9lcGhlbWVyYWwtc2VhcmNoLXNvcnQudHN4Il0sIm5hbWVzIjpbXSwibWF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zb3J0cy1idXR0b25cIlxuICAgICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgICAgICBvbkNsaWNrPXtzYXZlU29ydH1cbiAgICAgICAgICAgIHZhcmlhbnQ9XCJjb250YWluZWRcIlxuICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICBTYXZlIFNvcnRcbiAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgPC9HcmlkPlxuICAgICAgPC9HcmlkPlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFBlcm1hbmVudFNlYXJjaFNvcnQpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.d.ts b/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.d.ts new file mode 100644 index 00000000000..8b95ad346f2 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.d.ts @@ -0,0 +1,7 @@ +/// +import { QueryType } from '../../js/model/Query'; +type Props = { + model: QueryType; +}; +declare const _default: ({ model }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.js b/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.js new file mode 100644 index 00000000000..eebd374db7d --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.js @@ -0,0 +1,32 @@ +import { __read } from "tslib"; +import * as React from 'react'; +import _cloneDeep from 'lodash.clonedeep'; +import { hot } from 'react-hot-loader'; +import SortSelections from './sort-selections'; +import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook'; +/** + * If we don't do this, we might muck with how backbone determines changes. That's because we might modify the object directly, then update it. + * So then it would see the set, determine there are no changes, and weird things would be afoot. + * @param param0 + */ +var getCopyOfSortsFromModel = function (_a) { + var model = _a.model; + return _cloneDeep(model.get('sorts')); +}; +var PermanentSearchSort = function (_a) { + var model = _a.model; + var _b = __read(React.useState(getCopyOfSortsFromModel({ model: model })), 2), sorts = _b[0], setSorts = _b[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(model, 'change:sorts', function () { + setSorts(getCopyOfSortsFromModel({ model: model })); + }); + }, []); + return (React.createElement(SortSelections, { value: sorts, onChange: function (newVal) { + model.set('sorts', newVal); + // something to do with this being an array causes the event not to trigger, I think? + model.trigger('change:sorts'); + } })); +}; +export default hot(module)(PermanentSearchSort); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVybWFuZW50LXNlYXJjaC1zb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9xdWVyeS1zb3J0LXNlbGVjdGlvbi9wZXJtYW5lbnQtc2VhcmNoLXNvcnQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLFVBQVUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN6QyxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxjQUFjLE1BQU0sbUJBQW1CLENBQUE7QUFDOUMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFEQUFxRCxDQUFBO0FBT2pGOzs7O0dBSUc7QUFDSCxJQUFNLHVCQUF1QixHQUFHLFVBQUMsRUFBZ0I7UUFBZCxLQUFLLFdBQUE7SUFDdEMsT0FBTyxVQUFVLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFBO0FBQ3ZDLENBQUMsQ0FBQTtBQUVELElBQU0sbUJBQW1CLEdBQUcsVUFBQyxFQUFnQjtRQUFkLEtBQUssV0FBQTtJQUM1QixJQUF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HMnLCAoKSA9PiB7XG4gICAgICBzZXRTb3J0cyhnZXRDb3B5T2ZTb3J0c0Zyb21Nb2RlbCh7IG1vZGVsIH0pKVxuICAgIH0pXG4gIH0sIFtdKVxuICByZXR1cm4gKFxuICAgIDxTb3J0U2VsZWN0aW9uc1xuICAgICAgdmFsdWU9e3NvcnRzfVxuICAgICAgb25DaGFuZ2U9eyhuZXdWYWwpID0+IHtcbiAgICAgICAgbW9kZWwuc2V0KCdzb3J0cycsIG5ld1ZhbClcbiAgICAgICAgLy8gc29tZXRoaW5nIHRvIGRvIHdpdGggdGhpcyBiZWluZyBhbiBhcnJheSBjYXVzZXMgdGhlIGV2ZW50IG5vdCB0byB0cmlnZ2VyLCBJIHRoaW5rP1xuICAgICAgICBtb2RlbC50cmlnZ2VyKCdjaGFuZ2U6c29ydHMnKVxuICAgICAgfX1cbiAgICAvPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFBlcm1hbmVudFNlYXJjaFNvcnQpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/query-sort-selection/sort-item.d.ts b/src/main/webapp/react-component/query-sort-selection/sort-item.d.ts new file mode 100644 index 00000000000..3a7afa0f293 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/sort-item.d.ts @@ -0,0 +1,13 @@ +/// +import { SortItemType, Option } from './sort-selections'; +type Props = { + sortItem: SortItemType; + attributeOptions: Option[]; + directionOptions: Option[]; + updateAttribute: (attribute: string) => void; + updateDirection: (direction: string) => void; + onRemove: () => void; + showRemove?: boolean; +}; +declare const SortItem: ({ sortItem, attributeOptions, directionOptions, updateAttribute, updateDirection, onRemove, showRemove, }: Props) => JSX.Element; +export default SortItem; diff --git a/src/main/webapp/react-component/query-sort-selection/sort-item.js b/src/main/webapp/react-component/query-sort-selection/sort-item.js new file mode 100644 index 00000000000..329c1b91e01 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/sort-item.js @@ -0,0 +1,49 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { isDirectionalSort } from './sort-selection-helpers'; +import TextField from '@mui/material/TextField'; +import Autocomplete from '@mui/material/Autocomplete'; +import Grid from '@mui/material/Grid'; +import Button from '@mui/material/Button'; +import Swath from '../../component/swath/swath'; +var SortItem = function (_a) { + var sortItem = _a.sortItem, attributeOptions = _a.attributeOptions, directionOptions = _a.directionOptions, updateAttribute = _a.updateAttribute, updateDirection = _a.updateDirection, onRemove = _a.onRemove, showRemove = _a.showRemove; + return (React.createElement(React.Fragment, null, + React.createElement("div", null, + React.createElement(Grid, { container: true, direction: "row", wrap: "nowrap", alignItems: "center" }, + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Autocomplete, { "data-id": "sort-type-autocomplete", size: "small", fullWidth: true, options: attributeOptions, getOptionLabel: function (option) { return option.label; }, isOptionEqualToValue: function (option, value) { + return option.value === value.value; + }, onChange: function (_e, newValue) { + var newProperty = newValue.value; + updateAttribute(newProperty); + }, disableClearable: true, value: sortItem.attribute, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { variant: "outlined" }))); } })), + showRemove ? (React.createElement(Grid, { item: true, className: "pl-2" }, + React.createElement(Button, { "data-id": "remove-sort-button", onClick: onRemove, variant: "text", color: "primary" }, "Remove"))) : null), + isDirectionalSort(sortItem.attribute.value) ? (React.createElement(Grid, { container: true, alignItems: "stretch", direction: "row", wrap: "nowrap", className: "pt-2" }, + React.createElement(Grid, { item: true }, + React.createElement(Swath, { className: "w-1 h-full" })), + React.createElement(Grid, { item: true, className: "w-full pl-2" }, + React.createElement(Autocomplete, { "data-id": "sort-order-autocomplete", size: "small", fullWidth: true, options: directionOptions, getOptionLabel: function (option) { return option.label; }, isOptionEqualToValue: function (option, value) { + return option.value === value.value; + }, onChange: function (_e, newValue) { + var newProperty = newValue.value; + updateDirection(newProperty); + }, disableClearable: true, value: directionOptions.find(function (option) { return option.value === sortItem.direction; }), renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { variant: "outlined" }))); } })))) : null))); +}; +export default SortItem; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydC1pdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9xdWVyeS1zb3J0LXNlbGVjdGlvbi9zb3J0LWl0ZW0udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFOUIsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sMEJBQTBCLENBQUE7QUFFNUQsT0FBTyxTQUFTLE1BQU0seUJBQXlCLENBQUE7QUFDL0MsT0FBTyxZQUFZLE1BQU0sNEJBQTRCLENBQUE7QUFDckQsT0FBTyxJQUFJLE1BQU0sb0JBQW9CLENBQUE7QUFDckMsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxLQUFLLE1BQU0sNkJBQTZCLENBQUE7QUFZL0MsSUFBTSxRQUFRLEdBQUcsVUFBQyxFQVFWO1FBUE4sUUFBUSxjQUFBLEVBQ1IsZ0JBQWdCLHNCQUFBLEVBQ2hCLGdCQUFnQixzQkFBQSxFQUNoQixlQUFlLHFCQUFBLEVBQ2YsZUFBZSxxQkFBQSxFQUNmLFFBQVEsY0FBQSxF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ZykgPT4gdm9pZFxuICB1cGRhdGVEaXJlY3Rpb246IChkaXJlY3Rpb246IHN0cmluZykgPT4gdm9pZFxuICBvblJlbW92ZTogKCkgPT4gdm9pZFxuICBzaG93UmVtb3ZlPzogYm9vbGVhblxufVxuXG5jb25zdCBTb3J0SXRlbSA9ICh7XG4gIHNvcnRJdGVtLFxuICBhdHRyaWJ1dGVPcHRpb25zLFxuICBkaXJlY3Rpb25PcHRpb25zLFxuICB1cGRhdGVBdHRyaWJ1dGUsXG4gIHVwZGF0ZURpcmVjdGlvbixcbiAgb25SZW1vdmUsXG4gIHNob3dSZW1vdmUsXG59OiBQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDw+XG4gICAgICA8ZGl2PlxuICAgICAgICA8R3JpZCBjb250YWluZXIgZGlyZWN0aW9uPVwicm93XCIgd3JhcD1cIm5vd3JhcFwiIGFsaWduSXRlbXM9XCJjZW50ZXJcIj5cbiAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbFwiPlxuICAgICAgICAgICAgPEF1dG9jb21wbGV0ZVxuICAgICAgICAgICAgICBkYXRhLWlkPVwic29ydC10eXBlLWF1dG9jb21wbGV0ZVwiXG4gICAgICAgICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICAgICAgICBvcHRpb25zPXthdHRyaWJ1dGVPcHRpb25zfVxuICAgICAgICAgICAgICBnZXRPcHRpb25MYWJlbD17KG9wdGlvbikgPT4gb3B0aW9uLmxhYmVsfVxuICAgICAgICAgICAgICBpc09wdGlvbkVxdWFsVG9WYWx1ZT17KG9wdGlvbiwgdmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9uLnZhbHVlID09PSB2YWx1ZS52YWx1ZVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBvbkNoYW5nZT17KF9lOiBhbnksIG5ld1ZhbHVlOiBPcHRpb24pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXdQcm9wZXJ0eSA9IG5ld1ZhbHVlLnZhbHVlXG4gICAgICAgICAgICAgICAgdXBkYXRlQXR0cmlidXRlKG5ld1Byb3BlcnR5KVxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBkaXNhYmxlQ2xlYXJhYmxlXG4gICAgICAgICAgICAgIHZhbHVlPXtzb3J0SXRlbS5hdHRyaWJ1dGV9XG4gICAgICAgICAgICAgIHJlbmRlcklucHV0PXsocGFyYW1zKSA9PiAoXG4gICAgICAgICAgICAgICAgPFRleHRGaWVsZCB7Li4ucGFyYW1zfSB2YXJpYW50PVwib3V0bGluZWRcIiAvPlxuICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAge3Nob3dSZW1vdmUgPyAoXG4gICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInBsLTJcIj5cbiAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJyZW1vdmUtc29ydC1idXR0b25cIlxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9e29uUmVtb3ZlfVxuICAgICAgICAgICAgICAgIHZhcmlhbnQ9XCJ0ZXh0XCJcbiAgICAgICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgUmVtb3ZlXG4gICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICA8L0dyaWQ+XG4gICAgICAgIHtpc0RpcmVjdGlvbmFsU29ydChzb3J0SXRlbS5hdHRyaWJ1dGUudmFsdWUpID8gKFxuICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICBjb250YWluZXJcbiAgICAgICAgICAgIGFsaWduSXRlbXM9XCJzdHJldGNoXCJcbiAgICAgICAgICAgIGRpcmVjdGlvbj1cInJvd1wiXG4gICAgICAgICAgICB3cmFwPVwibm93cmFwXCJcbiAgICAgICAgICAgIGNsYXNzTmFtZT1cInB0LTJcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAgICAgIDxTd2F0aCBjbGFzc05hbWU9XCJ3LTEgaC1mdWxsXCIgLz5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsIHBsLTJcIj5cbiAgICAgICAgICAgICAgPEF1dG9jb21wbGV0ZVxuICAgICAgICAgICAgICAgIGRhdGEtaWQ9XCJzb3J0LW9yZGVyLWF1dG9jb21wbGV0ZVwiXG4gICAgICAgICAgICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgICAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICAgICAgICBvcHRpb25zPXtkaXJlY3Rpb25PcHRpb25zfVxuICAgICAgICAgICAgICAgIGdldE9wdGlvbkxhYmVsPXsob3B0aW9uKSA9PiBvcHRpb24ubGFiZWx9XG4gICAgICAgICAgICAgICAgaXNPcHRpb25FcXVhbFRvVmFsdWU9eyhvcHRpb24sIHZhbHVlKSA9PlxuICAgICAgICAgICAgICAgICAgb3B0aW9uLnZhbHVlID09PSB2YWx1ZS52YWx1ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvbkNoYW5nZT17KF9lOiBhbnksIG5ld1ZhbHVlOiBPcHRpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1Byb3BlcnR5ID0gbmV3VmFsdWUudmFsdWVcbiAgICAgICAgICAgICAgICAgIHVwZGF0ZURpcmVjdGlvbihuZXdQcm9wZXJ0eSlcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIGRpc2FibGVDbGVhcmFibGVcbiAgICAgICAgICAgICAgICB2YWx1ZT17ZGlyZWN0aW9uT3B0aW9ucy5maW5kKFxuICAgICAgICAgICAgICAgICAgKG9wdGlvbikgPT4gb3B0aW9uLnZhbHVlID09PSBzb3J0SXRlbS5kaXJlY3Rpb25cbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIHJlbmRlcklucHV0PXsocGFyYW1zKSA9PiAoXG4gICAgICAgICAgICAgICAgICA8VGV4dEZpZWxkIHsuLi5wYXJhbXN9IHZhcmlhbnQ9XCJvdXRsaW5lZFwiIC8+XG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICkgOiBudWxsfVxuICAgICAgPC9kaXY+XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgU29ydEl0ZW1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.d.ts b/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.d.ts new file mode 100644 index 00000000000..ce967306747 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { SortItemType } from './sort-selections'; +import { Option } from './sort-selections'; +export declare const getLabel: (value: string) => string; +export declare const getSortAttributeOptions: (currentSelections: string[]) => Option[]; +export declare const getSortDirectionOptions: (attributeVal: string) => Option[]; +export declare const getNextAttribute: (collection: SortItemType[], options: Option[]) => string; +export declare const isDirectionalSort: (attribute: string) => boolean; diff --git a/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.js b/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.js new file mode 100644 index 00000000000..f08c96bfdb4 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.js @@ -0,0 +1,103 @@ +import { __values } from "tslib"; +import { StartupDataStore } from '../../js/model/Startup/startup'; +var blacklist = ['anyText', 'anyGeo']; +export var getLabel = function (value) { + var label = StartupDataStore.MetacardDefinitions.getAlias(value); + if (label === 'RELEVANCE') { + return 'Best Text Match'; + } + return label; +}; +export var getSortAttributeOptions = function (currentSelections) { + var currentAttributes = currentSelections && currentSelections.length ? currentSelections : []; + var attributes = StartupDataStore.MetacardDefinitions.getSortedAttributes(); + var options = attributes + .filter(function (type) { return !StartupDataStore.MetacardDefinitions.isHiddenAttribute(type.id); }) + .filter(function (type) { return !blacklist.includes(type.id); }) + .filter(function (type) { return !currentAttributes.includes(type.id); }) + .map(function (type) { return ({ + label: type.alias || type.id, + value: type.id, + }); }); + var showBestTextValue = 'RELEVANCE'; + options.unshift({ + label: 'Best Text Match', + value: showBestTextValue, + }); + return options; +}; +export var getSortDirectionOptions = function (attributeVal) { + var ascendingLabel, descendingLabel; + if (StartupDataStore.MetacardDefinitions.getAttributeMap()[attributeVal] === + undefined) { + ascendingLabel = descendingLabel = ''; + } + else { + switch (StartupDataStore.MetacardDefinitions.getAttributeMap()[attributeVal].type) { + case 'DATE': + ascendingLabel = 'Oldest to Latest'; + descendingLabel = 'Latest to Oldest'; + break; + case 'BOOLEAN': + ascendingLabel = 'True to False'; //Truthiest + descendingLabel = 'False to True'; //Falsiest + break; + case 'LONG': + case 'DOUBLE': + case 'FLOAT': + case 'INTEGER': + case 'SHORT': + ascendingLabel = 'Smallest to Largest'; + descendingLabel = 'Largest to Smallest'; + break; + case 'STRING': + ascendingLabel = 'A to Z'; + descendingLabel = 'Z to A'; + break; + case 'GEOMETRY': + ascendingLabel = 'Closest to Furthest'; + descendingLabel = 'Furthest to Closest'; + break; + case 'XML': + case 'BINARY': + default: + ascendingLabel = 'Ascending'; + descendingLabel = 'Descending'; + break; + } + } + var ascendingOption = { + label: ascendingLabel, + value: 'ascending', + }; + var descendingOption = { + label: descendingLabel, + value: 'descending', + }; + return [ascendingOption, descendingOption]; +}; +export var getNextAttribute = function (collection, options) { + var e_1, _a; + var attributes = collection.map(function (type) { return type.attribute.value; }); + try { + for (var options_1 = __values(options), options_1_1 = options_1.next(); !options_1_1.done; options_1_1 = options_1.next()) { + var option = options_1_1.value; + if (!attributes.includes(option.value)) { + return option.value; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (options_1_1 && !options_1_1.done && (_a = options_1.return)) _a.call(options_1); + } + finally { if (e_1) throw e_1.error; } + } + return options[0].value; +}; +export var isDirectionalSort = function (attribute) { + return (StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] !== + undefined); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydC1zZWxlY3Rpb24taGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvcXVlcnktc29ydC1zZWxlY3Rpb24vc29ydC1zZWxlY3Rpb24taGVscGVycy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWdCQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQTtBQUVqRSxJQUFNLFNBQVMsR0FBRyxDQUFDLFNBQVMsRUFBRSxRQUFRLENBQUMsQ0FBQTtBQUV2QyxNQUFNLENBQUMsSUFBTSxRQUFRLEdBQUcsVUFBQyxLQUFhO0lBQ3BDLElBQUksS0FBSyxHQUFHLGdCQUFnQixDQUFDLG1CQUFtQixDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMs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VxufVxuXG5leHBvcnQgY29uc3QgaXNEaXJlY3Rpb25hbFNvcnQgPSAoYXR0cmlidXRlOiBzdHJpbmcpID0+IHtcbiAgcmV0dXJuIChcbiAgICBTdGFydHVwRGF0YVN0b3JlLk1ldGFjYXJkRGVmaW5pdGlvbnMuZ2V0QXR0cmlidXRlTWFwKClbYXR0cmlidXRlXSAhPT1cbiAgICB1bmRlZmluZWRcbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/query-sort-selection/sort-selections.d.ts b/src/main/webapp/react-component/query-sort-selection/sort-selections.d.ts new file mode 100644 index 00000000000..1fa1cdd0533 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/sort-selections.d.ts @@ -0,0 +1,19 @@ +/// +export type SortsType = { + attribute: string; + direction: string; +}[]; +type Props = { + value: SortsType; + onChange: (newVal: SortsType) => void; +}; +export type Option = { + label: string; + value: string; +}; +export type SortItemType = { + attribute: Option; + direction: string; +}; +declare const _default: ({ value, onChange }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/query-sort-selection/sort-selections.js b/src/main/webapp/react-component/query-sort-selection/sort-selections.js new file mode 100644 index 00000000000..0f4691d30f9 --- /dev/null +++ b/src/main/webapp/react-component/query-sort-selection/sort-selections.js @@ -0,0 +1,79 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Button from '@mui/material/Button'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; +import AddIcon from '@mui/icons-material/Add'; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import SortItem from './sort-item'; +import { getLabel, getNextAttribute, getSortAttributeOptions, getSortDirectionOptions, } from './sort-selection-helpers'; +var getCollectionAsJson = function (collection) { + var items = collection.map(function (sort) { + return { + attribute: { + label: getLabel(sort.attribute), + value: sort.attribute, + }, + direction: sort.direction, + }; + }); + return items; +}; +var SortSelections = function (_a) { + var _b = _a.value, value = _b === void 0 ? [] : _b, onChange = _a.onChange; + if (!value.length) { + value.push({ + attribute: 'title', + direction: 'ascending', + }); + onChange(value.slice(0)); + } + var collectionJson = getCollectionAsJson(value); + var sortAttributeOptions = getSortAttributeOptions(collectionJson.map(function (item) { return item.attribute.value; })); + var updateAttribute = function (index) { return function (attribute) { + value[index].attribute = attribute; + onChange(value.slice(0)); + }; }; + var updateDirection = function (index) { return function (direction) { + value[index].direction = direction; + onChange(value.slice(0)); + }; }; + var removeItem = function (index) { return function () { + value.splice(index, 1); + onChange(value.slice(0)); + }; }; + var addSort = function () { + value.push({ + attribute: getNextAttribute(collectionJson, sortAttributeOptions), + direction: 'descending', + }); + onChange(value.slice(0)); + }; + return (React.createElement("div", { "data-id": "root-sort-container" }, + React.createElement(Typography, { "data-id": "Sort-changed", className: "pb-2" }, "Sort"), + collectionJson.map(function (sortItem, index) { + return (React.createElement("div", { "data-id": "sort-container", key: sortItem.attribute.value, className: index > 0 ? 'pt-2' : '' }, + React.createElement(SortItem, { sortItem: sortItem, attributeOptions: sortAttributeOptions, directionOptions: getSortDirectionOptions(sortItem.attribute.value), updateAttribute: updateAttribute(index), updateDirection: updateDirection(index), onRemove: removeItem(index), showRemove: index !== 0 }))); + }), + React.createElement("div", { className: "pt-2" }, + React.createElement(Button, { "data-id": "add-sort-button", color: "primary", fullWidth: true, onClick: addSort }, + React.createElement(Grid, { container: true, direction: "row", alignItems: "center", wrap: "nowrap" }, + React.createElement(Grid, { item: true }, + React.createElement(AddIcon, { className: "Mui-text-text-primary" })), + React.createElement(Grid, { item: true }, "Sort")))))); +}; +export default hot(module)(SortSelections); +//# sourceMappingURL=data:application/json;base64,e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ICAgICAgICAgICApfVxuICAgICAgICAgICAgICB1cGRhdGVBdHRyaWJ1dGU9e3VwZGF0ZUF0dHJpYnV0ZShpbmRleCl9XG4gICAgICAgICAgICAgIHVwZGF0ZURpcmVjdGlvbj17dXBkYXRlRGlyZWN0aW9uKGluZGV4KX1cbiAgICAgICAgICAgICAgb25SZW1vdmU9e3JlbW92ZUl0ZW0oaW5kZXgpfVxuICAgICAgICAgICAgICBzaG93UmVtb3ZlPXtpbmRleCAhPT0gMH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIClcbiAgICAgIH0pfVxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJwdC0yXCI+XG4gICAgICAgIDxCdXR0b25cbiAgICAgICAgICBkYXRhLWlkPVwiYWRkLXNvcnQtYnV0dG9uXCJcbiAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICAgIG9uQ2xpY2s9e2FkZFNvcnR9XG4gICAgICAgID5cbiAgICAgICAgICA8R3JpZCBjb250YWluZXIgZGlyZWN0aW9uPVwicm93XCIgYWxpZ25JdGVtcz1cImNlbnRlclwiIHdyYXA9XCJub3dyYXBcIj5cbiAgICAgICAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgICAgICAgIDxBZGRJY29uIGNsYXNzTmFtZT1cIk11aS10ZXh0LXRleHQtcHJpbWFyeVwiIC8+XG4gICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICA8R3JpZCBpdGVtPlNvcnQ8L0dyaWQ+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFNvcnRTZWxlY3Rpb25zKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/radio/radio.d.ts b/src/main/webapp/react-component/radio/radio.d.ts new file mode 100644 index 00000000000..e875575bebb --- /dev/null +++ b/src/main/webapp/react-component/radio/radio.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +type RadioProps = { + value?: string; + onChange?: (...args: any[]) => any; + children?: React.ReactNode; +}; +declare const Radio: (props: RadioProps) => JSX.Element; +type RadioItemProps = { + value?: string; + children?: any; +}; +declare const RadioItem: (props: RadioItemProps) => JSX.Element; +export { Radio, RadioItem }; diff --git a/src/main/webapp/react-component/radio/radio.js b/src/main/webapp/react-component/radio/radio.js new file mode 100644 index 00000000000..05ab388d7ac --- /dev/null +++ b/src/main/webapp/react-component/radio/radio.js @@ -0,0 +1,60 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import styled from 'styled-components'; +import { readableColor, rgba } from 'polished'; +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +var foreground = function (props) { + if (props.theme.backgroundDropdown !== undefined) { + return readableColor(props.theme.backgroundDropdown); + } +}; +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +var background = function (props, alpha) { + if (alpha === void 0) { alpha = 0.4; } + if (props.theme.backgroundDropdown !== undefined) { + return rgba(readableColor(props.theme.backgroundDropdown), alpha); + } +}; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: ", ";\n white-space: nowrap;\n background-color: inherit;\n border: 1px solid ", ";\n display: inline-block;\n"], ["\n border-radius: ", ";\n white-space: nowrap;\n background-color: inherit;\n border: 1px solid ", ";\n display: inline-block;\n"])), function (props) { return props.theme.borderRadius; }, background); +var Button = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n vertical-align: top;\n opacity: ", ";\n min-width: ", ";\n min-height: ", ";\n border: none;\n border-left: ", ";\n background-color: inherit;\n padding: 0px 10px;\n cursor: pointer;\n font-size: ", ";\n color: ", ";\n ", ";\n"], ["\n vertical-align: top;\n opacity: ", ";\n min-width: ", ";\n min-height: ", ";\n border: none;\n border-left: ", ";\n background-color: inherit;\n padding: 0px 10px;\n cursor: pointer;\n font-size: ", ";\n color: ", ";\n ", ";\n"])), function (props) { return props.theme.minimumOpacity; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { + return !props.first ? '1px solid ' + background(props) : 'none'; +}, function (props) { return props.theme.minimumFontSize; }, foreground, function (props) { + return props.selected + ? "\n opacity: 1;\n font-weight: bolder;\n background: ".concat(background(props, 0.1), ";\n ") + : ''; +}); +var Radio = function (props) { + var value = props.value, children = props.children, onChange = props.onChange; + var childrenWithProps = React.Children.map(children, function (child, i) { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + return React.cloneElement(child, { + first: i === 0, + selected: value === child.props.value, + // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message + onClick: function () { return onChange(child.props.value); }, + }); + }); + return React.createElement(Root, null, childrenWithProps); +}; +var RadioItem = function (props) { + // @ts-expect-error ts-migrate(2339) FIXME: Property 'first' does not exist on type 'RadioItem... Remove this comment to see the full error message + var value = props.value, first = props.first, children = props.children, selected = props.selected, onClick = props.onClick; + return (React.createElement(Button, { first: first, selected: selected, onClick: function () { return onClick(value); } }, children || value)); +}; +export { Radio, RadioItem }; +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3JhZGlvL3JhZGlvLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUN6QixPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsYUFBYSxFQUFFLElBQUksRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUM5Qyw4RUFBOEU7QUFDOUUsSUFBTSxVQUFVLEdBQUcsVUFBQyxLQUFVO0lBQzVCLElBQUksS0FBSyxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsS0FBSyxTQUFTLEVBQUU7UUFDaEQsT0FBTyxhQUFhLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxDQUFBO0tBQ3JEO0FBQ0gsQ0FBQyxDQUFBO0FBQ0QsOEVBQThFO0FBQzlFLElBQU0sVUFBVSxHQUFHLFVBQUMsS0FBVSxFQUFFLEtBQVc7SUFBWCxzQkFBQSxFQUFBLFdBQVc7SUFDekMsSUFBSSxLQUFLLENBQUMsS0FBSyxDQUFDLGtCQUFrQixLQUFLLFNBQVMsRUFBRTtRQUNoRCxPQUFPLElBQUksQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxFQUFFLEtBQUssQ0FBQyxDQUFBO0tBQ2xFO0FBQ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aWxkcmVuPzogYW55XG59XG5jb25zdCBSYWRpb0l0ZW0gPSAocHJvcHM6IFJhZGlvSXRlbVByb3BzKSA9PiB7XG4gIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSgyMzM5KSBGSVhNRTogUHJvcGVydHkgJ2ZpcnN0JyBkb2VzIG5vdCBleGlzdCBvbiB0eXBlICdSYWRpb0l0ZW0uLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICBjb25zdCB7IHZhbHVlLCBmaXJzdCwgY2hpbGRyZW4sIHNlbGVjdGVkLCBvbkNsaWNrIH0gPSBwcm9wc1xuICByZXR1cm4gKFxuICAgIDxCdXR0b24gZmlyc3Q9e2ZpcnN0fSBzZWxlY3RlZD17c2VsZWN0ZWR9IG9uQ2xpY2s9eygpID0+IG9uQ2xpY2sodmFsdWUpfT5cbiAgICAgIHtjaGlsZHJlbiB8fCB2YWx1ZX1cbiAgICA8L0J1dHRvbj5cbiAgKVxufVxuZXhwb3J0IHsgUmFkaW8sIFJhZGlvSXRlbSB9XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/result-sort/container.d.ts b/src/main/webapp/react-component/result-sort/container.d.ts new file mode 100644 index 00000000000..388e3cde356 --- /dev/null +++ b/src/main/webapp/react-component/result-sort/container.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +type Props = { + closeDropdown: any; +}; +declare const _default: ({ closeDropdown }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/result-sort/container.js b/src/main/webapp/react-component/result-sort/container.js new file mode 100644 index 00000000000..0e25b43b55f --- /dev/null +++ b/src/main/webapp/react-component/result-sort/container.js @@ -0,0 +1,54 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __read } from "tslib"; +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import ResultSortPresentation from './presentation'; +import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook'; +import Backbone from 'backbone'; +import user from '../../component/singletons/user-instance'; +var getResultSort = function () { + return user.get('user').get('preferences').get('resultSort'); +}; +var ResultSortContainer = function (_a) { + var closeDropdown = _a.closeDropdown; + var _b = __read(React.useState(new Backbone.Collection(getResultSort())), 2), collection = _b[0], setCollection = _b[1]; + var _c = __read(React.useState(collection.length > 0), 2), hasSort = _c[0], setHasSort = _c[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:resultSort', function () { + var resultSort = getResultSort(); + setHasSort(resultSort !== undefined && resultSort.length > 0); + setCollection(new Backbone.Collection(resultSort)); + }); + }, []); + var removeSort = function () { + user.get('user').get('preferences').set('resultSort', undefined); + user.get('user').get('preferences').savePreferences(); + closeDropdown(); + }; + var saveSort = function () { + var sorting = collection.toJSON(); + user + .get('user') + .get('preferences') + .set('resultSort', sorting.length === 0 ? undefined : sorting); + user.get('user').get('preferences').savePreferences(); + closeDropdown(); + }; + return (React.createElement(ResultSortPresentation, { key: Math.random(), saveSort: saveSort, removeSort: removeSort, collection: collection, hasSort: hasSort })); +}; +export default hot(module)(ResultSortContainer); +//# sour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KVxuICB9XG4gIGNvbnN0IHNhdmVTb3J0ID0gKCkgPT4ge1xuICAgIGNvbnN0IHNvcnRpbmcgPSBjb2xsZWN0aW9uLnRvSlNPTigpXG4gICAgdXNlclxuICAgICAgLmdldCgndXNlcicpXG4gICAgICAuZ2V0KCdwcmVmZXJlbmNlcycpXG4gICAgICAuc2V0KCdyZXN1bHRTb3J0Jywgc29ydGluZy5sZW5ndGggPT09IDAgPyB1bmRlZmluZWQgOiBzb3J0aW5nKVxuICAgIHVzZXIuZ2V0KCd1c2VyJykuZ2V0KCdwcmVmZXJlbmNlcycpLnNhdmVQcmVmZXJlbmNlcygpXG4gICAgY2xvc2VEcm9wZG93bigpXG4gIH1cbiAgcmV0dXJuIChcbiAgICA8UmVzdWx0U29ydFByZXNlbnRhdGlvblxuICAgICAga2V5PXtNYXRoLnJhbmRvbSgpfVxuICAgICAgc2F2ZVNvcnQ9e3NhdmVTb3J0fVxuICAgICAgcmVtb3ZlU29ydD17cmVtb3ZlU29ydH1cbiAgICAgIGNvbGxlY3Rpb249e2NvbGxlY3Rpb259XG4gICAgICBoYXNTb3J0PXtoYXNTb3J0fVxuICAgIC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUmVzdWx0U29ydENvbnRhaW5lcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/result-sort/index.d.ts b/src/main/webapp/react-component/result-sort/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/result-sort/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/result-sort/index.js b/src/main/webapp/react-component/result-sort/index.js new file mode 100644 index 00000000000..fe7968ed5c3 --- /dev/null +++ b/src/main/webapp/react-component/result-sort/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3Jlc3VsdC1zb3J0L2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGFBQWEsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vY29udGFpbmVyJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/result-sort/presentation.d.ts b/src/main/webapp/react-component/result-sort/presentation.d.ts new file mode 100644 index 00000000000..bbee4e94059 --- /dev/null +++ b/src/main/webapp/react-component/result-sort/presentation.d.ts @@ -0,0 +1,10 @@ +/// +/// +type Props = { + removeSort: () => void; + saveSort: () => void; + hasSort: Boolean; + collection: Backbone.Collection; +}; +declare const _default: ({ removeSort, saveSort, hasSort, collection }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/result-sort/presentation.js b/src/main/webapp/react-component/result-sort/presentation.js new file mode 100644 index 00000000000..0c598372c7d --- /dev/null +++ b/src/main/webapp/react-component/result-sort/presentation.js @@ -0,0 +1,32 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// @ts-nocheck FIXME: Property 'collection' does not exist on type 'Intr +import { hot } from 'react-hot-loader'; +import * as React from 'react'; +import SortSelections from '../query-sort-selection/sort-selections'; +import Button from '@mui/material/Button'; +import Grid from '@mui/material/Grid'; +var render = function (_a) { + var removeSort = _a.removeSort, saveSort = _a.saveSort, hasSort = _a.hasSort, collection = _a.collection; + return (React.createElement("div", { className: "min-w-120" }, + React.createElement(SortSelections, { collection: collection }), + React.createElement(Grid, { container: true, direction: "row", alignItems: "center", wrap: "nowrap" }, + hasSort ? (React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Button, { fullWidth: true, onClick: removeSort, variant: "text", color: "secondary" }, "Remove Sort"))) : null, + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Button, { fullWidth: true, onClick: saveSort, variant: "contained", color: "primary" }, "Save Sort"))))); +}; +export default hot(module)(render); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9yZXN1bHQtc29ydC9wcmVzZW50YXRpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSix3RUFBd0U7QUFDeEUsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUF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pY2s9e3JlbW92ZVNvcnR9XG4gICAgICAgICAgICAgIHZhcmlhbnQ9XCJ0ZXh0XCJcbiAgICAgICAgICAgICAgY29sb3I9XCJzZWNvbmRhcnlcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICBSZW1vdmUgU29ydFxuICAgICAgICAgICAgPC9CdXR0b24+XG4gICAgICAgICAgPC9HcmlkPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGxcIj5cbiAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICAgIG9uQ2xpY2s9e3NhdmVTb3J0fVxuICAgICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIFNhdmUgU29ydFxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICA8L0dyaWQ+XG4gICAgICA8L0dyaWQ+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkocmVuZGVyKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/results-export/container.d.ts b/src/main/webapp/react-component/results-export/container.d.ts new file mode 100644 index 00000000000..4cc5a96a5dc --- /dev/null +++ b/src/main/webapp/react-component/results-export/container.d.ts @@ -0,0 +1,263 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { WithBackboneProps } from '../backbone-container'; +import { LazyQueryResults } from '../../js/model/LazyQueryResult/LazyQueryResults'; +type Result = { + id: string; + source: string; + attributes: string[]; +}; +declare const _default: { + new (props: import("../../typescript/subtract").default<{ + results: Result[]; + lazyQueryResults: LazyQueryResults; + isZipped?: boolean | undefined; + onClose?: any; + exportSuccessful?: boolean | undefined; + setExportSuccessful?: any; + loading?: boolean | undefined; + setLoading?: any; + } & WithBackboneProps, WithBackboneProps> | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default<{ + results: Result[]; + lazyQueryResults: LazyQueryResults; + isZipped?: boolean | undefined; + onClose?: any; + exportSuccessful?: boolean | undefined; + setExportSuccessful?: any; + loading?: boolean | undefined; + setLoading?: any; + } & WithBackboneProps, WithBackboneProps>, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/results-export/container.js b/src/main/webapp/react-component/results-export/container.js new file mode 100644 index 00000000000..b699e947993 --- /dev/null +++ b/src/main/webapp/react-component/results-export/container.js @@ -0,0 +1,186 @@ +import { __awaiter, __extends, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import ResultsExportComponent from './presentation'; +import { exportResultSet, OverridableGetColumnOrder, getExportOptions, Transformer, } from '../utils/export'; +import { getResultSetCql } from '../utils/cql'; +import withListenTo from '../backbone-container'; +// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cont... Remove this comment to see the full error message +import contentDisposition from 'content-disposition'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +import { OverridableSaveFile } from '../utils/save-file/save-file'; +var ResultsExport = /** @class */ (function (_super) { + __extends(ResultsExport, _super); + function ResultsExport(props) { + var _this = _super.call(this, props) || this; + _this.getTransformerType = function () { + return !_this.props.isZipped && _this.props.results.length > 1 + ? Transformer.Query + : Transformer.Metacard; + }; + _this.fetchExportOptions = function () { return __awaiter(_this, void 0, void 0, function () { + var formats; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, getExportOptions(this.getTransformerType())]; + case 1: + formats = _a.sent(); + this.setState({ + exportFormats: formats, + }); + return [2 /*return*/]; + } + }); + }); }; + _this.onExportClick = function (addSnack) { return __awaiter(_this, void 0, void 0, function () { + var uriEncodedTransformerId, response, count, cql, srcs, searches, columnOrder, filename, contentType, data, error_1; + var _a, _b, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + uriEncodedTransformerId = this.getSelectedExportFormatId(); + _d.label = 1; + case 1: + _d.trys.push([1, 9, 10, 11]); + console.log(this.state.loading); + this.setState({ loading: true }); + console.log(this.state.loading); + if (uriEncodedTransformerId === undefined) { + return [2 /*return*/]; + } + response = null; + count = this.props.results.length; + cql = getResultSetCql(this.props.results.map(function (result) { return result.id; })); + srcs = Array.from(this.getResultSources()); + searches = [ + { + srcs: srcs, + cql: cql, + count: count, + }, + ]; + columnOrder = OverridableGetColumnOrder.get()(); + if (!this.props.isZipped) return [3 /*break*/, 3]; + return [4 /*yield*/, exportResultSet('zipCompression', { + searches: searches, + count: count, + sorts: [], + args: { + transformerId: uriEncodedTransformerId, + }, + })]; + case 2: + response = _d.sent(); + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, exportResultSet(uriEncodedTransformerId, { + searches: searches, + count: count, + sorts: (_a = this.props.lazyQueryResults) === null || _a === void 0 ? void 0 : _a.transformSorts({ + originalSorts: (_b = this.props.lazyQueryResults) === null || _b === void 0 ? void 0 : _b.persistantSorts, + }), + args: { + hiddenFields: [], + columnOrder: columnOrder, + columnAliasMap: ((_c = StartupDataStore.Configuration.config) === null || _c === void 0 ? void 0 : _c.attributeAliases) || {}, + }, + })]; + case 4: + response = _d.sent(); + _d.label = 5; + case 5: + if (!(response.status === 200)) return [3 /*break*/, 7]; + filename = contentDisposition.parse(response.headers.get('content-disposition')).parameters.filename; + contentType = response.headers.get('content-type'); + return [4 /*yield*/, response.blob()]; + case 6: + data = _d.sent(); + OverridableSaveFile.get()(filename, 'data:' + contentType, data); + this.setExportSuccessful(true); + this.onClose(); + return [3 /*break*/, 8]; + case 7: + this.setState({ exportSuccessful: false }); + this.setState({ loading: false }); + addSnack('Error: Could not export results.', { + alertProps: { severity: 'error' }, + }); + _d.label = 8; + case 8: return [3 /*break*/, 11]; + case 9: + error_1 = _d.sent(); + console.error(error_1); + this.setState({ exportSuccessful: false }); + this.setState({ loading: false }); + return [3 /*break*/, 11]; + case 10: + this.setState({ loading: false }); + return [7 /*endfinally*/]; + case 11: return [2 /*return*/]; + } + }); + }); }; + _this.state = { + selectedFormat: 'Binary Resource', + exportFormats: [], + exportDisabled: true, + loading: false, + exportSuccessful: false, + }; + _this.onClose = props.onClose; + _this.setExportSuccessful = props.setExportSuccessful; + _this.setLoading = props.setLoading; + return _this; + } + ResultsExport.prototype.componentDidUpdate = function (_prevProps) { + if (_prevProps.results !== this.props.results || + _prevProps.isZipped !== this.props.isZipped) { + this.fetchExportOptions(); + this.setState({ + selectedFormat: 'Binary Resource', + exportDisabled: true, + }); + } + }; + ResultsExport.prototype.componentDidMount = function () { + this.fetchExportOptions(); + }; + ResultsExport.prototype.getResultSources = function () { + return new Set(this.props.results + .map(function (result) { return result.source; }) + .map(function (source) { return decodeURIComponent(source); })); + }; + ResultsExport.prototype.getSelectedExportFormatId = function () { + var selectedFormat = this.state.selectedFormat; + var format = this.state.exportFormats.find(function (format) { return format.displayName === selectedFormat; }); + if (format !== undefined) { + return encodeURIComponent(format.id); + } + return undefined; + }; + ResultsExport.prototype.handleExportOptionChange = function (name) { + this.setState({ + selectedFormat: name, + exportDisabled: false, + }); + }; + ResultsExport.prototype.render = function () { + return (React.createElement(ResultsExportComponent, { selectedFormat: this.state.selectedFormat, exportFormats: this.state.exportFormats, exportDisabled: this.state.exportDisabled, onExportClick: this.onExportClick.bind(this), handleExportOptionChange: this.handleExportOptionChange.bind(this), onClose: this.onClose.bind(this), loading: this.state.loading, setLoading: this.setLoading.bind(this), exportSuccessful: this.state.exportSuccessful, setExportSuccessful: this.setLoading.bind(this) })); + }; + return ResultsExport; +}(React.Component)); +export default hot(module)(withListenTo(ResultsExport)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9yZXN1bHRzLWV4cG9ydC9jb250YWluZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sc0JBQXNCLE1BQU0sZ0JBQWdCLENBQUE7QUFDbkQsT0FBTyxFQUNMLGVBQWUsRUFDZix5QkFBeUIsRUFDekIsZ0JBQWdCLEVBQ2hCLFdBQVcsR0FFWixNQUFNLGlCQUFpQixDQUFBO0FBQ3hCLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFDOUMsT0FBTyxZQUFtQyxNQUFNLHVCQUF1QixDQUFBO0FBRXZFLG1KQUFtSjtBQUNuSixPQUFPLGtCQUFrQixN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cy5zdGF0ZS5zZWxlY3RlZEZvcm1hdH1cbiAgICAgICAgZXhwb3J0Rm9ybWF0cz17dGhpcy5zdGF0ZS5leHBvcnRGb3JtYXRzfVxuICAgICAgICBleHBvcnREaXNhYmxlZD17dGhpcy5zdGF0ZS5leHBvcnREaXNhYmxlZH1cbiAgICAgICAgb25FeHBvcnRDbGljaz17dGhpcy5vbkV4cG9ydENsaWNrLmJpbmQodGhpcyl9XG4gICAgICAgIGhhbmRsZUV4cG9ydE9wdGlvbkNoYW5nZT17dGhpcy5oYW5kbGVFeHBvcnRPcHRpb25DaGFuZ2UuYmluZCh0aGlzKX1cbiAgICAgICAgb25DbG9zZT17dGhpcy5vbkNsb3NlLmJpbmQodGhpcyl9XG4gICAgICAgIGxvYWRpbmc9e3RoaXMuc3RhdGUubG9hZGluZ31cbiAgICAgICAgc2V0TG9hZGluZz17dGhpcy5zZXRMb2FkaW5nLmJpbmQodGhpcyl9XG4gICAgICAgIGV4cG9ydFN1Y2Nlc3NmdWw9e3RoaXMuc3RhdGUuZXhwb3J0U3VjY2Vzc2Z1bH1cbiAgICAgICAgc2V0RXhwb3J0U3VjY2Vzc2Z1bD17dGhpcy5zZXRMb2FkaW5nLmJpbmQodGhpcyl9XG4gICAgICAvPlxuICAgIClcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKSh3aXRoTGlzdGVuVG8oUmVzdWx0c0V4cG9ydCkpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/results-export/index.d.ts b/src/main/webapp/react-component/results-export/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/results-export/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/results-export/index.js b/src/main/webapp/react-component/results-export/index.js new file mode 100644 index 00000000000..54ff49ff061 --- /dev/null +++ b/src/main/webapp/react-component/results-export/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3Jlc3VsdHMtZXhwb3J0L2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGFBQWEsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vY29udGFpbmVyJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/results-export/presentation.d.ts b/src/main/webapp/react-component/results-export/presentation.d.ts new file mode 100644 index 00000000000..84b1ea4ddb6 --- /dev/null +++ b/src/main/webapp/react-component/results-export/presentation.d.ts @@ -0,0 +1,20 @@ +/// +import { AddSnack } from '../../component/snack/snack.provider'; +type ExportFormat = { + id: string; + displayName: string; +}; +export type Props = { + selectedFormat: string; + exportFormats: ExportFormat[]; + exportDisabled: boolean; + onExportClick: (addSnack: AddSnack) => void; + handleExportOptionChange: (val: string) => void; + loading?: boolean; + setLoading?: any; + onClose?: any; + exportSuccessful?: boolean; + setExportSuccessful?: any; +}; +declare const _default: ({ selectedFormat, exportFormats, exportDisabled, onExportClick, handleExportOptionChange, exportSuccessful, onClose, loading, }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/results-export/presentation.js b/src/main/webapp/react-component/results-export/presentation.js new file mode 100644 index 00000000000..fe1c6dc2bee --- /dev/null +++ b/src/main/webapp/react-component/results-export/presentation.js @@ -0,0 +1,55 @@ +import { __assign } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +import SummaryManageAttributes from '../summary-manage-attributes/summary-manage-attributes'; +import ProgressButton from '../progress-button'; +import { DialogActions, DialogContent, LinearProgress } from '@mui/material'; +import useSnack from '../../component/hooks/useSnack'; +var ResultsExportComponent = function (_a) { + var selectedFormat = _a.selectedFormat, exportFormats = _a.exportFormats, exportDisabled = _a.exportDisabled, onExportClick = _a.onExportClick, handleExportOptionChange = _a.handleExportOptionChange, exportSuccessful = _a.exportSuccessful, onClose = _a.onClose, loading = _a.loading; + var addSnack = useSnack(); + React.useEffect(function () { + var _a; + handleExportOptionChange((_a = exportFormats[0]) === null || _a === void 0 ? void 0 : _a.displayName); + }, [exportFormats]); + if (exportSuccessful) { + onClose(); + } + return exportFormats.length === 0 ? (React.createElement(LinearProgress, { className: "w-full h-2" })) : (React.createElement(React.Fragment, null, + React.createElement(DialogContent, null, + React.createElement("div", { className: "p-4", style: { minWidth: '400px' } }, + React.createElement("div", { "data-id": "export-format-select", className: "export-option" }, + React.createElement(Autocomplete, { key: JSON.stringify(exportFormats), "data-id": "filter-type-autocomplete", fullWidth: true, size: "small", options: exportFormats, getOptionLabel: function (option) { return option.displayName; }, isOptionEqualToValue: function (option, value) { + return option.displayName === value.displayName; + }, onChange: function (_e, newValue) { + handleExportOptionChange(newValue.displayName); + }, disableClearable: true, value: exportFormats.find(function (format) { return format.displayName === selectedFormat; }) || exportFormats[0], renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { variant: "outlined" }))); } })), + ['CSV', 'RTF', 'XLSX'].includes(selectedFormat) ? (React.createElement(SummaryManageAttributes, { isExport: true })) : null)), + React.createElement(DialogActions, null, + React.createElement("div", { className: "pt-2", style: { display: 'flex', justifyContent: 'flex-end' } }, + React.createElement(Button, { className: "mr-2", disabled: loading, variant: "text", onClick: function () { + onClose(); + } }, "Cancel"), + React.createElement(ProgressButton, { variant: "contained", color: "primary", "data-id": "export-button", disabled: exportDisabled, onClick: function () { + onExportClick(addSnack); + }, loading: loading }, "Export"))))); +}; +export default hot(module)(ResultsExportComponent); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9yZXN1bHRzLWV4cG9ydC9wcmVzZW50YXRpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sW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uICAgICAgICA8ZGl2XG4gICAgICAgICAgY2xhc3NOYW1lPVwicHQtMlwiXG4gICAgICAgICAgc3R5bGU9e3sgZGlzcGxheTogJ2ZsZXgnLCBqdXN0aWZ5Q29udGVudDogJ2ZsZXgtZW5kJyB9fVxuICAgICAgICA+XG4gICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgY2xhc3NOYW1lPVwibXItMlwiXG4gICAgICAgICAgICBkaXNhYmxlZD17bG9hZGluZ31cbiAgICAgICAgICAgIHZhcmlhbnQ9XCJ0ZXh0XCJcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgb25DbG9zZSgpXG4gICAgICAgICAgICB9fVxuICAgICAgICAgID5cbiAgICAgICAgICAgIENhbmNlbFxuICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgIDxQcm9ncmVzc0J1dHRvblxuICAgICAgICAgICAgdmFyaWFudD1cImNvbnRhaW5lZFwiXG4gICAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgICAgZGF0YS1pZD1cImV4cG9ydC1idXR0b25cIlxuICAgICAgICAgICAgZGlzYWJsZWQ9e2V4cG9ydERpc2FibGVkfVxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICBvbkV4cG9ydENsaWNrKGFkZFNuYWNrKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGxvYWRpbmc9e2xvYWRpbmd9XG4gICAgICAgICAgPlxuICAgICAgICAgICAgRXhwb3J0XG4gICAgICAgICAgPC9Qcm9ncmVzc0J1dHRvbj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L0RpYWxvZ0FjdGlvbnM+XG4gICAgPC8+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoUmVzdWx0c0V4cG9ydENvbXBvbmVudClcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/search-settings/index.d.ts b/src/main/webapp/react-component/search-settings/index.d.ts new file mode 100644 index 00000000000..da9ba08ac78 --- /dev/null +++ b/src/main/webapp/react-component/search-settings/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './search-settings'; diff --git a/src/main/webapp/react-component/search-settings/index.js b/src/main/webapp/react-component/search-settings/index.js new file mode 100644 index 00000000000..bca0159ac72 --- /dev/null +++ b/src/main/webapp/react-component/search-settings/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './search-settings'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3NlYXJjaC1zZXR0aW5ncy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQSIsInNvdXJj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.ts b/src/main/webapp/react-component/search-settings/search-settings.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/react-component/search-settings/search-settings.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/search-settings/search-settings.js b/src/main/webapp/react-component/search-settings/search-settings.js new file mode 100644 index 00000000000..0d5c2e12ec2 --- /dev/null +++ b/src/main/webapp/react-component/search-settings/search-settings.js @@ -0,0 +1,105 @@ +import { __makeTemplateObject, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import user from '../../component/singletons/user-instance'; +import QuerySettings from '../../component/query-settings/query-settings'; +import { UserQuery } from '../../js/model/TypedQuery'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import Typography from '@mui/material/Typography'; +import Grid from '@mui/material/Grid'; +import Slider from '@mui/material/Slider'; +import Input from '@mui/material/Input'; +import Swath from '../../component/swath/swath'; +import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook'; +import { MuiOutlinedInputBorderClasses, Elevations, } from '../../component/theme/theme'; +import Tooltip from '@mui/material/Tooltip'; +import Paper from '@mui/material/Paper'; +import { useConfiguration } from '../../js/model/Startup/configuration.hooks'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n padding: ", ";\n"], ["\n overflow: hidden;\n padding: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }); +var getResultCount = function () { + return user.get('user').get('preferences').get('resultCount'); +}; +var SearchSettings = function () { + var config = useConfiguration().config; + var configuredMaxResultCount = (config === null || config === void 0 ? void 0 : config.resultCount) || 250; + var _a = __read(React.useState(UserQuery() // we pass this to query settings + ), 1), queryModel = _a[0]; + var _b = __read(React.useState(getResultCount()), 2), resultCount = _b[0], setResultCount = _b[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:resultCount', function () { + setResultCount(getResultCount()); + }); + }, []); + React.useEffect(function () { + return function () { + var _a = queryModel.toJSON(), sorts = _a.sorts, phonetics = _a.phonetics, spellcheck = _a.spellcheck, sources = _a.sources; + user.getPreferences().get('querySettings').set({ + sorts: sorts, + phonetics: phonetics, + spellcheck: spellcheck, + sources: sources, + }); + user.savePreferences(); + }; + }, []); + return (React.createElement(Root, null, + React.createElement(Tooltip, { placement: "right", title: React.createElement(Paper, { elevation: Elevations.overlays, className: "p-3" }, + React.createElement(Typography, { variant: "h6" }, "For example:"), + React.createElement(Typography, null, + "Searching 3 data sources with the current setting could return as many as ", + resultCount * 3, + " results in a single page.")) }, + React.createElement("div", null, + React.createElement(Typography, { id: "resultcount-slider", className: "pb-2" }, "Results per page per data source"), + React.createElement(Grid, { className: "w-full ".concat(MuiOutlinedInputBorderClasses), container: true, alignItems: "center", direction: "column" }, + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(Input, { fullWidth: true, value: resultCount, margin: "dense", onChange: function (e) { + user.getPreferences().set({ + resultCount: Math.min(parseInt(e.target.value), configuredMaxResultCount), + }); + }, inputProps: { + className: 'text-center', + step: 10, + min: 1, + max: configuredMaxResultCount, + type: 'number', + 'aria-labelledby': 'resultcount-slider', + } })), + React.createElement(Grid, { item: true, className: "w-full px-10" }, + React.createElement(Slider, { value: resultCount, onChange: function (_e, newValue) { + user.getPreferences().set({ + resultCount: newValue, + }); + }, "aria-labelledby": "input-slider", min: 1, max: configuredMaxResultCount, step: 10, marks: [ + { + value: 1, + label: '1', + }, + { + value: configuredMaxResultCount, + label: "".concat(configuredMaxResultCount), + }, + ] }))))), + React.createElement("div", { className: "py-5" }, + React.createElement(Swath, { className: "w-full h-1" })), + React.createElement(Typography, { variant: "h5" }, "Defaults for New Searches"), + React.createElement(QuerySettings, { model: queryModel }))); +}; +export default hot(module)(SearchSettings); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLXNldHRpbmdzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9zZWFyY2gtc2V0dGluZ3Mvc2VhcmNoLXNldHRpbmdzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sSUFBSSxNQUFNLDBDQUEwQyxDQUFBO0FBQzNELE9BQU8sYUFBYSxNQUFNLCtDQUErQyxDQUFBO0FBQ3pFLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTtBQUNyRCxPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxVQUFVLE1BQU0sMEJBQTBCLENBQUE7QUFDakQsT0FBTyxJQUFJLE1BQU0sb0JBQW9CLENBQUE7QUFDckMsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxLQUFLLE1BQU0scUJBQXFCLENBQUE7QUFDdkMsT0FBTyxLQUFLLE1BQU0sNkJBQTZCLENBQUE7QUFDL0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFEQUFxRCxDQUFBO0FBQ2pGLE9BQU8sRUFDTCw2QkFBNkIsRUFDN0Is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ICA+XG4gICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbFwiPlxuICAgICAgICAgICAgICA8SW5wdXRcbiAgICAgICAgICAgICAgICBmdWxsV2lkdGhcbiAgICAgICAgICAgICAgICB2YWx1ZT17cmVzdWx0Q291bnR9XG4gICAgICAgICAgICAgICAgbWFyZ2luPVwiZGVuc2VcIlxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgdXNlci5nZXRQcmVmZXJlbmNlcygpLnNldCh7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdENvdW50OiBNYXRoLm1pbihcbiAgICAgICAgICAgICAgICAgICAgICBwYXJzZUludChlLnRhcmdldC52YWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJlZE1heFJlc3VsdENvdW50XG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgaW5wdXRQcm9wcz17e1xuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lOiAndGV4dC1jZW50ZXInLFxuICAgICAgICAgICAgICAgICAgc3RlcDogMTAsXG4gICAgICAgICAgICAgICAgICBtaW46IDEsXG4gICAgICAgICAgICAgICAgICBtYXg6IGNvbmZpZ3VyZWRNYXhSZXN1bHRDb3VudCxcbiAgICAgICAgICAgICAgICAgIHR5cGU6ICdudW1iZXInLFxuICAgICAgICAgICAgICAgICAgJ2FyaWEtbGFiZWxsZWRieSc6ICdyZXN1bHRjb3VudC1zbGlkZXInLFxuICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbCBweC0xMFwiPlxuICAgICAgICAgICAgICA8U2xpZGVyXG4gICAgICAgICAgICAgICAgdmFsdWU9e3Jlc3VsdENvdW50fVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoX2UsIG5ld1ZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICB1c2VyLmdldFByZWZlcmVuY2VzKCkuc2V0KHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0Q291bnQ6IG5ld1ZhbHVlLFxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWxsZWRieT1cImlucHV0LXNsaWRlclwiXG4gICAgICAgICAgICAgICAgbWluPXsxfVxuICAgICAgICAgICAgICAgIG1heD17Y29uZmlndXJlZE1heFJlc3VsdENvdW50fVxuICAgICAgICAgICAgICAgIHN0ZXA9ezEwfVxuICAgICAgICAgICAgICAgIG1hcmtzPXtbXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiAxLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbDogJzEnLFxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGNvbmZpZ3VyZWRNYXhSZXN1bHRDb3VudCxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IGAke2NvbmZpZ3VyZWRNYXhSZXN1bHRDb3VudH1gLFxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBdfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L1Rvb2x0aXA+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cInB5LTVcIj5cbiAgICAgICAgPFN3YXRoIGNsYXNzTmFtZT1cInctZnVsbCBoLTFcIiAvPlxuICAgICAgPC9kaXY+XG4gICAgICA8VHlwb2dyYXBoeSB2YXJpYW50PVwiaDVcIj5EZWZhdWx0cyBmb3IgTmV3IFNlYXJjaGVzPC9UeXBvZ3JhcGh5PlxuICAgICAgPFF1ZXJ5U2V0dGluZ3MgbW9kZWw9e3F1ZXJ5TW9kZWx9IC8+XG4gICAgPC9Sb290PlxuICApXG59XG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShTZWFyY2hTZXR0aW5ncylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/session-timeout/index.d.ts b/src/main/webapp/react-component/session-timeout/index.d.ts new file mode 100644 index 00000000000..65022fc4741 --- /dev/null +++ b/src/main/webapp/react-component/session-timeout/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './session-timeout'; diff --git a/src/main/webapp/react-component/session-timeout/index.js b/src/main/webapp/react-component/session-timeout/index.js new file mode 100644 index 00000000000..1a27829f401 --- /dev/null +++ b/src/main/webapp/react-component/session-timeout/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './session-timeout'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI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uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi9zZXNzaW9uLXRpbWVvdXQnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/session-timeout/session-timeout.d.ts b/src/main/webapp/react-component/session-timeout/session-timeout.d.ts new file mode 100644 index 00000000000..2ee4c0a28f2 --- /dev/null +++ b/src/main/webapp/react-component/session-timeout/session-timeout.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +type State = { + timeLeft: number; +}; +declare class SessionTimeout extends React.Component<{}, State> { + interval: any; + constructor(props: {}); + componentDidMount(): void; + componentWillUnmount(): void; + render(): JSX.Element; +} +export default SessionTimeout; diff --git a/src/main/webapp/react-component/session-timeout/session-timeout.js b/src/main/webapp/react-component/session-timeout/session-timeout.js new file mode 100644 index 00000000000..344766313ed --- /dev/null +++ b/src/main/webapp/react-component/session-timeout/session-timeout.js @@ -0,0 +1,57 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { __extends, __makeTemplateObject } from "tslib"; +import Button from '@mui/material/Button'; +import * as React from 'react'; +import styled from 'styled-components'; +import sessionTimeoutModel from '../../component/singletons/session-timeout'; +var SessionTimeoutRoot = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n display: block;\n overflow: hidden;\n"], ["\n height: 100%;\n width: 100%;\n display: block;\n overflow: hidden;\n"]))); +var Message = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-height: calc(100% - 2.25rem);\n height: auto;\n text-align: center;\n padding: ", ";\n"], ["\n max-height: calc(100% - 2.25rem);\n height: auto;\n text-align: center;\n padding: ", ";\n"])), function (props) { return props.theme.mediumSpacing; }); +var renewSession = function () { + sessionTimeoutModel.renew(); +}; +var SessionTimeout = /** @class */ (function (_super) { + __extends(SessionTimeout, _super); + function SessionTimeout(props) { + var _this = _super.call(this, props) || this; + _this.state = { + timeLeft: sessionTimeoutModel.getIdleSeconds(), + }; + return _this; + } + SessionTimeout.prototype.componentDidMount = function () { + var _this = this; + this.interval = setInterval(function () { return _this.setState({ timeLeft: sessionTimeoutModel.getIdleSeconds() }); }, 1000); + }; + SessionTimeout.prototype.componentWillUnmount = function () { + clearInterval(this.interval); + }; + SessionTimeout.prototype.render = function () { + return this.state.timeLeft < 0 ? (React.createElement(SessionTimeoutRoot, null, + React.createElement(Message, null, "Session Expired. Please refresh the page to continue."))) : (React.createElement(SessionTimeoutRoot, null, + React.createElement(Message, null, + "You will be logged out automatically in", + ' ', + React.createElement("label", { className: "timer" }, sessionTimeoutModel.getIdleSeconds()), + ' ', + "seconds.", + React.createElement("div", null, "Press \"Continue Working\" to remain logged in.")), + React.createElement(Button, { onClick: renewSession, variant: "contained", color: "primary", fullWidth: true }, "Continue Working"))); + }; + return SessionTimeout; +}(React.Component)); +export default SessionTimeout; +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,ey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ICAgICAgPC9TZXNzaW9uVGltZW91dFJvb3Q+XG4gICAgKVxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFNlc3Npb25UaW1lb3V0XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/snackbar/index.d.ts b/src/main/webapp/react-component/snackbar/index.d.ts new file mode 100644 index 00000000000..5675eb7b659 --- /dev/null +++ b/src/main/webapp/react-component/snackbar/index.d.ts @@ -0,0 +1 @@ +export { WrappedSnackbar as Snackbar, WrappedSnackbarContent as SnackbarContent, } from './snackbar'; diff --git a/src/main/webapp/react-component/snackbar/index.js b/src/main/webapp/react-component/snackbar/index.js new file mode 100644 index 00000000000..ca4ab85d1ea --- /dev/null +++ b/src/main/webapp/react-component/snackbar/index.js @@ -0,0 +1,2 @@ +export { WrappedSnackbar as Snackbar, WrappedSnackbarContent as SnackbarContent, } from './snackbar'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3NuYWNrYmFyL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsZUFBZSxJQUFJLFFBQVEsRUFDM0Isc0JBQXNCLElBQUksZUFBZSxHQUMxQyxNQUFNLFlBQVksQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7XG4gIFdyYXBwZWRTbmFja2JhciBhcyBTbmFja2JhcixcbiAgV3JhcHBlZFNuYWNrYmFyQ29udGVudCBhcyBTbmFja2JhckNvbnRlbnQsXG59IGZyb20gJy4vc25hY2tiYXInXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/snackbar/snackbar.d.ts b/src/main/webapp/react-component/snackbar/snackbar.d.ts new file mode 100644 index 00000000000..6cf9bd58cac --- /dev/null +++ b/src/main/webapp/react-component/snackbar/snackbar.d.ts @@ -0,0 +1,9 @@ +import * as React from 'react'; +import { SnackbarProps } from '@mui/material/Snackbar'; +import { SnackbarContentProps } from '@mui/material/SnackbarContent'; +type ExtraProps = { + variant?: 'error' | 'success'; +}; +export declare const WrappedSnackbar: React.ComponentType>; +export declare const WrappedSnackbarContent: React.ComponentType>; +export {}; diff --git a/src/main/webapp/react-component/snackbar/snackbar.js b/src/main/webapp/react-component/snackbar/snackbar.js new file mode 100644 index 00000000000..a10825df7cb --- /dev/null +++ b/src/main/webapp/react-component/snackbar/snackbar.js @@ -0,0 +1,29 @@ +import { __assign, __makeTemplateObject, __rest } from "tslib"; +import * as React from 'react'; +import Snackbar from '@mui/material/Snackbar'; +import SnackbarContent from '@mui/material/SnackbarContent'; +import styled from 'styled-components'; +import { useTheme } from '@mui/material/styles'; +export var WrappedSnackbar = styled(React.forwardRef(function (props, ref) { + return React.createElement(Snackbar, __assign({}, props, { ref: ref })); +}))(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""]))); +export var WrappedSnackbarContent = styled(React.forwardRef(function (props, ref) { + var theme = useTheme(); + var _a = props.variant, variant = _a === void 0 ? 'error' : _a, baseProps = __rest(props, ["variant"]); + var style = {}; + if (variant === 'error') { + style = { + background: theme.palette.error.dark, + color: theme.palette.error.contrastText, + }; + } + else if (variant === 'success') { + style = { + background: theme.palette.primary.dark, + color: theme.palette.primary.contrastText, + }; + } + return React.createElement(SnackbarContent, __assign({}, baseProps, { ref: ref, style: style })); +}))(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""]))); +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic25hY2tiYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3NuYWNrYmFyL3NuYWNrY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gIClcbik8U25hY2tiYXJDb250ZW50UHJvcHM+YGAgYXMgUmVhY3QuQ29tcG9uZW50VHlwZTxcbiAgUmVhY3QuUHJvcHNXaXRoQ2hpbGRyZW48U25hY2tiYXJDb250ZW50UHJvcHMgJiBFeHRyYVByb3BzPlxuPlxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/source-item/index.d.ts b/src/main/webapp/react-component/source-item/index.d.ts new file mode 100644 index 00000000000..ac71f91dc04 --- /dev/null +++ b/src/main/webapp/react-component/source-item/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './source-item'; diff --git a/src/main/webapp/react-component/source-item/index.js b/src/main/webapp/react-component/source-item/index.js new file mode 100644 index 00000000000..21d8438c505 --- /dev/null +++ b/src/main/webapp/react-component/source-item/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './source-item'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZW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5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vc291cmNlLWl0ZW0nXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/source-item/source-item.d.ts b/src/main/webapp/react-component/source-item/source-item.d.ts new file mode 100644 index 00000000000..21bf8541591 --- /dev/null +++ b/src/main/webapp/react-component/source-item/source-item.d.ts @@ -0,0 +1,16 @@ +/// +type RootProps = { + available: boolean; +}; +type SourceAction = { + title: string; + description: string; + url: string; + id: string; +}; +type Props = { + sourceActions?: SourceAction[]; + id: string; +} & RootProps; +declare const _default: ({ id, available }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/source-item/source-item.js b/src/main/webapp/react-component/source-item/source-item.js new file mode 100644 index 00000000000..37fd666d86b --- /dev/null +++ b/src/main/webapp/react-component/source-item/source-item.js @@ -0,0 +1,32 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: auto;\n white-space: nowrap;\n padding: ", ";\n overflow: hidden;\n\n .source-name,\n .source-available {\n white-space: normal;\n display: inline-block;\n vertical-align: top;\n font-size: ", ";\n line-height: ", ";\n }\n\n .source-name {\n padding: 0px ", ";\n max-width: calc(100% - ", ");\n word-break: break-all;\n }\n\n .source-actions {\n display: block;\n padding-left: calc(2 * ", ");\n }\n\n .source-action > button {\n width: 100%;\n text-align: left;\n padding: 0px ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .source-app {\n display: none;\n }\n\n .source-available {\n width: ", ";\n text-align: center;\n }\n\n .is-available,\n .is-not-available {\n display: none;\n }\n\n .is-available {\n display: ", ";\n color: ", ";\n }\n\n .is-not-available {\n display: ", ";\n color: ", ";\n }\n"], ["\n width: 100%;\n height: auto;\n white-space: nowrap;\n padding: ", ";\n overflow: hidden;\n\n .source-name,\n .source-available {\n white-space: normal;\n display: inline-block;\n vertical-align: top;\n font-size: ", ";\n line-height: ", ";\n }\n\n .source-name {\n padding: 0px ", ";\n max-width: calc(100% - ", ");\n word-break: break-all;\n }\n\n .source-actions {\n display: block;\n padding-left: calc(2 * ", ");\n }\n\n .source-action > button {\n width: 100%;\n text-align: left;\n padding: 0px ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .source-app {\n display: none;\n }\n\n .source-available {\n width: ", ";\n text-align: center;\n }\n\n .is-available,\n .is-not-available {\n display: none;\n }\n\n .is-available {\n display: ", ";\n color: ", ";\n }\n\n .is-not-available {\n display: ", ";\n color: ", ";\n }\n"])), function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.largeFontSize; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.minimumSpacing; }, function (_a) { + var theme = _a.theme; + return theme.minimumButtonSize; +}, function (props) { return (props.available ? 'inline' : 'none'); }, function (props) { return props.theme.positiveColor; }, function (props) { return (props.available ? 'none' : 'inline'); }, function (props) { return props.theme.warningColor; }); +export default hot(module)(function (_a) { + var id = _a.id, available = _a.available; + return (React.createElement(Root, { available: available }, + React.createElement("div", { className: "source-available" }, + React.createElement("span", { className: "is-available fa fa-check" }), + React.createElement("span", { className: "is-not-available fa fa-bolt" })), + React.createElement("div", { className: "source-name", title: id }, id))); +}); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlLWl0ZW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3NvdXJjZS1pdGVtL3NvdXJjZS1pdGVtLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RDLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQU10QyxJQUFNLElBQUksR0FBRyxNQUFNLENBQUMsR0FBRywrK0JBQVcsd0VBSXJCLEVBQXFDLG1LQVFqQyxFQUFvQyxzQkFDbEMsRUFBd0MsK0NBSXhDLEVBQXFDLGdDQUMzQixFQUF3Qyw4R0FNeEMsRUFBd0Msb0dBTWxELEVBQXFDLCtJQVUzQyxFQUFzQyx5SUFVcEMsRUFBZ0QsZ0JBQ2xELEVBQW9DLGdEQUlsQyxFQUFnRCxnQkFDbEQsRUFBbUMsVUFFL0MsS0F0RFksVUFBQyxLQUFLLElBQUssT0FBQSxLQUFLLENBQUMsS0FBSyxDQUFDLGNBQWMsRUFBMUIsQ0FBMEIsRUFRakMsVUFBQyxLQUFLLElBQUssT0FBQSxLQUFLLENBQUMsS0FBSyxDQUFDLGFBQWEsRUFBekIsQ0FBeUIsRUFDbEMsVUFBQyxLQUFLLElBQUssT0FBQSxLQUFLLENBQUMsS0FBSyxDQUFDLGlCQUFpQixFQUE3QixDQUE2QixFQUl4QyxVQUFDLEtBQUssSUFBSyxPQUFBLEtBQUssQ0FBQyxLQUFLLENBQUMsY0FBY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ID0+IHByb3BzLnRoZW1lLndhcm5pbmdDb2xvcn07XG4gIH1cbmBcblxudHlwZSBTb3VyY2VBY3Rpb24gPSB7XG4gIHRpdGxlOiBzdHJpbmdcbiAgZGVzY3JpcHRpb246IHN0cmluZ1xuICB1cmw6IHN0cmluZ1xuICBpZDogc3RyaW5nXG59XG5cbnR5cGUgUHJvcHMgPSB7XG4gIHNvdXJjZUFjdGlvbnM/OiBTb3VyY2VBY3Rpb25bXVxuICBpZDogc3RyaW5nXG59ICYgUm9vdFByb3BzXG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKCh7IGlkLCBhdmFpbGFibGUgfTogUHJvcHMpID0+IHtcbiAgcmV0dXJuIChcbiAgICA8Um9vdCBhdmFpbGFibGU9e2F2YWlsYWJsZX0+XG4gICAgICA8ZGl2IGNsYXNzTmFtZT1cInNvdXJjZS1hdmFpbGFibGVcIj5cbiAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwiaXMtYXZhaWxhYmxlIGZhIGZhLWNoZWNrXCIgLz5cbiAgICAgICAgPHNwYW4gY2xhc3NOYW1lPVwiaXMtbm90LWF2YWlsYWJsZSBmYSBmYS1ib2x0XCIgLz5cbiAgICAgIDwvZGl2PlxuICAgICAgPGRpdiBjbGFzc05hbWU9XCJzb3VyY2UtbmFtZVwiIHRpdGxlPXtpZH0+XG4gICAgICAgIHtpZH1cbiAgICAgIDwvZGl2PlxuICAgIDwvUm9vdD5cbiAgKVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/sources-summary/index.d.ts b/src/main/webapp/react-component/sources-summary/index.d.ts new file mode 100644 index 00000000000..2ddd1a36b45 --- /dev/null +++ b/src/main/webapp/react-component/sources-summary/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './sources-summary'; diff --git a/src/main/webapp/react-component/sources-summary/index.js b/src/main/webapp/react-component/sources-summary/index.js new file mode 100644 index 00000000000..34aefee1e84 --- /dev/null +++ b/src/main/webapp/react-component/sources-summary/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './sources-summary'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3NvdXJjZXMtc3VtbWFyeS9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vc291cmNlcy1zdW1tYXJ5J1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/sources-summary/sources-summary.d.ts b/src/main/webapp/react-component/sources-summary/sources-summary.d.ts new file mode 100644 index 00000000000..bd8986c88df --- /dev/null +++ b/src/main/webapp/react-component/sources-summary/sources-summary.d.ts @@ -0,0 +1,6 @@ +/// +type Props = { + amountDown: number; +}; +declare const _default: ({ amountDown }: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/sources-summary/sources-summary.js b/src/main/webapp/react-component/sources-summary/sources-summary.js new file mode 100644 index 00000000000..04497b61674 --- /dev/null +++ b/src/main/webapp/react-component/sources-summary/sources-summary.js @@ -0,0 +1,26 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import { hot } from 'react-hot-loader'; +import { FormattedMessage } from 'react-intl'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: auto;\n font-size: ", ";\n text-align: center;\n padding: ", " 0px;\n"], ["\n display: block;\n width: 100%;\n height: auto;\n font-size: ", ";\n text-align: center;\n padding: ", " 0px;\n"])), function (props) { return props.theme.largeFontSize; }, function (props) { return props.theme.largeSpacing; }); +export default hot(module)(function (_a) { + var amountDown = _a.amountDown; + return (React.createElement(Root, null, amountDown == 0 ? (React.createElement(FormattedMessage, { id: "sources.available", defaultMessage: "All sources are currently up" })) : (React.createElement(FormattedMessage, { id: "sources.unavailable", defaultMessage: "{amountDown} {amountDown, plural, one {source is} other {sources are}} currently down", values: { amountDown: amountDown } })))); +}); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlcy1zdW1tYXJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9zb3VyY2VzLXN1bW1hcnkvc291cmNlcy1zdW1tYXJ5LnRzeCJdLCJuYW1lcyI6W10sIm1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IDwvUm9vdD5cbiAgKVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/sources/presentation.d.ts b/src/main/webapp/react-component/sources/presentation.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/react-component/sources/presentation.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/sources/presentation.js b/src/main/webapp/react-component/sources/presentation.js new file mode 100644 index 00000000000..9a93714a486 --- /dev/null +++ b/src/main/webapp/react-component/sources/presentation.js @@ -0,0 +1,45 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import SourceItem from '../source-item'; +import SourcesSummary from '../sources-summary'; +import { useSources } from '../../js/model/Startup/sources.hooks'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: block;\n height: 100%;\n width: 100%;\n overflow: hidden;\n"], ["\n display: block;\n height: 100%;\n width: 100%;\n overflow: hidden;\n"]))); +var SourcesCenter = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: auto;\n max-width: ", ";\n padding: 0px\n ", ";\n overflow: auto;\n height: 100%;\n"], ["\n margin: auto;\n max-width: ", ";\n padding: 0px\n ", ";\n overflow: auto;\n height: 100%;\n"])), function (props) { + return props.theme.screenBelow(props.theme.mediumScreenSize) + ? '100%' + : '1200px'; +}, function (props) { + return props.theme.screenBelow(props.theme.mediumScreenSize) ? '20px' : '100px'; +}); +export default (function () { + var sources = useSources().sources; + var amountDown = sources.reduce(function (blob, source) { + if (source.available === false) { + return blob + 1; + } + return blob; + }, 0); + return (React.createElement(Root, null, + React.createElement(SourcesCenter, null, + React.createElement(SourcesSummary, { amountDown: amountDown }), + sources.map(function (source) { + return (React.createElement(SourceItem, { key: source.id, sourceActions: source.sourceActions, id: source.id, available: source.available })); + })))); +}); +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9zb3VyY2VzL3ByZXNlbnRhdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLFVBQVUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUN2QyxPQUFPLGNBQWMsTUFBTSxvQkFBb0IsQ0FBQTtBQUMvQyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0NBQXNDLENBQUE7QUFFakUsSUFBTSxJQUFJLEdBQUcsTUFBTSxDQUFDLEdBQUcsZ0pBQUEsNkVBS3RCLElBQUEsQ0FBQTtBQUVELElBQU0sYUFBYSxHQUFHLE1BQU0sQ0FBQyxHQUFHLDJLQUFBLGtDQUVqQixFQUlaLHlCQUVHLEVBQ3dFLHlDQUc3RSxLQVZjLFVBQUMsS0FBSztJQUNqQixPQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsV0FBVyxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLENBQUM7UUFDMUQsQ0FBQyxDQUFDLE1BQU07UUFDUixDQ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uIChcbiAgICA8Um9vdD5cbiAgICAgIDxTb3VyY2VzQ2VudGVyPlxuICAgICAgICA8U291cmNlc1N1bW1hcnkgYW1vdW50RG93bj17YW1vdW50RG93bn0gLz5cbiAgICAgICAge3NvdXJjZXMubWFwKChzb3VyY2UpID0+IHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPFNvdXJjZUl0ZW1cbiAgICAgICAgICAgICAga2V5PXtzb3VyY2UuaWR9XG4gICAgICAgICAgICAgIHNvdXJjZUFjdGlvbnM9e3NvdXJjZS5zb3VyY2VBY3Rpb25zfVxuICAgICAgICAgICAgICBpZD17c291cmNlLmlkfVxuICAgICAgICAgICAgICBhdmFpbGFibGU9e3NvdXJjZS5hdmFpbGFibGV9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIClcbiAgICAgICAgfSl9XG4gICAgICA8L1NvdXJjZXNDZW50ZXI+XG4gICAgPC9Sb290PlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/mixins/custom-element.d.ts b/src/main/webapp/react-component/styles/mixins/custom-element.d.ts new file mode 100644 index 00000000000..1b183bca90c --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/custom-element.d.ts @@ -0,0 +1 @@ +export declare const CustomElement: import("styled-components").FlattenSimpleInterpolation; diff --git a/src/main/webapp/react-component/styles/mixins/custom-element.js b/src/main/webapp/react-component/styles/mixins/custom-element.js new file mode 100644 index 00000000000..3cdd17b5e3d --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/custom-element.js @@ -0,0 +1,19 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { css } from 'styled-components'; +export var CustomElement = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n display: block;\n"], ["\n width: 100%;\n height: 100%;\n display: block;\n"]))); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3N0eWxlcy9taXhpbnMvY3VzdG9tLWVsZW1lbnQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBRXZDLE1BQU0sQ0FBQyxJQUFNLGFBQWEsR0FBRyxHQUFHLDJIQUFBLHdEQUkvQixJQUFBLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ3N0eWxlZC1jb21wb25lbnRzJ1xuXG5leHBvcnQgY29uc3QgQ3VzdG9tRWxlbWVudCA9IGNzc2BcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgZGlzcGxheTogYmxvY2s7XG5gXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/mixins/disabled-behavior.d.ts b/src/main/webapp/react-component/styles/mixins/disabled-behavior.d.ts new file mode 100644 index 00000000000..59c075af60d --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/disabled-behavior.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { ThemeInterface } from '../styled-components'; +export declare const DisabledBehavior: (theme: ThemeInterface) => import("styled-components").FlattenSimpleInterpolation; diff --git a/src/main/webapp/react-component/styles/mixins/disabled-behavior.js b/src/main/webapp/react-component/styles/mixins/disabled-behavior.js new file mode 100644 index 00000000000..39eb926b636 --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/disabled-behavior.js @@ -0,0 +1,5 @@ +import { __makeTemplateObject } from "tslib"; +import { css } from 'styled-components'; +export var DisabledBehavior = function (theme) { return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n opacity: ", ";\n transition: opacity ", " ease-in-out;\n cursor: not-allowed !important;\n"], ["\n opacity: ", ";\n transition: opacity ", " ease-in-out;\n cursor: not-allowed !important;\n"])), theme.minimumOpacity, theme.coreTransitionTime); }; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzYWJsZWQtYmVoYXZpb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3N0eWxlcy9taXhpbnMvZGlzYWJsZWQtYmVoYXZpb3IudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFlQSxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFFdkMsTUFBTSxDQUFDLElBQU0sZ0JBQWdCLEdBQUcsVUFBQyxLQUFxQixJQUFLLE9BQUEsR0FBRyxxS0FBQSxlQUNqRCxFQUFvQiwyQkFDVCxFQUF3QixvREFFL0MsS0FIWSxLQUFLLENBQUMsY0FBYyxFQUNULEtBQUssQ0FBQyxrQkFBa0IsR0FGVyxDQUkxRCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF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0gKHRoZW1lOiBUaGVtZUludGVyZmFjZSkgPT4gY3NzYFxuICBvcGFjaXR5OiAke3RoZW1lLm1pbmltdW1PcGFjaXR5fTtcbiAgdHJhbnNpdGlvbjogb3BhY2l0eSAke3RoZW1lLmNvcmVUcmFuc2l0aW9uVGltZX0gZWFzZS1pbi1vdXQ7XG4gIGN1cnNvcjogbm90LWFsbG93ZWQgIWltcG9ydGFudDtcbmBcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/mixins/dropshadow.d.ts b/src/main/webapp/react-component/styles/mixins/dropshadow.d.ts new file mode 100644 index 00000000000..495fc080689 --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/dropshadow.d.ts @@ -0,0 +1,2 @@ +export declare const Dropshadow: import("styled-components").FlattenSimpleInterpolation; +export declare const DropshadowLight: import("styled-components").FlattenSimpleInterpolation; diff --git a/src/main/webapp/react-component/styles/mixins/dropshadow.js b/src/main/webapp/react-component/styles/mixins/dropshadow.js new file mode 100644 index 00000000000..b6cfcf1403b --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/dropshadow.js @@ -0,0 +1,20 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { css } from 'styled-components'; +export var Dropshadow = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-shadow: 0px 0px 2px 1px rgba(255, 255, 255, 0.4),\n 2px 2px 10px 2px rgba(145, 112, 112, 0.4);\n"], ["\n box-shadow: 0px 0px 2px 1px rgba(255, 255, 255, 0.4),\n 2px 2px 10px 2px rgba(145, 112, 112, 0.4);\n"]))); +export var DropshadowLight = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-shadow: 0px 0px 2px 1px rgba(255, 255, 255, 0.3),\n 2px 2px 10px 2px rgba(0, 0, 0, 0.3);\n"], ["\n box-shadow: 0px 0px 2px 1px rgba(255, 255, 255, 0.3),\n 2px 2px 10px 2px rgba(0, 0, 0, 0.3);\n"]))); +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJvcHNoYWRvdy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvc3R5bGVzL21peGlucy9kcm9wc2hhZG93LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUV2QyxNQUFNLENBQUMsSUFBTSxVQUFVLEdBQUcsR0FBRyxnTEFBQSw2R0FHNUIsSUFBQSxDQUFBO0FBRUQsTUFBTSxDQUFDLElBQU0sZUFBZSxHQUFHLEdBQUcsMEtBQUEsdUdBR2pDLElBQUEsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJza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end of file diff --git a/src/main/webapp/react-component/styles/mixins/grab-cursor.d.ts b/src/main/webapp/react-component/styles/mixins/grab-cursor.d.ts new file mode 100644 index 00000000000..b45c423701c --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/grab-cursor.d.ts @@ -0,0 +1 @@ +export declare const GrabCursor: import("styled-components").FlattenSimpleInterpolation; diff --git a/src/main/webapp/react-component/styles/mixins/grab-cursor.js b/src/main/webapp/react-component/styles/mixins/grab-cursor.js new file mode 100644 index 00000000000..5f6b2b61478 --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/grab-cursor.js @@ -0,0 +1,19 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { css } from 'styled-components'; +export var GrabCursor = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: move;\n cursor: grab;\n"], ["\n cursor: move;\n cursor: grab;\n"]))); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhYi1jdXJzb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3N0eWxlcy9taXhpbnMvZ3JhYi1jdXJzb3IudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBRXZDLE1B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3N0eWxlZC1jb21wb25lbnRzJ1xuXG5leHBvcnQgY29uc3QgR3JhYkN1cnNvciA9IGNzc2BcbiAgY3Vyc29yOiBtb3ZlO1xuICBjdXJzb3I6IGdyYWI7XG5gXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/mixins/highlight-behavior.d.ts b/src/main/webapp/react-component/styles/mixins/highlight-behavior.d.ts new file mode 100644 index 00000000000..16e497879ea --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/highlight-behavior.d.ts @@ -0,0 +1,3 @@ +export declare const HighlightBehavior: ({ initialOpacity, }: { + initialOpacity: number; +}) => import("styled-components").FlattenSimpleInterpolation; diff --git a/src/main/webapp/react-component/styles/mixins/highlight-behavior.js b/src/main/webapp/react-component/styles/mixins/highlight-behavior.js new file mode 100644 index 00000000000..efb0db37d15 --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/highlight-behavior.js @@ -0,0 +1,22 @@ +import { __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { css } from 'styled-components'; +export var HighlightBehavior = function (_a) { + var initialOpacity = _a.initialOpacity; + return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n opacity: ", ";\n\n &:active,\n &:focus,\n &:hover {\n opacity: 1;\n }\n"], ["\n opacity: ", ";\n\n &:active,\n &:focus,\n &:hover {\n opacity: 1;\n }\n"])), initialOpacity); +}; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LWJlaGF2aW9yLmpzIiwic291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gRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdzdHlsZWQtY29tcG9uZW50cydcblxuZXhwb3J0IGNvbnN0IEhpZ2hsaWdodEJlaGF2aW9yID0gKHtcbiAgaW5pdGlhbE9wYWNpdHksXG59OiB7XG4gIGluaXRpYWxPcGFjaXR5OiBudW1iZXJcbn0pID0+IGNzc2BcbiAgb3BhY2l0eTogJHtpbml0aWFsT3BhY2l0eX07XG5cbiAgJjphY3RpdmUsXG4gICY6Zm9jdXMsXG4gICY6aG92ZXIge1xuICAgIG9wYWNpdHk6IDE7XG4gIH1cbmBcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/mixins/index.d.ts b/src/main/webapp/react-component/styles/mixins/index.d.ts new file mode 100644 index 00000000000..3bcaeaa5437 --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/index.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { CustomElement } from './custom-element'; +export { Dropshadow, DropshadowLight } from './dropshadow'; +export { GrabCursor } from './grab-cursor'; +export { IsButton } from './is-button'; +export { HighlightBehavior } from './highlight-behavior'; +export { DisabledBehavior } from './disabled-behavior'; diff --git a/src/main/webapp/react-component/styles/mixins/index.js b/src/main/webapp/react-component/styles/mixins/index.js new file mode 100644 index 00000000000..2f48420a45f --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/index.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { CustomElement } from './custom-element'; +export { Dropshadow, DropshadowLight } from './dropshadow'; +export { GrabCursor } from './grab-cursor'; +export { IsButton } from './is-button'; +export { HighlightBehavior } from './highlight-behavior'; +export { DisabledBehavior } from './disabled-behavior'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3N0eWxlcy9taXhpbnMvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDaEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxlQUFlLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFDMUQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FB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gZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBDdXN0b21FbGVtZW50IH0gZnJvbSAnLi9jdXN0b20tZWxlbWVudCdcbmV4cG9ydCB7IERyb3BzaGFkb3csIERyb3BzaGFkb3dMaWdodCB9IGZyb20gJy4vZHJvcHNoYWRvdydcbmV4cG9ydCB7IEdyYWJDdXJzb3IgfSBmcm9tICcuL2dyYWItY3Vyc29yJ1xuZXhwb3J0IHsgSXNCdXR0b24gfSBmcm9tICcuL2lzLWJ1dHRvbidcbmV4cG9ydCB7IEhpZ2hsaWdodEJlaGF2aW9yIH0gZnJvbSAnLi9oaWdobGlnaHQtYmVoYXZpb3InXG5leHBvcnQgeyBEaXNhYmxlZEJlaGF2aW9yIH0gZnJvbSAnLi9kaXNhYmxlZC1iZWhhdmlvcidcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/mixins/is-button.d.ts b/src/main/webapp/react-component/styles/mixins/is-button.d.ts new file mode 100644 index 00000000000..3ee4f78ea66 --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/is-button.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { ThemeInterface } from '../styled-components'; +export declare const IsButton: (theme: ThemeInterface) => import("styled-components").FlattenSimpleInterpolation; diff --git a/src/main/webapp/react-component/styles/mixins/is-button.js b/src/main/webapp/react-component/styles/mixins/is-button.js new file mode 100644 index 00000000000..aff326dd663 --- /dev/null +++ b/src/main/webapp/react-component/styles/mixins/is-button.js @@ -0,0 +1,5 @@ +import { __makeTemplateObject } from "tslib"; +import { css } from 'styled-components'; +export var IsButton = function (theme) { return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n line-height: ", ";\n display: inline-block;\n"], ["\n width: ", ";\n height: ", ";\n line-height: ", ";\n display: inline-block;\n"])), theme.minimumButtonSize, theme.minimumButtonSize, theme.minimumButtonSize); }; +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtYnV0dG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC9zdHlsZXMvbWl4aW5zL2lzLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWVBLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUN2QyxNQUFNLENBQUMsSUFBTSxRQUFRLEdBQUcsVUFBQyxLQUFxQixJQUFLLE9BQUEsR0FBRyx3SkFBQSxhQUMzQyxFQUF1QixlQUN0QixFQUF1QixvQkFDbEIsRUFBdUIsK0JBRXZDLEtBSlUsS0FBSyxDQUFDLGlCQUFpQixFQUN0QixLQUFLLENBQUMsaUJBQWlCLEVBQ2xCLEtBQUssQ0FBQyxpQkFBaUIsR0FIVyxDQUtsRCxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGlj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NpemV9O1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG5gXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/styled-components/index.d.ts b/src/main/webapp/react-component/styles/styled-components/index.d.ts new file mode 100644 index 00000000000..80f3c24433f --- /dev/null +++ b/src/main/webapp/react-component/styles/styled-components/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { ThemeInterface, SpecificSizingInterface, ThemeColorInterface, } from './theme'; diff --git a/src/main/webapp/react-component/styles/styled-components/index.js b/src/main/webapp/react-component/styles/styled-components/index.js new file mode 100644 index 00000000000..b0fb3deee3d --- /dev/null +++ b/src/main/webapp/react-component/styles/styled-components/index.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3N0eWxlcy9zdHlsZWQtY29tcG9uZW50cy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHtcbiAgVGhlbWVJbnRlcmZhY2UsXG4gIFNwZWNpZmljU2l6aW5nSW50ZXJmYWNlLFxuICBUaGVtZUNvbG9ySW50ZXJmYWNlLFxufSBmcm9tICcuL3RoZW1lJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/styles/styled-components/theme.d.ts b/src/main/webapp/react-component/styles/styled-components/theme.d.ts new file mode 100644 index 00000000000..17a9ab5a98d --- /dev/null +++ b/src/main/webapp/react-component/styles/styled-components/theme.d.ts @@ -0,0 +1,89 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export type SpecificSizingInterface = { + minimumButtonSize: string; + minimumLineSize: string; + minimumSpacing: string; +}; +type SizingInterface = { + mediumSpacing: string; + largeSpacing: string; +}; +type BorderRadiusInterface = { + borderRadius: string; +}; +type ScreenSizes = { + minimumScreenSize: string; + mobileScreenSize: string; + smallScreenSize: string; + mediumScreenSize: string; +}; +type ZIndexes = { + zIndexMenubar: number; + zIndexLoadingCompanion: number; + zIndexSlideout: number; + zIndexContent: number; + zIndexConfirmation: number; + zIndexHelp: number; + zIndexVerticalMenu: number; + zIndexDropdown: number; + zIndexMenuItem: number; + zIndexBlocking: number; +}; +type Transitions = { + transitionTime: string; + coreTransitionTime: string; +}; +type FontSizes = { + minimumFontSize: string; + mediumFontSize: string; + largeFontSize: string; +}; +type Dividers = { + dividerHeight: string; + minimumDividerSize: string; +}; +type Opacity = { + minimumOpacity: number; +}; +export type ThemeColorInterface = { + primaryColor: string; + positiveColor: string; + negativeColor: string; + warningColor: string; + favoriteColor: string; + backgroundNavigation: string; + backgroundAccentContent: string; + backgroundDropdown: string; + backgroundContent: string; + backgroundModal: string; + backgroundSlideout: string; + primary: string; + secondary: string; + palette: 'default' | 'custom'; +}; +type Current = { + background: string; +}; +type ThemeName = { + theme: string; +}; +type Helpers = { + screenSize: number; + multiple: (multiplier: number, variable: string, unit?: string) => string; + screenBelow: (specifiedSize: string) => boolean; +}; +export type ThemeInterface = SizingInterface & SpecificSizingInterface & BorderRadiusInterface & ScreenSizes & ZIndexes & Transitions & FontSizes & Dividers & Opacity & ThemeColorInterface & ThemeName & Helpers & Current; +export {}; diff --git a/src/main/webapp/react-component/styles/styled-components/theme.js b/src/main/webapp/react-component/styles/styled-components/theme.js new file mode 100644 index 00000000000..957e230cb97 --- /dev/null +++ b/src/main/webapp/react-component/styles/styled-components/theme.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3N0eWxlcy9zdHlsZWQtY29tcG9uZW50cy90aGVtZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdm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mROYXZpZ2F0aW9uOiBzdHJpbmdcbiAgYmFja2dyb3VuZEFjY2VudENvbnRlbnQ6IHN0cmluZ1xuICBiYWNrZ3JvdW5kRHJvcGRvd246IHN0cmluZ1xuICBiYWNrZ3JvdW5kQ29udGVudDogc3RyaW5nXG4gIGJhY2tncm91bmRNb2RhbDogc3RyaW5nXG4gIGJhY2tncm91bmRTbGlkZW91dDogc3RyaW5nXG4gIHByaW1hcnk6IHN0cmluZ1xuICBzZWNvbmRhcnk6IHN0cmluZ1xuICBwYWxldHRlOiAnZGVmYXVsdCcgfCAnY3VzdG9tJ1xufVxuXG50eXBlIEN1cnJlbnQgPSB7XG4gIGJhY2tncm91bmQ6IHN0cmluZ1xufVxuXG50eXBlIFRoZW1lTmFtZSA9IHtcbiAgdGhlbWU6IHN0cmluZ1xufVxuXG50eXBlIEhlbHBlcnMgPSB7XG4gIHNjcmVlblNpemU6IG51bWJlclxuICBtdWx0aXBsZTogKG11bHRpcGxpZXI6IG51bWJlciwgdmFyaWFibGU6IHN0cmluZywgdW5pdD86IHN0cmluZykgPT4gc3RyaW5nXG4gIHNjcmVlbkJlbG93OiAoc3BlY2lmaWVkU2l6ZTogc3RyaW5nKSA9PiBib29sZWFuXG59XG5cbmV4cG9ydCB0eXBlIFRoZW1lSW50ZXJmYWNlID0gU2l6aW5nSW50ZXJmYWNlICZcbiAgU3BlY2lmaWNTaXppbmdJbnRlcmZhY2UgJlxuICBCb3JkZXJSYWRpdXNJbnRlcmZhY2UgJlxuICBTY3JlZW5TaXplcyAmXG4gIFpJbmRleGVzICZcbiAgVHJhbnNpdGlvbnMgJlxuICBGb250U2l6ZXMgJlxuICBEaXZpZGVycyAmXG4gIE9wYWNpdHkgJlxuICBUaGVtZUNvbG9ySW50ZXJmYWNlICZcbiAgVGhlbWVOYW1lICZcbiAgSGVscGVycyAmXG4gIEN1cnJlbnRcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.d.ts b/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.d.ts new file mode 100644 index 00000000000..048130f36c6 --- /dev/null +++ b/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.d.ts @@ -0,0 +1,5 @@ +/// +declare const _default: ({ isExport }: { + isExport?: boolean | undefined; +}) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.js b/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.js new file mode 100644 index 00000000000..63a28eaeb87 --- /dev/null +++ b/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.js @@ -0,0 +1,53 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import Button from '@mui/material/Button'; +import user from '../../component/singletons/user-instance'; +import TransferList from '../../component/tabs/metacard/transfer-list'; +import { Elevations } from '../../component/theme/theme'; +import { useDialog } from '../../component/dialog'; +import { TypedUserInstance } from '../../component/singletons/TypedUser'; +import { StartupDataStore } from '../../js/model/Startup/startup'; +export default (function (_a) { + var _b = _a.isExport, isExport = _b === void 0 ? false : _b; + var requiredAttributes = StartupDataStore.Configuration.getRequiredExportAttributes(); + var dialogContext = useDialog(); + return (React.createElement(Button, { "data-id": "manage-attributes-button", onClick: function () { + dialogContext.setProps({ + PaperProps: { + style: { + minWidth: 'none', + }, + elevation: Elevations.panels, + }, + open: true, + disableEnforceFocus: true, + children: (React.createElement("div", { style: { + minHeight: '60vh', + } }, + React.createElement(TransferList, { startingLeft: TypedUserInstance.getResultsAttributesSummaryShown(), requiredAttributes: requiredAttributes, startingRight: TypedUserInstance.getResultsAttributesPossibleSummaryShown(), startingHideEmpty: user + .get('user') + .get('preferences') + .get('inspector-hideEmpty'), onSave: function (active, newHideEmpty) { + user.get('user').get('preferences').set({ + 'inspector-summaryShown': active, + 'inspector-hideEmpty': newHideEmpty, + }); + user.savePreferences(); + } }))), + }); + }, color: "primary", size: "small", style: { height: 'auto' } }, isExport ? 'Select Attributes to Export' : 'Manage Attributes')); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VtbWFyeS1tYW5hZ2UtYXR0cmlidXRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvc3VtbWFyeS1tYW5hZ2UtYXR0cmlidXRlcy9zdW1tYXJ5LW1hbmFnZS1hdHRyaWJ1dGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFDekMsT0FBTyxJQUFJLE1BQU0sMENBQTBDLENBQUE7QUFDM0QsT0FBTyxZQUFZLE1BQU0sNkNBQTZDLENBQUE7QUFDdEUsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLDZCQUE2QixDQUFBO0FBQ3hELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQTtBQUNsRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQTtBQUN4RSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQTtBQUVqRSxnQkFBZSxVQUFDLEVBQTRDO1FBQTFDLGdCQUFnQixFQUFoQixRQUFRLG1CQ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yZS5Db25maWd1cmF0aW9uLmdldFJlcXVpcmVkRXhwb3J0QXR0cmlidXRlcygpXG4gIGNvbnN0IGRpYWxvZ0NvbnRleHQgPSB1c2VEaWFsb2coKVxuICByZXR1cm4gKFxuICAgIDxCdXR0b25cbiAgICAgIGRhdGEtaWQ9XCJtYW5hZ2UtYXR0cmlidXRlcy1idXR0b25cIlxuICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICBkaWFsb2dDb250ZXh0LnNldFByb3BzKHtcbiAgICAgICAgICBQYXBlclByb3BzOiB7XG4gICAgICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgICBtaW5XaWR0aDogJ25vbmUnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVsZXZhdGlvbjogRWxldmF0aW9ucy5wYW5lbHMsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBvcGVuOiB0cnVlLFxuICAgICAgICAgIGRpc2FibGVFbmZvcmNlRm9jdXM6IHRydWUsXG4gICAgICAgICAgY2hpbGRyZW46IChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICBtaW5IZWlnaHQ6ICc2MHZoJyxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPFRyYW5zZmVyTGlzdFxuICAgICAgICAgICAgICAgIHN0YXJ0aW5nTGVmdD17VHlwZWRVc2VySW5zdGFuY2UuZ2V0UmVzdWx0c0F0dHJpYnV0ZXNTdW1tYXJ5U2hvd24oKX1cbiAgICAgICAgICAgICAgICByZXF1aXJlZEF0dHJpYnV0ZXM9e3JlcXVpcmVkQXR0cmlidXRlc31cbiAgICAgICAgICAgICAgICBzdGFydGluZ1JpZ2h0PXtUeXBlZFVzZXJJbnN0YW5jZS5nZXRSZXN1bHRzQXR0cmlidXRlc1Bvc3NpYmxlU3VtbWFyeVNob3duKCl9XG4gICAgICAgICAgICAgICAgc3RhcnRpbmdIaWRlRW1wdHk9e3VzZXJcbiAgICAgICAgICAgICAgICAgIC5nZXQoJ3VzZXInKVxuICAgICAgICAgICAgICAgICAgLmdldCgncHJlZmVyZW5jZXMnKVxuICAgICAgICAgICAgICAgICAgLmdldCgnaW5zcGVjdG9yLWhpZGVFbXB0eScpfVxuICAgICAgICAgICAgICAgIG9uU2F2ZT17KGFjdGl2ZTogYW55LCBuZXdIaWRlRW1wdHk6IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgICAgdXNlci5nZXQoJ3VzZXInKS5nZXQoJ3ByZWZlcmVuY2VzJykuc2V0KHtcbiAgICAgICAgICAgICAgICAgICAgJ2luc3BlY3Rvci1zdW1tYXJ5U2hvd24nOiBhY3RpdmUsXG4gICAgICAgICAgICAgICAgICAgICdpbnNwZWN0b3ItaGlkZUVtcHR5JzogbmV3SGlkZUVtcHR5LFxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgIHVzZXIuc2F2ZVByZWZlcmVuY2VzKClcbiAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgKSxcbiAgICAgICAgfSlcbiAgICAgIH19XG4gICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgc2l6ZT1cInNtYWxsXCJcbiAgICAgIHN0eWxlPXt7IGhlaWdodDogJ2F1dG8nIH19XG4gICAgPlxuICAgICAge2lzRXhwb3J0ID8gJ1NlbGVjdCBBdHRyaWJ1dGVzIHRvIEV4cG9ydCcgOiAnTWFuYWdlIEF0dHJpYnV0ZXMnfVxuICAgIDwvQnV0dG9uPlxuICApXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/text-field/index.d.ts b/src/main/webapp/react-component/text-field/index.d.ts new file mode 100644 index 00000000000..cdc3cf00166 --- /dev/null +++ b/src/main/webapp/react-component/text-field/index.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import textfield from './text-field'; +export default textfield; diff --git a/src/main/webapp/react-component/text-field/index.js b/src/main/webapp/react-component/text-field/index.js new file mode 100644 index 00000000000..9f60f9a3d2a --- /dev/null +++ b/src/main/webapp/react-component/text-field/index.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import textfield from './text-field'; +export default textfield; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3RleHQtZmllbGQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sU0FBUyxNQUFNLGNBQWMsQ0FBQTtBQUNwQyxlQUFlLFNBQVMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuaW1wb3J0IHRleHRmaWVsZCBmcm9tICcuL3RleHQtZmllbGQnXG5leHBvcnQgZGVmYXVsdCB0ZXh0ZmllbGRcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/text-field/text-field.d.ts b/src/main/webapp/react-component/text-field/text-field.d.ts new file mode 100644 index 00000000000..047945189bb --- /dev/null +++ b/src/main/webapp/react-component/text-field/text-field.d.ts @@ -0,0 +1,7 @@ +/// +type Props = { + value?: string; + onChange?: (...args: any[]) => any; +}; +declare const TextField: (props: Props) => JSX.Element; +export default TextField; diff --git a/src/main/webapp/react-component/text-field/text-field.js b/src/main/webapp/react-component/text-field/text-field.js new file mode 100644 index 00000000000..e0d8218ece2 --- /dev/null +++ b/src/main/webapp/react-component/text-field/text-field.js @@ -0,0 +1,35 @@ +import { __assign, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Group from '../group'; +import TextFieldMui from '@mui/material/TextField'; +var TextField = function (props) { + // @ts-expect-error ts-migrate(2339) FIXME: Property 'label' does not exist on type 'Props'. + var label = props.label, addon = props.addon, value = props.value, _a = props.type, type = _a === void 0 ? 'text' : _a, onChange = props.onChange, rest = __rest(props, ["label", "addon", "value", "type", "onChange"]); + return (React.createElement(Group, null, + label !== undefined ? (React.createElement("span", { className: "p-2 shrink-0 grow-0", style: { + minWidth: '120px', + } }, + label, + "\u00A0")) : null, + React.createElement(TextFieldMui, __assign({ size: "small", variant: "outlined", fullWidth: true, className: "shrink overflow-hidden", value: value !== undefined ? value : '', type: type, onChange: function (e) { + // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message + onChange(e.target.value); + } }, rest)), + addon !== undefined ? (React.createElement("label", { className: "p-2 shrink-0 grow-0" }, addon)) : null)); +}; +export default TextField; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1maWVsZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3V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luV2lkdGg6ICcxMjBweCcsXG4gICAgICAgICAgfX1cbiAgICAgICAgPlxuICAgICAgICAgIHtsYWJlbH1cbiAgICAgICAgICAmbmJzcDtcbiAgICAgICAgPC9zcGFuPlxuICAgICAgKSA6IG51bGx9XG4gICAgICA8VGV4dEZpZWxkTXVpXG4gICAgICAgIHNpemU9XCJzbWFsbFwiXG4gICAgICAgIHZhcmlhbnQ9XCJvdXRsaW5lZFwiXG4gICAgICAgIGZ1bGxXaWR0aFxuICAgICAgICBjbGFzc05hbWU9XCJzaHJpbmsgb3ZlcmZsb3ctaGlkZGVuXCJcbiAgICAgICAgdmFsdWU9e3ZhbHVlICE9PSB1bmRlZmluZWQgPyB2YWx1ZSA6ICcnfVxuICAgICAgICB0eXBlPXt0eXBlfVxuICAgICAgICBvbkNoYW5nZT17KGUpID0+IHtcbiAgICAgICAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoMjcyMikgRklYTUU6IENhbm5vdCBpbnZva2UgYW4gb2JqZWN0IHdoaWNoIGlzIHBvc3NpYmx5ICd1bmRlZmluLi4uIFJlbW92ZSB0aGlzIGNvbW1lbnQgdG8gc2VlIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2VcbiAgICAgICAgICBvbkNoYW5nZShlLnRhcmdldC52YWx1ZSlcbiAgICAgICAgfX1cbiAgICAgICAgey4uLnJlc3R9XG4gICAgICAvPlxuICAgICAge2FkZG9uICE9PSB1bmRlZmluZWQgPyAoXG4gICAgICAgIDxsYWJlbCBjbGFzc05hbWU9XCJwLTIgc2hyaW5rLTAgZ3Jvdy0wXCI+e2FkZG9ufTwvbGFiZWw+XG4gICAgICApIDogbnVsbH1cbiAgICA8L0dyb3VwPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IFRleHRGaWVsZFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/text-field/text-field.spec.d.ts b/src/main/webapp/react-component/text-field/text-field.spec.d.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/src/main/webapp/react-component/text-field/text-field.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/main/webapp/react-component/text-field/text-field.spec.js b/src/main/webapp/react-component/text-field/text-field.spec.js new file mode 100644 index 00000000000..9cfcca70a44 --- /dev/null +++ b/src/main/webapp/react-component/text-field/text-field.spec.js @@ -0,0 +1,37 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import Enzyme from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; +import { expect } from 'chai'; +Enzyme.configure({ adapter: new Adapter() }); +import TextField from './text-field'; +var mount = Enzyme.mount; +describe('', function () { + it(' should have the right value', function () { + var wrapper = mount(React.createElement(TextField, { value: "test" })); + expect(wrapper.find('input').prop('value')).to.equal('test'); + }); + it('should update input on change', function (done) { + var onChange = function (value) { + expect(value).to.equal('test'); + done(); + }; + var wrapper = mount(React.createElement(TextField, { onChange: onChange })); + // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message + wrapper.find('input').prop('onChange')({ target: { value: 'test' } }); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1maWVsZC5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC90ZXh0LWZpZWxkL3RleHQtZmllbGQuc3BlYy50c3giXSwibmFtZXMiOltdLCJ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G1vdW50KDxUZXh0RmllbGQgb25DaGFuZ2U9e29uQ2hhbmdlfSAvPilcbiAgICAvLyBAdHMtZXhwZWN0LWVycm9yIHRzLW1pZ3JhdGUoMjcyMikgRklYTUU6IENhbm5vdCBpbnZva2UgYW4gb2JqZWN0IHdoaWNoIGlzIHBvc3NpYmx5ICd1bmRlZmluLi4uIFJlbW92ZSB0aGlzIGNvbW1lbnQgdG8gc2VlIHRoZSBmdWxsIGVycm9yIG1lc3NhZ2VcbiAgICB3cmFwcGVyLmZpbmQoJ2lucHV0JykucHJvcCgnb25DaGFuZ2UnKSh7IHRhcmdldDogeyB2YWx1ZTogJ3Rlc3QnIH0gfSlcbiAgfSlcbn0pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/theme-settings/color-tool.d.ts b/src/main/webapp/react-component/theme-settings/color-tool.d.ts new file mode 100644 index 00000000000..de7a7ebd9af --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/color-tool.d.ts @@ -0,0 +1,4 @@ +/// +declare function ColorTool(props: any): JSX.Element; +declare const _default: typeof ColorTool; +export default _default; diff --git a/src/main/webapp/react-component/theme-settings/color-tool.js b/src/main/webapp/react-component/theme-settings/color-tool.js new file mode 100644 index 00000000000..34d14388a9f --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/color-tool.js @@ -0,0 +1,204 @@ +import { __assign, __read } from "tslib"; +/** + * Adapted from https://github.com/mui-org/material-ui/blob/master/docs/src/pages/customization/color/ColorTool.js + */ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import { rgbToHex, useTheme } from '@mui/material/styles'; +import colors from './typed-colors'; +import Grid from '@mui/material/Grid'; +import Input from '@mui/material/Input'; +import Radio from '@mui/material/Radio'; +import Tooltip from '@mui/material/Tooltip'; +import Typography from '@mui/material/Typography'; +import Button from '@mui/material/Button'; +import _ from 'lodash'; +import CheckIcon from '@mui/icons-material/Check'; +import Slider from '@mui/material/Slider'; +import user from '../../component/singletons/user-instance'; +import { capitalize } from '@mui/material/utils'; +var shades = [ + 900, + 800, + 700, + 600, + 500, + 400, + 300, + 200, + 100, + 50, + 'A700', + 'A400', + 'A200', + 'A100', +]; +var containsShades = function (color, shades) { + return shades.every(function (shade) { return Object.keys(color).includes(shade.toString()); }); +}; +var getHues = function () { + var hues = Object.keys(colors).filter(function (hue) { + return containsShades(colors[hue], shades); + }); + return hues.slice(1, 17); +}; +var hues = getHues(); +/** + * Costly to update, so let them settle on a color first + */ +var updateTheme = _.debounce(function (state) { + user.get('user').get('preferences').get('theme').set({ + primary: state.primary, + secondary: state.secondary, + }); +}, 0); +var getDefaults = function () { + return __assign({ primary: '#2196f3', secondary: '#f50057' }, user.get('user').get('preferences').get('theme').toJSON()); +}; +function ColorTool(props) { + var classes = props.classes; + var theme = useTheme(); + var defaults = getDefaults(); + var _a = __read(React.useState({ + primary: defaults.primary, + secondary: defaults.secondary, + primaryInput: defaults.primary, + secondaryInput: defaults.secondary, + primaryHue: 'blue', + secondaryHue: 'pink', + primaryShade: 4, + secondaryShade: 11, + }), 2), state = _a[0], setState = _a[1]; + var handleChangeColor = function (name) { return function (event) { + var isRgb = function (string) { + return /rgb\([0-9]{1,3}\s*,\s*[0-9]{1,3}\s*,\s*[0-9]{1,3}\)/i.test(string); + }; + var isHex = function (string) { + return /^#?([0-9a-f]{3})$|^#?([0-9a-f]){6}$/i.test(string); + }; + var color = event.target.value; + setState(function (prevState) { + var _a; + return (__assign(__assign({}, prevState), (_a = {}, _a["".concat(name, "Input")] = color, _a))); + }); + var isValidColor = false; + if (isRgb(color)) { + isValidColor = true; + } + else if (isHex(color)) { + isValidColor = true; + if (color.indexOf('#') === -1) { + color = "#".concat(color); + } + } + if (isValidColor) { + setState(function (prevState) { + var _a; + return (__assign(__assign({}, prevState), (_a = {}, _a[name] = color, _a))); + }); + } + }; }; + var handleChangeHue = function (name) { return function (event) { + var _a; + var hue = event.target.value; + var shade = state["".concat(name, "Shade")]; + // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message + var color = colors[hue][shades[shade]]; + if (color) { + setState(__assign(__assign({}, state), (_a = {}, _a["".concat(name, "Hue")] = hue, _a[name] = color, _a["".concat(name, "Input")] = color, _a))); + } + }; }; + var handleChangeShade = function (name) { return function (_event, shade) { + var _a; + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var color = colors[state["".concat(name, "Hue")]][shades[shade]]; + setState(__assign(__assign({}, state), (_a = {}, _a["".concat(name, "Shade")] = shade, _a[name] = color, _a["".concat(name, "Input")] = color, _a))); + }; }; + React.useEffect(function () { + updateTheme(state); + }, [state]); + var colorBar = function (color, intent) { + var background = theme.palette.augmentColor({ + color: { + main: color, + }, + }); + return (React.createElement(Grid, { container: true, sx: { marginTop: theme.spacing(2) } }, ['dark', 'main', 'light'].map(function (key) { + var backgroundColor = background[key]; + return (React.createElement(Tooltip, { placement: "right", title: (function () { + switch (key) { + case 'dark': + return 'Go darker'; + case 'light': + return 'Go lighter'; + default: + return 'Current shade'; + } + })(), key: key }, + React.createElement(Button, { sx: { + width: 64, + height: 64, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + backgroundColor: backgroundColor, + }, onClick: function () { + var _a; + setState(__assign(__assign({}, state), (_a = {}, _a[intent] = rgbToHex(backgroundColor), _a["".concat(intent, "Input")] = rgbToHex(backgroundColor), _a))); + } }, + React.createElement(Typography, { variant: "caption", style: { + color: theme.palette.getContrastText(backgroundColor), + } }, rgbToHex(backgroundColor))))); + }))); + }; + var colorPicker = function (intent) { + var intentInput = state["".concat(intent, "Input")]; + var intentShade = state["".concat(intent, "Shade")]; + var color = state["".concat(intent)]; + return (React.createElement(Grid, { item: true, xs: 12, sm: 6, md: 4, className: "min-w-104" }, + React.createElement(Typography, { component: "label", gutterBottom: true, htmlFor: intent, variant: "h6" }, capitalize(intent)), + React.createElement(Input, { id: intent, value: intentInput, onChange: handleChangeColor(intent), fullWidth: true }), + React.createElement("div", { style: { + display: 'flex', + alignItems: 'center', + marginTop: theme.spacing(2), + marginBottom: theme.spacing(2), + } }, + React.createElement(Typography, { id: "".concat(intent, "ShadeSliderLabel") }, "Shade:"), + React.createElement(Slider, { sx: { + width: 'calc(100% - 80px)', + marginLeft: theme.spacing(3), + marginRight: theme.spacing(3), + }, value: intentShade, min: 0, max: 13, step: 1, onChange: handleChangeShade(intent), "aria-labelledby": "".concat(intent, "ShadeSliderLabel") }), + React.createElement(Typography, null, shades[intentShade])), + React.createElement("div", { style: { width: 192 } }, hues.map(function (hue) { + var shade = intent === 'primary' + ? shades[state.primaryShade] + : shades[state.secondaryShade]; + // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message + var backgroundColor = colors[hue][shade]; + return (React.createElement(Tooltip, { placement: "right", title: hue, key: hue }, + React.createElement(Radio, { sx: { padding: 0 }, color: "default", checked: state[intent] === backgroundColor, onChange: handleChangeHue(intent), value: hue, name: intent, "aria-labelledby": "tooltip-".concat(intent, "-").concat(hue), icon: React.createElement("div", { style: { + backgroundColor: backgroundColor, + width: 48, + height: 48, + } }), checkedIcon: React.createElement("div", { style: { + backgroundColor: backgroundColor, + width: 48, + height: 48, + border: '1px solid white', + color: theme.palette.common.white, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + } }, + React.createElement(CheckIcon, { style: { fontSize: 30 } })) }))); + })), + colorBar(color, intent))); + }; + return (React.createElement(Grid, { container: true, spacing: 5, className: classes === null || classes === void 0 ? void 0 : classes.root }, + colorPicker('primary'), + colorPicker('secondary'))); +} +export default hot(module)(ColorTool); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sb3ItdG9vbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvdGhlbWUtc2V0dGluZ3MvY29sb3ItdG9v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AgICAgICAgICAgdGl0bGU9eygoKSA9PiB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICAgICAgICAgIGNhc2UgJ2RhcmsnOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ0dvIGRhcmtlcidcbiAgICAgICAgICAgICAgICAgIGNhc2UgJ2xpZ2h0JzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdHbyBsaWdodGVyJ1xuICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdDdXJyZW50IHNoYWRlJ1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSkoKX1cbiAgICAgICAgICAgICAga2V5PXtrZXl9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICAgICAgd2lkdGg6IDY0LFxuICAgICAgICAgICAgICAgICAgaGVpZ2h0OiA2NCxcbiAgICAgICAgICAgICAgICAgIGRpc3BsYXk6ICdmbGV4JyxcbiAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcbiAgICAgICAgICAgICAgICAgIGFsaWduSXRlbXM6ICdjZW50ZXInLFxuICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yLFxuICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgc2V0U3RhdGUoe1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgW2ludGVudF06IHJnYlRvSGV4KGJhY2tncm91bmRDb2xvciksXG4gICAgICAgICAgICAgICAgICAgIFtgJHtpbnRlbnR9SW5wdXRgXTogcmdiVG9IZXgoYmFja2dyb3VuZENvbG9yKSxcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxUeXBvZ3JhcGh5XG4gICAgICAgICAgICAgICAgICB2YXJpYW50PVwiY2FwdGlvblwiXG4gICAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5nZXRDb250cmFzdFRleHQoYmFja2dyb3VuZENvbG9yKSxcbiAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAge3JnYlRvSGV4KGJhY2tncm91bmRDb2xvcil9XG4gICAgICAgICAgICAgICAgPC9UeXBvZ3JhcGh5PlxuICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgIDwvVG9vbHRpcD5cbiAgICAgICAgICApXG4gICAgICAgIH0pfVxuICAgICAgPC9HcmlkPlxuICAgIClcbiAgfVxuXG4gIGNvbnN0IGNvbG9yUGlja2VyID0gKGludGVudDogJ3ByaW1hcnknIHwgJ3NlY29uZGFyeScpID0+IHtcbiAgICBjb25zdCBpbnRlbnRJbnB1dCA9IHN0YXRlW2Ake2ludGVudH1JbnB1dGAgYXMgJ3ByaW1hcnlJbnB1dCddXG4gICAgY29uc3QgaW50ZW50U2hhZGUgPSBzdGF0ZVtgJHtpbnRlbnR9U2hhZGVgIGFzICdwcmltYXJ5U2hhZGUnXVxuICAgIGNvbnN0IGNvbG9yID0gc3RhdGVbYCR7aW50ZW50fWAgYXMgJ3ByaW1hcnknXVxuXG4gICAgcmV0dXJuIChcbiAgICAgIDxHcmlkIGl0ZW0geHM9ezEyfSBzbT17Nn0gbWQ9ezR9IGNsYXNzTmFtZT1cIm1pbi13LTEwNFwiPlxuICAgICAgICA8VHlwb2dyYXBoeVxuICAgICAgICAgIGNvbXBvbmVudD1cImxhYmVsXCJcbiAgICAgICAgICBndXR0ZXJCb3R0b21cbiAgICAgICAgICBodG1sRm9yPXtpbnRlbnR9XG4gICAgICAgICAgdmFyaWFudD1cImg2XCJcbiAgICAgICAgPlxuICAgICAgICAgIHtjYXBpdGFsaXplKGludGVudCl9XG4gICAgICAgIDwvVHlwb2dyYXBoeT5cbiAgICAgICAgPElucHV0XG4gICAgICAgICAgaWQ9e2ludGVudH1cbiAgICAgICAgICB2YWx1ZT17aW50ZW50SW5wdXR9XG4gICAgICAgICAgb25DaGFuZ2U9e2hhbmRsZUNoYW5nZUNvbG9yKGludGVudCl9XG4gICAgICAgICAgZnVsbFdpZHRoXG4gICAgICAgIC8+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgICAgICAgICAgYWxpZ25JdGVtczogJ2NlbnRlcicsXG4gICAgICAgICAgICBtYXJnaW5Ub3A6IHRoZW1lLnNwYWNpbmcoMiksXG4gICAgICAgICAgICBtYXJnaW5Cb3R0b206IHRoZW1lLnNwYWNpbmcoMiksXG4gICAgICAgICAgfX1cbiAgICAgICAgPlxuICAgICAgICAgIDxUeXBvZ3JhcGh5IGlkPXtgJHtpbnRlbnR9U2hhZGVTbGlkZXJMYWJlbGB9PlNoYWRlOjwvVHlwb2dyYXBoeT5cbiAgICAgICAgICA8U2xpZGVyXG4gICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICB3aWR0aDogJ2NhbGMoMTAwJSAtIDgwcHgpJyxcbiAgICAgICAgICAgICAgbWFyZ2luTGVmdDogdGhlbWUuc3BhY2luZygzKSxcbiAgICAgICAgICAgICAgbWFyZ2luUmlnaHQ6IHRoZW1lLnNwYWNpbmcoMyksXG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgdmFsdWU9e2ludGVudFNoYWRlfVxuICAgICAgICAgICAgbWluPXswfVxuICAgICAgICAgICAgbWF4PXsxM31cbiAgICAgICAgICAgIHN0ZXA9ezF9XG4gICAgICAgICAgICBvbkNoYW5nZT17aGFuZGxlQ2hhbmdlU2hhZGUoaW50ZW50K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GVudF0gPT09IGJhY2tncm91bmRDb2xvcn1cbiAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXtoYW5kbGVDaGFuZ2VIdWUoaW50ZW50KX1cbiAgICAgICAgICAgICAgICAgIHZhbHVlPXtodWV9XG4gICAgICAgICAgICAgICAgICBuYW1lPXtpbnRlbnR9XG4gICAgICAgICAgICAgICAgICBhcmlhLWxhYmVsbGVkYnk9e2B0b29sdGlwLSR7aW50ZW50fS0ke2h1ZX1gfVxuICAgICAgICAgICAgICAgICAgaWNvbj17XG4gICAgICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDQ4LFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiA0OCxcbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgY2hlY2tlZEljb249e1xuICAgICAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcixcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiA0OCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogNDgsXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6ICcxcHggc29saWQgd2hpdGUnLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHRoZW1lLnBhbGV0dGUuY29tbW9uLndoaXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ6ICdjZW50ZXInLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25JdGVtczogJ2NlbnRlcicsXG4gICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgIDxDaGVja0ljb24gc3R5bGU9e3sgZm9udFNpemU6IDMwIH19IC8+XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgIDwvVG9vbHRpcD5cbiAgICAgICAgICAgIClcbiAgICAgICAgICB9KX1cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIHtjb2xvckJhcihjb2xvciwgaW50ZW50KX1cbiAgICAgIDwvR3JpZD5cbiAgICApXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxHcmlkIGNvbnRhaW5lciBzcGFjaW5nPXs1fSBjbGFzc05hbWU9e2NsYXNzZXM/LnJvb3R9PlxuICAgICAge2NvbG9yUGlja2VyKCdwcmltYXJ5Jyl9XG4gICAgICB7Y29sb3JQaWNrZXIoJ3NlY29uZGFyeScpfVxuICAgIDwvR3JpZD5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShDb2xvclRvb2wpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/theme-settings/index.d.ts b/src/main/webapp/react-component/theme-settings/index.d.ts new file mode 100644 index 00000000000..055fe56f1f1 --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './theme-settings'; diff --git a/src/main/webapp/react-component/theme-settings/index.js b/src/main/webapp/react-component/theme-settings/index.js new file mode 100644 index 00000000000..bf30f947ad8 --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './theme-settings'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3RoZW1lLXNldHRpbmdzL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGtCQUFrQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi90aGVtZS1zZXR0aW5ncydcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/theme-settings/theme-settings.d.ts b/src/main/webapp/react-component/theme-settings/theme-settings.d.ts new file mode 100644 index 00000000000..1393c75d0a6 --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/theme-settings.d.ts @@ -0,0 +1,3 @@ +/// +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/theme-settings/theme-settings.js b/src/main/webapp/react-component/theme-settings/theme-settings.js new file mode 100644 index 00000000000..d5f2212fe8f --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/theme-settings.js @@ -0,0 +1,91 @@ +import { __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/*global require*/ +import * as React from 'react'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Checkbox from '@mui/material/Checkbox'; +import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook'; +import user from '../../component/singletons/user-instance'; +import { hot } from 'react-hot-loader'; +import Grid from '@mui/material/Grid'; +import ColorTool from './color-tool'; +window.user = user; +var getPreferences = function () { + return user.get('user').get('preferences'); +}; +var getAnimationMode = function () { + return Boolean(getPreferences().get('animation')); +}; +var getCurrentTheme = function () { + return getPreferences().get('theme').toJSON(); +}; +var AnimationSetting = function () { + var _a = __read(React.useState(getAnimationMode()), 2), animationMode = _a[0], setAnimationMode = _a[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:animation', function () { + setAnimationMode(getAnimationMode()); + }); + }, []); + return (React.createElement(FormControlLabel, { labelPlacement: "start", control: React.createElement(Checkbox, { color: "default", checked: animationMode, onChange: function (e) { + getPreferences().set('animation', e.target.checked); + getPreferences().savePreferences(); + } }), label: "Animation" })); +}; +var ThemeMode = function () { + var _a = __read(React.useState(getCurrentTheme().theme === 'dark'), 2), darkMode = _a[0], setDarkMode = _a[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:theme', function () { + setDarkMode(getCurrentTheme().theme === 'dark'); + }); + }, []); + return (React.createElement(FormControlLabel, { labelPlacement: "start", control: React.createElement(Checkbox, { color: "default", checked: darkMode, onChange: function (e) { + getPreferences() + .get('theme') + .set('theme', e.target.checked ? 'dark' : 'light'); + getPreferences().savePreferences(); + } }), label: "Dark Mode" })); +}; +var ThemePalette = function () { + var _a = __read(React.useState(getCurrentTheme().palette === 'custom'), 2), palette = _a[0], setPalette = _a[1]; + var listenTo = useBackbone().listenTo; + React.useEffect(function () { + listenTo(user.get('user').get('preferences'), 'change:theme', function () { + setPalette(getCurrentTheme().palette === 'custom'); + }); + }, []); + return (React.createElement(React.Fragment, null, + React.createElement(Grid, { item: true }, + React.createElement(FormControlLabel, { labelPlacement: "start", control: React.createElement(Checkbox, { color: "default", checked: palette, onChange: function (e) { + getPreferences() + .get('theme') + .set('palette', e.target.checked ? 'custom' : 'default'); + getPreferences().savePreferences(); + } }), label: "Custom Palette" })), + React.createElement(Grid, { item: true, className: "w-full ".concat(palette ? '' : 'hidden') }, + React.createElement(ColorTool, null)))); +}; +var ThemeSettings = function () { + return (React.createElement(Grid, { container: true, direction: "column", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(AnimationSetting, null)), + React.createElement(Grid, { item: true, className: "w-full" }, + React.createElement(ThemeMode, null)), + React.createElement(ThemePalette, null))); +}; +export default hot(module)(ThemeSettings); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUtc2V0dGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3RoZW1lLXNldHRpbmdzL3RoZW1lLXNldHRpbmdzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLGtCQUFrQjtBQUNsQixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLGdCQUFnQixNQUFNLGdDQUFnQyxDQUFBO0FBQzdELE9BQU8sUUFBUSxNQUFNLHdCQUF3QixDQUFBO0FBQzdDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxxREF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AgICAgIDwvR3JpZD5cbiAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPXtgdy1mdWxsICR7cGFsZXR0ZSA/ICcnIDogJ2hpZGRlbid9YH0+XG4gICAgICAgIDxDb2xvclRvb2wgLz5cbiAgICAgIDwvR3JpZD5cbiAgICA8Lz5cbiAgKVxufVxuY29uc3QgVGhlbWVTZXR0aW5ncyA9ICgpID0+IHtcbiAgcmV0dXJuIChcbiAgICA8R3JpZCBjb250YWluZXIgZGlyZWN0aW9uPVwiY29sdW1uXCIgd3JhcD1cIm5vd3JhcFwiPlxuICAgICAgPEdyaWQgaXRlbSBjbGFzc05hbWU9XCJ3LWZ1bGxcIj5cbiAgICAgICAgPEFuaW1hdGlvblNldHRpbmcgLz5cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxHcmlkIGl0ZW0gY2xhc3NOYW1lPVwidy1mdWxsXCI+XG4gICAgICAgIDxUaGVtZU1vZGUgLz5cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxUaGVtZVBhbGV0dGUgLz5cbiAgICA8L0dyaWQ+XG4gIClcbn1cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFRoZW1lU2V0dGluZ3MpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/theme-settings/typed-colors.d.ts b/src/main/webapp/react-component/theme-settings/typed-colors.d.ts new file mode 100644 index 00000000000..95c8a001d52 --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/typed-colors.d.ts @@ -0,0 +1,6 @@ +declare const _default: { + [key: string]: { + [key: number]: string; + }; +}; +export default _default; diff --git a/src/main/webapp/react-component/theme-settings/typed-colors.js b/src/main/webapp/react-component/theme-settings/typed-colors.js new file mode 100644 index 00000000000..6a4ee2baa5e --- /dev/null +++ b/src/main/webapp/react-component/theme-settings/typed-colors.js @@ -0,0 +1,3 @@ +import * as colors from '@mui/material/colors'; +export default colors; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZWQtY29sb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC90aGVtZS1zZXR0aW5ncy90eXBlZC1jb2xvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE1BQU0sc0JBQXNCLENBQUE7QUFFOUMsZUFBZSxNQUlkLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBjb2xvcnMgZnJvbSAnQG11aS9tYXRlcmlhbC9jb2xvcnMnXG5cbmV4cG9ydCBkZWZhdWx0IGNvbG9ycyBhcyB7XG4gIFtrZXk6IHN0cmluZ106IHtcbiAgICBba2V5OiBudW1iZXJdOiBzdHJpbmdcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/theme/index.d.ts b/src/main/webapp/react-component/theme/index.d.ts new file mode 100644 index 00000000000..38faf19ee55 --- /dev/null +++ b/src/main/webapp/react-component/theme/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './theme'; diff --git a/src/main/webapp/react-component/theme/index.js b/src/main/webapp/react-component/theme/index.js new file mode 100644 index 00000000000..53eda841f2b --- /dev/null +++ b/src/main/webapp/react-component/theme/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './theme'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3RoZW1lL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFNBQVMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vdGhlbWUnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/theme/theme.d.ts b/src/main/webapp/react-component/theme/theme.d.ts new file mode 100644 index 00000000000..a50895c1d5d --- /dev/null +++ b/src/main/webapp/react-component/theme/theme.d.ts @@ -0,0 +1,110 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { WithBackboneProps } from '../backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/theme/theme.js b/src/main/webapp/react-component/theme/theme.js new file mode 100644 index 00000000000..378871e480b --- /dev/null +++ b/src/main/webapp/react-component/theme/theme.js @@ -0,0 +1,217 @@ +import { __assign, __extends } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { ThemeProvider } from 'styled-components'; +import user from '../../component/singletons/user-instance'; +import withListenTo from '../backbone-container'; +import $ from 'jquery'; +import _ from 'underscore'; +import { v4 } from 'uuid'; +var sizing = { + comfortable: { + minimumButtonSize: '2.75rem', + minimumLineSize: '1.875rem', + minimumSpacing: '0.625rem', + }, + cozy: { + minimumButtonSize: '2.275rem', + minimumLineSize: '1.6875rem', + minimumSpacing: '0.4625rem', + }, + compact: { + minimumButtonSize: '1.8rem', + minimumLineSize: '1.5rem', + minimumSpacing: '0.3rem', + }, +}; +var borderRadius = { + borderRadius: '1px', +}; +var screenSizes = { + minimumScreenSize: '20rem', + mobileScreenSize: '26.25rem', + smallScreenSize: '58.75rem', + mediumScreenSize: '90rem', +}; +var zIndexes = { + zIndexMenubar: 101, + zIndexLoadingCompanion: 101, + zIndexSlideout: 103, + zIndexContent: 101, + zIndexConfirmation: 103, + zIndexHelp: 104, + zIndexVerticalMenu: 101, + zIndexDropdown: 103, + zIndexMenuItem: 102, + zIndexBlocking: 105, +}; +var transitions = { + transitionTime: '0s', + coreTransitionTime: '0.250s', +}; +var fontSizes = { + minimumFontSize: '0.75rem', + mediumFontSize: '1rem', + largeFontSize: '1.25rem', +}; +var spacing = function (minSpacing) { + return { + minimumSpacing: "".concat(minSpacing, "rem"), + mediumSpacing: "".concat(2 * minSpacing, "rem"), + largeSpacing: "".concat(3 * minSpacing, "rem"), + }; +}; +var dividers = function (minSpacing) { + return { + dividerHeight: "".concat(minSpacing, "rem"), + minimumDividerSize: "".concat(3 * minSpacing, "rem"), + }; +}; +var opacity = { + minimumOpacity: 0.6, +}; +var themes = { + // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message + dark: { + primaryColor: '#32a6ad', + positiveColor: '#5b963e', + negativeColor: '#943838', + warningColor: '#decd39', + favoriteColor: '#d1d179', + backgroundNavigation: '#213137', + backgroundAccentContent: '#34434c', + backgroundDropdown: '#253540', + backgroundContent: '#253540', + backgroundModal: '#253540', + backgroundSlideout: '#435059', + }, + // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message + sea: { + primaryColor: '#32a6ad', + positiveColor: '#154e7d', + negativeColor: '#a32c00', + warningColor: '#b65e1f', + favoriteColor: '#709e33', + backgroundNavigation: '#0f3757', + backgroundAccentContent: '#ffffff', + backgroundDropdown: '#ffffff', + backgroundContent: '#ffffff', + backgroundModal: '#e5e6e6', + backgroundSlideout: '#e5e6e6', + }, + // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message + light: { + primaryColor: '#3c6dd5', + positiveColor: '#428442', + negativeColor: '#8a423c', + warningColor: '#c89600', + favoriteColor: '#d1d179', + backgroundNavigation: '#3c6dd5', + backgroundAccentContent: '#edf9fc', + backgroundDropdown: '#f3fdff', + backgroundContent: '#f3fdff', + backgroundModal: '#edf9fc', + backgroundSlideout: '#edf9fc', + }, + // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message + custom: { + primaryColor: '#3c6dd5', + positiveColor: '#428442', + negativeColor: '#8a423c', + warningColor: '#c89600', + favoriteColor: '#d1d179', + backgroundNavigation: '#252529', + backgroundAccentContent: '#2A2A2E', + backgroundDropdown: '#35353a', + backgroundContent: '#35353a', + backgroundModal: '#252529', + backgroundSlideout: '#252529', + }, +}; +function updateTheme(userTheme) { + var relevantColorTheme = themes[userTheme.theme]; + if (userTheme.theme === 'custom') { + // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + relevantColorTheme = Object.keys(relevantColorTheme).reduce(function (newMap, key) { + newMap[key] = + userTheme["custom".concat(key.replace(/^\w/, function (c) { return c.toUpperCase(); }))]; + return newMap; + }, {}); + } + var sizingTheme = sizing['comfortable']; + return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, relevantColorTheme), userTheme), sizingTheme), borderRadius), screenSizes), zIndexes), transitions), fontSizes), spacing(parseFloat(sizingTheme.minimumSpacing))), dividers(parseFloat(sizingTheme.minimumSpacing))), opacity); +} +function determineScreenSize() { + var fontSize = parseInt(user.get('user').get('preferences').get('fontSize')); + var screenSize = window.innerWidth / fontSize; + return screenSize; +} +/* + necessary evil since we have multiple react roots and want to share theming efficiently + yes it's awful, yes it's contained, yes you don't have to worry about theming as you go back and forth between + marionette and react because of this! +*/ +var sharedState = __assign({ screenSize: determineScreenSize(), multiple: function (multiplier, variable, unit) { + return "".concat(multiplier * parseFloat(variable)).concat(unit ? unit : 'rem'); + }, screenBelow: function (specifiedSize) { + return sharedState.screenSize < parseFloat(specifiedSize); + }, background: 'black' }, updateTheme(user.get('user').get('preferences').get('theme').toJSON())); +function updateMediaQueries() { + sharedState.screenSize = determineScreenSize(); +} +function updateSharedTheme() { + _.extend(sharedState, updateTheme(user.get('user').get('preferences').get('theme').toJSON())); +} +$(window).on("resize.themeContainer", _.throttle(updateMediaQueries, 30)); +user.get('user').get('preferences').on('change:theme', updateSharedTheme); +user.get('user').get('preferences').on('change:fontSize', updateMediaQueries); +var ThemeContainer = /** @class */ (function (_super) { + __extends(ThemeContainer, _super); + function ThemeContainer(props) { + var _this = _super.call(this, props) || this; + _this.id = v4(); + _this.isDestroyed = false; + _this.state = sharedState; + return _this; + } + ThemeContainer.prototype.componentDidMount = function () { + this.listenForUserChanges(); + this.watchScreenSize(); + }; + ThemeContainer.prototype.componentWillUnmount = function () { + $(window).off(".".concat(this.id)); + this.isDestroyed = true; // we have a throttled listener that updates state, so we need this! + }; + ThemeContainer.prototype.watchScreenSize = function () { + $(window).on("resize.".concat(this.id), _.throttle(this.syncToSharedState.bind(this), 30)); + }; + ThemeContainer.prototype.syncToSharedState = function () { + if (this.isDestroyed === true) { + return; + } + this.setState(sharedState); + }; + ThemeContainer.prototype.listenForUserChanges = function () { + this.props.listenTo(user.get('user').get('preferences'), 'change:theme', this.syncToSharedState.bind(this)); + this.props.listenTo(user.get('user').get('preferences'), 'change:fontSize', this.syncToSharedState.bind(this)); + }; + ThemeContainer.prototype.render = function () { + return (React.createElement(ThemeProvider, { theme: this.state }, this.props.children)); + }; + return ThemeContainer; +}(React.Component)); +export default withListenTo(ThemeContainer); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3RoZW1lL3RoZW1lLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQU1qRCxPQUFPLElBQUksTUFBTSwwQ0FBMEMsQ0FBQTtBQUUzRCxPQUFPLFlBQW1DLE1BQU0sdUJBQXVCLENBQUE7QUFDdkUsT0FBTyxDQUFDLE1BQU0sUUFBUSxDQUFBO0FBQ3RCLE9BQU8sQ0FBQyxNQUFNLFlBQV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GRyZW59PC9UaGVtZVByb3ZpZGVyPlxuICAgIClcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCB3aXRoTGlzdGVuVG8oVGhlbWVDb250YWluZXIpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/time-settings/container.d.ts b/src/main/webapp/react-component/time-settings/container.d.ts new file mode 100644 index 00000000000..046aa39a053 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/container.d.ts @@ -0,0 +1,54 @@ +import * as React from 'react'; +import { WithBackboneProps } from '../backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/time-settings/container.js b/src/main/webapp/react-component/time-settings/container.js new file mode 100644 index 00000000000..8ab188ba6b2 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/container.js @@ -0,0 +1,91 @@ +import { __assign, __extends } from "tslib"; +//DELETE AFTER CATALOG-UI-SEARCH CUT +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import moment from 'moment'; +import withListenTo from '../backbone-container'; +import TimeSettingsPresentation from './presentation'; +import momentTimezone from 'moment-timezone'; +import user from '../../component/singletons/user-instance'; +import Common from '../../js/Common'; +import { DateHelpers } from '../../component/fields/date-helpers'; +var getUserPreferences = function () { + return user.get('user').get('preferences'); +}; +var savePreferences = function (model) { + var nullOrUndefinedValues = !Object.values(model).every(function (value) { return !!value; }); + if (nullOrUndefinedValues) + return; + var preferences = getUserPreferences(); + preferences.set(model); + preferences.savePreferences(); +}; +var getCurrentDateTimeFormat = function () { + return getUserPreferences().get('dateTimeFormat').datetimefmt; +}; +var getCurrentTimePrecision = DateHelpers.General.getTimePrecision; +var getCurrentTimeZone = function () { return getUserPreferences().get('timeZone'); }; +var getCurrentTime = function (format, timeZone) { + if (format === void 0) { format = getCurrentDateTimeFormat(); } + if (timeZone === void 0) { timeZone = getCurrentTimeZone(); } + return momentTimezone.tz(moment(), timeZone).format(format); +}; +var generateZoneObjects = function () { + var zoneNames = momentTimezone.tz.names(); + var zones = zoneNames.map(function (zoneName) { + var date = new Date(); + var timestamp = date.getTime(); + var zone = momentTimezone.tz.zone(zoneName); + var zonedDate = momentTimezone.tz(timestamp, zoneName); + var offsetAsString = zonedDate.format('Z'); + // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + var abbr = zone.abbr(timestamp); + return { + timestamp: timestamp, + zone: zone, + zonedDate: zonedDate, + offsetAsString: offsetAsString, + abbr: abbr, + zoneName: zoneName, + }; + }); + return zones; +}; +var TimeSettingsContainer = /** @class */ (function (_super) { + __extends(TimeSettingsContainer, _super); + function TimeSettingsContainer(props) { + var _this = _super.call(this, props) || this; + _this.componentDidMount = function () { + var updateCurrentTimeClock = function () { + _this.setState({ currentTime: getCurrentTime() }); + }; + _this.timer = setInterval(updateCurrentTimeClock, 50); + }; + _this.componentWillUnmount = function () { + clearInterval(_this.timer); + }; + _this.render = function () { return (React.createElement(TimeSettingsPresentation, __assign({}, _this.props, { currentTime: _this.state.currentTime, timeZone: _this.state.timeZone, timeZones: _this.state.timeZones, handleTimeZoneUpdate: function (timeZone) { + savePreferences({ timeZone: timeZone.zoneName }); + }, handleTimeFormatUpdate: function (timeFormat) { + _this.setState({ timeFormat: timeFormat.value }); + var dateTimeFormat = Common.getDateTimeFormats()[timeFormat.value][_this.state.timePrecision]; + savePreferences({ dateTimeFormat: dateTimeFormat }); + }, timeFormat: _this.state.timeFormat, handleTimePrecisionUpdate: function (timePrecision) { + _this.setState({ timePrecision: timePrecision }); + var dateTimeFormat = Common.getDateTimeFormats()[_this.state.timeFormat][timePrecision]; + savePreferences({ dateTimeFormat: dateTimeFormat }); + }, timePrecision: _this.state.timePrecision }))); }; + _this.state = { + currentTime: getCurrentTime(), + timeZones: generateZoneObjects(), + timeZone: getCurrentTimeZone(), + timeFormat: Common.getDateTimeFormatsReverseMap()[getCurrentDateTimeFormat()] + .format, + timePrecision: getCurrentTimePrecision(), + }; + return _this; + } + return TimeSettingsContainer; +}(React.Component)); +export default hot(module)(withListenTo(TimeSettingsContainer)); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC90aW1lLXNldHRpbmdzL2NvbnRhaW5lci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9DQUFvQztBQUNwQyxPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxNQUFNLE1BQU0sUUFBUSxDQUFBO0FBQzNCLE9BQU8sWUFBbUMsTUFBTSx1QkFBdUIsQ0FBQTtBQUV2RSxPQUFPLHdCQUF3QixNQUFNLGdCQUFnQixDQUFBO0FBSXJELE9BQU8sY0FBYyxNQUFNLGlCQUFpQixDQUFBO0FBQzVDLE9BQU8sSUFBSSxNQUFNLDBDQUEwQyxDQUFBO0FBQzNELE9BQU8sTUFBTSxNQUFNLGlCQUFpQixDQUFBO0FBQ3BDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQTtBQWdCakUsSUFBTSxrQkFBa0IsR0FBRztJQUN6QixPQUFPLElBQUksQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFBO0FBQzVDLENBQUMsQ0FBQTtBQUVELElBQU0sZUFBZSxHQUFHLFVB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biJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/time-settings/index.d.ts b/src/main/webapp/react-component/time-settings/index.d.ts new file mode 100644 index 00000000000..ffd7389f9e2 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; diff --git a/src/main/webapp/react-component/time-settings/index.js b/src/main/webapp/react-component/time-settings/index.js new file mode 100644 index 00000000000..caa4a711553 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './container'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3RpbWUtc2V0dGluZ3MvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsT0FB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/src/main/webapp/react-component/time-settings/presentation.d.ts b/src/main/webapp/react-component/time-settings/presentation.d.ts new file mode 100644 index 00000000000..87067f7220e --- /dev/null +++ b/src/main/webapp/react-component/time-settings/presentation.d.ts @@ -0,0 +1,18 @@ +import * as React from 'react'; +import { TimeZone, TimeFormat } from './types'; +import { TimePrecision } from '@blueprintjs/datetime'; +type Props = { + currentTime: string; + timeZone: string; + timeFormat: string; + timeZones: TimeZone[]; + timePrecision: TimePrecision; + handleTimeZoneUpdate: (timeZone: TimeZone) => any; + handleTimeFormatUpdate: (timeFormat: TimeFormat) => any; + handleTimePrecisionUpdate: (timePrecision: TimePrecision) => any; +}; +declare class TimeSettingsPresentation extends React.Component { + render: () => JSX.Element; +} +declare const _default: typeof TimeSettingsPresentation; +export default _default; diff --git a/src/main/webapp/react-component/time-settings/presentation.js b/src/main/webapp/react-component/time-settings/presentation.js new file mode 100644 index 00000000000..b0051592441 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/presentation.js @@ -0,0 +1,32 @@ +import { __assign, __extends, __makeTemplateObject } from "tslib"; +//DELETE AFTER CATALOG-UI-SEARCH CUT +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import styled from 'styled-components'; +import TimeZoneSelector from './time-zone-picker'; +import TimeFormatSelector from './time-format-picker'; +import TimePrecisionSelector from './time-precision-picker'; +var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: auto;\n padding: ", ";\n"], ["\n overflow: auto;\n padding: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }); +var Time = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n font-weight: bolder;\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"], ["\n width: 100%;\n font-weight: bolder;\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.minimumSpacing; }); +var TimeLabel = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n"], ["\n padding-top: ", ";\n padding-bottom: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.minimumSpacing; }); +var TimeValue = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding-top: ", ";\n padding-left: ", ";\n"], ["\n padding-top: ", ";\n padding-left: ", ";\n"])), function (props) { return props.theme.minimumSpacing; }, function (props) { return props.theme.minimumSpacing; }); +var TimeSettingsPresentation = /** @class */ (function (_super) { + __extends(TimeSettingsPresentation, _super); + function TimeSettingsPresentation() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.render = function () { + return (React.createElement(Root, __assign({}, _this.props), + React.createElement(TimeZoneSelector, { timeZone: _this.props.timeZone, timeZones: _this.props.timeZones, handleTimeZoneUpdate: _this.props.handleTimeZoneUpdate }), + React.createElement(TimeFormatSelector, { timeFormat: _this.props.timeFormat, handleTimeFormatUpdate: _this.props.handleTimeFormatUpdate }), + React.createElement(TimePrecisionSelector, { timePrecision: _this.props.timePrecision, handleTimePrecisionUpdate: _this.props.handleTimePrecisionUpdate }), + React.createElement(Time, null, + React.createElement(TimeLabel, null, "Current Time"), + React.createElement(TimeValue, null, _this.props.currentTime)))); + }; + return _this; + } + return TimeSettingsPresentation; +}(React.Component)); +export default hot(module)(TimeSettingsPresentation); +var templateObject_1, templateObject_2, templateObject_3, templateObject_4; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudGF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC90aW1lLXNldHRpbmdzL3ByZXNlbnRhdGlvbi50c3giXSwibmFtZXMiOltdLCJtYXBw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RpbWVQcmVjaXNpb25VcGRhdGV9XG4gICAgICAgIC8+XG4gICAgICAgIDxUaW1lPlxuICAgICAgICAgIDxUaW1lTGFiZWw+Q3VycmVudCBUaW1lPC9UaW1lTGFiZWw+XG4gICAgICAgICAgPFRpbWVWYWx1ZT57dGhpcy5wcm9wcy5jdXJyZW50VGltZX08L1RpbWVWYWx1ZT5cbiAgICAgICAgPC9UaW1lPlxuICAgICAgPC9Sb290PlxuICAgIClcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBob3QobW9kdWxlKShUaW1lU2V0dGluZ3NQcmVzZW50YXRpb24pXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/time-settings/time-format-picker.d.ts b/src/main/webapp/react-component/time-settings/time-format-picker.d.ts new file mode 100644 index 00000000000..520f5c80be0 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/time-format-picker.d.ts @@ -0,0 +1,8 @@ +/// +import { TimeFormat } from './types'; +type Props = { + timeFormat: string; + handleTimeFormatUpdate: (timeFormat: TimeFormat) => any; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/time-settings/time-format-picker.js b/src/main/webapp/react-component/time-settings/time-format-picker.js new file mode 100644 index 00000000000..20c36e80fab --- /dev/null +++ b/src/main/webapp/react-component/time-settings/time-format-picker.js @@ -0,0 +1,32 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +var timeFormats = [ + { + label: 'ISO 8601', + value: 'ISO', + }, + { + label: '24 Hour Standard', + value: '24', + }, + { + label: '12 Hour Standard', + value: '12', + }, +]; +var TimeFormatSelector = function (props) { + var initState = timeFormats.find(function (tf) { return tf.value === props.timeFormat; }); + var _a = __read(React.useState(initState), 2), currentTimeFormat = _a[0], setCurrentTimeFormat = _a[1]; + return (React.createElement("div", null, + React.createElement(Autocomplete, { id: "time-format-picker", disableClearable: true, autoComplete: true, size: 'small', onChange: function (_event, newTimeFormat) { + props.handleTimeFormatUpdate(newTimeFormat); + setCurrentTimeFormat(newTimeFormat); + }, isOptionEqualToValue: function (option, value) { + return option.value === value.value; + }, options: timeFormats, getOptionLabel: function (format) { return format.label; }, style: { width: '100%', paddingTop: '2em' }, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Time Format", variant: "outlined" }))); }, value: currentTimeFormat }))); +}; +export default hot(module)(TimeFormatSelector); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS1mb3JtYXQtcGlja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC90aW1lLXNldHRpbmdzL3RpbWUtZm9ybWF0LXBpY2tlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUN0QyxPQUFPLFlBQVksTUFBTSw0QkFBNEIsQ0FBQTtBQUNyRCxPQUFPLFNBQVMsTUFBTSx5QkFBeUIsQ0FBQTtBQVEvQyxJQUFNLFdBQVcsR0FBRztJQUNsQjtRQUNFLEtBQUssRUFBRSxVQUFVO1FBQ2pCLEtBQUssRUFBRSxLQUFLO0tBQ2I7SUFDRDtRQUNFLEtBQUssRUFBRSxrQkFBa0I7UUFDekIsS0FBSyxFQUFFLElBQUk7S0FDWjtJQUNEO1FBQ0UsS0FBSyxFQUFFLGtCQUFrQjtRQUN6QixLQUFLLEVBQUUsSUFBSTtLQUNaO0NBQ2MsQ0FBQTtBQUVqQixJQUFNLGtCQUFrQixHQUFHLFVBQUMsS0FBWTtJQUN0QyxJQUFNLFNBQVMsR0FBRyxXQUFXLENBQU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ICApfVxuICAgICAgICB2YWx1ZT17Y3VycmVudFRpbWVGb3JtYXR9XG4gICAgICAvPlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFRpbWVGb3JtYXRTZWxlY3RvcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/time-settings/time-precision-picker.d.ts b/src/main/webapp/react-component/time-settings/time-precision-picker.d.ts new file mode 100644 index 00000000000..283b898ee92 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/time-precision-picker.d.ts @@ -0,0 +1,8 @@ +/// +import { TimePrecision } from '@blueprintjs/datetime'; +type Props = { + timePrecision: TimePrecision; + handleTimePrecisionUpdate: (timePrecision: TimePrecision) => any; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/time-settings/time-precision-picker.js b/src/main/webapp/react-component/time-settings/time-precision-picker.js new file mode 100644 index 00000000000..c920710252a --- /dev/null +++ b/src/main/webapp/react-component/time-settings/time-precision-picker.js @@ -0,0 +1,46 @@ +import { __assign, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +var Options = [ + { + label: 'Milliseconds', + value: 'millisecond', + }, + { + label: 'Seconds', + value: 'second', + }, + { + label: 'Minutes', + value: 'minute', + }, +]; +var TimePrecisionSelector = function (props) { + var initState = Options.find(function (option) { return option.value === props.timePrecision; }); + var _a = __read(React.useState(initState), 2), timePrecision = _a[0], setTimePrecision = _a[1]; + return (React.createElement("div", null, + React.createElement(Autocomplete, { id: "time-precision-picker", disableClearable: true, autoComplete: true, size: 'small', onChange: function (_event, newPrecision) { + props.handleTimePrecisionUpdate(newPrecision.value); + setTimePrecision(newPrecision); + }, isOptionEqualToValue: function (option, value) { + return option.value === value.value; + }, options: Options, getOptionLabel: function (option) { return option.label; }, style: { width: '100%', paddingTop: '2em' }, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Time Precision", variant: "outlined" }))); }, value: timePrecision }))); +}; +export default hot(module)(TimePrecisionSelector); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS1wcmVjaXNpb24tcGlja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC90aW1lLXNldHRpbmdzL3RpbWUtcHJlY2lzaW9uLXBpY2tlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUM5QixPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDdEMsT0FBTyxZQUFZLE1BQU0sNEJBQTRCLENBQUE7QUFDckQsT0FBTyxTQUFTLE1BQU0seUJBQXlCLENBQUE7QUFhL0MsSUFBTSxPQUFPLEdBQUc7SUFDZDtRQUNFLEtBQUssRUFBRSxjQUFjO1FBQ3JCLEtBQUssRUFBRSxhQUFhO0tBQ3JCO0lBQ0Q7UUFDRSxLQUFLLEVBQUUsU0FBUztRQUNoQixLQUFLLEVBQUUsUUFBUTtLQUNoQjtJQUNEO1FBQ0UsS0FBSyxFQUFFLFNBQVM7UUFDaEIsS0FBSyxFQUFFLFFBQVE7S0FDaEI7Q0FDbU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+IChcbiAgICAgICAgICA8VGV4dEZpZWxkIHsuLi5wYXJhbXN9IGxhYmVsPVwiVGltZSBQcmVjaXNpb25cIiB2YXJpYW50PVwib3V0bGluZWRcIiAvPlxuICAgICAgICApfVxuICAgICAgICB2YWx1ZT17dGltZVByZWNpc2lvbn1cbiAgICAgIC8+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoVGltZVByZWNpc2lvblNlbGVjdG9yKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/time-settings/time-zone-picker.d.ts b/src/main/webapp/react-component/time-settings/time-zone-picker.d.ts new file mode 100644 index 00000000000..c9f06881638 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/time-zone-picker.d.ts @@ -0,0 +1,9 @@ +/// +import { TimeZone } from './types'; +type Props = { + timeZone: string; + timeZones: TimeZone[]; + handleTimeZoneUpdate: (timeZone: TimeZone) => any; +}; +declare const _default: (props: Props) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/time-settings/time-zone-picker.js b/src/main/webapp/react-component/time-settings/time-zone-picker.js new file mode 100644 index 00000000000..2dd98dbb080 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/time-zone-picker.js @@ -0,0 +1,22 @@ +import { __assign, __read } from "tslib"; +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from '@mui/material/TextField'; +var TimeZoneSelector = function (props) { + var getDefaultTimeZone = function (timeZoneName) { + return props.timeZones.find(function (zone) { return zone.zoneName === timeZoneName; }); + }; + var _a = __read(React.useState(getDefaultTimeZone(props.timeZone)), 2), currentTimeZone = _a[0], setCurrentTimeZone = _a[1]; + return (React.createElement("div", null, + React.createElement(Autocomplete, { id: "time-zone-picker", disableClearable: true, autoComplete: true, size: 'small', onChange: function (_event, newTimeZone) { + props.handleTimeZoneUpdate(newTimeZone); + setCurrentTimeZone(newTimeZone); + }, isOptionEqualToValue: function (oldZone, newZone) { + return oldZone.zoneName === newZone.zoneName; + }, options: props.timeZones, getOptionLabel: function (zone) { + return "".concat(zone.zoneName, ", ").concat(zone.abbr, ", ").concat(zone.offsetAsString); + }, style: { width: '100%' }, renderInput: function (params) { return (React.createElement(TextField, __assign({}, params, { label: "Time Zone", variant: "outlined" }))); }, value: currentTimeZone }))); +}; +export default hot(module)(TimeZoneSelector); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS16b25lLXBpY2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvdGltZS1zZXR0aW5ncy90aW1lLXpvbmUtcGlja2VyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sWUFBWSxNQUFNLDRCQUE0QixDQUFBO0FBQ3JELE9BQU8sU0FBUyxNQUFNLHlCQUF5QixDQUFBO0FBUy9DLElBQU0sZ0JBQWdCLEdBQUcsVUFBQyxLQUFZO0lBQ3BDLElBQU0sa0JBQWtCLEdBQUcsVUFBQyxZQUFvQjtRQUM5QyxPQUFPLEtBQUssQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLFVBQUMsSUFBSSxJQUFLLE9BQUEsSUFBSSxDQUFDLFFBQVEsS0FBSyxZQUFZLEVBQTlCLENBQThCLENBQUMsQ0FBQTtJQUN2RSxDQUFDLENBQUE7SUFFRyxJQUFBLEtBQUEsT0FBd0MsS0FBSyxDQUFDLFFBQVEsQ0FDeEQsa0JBQWtCLENBQUMsS0FBSyxDQUFDLFFBQVEsQ0FBQyxDQUNuQyxJQUFBLEVBRkksZUFBZSxRQ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gIG9uQ2hhbmdlPXsoX2V2ZW50OiBhbnksIG5ld1RpbWVab25lOiBUaW1lWm9uZSkgPT4ge1xuICAgICAgICAgIHByb3BzLmhhbmRsZVRpbWVab25lVXBkYXRlKG5ld1RpbWVab25lKVxuICAgICAgICAgIHNldEN1cnJlbnRUaW1lWm9uZShuZXdUaW1lWm9uZSlcbiAgICAgICAgfX1cbiAgICAgICAgaXNPcHRpb25FcXVhbFRvVmFsdWU9eyhvbGRab25lOiBUaW1lWm9uZSwgbmV3Wm9uZTogVGltZVpvbmUpID0+IHtcbiAgICAgICAgICByZXR1cm4gb2xkWm9uZS56b25lTmFtZSA9PT0gbmV3Wm9uZS56b25lTmFtZVxuICAgICAgICB9fVxuICAgICAgICBvcHRpb25zPXtwcm9wcy50aW1lWm9uZXN9XG4gICAgICAgIGdldE9wdGlvbkxhYmVsPXsoem9uZSkgPT5cbiAgICAgICAgICBgJHt6b25lLnpvbmVOYW1lfSwgJHt6b25lLmFiYnJ9LCAke3pvbmUub2Zmc2V0QXNTdHJpbmd9YFxuICAgICAgICB9XG4gICAgICAgIHN0eWxlPXt7IHdpZHRoOiAnMTAwJScgfX1cbiAgICAgICAgcmVuZGVySW5wdXQ9eyhwYXJhbXMpID0+IChcbiAgICAgICAgICA8VGV4dEZpZWxkIHsuLi5wYXJhbXN9IGxhYmVsPVwiVGltZSBab25lXCIgdmFyaWFudD1cIm91dGxpbmVkXCIgLz5cbiAgICAgICAgKX1cbiAgICAgICAgdmFsdWU9e2N1cnJlbnRUaW1lWm9uZX1cbiAgICAgIC8+XG4gICAgPC9kaXY+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoVGltZVpvbmVTZWxlY3RvcilcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/time-settings/types.d.ts b/src/main/webapp/react-component/time-settings/types.d.ts new file mode 100644 index 00000000000..d85c2e28fe4 --- /dev/null +++ b/src/main/webapp/react-component/time-settings/types.d.ts @@ -0,0 +1,13 @@ +import moment from 'moment-timezone'; +export type TimeZone = { + timestamp: number; + zone: moment.MomentZone | null; + zonedDate: moment.Moment; + offsetAsString: string; + abbr: string; + zoneName: string; +}; +export type TimeFormat = { + label: string; + value: string; +}; diff --git a/src/main/webapp/react-component/time-settings/types.js b/src/main/webapp/react-component/time-settings/types.js new file mode 100644 index 00000000000..4c3c7c8de2b --- /dev/null +++ b/src/main/webapp/react-component/time-settings/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3RpbWUtc2V0dGluZ3MvdHlwZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbW9tZW50IGZyb20gJ21vbWVudC10aW1lem9uZSdcbmV4cG9ydCB0eXBlIFRpbWVab25lID0ge1xuICB0aW1lc3RhbXA6IG51bWJlclxuICB6b25lOiBtb21lbnQuTW9tZW50Wm9uZSB8IG51bGxcbiAgem9uZWREYXRlOiBtb21lbnQuTW9tZW50XG4gIG9mZnNldEFzU3RyaW5nOiBzdHJpbmdcbiAgYWJicjogc3RyaW5nXG4gIHpvbmVOYW1lOiBzdHJpbmdcbn1cblxuZXhwb3J0IHR5cGUgVGltZUZvcm1hdCA9IHtcbiAgbGFiZWw6IHN0cmluZ1xuICB2YWx1ZTogc3RyaW5nXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/unsaved-indicator/index.d.ts b/src/main/webapp/react-component/unsaved-indicator/index.d.ts new file mode 100644 index 00000000000..6bcf0f7001a --- /dev/null +++ b/src/main/webapp/react-component/unsaved-indicator/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './unsaved-indicator'; diff --git a/src/main/webapp/react-component/unsaved-indicator/index.js b/src/main/webapp/react-component/unsaved-indicator/index.js new file mode 100644 index 00000000000..1ceafccc67d --- /dev/null +++ b/src/main/webapp/react-component/unsaved-indicator/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './unsaved-indicator'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3Vuc2F2ZWQtaW5kaWNhdG9yL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLHFCQUFxQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi91bnNhdmVkLWluZGljYXRvcidcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.d.ts b/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.d.ts new file mode 100644 index 00000000000..9691fe7ff6a --- /dev/null +++ b/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +interface Props { + shown: boolean; + className?: string; + style?: React.CSSProperties; +} +export default function UnsavedIndicator(props: Props): JSX.Element; +export {}; diff --git a/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.js b/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.js new file mode 100644 index 00000000000..a69a5882a93 --- /dev/null +++ b/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.js @@ -0,0 +1,29 @@ +import { __assign, __makeTemplateObject, __rest } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +var Root = styled.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n line-height: inherit;\n vertical-align: top;\n color: ", ";\n\n transition: ", ";\n\n transform: ", ";\n opacity: ", ";\n"], ["\n display: inline-block;\n line-height: inherit;\n vertical-align: top;\n color: ", ";\n\n transition: ", ";\n\n transform: ", ";\n opacity: ", ";\n"])), function (props) { + return props.theme.warningColor; +}, function (_a) { + var theme = _a.theme; + return "transform ".concat(theme.coreTransitionTime, " ease-out, opacity ").concat(theme.coreTransitionTime, " ease-out;"); +}, function (props) { return "scale(".concat(props.shown ? 1 : 2, ");"); }, function (props) { return (props.shown ? 1 : 0); }); +export default function UnsavedIndicator(props) { + var className = props.className, style = props.style, otherProps = __rest(props, ["className", "style"]); + return (React.createElement(Root, __assign({ className: className, style: style }, otherProps), "*")); +} +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5zYXZlZC1pbmRpY2F0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3Vuc2F2ZWQtaW5kaWNhdG9yL3Vuc2F2ZWQtaW5kaWNhdG9yLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sTUFBTSxNQUFNLG1CQUFtQixDQUFBO0FBUXRDLElBQU0sSUFBSSxHQUFHLE1BQU0sQ0FBQyxJQUFJLGlPQUFPLHdGQUlwQixFQUVSLHFCQUVhLEVBRWIsb0JBRVksRUFBMkMsZ0JBQzdDLEVBQWdDLEtBQzVDLEtBVlUsVUFBQyxLQUFLO0lBQ2IsT0FBTyxLQUFLLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQTtBQUNqQyxDQUFDLEVBRWEsVUFBQyxFQUFTO1FBQVAsS0FBSyxXQUFBO0lBQ3BCLE9BQU8sb0JBQWEsS0FBSyxDQUFDLGtCQUFrQixnQ0FBc0IsS0FBSyxDQUFDLGtCQUFrQixlQUFZLENBQUE7QUFDeEcsQ0FBQyxFQUVZLFVBQUMsS0FBSyxJQUFLLE9BQUEsZ0JBQVMsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQ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29yZVRyYW5zaXRpb25UaW1lfSBlYXNlLW91dDtgXG4gIH19O1xuXG4gIHRyYW5zZm9ybTogJHsocHJvcHMpID0+IGBzY2FsZSgke3Byb3BzLnNob3duID8gMSA6IDJ9KTtgfTtcbiAgb3BhY2l0eTogJHsocHJvcHMpID0+IChwcm9wcy5zaG93biA/IDEgOiAwKX07XG5gXG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIFVuc2F2ZWRJbmRpY2F0b3IocHJvcHM6IFByb3BzKSB7XG4gIGNvbnN0IHsgY2xhc3NOYW1lLCBzdHlsZSwgLi4ub3RoZXJQcm9wcyB9ID0gcHJvcHNcbiAgcmV0dXJuIChcbiAgICA8Um9vdCBjbGFzc05hbWU9e2NsYXNzTmFtZX0gc3R5bGU9e3N0eWxlIGFzIGFueX0gey4uLm90aGVyUHJvcHN9PlxuICAgICAgKlxuICAgIDwvUm9vdD5cbiAgKVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/user-notifications/index.d.ts b/src/main/webapp/react-component/user-notifications/index.d.ts new file mode 100644 index 00000000000..ae2336f5756 --- /dev/null +++ b/src/main/webapp/react-component/user-notifications/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './user-notifications'; diff --git a/src/main/webapp/react-component/user-notifications/index.js b/src/main/webapp/react-component/user-notifications/index.js new file mode 100644 index 00000000000..603a976a53a --- /dev/null +++ b/src/main/webapp/react-component/user-notifications/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './user-notifications'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3VzZXItbm90aWZpY2F0aW9ucy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vdXNlci1ub3RpZmljYXRpb25zJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/user-notifications/user-notifications.d.ts b/src/main/webapp/react-component/user-notifications/user-notifications.d.ts new file mode 100644 index 00000000000..2aaa89a4518 --- /dev/null +++ b/src/main/webapp/react-component/user-notifications/user-notifications.d.ts @@ -0,0 +1,68 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { WithBackboneProps } from '../backbone-container'; +declare const _default: { + new (props: import("../../typescript/subtract").default | Readonly>): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + new (props: import("../../typescript/subtract").default, context: any): { + backbone: any; + componentWillUnmount(): void; + render(): JSX.Element; + context: unknown; + setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; + forceUpdate(callback?: (() => void) | undefined): void; + readonly props: Readonly>; + state: Readonly<{}>; + refs: { + [key: string]: React.ReactInstance; + }; + componentDidMount?(): void; + shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; + componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; + getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; + componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; + componentWillMount?(): void; + UNSAFE_componentWillMount?(): void; + componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; + componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; + }; + contextType?: React.Context | undefined; +}; +export default _default; diff --git a/src/main/webapp/react-component/user-notifications/user-notifications.js b/src/main/webapp/react-component/user-notifications/user-notifications.js new file mode 100644 index 00000000000..c61fb4f5dbc --- /dev/null +++ b/src/main/webapp/react-component/user-notifications/user-notifications.js @@ -0,0 +1,85 @@ +import { __extends, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import styled from 'styled-components'; +import withListenTo from '../backbone-container'; +import { NotificationGroupViewReact } from '../../component/notification-group/notification-group.view'; +import user from '../../component/singletons/user-instance'; +import moment from 'moment'; +import userNotifications from '../../component/singletons/user-notifications'; +var Empty = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transition: transform ", " linear;\n transform: scale(1);\n text-align: center;\n font-size: ", ";\n padding: ", ";\n"], ["\n transition: transform ", " linear;\n transform: scale(1);\n text-align: center;\n font-size: ", ";\n padding: ", ";\n"])), function (props) { return props.theme.coreTransitionTime; }, function (props) { return props.theme.largeFontSize; }, function (props) { return props.theme.mediumSpacing; }); +var Root = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n overflow: auto;\n"], ["\n height: 100%;\n width: 100%;\n overflow: auto;\n"]))); +var Notifications = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n display: block;\n padding: ", ";\n"], ["\n height: 100%;\n width: 100%;\n display: block;\n padding: ", ";\n"])), function (props) { return props.theme.mediumSpacing; }); +var informalName = function (daysAgo) { + switch (daysAgo) { + case -1: + return 'Future'; + break; + case 0: + return 'Today'; + break; + case 1: + return 'Yesterday'; + break; + default: + return moment().subtract(daysAgo, 'days').format('dddd'); + break; + } +}; +var getFilterForDay = function (numDays) { + if (numDays < 0) { + return function (model) { + return moment().diff(model.get('sentAt'), 'days') < 0; + }; + } + else if (numDays < 7) { + return function (model) { + return moment().diff(model.get('sentAt'), 'days') === numDays; + }; + } + else { + return function (model) { + return moment().diff(model.get('sentAt'), 'days') >= 7; + }; + } +}; +var dayRange = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8]; +var UserNotifications = /** @class */ (function (_super) { + __extends(UserNotifications, _super); + function UserNotifications(props) { + var _this = _super.call(this, props) || this; + _this.props.listenTo(userNotifications, 'add remove update', function () { + return _this.setState({}); + }); + return _this; + } + UserNotifications.prototype.render = function () { + return userNotifications.isEmpty() ? (React.createElement(Empty, null, + React.createElement("div", null, "No Notifications"))) : (React.createElement(Root, null, + React.createElement("div", null, + React.createElement(Notifications, null, dayRange.map(function (day) { + return (React.createElement(NotificationGroupViewReact, { key: day, filter: getFilterForDay(day), date: day === 8 ? 'Older' : informalName(day) })); + }))))); + }; + UserNotifications.prototype.componentWillUnmount = function () { + userNotifications.setSeen(); + user.savePreferences(); + }; + return UserNotifications; +}(React.Component)); +export default withListenTo(UserNotifications); +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1ub3RpZmljYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC91c2VyLW5vdGlmaWNhdGlvbnMvdXNlci1ub3RpZmljYXRpb25zLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7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5KGRheSl9XG4gICAgICAgICAgICAgICAgICBkYXRlPXtkYXkgPT09IDggPyAnT2xkZXInIDogaW5mb3JtYWxOYW1lKGRheSl9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfSl9XG4gICAgICAgICAgPC9Ob3RpZmljYXRpb25zPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvUm9vdD5cbiAgICApXG4gIH1cbiAgY29tcG9uZW50V2lsbFVubW91bnQoKSB7XG4gICAgdXNlck5vdGlmaWNhdGlvbnMuc2V0U2VlbigpXG4gICAgdXNlci5zYXZlUHJlZmVyZW5jZXMoKVxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IHdpdGhMaXN0ZW5UbyhVc2VyTm90aWZpY2F0aW9ucylcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/user-settings/index.d.ts b/src/main/webapp/react-component/user-settings/index.d.ts new file mode 100644 index 00000000000..079c9d5487e --- /dev/null +++ b/src/main/webapp/react-component/user-settings/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default as BaseUserSettings, BaseSettings } from './user-settings'; diff --git a/src/main/webapp/react-component/user-settings/index.js b/src/main/webapp/react-component/user-settings/index.js new file mode 100644 index 00000000000..d9cf09dc134 --- /dev/null +++ b/src/main/webapp/react-component/user-settings/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default as BaseUserSettings, BaseSettings } from './user-settings'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3VzZXItc2V0dGluZ3MvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQUUsT0FBTyxJQUFJLGdCQUFnQixFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgeyBkZWZhdWx0IGFzIEJhc2VVc2VyU2V0dGluZ3MsIEJhc2VTZXR0aW5ncyB9IGZyb20gJy4vdXNlci1zZXR0aW5ncydcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/user-settings/user-settings.d.ts b/src/main/webapp/react-component/user-settings/user-settings.d.ts new file mode 100644 index 00000000000..79a112f3057 --- /dev/null +++ b/src/main/webapp/react-component/user-settings/user-settings.d.ts @@ -0,0 +1,15 @@ +/// +type IndividualSettingsComponentType = ({ SettingsComponents, }: { + SettingsComponents: SettingsComponentType; +}) => JSX.Element; +export type SettingsComponentType = { + [key: string]: { + component: IndividualSettingsComponentType; + }; +}; +export declare const BaseSettings: SettingsComponentType; +type UserSettingsProps = { + SettingsComponents: SettingsComponentType; +}; +declare const _default: ({ SettingsComponents }: UserSettingsProps) => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/user-settings/user-settings.js b/src/main/webapp/react-component/user-settings/user-settings.js new file mode 100644 index 00000000000..f7049ed1e3e --- /dev/null +++ b/src/main/webapp/react-component/user-settings/user-settings.js @@ -0,0 +1,135 @@ +import { __assign, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { createGlobalStyle } from 'styled-components'; +import ThemeSettings from '../theme-settings'; +import AlertSettings from '../alert-settings'; +import AttributeSettings from '../attribute-settings'; +import SearchSettings from '../search-settings'; +import TimeSettings from '../time-settings'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import ChevronRight from '@mui/icons-material/ChevronRight'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; +import Divider from '@mui/material/Divider'; +import { useLocation } from 'react-router-dom'; +import queryString from 'query-string'; +import { Link } from '../../component/link/link'; +import { MapUserSettings } from '../map-user-settings/map-user-settings'; +var ThemeGlobalStyle = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n.MuiBackdrop-root {\n opacity: 0 !important;\n}\n.MuiDrawer-root > .MuiPaper-root {\n transform: scale(.8) translateY(10%) translateX(-10%) !important;\n}\n"], ["\n.MuiBackdrop-root {\n opacity: 0 !important;\n}\n.MuiDrawer-root > .MuiPaper-root {\n transform: scale(.8) translateY(10%) translateX(-10%) !important;\n}\n"]))); +export var BaseSettings = { + Settings: { + component: function (_a) { + var SettingsComponents = _a.SettingsComponents; + return React.createElement(SettingsScreen, { SettingsComponents: SettingsComponents }); + }, + }, + Theme: { + component: function () { + return (React.createElement(React.Fragment, null, + React.createElement(ThemeGlobalStyle, null), + React.createElement(ThemeSettings, null))); + }, + }, + Notifications: { + component: function () { + return React.createElement(AlertSettings, null); + }, + }, + Map: { + component: function () { + return React.createElement(MapUserSettings, null); + }, + }, + 'Search Options': { + component: function () { + return React.createElement(SearchSettings, null); + }, + }, + 'Attribute Options': { + component: function () { + return React.createElement(AttributeSettings, null); + }, + }, + Time: { + component: function () { + return React.createElement(TimeSettings, null); + }, + }, +}; +var SettingsScreen = function (_a) { + var SettingsComponents = _a.SettingsComponents; + var location = useLocation(); + var queryParams = queryString.parse(location.search); + return (React.createElement(Grid, { container: true, direction: "column", className: "w-full h-full" }, Object.keys(SettingsComponents) + .filter(function (name) { return name !== 'Settings'; }) + .map(function (name) { + return (React.createElement(Grid, { key: name, item: true, className: "w-full" }, + React.createElement(Button, { component: Link, to: "".concat(location.pathname, "?").concat(queryString.stringify(__assign(__assign({}, queryParams), { 'global-settings': name }))), fullWidth: true }, + React.createElement("div", { className: "text-left w-full" }, name)))); + }))); +}; +var getName = function (_a) { + var CurrentSetting = _a.CurrentSetting, SettingsComponents = _a.SettingsComponents; + var matchedSetting = Object.entries(SettingsComponents).find(function (entry) { + return entry[1].component === CurrentSetting; + }); + if (matchedSetting) { + return matchedSetting[0]; + } + return ''; +}; +var getComponent = function (_a) { + var name = _a.name, SettingsComponents = _a.SettingsComponents; + var matchedSetting = Object.entries(SettingsComponents).find(function (entry) { + return entry[0] === name; + }); + if (matchedSetting) { + return matchedSetting[1].component; + } + return SettingsComponents.Settings.component; +}; +var UserSettings = function (_a) { + var SettingsComponents = _a.SettingsComponents; + var location = useLocation(); + var queryParams = queryString.parse(location.search); + var CurrentSetting = getComponent({ + name: (queryParams['global-settings'] || ''), + SettingsComponents: SettingsComponents, + }); + var name = getName({ CurrentSetting: CurrentSetting, SettingsComponents: SettingsComponents }); + return (React.createElement(Grid, { container: true, direction: "column", className: "w-full h-full", wrap: "nowrap" }, + React.createElement(Grid, { item: true, className: "w-full p-3" }, + React.createElement(Grid, { container: true, direction: "row", alignItems: "center" }, + React.createElement(Grid, { item: true }, + React.createElement(Button, { component: Link, to: "".concat(location.pathname, "?").concat(queryString.stringify(__assign(__assign({}, queryParams), { 'global-settings': 'Settings' }))) }, + React.createElement(Typography, { variant: "h5" }, + name !== 'Settings' ? 'Back to ' : null, + "Settings"))), + name !== 'Settings' ? (React.createElement(React.Fragment, null, + React.createElement(Grid, { item: true }, + React.createElement(ChevronRight, null)), + React.createElement(Grid, { item: true }, + React.createElement(Typography, { variant: "h5" }, name)))) : null)), + React.createElement(Grid, { item: true }, + React.createElement(Divider, null)), + React.createElement(Grid, { item: true, className: "w-full h-full p-3" }, + React.createElement(CurrentSetting, { SettingsComponents: SettingsComponents })))); +}; +export default hot(module)(UserSettings); +var templateObject_1; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1zZXR0aW5ncy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvdXNlci1zZXR0aW5ncy91c2VyLXNldHRpbmdzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBQzlCLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBQ3JELE9BQU8sYUFBYSxNQUFNLG1CQUFtQixDQUFBO0FBQzdDLE9BQU8sYUFBYSxNQUFNLG1CQUFtQixDQUFBO0FBQzdDLE9BQU8saUJBQWlCLE1BQU0sdUJBQXVCLENBQUE7QUFDckQsT0FBTyxjQUFjLE1BQU0sb0JBQW9CLENBQUE7QUFDL0MsT0FBTyxZQUFZLE1BQU0sa0JBQWtCLENBQUE7QUFDM0MsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGtCQUFrQixDQUFBO0FBQ3RDLE9BQU8sTUFBTSxNQUFNLHNCQUFzQixDQUFBO0FBQ3pDLE9BQU8sWUFBWSxNQUFNLGtDQUFrQyxDQUFBO0FBQzNELE9BQ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QgaXRlbT5cbiAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgY29tcG9uZW50PXtMaW5rfVxuICAgICAgICAgICAgICB0bz17YCR7bG9jYXRpb24ucGF0aG5hbWV9PyR7cXVlcnlTdHJpbmcuc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAuLi5xdWVyeVBhcmFtcyxcbiAgICAgICAgICAgICAgICAnZ2xvYmFsLXNldHRpbmdzJzogJ1NldHRpbmdzJyxcbiAgICAgICAgICAgICAgfSl9YH1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPFR5cG9ncmFwaHkgdmFyaWFudD1cImg1XCI+XG4gICAgICAgICAgICAgICAge25hbWUgIT09ICdTZXR0aW5ncycgPyAnQmFjayB0byAnIDogbnVsbH1cbiAgICAgICAgICAgICAgICBTZXR0aW5nc1xuICAgICAgICAgICAgICA8L1R5cG9ncmFwaHk+XG4gICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAge25hbWUgIT09ICdTZXR0aW5ncycgPyAoXG4gICAgICAgICAgICA8PlxuICAgICAgICAgICAgICA8R3JpZCBpdGVtPlxuICAgICAgICAgICAgICAgIDxDaGV2cm9uUmlnaHQgLz5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgICA8R3JpZCBpdGVtPlxuICAgICAgICAgICAgICAgIDxUeXBvZ3JhcGh5IHZhcmlhbnQ9XCJoNVwiPntuYW1lfTwvVHlwb2dyYXBoeT5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC8+XG4gICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIDwvR3JpZD5cbiAgICAgIDwvR3JpZD5cbiAgICAgIDxHcmlkIGl0ZW0+XG4gICAgICAgIDxEaXZpZGVyIC8+XG4gICAgICA8L0dyaWQ+XG4gICAgICA8R3JpZCBpdGVtIGNsYXNzTmFtZT1cInctZnVsbCBoLWZ1bGwgcC0zXCI+XG4gICAgICAgIDxDdXJyZW50U2V0dGluZyBTZXR0aW5nc0NvbXBvbmVudHM9e1NldHRpbmdzQ29tcG9uZW50c30gLz5cbiAgICAgIDwvR3JpZD5cbiAgICA8L0dyaWQ+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgaG90KG1vZHVsZSkoVXNlclNldHRpbmdzKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/user/user.d.ts b/src/main/webapp/react-component/user/user.d.ts new file mode 100644 index 00000000000..85b77a7e1f2 --- /dev/null +++ b/src/main/webapp/react-component/user/user.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +export declare const EnhancedRolesContext: React.Context<{ + enhancedRoles: string[]; +}>; +export declare const RoleDisplay: () => JSX.Element | null; +declare const _default: () => JSX.Element; +export default _default; diff --git a/src/main/webapp/react-component/user/user.js b/src/main/webapp/react-component/user/user.js new file mode 100644 index 00000000000..b94abb18ff2 --- /dev/null +++ b/src/main/webapp/react-component/user/user.js @@ -0,0 +1,107 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import * as React from 'react'; +import { hot } from 'react-hot-loader'; +import Button from '@mui/material/Button'; +import { DarkDivider } from '../../component/dark-divider/dark-divider'; +import PersonIcon from '@mui/icons-material/Person'; +import user from '../../component/singletons/user-instance'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Switch from '@mui/material/Switch'; +import Typography from '@mui/material/Typography'; +import ExtensionPoints from '../../extension-points/extension-points'; +import { postSimpleAuditLog } from '../../react-component/utils/audit/audit-endpoint'; +import { useDialog } from '../../component/dialog'; +import DialogTitle from '@mui/material/DialogTitle'; +import DialogContentText from '@mui/material/DialogContentText'; +import CircularProgress from '@mui/material/CircularProgress'; +import DialogContent from '@mui/material/DialogContent'; +import { getIsUsingElevatedRights, setIsUsingElevatedRights, } from '../../component/elevated-rights/elevated-rights'; +export var EnhancedRolesContext = React.createContext({ + enhancedRoles: [], +}); +var useEnhancedRoles = function () { + var enhancedRoles = React.useContext(EnhancedRolesContext).enhancedRoles; + return enhancedRoles; +}; +export var RoleDisplay = function () { + var isUsingElevatedRights = getIsUsingElevatedRights(); + var enhancedRoles = useEnhancedRoles(); + if (isUsingElevatedRights && enhancedRoles.length > 0) { + return React.createElement(React.Fragment, null, "Advanced"); + } + return null; +}; +var RolesToggle = function () { + var isUsingElevatedRights = getIsUsingElevatedRights(); + var enhancedRoles = useEnhancedRoles(); + var dialogContext = useDialog(); + if (!enhancedRoles || enhancedRoles.length === 0) { + return null; + } + return (React.createElement("div", { className: "ml-1 pt-4" }, + React.createElement("div", { className: "font-normal text-lg" }, "Role"), + React.createElement(FormControlLabel, { className: "pb-4", label: React.createElement(Typography, { variant: "body2" }, "Advanced"), control: React.createElement(Switch, { color: "primary", checked: isUsingElevatedRights, onChange: function (e) { + setIsUsingElevatedRights(e.target.checked); + postSimpleAuditLog({ + action: 'ROLE_CHANGE', + component: e.target.checked + ? 'user enabled advanced_mode, roles: [' + enhancedRoles + ']' + : 'user disabled advanced_mode', + }); + dialogContext.setProps({ + open: true, + onClose: function () { }, + children: (React.createElement(React.Fragment, null, + React.createElement(DialogTitle, null, + React.createElement(Typography, { variant: "h5" }, "Switching Role")), + React.createElement(DialogContent, { className: "overflow-hidden" }, + React.createElement(DialogContentText, { variant: "subtitle1" }, "The page will refresh to complete the role change."), + React.createElement("div", { className: "flex justify-center py-5" }, + React.createElement(CircularProgress, { size: 80 }))))), + }); + setTimeout(function () { + window.location.reload(); + }, 1000); + } }) }), + React.createElement("div", { className: "".concat(isUsingElevatedRights ? '' : 'opacity-50') }, + React.createElement("div", { className: "pb-1 font-normal italic" }, "My Advanced Roles"), + enhancedRoles.map(function (role) { + return React.createElement("div", { className: "text-sm" }, role); + })))); +}; +var UserComponent = function () { + var username = user.getUserName(); + var email = user.getEmail(); + var signOut = function () { + window.location.href = + '../../logout?service=' + encodeURIComponent(window.location.href); + }; + return (React.createElement("div", { className: "w-full h-full flex flex-col" }, + React.createElement("div", { className: "shrink-1 overflow-auto p-2" }, + React.createElement("div", { className: "flex flex-row items-center flex-nowrap" }, + React.createElement("div", { className: "pr-2" }, + React.createElement(PersonIcon, null)), + React.createElement("div", null, + React.createElement("div", { "data-id": "profile-username", className: "info-username is-large-font is-bold" }, username), + React.createElement("div", { "data-id": "profile-email", className: "info-email is-medium-font" }, email))), + React.createElement(RolesToggle, null), + React.createElement(ExtensionPoints.userInformation, null)), + React.createElement(DarkDivider, { className: "my-2 shrink-0" }), + React.createElement("div", { className: "text-right p-2 shrink-0" }, + React.createElement(Button, { "data-id": "profile-signout-button", color: "primary", variant: "contained", onClick: signOut }, "Sign Out")))); +}; +export default hot(module)(UserComponent); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvdXNlci91c2VyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWF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WRpdExvZyh7XG4gICAgICAgICAgICAgICAgYWN0aW9uOiAnUk9MRV9DSEFOR0UnLFxuICAgICAgICAgICAgICAgIGNvbXBvbmVudDogZS50YXJnZXQuY2hlY2tlZFxuICAgICAgICAgICAgICAgICAgPyAndXNlciBlbmFibGVkIGFkdmFuY2VkX21vZGUsIHJvbGVzOiBbJyArIGVuaGFuY2VkUm9sZXMgKyAnXSdcbiAgICAgICAgICAgICAgICAgIDogJ3VzZXIgZGlzYWJsZWQgYWR2YW5jZWRfbW9kZScsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIGRpYWxvZ0NvbnRleHQuc2V0UHJvcHMoe1xuICAgICAgICAgICAgICAgIG9wZW46IHRydWUsXG4gICAgICAgICAgICAgICAgb25DbG9zZTogKCkgPT4ge30sXG4gICAgICAgICAgICAgICAgY2hpbGRyZW46IChcbiAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgIDxEaWFsb2dUaXRsZT5cbiAgICAgICAgICAgICAgICAgICAgICA8VHlwb2dyYXBoeSB2YXJpYW50PVwiaDVcIj5Td2l0Y2hpbmcgUm9sZTwvVHlwb2dyYXBoeT5cbiAgICAgICAgICAgICAgICAgICAgPC9EaWFsb2dUaXRsZT5cbiAgICAgICAgICAgICAgICAgICAgPERpYWxvZ0NvbnRlbnQgY2xhc3NOYW1lPVwib3ZlcmZsb3ctaGlkZGVuXCI+XG4gICAgICAgICAgICAgICAgICAgICAgPERpYWxvZ0NvbnRlbnRUZXh0IHZhcmlhbnQ9XCJzdWJ0aXRsZTFcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBwYWdlIHdpbGwgcmVmcmVzaCB0byBjb21wbGV0ZSB0aGUgcm9sZSBjaGFuZ2UuXG4gICAgICAgICAgICAgICAgICAgICAgPC9EaWFsb2dDb250ZW50VGV4dD5cbiAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImZsZXgganVzdGlmeS1jZW50ZXIgcHktNVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPENpcmN1bGFyUHJvZ3Jlc3Mgc2l6ZT17ODB9IC8+XG4gICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDwvRGlhbG9nQ29udGVudD5cbiAgICAgICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5yZWxvYWQoKVxuICAgICAgICAgICAgICB9LCAxMDAwKVxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICB9XG4gICAgICAvPlxuICAgICAgPGRpdiBjbGFzc05hbWU9e2Ake2lzVXNpbmdFbGV2YXRlZFJpZ2h0cyA/ICcnIDogJ29wYWNpdHktNTAnfWB9PlxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cInBiLTEgZm9udC1ub3JtYWwgaXRhbGljXCI+TXkgQWR2YW5jZWQgUm9sZXM8L2Rpdj5cbiAgICAgICAge2VuaGFuY2VkUm9sZXMubWFwKChyb2xlKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIDxkaXYgY2xhc3NOYW1lPVwidGV4dC1zbVwiPntyb2xlfTwvZGl2PlxuICAgICAgICB9KX1cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59XG5cbmNvbnN0IFVzZXJDb21wb25lbnQgPSAoKSA9PiB7XG4gIGNvbnN0IHVzZXJuYW1lID0gdXNlci5nZXRVc2VyTmFtZSgpXG4gIGNvbnN0IGVtYWlsID0gdXNlci5nZXRFbWFpbCgpXG4gIGNvbnN0IHNpZ25PdXQgPSAoKSA9PiB7XG4gICAgd2luZG93LmxvY2F0aW9uLmhyZWYgPVxuICAgICAgJy4uLy4uL2xvZ291dD9zZXJ2aWNlPScgKyBlbmNvZGVVUklDb21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gc2hyaW5rLTBcIj5cbiAgICAgICAgPEJ1dHRvblxuICAgICAgICAgIGRhdGEtaWQ9XCJwcm9maWxlLXNpZ25vdXQtYnV0dG9uXCJcbiAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIlxuICAgICAgICAgIHZhcmlhbnQ9XCJjb250YWluZWRcIlxuICAgICAgICAgIG9uQ2xpY2s9e3NpZ25PdXR9XG4gICAgICAgID5cbiAgICAgICAgICBTaWduIE91dFxuICAgICAgICA8L0J1dHRvbj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IGhvdChtb2R1bGUpKFVzZXJDb21wb25lbnQpXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/audit/audit-endpoint.d.ts b/src/main/webapp/react-component/utils/audit/audit-endpoint.d.ts new file mode 100644 index 00000000000..d8ae18a7513 --- /dev/null +++ b/src/main/webapp/react-component/utils/audit/audit-endpoint.d.ts @@ -0,0 +1,15 @@ +export type AuditItem = { + id: String; + 'source-id'?: String; +}; +export type AuditLog = { + action: string; + component: string; + items: AuditItem[]; +}; +export type SimpleAuditLog = { + action: string; + component: string; +}; +export declare const postAuditLog: ({ action, component, items }: AuditLog) => Promise; +export declare const postSimpleAuditLog: ({ action, component, }: SimpleAuditLog) => Promise; diff --git a/src/main/webapp/react-component/utils/audit/audit-endpoint.js b/src/main/webapp/react-component/utils/audit/audit-endpoint.js new file mode 100644 index 00000000000..a664d27377b --- /dev/null +++ b/src/main/webapp/react-component/utils/audit/audit-endpoint.js @@ -0,0 +1,48 @@ +import { __awaiter, __generator } from "tslib"; +import fetch from '../fetch'; +export var postAuditLog = function (_a) { + var action = _a.action, component = _a.component, items = _a.items; + return __awaiter(void 0, void 0, void 0, function () { + var body; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + body = { + action: action, + component: component, + items: items, + }; + return [4 /*yield*/, fetch("./internal/audit/", { + method: 'POST', + body: JSON.stringify(body), + })]; + case 1: + _b.sent(); + return [2 /*return*/]; + } + }); + }); +}; +export var postSimpleAuditLog = function (_a) { + var action = _a.action, component = _a.component; + return __awaiter(void 0, void 0, void 0, function () { + var body; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + body = { + action: action, + component: component, + }; + return [4 /*yield*/, fetch("./internal/audit/simple", { + method: 'POST', + body: JSON.stringify(body), + })]; + case 1: + _b.sent(); + return [2 /*return*/]; + } + }); + }); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXVkaXQtZW5kcG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL2F1ZGl0L2F1ZGl0LWVuZHBvaW50LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLE1BQU0sVUFBVSxDQUFBO0FBa0I1QixNQUFNLENBQUMsSUFBTSxZQUFZLEdBQUcsVUFBTyxFQUFzQztRQUFwQyxNQUFNLFlBQUEsRUFBRSxTQUFTLGVBQUEsRUFBRSxLQUFLLFdBQUE7Ozs7OztvQkFDckQsSUFBSSxHQUFHO3dCQUNYLE1BQU0sUUFBQTt3QkFDTixTQUFTLFdBQUE7d0JBQ1QsS0FBSyxPQUFBO3FCQUNOLENBQUE7b0JBQ0QscUJBQU0sS0FBSyxDQUFDLG1CQUFtQixFQUFFOzRCQUMvQixNQUFNLEVBQUUsTUFBTTs0QkFDZCxJQUFJLEVBQUUsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUM7eUJBQzNCLENBQUMsRUFBQTs7b0JBSEYsU0FHRSxDQUFBOzs7OztDQUNILENBQUE7QUFFRCxNQUFNLENBQUMsSUFBTSxrQkFBa0IsR0FBRyxVQUFPLEVBR3hCO1FBRmYsTUFBTSxZQUFBLEVBQ04s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gIGFjdGlvbixcbiAgY29tcG9uZW50LFxufTogU2ltcGxlQXVkaXRMb2cpID0+IHtcbiAgY29uc3QgYm9keSA9IHtcbiAgICBhY3Rpb24sXG4gICAgY29tcG9uZW50LFxuICB9XG4gIGF3YWl0IGZldGNoKGAuL2ludGVybmFsL2F1ZGl0L3NpbXBsZWAsIHtcbiAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICBib2R5OiBKU09OLnN0cmluZ2lmeShib2R5KSxcbiAgfSlcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/cql/cql.d.ts b/src/main/webapp/react-component/utils/cql/cql.d.ts new file mode 100644 index 00000000000..781b6b6bee1 --- /dev/null +++ b/src/main/webapp/react-component/utils/cql/cql.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export declare const getResultSetCql: (ids: string[]) => string; diff --git a/src/main/webapp/react-component/utils/cql/cql.js b/src/main/webapp/react-component/utils/cql/cql.js new file mode 100644 index 00000000000..a84c547ec81 --- /dev/null +++ b/src/main/webapp/react-component/utils/cql/cql.js @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export var getResultSetCql = function (ids) { + var queries = ids.map(function (id) { return "((\"id\" = '".concat(id, "'))"); }); + return "((".concat(queries.join(' OR '), ") AND (\"metacard-tags\" ILIKE '%'))"); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3FsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC91dGlscy9jcWwvY3FsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osTUFBTSxDQUFDLElBQU0sZUFBZSxHQUFHLFVBQUMsR0FBYTtJQUMzQyxJQUFNLE9BQU8sR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLFVBQUMsRUFBRSxJQUFLLE9BQUEsc0JBQWEsRUFBRSxRQUFLLEVBQXBCLENBQW9CLENBQUMsQ0FBQTtJQUNyRCxPQUFPLFlBQUssT0FBTyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMseUNBQW9DLENBQUE7QUFDdEUsQ0FBQyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGVcbiAqIExpY2Vuc2UsIG9yIGFueSBsYXRlciB2ZXJzaW9uLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5leHBvcnQgY29uc3QgZ2V0UmVzdWx0U2V0Q3FsID0gKGlkczogc3RyaW5nW10pID0+IHtcbiAgY29uc3QgcXVlcmllcyA9IGlkcy5tYXAoKGlkKSA9PiBgKChcImlkXCIgPSAnJHtpZH0nKSlgKVxuICByZXR1cm4gYCgoJHtxdWVyaWVzLmpvaW4oJyBPUiAnKX0pIEFORCAoXCJtZXRhY2FyZC10YWdzXCIgSUxJS0UgJyUnKSlgXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/cql/index.d.ts b/src/main/webapp/react-component/utils/cql/index.d.ts new file mode 100644 index 00000000000..983459e4a9e --- /dev/null +++ b/src/main/webapp/react-component/utils/cql/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { getResultSetCql } from './cql'; diff --git a/src/main/webapp/react-component/utils/cql/index.js b/src/main/webapp/react-component/utils/cql/index.js new file mode 100644 index 00000000000..ba69f493602 --- /dev/null +++ b/src/main/webapp/react-component/utils/cql/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { getResultSetCql } from './cql'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL2NxbC9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxPQUFPLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmV4cG9ydCB7IGdldFJlc3VsdFNldENxbCB9IGZyb20gJy4vY3FsJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/export/export.d.ts b/src/main/webapp/react-component/utils/export/export.d.ts new file mode 100644 index 00000000000..f82cb6546ab --- /dev/null +++ b/src/main/webapp/react-component/utils/export/export.d.ts @@ -0,0 +1,49 @@ +import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult'; +import { Overridable } from '../../../js/model/Base/base-classes'; +export declare enum Transformer { + Metacard = "metacard", + Query = "query" +} +export type ResultSet = { + cql: string; + src?: string; + srcs?: string[]; + start?: number; + count: number; +}; +export type ExportBody = { + searches: ResultSet[]; + count: number; + sorts: Object[]; + args?: Object; +}; +export type ExportFormat = { + id: string; + displayName: string; +}; +export interface ExportCountInfo { + exportSize: string; + selectionInterface: any; + customExportCount: number; +} +export type ExportInfo = { + exportFormat: string; + exportSize: string; + customExportCount: number; + selectionInterface: any; +}; +export declare const getExportResults: (results: LazyQueryResult[]) => { + id: string; + source: string; + attributes: string[]; +}[]; +export declare const getExportResult: (result: LazyQueryResult) => { + id: string; + source: string; + attributes: string[]; +}; +export declare const getExportOptions: (type: Transformer) => Promise; +export declare const getColumnOrder: () => string[]; +export declare const OverridableGetColumnOrder: Overridable<() => string[]>; +export declare const aliasMap: () => string; +export declare const exportResultSet: (transformer: string, body: ExportBody) => Promise; diff --git a/src/main/webapp/react-component/utils/export/export.js b/src/main/webapp/react-component/utils/export/export.js new file mode 100644 index 00000000000..57d0209d5b7 --- /dev/null +++ b/src/main/webapp/react-component/utils/export/export.js @@ -0,0 +1,109 @@ +import { __awaiter, __generator, __read } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import fetch from '../fetch'; +import { StartupDataStore } from '../../../js/model/Startup/startup'; +import { TypedUserInstance } from '../../../component/singletons/TypedUser'; +import { Overridable } from '../../../js/model/Base/base-classes'; +export var Transformer; +(function (Transformer) { + Transformer["Metacard"] = "metacard"; + Transformer["Query"] = "query"; +})(Transformer || (Transformer = {})); +export var getExportResults = function (results) { + return results.map(function (result) { return getExportResult(result); }); +}; +var getResultId = function (result) { + var id = result.plain.id; + return encodeURIComponent(id); +}; +var getResultSourceId = function (result) { + var sourceId = result.plain.metacard.properties['source-id']; + return encodeURIComponent(sourceId); +}; +export var getExportResult = function (result) { + return { + id: getResultId(result), + source: getResultSourceId(result), + attributes: Object.keys(result.plain.metacard.properties), + }; +}; +export var getExportOptions = function (type) { return __awaiter(void 0, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fetch("./internal/transformers/".concat(type)) + .then(function (response) { return response.json(); }) + .then(function (exportFormats) { + var configuredFormats = type == Transformer.Metacard + ? StartupDataStore.Configuration.getExportMetacardFormatOptions() + : StartupDataStore.Configuration.getExportMetacardsFormatOptions(); + if (configuredFormats.length > 0) { + var newFormats = configuredFormats + .map(function (configuredFormat) { + var validFormat = exportFormats.find(function (exportFormat) { + return exportFormat.id === configuredFormat; + }); + if (validFormat == undefined) + console.log(configuredFormat + + ' does not match any valid transformers; cannot include format in export list.'); + return validFormat; + }) + .filter(function (format) { return format !== undefined; }); + if (newFormats.length > 0) + return newFormats; + else + console.log("Could not match admin's configured export options to any valid transformers. \ + Returning list of all valid transformers instead."); + } + else { + console.log('Export formats not configured. Using list of all valid transformers instead.'); + } + return exportFormats; + })]; + case 1: + response = _a.sent(); + return [2 /*return*/, response]; + } + }); +}); }; +export var getColumnOrder = function () { + return TypedUserInstance.getResultsAttributesSummaryShown(); +}; +export var OverridableGetColumnOrder = new Overridable(getColumnOrder); +export var aliasMap = function () { + var _a; + return encodeURIComponent(Object.entries(((_a = StartupDataStore.Configuration.config) === null || _a === void 0 ? void 0 : _a.attributeAliases) || {}) + .map(function (_a) { + var _b = __read(_a, 2), k = _b[0], v = _b[1]; + return "".concat(k, "=").concat(v); + }) + .toString()); +}; +export var exportResultSet = function (transformer, body) { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fetch("./internal/cql/transform/".concat(transformer), { + method: 'POST', + body: JSON.stringify(body), + headers: { + 'Content-Type': 'application/json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gICAgIHJldHVybiBgJHtrfT0ke3Z9YFxuICAgICAgfSlcbiAgICAgIC50b1N0cmluZygpXG4gIClcbn1cblxuZXhwb3J0IGNvbnN0IGV4cG9ydFJlc3VsdFNldCA9IGFzeW5jIChcbiAgdHJhbnNmb3JtZXI6IHN0cmluZyxcbiAgYm9keTogRXhwb3J0Qm9keVxuKSA9PiB7XG4gIHJldHVybiBhd2FpdCBmZXRjaChgLi9pbnRlcm5hbC9jcWwvdHJhbnNmb3JtLyR7dHJhbnNmb3JtZXJ9YCwge1xuICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KGJvZHkpLFxuICAgIGhlYWRlcnM6IHtcbiAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgfSxcbiAgfSlcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/export/index.d.ts b/src/main/webapp/react-component/utils/export/index.d.ts new file mode 100644 index 00000000000..e0b50096656 --- /dev/null +++ b/src/main/webapp/react-component/utils/export/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { getExportOptions, exportResultSet, ExportBody, Transformer, ResultSet, ExportCountInfo, ExportInfo, OverridableGetColumnOrder, getColumnOrder, aliasMap, ExportFormat, } from './export'; diff --git a/src/main/webapp/react-component/utils/export/index.js b/src/main/webapp/react-component/utils/export/index.js new file mode 100644 index 00000000000..69e547f67ca --- /dev/null +++ b/src/main/webapp/react-component/utils/export/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { getExportOptions, exportResultSet, Transformer, OverridableGetColumnOrder, getColumnOrder, aliasMap, } from './export'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL2V4cG9ydC9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sRUFDTCxnQkFBZ0IsRUFDaEIsZUFBZSxFQUVmLFdBQVcsRUFJWCx5QkFBeUIsRUFDekIsY0FBYyxFQUNkLFFBQVEsR0FFVCxNQUFNLFVBQVUsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHtcbiAgZ2V0RXhwb3J0T3B0aW9ucyxcbiAgZXhwb3J0UmVzdWx0U2V0LFxuICBFeHBvcnRCb2R5LFxuICBUcmFuc2Zvcm1lcixcbiAgUmVzdWx0U2V0LFxuICBFeHBvcnRDb3VudEluZm8sXG4gIEV4cG9ydEluZm8sXG4gIE92ZXJyaWRhYmxlR2V0Q29sdW1uT3JkZXIsXG4gIGdldENvbHVtbk9yZGVyLFxuICBhbGlhc01hcCxcbiAgRXhwb3J0Rm9ybWF0LFxufSBmcm9tICcuL2V4cG9ydCdcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/fetch/fetch.d.ts b/src/main/webapp/react-component/utils/fetch/fetch.d.ts new file mode 100644 index 00000000000..f09f1a73fac --- /dev/null +++ b/src/main/webapp/react-component/utils/fetch/fetch.d.ts @@ -0,0 +1,25 @@ +export type QueryResponseType = { + results: any; + statusBySource: { + [key: string]: { + hits: number; + count: number; + elapsed: number; + id: string; + successful: boolean; + warnings: any[]; + errors: string[]; + }; + }; + types: any; + highlights: any; + didYouMeanFields: any; + showingResultsForFields: any; +}; +export declare function checkForErrors(response: QueryResponseType): void; +export type FetchErrorEventType = CustomEvent<{ + errors: string[]; +}>; +export declare function throwFetchErrorEvent(errors?: string[]): void; +export declare function listenForFetchErrorEvent(callback: (event: FetchErrorEventType) => void): () => void; +export default function (url: string, { headers, ...opts }?: RequestInit): Promise; diff --git a/src/main/webapp/react-component/utils/fetch/fetch.js b/src/main/webapp/react-component/utils/fetch/fetch.js new file mode 100644 index 00000000000..8c83c86453e --- /dev/null +++ b/src/main/webapp/react-component/utils/fetch/fetch.js @@ -0,0 +1,106 @@ +import { __assign, __awaiter, __generator, __read, __rest, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import url from 'url'; +import qs from 'querystring'; +import { Environment } from '../../../js/Environment'; +import { v4 } from 'uuid'; +export function checkForErrors(response) { + var statusBySource = response.statusBySource; + if (statusBySource) { + var errors = Object.values(statusBySource).flatMap(function (source) { return source.errors; }); + if (errors.length > 0) { + throwFetchErrorEvent(errors); + } + } +} +var fetch = window.fetch; +window.__global__fetch = fetch; +// patch global fetch to warn about usage during development +if (process.env.NODE_ENV !== 'production') { + window.fetch = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var error = new Error([ + "Using 'window.fetch'.", + 'Are you sure you want to do this?', + "Most code should use 'react-component/utils/fetch' which provides defaults compatible with the backend.", + "To get rid of this message, use 'window.__global__fetch' instead.", + ].join(' ')); + console.warn(error); + // @ts-expect-error ts-migrate(2556) FIXME: Expected 1-2 arguments, but got 0 or more. + return fetch.apply(void 0, __spreadArray([], __read(args), false)); + }; +} +var cacheBust = function (urlString) { + var _a = url.parse(urlString), query = _a.query, rest = __rest(_a, ["query"]); + return url.format(__assign(__assign({}, rest), { + // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string | null' is not assignable... Remove this comment to see the full error message + search: '?' + qs.stringify(__assign(__assign({}, qs.parse(query)), { _: Date.now() })) })); +}; +var fetchErrorEventName = v4(); // ensure we don't clash with other events +export function throwFetchErrorEvent(errors) { + if (errors === void 0) { errors = []; } + if (typeof window !== 'undefined') { + var customEvent = new CustomEvent(fetchErrorEventName, { + detail: { + errors: errors, + }, + }); + window.dispatchEvent(customEvent); + } +} +export function listenForFetchErrorEvent(callback) { + if (typeof window !== 'undefined') { + window.addEventListener(fetchErrorEventName, callback); + return function () { + window.removeEventListener(fetchErrorEventName, callback); + }; + } + return function () { }; +} +export default function (url, _a) { + if (_a === void 0) { _a = {}; } + var headers = _a.headers, opts = __rest(_a, ["headers"]); + return __awaiter(this, void 0, void 0, function () { + var MockApi_1, _b, _c; + var _d; + return __generator(this, function (_e) { + switch (_e.label) { + case 0: + if (!Environment.isTest()) return [3 /*break*/, 3]; + return [4 /*yield*/, import('../../../test/mock-api')]; + case 1: + MockApi_1 = (_e.sent()).default; + _c = (_b = Promise).resolve; + _d = {}; + return [4 /*yield*/, function () { + return MockApi_1(url); + }]; + case 2: return [2 /*return*/, _c.apply(_b, [(_d.json = _e.sent(), + _d)])]; + case 3: return [2 /*return*/, fetch(cacheBust(url), __assign(__assign({ credentials: 'same-origin', cache: 'no-cache' }, opts), { headers: __assign({ 'X-Requested-With': 'XMLHttpRequest' }, headers) })).then(function (response) { + if (response.status === 500) { + throwFetchErrorEvent([response.statusText || 'Internal Server Error']); + } + return response; + })]; + } + }); + }); +}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pXG4gICAgICB9LFxuICAgIH0pIGFzIFByb21pc2U8UmVzcG9uc2U+XG4gIH1cbiAgcmV0dXJuIGZldGNoKGNhY2hlQnVzdCh1cmwpLCB7XG4gICAgY3JlZGVudGlhbHM6ICdzYW1lLW9yaWdpbicsXG4gICAgY2FjaGU6ICduby1jYWNoZScsXG4gICAgLi4ub3B0cyxcbiAgICBoZWFkZXJzOiB7XG4gICAgICAnWC1SZXF1ZXN0ZWQtV2l0aCc6ICdYTUxIdHRwUmVxdWVzdCcsXG4gICAgICAuLi5oZWFkZXJzLFxuICAgIH0sXG4gIH0pLnRoZW4oKHJlc3BvbnNlKSA9PiB7XG4gICAgaWYgKHJlc3BvbnNlLnN0YXR1cyA9PT0gNTAwKSB7XG4gICAgICB0aHJvd0ZldGNoRXJyb3JFdmVudChbcmVzcG9uc2Uuc3RhdHVzVGV4dCB8fCAnSW50ZXJuYWwgU2VydmVyIEVycm9yJ10pXG4gICAgfVxuICAgIHJldHVybiByZXNwb25zZVxuICB9KVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/fetch/index.d.ts b/src/main/webapp/react-component/utils/fetch/index.d.ts new file mode 100644 index 00000000000..5b96d9632af --- /dev/null +++ b/src/main/webapp/react-component/utils/fetch/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './fetch'; diff --git a/src/main/webapp/react-component/utils/fetch/index.js b/src/main/webapp/react-component/utils/fetch/index.js new file mode 100644 index 00000000000..c18df1d0b76 --- /dev/null +++ b/src/main/webapp/react-component/utils/fetch/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './fetch'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL2ZldGNoL2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFNBQVMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vZmV0Y2gnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/query/index.d.ts b/src/main/webapp/react-component/utils/query/index.d.ts new file mode 100644 index 00000000000..15cad0b05cb --- /dev/null +++ b/src/main/webapp/react-component/utils/query/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './query'; diff --git a/src/main/webapp/react-component/utils/query/index.js b/src/main/webapp/react-component/utils/query/index.js new file mode 100644 index 00000000000..c46720d5c10 --- /dev/null +++ b/src/main/webapp/react-component/utils/query/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './query'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL3F1ZXJ5L2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFNBQVMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vcXVlcnknXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/query/query.d.ts b/src/main/webapp/react-component/utils/query/query.d.ts new file mode 100644 index 00000000000..9a6e48f3597 --- /dev/null +++ b/src/main/webapp/react-component/utils/query/query.d.ts @@ -0,0 +1,8 @@ +type Query = { + srcs?: string[]; + count?: number; + cql: string; + facets?: string[]; +}; +declare const query: (q: Query) => Promise; +export default query; diff --git a/src/main/webapp/react-component/utils/query/query.js b/src/main/webapp/react-component/utils/query/query.js new file mode 100644 index 00000000000..e51567e7de5 --- /dev/null +++ b/src/main/webapp/react-component/utils/query/query.js @@ -0,0 +1,32 @@ +import { __awaiter, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import fetch from '../fetch'; +var query = function (q) { return __awaiter(void 0, void 0, void 0, function () { + var res; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fetch('./internal/cql', { + method: 'POST', + body: JSON.stringify(q), + })]; + case 1: + res = _a.sent(); + return [2 /*return*/, res.json()]; + } + }); +}); }; +export default query; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL3F1ZXJ5L3F1ZXJ5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLFVBQVUsQ0FBQTtBQVM1QixJQUFNLEtBQUssR0FBRyxVQUFPLENBQVE7Ozs7b0JBQ2YscUJBQU0sS0FBSyxDQUFDLGdCQUFnQixFQUFFO29CQUN4QyxNQUFNLEVBQUUsTUFBTTtvQkFDZCxJQUFJLEVBQUUsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7aUJBQ3hCLENBQUMsRUFBQTs7Z0JBSEksR0FBRyxHQUFHLFNBR1Y7Z0JBRUYsc0JBQU8sR0FBRyxDQUFDLElBQUksRUFBRSxFQUFBOzs7S0FDbEIsQ0FBQTtBQUVELGVBQWUsS0FBSyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0I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G4gICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgYm9keTogSlNPTi5zdHJpbmdpZnkocSksXG4gIH0pXG5cbiAgcmV0dXJuIHJlcy5qc29uKClcbn1cblxuZXhwb3J0IGRlZmF1bHQgcXVlcnlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/save-file/save-file.d.ts b/src/main/webapp/react-component/utils/save-file/save-file.d.ts new file mode 100644 index 00000000000..bf74bf39dc0 --- /dev/null +++ b/src/main/webapp/react-component/utils/save-file/save-file.d.ts @@ -0,0 +1,4 @@ +import { Overridable } from '../../../js/model/Base/base-classes'; +export default function saveFile(name: string, type: string, data: any): Promise; +export declare function getFilenameFromContentDisposition(contentDisposition: string): string | null; +export declare const OverridableSaveFile: Overridable; diff --git a/src/main/webapp/react-component/utils/save-file/save-file.js b/src/main/webapp/react-component/utils/save-file/save-file.js new file mode 100644 index 00000000000..3dc80540705 --- /dev/null +++ b/src/main/webapp/react-component/utils/save-file/save-file.js @@ -0,0 +1,48 @@ +import { __awaiter, __generator } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import $ from 'jquery'; +import { Overridable } from '../../../js/model/Base/base-classes'; +export default function saveFile(name, type, data) { + return __awaiter(this, void 0, void 0, function () { + var a, url; + return __generator(this, function (_a) { + if (data != null && navigator.msSaveBlob) + return [2 /*return*/, navigator.msSaveBlob(new Blob([data], { type: type }), name)]; + a = $(""); + url = window.URL.createObjectURL(new Blob([data], { type: type })); + a.attr('href', url); + a.attr('download', name); + $('body').append(a); + a[0].click(); + window.URL.revokeObjectURL(url); + a.remove(); + return [2 /*return*/]; + }); + }); +} +// return filename portion of content-disposition +export function getFilenameFromContentDisposition(contentDisposition) { + if (contentDisposition == null) { + return null; + } + var parts = contentDisposition.split('=', 2); + if (parts.length !== 2) { + return null; + } + return parts[1]; +} +export var OverridableSaveFile = new Overridable(saveFile); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2F2ZS1maWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3JlYWN0LWNvbXBvbmVudC91dGlscy9zYXZlLWZpbGUvc2F2ZS1maWxlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sQ0FBQyxNQUFNLFFBQVEsQ0FBQTtBQUN0QixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUNBQXFDLENBQUE7QUFFakUsTUFBTSxDQUFDLE9BQU8sVUFBZ0IsUUFBUSxDQUFDLElBQVksRUFBRSxJQUFZLEVBQUUsSUFBUzs7OztZQUMxRSxJQUFJLElBQUksSUFBSSxJQUFJLElBQUssU0FBaUIsQ0FBQyxVQUFVO2dCQUMvQyxzQkFBUSxTQUFpQixDQUFDLFVBQVUsQ0FBQyxJQUFJLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUUsSUFBSSxDQUFDLEVBQUE7WUFDMUUsQ0FBQyxHQUFHLENBQUMsQ0FBQyw2QkFBNkIsQ0FBQyxDQUFBO1lBQ3BDLEdBQUcsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLGVBQWUsQ0FBQyxJQUFJLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxDQUFDL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hbnkpLm1zU2F2ZUJsb2IpXG4gICAgcmV0dXJuIChuYXZpZ2F0b3IgYXMgYW55KS5tc1NhdmVCbG9iKG5ldyBCbG9iKFtkYXRhXSwgeyB0eXBlOiB0eXBlIH0pLCBuYW1lKVxuICBsZXQgYSA9ICQoXCI8YSBzdHlsZT0nZGlzcGxheTogbm9uZTsnLz5cIilcbiAgbGV0IHVybCA9IHdpbmRvdy5VUkwuY3JlYXRlT2JqZWN0VVJMKG5ldyBCbG9iKFtkYXRhXSwgeyB0eXBlOiB0eXBlIH0pKVxuICBhLmF0dHIoJ2hyZWYnLCB1cmwpXG4gIGEuYXR0cignZG93bmxvYWQnLCBuYW1lKVxuICAkKCdib2R5JykuYXBwZW5kKGEpXG4gIGFbMF0uY2xpY2soKVxuICB3aW5kb3cuVVJMLnJldm9rZU9iamVjdFVSTCh1cmwpXG4gIGEucmVtb3ZlKClcbn1cblxuLy8gcmV0dXJuIGZpbGVuYW1lIHBvcnRpb24gb2YgY29udGVudC1kaXNwb3NpdGlvblxuZXhwb3J0IGZ1bmN0aW9uIGdldEZpbGVuYW1lRnJvbUNvbnRlbnREaXNwb3NpdGlvbihjb250ZW50RGlzcG9zaXRpb246IHN0cmluZykge1xuICBpZiAoY29udGVudERpc3Bvc2l0aW9uID09IG51bGwpIHtcbiAgICByZXR1cm4gbnVsbFxuICB9XG5cbiAgbGV0IHBhcnRzID0gY29udGVudERpc3Bvc2l0aW9uLnNwbGl0KCc9JywgMilcbiAgaWYgKHBhcnRzLmxlbmd0aCAhPT0gMikge1xuICAgIHJldHVybiBudWxsXG4gIH1cbiAgcmV0dXJuIHBhcnRzWzFdXG59XG5cbmV4cG9ydCBjb25zdCBPdmVycmlkYWJsZVNhdmVGaWxlID0gbmV3IE92ZXJyaWRhYmxlKHNhdmVGaWxlKVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/security/index.d.ts b/src/main/webapp/react-component/utils/security/index.d.ts new file mode 100644 index 00000000000..b43a97489eb --- /dev/null +++ b/src/main/webapp/react-component/utils/security/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Access, Restrictions, Security, Entry } from './security'; diff --git a/src/main/webapp/react-component/utils/security/index.js b/src/main/webapp/react-component/utils/security/index.js new file mode 100644 index 00000000000..e4fff00c5e4 --- /dev/null +++ b/src/main/webapp/react-component/utils/security/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { Access, Restrictions, Security } from './security'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL3NlY3VyaXR5L2luZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsUUFBUSxFQUFTLE1BQU0sWUFBWSxDQUFBIiwic291cmNlc0Nv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a/src/main/webapp/react-component/utils/security/security.d.ts b/src/main/webapp/react-component/utils/security/security.d.ts new file mode 100644 index 00000000000..19e9b69e991 --- /dev/null +++ b/src/main/webapp/react-component/utils/security/security.d.ts @@ -0,0 +1,39 @@ +export type Entry = { + value: string; + access: Access; +}; +export declare enum Access { + None = 0, + Read = 1, + Write = 2, + Share = 3 +} +export declare class Restrictions { + owner: string; + accessGroups: string[]; + accessGroupsRead: string[]; + accessIndividuals: string[]; + accessIndividualsRead: string[]; + accessAdministrators: string[]; + static readonly GroupsRead = "security.access-groups-read"; + static readonly GroupsWrite = "security.access-groups"; + static readonly IndividualsRead = "security.access-individuals-read"; + static readonly IndividualsWrite = "security.access-individuals"; + static readonly AccessAdministrators = "security.access-administrators"; + static from(obj: any): Restrictions; +} +export declare class Security { + private readonly res; + constructor(res: Restrictions); + private canAccess; + canRead(user: any): boolean; + canWrite(user: any): boolean; + canShare(user: any): boolean; + isShared(): boolean; + private getGroupAccess; + private getIndividualAccess; + private getAccess; + getGroups(forceIncludeGroups: string[]): Entry[]; + getIndividuals(): Entry[]; + private static compareFn; +} diff --git a/src/main/webapp/react-component/utils/security/security.js b/src/main/webapp/react-component/utils/security/security.js new file mode 100644 index 00000000000..ddfc3847cd8 --- /dev/null +++ b/src/main/webapp/react-component/utils/security/security.js @@ -0,0 +1,132 @@ +import { __read, __spreadArray } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either + * version 3 of the License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed along with this program and can be found at + * . + * + **/ +import _ from 'underscore'; +export var Access; +(function (Access) { + Access[Access["None"] = 0] = "None"; + Access[Access["Read"] = 1] = "Read"; + Access[Access["Write"] = 2] = "Write"; + Access[Access["Share"] = 3] = "Share"; +})(Access || (Access = {})); +export var Restrictions = /** @class */ (function () { + function Restrictions() { + } + // remove this ugly function when everything is typescript + Restrictions.from = function (obj) { + if (typeof obj.get !== 'function') + return { + owner: obj.owner || obj['metacard.owner'], + accessGroups: obj.accessGroups || obj[this.GroupsWrite] || [], + accessGroupsRead: obj.accessGroupsRead || obj[this.GroupsRead] || [], + accessIndividuals: obj.accessIndividuals || obj[this.IndividualsWrite] || [], + accessIndividualsRead: obj.accessIndividualsRead || obj[this.IndividualsRead] || [], + accessAdministrators: obj.accessAdministrators || obj[this.AccessAdministrators] || [], + }; + return { + owner: obj.get('owner') || obj.get('metacard.owner'), + accessGroups: obj.get(this.GroupsWrite) || obj.get('accessGroups') || [], + accessGroupsRead: obj.get(this.GroupsRead) || obj.get('accessGroupsRead') || [], + accessIndividuals: obj.get(this.IndividualsWrite) || obj.get('accessIndividuals') || [], + accessIndividualsRead: obj.get(this.IndividualsRead) || obj.get('accessIndividualsRead') || [], + accessAdministrators: obj.get(this.AccessAdministrators) || + obj.get('accessAdministrators') || + [], + }; + }; + Restrictions.GroupsRead = 'security.access-groups-read'; + Restrictions.GroupsWrite = 'security.access-groups'; + Restrictions.IndividualsRead = 'security.access-individuals-read'; + Restrictions.IndividualsWrite = 'security.access-individuals'; + Restrictions.AccessAdministrators = 'security.access-administrators'; + return Restrictions; +}()); +export var Security = /** @class */ (function () { + function Security(res) { + this.res = res; + } + Security.prototype.canAccess = function (user, accessLevel) { + return (this.res.owner === undefined || + this.res.owner === user.getUserId() || + this.getAccess(user) >= accessLevel); + }; + Security.prototype.canRead = function (user) { + return this.canAccess(user, Access.Read); + }; + Security.prototype.canWrite = function (user) { + return this.canAccess(user, Access.Write); + }; + Security.prototype.canShare = function (user) { + return this.canAccess(user, Access.Share); + }; + Security.prototype.isShared = function () { + return !(this.res.accessGroups.length == 0 && + this.res.accessGroupsRead.length == 0 && + this.res.accessIndividuals.length == 0 && + this.res.accessIndividualsRead.length == 0 && + (this.res.accessAdministrators.length == 0 || + (this.res.accessAdministrators.length == 1 && + this.res.accessAdministrators[0] === this.res.owner))); + }; + Security.prototype.getGroupAccess = function (group) { + if (this.res.accessGroups.indexOf(group) > -1) { + return Access.Write; + } + if (this.res.accessGroupsRead.indexOf(group) > -1) { + return Access.Read; + } + return Access.None; + }; + Security.prototype.getIndividualAccess = function (userId) { + if (this.res.accessAdministrators.indexOf(userId) > -1) { + return Access.Share; + } + if (this.res.accessIndividuals.indexOf(userId) > -1) { + return Access.Write; + } + if (this.res.accessIndividualsRead.indexOf(userId) > -1) { + return Access.Read; + } + return Access.None; + }; + Security.prototype.getAccess = function (user) { + var _this = this; + return Math.max.apply(Math, __spreadArray([this.getIndividualAccess(user.getUserId())], __read(user.getRoles().map(function (group) { return _this.getGroupAccess(group); })), false)); + }; + Security.prototype.getGroups = function (forceIncludeGroups) { + var _this = this; + return _.union(forceIncludeGroups, this.res.accessGroups, this.res.accessGroupsRead) + .map(function (group) { + return { + value: group, + access: _this.getGroupAccess(group), + }; + }) + .sort(Security.compareFn); + }; + Security.prototype.getIndividuals = function () { + var _this = this; + return _.union(this.res.accessIndividuals, this.res.accessIndividualsRead, this.res.accessAdministrators) + .map(function (userId) { + return { + value: userId, + access: _this.getIndividualAccess(userId), + }; + }) + .sort(Security.compareFn); + }; + Security.compareFn = function (a, b) { + return a.value < b.value ? -1 : a.value > b.value ? 1 : 0; + }; + return Security; +}()); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjdXJpdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL3NlY3VyaXR5L3NlY3VyaXR5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBaUJBOzs7Ozs7Ozs7O0lBVUk7QUFDSixPQUFPLENBQUMsTUFBTS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ICAgICAgIH0gYXMgRW50cnlcbiAgICAgIH0pXG4gICAgICAuc29ydChTZWN1cml0eS5jb21wYXJlRm4pXG4gIH1cblxuICBnZXRJbmRpdmlkdWFscygpOiBFbnRyeVtdIHtcbiAgICByZXR1cm4gXy51bmlvbihcbiAgICAgIHRoaXMucmVzLmFjY2Vzc0luZGl2aWR1YWxzLFxuICAgICAgdGhpcy5yZXMuYWNjZXNzSW5kaXZpZHVhbHNSZWFkLFxuICAgICAgdGhpcy5yZXMuYWNjZXNzQWRtaW5pc3RyYXRvcnNcbiAgICApXG4gICAgICAubWFwKCh1c2VySWQ6IHN0cmluZykgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHZhbHVlOiB1c2VySWQsXG4gICAgICAgICAgYWNjZXNzOiB0aGlzLmdldEluZGl2aWR1YWxBY2Nlc3ModXNlcklkKSxcbiAgICAgICAgfSBhcyBFbnRyeVxuICAgICAgfSlcbiAgICAgIC5zb3J0KFNlY3VyaXR5LmNvbXBhcmVGbilcbiAgfVxuXG4gIHByaXZhdGUgc3RhdGljIGNvbXBhcmVGbiA9IChhOiBJdGVtLCBiOiBJdGVtKTogbnVtYmVyID0+IHtcbiAgICByZXR1cm4gYS52YWx1ZSA8IGIudmFsdWUgPyAtMSA6IGEudmFsdWUgPiBiLnZhbHVlID8gMSA6IDBcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/validation/index.d.ts b/src/main/webapp/react-component/utils/validation/index.d.ts new file mode 100644 index 00000000000..97ca11a216d --- /dev/null +++ b/src/main/webapp/react-component/utils/validation/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { showErrorMessages, getFilterErrors, ErrorComponent, validateGeo, initialErrorState, initialErrorStateWithDefault, LINE_BUFFER_MININUM_METERS, } from './validation'; diff --git a/src/main/webapp/react-component/utils/validation/index.js b/src/main/webapp/react-component/utils/validation/index.js new file mode 100644 index 00000000000..67637fac6f0 --- /dev/null +++ b/src/main/webapp/react-component/utils/validation/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { showErrorMessages, getFilterErrors, ErrorComponent, validateGeo, initialErrorState, initialErrorStateWithDefault, LINE_BUFFER_MININUM_METERS, } from './validation'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvcmVhY3QtY29tcG9uZW50L3V0aWxzL3ZhbGlkYXRpb24vaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7O0lBYUk7QUFDSixPQUFPLEVBQ0wsaUJBQWlCLEVBQ2pCLGVBQWUsRUFDZixjQUFjLEVBQ2QsV0FBVyxFQUNYLGlCQUFpQixFQUNqQiw0QkFBNEIsRUFDNUIsMEJBQTBCLEdBQzNCLE1BQU0sY0FBYyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKG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FsRXJyb3JTdGF0ZVdpdGhEZWZhdWx0LFxuICBMSU5FX0JVRkZFUl9NSU5JTlVNX01FVEVSUyxcbn0gZnJvbSAnLi92YWxpZGF0aW9uJ1xuIl19 \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/validation/validation.d.ts b/src/main/webapp/react-component/utils/validation/validation.d.ts new file mode 100644 index 00000000000..0b9388648c0 --- /dev/null +++ b/src/main/webapp/react-component/utils/validation/validation.d.ts @@ -0,0 +1,22 @@ +/// +export declare const LINE_BUFFER_MININUM_METERS = 75; +export declare function showErrorMessages(errors: any): void; +export declare function getFilterErrors(filters: any): unknown[]; +export declare function validateGeo(key: string, value: any): { + error: boolean; + message: string | null; +} | undefined; +export declare const ErrorComponent: (props: any) => JSX.Element | null; +export declare function validateListOfPoints(coordinates: any[], mode: string): { + error: boolean; + message: string | null; +}; +export declare const initialErrorState: { + error: boolean; + message: string; +}; +export declare const initialErrorStateWithDefault: { + error: boolean; + message: string; + defaultValue: string; +}; diff --git a/src/main/webapp/react-component/utils/validation/validation.js b/src/main/webapp/react-component/utils/validation/validation.js new file mode 100644 index 00000000000..fa9360a98e3 --- /dev/null +++ b/src/main/webapp/react-component/utils/validation/validation.js @@ -0,0 +1,665 @@ +import { __assign, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import styled from 'styled-components'; +import * as usngs from 'usng.js'; +import _ from 'lodash'; +// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. +var converter = new usngs.Converter(); +var NORTHING_OFFSET = 10000000; +var LATITUDE = 'latitude'; +var LONGITUDE = 'longitude'; +// 75 meters was determined to be a reasonable min for linestring searches based on testing against known +// data sources +export var LINE_BUFFER_MININUM_METERS = 75; +import DistanceUtils from '../../../js/DistanceUtils'; +import { parseDmsCoordinate, dmsCoordinateToDD, } from '../../../component/location-new/utils/dms-utils'; +import wreqr from '../../../js/wreqr'; +import { errorMessages } from '../../../component/location-new/utils'; +export function showErrorMessages(errors) { + if (errors.length === 0) { + return; + } + var searchErrorMessage = { + title: '', + message: '', + }; + if (errors.length > 1) { + var msg = searchErrorMessage.message; + searchErrorMessage.title = + 'Your search cannot be run due to multiple errors'; + var formattedErrors = errors.map(function (error) { return "\u2022 ".concat(error.title, ": ").concat(error.body); }); + searchErrorMessage.message = msg.concat(formattedErrors); + } + else { + var error = errors[0]; + searchErrorMessage.title = error.title; + searchErrorMessage.message = error.body; + } + ; + wreqr.vent.trigger('snack', { + message: "".concat(searchErrorMessage.title, " : ").concat(searchErrorMessage.message), + snackProps: { + alertProps: { + severity: 'error', + }, + }, + }); +} +export function getFilterErrors(filters) { + var errors = new Set(); + var geometryErrors = new Set(); + for (var i = 0; i < filters.length; i++) { + var filter = filters[i]; + getGeometryErrors(filter).forEach(function (msg) { + geometryErrors.add(msg); + }); + } + geometryErrors.forEach(function (err) { + errors.add({ + title: 'Invalid geometry filter', + body: err, + }); + }); + return Array.from(errors); +} +// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. +export function validateGeo(key, value) { + switch (key) { + case 'lat': + return validateDDLatLon(LATITUDE, value, 90); + case 'lon': + return validateDDLatLon(LONGITUDE, value, 180); + case 'dmsLat': + return validateDmsLatLon(LATITUDE, value); + case 'dmsLon': + return validateDmsLatLon(LONGITUDE, value); + case 'usng': + return validateUsng(value); + case 'easting': + case 'northing': + case 'zoneNumber': + case 'hemisphere': + return validateUtmUps(key, value); + case 'radius': + case 'lineWidth': + case 'polygonBufferWidth': + return validateRadiusLineBuffer(key, value); + case 'line': + case 'poly': + case 'polygon': + case 'multiline': + case 'multipolygon': + return validateLinePolygon(key, value); + case 'bbox': + return validateBoundingBox(key, value); + default: + } +} +export var ErrorComponent = function (props) { + var errorState = props.errorState; + return errorState.error ? (React.createElement(Invalid, { className: "my-2" }, + React.createElement(WarningIcon, { className: "fa fa-warning" }), + React.createElement("span", null, errorState.message))) : null; +}; +export function validateListOfPoints(coordinates, mode) { + var message = null; + var isLine = mode.includes('line'); + var numPoints = isLine ? 2 : 4; + if (!mode.includes('multi') && + !isLine && + coordinates.length >= numPoints && + !_.isEqual(coordinates[0], coordinates.slice(-1)[0])) { + message = errorMessages.firstLastPointMismatch; + } + if (!mode.includes('multi') && + !coordinates.some(function (coords) { return coords.length > 2; }) && + coordinates.length < numPoints) { + message = "Minimum of ".concat(numPoints, " points needed for ").concat(isLine ? 'Line' : 'Polygon'); + } + coordinates.forEach(function (coordinate) { + if (coordinate.length > 2) { + coordinate.forEach(function (coord) { + if (hasPointError(coord)) + message = JSON.stringify(coord) + ' is not a valid point'; + }); + } + else { + if (mode.includes('multi')) { + // Handle the case where the user has selected a "multi" mode but + // one or more shapes were invalid and therefore eliminated + message = "Switch to ".concat(isLine ? 'Line' : 'Polygon'); + } + else if (hasPointError(coordinate)) { + message = JSON.stringify(coordinate) + ' is not a valid point'; + } + } + }); + return { error: !!message, message: message }; +} +export var initialErrorState = { + error: false, + message: '', +}; +export var initialErrorStateWithDefault = { + error: false, + message: '', + defaultValue: '', +}; +function is2DArray(coordinates) { + try { + return Array.isArray(coordinates) && Array.isArray(coordinates[0]); + } + catch (e) { + return false; + } +} +function hasPointError(point) { + if (point.length !== 2 || + Number.isNaN(Number.parseFloat(point[0])) || + Number.isNaN(Number.parseFloat(point[1]))) { + return true; + } + return point[0] > 180 || point[0] < -180 || point[1] > 90 || point[1] < -90; +} +function getGeometryErrors(filter) { + var geometry = filter.geojson && filter.geojson.geometry; + var errors = new Set(); + if (!geometry) { + return errors; + } + var properties = filter.geojson.properties; + var buffer = properties.buffer; + switch (properties.type) { + case 'Polygon': + if (!Array.isArray(geometry.coordinates[0]) || + !geometry.coordinates[0].length) { + errors.add('Polygon coordinates must be in the form [[x,y],[x,y],[x,y],[x,y], ... ]'); + } + else if (geometry.coordinates[0].length < 4) { + // check for MultiPolygon + geometry.coordinates[0].forEach(function (shape) { + if (shape.length < 4) { + errors.add('Polygon coordinates must be in the form [[x,y],[x,y],[x,y],[x,y], ... ]'); + } + }); + } + var polyBufferValidation = validateRadiusLineBuffer('bufferWidth', { + value: buffer.width, + units: buffer.unit, + }); + if (polyBufferValidation.error) { + errors.add(polyBufferValidation.message); + } + break; + case 'LineString': + if (!Array.isArray(geometry.coordinates) || + !geometry.coordinates.length || + geometry.coordinates.length < 2) { + errors.add('Line coordinates must be in the form [[x,y],[x,y], ... ]'); + } + var bufferValidation = validateRadiusLineBuffer('lineWidth', { + value: buffer.width, + units: buffer.unit, + }); + // Can't just check !bufferWidth because of the case of the string "0" + if (bufferValidation.error) { + errors.add(bufferValidation.message); + } + break; + case 'Point': + var radiusValidation = validateRadiusLineBuffer('radius', { + value: buffer.width, + units: buffer.unit, + }); + if (radiusValidation.error) { + errors.add(radiusValidation.message); + } + if (geometry.coordinates.some(function (coord) { return !coord || coord.toString().length === 0; })) { + errors.add('Coordinates must not be empty'); + } + break; + case 'BoundingBox': + var _a = filter.geojson.properties, east = _a.east, west = _a.west, north = _a.north, south = _a.south; + if ([east, west, north, south].some(function (direction) { return direction === '' || direction === undefined; }) || + Number(south) >= Number(north) || + Number(west) === Number(east)) { + errors.add('Bounding box must have valid values'); + } + break; + } + return errors; +} +function validateLinePolygon(mode, currentValue) { + if (currentValue === undefined) { + return { + error: true, + message: "".concat(mode === 'line' ? 'Line' : 'Polygon', " cannot be empty"), + }; + } + try { + var parsedCoords = JSON.parse(currentValue); + if (!is2DArray(parsedCoords)) { + return { error: true, message: 'Not an acceptable value' }; + } + return validateListOfPoints(parsedCoords, mode); + } + catch (e) { + return { error: true, message: 'Not an acceptable value' }; + } +} +function getDdCoords(value) { + return { + north: Number(value.north), + south: Number(value.south), + west: Number(value.west), + east: Number(value.east), + }; +} +function getDmsCoords(value) { + var coordinateNorth = parseDmsCoordinate(value.north); + var coordinateSouth = parseDmsCoordinate(value.south); + var coordinateWest = parseDmsCoordinate(value.west); + var coordinateEast = parseDmsCoordinate(value.east); + var north, south, west, east; + if (coordinateNorth) { + north = dmsCoordinateToDD(__assign(__assign({}, coordinateNorth), { direction: value.dmsNorthDirection })); + } + if (coordinateSouth) { + south = dmsCoordinateToDD(__assign(__assign({}, coordinateSouth), { direction: value.dmsSouthDirection })); + } + if (coordinateWest) { + west = dmsCoordinateToDD(__assign(__assign({}, coordinateWest), { direction: value.dmsWestDirection })); + } + if (coordinateEast) { + east = dmsCoordinateToDD(__assign(__assign({}, coordinateEast), { direction: value.dmsEastDirection })); + } + return { north: north, south: south, west: west, east: east }; +} +function getUsngCoords(upperLeft, lowerRight) { + var upperLeftCoord = converter.USNGtoLL(upperLeft, true); + var lowerRightCoord = converter.USNGtoLL(lowerRight, true); + return { + north: Number(upperLeftCoord.lat.toFixed(5)), + south: Number(lowerRightCoord.lat.toFixed(5)), + west: Number(upperLeftCoord.lon.toFixed(5)), + east: Number(lowerRightCoord.lon.toFixed(5)), + }; +} +function getUtmUpsCoords(upperLeft, lowerRight) { + var upperLeftParts = { + easting: parseFloat(upperLeft.easting), + northing: parseFloat(upperLeft.northing), + zoneNumber: upperLeft.zoneNumber, + hemisphere: upperLeft.hemisphere, + northPole: upperLeft.hemisphere.toUpperCase() === 'NORTHERN', + }; + var lowerRightParts = { + easting: parseFloat(lowerRight.easting), + northing: parseFloat(lowerRight.northing), + zoneNumber: lowerRight.zoneNumber, + hemisphere: lowerRight.hemisphere, + northPole: lowerRight.hemisphere.toUpperCase() === 'NORTHERN', + }; + upperLeftParts.northing = + upperLeftParts.zoneNumber === 0 || upperLeftParts.northPole + ? upperLeftParts.northing + : upperLeftParts.northing - NORTHING_OFFSET; + lowerRightParts.northing = + lowerRightParts.zoneNumber === 0 || lowerRightParts.northPole + ? lowerRightParts.northing + : lowerRightParts.northing - NORTHING_OFFSET; + var north = Number(converter.UTMUPStoLL(upperLeftParts).lat.toFixed(5)); + var south = Number(converter.UTMUPStoLL(lowerRightParts).lat.toFixed(5)); + var west = Number(converter.UTMUPStoLL(upperLeftParts).lon.toFixed(5)); + var east = Number(converter.UTMUPStoLL(lowerRightParts).lon.toFixed(5)); + return { north: north, south: south, west: west, east: east }; +} +function validateLatitudes(north, south, isUsngOrUtmUps) { + if (!isNaN(south) && + !isNaN(north) && + parseFloat(south) >= parseFloat(north)) { + return { + error: true, + message: isUsngOrUtmUps + ? 'Upper left coordinate must be located above lower right coordinate' + : 'North value must be greater than south value', + }; + } + return initialErrorState; +} +function validateLongitudes(west, east, isUsngOrUtmUps) { + if (!isNaN(west) && !isNaN(east) && parseFloat(west) === parseFloat(east)) { + return { + error: true, + message: isUsngOrUtmUps + ? 'Left bound cannot equal right bound' + : 'West value cannot equal east value', + }; + } + return initialErrorState; +} +function validateBoundingBox(key, value) { + var coords, north, south, west, east; + if (value.isDms) { + coords = getDmsCoords(value); + } + else if (value.isUsng) { + coords = getUsngCoords(value.upperLeft, value.lowerRight); + } + else if (value.isUtmUps) { + coords = getUtmUpsCoords(value.upperLeft, value.lowerRight); + } + else { + coords = getDdCoords(value); + } + north = coords.north; + south = coords.south; + west = coords.west; + east = coords.east; + var isUsngOrUtmUps = value.isUsng || value.isUtmUps; + if (key.toLowerCase().includes('lon')) { + var _a = validateLongitudes(west, east, isUsngOrUtmUps), error = _a.error, message = _a.message; + if (error) { + return { error: error, message: message }; + } + return validateLatitudes(north, south, isUsngOrUtmUps); + } + else { + var _b = validateLatitudes(north, south, isUsngOrUtmUps), error = _b.error, message = _b.message; + if (error) { + return { error: error, message: message }; + } + return validateLongitudes(west, east, isUsngOrUtmUps); + } + return initialErrorState; +} +function validateDDLatLon(label, value, defaultCoord) { + var message = ''; + var defaultValue; + if (value === undefined || value === null || value === '') { + message = getEmptyErrorMessage(label); + return { error: true, message: message, defaultValue: defaultValue }; + } + if (Number(value) > defaultCoord || Number(value) < -1 * defaultCoord) { + defaultValue = Number(value) > 0 ? defaultCoord : -1 * defaultCoord; + message = getDefaultingErrorMessage(value, label, defaultValue); + return { error: true, message: message, defaultValue: defaultValue }; + } + return initialErrorStateWithDefault; +} +function validateDmsLatLon(label, value) { + var message = ''; + var defaultValue; + var validator = label === LATITUDE ? 'dd°mm\'ss.s"' : 'ddd°mm\'ss.s"'; + if (value === undefined || value === null || value === '') { + message = getEmptyErrorMessage(label); + return { error: true, message: message, defaultValue: defaultValue }; + } + var dmsValidation = validateDmsInput(value, validator); + if (dmsValidation.error) { + defaultValue = dmsValidation.defaultValue; + message = getDefaultingErrorMessage(value, label, defaultValue); + return { error: true, message: message, defaultValue: defaultValue }; + } + return { error: false, message: message, defaultValue: defaultValue }; +} +function validateUsng(value) { + if (value === '') { + return { error: true, message: 'USNG / MGRS coordinates cannot be empty' }; + } + if (value === undefined) { + return initialErrorState; + } + var result = converter.USNGtoLL(value, true); + var isInvalid = Number.isNaN(result.lat) || Number.isNaN(result.lon); + return { + error: isInvalid, + message: isInvalid ? 'Invalid USNG / MGRS coordinates' : '', + }; +} +function upsValidDistance(distance) { + return distance >= 800000 && distance <= 3200000; +} +function validateUtmUps(key, value) { + var easting = value.easting, northing = value.northing, zoneNumber = value.zoneNumber, hemisphere = value.hemisphere; + var northernHemisphere = hemisphere.toUpperCase() === 'NORTHERN'; + zoneNumber = Number.parseInt(zoneNumber); + var isUps = zoneNumber === 0; + var error = initialErrorState; + // Number('') returns 0, so we can't just blindly cast to number + // since we want to differentiate '' from 0 + var utmUpsEasting = easting === '' ? NaN : Number(easting); + var utmUpsNorthing = northing === '' ? NaN : Number(northing); + var isNorthingInvalid = isNaN(utmUpsNorthing) && northing !== undefined; + var isEastingInvalid = isNaN(utmUpsEasting) && easting !== undefined; + if (!isNaN(utmUpsEasting)) { + utmUpsEasting = Number.parseFloat(easting); + } + else if (key === 'utmUpsEasting' && + easting !== undefined && + !isNorthingInvalid) { + return { error: true, message: 'Easting value is invalid' }; + } + if (!isNaN(utmUpsNorthing)) { + utmUpsNorthing = Number.parseFloat(northing); + utmUpsNorthing = + isUps || northernHemisphere + ? utmUpsNorthing + : utmUpsNorthing - NORTHING_OFFSET; + } + else if (key === 'utmUpsNorthing' && + northing !== undefined && + !isEastingInvalid) { + return { error: true, message: 'Northing value is invalid' }; + } + if (isUps && + (!upsValidDistance(utmUpsNorthing) || !upsValidDistance(utmUpsEasting))) { + return { error: true, message: 'Invalid UPS distance' }; + } + var utmUpsParts = { + easting: utmUpsEasting, + northing: utmUpsNorthing, + zoneNumber: zoneNumber, + hemisphere: hemisphere, + northPole: northernHemisphere, + }; + // These checks are to ensure that we only mark a value as "invalid" + // if the user has entered something already + var _a = converter.UTMUPStoLL(utmUpsParts), lat = _a.lat, lon = _a.lon; + lon = lon % 360; + if (lon < -180) { + lon = lon + 360; + } + if (lon > 180) { + lon = lon - 360; + } + // we want to validate using the hasPointError method, but only if they're both defined + // if one or more is undefined, we want to return true + var isLatLonValid = !hasPointError([lon, lat]) || + northing === undefined || + easting === undefined; + if ((isNorthingInvalid && isEastingInvalid) || !isLatLonValid) { + return { error: true, message: 'Invalid UTM/UPS coordinates' }; + } + return error; +} +function validateRadiusLineBuffer(key, value) { + var parsed = Number(value.value); + var buffer = Number.isNaN(parsed) ? 0 : parsed; + var bufferMeters = DistanceUtils.getDistanceInMeters(buffer, value.units); + if (key === 'lineWidth' && bufferMeters < LINE_BUFFER_MININUM_METERS) { + var minDistance = DistanceUtils.getDistanceFromMeters(LINE_BUFFER_MININUM_METERS, value.units); + var minDistanceDisplay = Number.isInteger(minDistance) + ? minDistance.toString() + : // Add 0.01 to account for decimal places beyond hundredths. For example, if + // the selected unit is feet, then the required value is 246.063, and if we only + // showed (246.063).toFixed(2), then the user would see 246.06, but if they typed + // that in, they would still be shown this error. + (minDistance + 0.01).toFixed(2); + return { + error: true, + message: "Line buffer must be at least ".concat(minDistanceDisplay, " ").concat(value.units), + }; + } + var label = key === 'radius' ? 'Radius ' : 'Buffer width '; + if (value.value.toString().length === 0) { + return initialErrorState; + } + if (key.includes('Width') && bufferMeters < 1 && bufferMeters !== 0) { + return { + error: true, + message: label + + 'must be 0, or at least ' + + DistanceUtils.getDistanceFromMeters(1, value.units).toPrecision(2) + + ' ' + + value.units, + }; + } + else if (key.includes('radius') && bufferMeters < 1) { + return { + error: true, + message: label + + 'must be at least ' + + DistanceUtils.getDistanceFromMeters(1, value.units).toPrecision(2) + + ' ' + + value.units, + }; + } + return initialErrorState; +} +var validateDmsInput = function (input, placeHolder) { + if (input !== undefined && placeHolder === 'dd°mm\'ss.s"') { + var corrected = getCorrectedDmsLatInput(input); + return { error: corrected !== input, defaultValue: corrected }; + } + else if (input !== undefined && placeHolder === 'ddd°mm\'ss.s"') { + var corrected = getCorrectedDmsLonInput(input); + return { error: corrected !== input, defaultValue: corrected }; + } + return { error: false }; +}; +var lat = { + degreesBegin: 0, + degreesEnd: 2, + minutesBegin: 3, + minutesEnd: 5, + secondsBegin: 6, + secondsEnd: -1, +}; +var lon = { + degreesBegin: 0, + degreesEnd: 3, + minutesBegin: 4, + minutesEnd: 6, + secondsBegin: 7, + secondsEnd: -1, +}; +var getCorrectedDmsLatInput = function (input) { + var degrees = input.slice(lat.degreesBegin, lat.degreesEnd); + var minutes = input.slice(lat.minutesBegin, lat.minutesEnd); + var seconds = input.slice(lat.secondsBegin, lat.secondsEnd); + var maxDmsLat = '90°00\'00"'; + if (degrees > 90) { + return maxDmsLat; + } + else if (minutes >= 60) { + if (degrees < 90) { + return (Number.parseInt(degrees) + 1).toString() + '°00\'00"'; + } + else { + return maxDmsLat; + } + } + else if (seconds >= 60) { + if (minutes < 59) { + return degrees + '°' + (Number.parseInt(minutes) + 1).toString() + '\'00"'; + } + else { + if (degrees >= '90') { + return maxDmsLat; + } + else { + return (Number.parseInt(degrees) + 1).toString() + '°00\'00"'; + } + } + } + else if (input.slice(lat.degreesBegin, lat.degreesEnd) === '9_' && + input.slice(lat.degreesEnd) === '°00\'00"') { + return '9_°__\'__"'; + } + else if (input.slice(lat.minutesBegin, lat.minutesEnd) === '6_' && + input.slice(lat.minutesEnd) === '\'00"') { + return input.slice(lat.degreesBegin, lat.degreesEnd) + '°6_\'__"'; + } + else { + return input; + } +}; +var getCorrectedDmsLonInput = function (input) { + var degrees = input.slice(lon.degreesBegin, lon.degreesEnd); + var minutes = input.slice(lon.minutesBegin, lon.minutesEnd); + var seconds = input.slice(lon.secondsBegin, lon.secondsEnd); + var maxDmsLon = '180°00\'00"'; + if (degrees > 180) { + return maxDmsLon; + } + else if (minutes >= 60) { + if (degrees < 180) { + return (Number.parseInt(degrees) + 1).toString() + '°00\'00"'; + } + else { + return maxDmsLon; + } + } + else if (seconds > 60) { + if (minutes < 59) { + return degrees + '°' + (Number.parseInt(minutes) + 1).toString() + '\'00"'; + } + else { + if (degrees >= '180') { + return maxDmsLon; + } + else { + return (Number.parseInt(degrees) + 1).toString() + '°00\'00"'; + } + } + } + else if (input.slice(lon.degreesBegin, lon.degreesEnd) === '18_' && + input.slice(lon.degreesEnd) === '°00\'00"') { + return '18_°__\'__"'; + } + else if (input.slice(lon.minutesBegin, lon.minutesEnd) === '6_' && + input.slice(lon.minutesEnd) === '\'00"') { + return input.slice(lon.degreesBegin, lon.degreesEnd) + '°6_\'__"'; + } + else { + return input; + } +}; +function getDefaultingErrorMessage(value, label, defaultValue) { + return "".concat(value.replace(/_/g, '0'), " is not an acceptable ").concat(label, " value. Defaulting to ").concat(defaultValue); +} +function getEmptyErrorMessage(label) { + return "".concat(label.replace(/^\w/, function (c) { return c.toUpperCase(); }), " cannot be empty"); +} +var Invalid = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid ", ";\n height: 100%;\n display: block;\n overflow: hidden;\n color: white;\n"], ["\n border: 1px solid ", ";\n height: 100%;\n display: block;\n overflow: hidden;\n color: white;\n"])), function (props) { return props.theme.negativeColor; }); +var WarningIcon = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: ", ";\n"], ["\n padding: ", ";\n"])), function (_a) { + var theme = _a.theme; + return theme.minimumSpacing; +}); +var templateObject_1, templateObject_2; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC9yZWFjdC1jb21wb25lbnQvdXRpbHMvdmFsaWRhdGlvbi92YWxpZGF0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUN6QixPQUFPLE1BQU0sTUFBTSxtQkFBbUIsQ0FBQTtBQUN0QyxPQUFPLEtBQUssS0FBSyxNQUFNLFNBQVMsQ0FBQTtBQUNoQyxPQUFPLENBQUMsTUFBTSxRQUFRLENBQUE7QUFDdEIsNEVBQTRFO0FBQzVFLElBQU0sU0FBUyxHQUFHLElBQUksS0FBSyxDQUFDLFNBQVMsRUFBRSxDQUFBO0FBQ3ZDLElBQU0sZUFBZSxHQUFHLFFBQVEsQ0FBQTtBQUNoQyxJQUFNLFFBQVEsR0FBRyxVQUFVLENBQUE7QUFDM0IsSUFBTSxTQUFTLEdBQUcsV0FBVyxDQUFBO0FBQzdCLHlHQUF5RztBQUN6RyxlQUFlO0FBQ2YsTUFBTSxDQUFDLElBQU0sMEJBQTBCLEdBQUcsRUFBRSxDQUFBO0FBQzVDLE9BQU8sYUFBYSxNQUFNLDJCQUEyQixDQUFBO0FBQ3JELE9BQU8sRUFDTCxrQkFBa0IsRUFDbEIsaUJBQWlCLEdBQ2xCLE1BQU0saURBQWlELENBQUE7QUFDeEQsT0FBTyxLQUFLLE1BQU0sbUJB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sYXk6IGJsb2NrO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBjb2xvcjogd2hpdGU7XG5gXG5jb25zdCBXYXJuaW5nSWNvbiA9IHN0eWxlZC5zcGFuYFxuICBwYWRkaW5nOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLm1pbmltdW1TcGFjaW5nfTtcbmBcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/wrap-num/index.d.ts b/src/main/webapp/react-component/utils/wrap-num/index.d.ts new file mode 100644 index 00000000000..ca11f897273 --- /dev/null +++ b/src/main/webapp/react-component/utils/wrap-num/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './wrap-num'; diff --git a/src/main/webapp/react-component/utils/wrap-num/index.js b/src/main/webapp/react-component/utils/wrap-num/index.js new file mode 100644 index 00000000000..85c336b6225 --- /dev/null +++ b/src/main/webapp/react-component/utils/wrap-num/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default } from './wrap-num'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3V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iBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vd3JhcC1udW0nXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/wrap-num/wrap-num.d.ts b/src/main/webapp/react-component/utils/wrap-num/wrap-num.d.ts new file mode 100644 index 00000000000..2c44d8ba906 --- /dev/null +++ b/src/main/webapp/react-component/utils/wrap-num/wrap-num.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export default function wrapNum(numberToWrap: number, min: number, max: number): number; diff --git a/src/main/webapp/react-component/utils/wrap-num/wrap-num.js b/src/main/webapp/react-component/utils/wrap-num/wrap-num.js new file mode 100644 index 00000000000..4bbdda38310 --- /dev/null +++ b/src/main/webapp/react-component/utils/wrap-num/wrap-num.js @@ -0,0 +1,19 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export default function wrapNum(numberToWrap, min, max) {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mlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXRcbiAqIGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlIEdOVVxuICogTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gQSBjb3B5IG9mIHRoZSBHTlUgTGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2Vuc2VcbiAqIGlzIGRpc3RyaWJ1dGVkIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtIGFuZCBjYW4gYmUgZm91bmQgYXRcbiAqIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvbGdwbC5odG1sPi5cbiAqXG4gKiovXG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHdyYXBOdW0oXG4gIG51bWJlclRvV3JhcDogbnVtYmVyLFxuICBtaW46IG51bWJlcixcbiAgbWF4OiBudW1iZXJcbik6IG51bWJlciB7XG4gIGNvbnN0IGQgPSBtYXggLSBtaW5cbiAgcmV0dXJuICgoKChudW1iZXJUb1dyYXAgLSBtaW4pICUgZCkgKyBkKSAlIGQpICsgbWluXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.d.ts b/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.d.ts new file mode 100644 index 00000000000..81c6801832d --- /dev/null +++ b/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; diff --git a/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.js b/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.js new file mode 100644 index 00000000000..12dfe611c98 --- /dev/null +++ b/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.js @@ -0,0 +1,40 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { expect } from 'chai'; +import wrapNum from './wrap-num'; +describe('wrap-num', function () { + it('overflow +1/-1', function () { + expect(wrapNum(181, -180, 180)).to.equal(-179); + expect(wrapNum(-181, -180, 180)).to.equal(179); + }); + it('overflow +/-a lot', function () { + expect(wrapNum(64.25 + 180 * 7, -180, 180)).to.equal(-180 + 64.25); + expect(wrapNum(-64.25 - 180 * 7, -180, 180)).to.equal(180 - 64.25); + }); + it('no overflow mid', function () { + expect(wrapNum(-179, -180, 180)).to.equal(-179); + expect(wrapNum(179, -180, 180)).to.equal(179); + expect(wrapNum(0, -180, 180)).to.equal(0); + expect(wrapNum(5, -180, 180)).to.equal(5); + expect(wrapNum(-15, -180, 180)).to.equal(-15); + }); + it('max should map to min', function () { + expect(wrapNum(180, -180, 180)).to.equal(-180); + }); + it('min should remain min', function () { + expect(wrapNum(-180, -180, 180)).to.equal(-180); + }); +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JhcC1udW0uc3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cbiAgICBleHBlY3Qod3JhcE51bSg1LCAtMTgwLCAxODApKS50by5lcXVhbCg1KVxuICAgIGV4cGVjdCh3cmFwTnVtKC0xNSwgLTE4MCwgMTgwKSkudG8uZXF1YWwoLTE1KVxuICB9KVxuICBpdCgnbWF4IHNob3VsZCBtYXAgdG8gbWluJywgKCkgPT4ge1xuICAgIGV4cGVjdCh3cmFwTnVtKDE4MCwgLTE4MCwgMTgwKSkudG8uZXF1YWwoLTE4MClcbiAgfSlcbiAgaXQoJ21pbiBzaG91bGQgcmVtYWluIG1pbicsICgpID0+IHtcbiAgICBleHBlY3Qod3JhcE51bSgtMTgwLCAtMTgwLCAxODApKS50by5lcXVhbCgtMTgwKVxuICB9KVxufSlcbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/react-component/visualization-selector/visualization-selector.d.ts b/src/main/webapp/react-component/visualization-selector/visualization-selector.d.ts new file mode 100644 index 00000000000..ac97ac23683 --- /dev/null +++ b/src/main/webapp/react-component/visualization-selector/visualization-selector.d.ts @@ -0,0 +1,39 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +export declare const unMaximize: (contentItem: any) => any; +declare class VisualizationSelector extends React.Component<{ + goldenLayout: any; + onClose: () => void; +}> { + cesium: any; + histogram: any; + inspector: any; + interimChoice: any; + interimState: any; + openlayers: any; + table: any; + dragSources: any[]; + constructor(props: any); + render(): JSX.Element; + componentDidMount(): void; + listenToDragStart(dragSource: any): void; + listenToDragStop(dragSource: any): void; + listenToDragSources(): void; + handleChoice(): void; + handleMouseDown(_event: any, choice: any): void; + handleMouseUp(choice: any): void; +} +export default VisualizationSelector; diff --git a/src/main/webapp/react-component/visualization-selector/visualization-selector.js b/src/main/webapp/react-component/visualization-selector/visualization-selector.js new file mode 100644 index 00000000000..2cc4d6563d5 --- /dev/null +++ b/src/main/webapp/react-component/visualization-selector/visualization-selector.js @@ -0,0 +1,141 @@ +import { __assign, __extends, __makeTemplateObject } from "tslib"; +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import React from 'react'; +import styled from 'styled-components'; +import { Visualizations } from '../../component/visualization/visualizations'; +var CustomElement = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n display: block;\n"], ["\n height: 100%;\n width: 100%;\n display: block;\n"]))); +var Visualization = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n opacity: ", ";\n padding: ", ";\n :hover {\n opacity: 1;\n }\n white-space: nowrap;\n cursor: move;\n"], ["\n opacity: ", ";\n padding: ", ";\n :hover {\n opacity: 1;\n }\n white-space: nowrap;\n cursor: move;\n"])), function (props) { return props.theme.minimumOpacity; }, function (props) { return props.theme.largeSpacing; }); +var VisualizationIcon = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n text-align: center;\n width: ", ";\n display: inline-block;\n vertical-align: middle;\n"], ["\n text-align: center;\n width: ", ";\n display: inline-block;\n vertical-align: middle;\n"])), function (props) { return props.theme.minimumButtonSize; }); +var VisualizationText = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: calc(100% - ", ");\n font-size: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n vertical-align: middle;\n"], ["\n width: calc(100% - ", ");\n font-size: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n vertical-align: middle;\n"])), function (props) { return props.theme.minimumButtonSize; }, function (props) { return props.theme.mediumFontSize; }); +var configs = Visualizations.reduce(function (cfg, viz) { + // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosable' does not exist on type 'Visu... Remove this comment to see the full error message + var id = viz.id, title = viz.title, icon = viz.icon, _a = viz.isClosable, isClosable = _a === void 0 ? true : _a; + cfg[id] = { + title: title, + type: 'component', + componentName: id, + icon: icon, + componentState: {}, + isClosable: isClosable, + }; + return cfg; +}, {}); +export var unMaximize = function (contentItem) { + if (contentItem.isMaximised) { + contentItem.toggleMaximise(); + return true; + } + else if (contentItem.contentItems.length === 0) { + return false; + } + else { + return Array.some(contentItem.contentItems, function (subContentItem) { + return unMaximize(subContentItem); + }); + } +}; +var VisualizationSelector = /** @class */ (function (_super) { + __extends(VisualizationSelector, _super); + function VisualizationSelector(props) { + var _this = _super.call(this, props) || this; + _this.dragSources = []; + _this.openlayers = React.createRef(); + _this.cesium = React.createRef(); + _this.inspector = React.createRef(); + _this.histogram = React.createRef(); + _this.table = React.createRef(); + _this.props.goldenLayout.on('stateChanged', function () { + _this.forceUpdate(); + }); + return _this; + } + VisualizationSelector.prototype.render = function () { + var _this = this; + ; + window._gl = this.props.goldenLayout; + return (React.createElement(CustomElement, { "data-id": "visualization-menu", onClick: this.handleChoice.bind(this) }, Object.values(configs).map(function (_a, index) { + var title = _a.title, icon = _a.icon, componentName = _a.componentName; + return (React.createElement(Visualization, { key: index.toString(), ref: function (x) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + _this[componentName] = x; + }, onMouseDown: _this.handleMouseDown.bind(_this, componentName), onMouseUp: _this.handleMouseUp.bind(_this, componentName), className: JSON.stringify(_this.props.goldenLayout.toConfig()).includes("\"componentName\":\"".concat(componentName, "\"")) + ? '' /** change to hidden to only allow one of each visual */ + : '' }, + React.createElement(VisualizationIcon, { className: icon }), + React.createElement(VisualizationText, null, title))); + }, this))); + }; + VisualizationSelector.prototype.componentDidMount = function () { + var _this = this; + this.dragSources = []; + this.dragSources = Object.keys(configs).map(function (key) { + return _this.props.goldenLayout.createDragSource(_this[key], configs[key]); + }); + this.listenToDragSources(); + }; + VisualizationSelector.prototype.listenToDragStart = function (dragSource) { + var _this = this; + dragSource._dragListener.on('dragStart', function () { + _this.interimState = false; + }); + }; + VisualizationSelector.prototype.listenToDragStop = function (dragSource) { + var _this = this; + dragSource._dragListener.on('dragStop', function () { + _this.listenToDragStart(dragSource); + _this.listenToDragStop(dragSource); + }); + }; + VisualizationSelector.prototype.listenToDragSources = function () { + var _this = this; + this.dragSources.forEach(function (dragSource) { + _this.listenToDragStart(dragSource); + _this.listenToDragStop(dragSource); + }); + }; + VisualizationSelector.prototype.handleChoice = function () { + this.props.onClose(); + }; + VisualizationSelector.prototype.handleMouseDown = function (_event, choice) { + unMaximize(this.props.goldenLayout.root); + this.interimState = true; + this.interimChoice = choice; + }; + VisualizationSelector.prototype.handleMouseUp = function (choice) { + if (this.interimState) { + var content = __assign({}, configs[choice]); + if (this.props.goldenLayout.root.contentItems.length === 0) { + this.props.goldenLayout.root.addChild({ + type: 'column', + content: [content], + }); + } + else { + if (this.props.goldenLayout.root.contentItems[0].isColumn) { + this.props.goldenLayout.root.contentItems[0].contentItems[0].addChild(content, 0); + } + else { + this.props.goldenLayout.root.contentItems[0].addChild(content, 0); + } + } + } + this.interimState = false; + }; + return VisualizationSelector; +}(React.Component)); +export default VisualizationSelector; +var templateObject_1, templateObject_2, templateObject_3, templateObject_4; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzdWFsaXphdGlvbi1zZWxlY3Rvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlY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ZGF0ZSgpXG4gICAgfSlcbiAgfVxuICByZW5kZXIoKSB7XG4gICAgOyh3aW5kb3cgYXMgYW55KS5fZ2wgPSB0aGlzLnByb3BzLmdvbGRlbkxheW91dFxuICAgIHJldHVybiAoXG4gICAgICA8Q3VzdG9tRWxlbWVudFxuICAgICAgICBkYXRhLWlkPVwidmlzdWFsaXphdGlvbi1tZW51XCJcbiAgICAgICAgb25DbGljaz17dGhpcy5oYW5kbGVDaG9pY2UuYmluZCh0aGlzKX1cbiAgICAgID5cbiAgICAgICAge09iamVjdC52YWx1ZXMoY29uZmlncykubWFwKFxuICAgICAgICAgICh7IHRpdGxlLCBpY29uLCBjb21wb25lbnROYW1lIH0sIGluZGV4KSA9PiAoXG4gICAgICAgICAgICA8VmlzdWFsaXphdGlvblxuICAgICAgICAgICAgICBrZXk9e2luZGV4LnRvU3RyaW5nKCl9XG4gICAgICAgICAgICAgIHJlZj17KHg6IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgdHMtbWlncmF0ZSg3MDUzKSBGSVhNRTogRWxlbWVudCBpbXBsaWNpdGx5IGhhcyBhbiAnYW55JyB0eXBlIGJlY2F1c2UgZXhwcmUuLi4gUmVtb3ZlIHRoaXMgY29tbWVudCB0byBzZWUgdGhlIGZ1bGwgZXJyb3IgbWVzc2FnZVxuICAgICAgICAgICAgICAgIHRoaXNbY29tcG9uZW50TmFtZV0gPSB4XG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgIG9uTW91c2VEb3duPXt0aGlzLmhhbmRsZU1vdXNlRG93bi5iaW5kKHRoaXMsIGNvbXBvbmVudE5hbWUpfVxuICAgICAgICAgICAgICBvbk1vdXNlVXA9e3RoaXMuaGFuZGxlTW91c2VVcC5iaW5kKHRoaXMsIGNvbXBvbmVudE5hbWUpfVxuICAgICAgICAgICAgICBjbGFzc05hbWU9e1xuICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KHRoaXMucHJ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W91dC5yb290LmFkZENoaWxkKHtcbiAgICAgICAgICB0eXBlOiAnY29sdW1uJyxcbiAgICAgICAgICBjb250ZW50OiBbY29udGVudF0sXG4gICAgICAgIH0pXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5nb2xkZW5MYXlvdXQucm9vdC5jb250ZW50SXRlbXNbMF0uaXNDb2x1bW4pIHtcbiAgICAgICAgICB0aGlzLnByb3BzLmdvbGRlbkxheW91dC5yb290LmNvbnRlbnRJdGVtc1swXS5jb250ZW50SXRlbXNbMF0uYWRkQ2hpbGQoXG4gICAgICAgICAgICBjb250ZW50LFxuICAgICAgICAgICAgMFxuICAgICAgICAgIClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLnByb3BzLmdvbGRlbkxheW91dC5yb290LmNvbnRlbnRJdGVtc1swXS5hZGRDaGlsZChjb250ZW50LCAwKVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIHRoaXMuaW50ZXJpbVN0YXRlID0gZmFsc2VcbiAgfVxufVxuZXhwb3J0IGRlZmF1bHQgVmlzdWFsaXphdGlvblNlbGVjdG9yXG4iXX0= \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/additional-styles.css b/src/main/webapp/styles/additional-styles.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/additional-styles.css rename to src/main/webapp/styles/additional-styles.css diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/custom-preflight.css b/src/main/webapp/styles/custom-preflight.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/custom-preflight.css rename to src/main/webapp/styles/custom-preflight.css diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts.css b/src/main/webapp/styles/fonts.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts.css rename to src/main/webapp/styles/fonts.css diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.eot b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.eot similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.eot rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.eot diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.svg b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.svg rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.ttf b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.ttf similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.ttf rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.ttf diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff2 b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff2 similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff2 rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-700.woff2 diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.eot b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.eot similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.eot rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.eot diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.svg b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.svg rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.ttf b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.ttf similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.ttf rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.ttf diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff2 b/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff2 similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff2 rename to src/main/webapp/styles/fonts/inconsolata/inconsolata-v16-latin-regular.woff2 diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.eot b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.eot similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.eot rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.eot diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.svg b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.svg rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.ttf b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.ttf similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.ttf rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.ttf diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff2 b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff2 similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff2 rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-300.woff2 diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.eot b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.eot similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.eot rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.eot diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.svg b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.svg rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.ttf b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.ttf similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.ttf rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.ttf diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff2 b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff2 similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff2 rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-600.woff2 diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.eot b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.eot similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.eot rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.eot diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.svg b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.svg rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.ttf b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.ttf similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.ttf rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.ttf diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff2 b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff2 similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff2 rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-700.woff2 diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.eot b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.eot similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.eot rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.eot diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.svg b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.svg similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.svg rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.svg diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.ttf b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.ttf similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.ttf rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.ttf diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff2 b/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff2 similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff2 rename to src/main/webapp/styles/fonts/open-sans/open-sans-v15-latin-regular.woff2 diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/input-range.css b/src/main/webapp/styles/input-range.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/input-range.css rename to src/main/webapp/styles/input-range.css diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/plotly.css b/src/main/webapp/styles/plotly.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/plotly.css rename to src/main/webapp/styles/plotly.css diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/tailwind.css b/src/main/webapp/styles/tailwind.css similarity index 100% rename from ui-frontend/packages/catalog-ui-search/src/main/webapp/styles/tailwind.css rename to src/main/webapp/styles/tailwind.css diff --git a/src/main/webapp/test/mock-api/config.d.ts b/src/main/webapp/test/mock-api/config.d.ts new file mode 100644 index 00000000000..031556bb845 --- /dev/null +++ b/src/main/webapp/test/mock-api/config.d.ts @@ -0,0 +1,78 @@ +declare const _default: { + mapHome: string; + resultCount: number; + showLogo: boolean; + relevancePrecision: number; + attributeDescriptions: {}; + basicSearchTemporalSelectionDefault: string[]; + branding: string; + basicSearchMatchType: string; + onlineGazetteer: boolean; + imageryProviders: { + type: string; + url: string; + parameters: { + imageSize: number[]; + }; + alpha: number; + name: string; + show: boolean; + proxyEnabled: boolean; + order: number; + }[]; + isCacheDisabled: boolean; + isVersioningEnabled: boolean; + summaryShow: string[]; + readOnly: string[]; + version: string; + i18n: { + 'sources.unavailable': string; + 'sources.polling.error.title': string; + 'search.sources.selected.none.message': string; + 'sources.available': string; + 'sources.title': string; + 'sources.polling.error.message': string; + 'sources.options.all': string; + 'form.title': string; + }; + isExperimental: boolean; + resultPageSize: number; + sourcePollInterval: number; + requiredAttributes: never[]; + scheduleFrequencyList: number[]; + facetWhitelist: never[]; + terrainProvider: { + type: string; + url: string; + }; + hiddenAttributes: string[]; + timeout: number; + attributeAliases: {}; + commonAttributes: never[]; + enums: {}; + extra: {}; + editorAttributes: never[]; + resultShow: never[]; + disableUnknownErrorBox: boolean; + theme: string; + projection: string; + defaultLayout: { + type: string; + content: { + type: string; + component: string; + componentName: string; + title: string; + }[]; + }[]; + webSocketsEnabled: boolean; + showRelevanceScores: boolean; + product: string; + typeNameMapping: {}; + gazetteer: boolean; + exportResultLimit: number; + bingKey: string; + useHyphensInUuid: boolean; + disableLocalCatalog: boolean; +}; +export default _default; diff --git a/src/main/webapp/test/mock-api/config.js b/src/main/webapp/test/mock-api/config.js new file mode 100644 index 00000000000..c16dd3ac32a --- /dev/null +++ b/src/main/webapp/test/mock-api/config.js @@ -0,0 +1,113 @@ +export default { + mapHome: '', + resultCount: 250, + showLogo: false, + relevancePrecision: 5, + attributeDescriptions: {}, + basicSearchTemporalSelectionDefault: [ + 'created', + 'effective', + 'modified', + 'metacard.created', + 'metacard.modified', + ], + branding: 'DDF', + basicSearchMatchType: 'datatype', + onlineGazetteer: true, + imageryProviders: [ + { + type: 'SI', + url: './images/natural_earth_50m.png', + parameters: { + imageSize: [10800, 5400], + }, + alpha: 1, + name: 'Default Layer', + show: true, + proxyEnabled: true, + order: 0, + }, + ], + isCacheDisabled: false, + isVersioningEnabled: true, + summaryShow: ['created', 'modified', 'thumbnail'], + readOnly: [ + '^checksum$', + '^checksum-algorithm$', + '^id$', + '^resource-download-url$', + '^resource-uri$', + '^resource.derived-uri$', + '^resource.derived-download-url$', + '^modified$', + '^metacard-tags$', + '^metacard-type$', + '^metadata$', + '^source-id$', + '^point-of-contact$', + '^metacard.', + '^version.', + '^validation.', + ], + version: '2.14.0-SNAPSHOT', + i18n: { + 'sources.unavailable': '{amountDown} {amountDown, plural, one {source is} other {sources are}} currently down', + 'sources.polling.error.title': 'Error Polling Sources', + 'search.sources.selected.none.message': 'No sources are currently selected. Edit the search and select at least one source.', + 'sources.available': 'All sources are currently up', + 'sources.title': 'Sources', + 'sources.polling.error.message': 'Unable to query server for list of active sources', + 'sources.options.all': 'All Sources', + 'form.title': 'title', + }, + isExperimental: false, + resultPageSize: 25, + sourcePollInterval: 60000, + requiredAttributes: [], + scheduleFrequencyList: [1800, 3600, 7200, 14400, 28800, 57600, 86400], + facetWhitelist: [], + terrainProvider: { + type: 'CT', + url: './proxy/catalog0', + }, + hiddenAttributes: ['^sorts$', '^cql$', '^polling$', '^cached$'], + timeout: 300000, + attributeAliases: {}, + commonAttributes: [], + enums: {}, + extra: {}, + editorAttributes: [], + resultShow: [], + disableUnknownErrorBox: false, + theme: 'dark', + projection: 'EPSG:4326', + defaultLayout: [ + { + type: 'stack', + content: [ + { + type: 'component', + component: 'cesium', + componentName: 'cesium', + title: '3D Map', + }, + { + type: 'component', + component: 'inspector', + componentName: 'inspector', + title: 'Inspector', + }, + ], + }, + ], + webSocketsEnabled: false, + showRelevanceScores: false, + product: 'Intrigue', + typeNameMapping: {}, + gazetteer: true, + exportResultLimit: 1000, + bingKey: '', + useHyphensInUuid: false, + disableLocalCatalog: false, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3Rlc3QvbW9jay1hcGkvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQWU7SUFDYixPQUFPLEVBQUUsRUFBRTtJQUNYLFdBQVcsRUFBRSxHQUFHO0lBQ2hCLFFBQVEsRUFBRSxLQUFLO0lBQ2Ysa0JBQWtCLEVBQUUsQ0FBQztJQUNyQixxQkFBcUIsRUFBRSxFQUFFO0lBQ3pCLG1DQUFtQyxFQUFFO1FBQ25DLFNBQVM7UUFDVCxXQUFXO1FBQ1gsVUFBVTtRQUNWLGtCQUFrQjtRQUNsQixtQkFBbUI7S0FDcEI7SUFDRCxRQUFRLEVBQUUsS0FBSztJQUNmLG9CQUFvQixFQUFFLFVBQVU7SUFDaEMsZUFBZSxFQUFFLElBQUk7SUFDckI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kF0dHJpYnV0ZXM6IFtdLFxuICBlbnVtczoge30sXG4gIGV4dHJhOiB7fSxcbiAgZWRpdG9yQXR0cmlidXRlczogW10sXG4gIHJlc3VsdFNob3c6IFtdLFxuICBkaXNhYmxlVW5rbm93bkVycm9yQm94OiBmYWxzZSxcbiAgdGhlbWU6ICdkYXJrJyxcbiAgcHJvamVjdGlvbjogJ0VQU0c6NDMyNicsXG4gIGRlZmF1bHRMYXlvdXQ6IFtcbiAgICB7XG4gICAgICB0eXBlOiAnc3RhY2snLFxuICAgICAgY29udGVudDogW1xuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogJ2NvbXBvbmVudCcsXG4gICAgICAgICAgY29tcG9uZW50OiAnY2VzaXVtJyxcbiAgICAgICAgICBjb21wb25lbnROYW1lOiAnY2VzaXVtJyxcbiAgICAgICAgICB0aXRsZTogJzNEIE1hcCcsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnY29tcG9uZW50JyxcbiAgICAgICAgICBjb21wb25lbnQ6ICdpbnNwZWN0b3InLFxuICAgICAgICAgIGNvbXBvbmVudE5hbWU6ICdpbnNwZWN0b3InLFxuICAgICAgICAgIHRpdGxlOiAnSW5zcGVjdG9yJyxcbiAgICAgICAgfSxcbiAgICAgIF0sXG4gICAgfSxcbiAgXSxcbiAgd2ViU29ja2V0c0VuYWJsZWQ6IGZhbHNlLFxuICBzaG93UmVsZXZhbmNlU2NvcmVzOiBmYWxzZSxcbiAgcHJvZHVjdDogJ0ludHJpZ3VlJyxcbiAgdHlwZU5hbWVNYXBwaW5nOiB7fSxcbiAgZ2F6ZXR0ZWVyOiB0cnVlLFxuICBleHBvcnRSZXN1bHRMaW1pdDogMTAwMCxcbiAgYmluZ0tleTogJycsXG4gIHVzZUh5cGhlbnNJblV1aWQ6IGZhbHNlLFxuICBkaXNhYmxlTG9jYWxDYXRhbG9nOiBmYWxzZSxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/datatype.d.ts b/src/main/webapp/test/mock-api/datatype.d.ts new file mode 100644 index 00000000000..701d827075f --- /dev/null +++ b/src/main/webapp/test/mock-api/datatype.d.ts @@ -0,0 +1,4 @@ +declare const _default: { + datatype: string[]; +}; +export default _default; diff --git a/src/main/webapp/test/mock-api/datatype.js b/src/main/webapp/test/mock-api/datatype.js new file mode 100644 index 00000000000..f1da50b4067 --- /dev/null +++ b/src/main/webapp/test/mock-api/datatype.js @@ -0,0 +1,17 @@ +export default { + datatype: [ + 'Interactive Resource', + 'Moving Image', + 'Still Image', + 'Dataset', + 'Collection', + 'Event', + 'Service', + 'Software', + 'Sound', + 'Text', + 'Image', + 'Physical Object', + ], +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YXR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvdGVzdC9tb2NrLWFwaS9kYXRhdHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFlO0lBQ2IsUUFBUSxFQUFFO1FBQ1Isc0JBQXNCO1FBQ3RCLGNBQWM7UUFDZCxhQUFhO1FBQ2IsU0FBUztRQUNULFlBQVk7UUFDWixPQUFPO1FBQ1AsU0FBUztRQUNULFVBQVU7UUFDVixPQUFPO1FBQ1AsTUFBTTtRQUNOLE9BQU87UUFDUCxpQkFBaUI7S0FDbEI7Q0FDRixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQge1xuICBkYXRhdHlwZTogW1xuICAgICdJbnRlcmFjdGl2ZSBSZXNvdXJjZScsXG4gICAgJ01vdmluZyBJbWFnZScsXG4gICAgJ1N0aWxsIEltYWdlJyxcbiAgICAnRGF0YXNldCcsXG4gICAgJ0NvbGxlY3Rpb24nLFxuICAgICdFdmVudCcsXG4gICAgJ1NlcnZpY2UnLFxuICAgICdTb2Z0d2FyZScsXG4gICAgJ1NvdW5kJyxcbiAgICAnVGV4dCcsXG4gICAgJ0ltYWdlJyxcbiAgICAnUGh5c2ljYWwgT2JqZWN0JyxcbiAgXSxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/enumerations.d.ts b/src/main/webapp/test/mock-api/enumerations.d.ts new file mode 100644 index 00000000000..471e8f90fb3 --- /dev/null +++ b/src/main/webapp/test/mock-api/enumerations.d.ts @@ -0,0 +1,5 @@ +declare const _default: { + 'location.country-code': string[]; + datatype: string[]; +}; +export default _default; diff --git a/src/main/webapp/test/mock-api/enumerations.js b/src/main/webapp/test/mock-api/enumerations.js new file mode 100644 index 00000000000..bb2786fa4df --- /dev/null +++ b/src/main/webapp/test/mock-api/enumerations.js @@ -0,0 +1,276 @@ +export default { + 'location.country-code': [ + 'NZL', + 'FJI', + 'PNG', + 'GLP', + 'ZAR', + 'STP', + 'WLF', + 'MHL', + 'CUB', + 'SDN', + 'GMB', + 'CUW', + 'MYS', + 'MYT', + 'TWN', + 'POL', + 'OMN', + 'SUR', + 'ARE', + 'KEN', + 'ARG', + 'GNB', + 'UZB', + 'ARM', + 'TGO', + 'SEN', + 'BTN', + 'IRL', + 'IRN', + 'FLK', + 'QAT', + 'BDI', + 'NLD', + 'IRQ', + 'SVK', + 'SVN', + 'GNQ', + 'THA', + 'ABW', + 'ASM', + 'BUR', + 'SWE', + 'ISL', + 'MKD', + 'BEL', + 'ISR', + 'LIE', + 'KWT', + 'BEN', + 'DZA', + 'ATA', + 'BES', + 'RUS', + 'ATF', + 'ATG', + 'ITA', + 'SWZ', + 'TZA', + 'PAK', + 'CXR', + 'BFA', + 'PAN', + 'SGP', + 'UKR', + 'SGS', + 'KGZ', + 'JEY', + 'CHE', + 'BVT', + 'DJI', + 'REU', + 'PRI', + 'CHL', + 'CHN', + 'PRK', + 'SXM', + 'MLI', + 'BWA', + 'HRV', + 'KHM', + 'IDN', + 'PRT', + 'TJK', + 'MLT', + 'VNM', + 'PRY', + 'CYM', + 'SHN', + 'CYP', + 'SYC', + 'RWA', + 'BGD', + 'AUS', + 'AUT', + 'PSE', + 'LKA', + 'GAB', + 'ZWE', + 'YUG', + 'BGR', + 'SYR', + 'CZE', + 'UMI', + 'NOR', + 'CIV', + 'MMR', + 'TKL', + 'KIR', + 'TKM', + 'GRD', + 'GRC', + 'PCN', + 'HTI', + 'YEM', + 'GRL', + 'AFG', + 'MNE', + 'MNG', + 'NPL', + 'BHS', + 'BHR', + 'MNP', + 'GBR', + 'SJM', + 'DMA', + 'TLS', + 'HUN', + 'BIH', + 'AGO', + 'WSM', + 'FRA', + 'TMP', + 'MOZ', + 'NAM', + 'PER', + 'DNK', + 'GTM', + 'FRO', + 'SLB', + 'VAT', + 'SLE', + 'NRU', + 'GUF', + 'AIA', + 'SLV', + 'GUM', + 'FSM', + 'DOM', + 'CMR', + 'GUY', + 'AZE', + 'MAC', + 'GEO', + 'TON', + 'MAF', + 'NCL', + 'SMR', + 'ERI', + 'KNA', + 'MAR', + 'BLM', + 'VCT', + 'BLR', + 'MRT', + 'BLZ', + 'NTZ', + 'PHL', + 'COD', + 'COG', + 'ESH', + 'PYF', + 'URY', + 'COK', + 'COM', + 'COL', + 'USA', + 'ESP', + 'EST', + 'BMU', + 'MSR', + 'ZMB', + 'KOR', + 'SOM', + 'VUT', + 'ALA', + 'ECU', + 'ALB', + 'ETH', + 'MCO', + 'GGY', + 'NER', + 'LAO', + 'VEN', + 'GHA', + 'CPV', + 'MTQ', + 'MDA', + 'MDG', + 'SPM', + 'NFK', + 'LBN', + 'LBR', + 'MDV', + 'BOL', + 'GIB', + 'LBY', + 'HKG', + 'NGA', + 'CAF', + 'LSO', + 'MUS', + 'IMN', + 'LCA', + 'JOR', + 'GIN', + 'VGB', + 'CAN', + 'TCA', + 'TCD', + 'AND', + 'ROU', + 'CRI', + 'IND', + 'MEX', + 'SRB', + 'XKX', + 'KAZ', + 'SAU', + 'ANT', + 'JPN', + 'LTU', + 'TTO', + 'PLW', + 'MWI', + 'HMD', + 'SSD', + 'NIC', + 'FIN', + 'CCK', + 'TUN', + 'UGA', + 'LUX', + 'IOT', + 'TUR', + 'BRA', + 'BRB', + 'TUV', + 'DEU', + 'EGY', + 'LVA', + 'SCG', + 'JAM', + 'NIU', + 'VIR', + 'ZAF', + 'BRN', + 'HND', + ], + datatype: [ + 'Interactive Resource', + 'Moving Image', + 'Still Image', + 'Dataset', + 'Collection', + 'Event', + 'Service', + 'Software', + 'Sound', + 'Text', + 'Image', + 'Physical Object', + ], +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bWVyYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3Rlc3QvbW9jay1hcGkvZW51bWVyYXRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQWU7SUFDYix1QkFBdUIsRUFBRTtRQUN2QixLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7UUFDTCxLQUFLO1FBQ0wsS0FBSztRQUNMLEtBQUs7U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QUNULFVBQVU7UUFDVixPQUFPO1FBQ1AsTUFBTTtRQUNOLE9BQU87UUFDUCxpQkFBaUI7S0FDbEI7Q0FDRixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQge1xuICAnbG9jYXRpb24uY291bnRyeS1jb2RlJzogW1xuICAgICdOWkwnLFxuICAgICdGSkknLFxuICAgICdQTkcnLFxuICAgICdHTFAnLFxuICAgICdaQVInLFxuICAgICdTVFAnLFxuICAgICdXTEYnLFxuICAgICdNSEwnLFxuICAgICdDVUInLFxuICAgICdTRE4nLFxuICAgICdHTUInLFxuICAgICdDVVcnLFxuICAgICdNWVMnLFxuICAgICdNWVQnLFxuICAgICdUV04nLFxuICAgICdQT0wnLFxuICAgICdPTU4nLFxuICAgICdTVVInLFxuICAgICdBUkUnLFxuICAgICdLRU4nLFxuICAgICdBUkcnLFxuICAgICdHTkInLFxuICAgICdVWkInLFxuICAgICdBUk0nLFxuICAgICdUR08nLFxuICAgICdTRU4nLFxuICAgICdCVE4nLFxuICAgICdJUkwnLFxuICAgICdJUk4nLFxuICAgICdGTEsnLFxuICAgICdRQVQnLFxuICAgICdCREknLFxuICAgICdOTEQnLFxuICAgICdJUlEnLFxuICAgICdTVksnLFxuICAgICdTVk4nLFxuICAgICdHTlEnLFxuICAgICdUSEEnLFxuICAgICdBQlcnLFxuICAgICdBU00nLFxuICAgICdCVVInLFxuICAgICdTV0UnLFxuICAgICdJU0wnLFxuICAgICdNS0QnLFxuICAgICdCRUwnLFxuICAgICdJU1InLFxuICAgICdMSUUnLFxuICAgICdLV1QnLFxuICAgICdCRU4nLFxuICAgICdEWkEnLFxuICAgICdBVEEnLFxuICAgICdCRVMnLFxuICAgICdSVVMnLFxuICAgICdBVEYnLFxuICAgICdBVEcnLFxuICAgICdJVEEnLFxuICAgICdTV1onLFxuICAgICdUWkEnLFxuICAgICdQQUsnLFxuICAgICdDWFInLFxuICAgICdCRkEnLFxuICAgICdQQU4nLFxuICAgICdTR1AnLFxuICAgICdVS1InLFxuICAgICdTR1MnLFxuICAgICdLR1onLFxuICAgICdKRVknLFxuICAgICdDSEUnLFxuICAgICdCVlQnLFxuICAgICdESkknLFxuICAgICdSRVUnLFxuICAgICdQUkknLFxuICAgICdDSEwnLFxuICAgICdDSE4nLFxuICAgICdQUksnLFxuICAgICdTWE0nLFxuICAgICdNTEknLFxuICAgICdCV0EnLFxuICAgICdIUlYnLFxuICAgICdLSE0nLFxuICAgICdJRE4nLFxuICAgICdQUlQnLFxuICAgICdUSksnLFxuICAgICdNTFQnLFxuICAgICdWTk0nLFxuICAgICdQUlknLFxuICAgICdDWU0nLFxuICAgICdTSE4nLFxuICAgICdDWVAnLFxuICAgICdTWUMnLFxuICAgICdSV0EnLFxuICAgICdCR0QnLFxuICAgICdBVVMnLFxuICAgICdBVVQnLFxuICAgICdQU0UnLFxuICAgICdMS0EnLFxuICAgICdHQUInLFxuICAgICdaV0UnLFxuICAgICdZVUcnLFxuICAgICdCR1InLFxuICAgICdTWVInLFxuICAgICdDWkUnLFxuICAgICdVTUknLFxuICAgICdOT1InLFxuICAgICdDSVYnLFxuICAgICdNTVInLFxuICAgICdUS0wnLFxuICAgICdLSVInLFxuICAgICdUS00nLFxuICAgICdHUkQnLFxuICAgICdHUkMnLFxuICAgICdQQ04nLFxuICAgICdIVEknLFxuICAgICdZRU0nLFxuICAgICdHUkwnLFxuICAgICdBRkcnLFxuICAgICdNTkUnLFxuICAgICdNTkcnLFxuICAgICdOUEwnLFxuICAgICdCSFMnLFxuICAgICdCSFInLFxuICAgICdNTlAnLFxuICAgICdHQlInLFxuICAgICdTSk0nLFxuICAgICdETUEnLFxuICAgICdUTFMnLFxuICAgICdIVU4nLFxuICAgICdCSUgnLFxuICAgICdBR08nLFxuICAgICdXU00nLFxuICAgICdGUkEnLFxuICAgICdUTVAnLFxuICAgICdNT1onLFxuICAgICdOQU0nLFxuICAgICdQRVInLFxuICAgICdETksnLFxuICAgICdHVE0nLFxuICAgICdGUk8nLFxuICAgICdTTEInLFxuICAgICdWQVQnLFxuICAgICdTTEUnLFxuICAgICdOUlUnLFxuICAgICdHVUYnLFxuICAgICdBSUEnLFxuICAgICdTTFYnLFxuICAgICdHVU0nLFxuICAgICdGU00nLFxuICAgICdET00nLFxuICAgICdDTVInLFxuICAgICdHVVknLFxuICAgICdBWkUnLFxuICAgICdNQUMnLFxuICAgICdHRU8nLFxuICAgICdUT04nLFxuICAgICdNQUYnLFxuICAgICdOQ0wnLFxuICAgICdTTVInLFxuICAgICdFUkknLFxuICAgICdLTkEnLFxuICAgICdNQVInLFxuICAgICdCTE0nLFxuICAgICdWQ1QnLFxuICAgICdCTFInLFxuICAgICdNUlQnLFxuICAgICdCTFonLFxuICAgICdOVFonLFxuICAgICdQSEwnLFxuICAgICdDT0QnLFxuICAgICdDT0cnLFxuICAgICdFU0gnLFxuICAgICdQWUYnLFxuICAgICdVUlknLFxuICAgICdDT0snLFxuICAgICdDT00nLFxuICAgICdDT0wnLFxuICAgICdVU0EnLFxuICAgICdFU1AnLFxuICAgICdFU1QnLFxuICAgICdCTVUnLFxuICAgICdNU1InLFxuICAgICdaTUInLFxuICAgICdLT1InLFxuICAgICdTT00nLFxuICAgICdWVVQnLFxuICAgICdBTEEnLFxuICAgICdFQ1UnLFxuICAgICdBTEInLFxuICAgICdFVEgnLFxuICAgICdNQ08nLFxuICAgICdHR1knLFxuICAgICdORVInLFxuICAgICdMQU8nLFxuICAgICdWRU4nLFxuICAgICdHSEEnLFxuICAgICdDUFYnLFxuICAgICdNVFEnLFxuICAgICdNREEnLFxuICAgICdNREcnLFxuICAgICdTUE0nLFxuICAgICdORksnLFxuICAgICdMQk4nLFxuICAgICdMQlInLFxuICAgICdNRFYnLFxuICAgICdCT0wnLFxuICAgICdHSUInLFxuICAgICdMQlknLFxuICAgICdIS0cnLFxuICAgICdOR0EnLFxuICAgICdDQUYnLFxuICAgICdMU08nLFxuICAgICdNVVMnLFxuICAgICdJTU4nLFxuICAgICdMQ0EnLFxuICAgICdKT1InLFxuICAgICdHSU4nLFxuICAgICdWR0InLFxuICAgICdDQU4nLFxuICAgICdUQ0EnLFxuICAgICdUQ0QnLFxuICAgICdBTkQnLFxuICAgICdST1UnLFxuICAgICdDUkknLFxuICAgICdJTkQnLFxuICAgICdNRVgnLFxuICAgICdTUkInLFxuICAgICdYS1gnLFxuICAgICdLQVonLFxuICAgICdTQVUnLFxuICAgICdBTlQnLFxuICAgICdKUE4nLFxuICAgICdMVFUnLFxuICAgICdUVE8nLFxuICAgICdQTFcnLFxuICAgICdNV0knLFxuICAgICdITUQnLFxuICAgICdTU0QnLFxuICAgICdOSUMnLFxuICAgICdGSU4nLFxuICAgICdDQ0snLFxuICAgICdUVU4nLFxuICAgICdVR0EnLFxuICAgICdMVVgnLFxuICAgICdJT1QnLFxuICAgICdUVVInLFxuICAgICdCUkEnLFxuICAgICdCUkInLFxuICAgICdUVVYnLFxuICAgICdERVUnLFxuICAgICdFR1knLFxuICAgICdMVkEnLFxuICAgICdTQ0cnLFxuICAgICdKQU0nLFxuICAgICdOSVUnLFxuICAgICdWSVInLFxuICAgICdaQUYnLFxuICAgICdCUk4nLFxuICAgICdITkQnLFxuICBdLFxuICBkYXRhdHlwZTogW1xuICAgICdJbnRlcmFjdGl2ZSBSZXNvdXJjZScsXG4gICAgJ01vdmluZyBJbWFnZScsXG4gICAgJ1N0aWxsIEltYWdlJyxcbiAgICAnRGF0YXNldCcsXG4gICAgJ0NvbGxlY3Rpb24nLFxuICAgICdFdmVudCcsXG4gICAgJ1NlcnZpY2UnLFxuICAgICdTb2Z0d2FyZScsXG4gICAgJ1NvdW5kJyxcbiAgICAnVGV4dCcsXG4gICAgJ0ltYWdlJyxcbiAgICAnUGh5c2ljYWwgT2JqZWN0JyxcbiAgXSxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/index.d.ts b/src/main/webapp/test/mock-api/index.d.ts new file mode 100644 index 00000000000..d36f3eb35b2 --- /dev/null +++ b/src/main/webapp/test/mock-api/index.d.ts @@ -0,0 +1,2 @@ +declare const _default: (url: any) => any; +export default _default; diff --git a/src/main/webapp/test/mock-api/index.js b/src/main/webapp/test/mock-api/index.js new file mode 100644 index 00000000000..c7ac042d3ba --- /dev/null +++ b/src/main/webapp/test/mock-api/index.js @@ -0,0 +1,341 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import User from '../../js/model/User'; +import MetacardTypeJSON from './metacardtype'; +import Config from './config'; +import PlatformConfig from './metacardtype'; +import DatatypeJSON from './datatype'; +import Sources from './sources'; +import Enumerations from './enumerations'; +var mockStartupPayload = { + harvestedSources: [], + attributeMap: { + id: { id: 'id', isInjected: false, multivalued: false, type: 'STRING' }, + name: { id: 'name', isInjected: false, multivalued: false, type: 'STRING' }, + age: { id: 'age', isInjected: false, multivalued: false, type: 'FLOAT' }, + }, + config: { + extra: {}, + attributeDescriptions: [], + basicSearchTemporalSelectionDefault: ['created'], + mapHome: 'home', + resultCount: 10, + showLogo: true, + relevancePrecision: 0.85, + branding: 'My Company', + basicSearchMatchType: 'exact', + onlineGazetteer: true, + imageryProviders: [ + { + type: 'wms', + url: 'https://wms.example.com', + parameters: { + imageSize: [1024, 1024], + }, + alpha: 0.7, + name: 'Example WMS', + show: true, + proxyEnabled: true, + order: 1, + }, + // Add more imagery providers as needed + ], + isCacheDisabled: false, + isCustomTextNotationEnabled: true, + isVersioningEnabled: true, + isSpellcheckEnabled: true, + attributeSuggestionList: [], + requiredExportAttributes: [], + exportMetacardFormatOptions: [], + exportMetacardsFormatOptions: [], + summaryShow: ['name', 'age'], + readOnly: [], + version: '1.2.3', + commonAttributes: ['id', 'name', 'age'], + i18n: { + greeting: 'Hello!', + welcomeMessage: 'Welcome to our app!', + // Add more localized strings as needed + }, + customTextNotationAttribute: 'note', + isExperimental: false, + sourcePollInterval: 30000, + requiredAttributes: ['name'], + scheduleFrequencyList: [1, 5, 10, 30], + defaultSources: ['source-1', 'source-2'], + terrainProvider: { + type: 'cesium', + url: 'https://terrain.example.com', + }, + topLeftLogoSrc: 'logo-top-left.png', + hiddenAttributes: ['age'], + timeout: 120000, + attributeAliases: { + givenName: 'first_name', + familyName: 'last_name', + }, + iconConfig: { + user: { + code: '1234', + size: 'large', + className: 'user-icon', + font: 'FontAwesome', + }, + // Add more icon configurations as needed + }, + enums: { + status: ['Active', 'Inactive', 'Pending'], + // Add more enumerated values as needed + }, + editorAttributes: ['id', 'name', 'age'], + resultShow: ['name', 'age'], + disableUnknownErrorBox: false, + isFuzzyResultsEnabled: true, + theme: 'dark', + projection: 'EPSG:4326', + defaultLayout: [], + webSocketsEnabled: true, + showRelevanceScores: true, + menuIconSrc: 'menu-icon.png', + product: 'My Awesome App', + typeNameMapping: { + person: 'PersonType', + place: 'PlaceType', + }, + visualizations: [], + landingPageBackgroundSrc: 'landing-page-bg.png', + bottomLeftBackgroundSrc: 'bottom-left-bg.png', + gazetteer: true, + isPhoneticsEnabled: true, + helpUrl: 'https://help.example.com', + customBranding: '#ff00ff', + defaultTableColumns: ['id', 'name'], + exportResultLimit: 1000, + bingKey: 'BING_API_KEY', + bottomLeftLogoSrc: 'logo-bottom-left.png', + useHyphensInUuid: true, + disableLocalCatalog: false, + }, + localSourceId: 'local-source-1', + metacardTypes: { + 'metacard-type-1': { + id: { id: 'id', isInjected: false, multivalued: false, type: 'STRING' }, + name: { + id: 'name', + isInjected: false, + multivalued: false, + type: 'STRING', + }, + age: { id: 'age', isInjected: false, multivalued: false, type: 'FLOAT' }, + }, + // Add more metacard types as needed + }, + platformUiConfiguration: { + productImage: 'product.png', + vendorImage: 'vendor.png', + favIcon: 'favicon.ico', + header: 'My Awesome App', + color: '#4287f5', + footer: '© 2023 My Company. All rights reserved.', + background: '#f0f0f0', + title: 'My Startup', + version: '1.0.0', + timeout: 60000, + }, + sortedAttributes: [ + { id: 'id', isInjected: false, multivalued: false, type: 'STRING' }, + { id: 'name', isInjected: false, multivalued: false, type: 'STRING' }, + { id: 'age', isInjected: false, multivalued: false, type: 'FLOAT' }, + ], + sources: [ + { + sourceActions: [], + available: true, + id: 'source-1', + contentTypes: [{ name: 'Type A', version: '1.0' }], + version: '1.0.0', + local: true, + }, + { + sourceActions: [], + available: true, + id: 'source-2', + contentTypes: [{ name: 'Type B', version: '2.0' }], + version: '2.0.0', + local: false, + }, + // Add more sources as needed + ], + user: { + email: 'user@example.com', + isGuest: false, + preferences: { + id: 'user-123', + resultDisplay: 'table', + resultPreview: ['id', 'name'], + 'inspector-hideEmpty': true, + 'inspector-summaryShown': ['name', 'age'], + 'inspector-summaryOrder': ['name', 'age'], + 'inspector-detailsOrder': ['name', 'age'], + 'inspector-detailsHidden': ['id'], + 'results-attributesShownTable': ['id', 'name'], + 'results-attributesShownList': ['id', 'name', 'age'], + homeFilter: '', + homeSort: 'name', + homeDisplay: 'table', + decimalPrecision: 2, + alertPersistence: true, + alertExpiration: 86400000, + visualization: 'map', + columnHide: [], + columnOrder: ['id', 'name', 'age'], + columnWidths: [], + hasSelectedColumns: true, + oauth: [], + fontSize: 14, + dateTimeFormat: { + datetimefmt: 'YYYY-MM-DD HH:mm:ss', + timefmt: 'HH:mm:ss', + }, + timeZone: 'UTC', + coordinateFormat: 'degrees', + autoPan: true, + goldenLayout: { + settings: { + hasHeaders: true, + constrainDragToContainer: true, + reorderEnabled: true, + selectionEnabled: true, + popoutWholeStack: false, + blockedPopoutsThrowError: false, + closePopoutsOnUnload: true, + showPopoutIcon: true, + showMaximiseIcon: true, + showCloseIcon: true, + responsiveMode: 'always-on', + }, + dimensions: { + borderWidth: 5, + minItemHeight: 250, + minItemWidth: 300, + headerHeight: 20, + dragProxyWidth: 300, + dragProxyHeight: 200, + }, + labels: { + close: 'Close', + maximise: 'Maximize', + minimise: 'Minimize', + popout: 'Pop Out', + popin: 'Pop In', + tabDropdown: 'Additional Tabs', + }, + content: [], + isClosable: true, + reorderEnabled: true, + title: 'My Layout', + openPopouts: [], + }, + animation: true, + hoverPreview: true, + layoutId: 'layout-1', + mapLayers: [ + { + type: 'wms', + url: 'https://wms.example.com', + parameters: { + imageSize: [1024, 1024], + }, + alpha: 0.7, + name: 'Example WMS', + show: true, + proxyEnabled: true, + order: 1, + label: 'WMS Layer', + id: 'wms-1', + }, + // Add more map layers as needed + ], + alerts: [], + uploads: [ + { + unseen: false, + percentage: 0, + errors: 0, + successes: 0, + complete: 0, + amount: 0, + issues: 0, + sending: false, + finished: false, + interrupted: false, + sentAt: 0, + id: 'upload-1', + uploads: [], + }, + ], + theme: { + palette: 'light', + theme: 'default', + }, + querySettings: { + type: 'basic', + sources: ['source-1'], + sorts: [ + { attribute: 'name', direction: 'asc' }, + { attribute: 'age', direction: 'desc' }, + ], + spellcheck: true, + phonetics: false, + additionalOptions: '{}', + }, + }, + roles: ['user', 'admin'], + userid: 'user123', + username: 'user123', + }, +}; +var mockDataMap = { + './internal/metacardtype': MetacardTypeJSON, + './internal/config': Config, + './internal/platform/config/ui': PlatformConfig, + './internal/enumerations/attribute/datatype': DatatypeJSON, + './internal/user': User.Model.prototype.defaults(), + './internal/localcatalogid': 'ddf.distribution', + './internal/forms/result': [], + './internal/catalog/sources': Sources, + './internal/compose/startup': mockStartupPayload, +}; +var mockDataGlobs = { + './internal/enumerations': Enumerations, +}; +// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'url' implicitly has an 'any' type. +export default (function (url) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + var data = mockDataMap[url]; + if (data === undefined) { + Object.keys(mockDataGlobs).forEach(function (glob) { + if (url.startsWith(glob)) { + // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + data = mockDataGlobs[glob]; + } + }); + } + if (data === undefined) { + throw new Error("Unknown url '".concat(url, "' for mock api.")); + } + return data; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvdGVzdC9tb2NrLWFwaS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztJQWFJO0FBQ0osT0FBTyxJQUFJLE1BQU0scUJBQXFCLENBQUE7QUFDdEMsT0FBTyxnQkFBZ0IsTUFBTSxnQkFBZ0IsQ0FBQTtBQUM3QyxPQUFPLE1BQU0sTUFBTSxVQUFVLENBQUE7QUFDN0IsT0FBTyxjQUFjLE1BQU0sZ0JBQWdCLENBQUE7QUFDM0MsT0FBTyxZQUFZLE1BQU0sWUFBWSxDQUFBO0FBQ3JDLE9BQU8sT0FBTyxNQUFNLFdBQVcsQ0FBQTtBQUMvQixPQUFPLFlBQVksTUFBTSxnQkFBZ0IsQ0FBQTtBQUd6QyxJQUFNLGtCQUFrQixHQUF1QjtJQUM3QyxnQkFBZ0IsRUFBRSxFQUFFO0lBQ3BCLFlBQVksRUFBRTtRQUNaLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxJQUFJLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRSxRQUFRLEVBQUU7UUFDdkUsSUFBSSxFQUFFLEVBQUUsRUFBRSxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRTtRQUMzRSxHQUFHLEVBQUUsRUFBRSx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ICAgICAgICAgIHVybDogJ2h0dHBzOi8vd21zLmV4YW1wbGUuY29tJyxcbiAgICAgICAgICBwYXJhbWV0ZXJzOiB7XG4gICAgICAgICAgICBpbWFnZVNpemU6IFsxMDI0LCAxMDI0XSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIGFscGhhOiAwLjcsXG4gICAgICAgICAgbmFtZTogJ0V4YW1wbGUgV01TJyxcbiAgICAgICAgICBzaG93OiB0cnVlLFxuICAgICAgICAgIHByb3h5RW5hYmxlZDogdHJ1ZSxcbiAgICAgICAgICBvcmRlcjogMSxcbiAgICAgICAgICBsYWJlbDogJ1dNUyBMYXllcicsXG4gICAgICAgICAgaWQ6ICd3bXMtMScsXG4gICAgICAgIH0sXG4gICAgICAgIC8vIEFkZCBtb3JlIG1hcCBsYXllcnMgYXMgbmVlZGVkXG4gICAgICBdLFxuICAgICAgYWxlcnRzOiBbXSxcbiAgICAgIHVwbG9hZHM6IFtcbiAgICAgICAge1xuICAgICAgICAgIHVuc2VlbjogZmFsc2UsXG4gICAgICAgICAgcGVyY2VudGFnZTogMCxcbiAgICAgICAgICBlcnJvcnM6IDAsXG4gICAgICAgICAgc3VjY2Vzc2VzOiAwLFxuICAgICAgICAgIGNvbXBsZXRlOiAwLFxuICAgICAgICAgIGFtb3VudDogMCxcbiAgICAgICAgICBpc3N1ZXM6IDAsXG4gICAgICAgICAgc2VuZGluZzogZmFsc2UsXG4gICAgICAgICAgZmluaXNoZWQ6IGZhbHNlLFxuICAgICAgICAgIGludGVycnVwdGVkOiBmYWxzZSxcbiAgICAgICAgICBzZW50QXQ6IDAsXG4gICAgICAgICAgaWQ6ICd1cGxvYWQtMScsXG4gICAgICAgICAgdXBsb2FkczogW10sXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgICAgdGhlbWU6IHtcbiAgICAgICAgcGFsZXR0ZTogJ2xpZ2h0JyxcbiAgICAgICAgdGhlbWU6ICdkZWZhdWx0JyxcbiAgICAgIH0sXG4gICAgICBxdWVye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ke3VybH0nIGZvciBtb2NrIGFwaS5gKVxuICB9XG4gIHJldHVybiBkYXRhXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/metacardtype.d.ts b/src/main/webapp/test/mock-api/metacardtype.d.ts new file mode 100644 index 00000000000..c84f9cced8e --- /dev/null +++ b/src/main/webapp/test/mock-api/metacardtype.d.ts @@ -0,0 +1,11323 @@ +declare const _default: { + GeoEntryMetacardType: { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.import-location': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.feature-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.population': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.feature-class': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.gazetteer-sort-value': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + confluence: { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.pdf': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.mp4': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.mp4.audio-sample-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.powerpoint': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + gmdMetacardType: { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'ddf.metacard': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-content-type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-content-type-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-target-namespace': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + kml: { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.mpeg': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.jpeg': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.doc': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'metacard.query': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + polling: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + type: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + facets: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sorts: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'detail-level': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + cql: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sources: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + enterprise: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + schedules: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + filterTree: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + federation: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'resource-note': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.note.result-comment': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'query-template': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + polling: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + type: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + facets: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sorts: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'detail-level': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + cql: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sources: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + enterprise: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + schedules: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + filterTree: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + federation: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ui.template-filter': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + cswMetacardType: { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + pdf: { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + common: { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'metacard.list': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.icon': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.cql': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.bookmarks': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.common': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'metacard.version': { + 'metacard.sharing': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + type: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + facets: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.import-location': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.action': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sorts: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'detail-level': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-content-type-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + enterprise: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-target-namespace': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.cql': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + filterTree: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + federation: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.feature-class': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + queries: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ui.template-filter': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-content-type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + polling: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.icon': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.feature-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + lists: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.versioned-on': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + cql: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sources: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.mp4.audio-sample-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ui.attribute-group': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.note.result-comment': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + schedules: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.edited-by': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.population': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.gazetteer-sort-value': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.bookmarks': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.version.type-binary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'attribute-group': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ui.attribute-group': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'fallback.excel': { + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; + 'metacard.deleted': { + 'metacard.sharing': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + metadata: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + type: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + facets: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.import-location': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + id: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sorts: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.compression': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'checksum-algorithm': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-errors': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.altitude-meters': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'detail-level': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.start': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.frame-center': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-content-type-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'associations.external': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.related': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + enterprise: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-target-namespace': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.deleted.id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.cql': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + datatype: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.category': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-administrators': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + filterTree: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + federation: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.feature-class': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.deleted.version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.contributor-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.extracted.text': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.encoding': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + queries: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.number-of-bands': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.country-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.modified': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ui.template-filter': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.vocabulary': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.end': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.width-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metadata-content-type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + language: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + polling: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'datetime.name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-individuals-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bits-per-sample': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + modified: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.scanning-mode': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.icon': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'validation-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + thumbnail: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + created: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard-tags': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.feature-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource.derived-uri': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + lists: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-name': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.owner': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + expiration: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + cql: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-size': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'location.crs-code': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + sources: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.mp4.audio-sample-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format-version': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + description: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + title: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'resource-download-url': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'source-id': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ui.attribute-group': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.note.result-comment': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + effective: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.height-pixels': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'point-of-contact': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + schedules: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + checksum: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'failed-validators-warnings': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.population': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.bit-rate': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'topic.keyword': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.point-of-contact-address': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.publisher-email': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'ext.gazetteer-sort-value': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.duration': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.type': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'contact.creator-phone': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.created': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'security.access-groups-read': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'media.format': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'list.bookmarks': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.associations.derived': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + location: { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + 'metacard.deleted.deleted-by': { + multivalued: boolean; + isInjected: boolean; + id: string; + type: string; + }; + }; +}; +export default _default; diff --git a/src/main/webapp/test/mock-api/metacardtype.js b/src/main/webapp/test/mock-api/metacardtype.js new file mode 100644 index 00000000000..43206157e47 --- /dev/null +++ b/src/main/webapp/test/mock-api/metacardtype.js @@ -0,0 +1,11323 @@ +export default { + GeoEntryMetacardType: { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: true, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'ext.import-location': { + multivalued: false, + isInjected: false, + id: 'ext.import-location', + type: 'STRING', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: true, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: true, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'ext.feature-code': { + multivalued: false, + isInjected: false, + id: 'ext.feature-code', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: true, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: false, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: true, + id: 'associations.external', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: false, + id: 'location.crs-code', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-name', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: true, + id: 'contact.creator-email', + type: 'STRING', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: true, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: true, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'ext.population': { + multivalued: false, + isInjected: false, + id: 'ext.population', + type: 'LONG', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'ext.feature-class': { + multivalued: false, + isInjected: false, + id: 'ext.feature-class', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'ext.gazetteer-sort-value': { + multivalued: false, + isInjected: false, + id: 'ext.gazetteer-sort-value', + type: 'INTEGER', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: true, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'location.country-code': { + multivalued: true, + isInjected: false, + id: 'location.country-code', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: false, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + confluence: { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: true, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: true, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: true, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: true, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.pdf': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.mp4': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'ext.mp4.audio-sample-rate': { + multivalued: false, + isInjected: false, + id: 'ext.mp4.audio-sample-rate', + type: 'INTEGER', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.powerpoint': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + gmdMetacardType: { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: false, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: false, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: false, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: false, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'ddf.metacard': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'metadata-content-type': { + multivalued: false, + isInjected: false, + id: 'metadata-content-type', + type: 'STRING', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: true, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: true, + id: 'security.access-groups', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'metadata-content-type-version': { + multivalued: false, + isInjected: false, + id: 'metadata-content-type-version', + type: 'STRING', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-name', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + 'metadata-target-namespace': { + multivalued: false, + isInjected: false, + id: 'metadata-target-namespace', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: false, + id: 'effective', + type: 'DATE', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: true, + id: 'contact.creator-email', + type: 'STRING', + }, + 'point-of-contact': { + multivalued: false, + isInjected: false, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: true, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: true, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: true, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + kml: { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: false, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: false, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'location.country-code': { + multivalued: true, + isInjected: false, + id: 'location.country-code', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: false, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.mpeg': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.jpeg': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.doc': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'metacard.query': { + metadata: { + multivalued: false, + isInjected: true, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: true, + id: 'language', + type: 'STRING', + }, + polling: { + multivalued: false, + isInjected: false, + id: 'polling', + type: 'INTEGER', + }, + type: { + multivalued: false, + isInjected: false, + id: 'type', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + facets: { + multivalued: true, + isInjected: false, + id: 'facets', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: true, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: true, + id: 'modified', + type: 'DATE', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: true, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: true, + id: 'validation-warnings', + type: 'STRING', + }, + sorts: { + multivalued: true, + isInjected: false, + id: 'sorts', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: true, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-email', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: true, + id: 'created', + type: 'DATE', + }, + 'security.access-groups': { + multivalued: true, + isInjected: true, + id: 'security.access-groups', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: true, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: true, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: true, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: true, + id: 'validation-errors', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: true, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'detail-level': { + multivalued: false, + isInjected: false, + id: 'detail-level', + type: 'STRING', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: true, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: true, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-phone', + type: 'STRING', + }, + cql: { + multivalued: false, + isInjected: false, + id: 'cql', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: true, + id: 'associations.external', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: true, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + sources: { + multivalued: true, + isInjected: false, + id: 'sources', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-name', + type: 'STRING', + }, + enterprise: { + multivalued: false, + isInjected: false, + id: 'enterprise', + type: 'BOOLEAN', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: true, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: true, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: true, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: true, + id: 'source-id', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: true, + id: 'contact.creator-email', + type: 'STRING', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: true, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: true, + id: 'contact.creator-name', + type: 'STRING', + }, + schedules: { + multivalued: true, + isInjected: false, + id: 'schedules', + type: 'XML', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + filterTree: { + multivalued: false, + isInjected: false, + id: 'filterTree', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: true, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: true, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + federation: { + multivalued: false, + isInjected: false, + id: 'federation', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: true, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: true, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: true, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: true, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: true, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'resource-note': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: true, + id: 'failed-validators-errors', + type: 'STRING', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: true, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: true, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: true, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: true, + id: 'associations.external', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-name', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'ext.note.result-comment': { + multivalued: true, + isInjected: false, + id: 'ext.note.result-comment', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: true, + id: 'contact.creator-email', + type: 'STRING', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: true, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: true, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: true, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'query-template': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + polling: { + multivalued: false, + isInjected: false, + id: 'polling', + type: 'INTEGER', + }, + type: { + multivalued: false, + isInjected: false, + id: 'type', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + facets: { + multivalued: true, + isInjected: false, + id: 'facets', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: true, + id: 'failed-validators-errors', + type: 'STRING', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: true, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: true, + id: 'validation-warnings', + type: 'STRING', + }, + sorts: { + multivalued: true, + isInjected: false, + id: 'sorts', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: true, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'detail-level': { + multivalued: false, + isInjected: false, + id: 'detail-level', + type: 'STRING', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-phone', + type: 'STRING', + }, + cql: { + multivalued: false, + isInjected: false, + id: 'cql', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: true, + id: 'associations.external', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + sources: { + multivalued: true, + isInjected: false, + id: 'sources', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-name', + type: 'STRING', + }, + enterprise: { + multivalued: false, + isInjected: false, + id: 'enterprise', + type: 'BOOLEAN', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: true, + id: 'contact.creator-email', + type: 'STRING', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: true, + id: 'contact.creator-name', + type: 'STRING', + }, + schedules: { + multivalued: true, + isInjected: false, + id: 'schedules', + type: 'XML', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + filterTree: { + multivalued: false, + isInjected: false, + id: 'filterTree', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: true, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + federation: { + multivalued: false, + isInjected: false, + id: 'federation', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: true, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'ui.template-filter': { + multivalued: false, + isInjected: false, + id: 'ui.template-filter', + type: 'XML', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + cswMetacardType: { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: false, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: false, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: false, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: false, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + pdf: { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + common: { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: false, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: false, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: false, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: false, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'metacard.list': { + metadata: { + multivalued: false, + isInjected: true, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: true, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: true, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: true, + id: 'modified', + type: 'DATE', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'list.icon': { + multivalued: false, + isInjected: false, + id: 'list.icon', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: true, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: true, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: true, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-email', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: true, + id: 'created', + type: 'DATE', + }, + 'security.access-groups': { + multivalued: true, + isInjected: true, + id: 'security.access-groups', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: true, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: true, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: true, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: true, + id: 'validation-errors', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: true, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: true, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: true, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: true, + id: 'associations.external', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: true, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: true, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: true, + id: 'resource-download-url', + type: 'STRING', + }, + 'list.cql': { + multivalued: false, + isInjected: false, + id: 'list.cql', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: true, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: true, + id: 'source-id', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: true, + id: 'contact.creator-email', + type: 'STRING', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: true, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: true, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: true, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: true, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: true, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: true, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'list.bookmarks': { + multivalued: true, + isInjected: false, + id: 'list.bookmarks', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: true, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: true, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: true, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.common': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'metacard.version': { + 'metacard.sharing': { + multivalued: true, + isInjected: false, + id: 'metacard.sharing', + type: 'XML', + }, + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + type: { + multivalued: false, + isInjected: false, + id: 'type', + type: 'STRING', + }, + facets: { + multivalued: true, + isInjected: false, + id: 'facets', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'ext.import-location': { + multivalued: false, + isInjected: false, + id: 'ext.import-location', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'metacard.version.action': { + multivalued: false, + isInjected: false, + id: 'metacard.version.action', + type: 'STRING', + }, + sorts: { + multivalued: true, + isInjected: false, + id: 'sorts', + type: 'STRING', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: false, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'detail-level': { + multivalued: false, + isInjected: false, + id: 'detail-level', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'metadata-content-type-version': { + multivalued: false, + isInjected: false, + id: 'metadata-content-type-version', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + enterprise: { + multivalued: false, + isInjected: false, + id: 'enterprise', + type: 'BOOLEAN', + }, + 'metadata-target-namespace': { + multivalued: false, + isInjected: false, + id: 'metadata-target-namespace', + type: 'STRING', + }, + 'list.cql': { + multivalued: false, + isInjected: false, + id: 'list.cql', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'metacard.version.tags': { + multivalued: true, + isInjected: false, + id: 'metacard.version.tags', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + filterTree: { + multivalued: false, + isInjected: false, + id: 'filterTree', + type: 'STRING', + }, + federation: { + multivalued: false, + isInjected: false, + id: 'federation', + type: 'STRING', + }, + 'ext.feature-class': { + multivalued: false, + isInjected: false, + id: 'ext.feature-class', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + queries: { + multivalued: true, + isInjected: false, + id: 'queries', + type: 'STRING', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'location.country-code': { + multivalued: true, + isInjected: false, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'ui.template-filter': { + multivalued: false, + isInjected: false, + id: 'ui.template-filter', + type: 'XML', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + 'location.crs-name': { + multivalued: true, + isInjected: false, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + 'metadata-content-type': { + multivalued: false, + isInjected: false, + id: 'metadata-content-type', + type: 'STRING', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + polling: { + multivalued: false, + isInjected: false, + id: 'polling', + type: 'INTEGER', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'list.icon': { + multivalued: false, + isInjected: false, + id: 'list.icon', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'ext.feature-code': { + multivalued: false, + isInjected: false, + id: 'ext.feature-code', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'metacard.version.resource-uri': { + multivalued: false, + isInjected: false, + id: 'metacard.version.resource-uri', + type: 'STRING', + }, + lists: { + multivalued: true, + isInjected: false, + id: 'lists', + type: 'XML', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'metacard.version.versioned-on': { + multivalued: false, + isInjected: false, + id: 'metacard.version.versioned-on', + type: 'DATE', + }, + cql: { + multivalued: false, + isInjected: false, + id: 'cql', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: false, + id: 'location.crs-code', + type: 'STRING', + }, + sources: { + multivalued: true, + isInjected: false, + id: 'sources', + type: 'STRING', + }, + 'ext.mp4.audio-sample-rate': { + multivalued: false, + isInjected: false, + id: 'ext.mp4.audio-sample-rate', + type: 'INTEGER', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + 'metacard.version.type': { + multivalued: false, + isInjected: false, + id: 'metacard.version.type', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'ui.attribute-group': { + multivalued: true, + isInjected: false, + id: 'ui.attribute-group', + type: 'STRING', + }, + 'ext.note.result-comment': { + multivalued: true, + isInjected: false, + id: 'ext.note.result-comment', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: false, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: false, + id: 'point-of-contact', + type: 'STRING', + }, + schedules: { + multivalued: true, + isInjected: false, + id: 'schedules', + type: 'XML', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'metacard.version.edited-by': { + multivalued: false, + isInjected: false, + id: 'metacard.version.edited-by', + type: 'STRING', + }, + 'ext.population': { + multivalued: false, + isInjected: false, + id: 'ext.population', + type: 'LONG', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'ext.gazetteer-sort-value': { + multivalued: false, + isInjected: false, + id: 'ext.gazetteer-sort-value', + type: 'INTEGER', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'list.bookmarks': { + multivalued: true, + isInjected: false, + id: 'list.bookmarks', + type: 'STRING', + }, + 'metacard.version.id': { + multivalued: false, + isInjected: false, + id: 'metacard.version.id', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'metacard.version.type-binary': { + multivalued: false, + isInjected: false, + id: 'metacard.version.type-binary', + type: 'BINARY', + }, + }, + 'attribute-group': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: true, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: true, + id: 'datetime.end', + type: 'DATE', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: true, + id: 'media.width-pixels', + type: 'INTEGER', + }, + 'datetime.name': { + multivalued: true, + isInjected: true, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: true, + id: 'failed-validators-errors', + type: 'STRING', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: true, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: true, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: true, + id: 'media.scanning-mode', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: true, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: true, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: true, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: true, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: true, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: true, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: true, + id: 'associations.external', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-name', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: true, + id: 'media.format-version', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'ui.attribute-group': { + multivalued: true, + isInjected: false, + id: 'ui.attribute-group', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: true, + id: 'contact.creator-email', + type: 'STRING', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: true, + id: 'media.height-pixels', + type: 'INTEGER', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: true, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: true, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: true, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'topic.keyword': { + multivalued: true, + isInjected: true, + id: 'topic.keyword', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: true, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: true, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: true, + id: 'media.duration', + type: 'DOUBLE', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: true, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.type': { + multivalued: false, + isInjected: true, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: true, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: true, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: true, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'media.format': { + multivalued: false, + isInjected: true, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: true, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: true, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'fallback.excel': { + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: true, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: true, + id: 'location.crs-code', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: true, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: true, + id: 'point-of-contact', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'location.country-code': { + multivalued: true, + isInjected: true, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'location.crs-name': { + multivalued: true, + isInjected: true, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + }, + 'metacard.deleted': { + 'metacard.sharing': { + multivalued: true, + isInjected: false, + id: 'metacard.sharing', + type: 'XML', + }, + metadata: { + multivalued: false, + isInjected: false, + id: 'metadata', + type: 'XML', + }, + 'contact.publisher-address': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-address', + type: 'STRING', + }, + 'contact.contributor-name': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-name', + type: 'STRING', + }, + type: { + multivalued: false, + isInjected: false, + id: 'type', + type: 'STRING', + }, + facets: { + multivalued: true, + isInjected: false, + id: 'facets', + type: 'STRING', + }, + 'failed-validators-errors': { + multivalued: true, + isInjected: false, + id: 'failed-validators-errors', + type: 'STRING', + }, + 'ext.import-location': { + multivalued: false, + isInjected: false, + id: 'ext.import-location', + type: 'STRING', + }, + 'media.frame-rate': { + multivalued: false, + isInjected: false, + id: 'media.frame-rate', + type: 'DOUBLE', + }, + id: { + multivalued: false, + isInjected: false, + id: 'id', + type: 'STRING', + }, + sorts: { + multivalued: true, + isInjected: false, + id: 'sorts', + type: 'STRING', + }, + 'media.compression': { + multivalued: false, + isInjected: false, + id: 'media.compression', + type: 'STRING', + }, + 'contact.contributor-email': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-email', + type: 'STRING', + }, + 'resource-uri': { + multivalued: false, + isInjected: false, + id: 'resource-uri', + type: 'STRING', + }, + 'checksum-algorithm': { + multivalued: false, + isInjected: false, + id: 'checksum-algorithm', + type: 'STRING', + }, + 'validation-errors': { + multivalued: true, + isInjected: false, + id: 'validation-errors', + type: 'STRING', + }, + 'location.altitude-meters': { + multivalued: true, + isInjected: false, + id: 'location.altitude-meters', + type: 'DOUBLE', + }, + 'detail-level': { + multivalued: false, + isInjected: false, + id: 'detail-level', + type: 'STRING', + }, + 'datetime.start': { + multivalued: true, + isInjected: false, + id: 'datetime.start', + type: 'DATE', + }, + 'media.frame-center': { + multivalued: false, + isInjected: false, + id: 'media.frame-center', + type: 'GEOMETRY', + }, + 'contact.contributor-phone': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-phone', + type: 'STRING', + }, + 'metadata-content-type-version': { + multivalued: false, + isInjected: false, + id: 'metadata-content-type-version', + type: 'STRING', + }, + 'associations.external': { + multivalued: true, + isInjected: false, + id: 'associations.external', + type: 'STRING', + }, + 'metacard.associations.related': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.related', + type: 'STRING', + }, + 'contact.publisher-name': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-name', + type: 'STRING', + }, + enterprise: { + multivalued: false, + isInjected: false, + id: 'enterprise', + type: 'BOOLEAN', + }, + 'metadata-target-namespace': { + multivalued: false, + isInjected: false, + id: 'metadata-target-namespace', + type: 'STRING', + }, + 'metacard.deleted.id': { + multivalued: false, + isInjected: false, + id: 'metacard.deleted.id', + type: 'STRING', + }, + 'list.cql': { + multivalued: false, + isInjected: false, + id: 'list.cql', + type: 'STRING', + }, + 'resource.derived-download-url': { + multivalued: true, + isInjected: false, + id: 'resource.derived-download-url', + type: 'STRING', + }, + 'contact.creator-email': { + multivalued: true, + isInjected: false, + id: 'contact.creator-email', + type: 'STRING', + }, + datatype: { + multivalued: true, + isInjected: false, + id: 'datatype', + type: 'STRING', + }, + 'contact.creator-name': { + multivalued: true, + isInjected: false, + id: 'contact.creator-name', + type: 'STRING', + }, + 'topic.category': { + multivalued: true, + isInjected: false, + id: 'topic.category', + type: 'STRING', + }, + 'security.access-administrators': { + multivalued: true, + isInjected: false, + id: 'security.access-administrators', + type: 'STRING', + }, + filterTree: { + multivalued: false, + isInjected: false, + id: 'filterTree', + type: 'STRING', + }, + federation: { + multivalued: false, + isInjected: false, + id: 'federation', + type: 'STRING', + }, + 'ext.feature-class': { + multivalued: false, + isInjected: false, + id: 'ext.feature-class', + type: 'STRING', + }, + 'metacard.deleted.version': { + multivalued: false, + isInjected: false, + id: 'metacard.deleted.version', + type: 'STRING', + }, + 'contact.contributor-address': { + multivalued: true, + isInjected: false, + id: 'contact.contributor-address', + type: 'STRING', + }, + 'contact.point-of-contact-phone': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-phone', + type: 'STRING', + }, + 'ext.extracted.text': { + multivalued: false, + isInjected: false, + id: 'ext.extracted.text', + type: 'STRING', + }, + 'media.encoding': { + multivalued: true, + isInjected: false, + id: 'media.encoding', + type: 'STRING', + }, + queries: { + multivalued: true, + isInjected: false, + id: 'queries', + type: 'STRING', + }, + 'media.number-of-bands': { + multivalued: false, + isInjected: false, + id: 'media.number-of-bands', + type: 'INTEGER', + }, + 'location.country-code': { + multivalued: true, + isInjected: false, + id: 'location.country-code', + type: 'STRING', + }, + 'metacard.modified': { + multivalued: false, + isInjected: false, + id: 'metacard.modified', + type: 'DATE', + }, + 'ui.template-filter': { + multivalued: false, + isInjected: false, + id: 'ui.template-filter', + type: 'XML', + }, + 'security.access-individuals': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals', + type: 'STRING', + }, + 'location.crs-name': { + multivalued: true, + isInjected: false, + id: 'location.crs-name', + type: 'STRING', + }, + 'contact.publisher-phone': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-phone', + type: 'STRING', + }, + 'topic.vocabulary': { + multivalued: true, + isInjected: false, + id: 'topic.vocabulary', + type: 'STRING', + }, + 'datetime.end': { + multivalued: true, + isInjected: false, + id: 'datetime.end', + type: 'DATE', + }, + 'media.width-pixels': { + multivalued: false, + isInjected: false, + id: 'media.width-pixels', + type: 'INTEGER', + }, + 'metadata-content-type': { + multivalued: false, + isInjected: false, + id: 'metadata-content-type', + type: 'STRING', + }, + language: { + multivalued: true, + isInjected: false, + id: 'language', + type: 'STRING', + }, + polling: { + multivalued: false, + isInjected: false, + id: 'polling', + type: 'INTEGER', + }, + 'datetime.name': { + multivalued: true, + isInjected: false, + id: 'datetime.name', + type: 'STRING', + }, + 'security.access-individuals-read': { + multivalued: true, + isInjected: false, + id: 'security.access-individuals-read', + type: 'STRING', + }, + 'media.bits-per-sample': { + multivalued: false, + isInjected: false, + id: 'media.bits-per-sample', + type: 'INTEGER', + }, + modified: { + multivalued: false, + isInjected: false, + id: 'modified', + type: 'DATE', + }, + 'media.scanning-mode': { + multivalued: false, + isInjected: false, + id: 'media.scanning-mode', + type: 'STRING', + }, + 'list.icon': { + multivalued: false, + isInjected: false, + id: 'list.icon', + type: 'STRING', + }, + 'contact.creator-address': { + multivalued: true, + isInjected: false, + id: 'contact.creator-address', + type: 'STRING', + }, + 'validation-warnings': { + multivalued: true, + isInjected: false, + id: 'validation-warnings', + type: 'STRING', + }, + 'contact.point-of-contact-email': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-email', + type: 'STRING', + }, + thumbnail: { + multivalued: false, + isInjected: false, + id: 'thumbnail', + type: 'BINARY', + }, + created: { + multivalued: false, + isInjected: false, + id: 'created', + type: 'DATE', + }, + 'security.access-groups': { + multivalued: true, + isInjected: false, + id: 'security.access-groups', + type: 'STRING', + }, + 'metacard-tags': { + multivalued: true, + isInjected: false, + id: 'metacard-tags', + type: 'STRING', + }, + 'ext.feature-code': { + multivalued: false, + isInjected: false, + id: 'ext.feature-code', + type: 'STRING', + }, + 'resource.derived-uri': { + multivalued: true, + isInjected: false, + id: 'resource.derived-uri', + type: 'STRING', + }, + lists: { + multivalued: true, + isInjected: false, + id: 'lists', + type: 'XML', + }, + 'contact.point-of-contact-name': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-name', + type: 'STRING', + }, + 'metacard.owner': { + multivalued: false, + isInjected: false, + id: 'metacard.owner', + type: 'STRING', + }, + expiration: { + multivalued: false, + isInjected: false, + id: 'expiration', + type: 'DATE', + }, + cql: { + multivalued: false, + isInjected: false, + id: 'cql', + type: 'STRING', + }, + 'resource-size': { + multivalued: false, + isInjected: false, + id: 'resource-size', + type: 'STRING', + }, + 'location.crs-code': { + multivalued: true, + isInjected: false, + id: 'location.crs-code', + type: 'STRING', + }, + sources: { + multivalued: true, + isInjected: false, + id: 'sources', + type: 'STRING', + }, + 'ext.mp4.audio-sample-rate': { + multivalued: false, + isInjected: false, + id: 'ext.mp4.audio-sample-rate', + type: 'INTEGER', + }, + 'media.format-version': { + multivalued: false, + isInjected: false, + id: 'media.format-version', + type: 'STRING', + }, + description: { + multivalued: false, + isInjected: false, + id: 'description', + type: 'STRING', + }, + title: { + multivalued: false, + isInjected: false, + id: 'title', + type: 'STRING', + }, + 'resource-download-url': { + multivalued: false, + isInjected: false, + id: 'resource-download-url', + type: 'STRING', + }, + 'source-id': { + multivalued: false, + isInjected: false, + id: 'source-id', + type: 'STRING', + }, + 'ui.attribute-group': { + multivalued: true, + isInjected: false, + id: 'ui.attribute-group', + type: 'STRING', + }, + 'ext.note.result-comment': { + multivalued: true, + isInjected: false, + id: 'ext.note.result-comment', + type: 'STRING', + }, + effective: { + multivalued: false, + isInjected: false, + id: 'effective', + type: 'DATE', + }, + 'media.height-pixels': { + multivalued: false, + isInjected: false, + id: 'media.height-pixels', + type: 'INTEGER', + }, + 'point-of-contact': { + multivalued: false, + isInjected: false, + id: 'point-of-contact', + type: 'STRING', + }, + schedules: { + multivalued: true, + isInjected: false, + id: 'schedules', + type: 'XML', + }, + checksum: { + multivalued: false, + isInjected: false, + id: 'checksum', + type: 'STRING', + }, + 'failed-validators-warnings': { + multivalued: true, + isInjected: false, + id: 'failed-validators-warnings', + type: 'STRING', + }, + 'ext.population': { + multivalued: false, + isInjected: false, + id: 'ext.population', + type: 'LONG', + }, + 'media.bit-rate': { + multivalued: false, + isInjected: false, + id: 'media.bit-rate', + type: 'DOUBLE', + }, + 'topic.keyword': { + multivalued: true, + isInjected: false, + id: 'topic.keyword', + type: 'STRING', + }, + 'contact.point-of-contact-address': { + multivalued: true, + isInjected: false, + id: 'contact.point-of-contact-address', + type: 'STRING', + }, + 'contact.publisher-email': { + multivalued: true, + isInjected: false, + id: 'contact.publisher-email', + type: 'STRING', + }, + 'ext.gazetteer-sort-value': { + multivalued: false, + isInjected: false, + id: 'ext.gazetteer-sort-value', + type: 'INTEGER', + }, + 'media.duration': { + multivalued: false, + isInjected: false, + id: 'media.duration', + type: 'DOUBLE', + }, + 'media.type': { + multivalued: false, + isInjected: false, + id: 'media.type', + type: 'STRING', + }, + 'contact.creator-phone': { + multivalued: true, + isInjected: false, + id: 'contact.creator-phone', + type: 'STRING', + }, + 'metacard.created': { + multivalued: false, + isInjected: false, + id: 'metacard.created', + type: 'DATE', + }, + 'security.access-groups-read': { + multivalued: true, + isInjected: false, + id: 'security.access-groups-read', + type: 'STRING', + }, + 'media.format': { + multivalued: false, + isInjected: false, + id: 'media.format', + type: 'STRING', + }, + 'list.bookmarks': { + multivalued: true, + isInjected: false, + id: 'list.bookmarks', + type: 'STRING', + }, + 'metacard.associations.derived': { + multivalued: true, + isInjected: false, + id: 'metacard.associations.derived', + type: 'STRING', + }, + location: { + multivalued: false, + isInjected: false, + id: 'location', + type: 'GEOMETRY', + }, + 'metacard.deleted.deleted-by': { + multivalued: false, + isInjected: false, + id: 'metacard.deleted.deleted-by', + type: 'STRING', + }, + }, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWNhcmR0eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21haW4vd2ViYXBwL3Rlc3QvbW9jay1hcGkvbWV0YWNhcmR0eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQWU7SUFDYixvQkFBb0IsRUFBRTtRQUNwQixRQUFRLEVBQUU7WUFDUixXQUFXLEVBQUUs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ICAgfSxcbiAgICAnY29udGFjdC5wdWJsaXNoZXItYWRkcmVzcyc6IHtcbiAgICAgIG11bHRpdmFsdWVkOiB0cnVlLFxuICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICBpZDogJ2NvbnRhY3QucHVibGlzaGVyLWFkZHJlc3MnLFxuICAgICAgdHlwZTogJ1NUUklORycsXG4gICAgfSxcbiAgICAndG9waWMudm9jYWJ1bGFyeSc6IHtcbiAgICAgIG11bHRpdmFsdWVkOiB0cnVlLFxuICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICBpZDogJ3RvcGljLnZvY2FidWxhcnknLFxuICAgICAgdHlwZTogJ1NUUklORycsXG4gICAgfSxcbiAgICAnY29udGFjdC5jb250cmlidXRvci1uYW1lJzoge1xuICAgICAgbXVsdGl2YWx1ZWQ6IHRydWUsXG4gICAgICBpc0luamVjdGVkOiBmYWxzZSxcbiAgICAgIGlkOiAnY29udGFjdC5jb250cmlidXRvci1uYW1lJyxcbiAgICAgIHR5cGU6ICdTVFJJTkcnLFxuICAgIH0sXG4gICAgJ2RhdGV0aW1lLmVuZCc6IHtcbiAgICAgIG11bHRpdmFsdWVkOiB0cnVlLFxuICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICBpZDogJ2RhdGV0aW1lLmVuZCcsXG4gICAgICB0eXBlOiAnREFURScsXG4gICAgfSxcbiAgICAnbWVkaWEud2lkdGgtcGl4ZWxzJzoge1xuICAgICAgbXVsdGl2YWx1ZWQ6IGZhbHNlLFxuICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICBpZDogJ21lZGlhLndpZHRoLXBpeGVscycsXG4gICAgICB0eXBlOiAnSU5URUdFUicsXG4gICAgfSxcbiAgICBsYW5ndWFnZToge1xuICAgICAgbXVsdGl2YWx1ZWQ6IHRydWUsXG4gICAgICBpc0luamVjdGVkOiBmYWxzZSxcbiAgICAgIGlkOiAnbGFuZ3VhZ2UnLFxuICAgICAgdHlwZTog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4gICAgfSxcbiAgICAnY29udGFjdC5jb250cmlidXRvci1hZGRyZXNzJzoge1xuICAgICAgbXVsdGl2YWx1ZWQ6IHRydWUsXG4gICAgICBpc0luamVjdGVkOiBmYWxzZSxcbiAgICAgIGlkOiAnY29udGFjdC5jb250cmlidXRvci1hZGRyZXNzJyxcbiAgICAgIHR5cGU6ICdTVFJJTkcnLFxuICAgIH0sXG4gICAgJ2NvbnRhY3QucHVibGlzaGVyLWVtYWlsJzoge1xuICAgICAgbXVsdGl2YWx1ZWQ6IHRydWUsXG4gICAgICBpc0luamVjdGVkOiBmYWxzZSxcbiAgICAgIGlkOiAnY29udGFjdC5wdWJsaXNoZXItZW1haWwnLFxuICAgICAgdHlwZTogJ1NUUklORycsXG4gICAgfSxcbiAgICAnY29udGFjdC5wb2ludC1vZi1jb250YWN0LXBob25lJzoge1xuICAgICAgbXVsdGl2YWx1ZWQ6IHRydWUsXG4gICAgICBpc0luamVjdGVkOiBmYWxzZSxcbiAgICAgIGlkOiAnY29udGFjdC5wb2ludC1vZi1jb250YWN0LXBob25lJyxcbiAgICAgIHR5cGU6ICdTVFJJTkcnLFxuICAgIH0sXG4gICAgJ21lZGlhLmR1cmF0aW9uJzoge1xuICAgICAgbXVsdGl2YWx1ZWQ6IGZhbHNlLFxuICAgICAgaXNJbmplY3RlZDogZmFsc2UsXG4gICAgICBpZDogJ21lZGlhLmR1cmF0aW9uJyxcbiAgICAgIHR5cGU6ICdET1VCTEUnLFxuICAgIH0sXG4gICAgJ21lZGlhLnR5cGUnOiB7XG4gICAgICBtdWx0aXZhbHVlZDogZmFsc2UsXG4gICAgICBpc0luamVjdGVkOiBmYWxzZSxcbiAgICAgIGlkOiAnbWVkaWEudHlwZScsXG4gICAgICB0eXBlOiAnU1RSSU5HJyxcbiAgICB9LFxuICAgICdleHQuZXh0cmFjdGVkLnRleHQnOiB7XG4gICAgICBtdWx0aXZhbHVlZDogZmFsc2UsXG4gICAgICBpc0luamVjdGVkOiBmYWxzZSxcb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WxldGVkLmRlbGV0ZWQtYnknLFxuICAgICAgdHlwZTogJ1NUUklORycsXG4gICAgfSxcbiAgfSxcbn1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/mock-jquery.d.ts b/src/main/webapp/test/mock-api/mock-jquery.d.ts new file mode 100644 index 00000000000..c7ed3765883 --- /dev/null +++ b/src/main/webapp/test/mock-api/mock-jquery.d.ts @@ -0,0 +1,3 @@ +declare const mock: () => void; +declare const unmock: () => void; +export { mock, unmock }; diff --git a/src/main/webapp/test/mock-api/mock-jquery.js b/src/main/webapp/test/mock-api/mock-jquery.js new file mode 100644 index 00000000000..e77344d69a8 --- /dev/null +++ b/src/main/webapp/test/mock-api/mock-jquery.js @@ -0,0 +1,38 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import $ from 'jquery'; +import api from './index'; +var oldGet = $.get; +var oldPost = $.post; +var oldAjax = $.ajax; +var mock = function () { + var httpRequest = function (_a) { + var url = _a.url; + return Promise.resolve(api(url)); + }; + // @ts-expect-error ts-migrate(2322) FIXME: Type '(url: any) => Promise' is not assignabl... Remove this comment to see the full error message + $.get = function (url) { return httpRequest({ url: url }); }; + // @ts-expect-error ts-migrate(2322) FIXME: Type '({ url }: any) => Promise' is not assig... Remove this comment to see the full error message + $.post = httpRequest; + // @ts-expect-error ts-migrate(2322) FIXME: Type '({ url }: any) => Promise' is not assig... Remove this comment to see the full error message + $.ajax = httpRequest; +}; +var unmock = function () { + $.get = oldGet; + $.post = oldPost; + $.ajax = oldAjax; +}; +export { mock, unmock }; +//# sourceMappingURL=data:application/json;base64,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WVzc2FnZVxuICAkLmFqYXggPSBodHRwUmVxdWVzdFxufVxuXG5jb25zdCB1bm1vY2sgPSAoKSA9PiB7XG4gICQuZ2V0ID0gb2xkR2V0XG4gICQucG9zdCA9IG9sZFBvc3RcbiAgJC5hamF4ID0gb2xkQWpheFxufVxuXG5leHBvcnQgeyBtb2NrLCB1bm1vY2sgfVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/mock-properties.d.ts b/src/main/webapp/test/mock-api/mock-properties.d.ts new file mode 100644 index 00000000000..c7ed3765883 --- /dev/null +++ b/src/main/webapp/test/mock-api/mock-properties.d.ts @@ -0,0 +1,3 @@ +declare const mock: () => void; +declare const unmock: () => void; +export { mock, unmock }; diff --git a/src/main/webapp/test/mock-api/mock-properties.js b/src/main/webapp/test/mock-api/mock-properties.js new file mode 100644 index 00000000000..085cbd5fe93 --- /dev/null +++ b/src/main/webapp/test/mock-api/mock-properties.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import { StartupDataStore } from '../../js/model/Startup/startup'; +import api from './index'; +var mock = function () { + StartupDataStore.Configuration.config = api('./internal/config'); + StartupDataStore.Configuration.platformUiConfiguration = api('./internal/platform/config/ui'); + StartupDataStore.Configuration._notifySubscribers({ + thing: 'configuration-update', + }); +}; +var unmock = function () { }; +export { mock, unmock }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9jay1wcm9wZXJ0aWVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4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NvbmZpZ3VyYXRpb24tdXBkYXRlJyxcbiAgfSlcbn1cblxuY29uc3QgdW5tb2NrID0gKCkgPT4ge31cblxuZXhwb3J0IHsgbW9jaywgdW5tb2NrIH1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/platform.d.ts b/src/main/webapp/test/mock-api/platform.d.ts new file mode 100644 index 00000000000..76de67efefe --- /dev/null +++ b/src/main/webapp/test/mock-api/platform.d.ts @@ -0,0 +1,13 @@ +declare const _default: { + productImage: string; + color: null; + footer: null; + background: null; + vendorImage: string; + favIcon: string; + header: null; + title: string; + version: string; + timeout: number; +}; +export default _default; diff --git a/src/main/webapp/test/mock-api/platform.js b/src/main/webapp/test/mock-api/platform.js new file mode 100644 index 00000000000..da44d9503f0 --- /dev/null +++ b/src/main/webapp/test/mock-api/platform.js @@ -0,0 +1,13 @@ +export default { + productImage: 'iVBORw0KGgoAAAANSUhEUgAAAPgAAABtCAYAAACMeqz7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7J13gFXVtf8/a5/bZoZp1AGGpoACFmAoIhbsmlhSxMREDRZmwJaYmGpect+LJvk9X6LRpzADiIl5eQkkec9ozIspYjSxIIIoauhtGIbp/ZZz9vr9cYcyTLt3GEBxPv8M3HvOLvfedfbea6/9XUIffXyEufr/PZ2ZbrMKQumBPBEZ76mdZMQMFsekGSOOMUZAsNaq53quWttk0b0+46z33PjWxqbG3U5V41srH7qu5Xj3pSPkeDegjz6OJeFw2LyTfs7sfmnpl3ievTwUCowEyUEkIB3Zg+7/o4i0fVtVFWhR1bpYLL5J0GdqKuv/8rvvfWzdwTuPL30G3scJz6TwisDJZJyVnpk+F6ufbYm0DKisqBTP8xgxYgS5ubndlhGPxw/82xiDiGCtxefzHXjd8zysVRuJtGzyrPcbEe+/64Pepj/c/bHoUelYEvQZeB8nLJPnLc8x/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3qvnHBW8DI30keL89kns2n422GCxGnOtlW+KJ9IZ4Ir2hPci9j3SDYDVgmE7psNC3QWBUAR+B/SZ+qGTnhES6Np6o3ulMG83YAjQIG9ovFzmT8dosiA34g8EGYTflnG+Il6VfjjcNqzPTc0DEpLK6ZaU9tALl/T+BINwY0iX8WeX2gh0k9Lis76mSyrKyOcBWINEeyR2Il9VsBnsPowL4D8YvTzdmeG3tjLzPZlNgBzDNbm0quSVke6Xn7Il4d61gIWaHcb4D+UWuIz9DWAXYmq7RiLhGweOY39yZtqs6WSvnrwOW4vSZmfph2u5kpUFbx22FmGbhALT3TwPzDT2D7GmfyxT5fHBYWIU3/wK9DFPZbPRTocdN9lxnmjd7A9liM/1WpjuRGoEsUk0gm76zJvFU93rq03P25mXTBY8avIPpoMHD+Wx0usEzyNLKZLoWstjAtpUG94b39LQyRZFCP1/yUTfVsD8J7cOs2LCdiHszQf7aPat7uj7qhh96yMz/BLP1ZhJeb0l+Bt49IKxC3nq4Zb4OYYjj6A3hIR2/3wMYK7M+Mx2zpXJaGfHuBEDdE2W7nOlGzKoktQPn4/SynL9xV0nT3ZgtEKzJtDV36e4KojORPYbpWcHWz2MdrqN50J8xSpE2YzYYyXC2CLg68G4B8DfJjvTVdodtFVaRd75LOPL9i1qEVUi2rrdBdUdN4h2L5G5EVMpodTAEabs5f2td86CZZv4RQ8+6XD4kggRun7AK12tLW7t2rQdbLbGECy/sQamV7F1hFV7W5X/fVjmzJTag7efe3K+QnsM5BzqG2WI5/8O6qsQaeiFqkRdC2eARL9vfmT5o2CVHgEeFVXh4qne5N6vmftIvF7lJcknMXpEsZmgf2O+Bqbuqk52EGMznj4KWSbaOBx/sMVbFg6xDWIXM/tE9vX5leZNkdwurFIz+L20opVISaHYgAAAAAElFTkSuQmCC', + color: null, + footer: null, + background: null, + vendorImage: 'iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAgAElEQVR42uydd3gc1b33P2d2tqr3LtuyLNtyL+BKtSHUh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CqdMKNJq+Margrwlhqqq2mg0ZgAASEtLsiEiC7lHkokgKIxS4q5vtAebmjbt/8fLuw5VfvCNlN6y5ArXL2UAAPv3bOxkjJVOmbL2hXAktoZROo5SplcVxhARCEFklFE2JljOMxqKpORk+IoqFlX5O3u40ebWAY136NXPj7wzcLs8fmvNM7YBr3azP6x49KXtzS0DKwjhfpaTk5Yx7Pap3T1uZrMZwy6XwwQAQlvvSF3e/JnHh86cG4309VefOL618f/2c3rtrFr1u4q584o3WC3GSbt2HfeVluYpFRXl4y5caK/b+dGxlxzB/rptR7dH7tQe930BGhtrWzPSC0+mpTkau7uGWgjBllA4+uHefZXv7v7Xxrq6jvrE97H3H2pw81wEvFDFAAAAAElFTkSuQmCC', + header: null, + title: 'DDF', + version: '2.15.0-SNAPSHOT', + timeout: 15, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvdGVzdC9tb2NrLWFwaS9wbGF0Zm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFlO0lBQ2IsWUFBWSxFQUNWLDh5dkJBQTh5dkI7SUFDaHp2QixLQUFLLEVBQUUsSUFBSTtJQUNYLE1BQU0sRUFBRSxJQUFJO0lBQ1osVUFBVSxFQUFFLElBQUk7SUFDaEIsV0FBVyxFQUNULHN5NkJBQXN5NkI7SUFDeHk2QixPQUFPLEVBQ0wsOG1PQUE4bU87SUFDaG5PLE1BQU0sRUFBRSxJQUFJO0lBQ1osS0FBSyxFQUFFLEtBQUs7SUFDWixPQUFPLEVBQUUsaUJBQWlCO0lBQzFCLE9BQU8sRUFBRSxFQUFFO0NBQ1osQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IHtcbiAgcHJvZHVjdEltYWdlOl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6UFNDMCttcFRrYXU3dUdXZ2pCbGxBNCt1SGVmWlh2N3Y3WHhycTZqdnJFOTdIM0gycHc4MXdFdkZERkFBQUFBRWxGVGtTdVFtQ0MnLFxuICBoZWFkZXI6IG51bGwsXG4gIHRpdGxlOiAnRERGJyxcbiAgdmVyc2lvbjogJzIuMTUuMC1TTkFQU0hPVCcsXG4gIHRpbWVvdXQ6IDE1LFxufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/test/mock-api/sources.d.ts b/src/main/webapp/test/mock-api/sources.d.ts new file mode 100644 index 00000000000..d812a8132c2 --- /dev/null +++ b/src/main/webapp/test/mock-api/sources.d.ts @@ -0,0 +1,8 @@ +declare const _default: { + sourceActions: never[]; + available: boolean; + id: string; + contentTypes: never[]; + version: string; +}[]; +export default _default; diff --git a/src/main/webapp/test/mock-api/sources.js b/src/main/webapp/test/mock-api/sources.js new file mode 100644 index 00000000000..9a5f69ea3ff --- /dev/null +++ b/src/main/webapp/test/mock-api/sources.js @@ -0,0 +1,10 @@ +export default [ + { + sourceActions: [], + available: true, + id: 'ddf.distribution', + contentTypes: [], + version: '', + }, +]; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC90ZXN0L21vY2stYXBpL3NvdXJjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBZTtJQUNiO1FBQ0UsYUFBYSxFQUFFLEVBQUU7UUFDakIsU0FBUyxFQUFFLElBQUk7UUFDZixFQUFFLEVBQUUsa0JBQWtCO1FBQ3RCLFlBQVksRUFBRSxFQUFFO1FBQ2hCLE9BQU8sRUFBRSxFQUFFO0tBQ1o7Q0FDRixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgW1xuICB7XG4gICAgc291cmNlQWN0aW9uczogW10sXG4gICAgYXZhaWxhYmxlOiB0cnVlLFxuICAgIGlkOiAnZGRmLmRpc3RyaWJ1dGlvbicsXG4gICAgY29udGVudFR5cGVzOiBbXSxcbiAgICB2ZXJzaW9uOiAnJyxcbiAgfSxcbl1cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/test/setup/index.d.ts b/src/main/webapp/test/setup/index.d.ts new file mode 100644 index 00000000000..ab5505aa6f4 --- /dev/null +++ b/src/main/webapp/test/setup/index.d.ts @@ -0,0 +1 @@ +import '../../js/extensions/application.patches'; diff --git a/src/main/webapp/test/setup/index.js b/src/main/webapp/test/setup/index.js new file mode 100644 index 00000000000..928f39ae6d2 --- /dev/null +++ b/src/main/webapp/test/setup/index.js @@ -0,0 +1,4 @@ +// first file run in the test environment (setup proxies, mocks, etc) +// import '../../js/extensions/network.proxy' +import '../../js/extensions/application.patches'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvdGVzdC9zZXR1cC9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEscUVBQXFFO0FBRXJFLDZDQUE2QztBQUM3QyxPQUFPLHlDQUF5QyxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZmlyc3QgZmlsZSBydW4gaW4gdGhlIHRlc3QgZW52aXJvbm1lbnQgKHNldHVwIHByb3hpZXMsIG1vY2tzLCBldGMpXG5cbi8vIGltcG9ydCAnLi4vLi4vanMvZXh0ZW5zaW9ucy9uZXR3b3JrLnByb3h5J1xuaW1wb3J0ICcuLi8uLi9qcy9leHRlbnNpb25zL2FwcGxpY2F0aW9uLnBhdGNoZXMnXG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/typescript/classes.d.ts b/src/main/webapp/typescript/classes.d.ts new file mode 100644 index 00000000000..e28bc3cc4d2 --- /dev/null +++ b/src/main/webapp/typescript/classes.d.ts @@ -0,0 +1,10 @@ +/** + * Spread operator like so: + * { ...props } is seen as generating a class but it's a plain object. This prevents typescript from + * seeing spreading of a class as generating an instance of one. There might be a better solution than this, + * but this seems simple enough / not really intrusive. + * + */ +export declare class SpreadOperatorProtectedClass { + _DO_NOT_USE_SPREAD_OPERATOR(): void; +} diff --git a/src/main/webapp/typescript/classes.js b/src/main/webapp/typescript/classes.js new file mode 100644 index 00000000000..85d542284fc --- /dev/null +++ b/src/main/webapp/typescript/classes.js @@ -0,0 +1,15 @@ +/** + * Spread operator like so: + * { ...props } is seen as generating a class but it's a plain object. This prevents typescript from + * seeing spreading of a class as generating an instance of one. There might be a better solution than this, + * but this seems simple enough / not really intrusive. + * + */ +var SpreadOperatorProtectedClass = /** @class */ (function () { + function SpreadOperatorProtectedClass() { + } + SpreadOperatorProtectedClass.prototype._DO_NOT_USE_SPREAD_OPERATOR = function () { }; // literally to force spread operator to be seen as generating non compliant class + return SpreadOperatorProtectedClass; +}()); +export { SpreadOperatorProtectedClass }; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3Nlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYmFwcC90eXBlc2NyaXB0L2NsYXNzZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUNIO0lBQUE7SUFFQSxDQUFDO0lBREMsa0VBQTJCLEdBQTNCLGNBQStCLENBQUMsRUFBQyxrRkFBa0Y7SUFDckgsbUNBQUM7QUFBRCxDQUFDLEFBRkQsSUFFQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogIFNwcmVhZCBvcGVyYXRvciBsaWtlIHNvOlxuICogIHsgLi4ucHJvcHMgfSBpcyBzZWVuIGFzIGdlbmVyYXRpbmcgYSBjbGFzcyBidXQgaXQncyBhIHBsYWluIG9iamVjdC4gIFRoaXMgcHJldmVudHMgdHlwZXNjcmlwdCBmcm9tXG4gKiAgc2VlaW5nIHNwcmVhZGluZyBvZiBhIGNsYXNzIGFzIGdlbmVyYXRpbmcgYW4gaW5zdGFuY2Ugb2Ygb25lLiAgVGhlcmUgbWlnaHQgYmUgYSBiZXR0ZXIgc29sdXRpb24gdGhhbiB0aGlzLFxuICogIGJ1dCB0aGlzIHNlZW1zIHNpbXBsZSBlbm91Z2ggLyBub3QgcmVhbGx5IGludHJ1c2l2ZS5cbiAqXG4gKi9cbmV4cG9ydCBjbGFzcyBTcHJlYWRPcGVyYXRvclByb3RlY3RlZENsYXNzIHtcbiAgX0RPX05PVF9VU0VfU1BSRUFEX09QRVJBVE9SKCkge30gLy8gbGl0ZXJhbGx5IHRvIGZvcmNlIHNwcmVhZCBvcGVyYXRvciB0byBiZSBzZWVuIGFzIGdlbmVyYXRpbmcgbm9uIGNvbXBsaWFudCBjbGFzc1xufVxuIl19 \ No newline at end of file diff --git a/src/main/webapp/typescript/context.d.ts b/src/main/webapp/typescript/context.d.ts new file mode 100644 index 00000000000..89c3e098599 --- /dev/null +++ b/src/main/webapp/typescript/context.d.ts @@ -0,0 +1,2 @@ +import * as React from 'react'; +export declare function createCtx(defaults?: Partial): readonly [() => NonNullable, React.Provider]; diff --git a/src/main/webapp/typescript/context.js b/src/main/webapp/typescript/context.js new file mode 100644 index 00000000000..82737e85ff7 --- /dev/null +++ b/src/main/webapp/typescript/context.js @@ -0,0 +1,14 @@ +import * as React from 'react'; +// create context with no upfront defaultValue +// without having to do undefined check all the time +export function createCtx(defaults) { + var ctx = React.createContext(defaults); + function useCtx() { + var c = React.useContext(ctx); + if (!c) + throw new Error('useCtx must be inside a Provider with a value'); + return c; + } + return [useCtx, ctx.Provider]; // make TypeScript infer a tuple, not an array of union types +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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mRlZmluZWQpXG4gIGZ1bmN0aW9uIHVzZUN0eCgpIHtcbiAgICBjb25zdCBjID0gUmVhY3QudXNlQ29udGV4dChjdHgpXG4gICAgaWYgKCFjKSB0aHJvdyBuZXcgRXJyb3IoJ3VzZUN0eCBtdXN0IGJlIGluc2lkZSBhIFByb3ZpZGVyIHdpdGggYSB2YWx1ZScpXG4gICAgcmV0dXJuIGNcbiAgfVxuICByZXR1cm4gW3VzZUN0eCwgY3R4LlByb3ZpZGVyXSBhcyBjb25zdCAvLyBtYWtlIFR5cGVTY3JpcHQgaW5mZXIgYSB0dXBsZSwgbm90IGFuIGFycmF5IG9mIHVuaW9uIHR5cGVzXG59XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/typescript/hooks.d.ts b/src/main/webapp/typescript/hooks.d.ts new file mode 100644 index 00000000000..fedce874ca5 --- /dev/null +++ b/src/main/webapp/typescript/hooks.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +export type setType = (value: React.SetStateAction) => void; diff --git a/src/main/webapp/typescript/hooks.js b/src/main/webapp/typescript/hooks.js new file mode 100644 index 00000000000..2b3763cd7de --- /dev/null +++ b/src/main/webapp/typescript/hooks.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9va3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvdHlwZXNjcmlwdC9ob29rcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuXG5leHBvcnQgdHlwZSBzZXRUeXBlPFQ+ID0gKHZhbHVlOiBSZWFjdC5TZXRTdGF0ZUFjdGlvbjxUPikgPT4gdm9pZFxuIl19 \ No newline at end of file diff --git a/src/main/webapp/typescript/index.d.ts b/src/main/webapp/typescript/index.d.ts new file mode 100644 index 00000000000..1b98673070e --- /dev/null +++ b/src/main/webapp/typescript/index.d.ts @@ -0,0 +1,18 @@ +/// +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export { default as Omit } from './omit'; +export { default as Subtract } from './subtract'; +export type PermissiveComponentType = (() => JSX.Element) | React.ComponentType>; diff --git a/src/main/webapp/typescript/index.js b/src/main/webapp/typescript/index.js new file mode 100644 index 00000000000..89b17d182d7 --- /dev/null +++ b/src/main/webapp/typescript/index.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvdHlwZXNjcmlwdC9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250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vc3VidHJhY3QnXG5leHBvcnQgdHlwZSBQZXJtaXNzaXZlQ29tcG9uZW50VHlwZSA9XG4gIHwgKCgpID0+IEpTWC5FbGVtZW50KVxuICB8IFJlYWN0LkNvbXBvbmVudFR5cGU8UmVhY3QuUHJvcHNXaXRoQ2hpbGRyZW48YW55Pj5cbiJdfQ== \ No newline at end of file diff --git a/src/main/webapp/typescript/omit.d.ts b/src/main/webapp/typescript/omit.d.ts new file mode 100644 index 00000000000..319c0990720 --- /dev/null +++ b/src/main/webapp/typescript/omit.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +type Omit = Pick>; +export default Omit; diff --git a/src/main/webapp/typescript/omit.js b/src/main/webapp/typescript/omit.js new file mode 100644 index 00000000000..5b7c3abfcc8 --- /dev/null +++ b/src/main/webapp/typescript/omit.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib21pdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tYWluL3dlYm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udHlwZSBPbWl0PFQsIEs+ID0gUGljazxULCBFeGNsdWRlPGtleW9mIFQsIEs+PlxuXG5leHBvcnQgZGVmYXVsdCBPbWl0XG4iXX0= \ No newline at end of file diff --git a/src/main/webapp/typescript/subtract.d.ts b/src/main/webapp/typescript/subtract.d.ts new file mode 100644 index 00000000000..f117889f23a --- /dev/null +++ b/src/main/webapp/typescript/subtract.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import Omit from './omit'; +type Subtract = Omit; +export default Subtract; diff --git a/src/main/webapp/typescript/subtract.js b/src/main/webapp/typescript/subtract.js new file mode 100644 index 00000000000..cc6d27a9d1a --- /dev/null +++ b/src/main/webapp/typescript/subtract.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VidHJhY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbWFpbi93ZWJhcHAvdHlwZXNjcmlwdC9zdWJ0cmFjdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSBDb2RpY2UgRm91bmRhdGlvblxuICpcbiAqIFRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBMZXNzZXJcbiAqIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlXG4gKiBMaWNlbnNlLCBvciBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0XG4gKiBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlVcbiAqIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuIEEgY29weSBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXG4gKiBpcyBkaXN0cmlidXRlZCBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbSBhbmQgY2FuIGJlIGZvdW5kIGF0XG4gKiA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzL2xncGwuaHRtbD4uXG4gKlxuICoqL1xuaW1wb3J0IE9taXQgZnJvbSAnLi9vbWl0J1xudHlwZSBTdWJ0cmFjdDxULCBLPiA9IE9taXQ8VCwga2V5b2YgSz5cblxuZXhwb3J0IGRlZmF1bHQgU3VidHJhY3RcbiJdfQ== \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/tailwind.config.js b/tailwind.config.js similarity index 100% rename from ui-frontend/packages/catalog-ui-search/tailwind.config.js rename to tailwind.config.js diff --git a/ui-frontend/packages/catalog-ui-search/tsconfig.json b/tsconfig.json similarity index 100% rename from ui-frontend/packages/catalog-ui-search/tsconfig.json rename to tsconfig.json diff --git a/typings/globals/promise/index.d.d.ts b/typings/globals/promise/index.d.d.ts new file mode 100644 index 00000000000..c7ffae7de81 --- /dev/null +++ b/typings/globals/promise/index.d.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare var Promise: PromiseConstructor; diff --git a/typings/globals/promise/index.d.js b/typings/globals/promise/index.d.js new file mode 100644 index 00000000000..4ff64ff2875 --- /dev/null +++ b/typings/globals/promise/index.d.js @@ -0,0 +1 @@ +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3R5cGluZ3MvZ2xvYmFscy9wcm9taXNlL2luZGV4LmQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmRlY2xhcmUgdmFyIFByb21pc2U6IFByb21pc2VDb25zdHJ1Y3RvclxuIl19 \ No newline at end of file diff --git a/typings/globals/webworkers/index.d.d.ts b/typings/globals/webworkers/index.d.d.ts new file mode 100644 index 00000000000..5e0ddbd4372 --- /dev/null +++ b/typings/globals/webworkers/index.d.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +declare namespace NodeJS { + interface Global { + window: any; + } +} +declare function postMessage(message: any, transfer?: any[]): void; diff --git a/typings/globals/webworkers/index.d.js b/typings/globals/webworkers/index.d.js new file mode 100644 index 00000000000..ae2a047b348 --- /dev/null +++ b/typings/globals/webworkers/index.d.js @@ -0,0 +1 @@ +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3R5cGluZ3MvZ2xvYmFscy93ZWJ3b3JrZXJzL2luZGV4LmQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbmRlY2xhcmUgbmFtZXNwYWNlIE5vZGVKUyB7XG4gIGV4cG9ydCBpbnRlcmZhY2UgR2xvYmFsIHtcbiAgICB3aW5kb3c6IGFueVxuICB9XG59XG5kZWNsYXJlIGZ1bmN0aW9uIHBvc3RNZXNzYWdlKG1lc3NhZ2U6IGFueSwgdHJhbnNmZXI/OiBhbnlbXSk6IHZvaWQgLy9odHRwczovL3d3dy5hbnRvbm1hdGEubWUvMjAxNy8wNC8wNC93ZWItd29ya2Vycy12c2NvZGUtaW50ZWxsaXNlbnNlLmh0bWxcbiJdfQ== \ No newline at end of file diff --git a/typings/index.d.d.ts b/typings/index.d.d.ts new file mode 100644 index 00000000000..a45043dc3b3 --- /dev/null +++ b/typings/index.d.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +/// +declare module '*.svg' { + const content: any; + export default content; +} +declare module '!!raw-loader!*' { + const contents: string; + export = contents; +} diff --git a/typings/index.d.js b/typings/index.d.js new file mode 100644 index 00000000000..12eca520018 --- /dev/null +++ b/typings/index.d.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +/// +/// +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3R5cGluZ3MvaW5kZXguZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLHVEQUF1RDtBQUV2RCxvREFBb0QiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgQ29kaWNlIEZvdW5kYXRpb25cbiAqXG4gKiBUaGlzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgTGVzc2VyXG4gKiBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZVxuICogTGljZW5zZSwgb3IgYW55IGxhdGVyIHZlcnNpb24uXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dFxuICogZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VXG4gKiBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLiBBIGNvcHkgb2YgdGhlIEdOVSBMZXNzZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZVxuICogaXMgZGlzdHJpYnV0ZWQgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0gYW5kIGNhbiBiZSBmb3VuZCBhdFxuICogPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9sZ3BsLmh0bWw+LlxuICpcbiAqKi9cbi8vLyA8cmVmZXJlbmNlIHBhdGg9XCJnbG9iYWxzL3dlYndvcmtlcnMvaW5kZXguZC50c3hcIiAvPlxuXG4vLy8gPHJlZmVyZW5jZSBwYXRoPVwiZ2xvYmFscy9wcm9taXNlL2luZGV4LmQudHN4XCIgLz5cblxuZGVjbGFyZSBtb2R1bGUgJyouc3ZnJyB7XG4gIGNvbnN0IGNvbnRlbnQ6IGFueVxuICBleHBvcnQgZGVmYXVsdCBjb250ZW50XG59XG5cbmRlY2xhcmUgbW9kdWxlICchIXJhdy1sb2FkZXIhKicge1xuICBjb25zdCBjb250ZW50czogc3RyaW5nXG4gIGV4cG9ydCA9IGNvbnRlbnRzXG59XG4iXX0= \ No newline at end of file diff --git a/typings/styled-components/index.d.d.ts b/typings/styled-components/index.d.d.ts new file mode 100644 index 00000000000..afbddfb8464 --- /dev/null +++ b/typings/styled-components/index.d.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +import 'styled-components'; +import { ThemeInterface } from '../../src/main/webapp/react-component/styles/styled-components'; +declare module 'styled-components' { + interface DefaultTheme extends ThemeInterface { + } + function keyframes(strings: TemplateStringsArray, ...interpolations: FlattenInterpolation>[]): Keyframes; +} diff --git a/typings/styled-components/index.d.js b/typings/styled-components/index.d.js new file mode 100644 index 00000000000..9ac006fbe9e --- /dev/null +++ b/typings/styled-components/index.d.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) Codice Foundation + * + * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser + * General Public License as published by the Free Software Foundation, either version 3 of the + * License, or any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. A copy of the GNU Lesser General Public License + * is distributed along with this program and can be found at + * . + * + **/ +// import original module declarations +import 'styled-components'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3R5cGluZ3Mvc3R5bGVkLWNvbXBvbmVudHMvaW5kZXguZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7SUFhSTtBQUNKLHNDQUFzQztBQUN0QyxPQUFPLG1CQUFtQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIENvZGljZSBGb3VuZGF0aW9uXG4gKlxuICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlclxuICogR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaX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lIHt9XG5cbiAgZXhwb3J0IGZ1bmN0aW9uIGtleWZyYW1lcyhcbiAgICBzdHJpbmdzOiBUZW1wbGF0ZVN0cmluZ3NBcnJheSxcbiAgICAuLi5pbnRlcnBvbGF0aW9uczogRmxhdHRlbkludGVycG9sYXRpb248VGhlbWVQcm9wczxUaGVtZUludGVyZmFjZT4+W11cbiAgKTogS2V5ZnJhbWVzXG59XG4iXX0= \ No newline at end of file diff --git a/ui-backend/audit/audit-api/pom.xml b/ui-backend/audit/audit-api/pom.xml deleted file mode 100644 index 0cf5f59b9aa..00000000000 --- a/ui-backend/audit/audit-api/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - 4.0.0 - - audit - org.codice.ddf.search - 5.1.51-SNAPSHOT - - - bundle - audit-api - DDF :: Catalog :: UI :: Audit :: Audit API - - - - ddf.catalog.core - catalog-core-api - ${ddf.version} - - - ddf.security.core - security-core-impl - ${ddf.version} - - - com.google.code.gson - gson - ${gson.version} - - - - - - - org.apache.felix - maven-bundle-plugin - - - - org.codice.ddf.catalog.audit.api - - ${project.artifactId} - - - - - - \ No newline at end of file diff --git a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditException.java b/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditException.java deleted file mode 100644 index a4c87c9a164..00000000000 --- a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditException.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codice.ddf.catalog.audit.api; - -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -public class AuditException extends Exception { - - public AuditException(String message) { - super(message); - } - - public AuditException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditItemBasic.java b/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditItemBasic.java deleted file mode 100644 index 0a34c473912..00000000000 --- a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditItemBasic.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.api; - -import com.google.common.annotations.VisibleForTesting; -import com.google.gson.annotations.SerializedName; - -public class AuditItemBasic { - @SerializedName("id") - private String id; - - @SerializedName("source-id") - private String sourceId; - - private AuditItemBasic() { - // Implementation not needed - } - - @VisibleForTesting - public AuditItemBasic(String id, String sourceId) { - this.id = id; - this.sourceId = sourceId; - } - - public String getId() { - return id; - } - - public String getSourceId() { - return sourceId; - } -} diff --git a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditItemRequestBasic.java b/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditItemRequestBasic.java deleted file mode 100644 index c18cfe5a0a6..00000000000 --- a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditItemRequestBasic.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.api; - -import com.google.gson.annotations.SerializedName; -import java.util.List; - -public class AuditItemRequestBasic { - - @SerializedName("action") - private String action; - - @SerializedName("component") - private String component; - - @SerializedName("items") - private List items; - - private AuditItemRequestBasic() { - // implementation not needed - } - - public String getAction() { - return action; - } - - public String getComponent() { - return component; - } - - public List getItems() { - return items; - } -} diff --git a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditRequestBasic.java b/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditRequestBasic.java deleted file mode 100644 index 04f3606aed8..00000000000 --- a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditRequestBasic.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.api; - -import com.google.gson.annotations.SerializedName; -import java.util.Set; - -public class AuditRequestBasic { - - @SerializedName("action") - private String action; - - @SerializedName("component") - private String component; - - @SerializedName("ids") - private Set ids; - - public AuditRequestBasic() { - // implementation not needed - } - - public AuditRequestBasic(Set ids, String component, String action) { - this.ids = ids; - this.component = component; - this.action = action; - } - - public String getAction() { - return action; - } - - public String getComponent() { - return component; - } - - public Set getIds() { - return ids; - } -} diff --git a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditService.java b/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditService.java deleted file mode 100644 index 0ee1560d329..00000000000 --- a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/AuditService.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codice.ddf.catalog.audit.api; -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ - -import java.util.List; - -/** - * This interface represents a service that will be used to log an event that occurred from a - * particular user or a set or users. - */ -public interface AuditService { - /** - * @param action past tense verb defining the user interaction such as 'clicked' or 'viewed' - * @param component the UI object that caused the event - * @param ids the set of metacard id of the object - */ - void log(String action, String component, String... ids) throws AuditException; - - /** - * @param action past tense verb defining the user interaction such as 'clicked' or 'viewed' - * @param component the UI object that caused the event - * @param items List of objects to log - */ - void log(String action, String component, List items) throws AuditException; - - /** - * @param action future tense verb defining the user interaction such as 'will click' or 'will - * view' - * @param component the UI object that will cause the event - */ - void log(String action, String component) throws AuditException; - - /** - * @param action past tense verb defining the user interaction such as 'clicked' or 'viewed' - * @param component the UI object that caused the event - * @param cause the reason the interaction failed - */ - void logError(String action, String component, Throwable cause) throws AuditException; -} diff --git a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/SimpleAuditRequestBasic.java b/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/SimpleAuditRequestBasic.java deleted file mode 100644 index 1e13ea421d4..00000000000 --- a/ui-backend/audit/audit-api/src/main/java/org/codice/ddf/catalog/audit/api/SimpleAuditRequestBasic.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.api; - -import com.google.gson.annotations.SerializedName; - -public class SimpleAuditRequestBasic { - - @SerializedName("action") - private String action; - - @SerializedName("component") - private String component; - - private SimpleAuditRequestBasic() { - // implementation not needed - } - - public String getAction() { - return action; - } - - public String getComponent() { - return component; - } -} diff --git a/ui-backend/audit/audit-application/pom.xml b/ui-backend/audit/audit-application/pom.xml deleted file mode 100644 index 4aa530f8528..00000000000 --- a/ui-backend/audit/audit-application/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - 4.0.0 - - audit - org.codice.ddf.search - 5.1.51-SNAPSHOT - - - bundle - audit-application - DDF :: Catalog :: UI :: Audit :: Audit Application - - - - ddf.catalog.core - catalog-core-api - ${ddf.version} - - - ddf.security.core - security-core-impl - ${ddf.version} - - - org.codice.ddf.search - audit-api - ${project.version} - - - org.codice.ddf.search - javalin-utils - ${project.version} - - - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId} - - guava, - error_prone_annotations - - - org.codice.ddf.catalog.javalin.utils - - - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven-jar-plugin.version} - - - - test-jar - - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.00 - - - BRANCH - COVEREDRATIO - 0.00 - - - COMPLEXITY - COVEREDRATIO - 0.00 - - - - - - - - - - - - diff --git a/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/AuditApplication.java b/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/AuditApplication.java deleted file mode 100644 index 4e89da7e6a9..00000000000 --- a/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/AuditApplication.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.application; - -import io.javalin.Javalin; -import io.javalin.http.Handler; -import io.javalin.http.JavalinServlet; -import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.codice.ddf.catalog.javalin.utils.JavalinUtils; -import org.jetbrains.annotations.NotNull; - -@WebServlet( - urlPatterns = {AuditApplication.LOOKUP_PATH + "/*"}, - name = "AuditApplication" -) -public class AuditApplication extends HttpServlet { - - static final String LOOKUP_PATH = "/search/catalog/internal/audit"; - - private final Javalin javalin = JavalinUtils.create(LOOKUP_PATH); - - private final JavalinServlet servlet; - - public AuditApplication(Handler auditHandler, Handler simpleAuditHandler) { - JavalinUtils.initializeStandardExceptionHandlers(javalin); - javalin.post(LOOKUP_PATH + "/", auditHandler); - javalin.post(LOOKUP_PATH + "/simple", simpleAuditHandler); - servlet = javalin.servlet(); - } - - @Override - public void service(@NotNull HttpServletRequest req, @NotNull HttpServletResponse resp) - throws ServletException, IOException { - servlet.service(req, resp); - } -} diff --git a/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/AuditHandler.java b/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/AuditHandler.java deleted file mode 100644 index 72501ef0b2d..00000000000 --- a/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/AuditHandler.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.application; - -import io.javalin.http.Context; -import io.javalin.http.Handler; -import java.util.List; -import org.apache.http.HttpStatus; -import org.codice.ddf.catalog.audit.api.AuditException; -import org.codice.ddf.catalog.audit.api.AuditItemBasic; -import org.codice.ddf.catalog.audit.api.AuditItemRequestBasic; -import org.codice.ddf.catalog.audit.api.AuditService; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AuditHandler implements Handler { - - private static final Logger LOGGER = LoggerFactory.getLogger(AuditHandler.class); - - private final AuditService auditService; - - public AuditHandler(AuditService auditService) { - this.auditService = auditService; - } - - @Override - public void handle(@NotNull Context context) throws AuditException { - AuditItemRequestBasic requestBasic = context.bodyAsClass(AuditItemRequestBasic.class); - - try { - List items = requestBasic.getItems(); - auditService.log(requestBasic.getAction(), requestBasic.getComponent(), items); - context.status(HttpStatus.SC_OK); - } catch (AuditException e) { - LOGGER.error( - "Unable to log the user's action. Error message: {}", e.getLocalizedMessage(), e); - context.status(HttpStatus.SC_INTERNAL_SERVER_ERROR); - } - } -} diff --git a/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/SimpleAuditHandler.java b/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/SimpleAuditHandler.java deleted file mode 100644 index 633e43231c5..00000000000 --- a/ui-backend/audit/audit-application/src/main/java/org/codice/ddf/catalog/audit/application/SimpleAuditHandler.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.application; - -import io.javalin.http.Context; -import io.javalin.http.Handler; -import org.apache.http.HttpStatus; -import org.codice.ddf.catalog.audit.api.AuditException; -import org.codice.ddf.catalog.audit.api.AuditRequestBasic; -import org.codice.ddf.catalog.audit.api.AuditService; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SimpleAuditHandler implements Handler { - - private static final Logger LOGGER = LoggerFactory.getLogger(SimpleAuditHandler.class); - - private final AuditService auditService; - - public SimpleAuditHandler(AuditService auditService) { - this.auditService = auditService; - } - - @Override - public void handle(@NotNull Context context) { - AuditRequestBasic requestBasic = context.bodyAsClass(AuditRequestBasic.class); - - try { - auditService.log(requestBasic.getAction(), requestBasic.getComponent()); - context.status(HttpStatus.SC_OK); - } catch (AuditException e) { - LOGGER.error( - "Unable to log the user's action. Error message: {}", e.getLocalizedMessage(), e); - context.status(HttpStatus.SC_INTERNAL_SERVER_ERROR); - } - } -} diff --git a/ui-backend/audit/audit-application/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/ui-backend/audit/audit-application/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index ac304c7cc55..00000000000 --- a/ui-backend/audit/audit-application/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/audit/audit-logging/pom.xml b/ui-backend/audit/audit-logging/pom.xml deleted file mode 100644 index 56490279ce3..00000000000 --- a/ui-backend/audit/audit-logging/pom.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - 4.0.0 - - audit - org.codice.ddf.search - 5.1.51-SNAPSHOT - - - bundle - audit-logging - DDF :: Catalog :: UI :: Audit :: Audit Logging - - - - org.codice.ddf.search - audit-api - ${project.version} - - - ddf.lib - gson-support - ${ddf.version} - - - ddf.catalog.core - catalog-core-api-impl - ${ddf.version} - - - - - - - org.apache.felix - maven-bundle-plugin - - - - gson-support, - catalog-core-api-impl, - - - !com.fasterxml.jackson.*, - !io.swagger.annotations*, - !org.glassfish.jersey.*, - * - - ${project.artifactId} - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 1.00 - - - BRANCH - COVEREDRATIO - 0.97 - - - COMPLEXITY - COVEREDRATIO - 0.96 - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/audit/audit-logging/src/main/java/org/codice/ddf/catalog/audit/logging/AuditLogger.java b/ui-backend/audit/audit-logging/src/main/java/org/codice/ddf/catalog/audit/logging/AuditLogger.java deleted file mode 100644 index e870b5c00b8..00000000000 --- a/ui-backend/audit/audit-logging/src/main/java/org/codice/ddf/catalog/audit/logging/AuditLogger.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.logging; - -import ddf.security.audit.SecurityLogger; -import java.util.List; -import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; -import org.codice.ddf.catalog.audit.api.AuditException; -import org.codice.ddf.catalog.audit.api.AuditItemBasic; -import org.codice.ddf.catalog.audit.api.AuditService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AuditLogger implements AuditService { - - private static final Logger LOGGER = LoggerFactory.getLogger(AuditLogger.class); - private final SecurityLogger securityLogger; - private static final String INVALID_PARAM_MSG = - "Invalid parameters: Parameters should not be null nor empty."; - - public AuditLogger(SecurityLogger securityLogger) { - this.securityLogger = securityLogger; - } - - @Override - public void log(String action, String component, String... ids) throws AuditException { - if (!isValidStrings(action) || !isValidStrings(component) || !isValidStrings(ids)) { - LOGGER.trace( - "Invalid parameters, request: action {}, component {}, ids {}.", action, component, ids); - throw new AuditException(INVALID_PARAM_MSG); - } - - for (String id : ids) { - securityLogger.audit("{} a {} with id {}", action, component, id); - } - } - - @Override - public void log(String action, String component, List items) - throws AuditException { - if (!isValidStrings(action) || !isValidStrings(component) || !isValidItems(items)) { - List ids = items.stream().map(AuditItemBasic::getId).collect(Collectors.toList()); - LOGGER.trace( - "Invalid parameters, request: action {}, component {}, ids {}.", action, component, ids); - throw new AuditException(INVALID_PARAM_MSG); - } - - for (AuditItemBasic item : items) { - securityLogger.audit( - "{} a {} with id {} and source {}", action, component, item.getId(), item.getSourceId()); - } - } - - @Override - public void log(String action, String component) throws AuditException { - if (!isValidStrings(action) || !isValidStrings(component)) { - LOGGER.trace("Invalid parameters, request: action {}, component {}.", action, component); - throw new AuditException(INVALID_PARAM_MSG); - } - - securityLogger.audit("{} a {}", action, component); - } - - @Override - public void logError(String action, String component, Throwable cause) throws AuditException { - if (!isValidStrings(action) || !isValidStrings(component)) { - LOGGER.trace("Invalid parameters, request: action {}, component {}.", action, component); - throw new AuditException(INVALID_PARAM_MSG); - } - if (!isValidObjects(cause)) { - LOGGER.trace("Invalid parameter, cause {}.", cause); - throw new AuditException(INVALID_PARAM_MSG); - } - - securityLogger.audit("{} a {} with error {}", action, component, cause); - } - - private boolean isValidObjects(Object... params) { - for (Object param : params) { - if (param == null) { - return false; - } - } - return true; - } - - private boolean isValidStrings(String... params) { - for (String param : params) { - if (StringUtils.isBlank(param) || param == null) { - return false; - } - } - return true; - } - - private boolean isValidItems(List items) { - for (AuditItemBasic item : items) { - if (StringUtils.isBlank(item.getId()) || StringUtils.isBlank(item.getSourceId())) { - return false; - } - } - return true; - } -} diff --git a/ui-backend/audit/audit-logging/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/ui-backend/audit/audit-logging/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 0e5b2b3057f..00000000000 --- a/ui-backend/audit/audit-logging/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/audit/audit-logging/src/test/java/org/codice/ddf/catalog/audit/logging/AuditLoggerTest.java b/ui-backend/audit/audit-logging/src/test/java/org/codice/ddf/catalog/audit/logging/AuditLoggerTest.java deleted file mode 100644 index 876c5995773..00000000000 --- a/ui-backend/audit/audit-logging/src/test/java/org/codice/ddf/catalog/audit/logging/AuditLoggerTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.audit.logging; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.verify; - -import com.google.common.collect.ImmutableList; -import ddf.security.audit.SecurityLogger; -import java.util.Arrays; -import org.codice.ddf.catalog.audit.api.AuditException; -import org.codice.ddf.catalog.audit.api.AuditItemBasic; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.ArgumentMatchers; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; - -@RunWith(MockitoJUnitRunner.class) -public class AuditLoggerTest { - - private final String ACTION = "action"; - private final String COMPONENT = "component"; - private final String ID_1 = "id1"; - private final String ID_2 = "id2"; - private final String EXCEPTION = "exception"; - private final String[] IDS = Arrays.asList(ID_1, ID_2).toArray(new String[0]); - private final AuditItemBasic validItem = new AuditItemBasic("id", "sourceId"); - private final AuditItemBasic emptyIdItem = new AuditItemBasic("", "sourceId"); - private final AuditItemBasic emptySourceItem = new AuditItemBasic("id", ""); - private final AuditItemBasic nullIdItem = new AuditItemBasic(null, "sourceId"); - private final AuditItemBasic nullSourceItem = new AuditItemBasic("id", null); - - private Throwable cause; - - private AuditLogger auditLogger; - @Mock private SecurityLogger securityLogger; - - @Before - public void setup() { - auditLogger = new AuditLogger(securityLogger); - cause = new Throwable(); - } - - @Test - public void testAuditLogWithItem() throws AuditException { - auditLogger.log(ACTION, COMPONENT, ImmutableList.of(validItem)); - verify(securityLogger, Mockito.times(1)) - .audit(any(String.class), ArgumentMatchers.any()); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithEmptyIdItem() throws AuditException { - auditLogger.log(ACTION, COMPONENT, ImmutableList.of(emptyIdItem)); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithEmptySourceItem() throws AuditException { - auditLogger.log(ACTION, COMPONENT, ImmutableList.of(emptySourceItem)); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNullIdItem() throws AuditException { - auditLogger.log(ACTION, COMPONENT, ImmutableList.of(nullIdItem)); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNullSourceItem() throws AuditException { - auditLogger.log(ACTION, COMPONENT, ImmutableList.of(nullSourceItem)); - } - - @Test(expected = AuditException.class) - public void testAuditLogItemWithEmptyAction() throws AuditException { - auditLogger.log("", COMPONENT, ImmutableList.of(validItem)); - } - - @Test(expected = AuditException.class) - public void testAuditLogItemWithNullAction() throws AuditException { - auditLogger.log(null, COMPONENT, ImmutableList.of(validItem)); - } - - @Test(expected = AuditException.class) - public void testAuditLogItemWithEmptyComponent() throws AuditException { - auditLogger.log(ACTION, "", ImmutableList.of(validItem)); - } - - @Test(expected = AuditException.class) - public void testAuditLogItemWithNullComponent() throws AuditException { - auditLogger.log("", null, ImmutableList.of(validItem)); - } - - @Test - public void testAuditLogWithId() throws AuditException { - auditLogger.log(ACTION, COMPONENT, ID_1); - verify(securityLogger, Mockito.times(1)) - .audit(any(String.class), ArgumentMatchers.any()); - } - - @Test - public void testAuditLogWithIds() throws AuditException { - auditLogger.log(ACTION, COMPONENT, IDS); - verify(securityLogger, Mockito.times(2)) - .audit(any(String.class), ArgumentMatchers.any()); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNullAction() throws AuditException { - auditLogger.log(null, COMPONENT, IDS); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNullComponent() throws AuditException { - auditLogger.log(ACTION, null, IDS); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNullId() throws AuditException { - auditLogger.log(ACTION, COMPONENT, Arrays.asList(ID_1, null).toArray(new String[0])); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithEmptyAction() throws AuditException { - auditLogger.log("", COMPONENT, IDS); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithEmptyComponent() throws AuditException { - auditLogger.log(ACTION, "", IDS); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithEmptyId() throws AuditException { - auditLogger.log(ACTION, COMPONENT, ""); - } - - @Test - public void testAuditLogWithNoIds() throws AuditException { - auditLogger.log(ACTION, COMPONENT); - verify(securityLogger, Mockito.times(1)) - .audit(any(String.class), ArgumentMatchers.any()); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNoIdsNullAction() throws AuditException { - auditLogger.log(null, COMPONENT); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNoIdsNullComponent() throws AuditException { - auditLogger.log(ACTION, null); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNoIdsEmptyAction() throws AuditException { - auditLogger.log("", COMPONENT); - } - - @Test(expected = AuditException.class) - public void testAuditLogWithNoIdsEmptyComponent() throws AuditException { - auditLogger.log(ACTION, ""); - } - - @Test - public void testAuditLogError() throws AuditException { - auditLogger.logError(ACTION, COMPONENT, new AuditException(EXCEPTION)); - verify(securityLogger, Mockito.times(1)) - .audit(any(String.class), ArgumentMatchers.any()); - } - - @Test(expected = AuditException.class) - public void testAuditLogErrorWithNullAction() throws AuditException { - auditLogger.logError(null, COMPONENT, new AuditException(EXCEPTION)); - } - - @Test(expected = AuditException.class) - public void testAuditLogErrorWithNullComponent() throws AuditException { - auditLogger.logError(ACTION, null, new AuditException(EXCEPTION)); - } - - @Test(expected = AuditException.class) - public void testAuditLogErrorWithNullThrowable() throws AuditException { - auditLogger.logError(ACTION, COMPONENT, null); - } - - @Test(expected = AuditException.class) - public void testAuditLogErrorWithEmptyAction() throws AuditException { - auditLogger.logError("", COMPONENT, new AuditException(EXCEPTION)); - } - - @Test(expected = AuditException.class) - public void testAuditLogErrorWithEmptyComponent() throws AuditException { - auditLogger.logError(ACTION, "", new AuditException(EXCEPTION)); - } -} diff --git a/ui-backend/audit/pom.xml b/ui-backend/audit/pom.xml deleted file mode 100644 index a7e4e2833e6..00000000000 --- a/ui-backend/audit/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - 4.0.0 - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - - pom - audit - 5.1.51-SNAPSHOT - DDF :: Catalog :: UI :: Audit - - - audit-api - audit-application - audit-logging - - \ No newline at end of file diff --git a/ui-backend/boolean-search/boolean-search-application/jjdoc/Parser.txt b/ui-backend/boolean-search/boolean-search-application/jjdoc/Parser.txt deleted file mode 100644 index 05094ea8361..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/jjdoc/Parser.txt +++ /dev/null @@ -1,35 +0,0 @@ - -DOCUMENT START -TOKENS - SKIP : { -" " -| "\t" -| "\r" -} - -<*> TOKEN : { - -} - - TOKEN : { - -| -| -| -| -} - - TOKEN : { - -| -} - -NON-TERMINALS - SearchExpression := TextSearchExpression - TextSearchExpression := TextSearchComponent ( ( | ) TextSearchExpression )? - TextSearchComponent := ( QuotedSearchPhrase | WordSequence )+ - | ( )? TextSearchExpression - QuotedSearchPhrase := - WordSequence := ( )+ - -DOCUMENT END diff --git a/ui-backend/boolean-search/boolean-search-application/pom.xml b/ui-backend/boolean-search/boolean-search-application/pom.xml deleted file mode 100644 index b3f74e21df9..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - 4.0.0 - - boolean-search - org.codice.ddf.search - 5.1.51-SNAPSHOT - - - bundle - boolean-search-application - DDF :: Catalog :: Boolean Search :: Application - - - - ddf.catalog.core - catalog-core-api - ${ddf.version} - - - ddf.security.core - security-core-impl - ${ddf.version} - - - org.codice.ddf.search - javalin-utils - ${project.version} - - - - - - - org.codehaus.mojo - javacc-maven-plugin - 2.6 - - - javacc - - javacc - - - - jjdoc - generate-resources - - jjdoc - - - ${basedir} - true - - - - - - net.java.dev.javacc - javacc - 7.0.12 - - - - - org.apache.felix - maven-bundle-plugin - - - - javalin-utils;scope=!test, - - ${project.artifactId} - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - - org/codice/ddf/catalog/search/javacc/**/* - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.48 - - - BRANCH - COVEREDRATIO - 0.50 - - - COMPLEXITY - COVEREDRATIO - 0.51 - - - - - - - - - - - - diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/application/BooleanSearchApplication.java b/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/application/BooleanSearchApplication.java deleted file mode 100644 index ed50832d7b4..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/application/BooleanSearchApplication.java +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.application; - -import io.javalin.Javalin; -import io.javalin.http.JavalinServlet; -import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.validation.constraints.NotNull; -import org.codice.ddf.catalog.javalin.utils.JavalinUtils; -import org.codice.ddf.catalog.search.handlers.QueryHandler; -import org.codice.ddf.catalog.search.handlers.SuggestionHandler; - -@WebServlet( - urlPatterns = {BooleanSearchApplication.BOOLEAN_SEARCH_PATH + "/*"}, - name = "BooleanSearchApplication" -) -public class BooleanSearchApplication extends HttpServlet { - - static final String BOOLEAN_SEARCH_PATH = "/search/catalog/internal/boolean-search"; - - private final Javalin javalin = JavalinUtils.create(BOOLEAN_SEARCH_PATH); - - private final JavalinServlet servlet; - - public BooleanSearchApplication() { - JavalinUtils.initializeStandardExceptionHandlers(javalin); - - javalin.get(BOOLEAN_SEARCH_PATH + "/cql", new QueryHandler()); - javalin.get(BOOLEAN_SEARCH_PATH + "/suggest", new SuggestionHandler()); - servlet = javalin.servlet(); - } - - @Override - public void service(@NotNull HttpServletRequest req, @NotNull HttpServletResponse resp) - throws ServletException, IOException { - servlet.service(req, resp); - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/handlers/QueryHandler.java b/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/handlers/QueryHandler.java deleted file mode 100644 index 1ac5127f7b2..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/handlers/QueryHandler.java +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.handlers; - -import static java.util.Collections.singletonMap; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import io.javalin.http.Context; -import io.javalin.http.Handler; -import java.io.StringReader; -import java.util.HashMap; -import java.util.Map; -import org.codice.ddf.catalog.search.javacc.CustomParseException; -import org.codice.ddf.catalog.search.javacc.ParseException; -import org.codice.ddf.catalog.search.javacc.Parser; -import org.codice.ddf.catalog.search.javacc.TokenMgrError; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class QueryHandler implements Handler { - - private static final Logger LOGGER = LoggerFactory.getLogger(QueryHandler.class); - - private static final Gson GSON = new GsonBuilder().disableHtmlEscaping().create(); - - public QueryHandler() { - // implementation not needed - } - - public static String formatSearchProperty(String str) { - String escapedSymbols = str.replaceAll("[^\\p{L}\\p{Nd}]+", "\\\\$0"); - return "\"" + escapedSymbols + "\""; - } - - @Override - public void handle(@NotNull final Context ctx) { - final String searchExpression = ctx.queryParam("q"); - final String searchProperty = ctx.queryParam("e"); - final Parser parser; - - if (searchProperty == null) { - parser = new Parser(new StringReader(searchExpression)); - } else { - parser = new Parser(new StringReader(searchExpression), formatSearchProperty(searchProperty)); - } - - try { - final String query = parser.SearchExpression(); - final Map response = new HashMap<>(); - response.put("cql", query); - - LOGGER.debug("CQL JSON: {}", query); - - ctx.contentType("application/json"); - ctx.result(GSON.toJson(response)); - } catch (ParseException | TokenMgrError e) { - LOGGER.debug("Error parsing expression '{}'", searchExpression, e); - ctx.status(400); - ctx.json(singletonMap("error", true)); - } catch (CustomParseException e) { - LOGGER.debug("Error parsing expression '{}'", searchExpression, e); - ctx.status(400); - final Map json = new HashMap<>(); - json.put("error", true); - json.put("errorMessage", e.getMessage()); - ctx.json(json); - } - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/handlers/SuggestionHandler.java b/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/handlers/SuggestionHandler.java deleted file mode 100644 index e61709c89d5..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/handlers/SuggestionHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.handlers; - -import io.javalin.http.Context; -import io.javalin.http.Handler; -import java.util.Map; -import org.codice.ddf.catalog.search.suggest.Suggester; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SuggestionHandler implements Handler { - - private static final Logger LOGGER = LoggerFactory.getLogger(SuggestionHandler.class); - - public SuggestionHandler() { - // implementation not needed - } - - @Override - public void handle(@NotNull final Context ctx) { - final String searchExpression = ctx.queryParam("q"); - final Suggester suggester = new Suggester(searchExpression); - final Map suggestions = suggester.getSuggestions(); - LOGGER.debug("Suggestions for search expression: '{}'", suggestions); - ctx.json(suggestions); - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/javacc/CustomParseException.java b/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/javacc/CustomParseException.java deleted file mode 100644 index 0ba37dc7e33..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/javacc/CustomParseException.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.javacc; - -/** - * An exception intended to be thrown by the generated JavaCC parser to indicate an error message - * suitable for displaying to a user. We want to use our own exception class, rather than JavaCC's - * ParseException, so we can easily distinguish between our exceptions, with 'nice' messages, and - * JavaCC's, with messages that users wouldn't understand, by catching a different exception instead - * of parsing the exception message. - */ -public class CustomParseException extends Exception { - public CustomParseException(String message) { - super(message); - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/models/BooleanTextFilter.java b/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/models/BooleanTextFilter.java deleted file mode 100644 index 5b18bcaf9b1..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/models/BooleanTextFilter.java +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.models; - -import java.util.List; -import java.util.stream.Collectors; - -public class BooleanTextFilter { - - private String property; - - private String type; - - private String value; - - public BooleanTextFilter(String property, String type, String value) { - this.property = property; - this.type = type; - this.value = value; - } - - public BooleanTextFilter(final String value) { - this("ILIKE", "anyText", value); - } - - public BooleanTextFilter(String property, String value) { - this("ILIKE", property, value); - } - - public String getProperty() { - return property; - } - - public void setProperty(String property) { - this.property = property; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public String toString() { // ("anyText" ILIKE 'a1') - return "(" + type + " " + property + " " + "'" + value + "'" + ")"; - } - - public static String implicitOr(List filters) { - return filters.stream().map(BooleanTextFilter::toString).collect(Collectors.joining(" OR ")); - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/suggest/Suggester.java b/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/suggest/Suggester.java deleted file mode 100644 index f4c6a8999f4..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/java/org/codice/ddf/catalog/search/suggest/Suggester.java +++ /dev/null @@ -1,201 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.suggest; - -import static java.util.Collections.emptyMap; -import static java.util.Collections.singletonMap; -import static java.util.stream.Collectors.groupingBy; -import static java.util.stream.Collectors.joining; -import static java.util.stream.Collectors.toMap; - -import com.google.common.collect.ImmutableMap; -import java.io.StringReader; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.codice.ddf.catalog.search.javacc.CustomParseException; -import org.codice.ddf.catalog.search.javacc.ParseException; -import org.codice.ddf.catalog.search.javacc.Parser; -import org.codice.ddf.catalog.search.javacc.TokenMgrError; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Suggester { - - private static final Logger LOGGER = LoggerFactory.getLogger(Suggester.class); - - private static final Pattern CHARS_TO_REMOVE = Pattern.compile("[<>\"]"); - - private static final Pattern CHARS_TO_REPLACE_WITH_SPACE = Pattern.compile("_"); - - private static final Pattern TOKEN_MGR_ERROR_COLUMN = Pattern.compile("column (?\\d+)"); - - static final String UNCATEGORIZED = "mandatory"; - - private static final String LOGICAL = "logical"; - - private static final String ARBITRARY_TEXT = "arbitrary text"; - - private static final Map KEYWORDS_TO_CATEGORIES = - ImmutableMap.builder() - .put("and", LOGICAL) - .put("or", LOGICAL) - .put("not", LOGICAL) - .build(); - - private final String originalSearchExpression; - - public Suggester(final String originalSearchExpression) { - this.originalSearchExpression = originalSearchExpression; - } - - public Map getSuggestions() { - if (originalSearchExpression.trim().isEmpty()) { - return emptyMap(); - } - - if (!originalSearchExpression.contains(" ")) { - try { - parse("\n"); - } catch (ParseException e) { - return responsePayload(getCategorizedSuggestionsForFirstWord(e)); - } catch (TokenMgrError e) { - LOGGER.warn("There was an issue parsing the search expression.", e); - return emptyMap(); - } catch (CustomParseException e) { - // This case should not happen, since parsing "\n" should throw a ParseException. - // CustomParseException is handled separately from ParseException because - // CustomParseException is not intended to be - // used for suggestions at this time. - LOGGER.debug("This case shouldn't happen.", e); - } - } - - try { - parse(originalSearchExpression); - } catch (ParseException e) { - final int errorIndex = e.currentToken.next.beginColumn; - LOGGER.debug( - "Error in original input at index {} (char: '{}').", - errorIndex, - originalSearchExpression.charAt(errorIndex - 1), - e); - return responsePayload(getCategorizedSuggestions(e), errorIndex); - } catch (TokenMgrError e) { - final int errorIndex = getErrorIndex(e, originalSearchExpression.length()); - final int lastSpaceIndex = originalSearchExpression.lastIndexOf(' '); - final String searchExpressionWithoutLastWord = - originalSearchExpression.substring(0, lastSpaceIndex); - try { - parse(searchExpressionWithoutLastWord); - } catch (ParseException ex) { - return responsePayload(getCategorizedSuggestions(ex), errorIndex); - } catch (TokenMgrError ex) { - LOGGER.debug( - "Still couldn't tokenize the expression without the last word: '{}'. Giving up.", - searchExpressionWithoutLastWord, - ex); - return responsePayload(errorIndex); - } catch (CustomParseException ex) { - LOGGER.debug( - "Couldn't parse the expression, but can't get suggestions from this exception type. Continuing.", - ex); - } - } catch (CustomParseException e) { - LOGGER.debug( - "Couldn't parse the expression, but can't get suggestions from this exception type. Continuing.", - e); - } - - try { - parse(originalSearchExpression + " \n"); - } catch (ParseException e) { - return responsePayload(getCategorizedSuggestions(e)); - } catch (TokenMgrError e) { - LOGGER.warn("There was an issue parsing the search expression.", e); - } catch (CustomParseException e) { - LOGGER.debug( - "Couldn't parse the expression, but can't get suggestions from this exception type.", e); - } - - return emptyMap(); - } - - private void parse(final String searchExpression) throws ParseException, CustomParseException { - final Parser parser = new Parser(new StringReader(searchExpression)); - parser.SearchExpression(); - } - - private Map> getCategorizedSuggestionsForFirstWord(final ParseException e) { - final Map> categorizedSuggestions = - Arrays.stream(e.expectedTokenSequences) - .map(ets -> getTokenSequence(ets, e.tokenImage)) - .distinct() - .collect( - groupingBy( - suggestion -> KEYWORDS_TO_CATEGORIES.getOrDefault(suggestion, UNCATEGORIZED))); - categorizedSuggestions.remove(ARBITRARY_TEXT); - return categorizedSuggestions; - } - - private Map> getCategorizedSuggestions(final ParseException e) { - return Arrays.stream(e.expectedTokenSequences) - .map(ets -> getTokenSequence(ets, e.tokenImage)) - .distinct() - .collect( - groupingBy( - suggestion -> KEYWORDS_TO_CATEGORIES.getOrDefault(suggestion, UNCATEGORIZED))); - } - - private String getTokenSequence(final int[] expectedTokenSequence, final String[] tokenImage) { - return Arrays.stream(expectedTokenSequence) - .mapToObj(tokenIndex -> tokenImage[tokenIndex]) - .map(this::tokenToSuggestion) - .collect(joining(" ")); - } - - private String tokenToSuggestion(final String tokenImage) { - String suggestion = CHARS_TO_REMOVE.matcher(tokenImage).replaceAll(""); - suggestion = CHARS_TO_REPLACE_WITH_SPACE.matcher(suggestion).replaceAll(" "); - return suggestion.toLowerCase(); - } - - private int getErrorIndex(final TokenMgrError e, final int defaultIndex) { - // Have to extract the column number from the error message because it's the only way to access - // it from TokenMgrError. - final Matcher matcher = TOKEN_MGR_ERROR_COLUMN.matcher(e.getMessage()); - return matcher.find() ? Integer.parseInt(matcher.group("col")) : defaultIndex; - } - - private Map responsePayload(final Map> suggestions) { - final Map> finalSuggestions = removeEmptySuggestionCategories(suggestions); - return finalSuggestions.isEmpty() ? emptyMap() : singletonMap("suggestions", finalSuggestions); - } - - private Map responsePayload(final int errorIndex) { - return singletonMap("error", errorIndex); - } - - private Map responsePayload( - final Map> suggestions, final int errorIndex) { - final Map result = new HashMap<>(); - final Map> finalSuggestions = removeEmptySuggestionCategories(suggestions); - if (!finalSuggestions.isEmpty()) { - result.put("suggestions", finalSuggestions); - } - result.put("error", errorIndex); - return result; - } - - private Map> removeEmptySuggestionCategories( - final Map> categorizedSuggestions) { - return categorizedSuggestions - .entrySet() - .stream() - .filter(entry -> !entry.getValue().isEmpty()) - .collect(toMap(Entry::getKey, Entry::getValue)); - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/javacc/Parser.jj b/ui-backend/boolean-search/boolean-search-application/src/main/javacc/Parser.jj deleted file mode 100644 index ccb4e0c9195..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/javacc/Parser.jj +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -options { - IGNORE_CASE = true; - STATIC = false; -} - -PARSER_BEGIN(Parser) - -package org.codice.ddf.catalog.search.javacc; - -import java.io.Reader; -import org.codice.ddf.catalog.search.models.BooleanTextFilter; -import java.util.ArrayList; -import java.util.List; - -public class Parser { - public String propertyName= "anyText"; - - public Parser(Reader stream, String property) { - this(stream); - this.propertyName = property; - } -} - -PARSER_END(Parser) - -SKIP : -{ - " " - | "\t" - | "\r" -} - -<*> TOKEN : { - < NEWLINE: "\n" > -} - -TOKEN: -{ - - | - | - | - | -} - -TOKEN : -{ - < STRING : (["A"-"Z","a"-"z","0"-"9","*","?"])+ > - | < QUOTED_STRING: "\"" (~["\""])+ "\"" > -} - - - -String SearchExpression() throws CustomParseException : -{ - String cql; -} -{ - cql = TextSearchExpression() - - { - return cql; - } -} - -String TextSearchExpression() throws CustomParseException : -{ - String left, right; - Token logicalOperator; - StringBuilder query = new StringBuilder(); -} -{ - left = TextSearchComponent() - [ - (logicalOperator = | logicalOperator = ) - right = TextSearchExpression() - { - - return query.append(left).append(" ").append(logicalOperator.image).append(" ").append(right).toString(); - } - ] - { - return left; - } -} - -String TextSearchComponent() throws CustomParseException : -{ - String quotedSearchPhrase; - List searchTextFilters = new ArrayList<>(); - List filters = new ArrayList<>(); - StringBuilder query = new StringBuilder(); - String expression; - Token notOperator = null; -} -{ - ( - quotedSearchPhrase = QuotedSearchPhrase() - { - if (quotedSearchPhrase.contains("?") || quotedSearchPhrase.contains("*")) { - throw new CustomParseException("Wildcards are not allowed in search phrases."); - } - filters.add(new BooleanTextFilter(this.propertyName, quotedSearchPhrase.replace("\"", "").replace("'", "''"))); - } - | - searchTextFilters = WordSequence() - { - filters.addAll(searchTextFilters); - } - )+ - { - return BooleanTextFilter.implicitOr(filters); - } - | - [ notOperator = ] - expression = TextSearchExpression() - { - if (notOperator == null) { - return query.append("(").append(expression).append(")").toString(); - } else { - return query.append("(").append("NOT ").append("(").append(expression).append("))").toString(); - } - - } -} - -String QuotedSearchPhrase() : -{ - Token exactPhraseText; -} -{ - exactPhraseText = - { - return exactPhraseText.image; - } -} - -List WordSequence(): -{ - Token word; - List filters = new ArrayList<>(); -} -{ - ( - word = - { - filters.add(new BooleanTextFilter(this.propertyName, word.image)); - } - )+ - { - return filters; - } -} \ No newline at end of file diff --git a/ui-backend/boolean-search/boolean-search-application/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/ui-backend/boolean-search/boolean-search-application/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 164c8e96943..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/handlers/QueryHandlerTest.java b/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/handlers/QueryHandlerTest.java deleted file mode 100644 index c2752cd68de..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/handlers/QueryHandlerTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.handlers; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class QueryHandlerTest { - @Test - public void testFormatSearchProperty() { - String input = "test"; - String expectedResult = "\"test\""; - String actualResult = QueryHandler.formatSearchProperty(input); - assertEquals(actualResult, expectedResult); - - input = "foo.bar"; - expectedResult = "\"foo\\.bar\""; - actualResult = QueryHandler.formatSearchProperty(input); - assertEquals(actualResult, expectedResult); - - input = "a-b.c"; - expectedResult = "\"a\\-b\\.c\""; - actualResult = QueryHandler.formatSearchProperty(input); - assertEquals(actualResult, expectedResult); - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/javacc/ParserTest.java b/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/javacc/ParserTest.java deleted file mode 100644 index 2c10847c6da..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/javacc/ParserTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.javacc; - -import static org.junit.Assert.assertEquals; - -import java.io.StringReader; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -public class ParserTest { - @Rule public ExpectedException expectedException = ExpectedException.none(); - - @Test(expected = ParseException.class) - public void testBadSyntaxQuery() throws ParseException, CustomParseException { - String searchExpression = "(a or and b)"; - final Parser parser = new Parser(new StringReader(searchExpression)); - - String cql = parser.SearchExpression(); - } - - @Test(expected = ParseException.class) - public void testUnBalancedParenthesis() throws ParseException, CustomParseException { - String searchExpression = "(a or (b and c)))"; - final Parser parser = new Parser(new StringReader(searchExpression)); - - String cql = parser.SearchExpression(); - } - - @Test - public void testValidSyntax() throws ParseException, CustomParseException { - String searchExpression = "a or b and c"; - String expectedQuery = "(anyText ILIKE 'a') or (anyText ILIKE 'b') and (anyText ILIKE 'c')"; - - final Parser parser = new Parser(new StringReader(searchExpression)); - String result = parser.SearchExpression(); - - assertEquals(result, expectedQuery); - } - - @Test - public void testValidGrouping() throws ParseException, CustomParseException { - String searchExpression = "(a or b) and c"; - String expectedQuery = "((anyText ILIKE 'a') or (anyText ILIKE 'b')) and (anyText ILIKE 'c')"; - - final Parser parser = new Parser(new StringReader(searchExpression)); - String result = parser.SearchExpression(); - - assertEquals(result, expectedQuery); - } - - @Test - public void testValidNegation() throws ParseException, CustomParseException { - String searchExpression = "not (a or b) and c"; - String expectedQuery = - "(NOT ((anyText ILIKE 'a') or (anyText ILIKE 'b'))) and (anyText ILIKE 'c')"; - - final Parser parser = new Parser(new StringReader(searchExpression)); - String result = parser.SearchExpression(); - - assertEquals(result, expectedQuery); - } - - @Test - public void testAllowSingleCharWildcard() throws ParseException, CustomParseException { - final String searchExpression = "not (?at or b?d) and i?"; - final String expectedQuery = - "(NOT ((anyText ILIKE '?at') or (anyText ILIKE 'b?d'))) and (anyText ILIKE 'i?')"; - - final Parser parser = new Parser(new StringReader(searchExpression)); - String result = parser.SearchExpression(); - - assertEquals(result, expectedQuery); - } - - @Test - public void testAllowMultiCharWildcard() throws ParseException, CustomParseException { - final String searchExpression = "not (*at or b*d) and i*"; - final String expectedQuery = - "(NOT ((anyText ILIKE '*at') or (anyText ILIKE 'b*d'))) and (anyText ILIKE 'i*')"; - - final Parser parser = new Parser(new StringReader(searchExpression)); - String result = parser.SearchExpression(); - - assertEquals(result, expectedQuery); - } - - @Test - public void testSingleCharWildcardNotAllowedInPhrase() - throws ParseException, CustomParseException { - expectedException.expect(CustomParseException.class); - expectedException.expectMessage("Wildcards are not allowed in search phrases."); - - final String searchExpression = "\"st?ck index\""; - - final Parser parser = new Parser(new StringReader(searchExpression)); - parser.SearchExpression(); - } - - @Test - public void testMultiCharWildcardNotAllowedInPhrase() - throws ParseException, CustomParseException { - expectedException.expect(CustomParseException.class); - expectedException.expectMessage("Wildcards are not allowed in search phrases."); - - final String searchExpression = "\"st*ck index\""; - - final Parser parser = new Parser(new StringReader(searchExpression)); - parser.SearchExpression(); - } -} diff --git a/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/suggest/SuggesterTest.java b/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/suggest/SuggesterTest.java deleted file mode 100644 index 1d673798802..00000000000 --- a/ui-backend/boolean-search/boolean-search-application/src/test/java/org/codice/ddf/catalog/search/suggest/SuggesterTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.search.suggest; - -import static org.junit.Assert.assertEquals; - -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Test; - -public class SuggesterTest { - - @Test - public void testLogicalSuggestions() { - final Suggester suggester = new Suggester("a and b "); - final Map suggestions = suggester.getSuggestions(); - - final Map> suggestionMap = - (Map>) suggestions.get("suggestions"); - - List mandatory = suggestionMap.get("mandatory"); - List logical = suggestionMap.get("logical"); - - Assert.assertTrue(mandatory.contains("string")); - Assert.assertTrue(mandatory.contains("quoted string")); - Assert.assertTrue(logical.contains("and")); - Assert.assertTrue(logical.contains("or")); - } - - @Test - public void testSingleSearchTerm() { - final Suggester suggester = new Suggester("a"); - final Map suggestions = suggester.getSuggestions(); - - final Map> suggestionMap = - (Map>) suggestions.get("suggestions"); - - List mandatory = suggestionMap.get("mandatory"); - List logical = suggestionMap.get("logical"); - - System.out.println(mandatory); - System.out.println(logical); - - Assert.assertTrue(mandatory.contains("string")); - } - - @Test - public void testSingleSearchTermWithSpace() { - final Suggester suggester = new Suggester("a "); - final Map suggestions = suggester.getSuggestions(); - - final Map> suggestionMap = - (Map>) suggestions.get("suggestions"); - - List mandatory = suggestionMap.get("mandatory"); - List logical = suggestionMap.get("logical"); - - Assert.assertTrue(mandatory.contains("string")); - Assert.assertTrue(mandatory.contains("quoted string")); - Assert.assertTrue(logical.contains("and")); - Assert.assertTrue(logical.contains("or")); - } - - @Test - public void testSingleTermWithSpace() { - final Suggester suggester = new Suggester("a "); - final Map suggestions = suggester.getSuggestions(); - - final Map> suggestionMap = - (Map>) suggestions.get("suggestions"); - - List mandatory = suggestionMap.get("mandatory"); - List logical = suggestionMap.get("logical"); - - Assert.assertTrue(mandatory.contains("string")); - Assert.assertTrue(mandatory.contains("quoted string")); - Assert.assertTrue(logical.contains("and")); - Assert.assertTrue(logical.contains("or")); - } - - @Test - public void testEmpty() { - final Suggester suggester = new Suggester(""); - final Map suggestions = suggester.getSuggestions(); - Assert.assertTrue(suggestions.isEmpty()); - } - - @Test - public void testErrorAtLocation() { - final Suggester suggester = new Suggester("a and b )"); - final Map suggestions = suggester.getSuggestions(); - - final int errorLocation = (int) suggestions.get("error"); - - assertEquals(9, errorLocation); - } -} diff --git a/ui-backend/boolean-search/pom.xml b/ui-backend/boolean-search/pom.xml deleted file mode 100644 index 2df67a3688d..00000000000 --- a/ui-backend/boolean-search/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - 4.0.0 - pom - - DDF :: Catalog :: Boolean Search - - boolean-search-application - - - - backend - org.codice.ddf.search - 5.1.51-SNAPSHOT - - - boolean-search - - \ No newline at end of file diff --git a/ui-backend/catalog-plugin-highlight/pom.xml b/ui-backend/catalog-plugin-highlight/pom.xml deleted file mode 100644 index eee8bfd91f0..00000000000 --- a/ui-backend/catalog-plugin-highlight/pom.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - backend - org.codice.ddf.search - 5.1.51-SNAPSHOT - - 4.0.0 - - catalog-plugin-highlight - DDF :: Catalog :: Plugin :: Highlight Transform Plugin - bundle - - - - ddf.catalog.core - catalog-core-api - ${ddf.version} - - - ddf.catalog.core - catalog-core-api-impl - ${ddf.version} - test - - - com.google.guava - guava - ${guava.version} - compile - - - org.slf4j - slf4j-api - ${org.slf4j.version} - - - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId} - - - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.95 - - - BRANCH - COVEREDRATIO - 0.80 - - - COMPLEXITY - COVEREDRATIO - 0.78 - - - - - - - - - - - - diff --git a/ui-backend/catalog-plugin-highlight/src/main/java/org/codice/ddf/catalog/ui/plugin/highlight/HighlightTransformPlugin.java b/ui-backend/catalog-plugin-highlight/src/main/java/org/codice/ddf/catalog/ui/plugin/highlight/HighlightTransformPlugin.java deleted file mode 100644 index 1d5731c86f2..00000000000 --- a/ui-backend/catalog-plugin-highlight/src/main/java/org/codice/ddf/catalog/ui/plugin/highlight/HighlightTransformPlugin.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.plugin.highlight; - -import com.google.common.annotations.VisibleForTesting; -import ddf.catalog.Constants; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.operation.Highlight; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.ResultAttributeHighlight; -import ddf.catalog.operation.ResultHighlight; -import ddf.catalog.plugin.PostQueryPlugin; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -/** Transforms solr highlights into an easily displayable format on the frontend */ -public class HighlightTransformPlugin implements PostQueryPlugin { - - public static final String ORIGINAL_SOURCE_PROPERTIES = "originalSourceProperties"; - - private int bufferSize; - - private Pattern redactedPattern; - - public HighlightTransformPlugin() { - // Create a 80 char buffer around the string - bufferSize = 80; - - redactedPattern = Pattern.compile("REDACTED"); - } - - @VisibleForTesting - protected HighlightTransformPlugin(int bufferSize) { - this.bufferSize = bufferSize; - } - - @VisibleForTesting - protected static class ProcessedHighlight { - - private String id; - private List> highlights; - - public ProcessedHighlight(String id) { - this.id = id; - highlights = new ArrayList<>(); - } - - public void addHighlight( - String attribute, String highlight, String startIndex, String endIndex, String valueIndex) { - HashMap highlightMap = new HashMap<>(); - highlightMap.put("attribute", attribute); - highlightMap.put("highlight", highlight); - highlightMap.put("valueIndex", valueIndex); - highlightMap.put("startIndex", startIndex); - highlightMap.put("endIndex", endIndex); - highlights.add(highlightMap); - } - - public List> getHighlights() { - return highlights; - } - - public String getId() { - return id; - } - } - - @Override - public QueryResponse process(QueryResponse input) { - ArrayList processedHighlights = new ArrayList<>(); - List resultHighlights = new ArrayList<>(); - - // Find highlights per source if available to avoid top level highlight property collisions - if (input.getProperties().containsKey(ORIGINAL_SOURCE_PROPERTIES)) { - Map> sourceProperties = - (Map>) - input.getProperties().get(ORIGINAL_SOURCE_PROPERTIES); - - for (Map properties : sourceProperties.values()) { - if (properties.containsKey(Constants.QUERY_HIGHLIGHT_KEY)) { - List highlights = - (List) properties.get(Constants.QUERY_HIGHLIGHT_KEY); - resultHighlights.addAll(highlights); - } - } - } - - // Fallback to old top level highlight properties if per source properties unavailable - if (resultHighlights.isEmpty() - && input.getProperties().containsKey(Constants.QUERY_HIGHLIGHT_KEY)) { - List highlights = - (List) input.getProperties().get(Constants.QUERY_HIGHLIGHT_KEY); - resultHighlights.addAll(highlights); - } - - if (!resultHighlights.isEmpty()) { - List results = input.getResults(); - for (ResultHighlight resultHighlight : resultHighlights) { - String id = resultHighlight.getResultId(); - ProcessedHighlight processedHighlight = new ProcessedHighlight(id); - - Result matchingResult = - results - .stream() - .filter(result -> result.getMetacard().getId().equals(id)) - .findAny() - .orElse(null); - if (matchingResult != null) { - List resultAttributeHighlights = - resultHighlight.getAttributeHighlights(); - - for (ResultAttributeHighlight resultAttributeHighlight : resultAttributeHighlights) { - String attributeName = resultAttributeHighlight.getAttributeName(); - List highlights = resultAttributeHighlight.getHighlights(); - - for (Highlight highlight : highlights) { - processHighlight(processedHighlight, matchingResult, attributeName, highlight); - } - } - } - addToProcessedHighlights(processedHighlights, processedHighlight); - } - } - - input.getProperties().put(Constants.QUERY_HIGHLIGHT_KEY, processedHighlights); - return input; - } - - private void processHighlight( - ProcessedHighlight processedHighlight, - Result matchingResult, - String attributeName, - Highlight highlight) { - Attribute attribute = matchingResult.getMetacard().getAttribute(attributeName); - String value = null; - int index = highlight.getValueIndex(); - if (attribute != null - && !attribute.getValues().isEmpty() - && index < attribute.getValues().size()) { - value = (String) attribute.getValues().get(index); - } - - if (value != null && (redactedPattern == null || !redactedPattern.matcher(value).matches())) { - String highlightedString = createHighlightString(highlight, value, attributeName); - processedHighlight.addHighlight( - attributeName, - highlightedString, - String.valueOf(highlight.getBeginIndex()), - String.valueOf(highlight.getEndIndex()), - String.valueOf(highlight.getValueIndex())); - } - } - - private void addToProcessedHighlights( - ArrayList processedHighlights, ProcessedHighlight processedHighlight) { - if (!processedHighlight.getHighlights().isEmpty()) { - processedHighlights.add(processedHighlight); - } - } - - @VisibleForTesting - protected String createHighlightString(Highlight highlight, String value, String attribute) { - String startBuffer = getStartBuffer(highlight, value, attribute); - String endBuffer = getEndBuffer(highlight, value, attribute); - - String substring = - "" - + value.substring(highlight.getBeginIndex(), highlight.getEndIndex()) - + ""; - - return startBuffer + substring + endBuffer; - } - - @VisibleForTesting - protected String getStartBuffer(Highlight highlight, String value, String attribute) { - String startBuffer = ""; - - // A special case for title is that we want the whole string - if (attribute.equals(Metacard.TITLE)) { - return value.substring(0, highlight.getBeginIndex()); - } - // if the highlighted section is at the beginning, don't add a start buffer - if (highlight.getBeginIndex() > 0) { - int startIndex = highlight.getBeginIndex() - bufferSize; - if (startIndex <= 0) { - startBuffer = value.substring(0, highlight.getBeginIndex()); - } else { - startBuffer = "...".concat(value.substring(startIndex, highlight.getBeginIndex())); - } - } - return startBuffer; - } - - @VisibleForTesting - protected String getEndBuffer(Highlight highlight, String value, String attribute) { - String endBuffer = ""; - - // A special case for title is that we want the whole string - if (attribute.equals(Metacard.TITLE)) { - return value.substring(highlight.getEndIndex()); - } - // if the highlighted section is at the end, don't add an end buffer - if (highlight.getEndIndex() != value.length()) { - int endIndex = highlight.getEndIndex() + bufferSize; - if (endIndex >= value.length()) { - endBuffer = value.substring(highlight.getEndIndex()); - } else { - endBuffer = value.substring(highlight.getEndIndex(), endIndex).concat("..."); - } - } - return endBuffer; - } - - public void setRedactedPattern(String redactedPattern) { - if (redactedPattern == null || redactedPattern.trim().isEmpty()) { - this.redactedPattern = null; - } else { - this.redactedPattern = Pattern.compile(redactedPattern); - } - } -} diff --git a/ui-backend/catalog-plugin-highlight/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/ui-backend/catalog-plugin-highlight/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 77fa5b4613e..00000000000 --- a/ui-backend/catalog-plugin-highlight/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-plugin-highlight/src/main/resources/OSGI-INF/metatype/metatype.xml b/ui-backend/catalog-plugin-highlight/src/main/resources/OSGI-INF/metatype/metatype.xml deleted file mode 100644 index 88e222fb87f..00000000000 --- a/ui-backend/catalog-plugin-highlight/src/main/resources/OSGI-INF/metatype/metatype.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - diff --git a/ui-backend/catalog-plugin-highlight/src/test/java/org/codice/ddf/catalog/ui/plugin/highlight/HighlightTransformPluginTest.java b/ui-backend/catalog-plugin-highlight/src/test/java/org/codice/ddf/catalog/ui/plugin/highlight/HighlightTransformPluginTest.java deleted file mode 100644 index 87468b2551c..00000000000 --- a/ui-backend/catalog-plugin-highlight/src/test/java/org/codice/ddf/catalog/ui/plugin/highlight/HighlightTransformPluginTest.java +++ /dev/null @@ -1,272 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.ui.plugin.highlight; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.hasKey; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.Constants; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.ResultImpl; -import ddf.catalog.operation.Highlight; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.ResultAttributeHighlight; -import ddf.catalog.operation.ResultHighlight; -import ddf.catalog.operation.impl.HighlightImpl; -import ddf.catalog.operation.impl.QueryResponseImpl; -import ddf.catalog.operation.impl.ResultAttributeHighlightImpl; -import ddf.catalog.operation.impl.ResultHighlightImpl; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; - -@RunWith(MockitoJUnitRunner.class) -public class HighlightTransformPluginTest { - - QueryRequest request; - - private QueryResponse input; - - // Use a smaller buffer size for ease of testing - private HighlightTransformPlugin plugin = new HighlightTransformPlugin(10); - - private String value = "Lorem ipsum dolor sit amet"; - - @Before - public void setup() { - request = mock(QueryRequest.class); - input = new QueryResponseImpl(request); - } - - @Test - public void testNoHighlights() { - QueryResponse output = plugin.process(input); - assertThat(output.getProperties(), hasKey(Constants.QUERY_HIGHLIGHT_KEY)); - assertThat( - output.getProperties().get(Constants.QUERY_HIGHLIGHT_KEY), is(Collections.EMPTY_LIST)); - } - - @Test - public void testProcessHighlights() { - String id = "123456789"; - // Highlight the word "Lorem" - Highlight highlight = new HighlightImpl(0, 5); - - Metacard metacard = new MetacardImpl(); - metacard.setAttribute(new AttributeImpl("description", value)); - metacard.setAttribute(new AttributeImpl("id", "123456789")); - Result result = new ResultImpl(metacard); - - QueryResponse response = new QueryResponseImpl(request, Arrays.asList(result), 1); - ResultAttributeHighlight resultAttributeHighlight = - new ResultAttributeHighlightImpl("description", Arrays.asList(highlight)); - ResultHighlight resultHighlight = - new ResultHighlightImpl(id, Arrays.asList(resultAttributeHighlight)); - - response - .getProperties() - .put(Constants.QUERY_HIGHLIGHT_KEY, (Serializable) Arrays.asList(resultHighlight)); - - QueryResponse processedResponse = plugin.process(response); - assertThat( - processedResponse.getProperties().containsKey(Constants.QUERY_HIGHLIGHT_KEY), is(true)); - ArrayList highlights = - (ArrayList) - processedResponse.getProperties().get(Constants.QUERY_HIGHLIGHT_KEY); - assertThat(highlights.get(0).getId(), is("123456789")); - assertThat(highlights.get(0).getHighlights().get(0).get("attribute"), is("description")); - assertThat( - highlights.get(0).getHighlights().get(0).get("highlight"), - is("Lorem ipsum dol...")); - } - - @Test - public void testHighlightSourceCollision() { - String id1 = "123456789"; - String id2 = "987654321"; - // Highlight the word "Lorem" - Highlight highlight1 = new HighlightImpl(0, 5); - Highlight highlight2 = new HighlightImpl(7, 12); - - Metacard metacard1 = new MetacardImpl(); - metacard1.setAttribute(new AttributeImpl("description", value)); - metacard1.setAttribute(new AttributeImpl("id", id1)); - Result result1 = new ResultImpl(metacard1); - - Metacard metacard2 = new MetacardImpl(); - metacard2.setAttribute(new AttributeImpl("description", "Offset " + value)); - metacard2.setAttribute(new AttributeImpl("id", id2)); - Result result2 = new ResultImpl(metacard2); - - QueryResponse response = new QueryResponseImpl(request, Arrays.asList(result1, result2), 2); - ResultAttributeHighlight resultAttributeHighlight1 = - new ResultAttributeHighlightImpl("description", Arrays.asList(highlight1)); - ResultHighlight resultHighlight1 = - new ResultHighlightImpl(id1, Arrays.asList(resultAttributeHighlight1)); - - // Simulate a source collision for highlights that only contain one highlight - response - .getProperties() - .put(Constants.QUERY_HIGHLIGHT_KEY, (Serializable) Arrays.asList(resultHighlight1)); - - ResultAttributeHighlight resultAttributeHighlight2 = - new ResultAttributeHighlightImpl("description", Arrays.asList(highlight2)); - ResultHighlight resultHighlight2 = - new ResultHighlightImpl(id2, Arrays.asList(resultAttributeHighlight2)); - - response - .getProperties() - .put( - HighlightTransformPlugin.ORIGINAL_SOURCE_PROPERTIES, - ImmutableMap.of( - "source1", - ImmutableMap.of( - Constants.QUERY_HIGHLIGHT_KEY, (Serializable) Arrays.asList(resultHighlight1)), - "source2", - ImmutableMap.of( - Constants.QUERY_HIGHLIGHT_KEY, - (Serializable) Arrays.asList(resultHighlight2)))); - - QueryResponse processedResponse = plugin.process(response); - assertThat( - processedResponse.getProperties().containsKey(Constants.QUERY_HIGHLIGHT_KEY), is(true)); - ArrayList highlights = - (ArrayList) - processedResponse.getProperties().get(Constants.QUERY_HIGHLIGHT_KEY); - assertThat(highlights.size(), is(2)); - assertThat(highlights.get(0).getId(), is(id1)); - assertThat(highlights.get(0).getHighlights().get(0).get("attribute"), is("description")); - assertThat( - highlights.get(0).getHighlights().get(0).get("highlight"), - is("Lorem ipsum dol...")); - - assertThat(highlights.get(1).getId(), is(id2)); - assertThat(highlights.get(1).getHighlights().get(0).get("attribute"), is("description")); - assertThat( - highlights.get(1).getHighlights().get(0).get("highlight"), - is("Offset Lorem ipsum dol...")); - } - - @Test - public void testProcessHighlightsRedacted() { - HighlightTransformPlugin highlightPlugin = new HighlightTransformPlugin(10); - highlightPlugin.setRedactedPattern("REDACTED.*"); - - String id = "123456789"; - // Highlight the word "Lorem" - Highlight highlight = new HighlightImpl(0, 5); - - Metacard metacard = new MetacardImpl(); - metacard.setAttribute(new AttributeImpl("title", "REDACTED DATA")); - metacard.setAttribute(new AttributeImpl("description", value)); - metacard.setAttribute(new AttributeImpl("id", "123456789")); - Result result = new ResultImpl(metacard); - - QueryResponse response = new QueryResponseImpl(request, Arrays.asList(result), 1); - ResultAttributeHighlight resultAttributeHighlight = - new ResultAttributeHighlightImpl("description", Arrays.asList(highlight)); - ResultAttributeHighlight missingAttributeHighlight = - new ResultAttributeHighlightImpl("extra", Arrays.asList(new HighlightImpl(6, 20))); - ResultAttributeHighlight redactedAttributeHighlight = - new ResultAttributeHighlightImpl("title", Arrays.asList(new HighlightImpl(10, 20))); - - ResultHighlight resultHighlight = - new ResultHighlightImpl( - id, - Arrays.asList( - resultAttributeHighlight, missingAttributeHighlight, redactedAttributeHighlight)); - - response - .getProperties() - .put(Constants.QUERY_HIGHLIGHT_KEY, (Serializable) Arrays.asList(resultHighlight)); - - QueryResponse processedResponse = highlightPlugin.process(response); - assertThat( - processedResponse.getProperties().containsKey(Constants.QUERY_HIGHLIGHT_KEY), is(true)); - ArrayList highlights = - (ArrayList) - processedResponse.getProperties().get(Constants.QUERY_HIGHLIGHT_KEY); - assertThat(highlights.size(), is(1)); - assertThat(highlights.get(0).getId(), is("123456789")); - assertThat(highlights.get(0).getHighlights().get(0).get("attribute"), is("description")); - assertThat( - highlights.get(0).getHighlights().get(0).get("highlight"), - is("Lorem ipsum dol...")); - } - - @Test - public void testGetStartBufferWithHighlightAtStart() { - // Highlight the word "Lorem" - Highlight highlight = new HighlightImpl(0, 5); - String startBuffer = plugin.getStartBuffer(highlight, value, "description"); - // Assert that the buffer is blank because its the first word in the string - assertThat(startBuffer, equalTo("")); - } - - @Test - public void testGetStartBufferWithHighlightInMiddle() { - // Highlight the word "dolor" - Highlight highlight = new HighlightImpl(12, 17); - String startBuffer = plugin.getStartBuffer(highlight, value, "description"); - // Assert that the buffer contains front trail because its mid string - assertThat(startBuffer, equalTo("...rem ipsum ")); - } - - @Test - public void testGetStartBufferAtStartOfValue() { - // Highlight the word "ipsum" - Highlight highlight = new HighlightImpl(6, 11); - String startBuffer = plugin.getStartBuffer(highlight, value, "description"); - // Assert that the buffer doesn't have front trail and starts at first word - assertThat(startBuffer, equalTo("Lorem ")); - } - - @Test - public void testGetEndBufferWithHighlightAtEnd() { - // Highlight the word "amet" - Highlight highlight = new HighlightImpl(22, 26); - String startBuffer = plugin.getEndBuffer(highlight, value, "description"); - // Assert that the buffer is blank because its the last word in the string - assertThat(startBuffer, equalTo("")); - } - - @Test - public void testGetEndBufferWithHighlightInMiddle() { - // Highlight the word "ipsum" - Highlight highlight = new HighlightImpl(6, 11); - String endBuffer = plugin.getEndBuffer(highlight, value, "description"); - // Assert that the buffer has end trail as it is mid string - assertThat(endBuffer, equalTo(" dolor sit...")); - } - - @Test - public void testGetEndBufferAtEndOfValue() { - // Highlight the word "dolor" - Highlight highlight = new HighlightImpl(12, 17); - String startBuffer = plugin.getEndBuffer(highlight, value, "description"); - // Assert that the buffer stops on last word - assertThat(startBuffer, equalTo(" sit amet")); - } - - @Test - public void testDontTruncateTitles() { - // Highlight the word "dolor" - Highlight highlight = new HighlightImpl(12, 17); - String resultString = plugin.createHighlightString(highlight, value, "title"); - // Assert that the buffer stops on last word - assertThat( - resultString, equalTo("Lorem ipsum dolor sit amet")); - } -} diff --git a/ui-backend/catalog-ui-enumeration/pom.xml b/ui-backend/catalog-ui-enumeration/pom.xml deleted file mode 100644 index f3743e7a21a..00000000000 --- a/ui-backend/catalog-ui-enumeration/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - 4.0.0 - - backend - org.codice.ddf.search - 5.1.51-SNAPSHOT - - bundle - - catalog-ui-enumeration - DDF :: Catalog :: UI :: Enumeration - - - - ddf.catalog.core - catalog-core-api - ${ddf.version} - - - ddf.platform.util - platform-util - ${ddf.version} - - - ddf.catalog.core - catalog-core-api-impl - ${ddf.version} - - - commons-lang - commons-lang - ${commons-lang.version} - - - com.google.code.findbugs - jsr305 - ${jsr305.version} - - - org.codice.ddf.search - deprecatable-enumeration-api - ${project.version} - - - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId} - - org.codice.ddf.catalog.ui.enumeration - - - catalog-core-api-impl, - platform-util - - - - - - - - diff --git a/ui-backend/catalog-ui-enumeration/src/main/java/org/codice/ddf/catalog/ui/enumeration/ExperimentalEnumerationExtractor.java b/ui-backend/catalog-ui-enumeration/src/main/java/org/codice/ddf/catalog/ui/enumeration/ExperimentalEnumerationExtractor.java deleted file mode 100644 index e3b3f43a4d9..00000000000 --- a/ui-backend/catalog-ui-enumeration/src/main/java/org/codice/ddf/catalog/ui/enumeration/ExperimentalEnumerationExtractor.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.enumeration; - -import static org.apache.commons.lang.StringUtils.isBlank; - -import com.google.common.collect.Sets; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeInjector; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.validation.AttributeValidatorRegistry; -import ddf.catalog.validation.violation.ValidationViolation; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.codice.ddf.catalog.ui.enumeration.api.DeprecatableEnumeration; - -/** This class is Experimental and subject to change */ -public class ExperimentalEnumerationExtractor { - private final AttributeValidatorRegistry attributeValidatorRegistry; - - private final List metacardTypes; - - private final List attributeInjectors; - - private final List deprecatableEnumerations; - - /** - * @deprecated This constructor does not take into account injected attributes. The other - * constructor {@link #ExperimentalEnumerationExtractor(AttributeValidatorRegistry, List, - * List, List)} should be used. - */ - @Deprecated - public ExperimentalEnumerationExtractor( - AttributeValidatorRegistry attributeValidatorRegistry, List metacardTypes) { - this( - attributeValidatorRegistry, - metacardTypes, - Collections.emptyList(), - Collections.emptyList()); - } - - /** - * @param attributeValidatorRegistry validators to build enumerations from - * @param metacardTypes metacard types to associate attributes with types - * @param attributeInjectors injected attributes - */ - public ExperimentalEnumerationExtractor( - AttributeValidatorRegistry attributeValidatorRegistry, - List metacardTypes, - List attributeInjectors, - List deprecatableEnumerations) { - this.attributeValidatorRegistry = attributeValidatorRegistry; - this.metacardTypes = metacardTypes; - this.attributeInjectors = attributeInjectors; - this.deprecatableEnumerations = deprecatableEnumerations; - } - - public Map> getAttributeEnumerations(String attribute) { - return attributeValidatorRegistry - .getValidators(attribute) - .stream() - .map(av -> av.validate(new AttributeImpl(attribute, "null"))) - .filter(Optional::isPresent) - .map(Optional::get) - .filter(avr -> !avr.getSuggestedValues().isEmpty()) - .map( - avr -> - avr.getAttributeValidationViolations() - .stream() - .map(ValidationViolation::getAttributes) - .flatMap(Set::stream) - .distinct() - .collect(Collectors.toMap(o -> o, o -> avr.getSuggestedValues()))) - .reduce(this::union) - .orElseGet(HashMap::new); - } - - public Map> getDeprecatedEnumerations(@Nullable String metacardType) { - if (isBlank(metacardType)) { - metacardType = MetacardImpl.BASIC_METACARD.getName(); - } - MetacardType type = getTypeFromName(metacardType); - - if (type == null) { - return new HashMap<>(); - } - - type = applyInjectors(type, attributeInjectors); - - return type.getAttributeDescriptors() - .stream() - .map(this::toDeprecatedEnumeration) - .filter(Optional::isPresent) - .map(Optional::get) - .filter(this::isNotEmpty) - .map(this::toMap) - .reduce(this::union) - .orElseGet(HashMap::new); - } - - public Map> getEnumerations(@Nullable String metacardType) { - if (isBlank(metacardType)) { - metacardType = MetacardImpl.BASIC_METACARD.getName(); - } - MetacardType type = getTypeFromName(metacardType); - - if (type == null) { - return new HashMap<>(); - } - - type = applyInjectors(type, attributeInjectors); - - return type.getAttributeDescriptors() - .stream() - .flatMap( - ad -> - attributeValidatorRegistry - .getValidators(ad.getName()) - .stream() - .map(av -> av.validate(new AttributeImpl(ad.getName(), "null")))) - .filter(Optional::isPresent) - .map(Optional::get) - .filter(avr -> !avr.getSuggestedValues().isEmpty()) - .map( - avr -> - avr.getAttributeValidationViolations() - .stream() - .map(ValidationViolation::getAttributes) - .flatMap(Set::stream) - .distinct() - .collect(Collectors.toMap(o -> o, o -> avr.getSuggestedValues()))) - .reduce(this::union) - .orElseGet(HashMap::new); - } - - private Optional toDeprecatedEnumeration( - AttributeDescriptor attributeDescriptor) { - return getDeprecatedAttributeEnumerations(attributeDescriptor.getName()); - } - - private boolean isNotEmpty(DeprecatableEnumeration deprecatableEnumeration) { - return !deprecatableEnumeration.getDeprecatedValues().isEmpty(); - } - - private Map> union( - Map> firstMap, Map> secondMap) { - secondMap.forEach((key, value) -> firstMap.merge(key, value, Sets::union)); - return firstMap; - } - - private Map> toMap(DeprecatableEnumeration deprecatableEnumeration) { - Map> map = new HashMap<>(); - map.put(deprecatableEnumeration.getAttribute(), deprecatableEnumeration.getDeprecatedValues()); - return map; - } - - private Optional getDeprecatedAttributeEnumerations(String attribute) { - return deprecatableEnumerations - .stream() - .filter(deprecatableEnumeration -> deprecatableEnumeration.getAttribute().equals(attribute)) - .findFirst(); - } - - @Nullable - private MetacardType getTypeFromName(String metacardType) { - return metacardTypes - .stream() - .filter(mt -> mt.getName().equals(metacardType)) - .findFirst() - .orElse(null); - } - - private MetacardType applyInjectors(MetacardType original, List injectors) { - Metacard metacard = new MetacardImpl(original); - for (AttributeInjector injector : injectors) { - metacard = injector.injectAttributes(metacard); - } - return metacard.getMetacardType(); - } -} diff --git a/ui-backend/catalog-ui-oauth/pom.xml b/ui-backend/catalog-ui-oauth/pom.xml deleted file mode 100644 index d8f13e6180f..00000000000 --- a/ui-backend/catalog-ui-oauth/pom.xml +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - - 4.0.0 - catalog-ui-oauth - DDF :: Catalog :: UI :: OAuth - bundle - - - - com.sparkjava - spark-core - ${spark.version} - - - ddf.lib - common-system - ${ddf.version} - - - ddf.security.storage - token-storage-api - ${ddf.version} - - - ddf.platform.security - security-oidc-bundle - ${ddf.version} - - - org.codice.ddf.search - catalog-ui-search - ${project.version} - - - com.nimbusds - nimbus-jose-jwt - ${nimbus.version} - - - com.nimbusds - oauth2-oidc-sdk - ${nimbus.oidc.version} - - - com.nimbusds - nimbus-jose-jwt - - - - - org.pac4j - pac4j-oidc - ${pac4j.version} - - - com.google.guava - guava - ${guava.version} - - - org.apache.httpcomponents - httpcore - ${httpcore.version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs.version} - - - - - ddf.security.storage - token-storage-impl - ${ddf.version} - test - - - com.auth0 - java-jwt - 3.8.1 - test - - - - - - org.apache.felix - maven-bundle-plugin - - - - ${project.artifactId} - - spark-core - - - !com.google.appengine.*, - !com.google.apphosting.*, - !com.google.common.util.concurrent.internal, - !com.google.common.io.*, - !com.google.errorprone.*, - !org.checkerframework.*, - org.pac4j.*;version="[3.8.0,5.0.0)", - com.nimbusds.oauth2.*;version="[6.18.0,9.0.0)", - com.nimbusds.openid.*;version="[6.18.0,9.0.0)", - * - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - check-artifact-size - verify - - enforce - - - - - 1.4_MB - - - - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.41 - - - BRANCH - COVEREDRATIO - 0.22 - - - COMPLEXITY - COVEREDRATIO - 0.23 - - - - - - **/RootContextRequestSupplier.* - **/SparkServlet.* - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/RootContextRequestSupplier.java b/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/RootContextRequestSupplier.java deleted file mode 100644 index a53f091494d..00000000000 --- a/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/RootContextRequestSupplier.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui; - -import java.util.function.BiFunction; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; - -public class RootContextRequestSupplier - implements BiFunction { - @Override - public HttpServletRequestWrapper apply( - HttpServletRequest httpServletRequest, String relativePath) { - return new HttpServletRequestWrapper(httpServletRequest) { - @Override - public String getServletPath() { - return "/"; - } - - @Override - public String getPathInfo() { - return relativePath; - } - - @Override - public String getRequestURI() { - return relativePath; - } - }; - } -} diff --git a/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/SparkServlet.java b/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/SparkServlet.java deleted file mode 100644 index c09f18f4592..00000000000 --- a/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/SparkServlet.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui; - -import java.io.IOException; -import java.io.NotSerializableException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.function.BiFunction; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; -import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.ExceptionMapper; -import spark.globalstate.ServletFlag; -import spark.http.matching.MatcherFilter; -import spark.route.ServletRoutes; -import spark.servlet.SparkApplication; -import spark.staticfiles.StaticFilesConfiguration; -import spark.utils.CollectionUtils; - -/** - * Servlet that can be configured through a web.xml to serve {@code SparkApplication}s. Needs to be - * initialized with the {@code applicationName} init parameter (or through a direct call to {@link - * #setSparkApplications(List)}) to the list of application classes defining routes. An optional - * {@code wrapperSupplierName} parameter can be provided (or directly set through the {@link - * #setRequestSupplier(BiFunction)} method) to provide added path flexibility. - */ -public class SparkServlet extends HttpServlet { - private static final Logger LOGGER = LoggerFactory.getLogger(SparkServlet.class); - - private static final String SLASH_WILDCARD = "/*"; - - private static final String SLASH = "/"; - - private static final String APPLICATION_CLASS_PARAM = "applicationName"; - - private static final String WRAPPER_SUPPLIER_PARAM_NAME = "wrapperSupplierName"; - - private static final String FILTER_MAPPING_PARAM = "filterMappingUrlPattern"; - - @SuppressWarnings("squid:S2226" /* Lifecycle managed by blueprint. */) - private static final BiFunction - DEFAULT_REQ_FUNC = - (req, relativePath) -> - new HttpServletRequestWrapper(req) { - @Override - public String getPathInfo() { - return relativePath; - } - - @Override - public String getRequestURI() { - return relativePath; - } - }; - - @SuppressWarnings("squid:S2226" /* Lifecycle managed by blueprint. */) - private BiFunction requestSupplier; - - private final List sparkApplications = - Collections.synchronizedList(new ArrayList<>()); - - @SuppressWarnings("squid:S2226" /* Lifecycle managed by blueprint. */) - private String filterMappingPattern = null; - - private String filterPath; - - private MatcherFilter matcherFilter; - - public synchronized void setRequestSupplier( - BiFunction requestSupplier) { - this.requestSupplier = requestSupplier; - } - - public void setSparkApplications(List sparkApplications) { - this.sparkApplications.addAll(sparkApplications); - } - - public void setSparkApplication(SparkApplication sparkApplication) { - this.sparkApplications.add(sparkApplication); - } - - public void setFilterMappingPattern(String filterMappingPattern) { - this.filterMappingPattern = filterMappingPattern; - } - - @Override - public void init(ServletConfig config) throws ServletException { - super.init(config); - ServletFlag.runFromServlet(); - - populateWrapperSupplier(config); - populateSparkApplications(config); - - sparkApplications.stream().sequential().forEach(SparkApplication::init); - - filterPath = getConfigPath(filterMappingPattern, config); - matcherFilter = - new MatcherFilter( - ServletRoutes.get(), - StaticFilesConfiguration.servletInstance, - ExceptionMapper.getServletInstance(), - false, - false); - } - - @Override - public void destroy() { - sparkApplications.stream().filter(Objects::nonNull).forEach(SparkApplication::destroy); - } - - @Override - protected void service(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, IOException { - final String relativePath = getRelativePath(req, filterPath); - - HttpServletRequestWrapper requestWrapper; - synchronized (this) { - requestWrapper = requestSupplier.apply(req, relativePath); - } - - // handle static resources - boolean consumed = StaticFilesConfiguration.servletInstance.consume(req, resp); - - if (consumed) { - return; - } - - matcherFilter.doFilter(requestWrapper, resp, null); - } - - private static String getConfigPath(String filterMappingPattern, ServletConfig config) { - String result = - Optional.ofNullable(filterMappingPattern) - .orElse(config.getInitParameter(FILTER_MAPPING_PARAM)); - if (result == null || result.equals(SLASH_WILDCARD)) { - return ""; - } else if (!result.startsWith(SLASH) || !result.endsWith(SLASH_WILDCARD)) { - throw new IllegalArgumentException( - String.format( - "The %s must start with '/' and end with '/*'. Instead it is: %s", - FILTER_MAPPING_PARAM, result)); - } - return result.substring(1, result.length() - 1); - } - - private static String getRelativePath(HttpServletRequest request, String filterPath) { - String path = request.getRequestURI().substring(request.getContextPath().length()); - - if (path.length() > 0) { - path = path.substring(1); - } - - if (filterPath.equals(path + SLASH)) { - path += SLASH; - } - - if (path.startsWith(filterPath)) { - path = path.substring(filterPath.length()); - } - - if (!path.startsWith(SLASH)) { - path = SLASH + path; - } - - try { - path = URLDecoder.decode(path, "UTF-8"); - } catch (UnsupportedEncodingException ignore) { - // this can't really ever happen - } - - LOGGER.debug("Relative path = {}", path); - return path; - } - - private synchronized void populateWrapperSupplier(ServletConfig config) { - // Do not override an injected supplier through initialization - if (requestSupplier != null) { - return; - } - - String wrapperSupplierName = config.getInitParameter(WRAPPER_SUPPLIER_PARAM_NAME); - - if (StringUtils.isNotBlank(wrapperSupplierName)) { - try { - Class wrapperClass = Class.forName(wrapperSupplierName); - if (BiFunction.class.isAssignableFrom(wrapperClass)) { - requestSupplier = - (BiFunction) - wrapperClass.newInstance(); - } - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { - LOGGER.debug( - "Error converting {} to BiFunction; " - + "falling back to default", - wrapperSupplierName, - e); - } - } - - if (requestSupplier == null) { - requestSupplier = DEFAULT_REQ_FUNC; - } - } - - private void populateSparkApplications(ServletConfig config) { - // Do not override injected spark applications through initialization - if (!CollectionUtils.isEmpty(sparkApplications)) { - return; - } - - String applications = config.getInitParameter(APPLICATION_CLASS_PARAM); - - if (StringUtils.isNotBlank(applications)) { - sparkApplications.addAll( - Pattern.compile(",") - .splitAsStream(applications) - .map(String::trim) - .map(this::getApplication) - .filter(Objects::nonNull) - .collect(Collectors.toList())); - } - } - - private SparkApplication getApplication(String applicationClassName) { - try { - Class appClass = Class.forName(applicationClassName); - if (SparkApplication.class.isAssignableFrom(appClass)) { - return SparkApplication.class.cast(appClass.newInstance()); - } - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { - LOGGER.debug("Error converting {} to SparkApplication", applicationClassName, e); - } - - return null; - } - - private void writeObject(ObjectOutputStream stream) throws IOException { - throw new NotSerializableException(getClass().getName()); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { - throw new NotSerializableException(getClass().getName()); - } -} diff --git a/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/oauth/app/OAuthApplication.java b/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/oauth/app/OAuthApplication.java deleted file mode 100644 index 1f0a4fdd196..00000000000 --- a/ui-backend/catalog-ui-oauth/src/main/java/org/codice/ddf/catalog/ui/oauth/app/OAuthApplication.java +++ /dev/null @@ -1,319 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.oauth.app; - -import static javax.ws.rs.core.HttpHeaders.AUTHORIZATION; -import static javax.ws.rs.core.HttpHeaders.LOCATION; -import static javax.ws.rs.core.MediaType.TEXT_HTML; -import static org.apache.http.HttpStatus.SC_OK; -import static org.apache.http.HttpStatus.SC_SEE_OTHER; -import static spark.Spark.get; - -import com.google.common.annotations.VisibleForTesting; -import com.nimbusds.jose.util.DefaultResourceRetriever; -import com.nimbusds.jose.util.ResourceRetriever; -import com.nimbusds.jwt.JWT; -import com.nimbusds.oauth2.sdk.AuthorizationCode; -import com.nimbusds.oauth2.sdk.AuthorizationCodeGrant; -import com.nimbusds.oauth2.sdk.AuthorizationGrant; -import com.nimbusds.oauth2.sdk.ParseException; -import com.nimbusds.oauth2.sdk.auth.ClientAuthentication; -import com.nimbusds.oauth2.sdk.auth.ClientSecretBasic; -import com.nimbusds.oauth2.sdk.auth.Secret; -import com.nimbusds.oauth2.sdk.id.ClientID; -import com.nimbusds.oauth2.sdk.token.AccessToken; -import com.nimbusds.oauth2.sdk.token.RefreshToken; -import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; -import com.nimbusds.openid.connect.sdk.token.OIDCTokens; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.Map; -import javax.servlet.http.HttpSession; -import org.codice.ddf.configuration.SystemBaseUrl; -import org.codice.ddf.security.oidc.resolver.OidcCredentialsResolver; -import org.codice.ddf.security.oidc.validator.OidcTokenValidator; -import org.codice.ddf.security.oidc.validator.OidcValidationException; -import org.codice.ddf.security.token.storage.api.TokenInformation; -import org.codice.ddf.security.token.storage.api.TokenStorage; -import org.pac4j.core.exception.TechnicalException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.QueryParamsMap; -import spark.Response; -import spark.servlet.SparkApplication; - -public class OAuthApplication implements SparkApplication { - - private static final Logger LOGGER = LoggerFactory.getLogger(OAuthApplication.class); - - private static final String DISCOVERY_URL = "discovery_url"; - private static final String CLIENT_ID = "client_id"; - private static final String SECRET = "client_secret"; - private static final String SOURCE_ID = "source_id"; - private static final String STATE = "state"; - private static final String CODE = "code"; - private static final String REDIRECT_URI = "redirect_uri"; - private static final String REDIRECT_URL = - SystemBaseUrl.EXTERNAL.constructUrl("/search/catalog/internal/oauth"); - - private final TokenStorage tokenStorage; - private ResourceRetriever resourceRetriever; - - public OAuthApplication(TokenStorage tokenStorage) { - this.tokenStorage = tokenStorage; - this.resourceRetriever = new DefaultResourceRetriever(); - } - - @Override - public void init() { - /* - Endpoint called with a temporary authorization code when a user signs in to an OAuth - provider. This endpoint will make a call to the OAuth provider's token endpoint to exchange - the code for tokens and stores the access and refresh tokens in the token storage. Since the - login to the OAuth provider is done in a new tab, a call to this endpoint will close that - tab. - */ - get( - "/", - (req, res) -> { - QueryParamsMap paramsMap = req.queryMap(); - String state = paramsMap.get(STATE).value(); - String code = paramsMap.get(CODE).value(); - String redirectUri = paramsMap.get(REDIRECT_URI).value(); - - if (state == null || code == null) { - LOGGER.warn("Unable to process unknown state and/or code."); - return closeBrowser(res); - } - - Map stateMap = tokenStorage.getStateMap().remove(state); - if (stateMap == null) { - LOGGER.warn("Unable to process unknown state."); - return closeBrowser(res); - } - - HttpSession session = req.raw().getSession(false); - if (session == null) { - LOGGER.error("The user's session is not available."); - return closeBrowser(res); - } - - String sessionId = session.getId(); - if (sessionId == null) { - LOGGER.error("The user's session ID is not available."); - return closeBrowser(res); - } - - return processCodeFlow(res, sessionId, code, stateMap, redirectUri); - }); - - /* - Endpoint called when a user's tokens are available but the user needs to authorize the use of - their tokens against a given source. This endpoint will store the existing tokens in the - token storage under the authorized source. - */ - get( - "/auth", - (req, res) -> { - QueryParamsMap paramsMap = req.queryMap(); - String sourceId = paramsMap.get(SOURCE_ID).value(); - String redirectUri = paramsMap.get(REDIRECT_URI).value(); - String discoveryUrl = paramsMap.get(DISCOVERY_URL).value(); - - if (sourceId == null || discoveryUrl == null) { - LOGGER.warn("Unable to process unknown user state."); - return ""; - } - - HttpSession session = req.raw().getSession(false); - if (session == null) { - LOGGER.warn("The user's session is not available."); - return ""; - } - - String sessionId = session.getId(); - if (sessionId == null) { - LOGGER.warn("The user's session ID is not available."); - return ""; - } - - String accessToken = updateAuthorizedSource(sessionId, sourceId, discoveryUrl); - - if (redirectUri != null && accessToken != null) { - return closeBrowser(res, redirectUri, accessToken); - } - return ""; - }); - } - - /** - * Gets tokens from an existing source with the same discovery url and saves it to the given - * source id - * - * @param sessionId the session ID used to store tokens - * @param sourceId the source to save the tokens to - * @param discoveryUrl the metadata url of the OAuth provider - * @return the corresponding access token - */ - @VisibleForTesting - String updateAuthorizedSource(String sessionId, String sourceId, String discoveryUrl) { - TokenInformation tokenInformation = tokenStorage.read(sessionId); - - TokenInformation.TokenEntry tokenEntry = - tokenInformation - .getTokenEntries() - .values() - .stream() - .filter(entry -> discoveryUrl.equals(entry.getDiscoveryUrl())) - .findFirst() - .orElse(null); - - if (tokenEntry == null) { - return null; - } - - int status = - tokenStorage.create( - sessionId, - sourceId, - tokenEntry.getAccessToken(), - tokenEntry.getRefreshToken(), - discoveryUrl); - if (status != SC_OK) { - LOGGER.warn("Error updating user's authorized sources."); - } - - return tokenEntry.getAccessToken(); - } - - /** - * Processes tokens received through the authorization code flow. - * - * @param res - response - * @param sessionId - the session ID used to store tokens - * @param code - authorization code - * @param state - map containing user and OAuth provider information - * @param redirectUri - the uri to redirect to - */ - @VisibleForTesting - String processCodeFlow( - Response res, String sessionId, String code, Map state, String redirectUri) { - - String sourceId = (String) state.get(SOURCE_ID); - String clientId = (String) state.get(CLIENT_ID); - String clientSecret = (String) state.get(SECRET); - String discoveryUrl = (String) state.get(DISCOVERY_URL); - - if (clientId == null || clientSecret == null) { - LOGGER.error("Unable to find client id and secret for Oauth provider."); - return closeBrowser(res); - } - - OIDCProviderMetadata metadata; - OIDCTokens oidcTokens; - try { - metadata = - OIDCProviderMetadata.parse( - resourceRetriever.retrieveResource(new URL(discoveryUrl)).getContent()); - oidcTokens = getTokens(code, clientId, clientSecret, redirectUri, metadata); - - } catch (TechnicalException | IOException | com.nimbusds.oauth2.sdk.ParseException e) { - LOGGER.warn("Error getting tokens.", e); - return closeBrowser(res); - } - - if (oidcTokens == null) { - LOGGER.warn("Error getting tokens."); - return closeBrowser(res); - } - - JWT idToken = oidcTokens.getIDToken(); - AccessToken accessToken = oidcTokens.getAccessToken(); - RefreshToken refreshToken = oidcTokens.getRefreshToken(); - - try { - OidcTokenValidator.validateAccessToken( - accessToken, idToken, resourceRetriever, metadata, null); - } catch (OidcValidationException e) { - LOGGER.warn("Error validating access token.", e); - return closeBrowser(res); - } - - String refreshTokenValue = null; - if (refreshToken != null) { - refreshTokenValue = refreshToken.getValue(); - } - - String accessTokenValue = accessToken.getValue(); - int status = - tokenStorage.create(sessionId, sourceId, accessTokenValue, refreshTokenValue, discoveryUrl); - if (status != SC_OK) { - LOGGER.warn("Error storing user token."); - } - - if (redirectUri != null) { - return closeBrowser(res, redirectUri, accessTokenValue); - } - - return closeBrowser(res); - } - - private String closeBrowser(Response res) { - res.status(SC_OK); - res.type(TEXT_HTML); - return "

Thank you for signing in. Please close this window if it doesn't close automatically.

" - + ""; - } - - private String closeBrowser(Response res, String redirectUri, String accessToken) { - res.status(SC_SEE_OTHER); - res.header(LOCATION, redirectUri); - res.header(AUTHORIZATION, "Bearer " + accessToken); - return ""; - } - - @VisibleForTesting - OIDCTokens getTokens( - String code, - String clientId, - String clientSecret, - String redirectUri, - OIDCProviderMetadata metadata) - throws IOException, ParseException { - ClientAuthentication clientAuthentication = - new ClientSecretBasic(new ClientID(clientId), new Secret(clientSecret)); - - String redirect = REDIRECT_URL; - if (redirectUri != null) { - redirect = - redirect.concat( - "?" - + REDIRECT_URI - + "=" - + URLEncoder.encode(redirectUri, StandardCharsets.UTF_8.name())); - } - - AuthorizationGrant grant = - new AuthorizationCodeGrant(new AuthorizationCode(code), URI.create(redirect)); - return OidcCredentialsResolver.getOidcTokens(grant, metadata, clientAuthentication); - } - - @VisibleForTesting - void setResourceRetriever(ResourceRetriever resourceRetriever) { - this.resourceRetriever = resourceRetriever; - } -} diff --git a/ui-backend/catalog-ui-oauth/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/ui-backend/catalog-ui-oauth/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index e36c6d7ed4e..00000000000 --- a/ui-backend/catalog-ui-oauth/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-oauth/src/test/java/org/codice/ddf/catalog/ui/oauth/app/OAuthApplicationTest.java b/ui-backend/catalog-ui-oauth/src/test/java/org/codice/ddf/catalog/ui/oauth/app/OAuthApplicationTest.java deleted file mode 100644 index 6ddc667fae6..00000000000 --- a/ui-backend/catalog-ui-oauth/src/test/java/org/codice/ddf/catalog/ui/oauth/app/OAuthApplicationTest.java +++ /dev/null @@ -1,301 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.oauth.app; - -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.pac4j.core.context.HttpConstants.APPLICATION_JSON; -import static org.pac4j.oidc.profile.OidcProfileDefinition.AUTH_TIME; -import static org.pac4j.oidc.profile.OidcProfileDefinition.AZP; -import static org.pac4j.oidc.profile.OidcProfileDefinition.EMAIL_VERIFIED; -import static org.pac4j.oidc.profile.OidcProfileDefinition.PREFERRED_USERNAME; - -import com.auth0.jwt.JWTCreator; -import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.impl.PublicClaims; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.nimbusds.jose.jwk.JWK; -import com.nimbusds.jose.jwk.KeyUse; -import com.nimbusds.jose.jwk.RSAKey; -import com.nimbusds.jose.util.Resource; -import com.nimbusds.jose.util.ResourceRetriever; -import com.nimbusds.jwt.SignedJWT; -import com.nimbusds.oauth2.sdk.token.BearerAccessToken; -import com.nimbusds.oauth2.sdk.token.RefreshToken; -import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; -import com.nimbusds.openid.connect.sdk.token.OIDCTokens; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.interfaces.RSAPrivateKey; -import java.security.interfaces.RSAPublicKey; -import java.time.Duration; -import java.time.Instant; -import java.util.Date; -import java.util.Objects; -import java.util.UUID; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.security.token.storage.api.TokenInformation; -import org.codice.ddf.security.token.storage.api.TokenInformationImpl; -import org.codice.ddf.security.token.storage.api.TokenStorage; -import org.junit.Before; -import org.junit.Test; -import spark.Request; -import spark.Response; - -public class OAuthApplicationTest { - - private static final String DISCOVERY_URL = "discovery_url"; - private static final String CLIENT_ID = "client_id"; - private static final String SECRET = "client_secret"; - private static final String SOURCE_ID = "source_id"; - private static final String SESSION_ID = "sessionId"; - private static final String CSW_SOURCE = "CSW"; - private static final String ACCESS_TOKEN_VAL = "myAccessToken"; - private static final String REFRESH_TOKEN_VAL = "myRefreshToken"; - private static final String DDF_CLIENT_ID = "ddf-client"; - private static final String DDF_CLIENT_SECRET = "secret"; - private static final String METADATA_ENDPOINT = "http://localhost:8080/auth/master/metadata"; - private static final String JWK_ENDPOINT = - "http://localhost:8080/auth/realms/master/protocol/openid-connect/certs"; - - private OAuthApplicationWithMockCredentialResolver oauthApplication; - private TokenStorage tokenStorage; - private Algorithm validAlgorithm; - private Algorithm invalidAlgorithm; - private Request request; - - @Before - public void setUp() throws Exception { - HttpSession httpSession = mock(HttpSession.class); - when(httpSession.getId()).thenReturn(SESSION_ID); - - HttpServletRequest httpRequest = mock(HttpServletRequest.class); - when(httpRequest.getSession(false)).thenReturn(httpSession); - - request = mock(Request.class); - when(request.raw()).thenReturn(httpRequest); - - // Generate the RSA key pair to sign tokens - KeyPairGenerator gen = KeyPairGenerator.getInstance("RSA"); - gen.initialize(2048); - KeyPair keyPair = gen.generateKeyPair(); - RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); - RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); - - JWK sigJwk = - new RSAKey.Builder(publicKey) - .privateKey(privateKey) - .keyUse(KeyUse.SIGNATURE) - .keyID(UUID.randomUUID().toString()) - .build(); - - String jwk = "{\"keys\": [" + sigJwk.toPublicJWK().toJSONString() + "] }"; - validAlgorithm = Algorithm.RSA256(publicKey, privateKey); - invalidAlgorithm = Algorithm.HMAC256("WRONG"); - - ResourceRetriever resourceRetriever = mock(ResourceRetriever.class); - Resource jwkResource = new Resource(jwk, APPLICATION_JSON); - when(resourceRetriever.retrieveResource(eq(new URL(JWK_ENDPOINT)))).thenReturn(jwkResource); - - String content = - IOUtils.toString( - Objects.requireNonNull( - getClass().getClassLoader().getResourceAsStream("metadata.json")), - StandardCharsets.UTF_8); - Resource metadataResource = new Resource(content, APPLICATION_JSON); - when(resourceRetriever.retrieveResource(eq(new URL(METADATA_ENDPOINT)))) - .thenReturn(metadataResource); - - tokenStorage = mock(TokenStorage.class); - oauthApplication = new OAuthApplicationWithMockCredentialResolver(tokenStorage); - oauthApplication.setResourceRetriever(resourceRetriever); - } - - @Test - public void testGetCodeFlowTokens() throws Exception { - Response response = mock(Response.class); - String idToken = getIdTokenBuilder().sign(validAlgorithm); - String accessToken = getAccessTokenBuilder().sign(validAlgorithm); - - oauthApplication.oidcTokens = - new OIDCTokens( - SignedJWT.parse(idToken), - new BearerAccessToken(accessToken), - new RefreshToken(REFRESH_TOKEN_VAL)); - - oauthApplication.processCodeFlow( - response, - SESSION_ID, - "code", - ImmutableMap.of( - SOURCE_ID, - CSW_SOURCE, - DISCOVERY_URL, - METADATA_ENDPOINT, - CLIENT_ID, - DDF_CLIENT_ID, - SECRET, - DDF_CLIENT_SECRET), - "https://localhost:8993/services/redirect?where=here"); - verify(tokenStorage, times(1)) - .create(SESSION_ID, CSW_SOURCE, accessToken, REFRESH_TOKEN_VAL, METADATA_ENDPOINT); - } - - @Test - public void testGetCodeFlowTokensInvalidToken() throws Exception { - Response response = mock(Response.class); - - String idToken = getIdTokenBuilder().sign(validAlgorithm); - String accessToken = getAccessTokenBuilder().sign(invalidAlgorithm); - oauthApplication.oidcTokens = - new OIDCTokens( - SignedJWT.parse(idToken), - new BearerAccessToken(accessToken), - new RefreshToken(REFRESH_TOKEN_VAL)); - - oauthApplication.processCodeFlow( - response, - SESSION_ID, - "code", - ImmutableMap.of( - SOURCE_ID, - CSW_SOURCE, - DISCOVERY_URL, - METADATA_ENDPOINT, - CLIENT_ID, - DDF_CLIENT_ID, - SECRET, - DDF_CLIENT_SECRET), - "https://localhost:8993/services/redirect?where=here"); - verify(tokenStorage, times(0)) - .create(anyString(), anyString(), anyString(), anyString(), anyString()); - } - - @Test - public void testUpdateAuthorizedSource() { - TokenInformation.TokenEntry tokenEntry = - new TokenInformationImpl.TokenEntryImpl( - ACCESS_TOKEN_VAL, REFRESH_TOKEN_VAL, METADATA_ENDPOINT); - TokenInformation.TokenEntry tokenEntry2 = - new TokenInformationImpl.TokenEntryImpl( - "ACCESS_TOKEN", "REFRESH_TOKEN", "https://example.com/"); - - TokenInformation tokenInformation = mock(TokenInformation.class); - when(tokenInformation.getDiscoveryUrls()) - .thenReturn(ImmutableSet.of("https://localhost:8993/", "https://example.com/")); - when(tokenInformation.getTokenEntries()) - .thenReturn(ImmutableMap.of(CSW_SOURCE, tokenEntry, "OpenSearch", tokenEntry2)); - - when(tokenStorage.read(SESSION_ID)).thenReturn(tokenInformation); - oauthApplication.updateAuthorizedSource(SESSION_ID, "MySource", METADATA_ENDPOINT); - verify(tokenStorage, times(1)) - .create(SESSION_ID, "MySource", ACCESS_TOKEN_VAL, REFRESH_TOKEN_VAL, METADATA_ENDPOINT); - } - - @Test - public void testUpdateAuthorizedSourceWithNoMatchingUrls() { - TokenInformation.TokenEntry tokenEntry = - new TokenInformationImpl.TokenEntryImpl( - ACCESS_TOKEN_VAL, REFRESH_TOKEN_VAL, "https://localhost:8993/"); - TokenInformation.TokenEntry tokenEntry2 = - new TokenInformationImpl.TokenEntryImpl( - ACCESS_TOKEN_VAL, REFRESH_TOKEN_VAL, "https://example.com/"); - - TokenInformation tokenInformation = mock(TokenInformation.class); - when(tokenInformation.getDiscoveryUrls()) - .thenReturn(ImmutableSet.of("https://localhost:8993/", "https://example.com/")); - when(tokenInformation.getTokenEntries()) - .thenReturn(ImmutableMap.of(CSW_SOURCE, tokenEntry, "OpenSearch", tokenEntry2)); - - when(tokenStorage.read(SESSION_ID)).thenReturn(tokenInformation); - oauthApplication.updateAuthorizedSource(SESSION_ID, "MySource", METADATA_ENDPOINT); - verify(tokenStorage, times(0)) - .create(anyString(), anyString(), anyString(), anyString(), anyString()); - } - - private JWTCreator.Builder getIdTokenBuilder() { - String[] roles = {"create-realm", "offline_access", "admin", "uma_authorization"}; - - return com.auth0 - .jwt - .JWT - .create() - .withJWTId(UUID.randomUUID().toString()) - .withExpiresAt(new Date(Instant.now().plus(Duration.ofDays(3)).toEpochMilli())) - .withNotBefore(new Date(0)) - .withIssuedAt(new Date()) - .withIssuer("http://localhost:8080/auth/realms/master") - .withAudience("ddf-client") - .withSubject("subject") - .withClaim(PublicClaims.TYPE, "ID") - .withClaim(AUTH_TIME, new Date()) - .withArrayClaim("roles", roles) - .withClaim(EMAIL_VERIFIED, false) - .withClaim(PREFERRED_USERNAME, "admin"); - } - - private JWTCreator.Builder getAccessTokenBuilder() { - String[] audience = {"master-realm", "account"}; - String[] roles = {"create-realm", "offline_access", "admin", "uma_authorization"}; - - return com.auth0 - .jwt - .JWT - .create() - .withJWTId(UUID.randomUUID().toString()) - .withExpiresAt(new Date(Instant.now().plus(Duration.ofDays(3)).toEpochMilli())) - .withNotBefore(new Date(0)) - .withIssuedAt(new Date()) - .withIssuer("http://localhost:8080/auth/realms/master") - .withArrayClaim("aud", audience) - .withSubject("subject") - .withClaim("typ", "Bearer") - .withClaim(AZP, "ddf-client") - .withClaim("auth_time", new Date()) - .withArrayClaim("roles", roles) - .withClaim(EMAIL_VERIFIED, false) - .withClaim(PREFERRED_USERNAME, "admin"); - } - - /** - * {@link OAuthApplication} which overrides the getTokens method to return a mock instead of - * trying to make a call to get the tokens for testing purposes purposes - */ - private static class OAuthApplicationWithMockCredentialResolver extends OAuthApplication { - OIDCTokens oidcTokens; - - OAuthApplicationWithMockCredentialResolver(TokenStorage tokenStorage) { - super(tokenStorage); - } - - @Override - OIDCTokens getTokens( - String code, - String clientId, - String clientSecret, - String redirectUri, - OIDCProviderMetadata metadata) { - return oidcTokens; - } - } -} diff --git a/ui-backend/catalog-ui-oauth/src/test/resources/metadata.json b/ui-backend/catalog-ui-oauth/src/test/resources/metadata.json deleted file mode 100644 index cb27169b01d..00000000000 --- a/ui-backend/catalog-ui-oauth/src/test/resources/metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "issuer": "http://localhost:8080/auth/realms/master", - "authorization_endpoint": "http://localhost:8080/auth/realms/master/protocol/openid-connect/auth", - "token_endpoint": "http://localhost:8080/auth/realms/master/protocol/openid-connect/token", - "jwks_uri": "http://localhost:8080/auth/realms/master/protocol/openid-connect/certs", - "grant_types_supported": [ - "authorization_code", - "client_credentials" - ], - "response_types_supported": [ - "code" - ], - "subject_types_supported": [ - "public", - "pairwise" - ], - "id_token_signing_alg_values_supported": [ - "RS256" - ], - "response_modes_supported": [ - "form_post" - ], - "registration_endpoint": "http://localhost:8080/auth/realms/master/clients-registrations/openid-connect", - "token_endpoint_auth_methods_supported": [ - "private_key_jwt", - "client_secret_basic", - "client_secret_post", - "client_secret_jwt" - ], - "token_endpoint_auth_signing_alg_values_supported": [ - "RS256" - ] -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search-api/pom.xml b/ui-backend/catalog-ui-search-api/pom.xml deleted file mode 100644 index e264182408a..00000000000 --- a/ui-backend/catalog-ui-search-api/pom.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - 4.0.0 - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - catalog-ui-search-api - DDF :: Catalog :: UI :: Catalog UI Search API - bundle - - - ddf.catalog.core - catalog-core-api - ${ddf.version} - - - ddf.catalog.core - catalog-core-api-impl - ${ddf.version} - - - ddf.platform.util - platform-util - ${ddf.version} - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.0.0 - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId} - - org.codice.ddf.catalog.ui.metacard.workspace.transformer, - org.codice.ddf.catalog.ui.metacard.transformer, - org.codice.ddf.catalog.ui.splitter, - org.codice.ddf.catalog.ui.subscription, - org.codice.ddf.catalog.ui.validation, - org.codice.ddf.catalog.ui.validation.violation, - org.codice.ddf.catalog.ui.query.utility - - - catalog-core-api-impl, - platform-util - - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.33 - - - BRANCH - COVEREDRATIO - 0.28 - - - COMPLEXITY - COVEREDRATIO - 0.29 - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/CqlParseException.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/CqlParseException.java deleted file mode 100644 index c77f76c1c94..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/CqlParseException.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui; - -public class CqlParseException extends Exception { - public CqlParseException(Throwable cause) { - super(cause); - } -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/constants/ServicePropertiesConstants.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/constants/ServicePropertiesConstants.java deleted file mode 100644 index febf760f66d..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/constants/ServicePropertiesConstants.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.constants; - -public class ServicePropertiesConstants { - - public static final String MIME_TYPE = "mime-type"; - - /** Prevent instances of this class from being created. */ - private ServicePropertiesConstants() {} -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/transformer/CsvTransformImpl.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/transformer/CsvTransformImpl.java deleted file mode 100644 index be1d9c9dbe4..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/transformer/CsvTransformImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.transformer; - -import com.google.common.collect.ImmutableList; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.MetacardTypeImpl; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.query.utility.CsvTransform; - -public class CsvTransformImpl implements CsvTransform { - private boolean applyGlobalHidden = false; - - private Set hiddenFields; - - private List columnOrder; - - private Map columnAliasMap; - - // Transient so as not to be serialized to/from JSON - private transient List> metacards; - - public Set getHiddenFields() { - return hiddenFields; - } - - public void setHiddenFields(Set hiddenFields) { - this.hiddenFields = hiddenFields; - } - - public List getColumnOrder() { - return columnOrder; - } - - public void setColumnOrder(List columnOrder) { - this.columnOrder = columnOrder; - } - - public Map getColumnAliasMap() { - return columnAliasMap; - } - - public void setColumnAliasMap(Map columnAliasMap) { - this.columnAliasMap = columnAliasMap; - } - - public List> getMetacards() { - return metacards; - } - - public void setMetacards(List> metacards) { - this.metacards = metacards; - } - - public boolean isApplyGlobalHidden() { - return applyGlobalHidden; - } - - public void setApplyGlobalHidden(boolean applyGlobalHidden) { - this.applyGlobalHidden = applyGlobalHidden; - } - - public List getTransformedMetacards( - List metacardTypes, AttributeRegistry attributeRegistry) { - return metacards - .stream() - .map(mapMetacard -> transform(mapMetacard, metacardTypes, attributeRegistry)) - .collect(Collectors.toList()); - } - - @SuppressWarnings("unchecked") - private Metacard transform( - Map mapMetacard, - List metacardTypes, - AttributeRegistry attributeRegistry) { - - Map innerMap = - (Map) - mapMetacard // - .getOrDefault("metacard", new HashMap<>()); - Map properties = - (Map) - innerMap // - .getOrDefault("properties", new HashMap<>()); - - MetacardType metacardType = getMetacardType(properties, metacardTypes, attributeRegistry); - - Metacard metacard = new MetacardImpl(metacardType); - - properties - .entrySet() - .stream() - .filter(Objects::nonNull) - .filter(entry -> entry.getValue() != null) - .filter(this::isSerializableOrListOfSerializable) - .map(this::getAttribute) - .filter(Objects::nonNull) - .forEach(metacard::setAttribute); - - return metacard; - } - - private AttributeImpl getAttribute(Map.Entry entry) { - String key = entry.getKey(); - Object val = entry.getValue(); - - if (val instanceof List) { - return new AttributeImpl(key, (List) new ArrayList((List) val)); - } - - return new AttributeImpl(key, (Serializable) val); - } - - private boolean isSerializableOrListOfSerializable(Map.Entry entry) { - return entry.getValue() instanceof Serializable - || // - (entry.getValue() instanceof List // - && !((List) entry.getValue()).isEmpty() - && ((List) entry.getValue()).get(0) instanceof Serializable); - } - - private MetacardType getMetacardType( - Map mapMetacard, - List metacardTypes, - AttributeRegistry attributeRegistry) { - String metacardTypeName = (String) mapMetacard.getOrDefault("metacard-type", "ddf.metacard"); - - MetacardType metacardType = - metacardTypes - .stream() - .filter(type -> type.getName().equals(metacardTypeName)) - .findFirst() - .orElse(new MetacardTypeImpl(metacardTypeName, ImmutableList.of())); - - // Don't assume metacard type will contain all necessary attributes (eg, injected attributes) - Set existingAttributeDescriptors = - metacardType - .getAttributeDescriptors() - .stream() - .map(AttributeDescriptor::getName) - .collect(Collectors.toSet()); - - Set missingDescriptors = - mapMetacard - .keySet() - .stream() - .filter(key -> !existingAttributeDescriptors.contains(key)) - .map(attributeRegistry::lookup) - .filter(Optional::isPresent) - .map(Optional::get) - .collect(Collectors.toSet()); - - if (!missingDescriptors.isEmpty()) { - metacardType = new MetacardTypeImpl(metacardTypeName, metacardType, missingDescriptors); - } - return metacardType; - } -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceConstants.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceConstants.java deleted file mode 100644 index be99c6ce537..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceConstants.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace; - -public class WorkspaceConstants { - // If the tag changes, update the 'access-controlled-tag' service property as well - public static final String WORKSPACE_TAG = "workspace"; - - public static final String WORKSPACE_METACARDS = "metacards"; - - public static final String WORKSPACE_QUERIES = "queries"; - - public static final String WORKSPACE_SHARING = "metacard.sharing"; - - public static final String WORKSPACE_LISTS = "lists"; - - private WorkspaceConstants() {} -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/EmbeddedMetacardsHandler.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/EmbeddedMetacardsHandler.java deleted file mode 100644 index 70702eb8942..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/EmbeddedMetacardsHandler.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.MetacardImpl; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; - -/** - * This partial implementation of {@link WorkspaceTransformation} is intended to transform embedded - * metacard data in XML strings into JSON-style data maps. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public abstract class EmbeddedMetacardsHandler extends WorkspaceValueTransformation { - - @Override - public Class getMetacardValueType() { - return List.class; - } - - @Override - public Class getJsonValueType() { - return List.class; - } - - /** - * Wrap the given {@link Metacard} inside a new metacard with {@link #getMetacardType() the - * metacard type expected for this transformation}. This is necessary to prevent XML - * transformation classes from incorrectly setting the transformed {@link Metacard}'s {@link - * MetacardType}. - * - * @param metacard the {@link Metacard} to be wrapped and typed. - * @return a {@link Metacard} wrapping the given {@code metacard} with {@link #getMetacardType() - * the appropriate metacard type}. - */ - private Metacard setMetacardType(Metacard metacard) { - Metacard newMetacard = new MetacardImpl(getMetacardType()); - getMetacardType() - .getAttributeDescriptors() - .forEach( - descriptor -> newMetacard.setAttribute(metacard.getAttribute(descriptor.getName()))); - return newMetacard; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, List metacardXMLStrings, Metacard workspaceMetacard) { - return Optional.of( - ((List) metacardXMLStrings) - .stream() - .filter(String.class::isInstance) - .map(String.class::cast) - .map(transformer::xmlToMetacard) - .map(this::setMetacardType) - .map(metacard -> transformer.transform(workspaceMetacard, metacard)) - .collect(Collectors.toList())); - } - - @Override - public Optional jsonValueToMetacardValue( - WorkspaceTransformer transformer, List metacardJsonData) { - return Optional.of( - ((List) metacardJsonData) - .stream() - .filter(Map.class::isInstance) - .map(Map.class::cast) - .map( - queryJson -> { - final Metacard metacard = new MetacardImpl(getMetacardType()); - transformer.transformIntoMetacard((Map) queryJson, metacard); - return metacard; - }) - .map(transformer::metacardToXml) - .collect(Collectors.toList())); - } - - /** - * @return the {@link MetacardType} that the XML strings and JSON-style data maps are expected to - * describe. - */ - public abstract MetacardType getMetacardType(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceKeyTransformation.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceKeyTransformation.java deleted file mode 100644 index 2e10d9008fe..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceKeyTransformation.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer; - -import ddf.catalog.data.Metacard; -import java.util.Optional; - -/** - * This partial implementation of {@link - * org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformation} contains - * default implementations of value transformation related interface methods that accept any Objects - * and return the same values. Implementations of this interface are therefore only able to change - * the key between a metacard attribute and a JSON-style key-value pair; the value remains - * consistent. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public abstract class WorkspaceKeyTransformation - implements WorkspaceTransformation { - @Override - public Class getMetacardValueType() { - return Object.class; - } - - @Override - public Class getJsonValueType() { - return Object.class; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, Object metacardValue, Metacard workspaceMetacard) { - return Optional.of(metacardValue); - } - - @Override - public Optional jsonValueToMetacardValue( - WorkspaceTransformer transformer, Object jsonValue) { - return Optional.of(jsonValue); - } -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceTransformation.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceTransformation.java deleted file mode 100644 index 04bd125fed5..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceTransformation.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer; - -import ddf.catalog.data.Metacard; -import java.util.Optional; - -/** - * A representation of one key-value transformation for the {@link WorkspaceTransformer}. - * Implementations of this interface can be used to transform JSON-style key-value pairs into - * metacard attributes and vice versa, especially from and into workspace metacards. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - * - * @param the expected type of metacard values handled by this {@link WorkspaceTransformation} - * @param the expected type of JSON-style key-value pair values handled by this {@link - * WorkspaceTransformation} - */ -public interface WorkspaceTransformation { - /** - * @return the metacard attribute name associated with both the metacard value passed into {@link - * #metacardValueToJsonValue(WorkspaceTransformer, Object, Metacard) metacardValueToJsonValue} - * and the metacard value returned from {@link #jsonValueToMetacardValue(WorkspaceTransformer, - * Object) jsonValueToMetacardValue} - */ - String getMetacardKey(); - - /** - * @return the JSON-style key associated with both the JSON-style value passed into {@link - * #jsonValueToMetacardValue(WorkspaceTransformer, Object) jsonValueToMetacardValue} and the - * JSON-style value returned from {@link #metacardValueToJsonValue(WorkspaceTransformer, - * Object, Metacard) metacardValueToJsonValue} - */ - String getJsonKey(); - - /** - * @return the class that the given and returned metacard values are expected to be an instance of - */ - Class getMetacardValueType(); - - /** - * @return the class that the given and returned JSON-style values are expected to be an instance - * of - */ - Class getJsonValueType(); - - /** - * The method by which this {@link WorkspaceTransformation} transforms a metacard attribute value - * into a corresponding value for a key-value pair for a JSON-style data map. Returning {@link - * Optional#empty()} will result in no corresponding JSON-style key-value pair being added to the - * final JSON-style data map transformation product. - * - * @param transformer the {@link WorkspaceTransformer} that is transforming the given metacard - * value - * @param metacardValue the metacard attribute value to be transformed; this will be an instance - * of this {@link WorkspaceTransformation}'s {@link #getMetacardValueType() expected metacard - * type} and will come from a metacard's attribute with the given {@link #getMetacardKey() - * expected metacard key}. - * @param workspaceMetacard the {@link Metacard} that houses workspace data. - * @return a new value to be used as the value in a JSON-style data map with this {@link - * WorkspaceTransformation}'s {@link #getJsonKey() JSON key} or {@link Optional#empty()}; the - * value inside a non-empty {@link Optional} will be an instance of this {@link - * WorkspaceTransformation}'s {@link #getJsonValueType() expected JSON type} - */ - Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, M metacardValue, Metacard workspaceMetacard); - - /** - * The method by which this {@link WorkspaceTransformation} transforms the value of a JSON-style - * key-value pair into a corresponding a metacard attribute value. Returning {@link - * Optional#empty()} will result in no corresponding metacard attribute being added to the final - * metacard transformation product. - * - * @param transformer the {@link WorkspaceTransformer} that is transforming the given JSON-style - * value - * @param jsonValue the JSON-style value to be transformed; this will be an instance of this - * {@link WorkspaceTransformation}'s {@link #getJsonValueType() expected JSON type} and will - * come from a JSON-style data map's key-value pair with the given {@link #getJsonKey() - * expected JSON key}. - * @return a new value to be used as the value in a metacard attribute with this {@link - * WorkspaceTransformation}'s {@link #getMetacardKey() metacard key} or {@link - * Optional#empty()}; the value inside a non-empty {@link Optional} will be an instance of - * this {@link WorkspaceTransformation}'s {@link #getMetacardValueType() expected metacard - * type} - */ - Optional jsonValueToMetacardValue(WorkspaceTransformer transformer, J jsonValue); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceTransformer.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceTransformer.java deleted file mode 100644 index 28021baeaa9..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceTransformer.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer; - -import ddf.catalog.data.Metacard; -import java.util.List; -import java.util.Map; - -/** - * A utility used to convert workspace metacard data between the JSON data expected from frontend - * responses and the {@link Metacard} objects used in the backend. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public interface WorkspaceTransformer { - /** - * Transforms the given metacard JSON data according to available {@link WorkspaceTransformation}s - * and inserts the results into the given {@link Metacard} object. - * - * @param json the JSON-style map representing the metacard data - * @param init the {@link Metacard} into which the transformed data will be inserted - */ - void transformIntoMetacard(Map json, Metacard init); - - /** - * Transforms the given metacard JSON data into a new {@link Metacard} object. - * - * @param json the JSON-style map representing the metacard data - * @return a new {@link Metacard} containing the results of {@link WorkspaceTransformation}s of - * the given JSON data - */ - Metacard transform(Map json); - - /** - * Transforms the given workspace {@link Metacard} into a JSON-style key-value pair {@link Map} - * using all available {@link WorkspaceTransformation}s. - * - * @param workspaceMetacard the workspace-type {@link Metacard} to be transformed - * @return a new JSON-style {@link Map} containing the results of {@link WorkspaceTransformation}s - * performed on the given workspace {@link Metacard}'s data - */ - Map transform(Metacard workspaceMetacard); - - /** - * Transforms the given {@link Metacard} {@code metacard} into a JSON-style key-value pair {@link - * Map} using all available {@link WorkspaceTransformation}s. - * - * @param workspaceMetacard the workspace metacard that started the transformation - * @param metacard the {@link Metacard} to transform into JSON-style data; this will either be - * equivalent to the argument {@code workspaceMetacard} or will be a {@link Metacard} embedded - * inside {@code workspaceMetacard} - * @return a new JSON-style {@link Map} containing the results of {@link WorkspaceTransformation}s - * performed on the given {@link Metacard}'s data - */ - Map transform(Metacard workspaceMetacard, Metacard metacard); - - /** - * Transforms a list of {@link Metacard}s into JSON-style data maps. - * - * @param metacards the list of {@link Metacard}s to be transformed. - * @return a list of new JSON-style {@link Map}s containing the result of each {@link Metacard}'s - * data run through all available {@link WorkspaceTransformation}s - */ - List> transform(List metacards); - - /** - * Losslessly serializes a {@link Metacard} into an XML string. - * - * @param metacard the {@link Metacard} to be serialized into XML - * @return an XML string representing all data contained within the given {@link Metacard} - */ - String metacardToXml(Metacard metacard); - - /** - * Losslessly deserializes an XML string into a new {@link Metacard} object. - * - * @param xml the XML string to parse into a {@link Metacard} object - * @return a new {@link Metacard} containing all of the data available in the given XML string - */ - Metacard xmlToMetacard(String xml); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceValueTransformation.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceValueTransformation.java deleted file mode 100644 index abe9514dc98..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/WorkspaceValueTransformation.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer; - -/** - * This partial implementation of {@link WorkspaceTransformation} makes the expected metacard - * attribute name and JSON-style key one and the same. Implementations of this interface are - * therefore only able to change the value between a metacard attribute and a JSON-style key-value - * pair; the key remains consistent. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - * - * @param See {@link WorkspaceTransformation}. - * @param See {@link WorkspaceTransformation}. - */ -public abstract class WorkspaceValueTransformation implements WorkspaceTransformation { - @Override - public String getJsonKey() { - return getKey(); - } - - @Override - public String getMetacardKey() { - return getKey(); - } - - /** - * @return the String representing both the JSON-style key and the metacard attribute name used by - * this {@link WorkspaceTransformation} - */ - public abstract String getKey(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlQueries.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlQueries.java deleted file mode 100644 index 769ca779e65..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlQueries.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -import ddf.catalog.federation.FederationException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import org.codice.ddf.catalog.ui.CqlParseException; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface CqlQueries { - CqlQueryResponse executeCqlQuery(CqlRequest cqlRequest) - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - CqlParseException; - - CqlRequest getCqlRequestFromJson(String jsonBody); - - CsvTransform getCsvTransformFromJson(String jsonBody); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlQueryResponse.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlQueryResponse.java deleted file mode 100644 index 7e63793a6c0..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlQueryResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -import ddf.catalog.operation.QueryResponse; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface CqlQueryResponse { - - QueryResponse getQueryResponse(); - - List getResults(); - - Map> getTypes(); - - String getId(); - - Set getWarnings(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlRequest.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlRequest.java deleted file mode 100644 index 3a4fc34c95f..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlRequest.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import java.util.List; -import java.util.Set; -import org.codice.ddf.catalog.ui.CqlParseException; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface CqlRequest { - - String getCacheId(); - - void setCacheId(String cacheId); - - Set getFacets(); - - void setFacets(Set facets); - - List getSrcs(); - - String getSrc(); - - void setQueryType(String queryType); - - String getQueryType(); - - void setBatchId(String batchId); - - String getBatchId(); - - void setSpellcheck(boolean spellcheck); - - boolean getSpellcheck(); - - void setPhonetics(boolean phonetics); - - boolean getPhonetics(); - - void setAdditionalOptions(String additionalOptions); - - String getAdditionalOptions(); - - void setSrc(String src); - - void setSrcs(List srcs); - - long getTimeout(); - - void setTimeout(long timeout); - - int getStart(); - - void setStart(int start); - - int getCount(); - - void setCount(int count); - - String getCql(); - - void setCql(String cql); - - List getSorts(); - - void setSorts(List sorts); - - boolean isNormalize(); - - void setNormalize(boolean normalize); - - QueryRequest createQueryRequest(String localSource, FilterBuilder filterBuilder) - throws CqlParseException; - - String getSourceResponseString(); - - String getSource(); - - String getId(); - - void setId(String id); - - boolean isExcludeUnnecessaryAttributes(); - - void setExcludeUnnecessaryAttributes(boolean excludeUnnecessaryAttributes); - - boolean isFromUI(); - - void setFromUI(boolean fromUI); - - public static class Sort { - - private String attribute; - private String direction; - - public Sort(String attribute, String direction) { - this.attribute = attribute; - this.direction = direction; - } - - public String getAttribute() { - return attribute; - } - - public void setAttribute(String attribute) { - this.attribute = attribute; - } - - public String getDirection() { - return direction; - } - - public void setDirection(String direction) { - this.direction = direction; - } - } -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlResult.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlResult.java deleted file mode 100644 index 61562ffa7a2..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CqlResult.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -import ddf.action.Action; -import java.util.List; -import java.util.Map; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface CqlResult { - Map getMetacard(); - - Double getDistance(); - - Double getRelevance(); - - List getActions(); - - boolean getHasThumbnail(); - - boolean getIsResourceLocal(); - - Map getMatches(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CsvTransform.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CsvTransform.java deleted file mode 100644 index 476265e365f..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/CsvTransform.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface CsvTransform { - Set getHiddenFields(); - - void setHiddenFields(Set hiddenFields); - - List getColumnOrder(); - - void setColumnOrder(List columnOrder); - - Map getColumnAliasMap(); - - void setColumnAliasMap(Map columnAliasMap); - - List> getMetacards(); - - void setMetacards(List> metacards); - - boolean isApplyGlobalHidden(); - - void setApplyGlobalHidden(boolean applyGlobalHidden); - - List getTransformedMetacards( - List metacardTypes, AttributeRegistry attributeRegistry); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/EndpointUtility.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/EndpointUtility.java deleted file mode 100644 index 6228e514df3..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/EndpointUtility.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -import ddf.catalog.data.Result; -import java.util.Map; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface EndpointUtility { - Map getMetacardsByTag(String tagStr); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/MetacardAttribute.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/MetacardAttribute.java deleted file mode 100644 index 2193d5e48aa..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/MetacardAttribute.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface MetacardAttribute { - - boolean getMultivalued(); - - boolean getIndexed(); - - String getFormat(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/QueryRequestFactory.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/QueryRequestFactory.java deleted file mode 100644 index e396761322b..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/QueryRequestFactory.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import java.util.List; -import java.util.Set; -import javax.annotation.Nullable; -import org.codice.ddf.catalog.ui.CqlParseException; - -/** - * This is a factory that builds a QueryRequest object based on several query parameters. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * * be removed in a future version of the library. - */ -public interface QueryRequestFactory { - - QueryRequest build( - String localSource, - FilterBuilder filterBuilder, - List sorts, - int start, - int count, - long timeout, - String id, - String cql, - @Nullable String src, - @Nullable List srcs, - boolean isExcludeUnnecessaryAttribute, - @Nullable String batchId, - @Nullable String queryType, - boolean isSpellcheck, - boolean isPhonetics, - @Nullable String cacheId, - @Nullable Set facets, - boolean fromUI) - throws CqlParseException; -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/Status.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/Status.java deleted file mode 100644 index 56fb2a49ba8..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/query/utility/Status.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.utility; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface Status { - long getHits(); - - long getElapsed(); - - String getId(); - - long getCount(); - - boolean getSuccessful(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/ServiceProperties.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/ServiceProperties.java deleted file mode 100644 index 56dc291b8dd..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/ServiceProperties.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter; - -import java.util.Map; -import java.util.Set; -import javax.activation.MimeType; - -/** This represents the basic properties associated with transformers. */ -public interface ServiceProperties { - - /** The transformer ID. */ - String getId(); - - /** The set of mime-types handled by the transformer. */ - Set getMimeTypes(); - - /** All properties associated with the transformer. */ - Map getProperties(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/Splitter.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/Splitter.java deleted file mode 100644 index 78436aa10c1..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/Splitter.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter; - -import java.io.IOException; -import java.io.Serializable; -import java.util.Map; -import java.util.stream.Stream; - -/** Split a resource into a stream of resources. */ -public interface Splitter extends ServiceProperties { - - /** - * Callers must call {@link Stream#close()} on the stream and must call {@link - * StorableResource#close()} on each item in the stream. - * - * @param storableResource the resource to split - * @param arguments any arguments to be used in the transformation. Keys are specific to each - * {@link Splitter} implementation - * @return a stream of StorableResource - * @throws IOException if there is an error splitting and moves on to the next splitting service - * @throws StopSplitterExecutionException if there is an error splitting and execution flow must - * be killed - */ - Stream split( - StorableResource storableResource, Map arguments) - throws IOException, StopSplitterExecutionException; -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/SplitterLocator.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/SplitterLocator.java deleted file mode 100644 index 8f802c7ada0..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/SplitterLocator.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter; - -import java.util.List; -import javax.activation.MimeType; - -/** Locate {@link Splitter} services based on the mime-type of the content being split. */ -public interface SplitterLocator { - - /** - * Find the {@link Splitter}s that can handle the given mime-type. - * - * @param mimeType the mime-type of the content to be split - * @return list of splitters - */ - List find(MimeType mimeType); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/StopSplitterExecutionException.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/StopSplitterExecutionException.java deleted file mode 100644 index b047f163606..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/StopSplitterExecutionException.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter; - -/** - * Used when splitting through specific file type(s) fails and prevents other splitter services from - * running. - */ -public class StopSplitterExecutionException extends Exception { - - /** - * This exception should be used to terminate execution when parsing files of certain mimetypes. - * - * @param str the {@link String} exception message - */ - public StopSplitterExecutionException(String str) { - super(str); - } -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/StorableResource.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/StorableResource.java deleted file mode 100644 index 846740e4201..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/splitter/StorableResource.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Optional; - -/** Call {@link #close()} if {@link #isError()} returns {@code false}. */ -public interface StorableResource extends AutoCloseable { - - /** - * The caller is not responsible for calling {@link InputStream#close()} on the returned stream. - * However, the caller is responsible for calling {@link AutoCloseable#close()}. - * - * @return - * @throws IOException - */ - InputStream getInputStream() throws IOException; - - Optional getMimeType(); - - String getFilename(); - - boolean isError(); - - String getErrorMessage(); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/subscription/SubscriptionsPersistentStore.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/subscription/SubscriptionsPersistentStore.java deleted file mode 100644 index 5a5272d571c..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/subscription/SubscriptionsPersistentStore.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.subscription; - -import java.util.Set; - -public interface SubscriptionsPersistentStore { - - /** - * Associate a set of email addresses with an ID. Adding an email that is already associated with - * an ID is a no-op. - * - * @param id must be non-null and non-blank - * @param emails must be non-null and elements must be non-blank - */ - void addEmails(String id, Set emails); - - /** - * Associate an email address with an ID. Adding an email that is already assoicated with an ID is - * a no-op. - * - * @param id must be non-null and non-blank - * @param email must be non-null and non-blank - */ - void addEmail(String id, String email); - - /** - * Remove all emails that have been associated with an ID. - * - * @param id must be non-null and non-blank - */ - void removeAllEmails(String id); - - /** - * Remove a set of emails that have been associated with an ID. Removing an email that is not - * associated with an ID is a no-op. - * - * @param id must be non-null and non-blank - * @param emails must be non-null and elements must be non-blank - */ - void removeEmails(String id, Set emails); - - /** - * Remove an email that has been associated with an ID. Removing an email that is not associated - * with an ID is a no-op. - * - * @param id must be non-null and non-blank - * @param email must be non-null - */ - void removeEmail(String id, String email); - - /** - * Get the set of emails that have been associated with an ID. - * - * @param id must be non-null and non-blank - * @return a non-null set of email addresses - */ - Set getEmails(String id); - - /** - * Get the set of subscription ids that have been associated with an email. - * - * @param email must be non-null and non-blank - * @return a non-null set of email addresses - */ - Set getSubscriptions(String email); - - /** - * Remove a subscription. - * - * @param id must be non-null and non-blank - */ - void removeSubscriptions(String id); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/validation/QueryValidator.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/validation/QueryValidator.java deleted file mode 100644 index f9bdecbe230..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/validation/QueryValidator.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validation; - -import ddf.catalog.operation.QueryRequest; -import java.util.Set; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation; - -/** - * A {@code QueryRequest} may be structurally valid but be semantically incorrect. For example, a - * {@code QueryRequest} might include a valid {@code Filter} but the specified source may not - * support it. A {@code QueryValidator} inspects a {@link QueryRequest} for these types of - * violations. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public interface QueryValidator { - - /** - * Returns the unique identifier corresponding to this validator instance. This is used as a - * marker to determine which violations were created by each validator instance. - * - * @return the id of this validator - */ - String getValidatorId(); - - /** - * Validates a {@link QueryRequest} for semantic correctness. - * - * @param request - the {@link QueryRequest} to validate - * @return a {@code Set} of violations found in the {@code request}. - */ - Set validate(QueryRequest request); -} diff --git a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/validation/violation/QueryValidationViolation.java b/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/validation/violation/QueryValidationViolation.java deleted file mode 100644 index bfa049e58dc..00000000000 --- a/ui-backend/catalog-ui-search-api/src/main/java/org/codice/ddf/catalog/ui/validation/violation/QueryValidationViolation.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validation.violation; - -import java.util.Map; - -/** - * Describes a violation of a constraint on query. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public interface QueryValidationViolation { - /** - * Describes the severity of a validation violation. An error is a violation severe enough to - * cause validation to fail, and a warning is a less severe violation unrelated to validation - * failure. - */ - enum Severity { - WARNING, - ERROR - } - - /** - * Returns the severity of the violation. Cannot return null. - * - * @return the severity - */ - Severity getSeverity(); - - /** - * Returns a message describing the violation. Cannot return null. - * - * @return the message - */ - String getMessage(); - - /** - * Returns supplemental information about the violation. This is structured data that is more - * easily parsable than the message. Cannot return null. - * - * @return a map of supplemental information - */ - Map getExtraData(); -} diff --git a/ui-backend/catalog-ui-search/README.md b/ui-backend/catalog-ui-search/README.md deleted file mode 100644 index afc6425468f..00000000000 --- a/ui-backend/catalog-ui-search/README.md +++ /dev/null @@ -1,309 +0,0 @@ -## Internal Documentation for the Intrigue Backend - -This is internal documentation. Some of the data structures documented here are either subject to -change or are not publicly exposed. - -### Maintaining the blueprint files - -Catalog UI Search's blueprint definitions have been broken up into four files, each of which is further -subdivided by exposed functionality. Any component that has an ID can be referenced by that ID across -the different XML files. - -The files exist to organize components with respect to the coupling between Catalog UI Search and DDF: - -1. `endpoints.xml` is where exposed networking services live that the UI itself will consume. -1. `provides.xml` is for publishing OSGi services **to** DDF to support the container itself and other distributions. -1. `consumes.xml` is for retrieving OSGi services **from** DDF to support the UI. -1. `blueprint.xml` is for beans, objects, and implementation details supporting the above. - -Before adding services to the `provides.xml` file, consider alternative approaches to supply DDF with the -services it needs. - -Before adding more code to `EndpointUtil`, consider a separate class or splitting up existing logic into -a separate class that does one thing, and one thing really well. - -Within the files, sections exist to organize components with respect to the functionality they enable: - -1. Simple apps that just proxy existing interfaces, such as catalog services or auth services. -1. Major apps, such as querying, workspaces, search forms, and other logical groups of REST services. -1. Plugins that define policies that Intrigue relies on. - -New, refined, or refactored functionality should update the sections accordingly. - -### Spark Applications Overview - -The Intrigue backend is comprised of multiple Spark applications. -They represent logical groups of functions, exposed over REST, and are as follows: - -- Configuration Application - provides access to Intrigue's configuration as set by the system administrator -- Forms Application - provides access to custom search forms so users only work with fields they care about -- Metacard Application - provides various CRUD operations on metacards and their respective data such as - types, validation details, history, associations, subscriptions, and annotations; primarily designed to work - with non-resource metacards such as workspaces -- Query Application - provides support for querying the catalog with CQL -- Feedback Application - allows users to submit feedback about queries - -### CXF Endpoints - -Some functionality is defined using JAX-RS instead of Spark. - -- Metacard Edit Endpoint - allows the updating of metacards - -### Intrigue Data Expectations - -#### Filters - -Intrigue currently represents a filter using the tokens of CQL in a JSON object hierarchy. The -key fields on each terminal node in the hierarchy are: - -- `type` - name of the operation to perform as a upper-case string -- `property` - name of the property to operate on -- `value` - value of the property to operate on; it can be: - - Primitive type (int, double, boolean, or string - float not supported) - - Temporal data (a DateTime object) specified as a string in ISO 8601 format (GML time range not supported) - - Spatial data as a WKT string - -For nodes that are logical operations and contain other nodes, they forgo the `property` and `value` -fields in favor of a `filters` field, which is a list of nodes. - -Examples of this data structure are included for reference. - -##### Bounding-Box with Temporal Range - -``` -{ - "type": "AND", - "filters": [ - { - "type": "OR", - "filters": [ - { - "type": "BEFORE", - "property": "\"created\"", - "value": "2018-02-17T23:24:15.701Z" - }, - { - "type": "BEFORE", - "property": "\"modified\"", - "value": "2018-02-17T23:24:15.701Z" - }, - { - "type": "BEFORE", - "property": "\"effective\"", - "value": "2018-02-17T23:24:15.701Z" - }, - { - "type": "BEFORE", - "property": "\"metacard.created\"", - "value": "2018-02-17T23:24:15.701Z" - }, - { - "type": "BEFORE", - "property": "\"metacard.modified\"", - "value": "2018-02-17T23:24:15.701Z" - } - ] - }, - { - "type": "OR", - "filters": [ - { - "type": "AFTER", - "property": "\"created\"", - "value": "2018-02-08T23:24:12.709Z" - }, - { - "type": "AFTER", - "property": "\"modified\"", - "value": "2018-02-08T23:24:12.709Z" - }, - { - "type": "AFTER", - "property": "\"effective\"", - "value": "2018-02-08T23:24:12.709Z" - }, - { - "type": "AFTER", - "property": "\"metacard.created\"", - "value": "2018-02-08T23:24:12.709Z" - }, - { - "type": "AFTER", - "property": "\"metacard.modified\"", - "value": "2018-02-08T23:24:12.709Z" - } - ] - }, - { - "type": "INTERSECTS", - "property": "anyGeo", - "value": "POLYGON((-105.91230761661996 31.9334620191689,-105.91230761661996 38.0176324006135,-95.51632701146173 38.0176324006135,-95.51632701146173 31.9334620191689,-105.91230761661996 31.9334620191689))" - } - ] -} -``` - -##### Lat-Lon - -``` -{ - "type": "AND", - "filters": [ - { - "type": "DWITHIN", - "property": "anyGeo", - "value": "POINT(-95.65792005395343 36.13061496061506)", - "distance": 0.000001 - } - ] -} -``` - -##### Line - -``` -{ - "type": "AND", - "filters": [ - { - "type": "DWITHIN", - "property": "anyGeo", - "value": "LINESTRING(-117.13230471468687 44.14686910368135,-115.76807564454025 39.98312582991066,-113.48157584359824 37.912516776342436,-111.32735611138365 40.816915235679254,-114.55723858194943 42.52119725321046,-117.29871236281292 44.078654446842506)", - "distance": 1 - } - ] -} -``` - -##### Point-Radius - -``` -{ - "type": "AND", - "filters": [ - { - "type": "DWITHIN", - "property": "anyGeo", - "value": "POINT(-93.25696492774843 43.14514690567744)", - "distance": 0.000001 - } - ] -} -``` - -##### USNG with Type Constraints - -``` -{ - "type": "AND", - "filters": [ - { - "type": "INTERSECTS", - "property": "anyGeo", - "value": "POLYGON((-104.41136226817798 38.19888480954465,-104.41136226817798 41.33692635632009,-103.42550211052009 41.33692635632009,-103.42550211052009 38.19888480954465,-104.41136226817798 38.19888480954465))" - }, - { - "type": "OR", - "filters": [ - { - "type": "ILIKE", - "property": "\"metadata-content-type\"", - "value": "Moving Image" - }, - { - "type": "ILIKE", - "property": "\"datatype\"", - "value": "Moving Image" - } - ] - } - ] -} -``` - -##### UTM - -``` -{ - "type": "AND", - "filters": [ - { - "type": "INTERSECTS", - "property": "anyGeo", - "value": "POLYGON((-171.11428227015105 41.03150897992597,-171.11428227015105 42.69309383179558,-112.89261713634725 42.69309383179558,-112.89261713634725 41.03150897992597,-171.11428227015105 41.03150897992597))" - } - ] -} -``` - -### Application Details - -#### Forms Application - -Search forms are custom query interfaces created by the system or user that only show query controls -that the user is interested in. They effectively hide the complexity of very large query filters while -allowing a small set of values to be plugged into predetermined locations within the filter tree. Search -forms also support the notion of "detail level" which limits what attributes are rendered when viewing -results. Search forms are powered by filter templates and detail levels are powered by attribute groups. - -##### Filter XML 2.0 - -Filter templates and attribute groups are persisted in the catalog as metacards. Attribute groups are -simple: they only specify a set of attribute descriptor names. Filter templates store the templated -filter data as [Filter XML 2.0](http://schemas.opengis.net/filter/2.0/) and leverage functions to -act as a placeholder when user input is needed. - -Comprehensive examples can be found in `catalog-ui-search/src/test/resources/forms/filter2` for reference. -They are arranged by classification according to the bindings provided by `mvn:org.jvnet.ogc/filter-v_2_0/2.6.1` -which scrutinize by the number of parameters needed to construct a given JAXB type and the possible values -that can exist on a JAXB type (i.e. serializable literals vs more XML). - -Some operation types have incomplete examples. The instances of these types are listed here for reference. - -##### Spatial Binary Ops - -Spatial Ops are supported by templates **only** when defined using functions for passthrough to user -input. GML cannot yet be used to specify constant location data on a template that's hidden away from -the user. - -Currently only `Intersects` and `Disjoint` are supported by Intrigue (from Filter 1.1): - -`Intersects` - Tests whether two geometries intersect (example provided) -`Disjoint` - Tests whether two geometries are disjoint (example provided) - -Unsupported: - -`Contains` - Tests whether a geometry contains another one -`Within` - Tests whether a geometry is within another one -`Touches` - Tests whether two geometries touch -`Crosses` - Tests whether two geometries cross -`Overlaps` - Tests whether two geometries overlap -`Equals` - Tests whether two geometries are topologically equal - -##### Temporal Ops - -Temporal Ops are **not yet supported** by templates for any use case. - -Currently only `After` and `Before` are supported by Intrigue (from Filter 1.1): - -`After` - tests whether a time instant occurs _after_ another -`Before` - tests whether a time instant occurs _before_ another -`During` - tests whether a time instant occurs _between_ a time range defined as `value`/`value`, exclusive -Unsupported: - -``` -TEquals (example provided) -Begins -BegunBy -TContains -EndedBy -Ends -Meets -MetBy -TOverlaps -OverlapedBy -AnyInteracts -``` - -Also note that Filter 2.0 adds complex temporal value support via GML, as shown in `temporal-ops/gml` -vs the simple style shown in `temporal-ops/literal`. diff --git a/ui-backend/catalog-ui-search/catalog-ui-search.xml b/ui-backend/catalog-ui-search/catalog-ui-search.xml deleted file mode 100644 index b47d5e2d834..00000000000 --- a/ui-backend/catalog-ui-search/catalog-ui-search.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - src - - zip - - - - ${project.basedir}/src - src - - - diff --git a/ui-backend/catalog-ui-search/pom.xml b/ui-backend/catalog-ui-search/pom.xml deleted file mode 100644 index 656839bafbd..00000000000 --- a/ui-backend/catalog-ui-search/pom.xml +++ /dev/null @@ -1,564 +0,0 @@ - - - - 4.0.0 - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - catalog-ui-search - DDF :: Catalog :: UI :: Catalog UI Search - bundle - - - jakarta.xml.bind - jakarta.xml.bind-api - - - org.glassfish.jaxb - jaxb-runtime - - - org.jvnet.ogc - filter-v_2_0 - ${jvnet-ogc.version} - - - org.jvnet.ogc - ows-v_1_1_0-schema - ${ows-v_1_0_0-schema.version} - - - org.jvnet.jaxb2_commons - jaxb2-basics-runtime - ${jvnet.jaxb2.version} - - - - ddf.platform - branding-api - ${ddf.version} - - - ddf.lib - tlmatcher - ${ddf.version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs.version} - - - ddf.lib - gson-support - ${ddf.version} - - - org.osgi - org.osgi.core - ${osgi.version} - - - ddf.catalog.core - catalog-core-api - ${ddf.version} - - - ddf.catalog.core - catalog-core-api-impl - ${ddf.version} - - - javax.servlet - javax.servlet-api - ${javax.servlet-api.version} - - - org.codice.httpproxy - proxy-camel-servlet - ${ddf.version} - - - org.codice.httpproxy - proxy-camel-route - ${ddf.version} - - - org.apache.camel - camel-http-common - ${camel.version} - - - org.apache.camel - camel-http - ${camel.version} - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - commons-collections - commons-collections - ${commons-collections.version} - - - ddf.platform.util - platform-util - ${ddf.version} - - - org.apache.httpcomponents - httpclient - ${httpclient.version} - - - org.apache.httpcomponents - httpcore - ${httpcore.version} - - - com.sparkjava - spark-core - ${spark.version} - - - com.google.code.findbugs - jsr305 - ${jsr305.version} - - - org.geotools - gt-opengis - ${org.geotools.version} - - - org.geotools - gt-cql - ${org.geotools.version} - - - jai_core - javax.media - - - - - org.codice.thirdparty - geotools-suite - ${org.geotools.bundle.version} - - - ddf.catalog.transformer - geojson-metacard-transformer - ${ddf.version} - - - ddf.catalog.transformer - catalog-transformer-propertyjson-metacard - ${ddf.version} - - - ddf.action.core - action-core-api - ${ddf.version} - - - org.locationtech.spatial4j - spatial4j - ${spatial4j.version} - - - ddf.catalog.core - versioning-common - ${ddf.version} - - - ddf.catalog.core - versioning-api - ${ddf.version} - - - org.quartz-scheduler - quartz - ${quartz.version} - - - org.quartz-scheduler - quartz-jobs - ${quartz.version} - - - com.mchange - c3p0 - ${c3p0.version} - - - ddf.persistence.core - persistence-core-api - ${ddf.version} - - - ddf.security.core - security-core-api - ${ddf.version} - - - ddf.security.handler - security-handler-impl - ${ddf.version} - - - ddf.catalog.core - filter-proxy - test - ${ddf.version} - - - ddf.platform.email - platform-email-api - ${ddf.version} - - - ddf.catalog.core - catalog-core-commons - ${ddf.version} - - - com.github.jknack - handlebars - ${jknack.handlebars.version} - - - org.antlr - antlr4-runtime - ${antlr.version} - - - org.abego.treelayout - org.abego.treelayout.core - - - - - org.hamcrest - hamcrest-junit - ${hamcrest-junit.version} - test - - - org.codice.ddf.search - catalog-ui-enumeration - ${project.version} - - - org.codice.ddf.spatial - spatial-geocoding-api - ${ddf.version} - - - org.codice.ddf.spatial - spatial-geocoding-geocoder - ${ddf.version} - - - ddf.platform.security - session-management-api - ${ddf.version} - - - ddf.action.core - action-core-impl - ${ddf.version} - - - ddf.platform.util - util-uuidgenerator-api - ${ddf.version} - - - ddf.catalog.core - catalog-core-attachment - ${ddf.version} - - - org.codice.ddf.search - catalog-ui-search-api - ${project.version} - - - ddf.security.servlet - security-servlet-logout-api - ${ddf.version} - - - ddf.platform - platform-configuration-service - ${ddf.version} - - - ddf.mime.core - mime-core-api - ${ddf.version} - - - org.apache.tika - tika-core - ${tika.version} - - - ddf.platform.usng4j - platform-usng4j-api - ${ddf.version} - - - org.codice.usng4j - usng4j-impl - ${usng4j.version} - test - - - ddf.platform - resource-bundle-locator - ${ddf.version} - - - ddf.catalog.core - catalog-core-commands - ${ddf.version} - - - com.googlecode.owasp-java-html-sanitizer - owasp-java-html-sanitizer - ${owasp-html-sanitizer.version} - - - ddf.catalog.rest - catalog-rest-api - ${ddf.version} - - - com.google.guava - guava - ${guava.version} - - - org.codice.ddf.search - catalog-ui-splitter - ${project.version} - - - ddf.security.core - security-core-services - test - ${ddf.version} - - - org.apache.commons - commons-math3 - ${commons-math3.version} - - - ddf.security.servlet - security-servlet-web-socket-api - ${ddf.version} - - - ddf.platform - preferences-api - ${ddf.version} - - - io.rest-assured - rest-assured - ${restassured.version} - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.5.3 - - catalog-ui-search - catalog-ui-search.xml - - - - create-archive - package - - single - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.0.0 - - - src/test/resources/forms/ - - - - org.apache.felix - maven-bundle-plugin - - - - - antlr4-runtime, - c3p0, - camel-http, - camel-http-common, - catalog-core-api-impl;scope=!test, - commons-lang3, - handlebars, - httpclient, - httpcore, - tlmatcher, - gson-support, - guava, - proxy-camel-route, - proxy-camel-servlet, - quartz, - quartz-jobs, - spark-core, - spatial4j, - versioning-common, - filter-v_2_0, - ows-v_1_1_0-schema, - jaxb2-basics-runtime, - catalog-rest-service, - owasp-java-html-sanitizer - - ${project.artifactId} - - org.eclipse.jetty.server, - org.eclipse.jetty.server.handler, - javax.servlet.http;version="[3,4)", - javax.servlet;version="[3,4)", - org.apache.commons.logging; version="[1.1.0,2.0.0)", - !sun.reflect, - !com.sun.management, - !org.noggit, - !commonj.work.*, - !oracle.sql.*, - !org.jboss.*, - !javax.ejb.*, - !com.tc.*, - !org.terracotta.*, - !org.apache.commons.cli.*, - !org.hibernate.*, - !weblogic.jdbc.*, - !org.abego.treelayout.*, - !com.google.appengine.*, - !com.google.apphosting.*, - !com.google.common.util.concurrent.internal, - !com.google.common.io.*, - !com.google.errorprone.*, - !org.checkerframework.*, - * - - - org.codice.ddf.catalog.ui.metacard.internal, - org.codice.ddf.catalog.ui.alias, - org.codice.ddf.catalog.ui.metacard.history, - org.codice.ddf.catalog.ui.ws, - - org.codice.ddf.catalog.ui.forms.commands.* - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - check-artifact-size - verify - - enforce - - - - - 8_MB - - - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.0.0-M4 - - - ${karaf.version} - ${project.artifactId} - ${project.version} - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.48 - - - BRANCH - COVEREDRATIO - 0.46 - - - COMPLEXITY - COVEREDRATIO - 0.43 - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/RootContextRequestSupplier.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/RootContextRequestSupplier.java deleted file mode 100644 index a53f091494d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/RootContextRequestSupplier.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui; - -import java.util.function.BiFunction; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; - -public class RootContextRequestSupplier - implements BiFunction { - @Override - public HttpServletRequestWrapper apply( - HttpServletRequest httpServletRequest, String relativePath) { - return new HttpServletRequestWrapper(httpServletRequest) { - @Override - public String getServletPath() { - return "/"; - } - - @Override - public String getPathInfo() { - return relativePath; - } - - @Override - public String getRequestURI() { - return relativePath; - } - }; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/SparkServlet.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/SparkServlet.java deleted file mode 100644 index 957da41fcaa..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/SparkServlet.java +++ /dev/null @@ -1,267 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui; - -import java.io.IOException; -import java.io.NotSerializableException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.function.BiFunction; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; -import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.ExceptionMapper; -import spark.globalstate.ServletFlag; -import spark.http.matching.MatcherFilter; -import spark.route.ServletRoutes; -import spark.servlet.SparkApplication; -import spark.staticfiles.StaticFilesConfiguration; -import spark.utils.CollectionUtils; - -/** - * Servlet that can be configured through a web.xml to serve {@code SparkApplication}s. Needs to be - * initialized with the {@code applicationName} init parameter (or through a direct call to {@link - * #setSparkApplications(List)}) to the list of application classes defining routes. An optional - * {@code wrapperSupplierName} parameter can be provided (or directly set through the {@link - * #setRequestSupplier(BiFunction)} method) to provide added path flexibility. - */ -public class SparkServlet extends HttpServlet { - private static final Logger LOGGER = LoggerFactory.getLogger(SparkServlet.class); - - private static final String SLASH_WILDCARD = "/*"; - - private static final String SLASH = "/"; - - private static final String APPLICATION_CLASS_PARAM = "applicationName"; - - private static final String WRAPPER_SUPPLIER_PARAM_NAME = "wrapperSupplierName"; - - private static final String FILTER_MAPPING_PARAM = "filterMappingUrlPattern"; - - @SuppressWarnings("squid:S2226" /* Lifecycle managed by blueprint. */) - private static final BiFunction - DEFAULT_REQ_FUNC = - (req, relativePath) -> - new HttpServletRequestWrapper(req) { - @Override - public String getPathInfo() { - return relativePath; - } - - @Override - public String getRequestURI() { - return relativePath; - } - }; - - @SuppressWarnings("squid:S2226" /* Lifecycle managed by blueprint. */) - private BiFunction requestSupplier; - - private final List sparkApplications = - Collections.synchronizedList(new ArrayList<>()); - - @SuppressWarnings("squid:S2226" /* Lifecycle managed by blueprint. */) - private String filterMappingPattern = null; - - private String filterPath; - - private MatcherFilter matcherFilter; - - public synchronized void setRequestSupplier( - BiFunction requestSupplier) { - this.requestSupplier = requestSupplier; - } - - public void setSparkApplications(List sparkApplications) { - this.sparkApplications.addAll(sparkApplications); - } - - public void setFilterMappingPattern(String filterMappingPattern) { - this.filterMappingPattern = filterMappingPattern; - } - - @Override - public void init(ServletConfig config) throws ServletException { - super.init(config); - ServletFlag.runFromServlet(); - - populateWrapperSupplier(config); - populateSparkApplications(config); - - sparkApplications.stream().sequential().forEach(SparkApplication::init); - - filterPath = getConfigPath(filterMappingPattern, config); - matcherFilter = - new MatcherFilter( - ServletRoutes.get(), - StaticFilesConfiguration.servletInstance, - ExceptionMapper.getServletInstance(), - false, - false); - } - - @Override - public void destroy() { - sparkApplications.stream().filter(Objects::nonNull).forEach(SparkApplication::destroy); - } - - @Override - protected void service(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, IOException { - final String relativePath = getRelativePath(req, filterPath); - - HttpServletRequestWrapper requestWrapper; - synchronized (this) { - requestWrapper = requestSupplier.apply(req, relativePath); - } - - // handle static resources - boolean consumed = StaticFilesConfiguration.servletInstance.consume(req, resp); - - if (consumed) { - return; - } - - matcherFilter.doFilter(requestWrapper, resp, null); - } - - private static String getConfigPath(String filterMappingPattern, ServletConfig config) { - String result = - Optional.ofNullable(filterMappingPattern) - .orElse(config.getInitParameter(FILTER_MAPPING_PARAM)); - if (result == null || result.equals(SLASH_WILDCARD)) { - return ""; - } else if (!result.startsWith(SLASH) || !result.endsWith(SLASH_WILDCARD)) { - throw new IllegalArgumentException( - String.format( - "The %s must start with '/' and end with '/*'. Instead it is: %s", - FILTER_MAPPING_PARAM, result)); - } - return result.substring(1, result.length() - 1); - } - - private static String getRelativePath(HttpServletRequest request, String filterPath) { - String path = request.getRequestURI().substring(request.getContextPath().length()); - - if (path.length() > 0) { - path = path.substring(1); - } - - if (filterPath.equals(path + SLASH)) { - path += SLASH; - } - - if (path.startsWith(filterPath)) { - path = path.substring(filterPath.length()); - } - - if (!path.startsWith(SLASH)) { - path = SLASH + path; - } - - try { - path = URLDecoder.decode(path, "UTF-8"); - } catch (UnsupportedEncodingException ignore) { - // this can't really ever happen - } - - LOGGER.debug("Relative path = {}", path); - return path; - } - - private synchronized void populateWrapperSupplier(ServletConfig config) { - // Do not override an injected supplier through initialization - if (requestSupplier != null) { - return; - } - - String wrapperSupplierName = config.getInitParameter(WRAPPER_SUPPLIER_PARAM_NAME); - - if (StringUtils.isNotBlank(wrapperSupplierName)) { - try { - Class wrapperClass = Class.forName(wrapperSupplierName); - if (BiFunction.class.isAssignableFrom(wrapperClass)) { - requestSupplier = - (BiFunction) - wrapperClass.newInstance(); - } - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { - LOGGER.debug( - "Error converting {} to BiFunction; " - + "falling back to default", - wrapperSupplierName, - e); - } - } - - if (requestSupplier == null) { - requestSupplier = DEFAULT_REQ_FUNC; - } - } - - private void populateSparkApplications(ServletConfig config) { - // Do not override injected spark applications through initialization - if (!CollectionUtils.isEmpty(sparkApplications)) { - return; - } - - String applications = config.getInitParameter(APPLICATION_CLASS_PARAM); - - if (StringUtils.isNotBlank(applications)) { - sparkApplications.addAll( - Pattern.compile(",") - .splitAsStream(applications) - .map(String::trim) - .map(this::getApplication) - .filter(Objects::nonNull) - .collect(Collectors.toList())); - } - } - - private SparkApplication getApplication(String applicationClassName) { - try { - Class appClass = Class.forName(applicationClassName); - if (SparkApplication.class.isAssignableFrom(appClass)) { - return SparkApplication.class.cast(appClass.newInstance()); - } - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { - LOGGER.debug("Error converting {} to SparkApplication", applicationClassName, e); - } - - return null; - } - - private void writeObject(ObjectOutputStream stream) throws IOException { - throw new NotSerializableException(getClass().getName()); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { - throw new NotSerializableException(getClass().getName()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/alias/AttributeAliases.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/alias/AttributeAliases.java deleted file mode 100644 index d1fd4ea3039..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/alias/AttributeAliases.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.alias; - -import com.google.common.collect.ImmutableMap; - -/** - * A collection of mappings between internal attribute names to their user-friendly aliases, - * typically used for display in the UI. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public interface AttributeAliases { - - /** - * Checks if the internal attribute {@code attributeName} has a configured alias. - * - * @param attributeName - the internal name of the attribute - * @return true if {@code attributeName} has a configured alias, false otherwise. - */ - boolean hasAlias(String attributeName); - - /** - * Gets the configured alias for the internal attribute {@code attributeName}. If no alias is - * configured, {@code null} is returned. - * - * @param attributeName - the internal name of the attribute - * @return the alias, if configured, null otherwise. - */ - String getAlias(String attributeName); - - /** - * Gets a read-only reference to all the alias mappings. This map will never be {@code null}. - * - * @return an immutable map containing all internal attribute to alias mappings. - */ - ImmutableMap getAliasMap(); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/alias/AttributeAliasesImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/alias/AttributeAliasesImpl.java deleted file mode 100644 index 4c9f9d58d22..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/alias/AttributeAliasesImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.alias; - -import com.google.common.collect.ImmutableMap; -import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AttributeAliasesImpl implements AttributeAliases { - - private static final Logger LOGGER = LoggerFactory.getLogger(AttributeAliasesImpl.class); - - private ImmutableMap aliases = ImmutableMap.of(); - - @Override - public String getAlias(String attributeName) { - return aliases.get(attributeName); - } - - @Override - public boolean hasAlias(String attributeName) { - return aliases.containsKey(attributeName); - } - - @Override - public ImmutableMap getAliasMap() { - return aliases; - } - - public void setAttributeAliases(List attributeAliases) { - LOGGER.trace("Setting attribute aliases: {}", attributeAliases); - this.aliases = parseAttributeAndValuePairs(attributeAliases); - } - - private ImmutableMap parseAttributeAndValuePairs(List pairs) { - ImmutableMap.Builder builder = ImmutableMap.builder(); - pairs - .stream() - .map(str -> str.split("=", 2)) - .filter(AttributeAliasesImpl::isValidConfig) - .forEach(list -> builder.put(list[0].trim(), list[1].trim())); - return builder.build(); - } - - private static boolean isValidConfig(String[] attrValPair) { - if (attrValPair.length <= 1) { - LOGGER.debug("Filtering out invalid attribute/value pair: {}", attrValPair[0]); - return false; - } - return true; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/catalog/CatalogApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/catalog/CatalogApplication.java deleted file mode 100644 index a70bd38719e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/catalog/CatalogApplication.java +++ /dev/null @@ -1,413 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.catalog; - -import static spark.Spark.delete; -import static spark.Spark.get; -import static spark.Spark.head; -import static spark.Spark.post; -import static spark.Spark.put; - -import com.google.common.collect.ImmutableList; -import ddf.catalog.data.BinaryContent; -import ddf.catalog.data.Metacard; -import ddf.catalog.resource.DataUsageLimitExceededException; -import ddf.catalog.resource.Resource; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URLDecoder; -import java.nio.charset.StandardCharsets; -import java.util.List; -import javax.servlet.MultipartConfigElement; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.InternalServerErrorException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.UriBuilder; -import org.apache.commons.codec.CharEncoding; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.cxf.jaxrs.impl.UriBuilderImpl; -import org.apache.http.HttpStatus; -import org.codice.ddf.rest.api.CatalogService; -import org.codice.ddf.rest.api.CatalogServiceException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.Request; -import spark.Response; -import spark.servlet.SparkApplication; - -public class CatalogApplication implements SparkApplication { - - private static final Logger LOGGER = LoggerFactory.getLogger(CatalogApplication.class); - - private static final String ECLIPSE_MULTIPART_CONFIG = "org.eclipse.jetty.multipartConfig"; - - private static final String JAVA_IO_TMPDIR = "java.io.tmpdir"; - - private static final String HEADER_CONTENT_DISPOSITION = "Content-Disposition"; - - private static final String HEADER_CONTENT_LENGTH = "Content-Length"; - - private static final String HEADER_ACCEPT_RANGES = "Accept-Ranges"; - - private static final String BYTES = "bytes"; - - private static final String CATALOG_ID_PATH = "/catalog/:id"; - - private static final String TRANSFORM = "transform"; - - private CatalogService catalogService; - - public CatalogApplication(CatalogService catalogService) { - this.catalogService = catalogService; - } - - @Override - public void init() { - head( - "/catalog/", - (req, res) -> { - LOGGER.trace("Ping!"); - res.status(HttpStatus.SC_OK); - return res; - }); - - head(CATALOG_ID_PATH, (req, res) -> getHeaders(req, res, null, req.params(":id"))); - - head( - "/catalog/sources/:sourceid/:id", - (req, res) -> getHeaders(req, res, req.params(":sourceid"), req.params(":id"))); - - get( - "/catalog/sources", - (req, res) -> { - final BinaryContent content = catalogService.getSourcesInfo(); - - try (InputStream inputStream = content.getInputStream()) { - res.status(HttpStatus.SC_OK); - res.body(IOUtils.toString(inputStream, StandardCharsets.UTF_8)); - res.type(content.getMimeTypeValue()); - } - - // Add the Accept-ranges header to let the client know that we accept ranges in - // bytes - res.header(HEADER_ACCEPT_RANGES, BYTES); - return res; - }); - - get( - CATALOG_ID_PATH, - (req, res) -> getDocument(req, res, null, req.params(":id"), req.queryParams(TRANSFORM))); - - get( - "/catalog/sources/:sourceid/:id", - (req, res) -> - getDocument( - req, res, req.params(":sourceid"), req.params(":id"), req.queryParams(TRANSFORM))); - - post( - "/catalog/metacard", - (req, res) -> { - try { - final BinaryContent content = - catalogService.createMetacard(req.raw(), req.queryParams(TRANSFORM)); - - try (InputStream inputStream = content.getInputStream()) { - res.status(HttpStatus.SC_OK); - res.body(IOUtils.toString(inputStream, StandardCharsets.UTF_8)); - res.type(content.getMimeTypeValue()); - } - - return res; - } catch (CatalogServiceException e) { - return createBadRequestResponse(res, e.getMessage()); - } - }); - - post( - "/catalog/", - (req, res) -> { - if (req.contentType().startsWith("multipart/")) { - req.attribute( - ECLIPSE_MULTIPART_CONFIG, - new MultipartConfigElement(System.getProperty(JAVA_IO_TMPDIR))); - - return addDocument( - res, - req.raw().getRequestURL(), - req.contentType(), - req.queryParams(TRANSFORM), - req.raw(), - new ByteArrayInputStream(req.bodyAsBytes())); - } - - if (req.contentType().startsWith("text/") - || req.contentType().startsWith("application/")) { - return addDocument( - res, - req.raw().getRequestURL(), - req.contentType(), - req.queryParams(TRANSFORM), - null, - new ByteArrayInputStream(req.bodyAsBytes())); - } - - res.status(HttpStatus.SC_NOT_FOUND); - return res; - }); - - put( - CATALOG_ID_PATH, - (req, res) -> { - if (req.contentType().startsWith("multipart/")) { - req.attribute( - ECLIPSE_MULTIPART_CONFIG, - new MultipartConfigElement(System.getProperty(JAVA_IO_TMPDIR))); - - return updateDocument( - res, - req.params(":id"), - req.contentType(), - req.queryParams(TRANSFORM), - req.raw(), - new ByteArrayInputStream(req.bodyAsBytes())); - } - - if (req.contentType().startsWith("text/") - || req.contentType().startsWith("application/")) { - return updateDocument( - res, - req.params(":id"), - req.contentType(), - req.queryParams(TRANSFORM), - null, - new ByteArrayInputStream(req.bodyAsBytes())); - } - - res.status(HttpStatus.SC_NOT_FOUND); - return res; - }); - - delete( - CATALOG_ID_PATH, - (req, res) -> { - try { - String id = req.params(":id"); - catalogService.deleteDocument(id); - res.status(HttpStatus.SC_OK); - return id; - - } catch (CatalogServiceException e) { - return createBadRequestResponse(res, e.getMessage()); - } - }); - } - - public String getSources() throws IOException { - final BinaryContent content = catalogService.getSourcesInfo(); - - try (InputStream inputStream = content.getInputStream()) { - return IOUtils.toString(inputStream, StandardCharsets.UTF_8); - } - } - - private String getHeaders(Request req, Response res, String sourceid, String id) { - try { - String filename = null; - - MultivaluedMap queryParamsMap = getQueryParamsMap(req); - URI absolutePath = new URI(req.raw().getRequestURL().toString()); - - final BinaryContent content = - catalogService.getHeaders(sourceid, id, absolutePath, queryParamsMap); - - if (content == null) { - res.status(HttpStatus.SC_NOT_FOUND); - res.type(MediaType.TEXT_HTML); - return "

Unable to retrieve requested metacard.
"; - } - - res.status(HttpStatus.SC_NO_CONTENT); - - // Add the Accept-ranges header to let the client know that we accept ranges in - // bytes - res.header(HEADER_ACCEPT_RANGES, BYTES); - - if (content instanceof Resource) { - // If we got a resource, we can extract the filename. - filename = ((Resource) content).getName(); - } else { - String fileExtension = - catalogService.getFileExtensionForMimeType(content.getMimeTypeValue()); - if (StringUtils.isNotBlank(fileExtension)) { - filename = id + fileExtension; - } - } - - if (StringUtils.isNotBlank(filename)) { - LOGGER.debug("filename: {}", filename); - res.header(HEADER_CONTENT_DISPOSITION, "inline; filename=\"" + filename + "\""); - } - - long size = content.getSize(); - if (size > 0) { - res.header(HEADER_CONTENT_LENGTH, String.valueOf(size)); - } - return ""; - } catch (CatalogServiceException | URISyntaxException e) { - return createBadRequestResponse(res, e.getMessage()); - } - } - - private String getDocument( - Request req, - Response res, - String encodedSourceId, - String encodedId, - String transformerParam) { - try { - MultivaluedMap queryParamsMap = getQueryParamsMap(req); - URI absolutePath = new URI(req.raw().getRequestURL().toString()); - String id = URLDecoder.decode(encodedId, CharEncoding.UTF_8); - - final BinaryContent content = - catalogService.getDocument( - encodedSourceId, - encodedId, - transformerParam, - absolutePath, - queryParamsMap, - req.raw()); - - if (content == null) { - res.status(HttpStatus.SC_NOT_FOUND); - res.type(MediaType.TEXT_HTML); - return "
Unable to retrieve requested metacard.
"; - } - - LOGGER.debug("Read and transform complete, preparing response."); - res.status(HttpStatus.SC_OK); - res.type(content.getMimeTypeValue()); - - try (InputStream inputStream = content.getInputStream()) { - int bytesCopied = IOUtils.copy(inputStream, res.raw().getOutputStream()); - res.raw().setContentLength(bytesCopied); - res.raw() - .flushBuffer(); // Flashing buffer so Spark won't set the body based on the return value - } - // Add the Accept-ranges header to let the client know that we accept ranges in - // bytes - res.header(HEADER_ACCEPT_RANGES, BYTES); - - String filename = null; - - if (content instanceof Resource) { - // If we got a resource, we can extract the filename. - filename = ((Resource) content).getName(); - } else { - String fileExtension = - catalogService.getFileExtensionForMimeType(content.getMimeTypeValue()); - if (StringUtils.isNotBlank(fileExtension)) { - filename = id + fileExtension; - } - } - - if (StringUtils.isNotBlank(filename)) { - LOGGER.debug("filename: {}", filename); - res.header(HEADER_CONTENT_DISPOSITION, "inline; filename=\"" + filename + "\""); - } - - long size = content.getSize(); - if (size > 0) { - res.header(HEADER_CONTENT_LENGTH, String.valueOf(size)); - } - - return ""; - } catch (CatalogServiceException | URISyntaxException e) { - return createBadRequestResponse(res, e.getMessage()); - - } catch (DataUsageLimitExceededException e) { - res.status(HttpStatus.SC_REQUEST_TOO_LONG); - res.type(MediaType.TEXT_HTML); - return "
" + e.getMessage() + "
"; - } catch (IOException e) { - String exceptionMessage = "Unknown error occurred while processing request: "; - LOGGER.info(exceptionMessage, e); - throw new InternalServerErrorException(exceptionMessage); - } - } - - private String updateDocument( - Response res, - String id, - String contentType, - String transformerParam, - HttpServletRequest httpServletRequest, - InputStream inputStream) { - try { - List contentTypeList = ImmutableList.of(contentType); - catalogService.updateDocument( - id, contentTypeList, httpServletRequest, transformerParam, inputStream); - - res.status(HttpStatus.SC_OK); - return ""; - - } catch (CatalogServiceException e) { - return createBadRequestResponse(res, e.getMessage()); - } - } - - private String addDocument( - Response res, - StringBuffer requestUrl, - String contentType, - String transformerParam, - HttpServletRequest httpServletRequest, - InputStream inputStream) { - try { - List contentTypeList = ImmutableList.of(contentType); - String id = - catalogService.addDocument( - contentTypeList, httpServletRequest, transformerParam, inputStream); - - URI uri = new URI(requestUrl.toString()); - UriBuilder uriBuilder = new UriBuilderImpl(uri).path("/" + id); - - res.status(HttpStatus.SC_CREATED); - res.header("Location", uriBuilder.build().toString()); - res.header(Metacard.ID, id); - return ""; - - } catch (CatalogServiceException | URISyntaxException e) { - return createBadRequestResponse(res, e.getMessage()); - } - } - - private MultivaluedMap getQueryParamsMap(Request request) { - MultivaluedMap map = new MultivaluedHashMap<>(); - request.queryParams().forEach(param -> map.addAll(param, request.queryMap(param).values())); - return map; - } - - private String createBadRequestResponse(Response response, String entityMessage) { - response.status(HttpStatus.SC_BAD_REQUEST); - response.type(MediaType.TEXT_HTML); - return "
" + entityMessage + "
"; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/compose/ComposeApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/compose/ComposeApplication.java deleted file mode 100644 index b786c6f3dfd..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/compose/ComposeApplication.java +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.compose; - -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static spark.Spark.after; -import static spark.Spark.exception; -import static spark.Spark.get; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.MetacardType; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.transform.QueryResponseTransformer; -import ddf.security.SubjectIdentity; -import ddf.security.SubjectOperations; -import ddf.security.audit.SecurityLogger; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.catalog.CatalogApplication; -import org.codice.ddf.catalog.ui.config.ConfigurationApplication; -import org.codice.ddf.catalog.ui.configuration.PlatformUiConfigurationApplication; -import org.codice.ddf.catalog.ui.enumeration.ExperimentalEnumerationExtractor; -import org.codice.ddf.catalog.ui.metacard.associations.Associated; -import org.codice.ddf.catalog.ui.metacard.internal.OperationPropertySupplier; -import org.codice.ddf.catalog.ui.metacard.notes.NoteUtil; -import org.codice.ddf.catalog.ui.metacard.validation.Validator; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl.AssociatedQueryMetacardsHandler; -import org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceService; -import org.codice.ddf.catalog.ui.security.app.UserApplication; -import org.codice.ddf.catalog.ui.subscription.SubscriptionsPersistentStore; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.security.Security; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import spark.servlet.SparkApplication; - -public class ComposeApplication implements SparkApplication { - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - private final CatalogFramework catalogFramework; - private final FilterBuilder filterBuilder; - private final EndpointUtil util; - private final Validator validator; - private final WorkspaceTransformer transformer; - private final ExperimentalEnumerationExtractor enumExtractor; - private final SubscriptionsPersistentStore subscriptions; - private final List types; - private final Associated associated; - private final QueryResponseTransformer csvQueryResponseTransformer; - private final SubjectIdentity subjectIdentity; - - private final AttributeRegistry attributeRegistry; - - private final ConfigurationApplication configuration; - - private final NoteUtil noteUtil; - - private final WorkspaceService workspaceService; - - private final AssociatedQueryMetacardsHandler queryMetacardsHandler; - - private final Security security; - - private OperationPropertySupplier operationPropertySupplier; - - private SubjectOperations subjectOperations; - - private SecurityLogger securityLogger; - - private UserApplication userApplication; - private PlatformUiConfigurationApplication platformUiConfigurationApplication; - - private CatalogApplication catalogApplication; - - public ComposeApplication( - CatalogFramework catalogFramework, - FilterBuilder filterBuilder, - EndpointUtil endpointUtil, - Validator validator, - WorkspaceTransformer transformer, - ExperimentalEnumerationExtractor enumExtractor, - SubscriptionsPersistentStore subscriptions, - List types, - Associated associated, - QueryResponseTransformer csvQueryResponseTransformer, - AttributeRegistry attributeRegistry, - ConfigurationApplication configuration, - NoteUtil noteUtil, - SubjectIdentity subjectIdentity, - WorkspaceService workspaceService, - AssociatedQueryMetacardsHandler queryMetacardsHandler, - Security security, - UserApplication userApplication, - PlatformUiConfigurationApplication platformUiConfigurationApplication, - CatalogApplication catalogApplication) { - this.catalogFramework = catalogFramework; - this.filterBuilder = filterBuilder; - this.util = endpointUtil; - this.validator = validator; - this.transformer = transformer; - this.enumExtractor = enumExtractor; - this.subscriptions = subscriptions; - this.types = types; - this.associated = associated; - this.csvQueryResponseTransformer = csvQueryResponseTransformer; - this.attributeRegistry = attributeRegistry; - this.configuration = configuration; - this.noteUtil = noteUtil; - this.subjectIdentity = subjectIdentity; - this.workspaceService = workspaceService; - this.queryMetacardsHandler = queryMetacardsHandler; - this.security = security; - this.userApplication = userApplication; - this.platformUiConfigurationApplication = platformUiConfigurationApplication; - this.catalogApplication = catalogApplication; - } - - public void addOperationPropertySupplier(OperationPropertySupplier operationPropertySupplier) { - this.operationPropertySupplier = operationPropertySupplier; - } - - public void removeOperationPropertySupplier(OperationPropertySupplier operationPropertySupplier) { - this.operationPropertySupplier = null; - } - - /* - * These are client specific attributes, but they're useful to preload / - * transform here so the client doesn't - * have to do any immediate work. - */ - private Map getMandatoryAttributes() { - Map attributeMap = new HashMap<>(); - - Map anyText = new HashMap<>(); - anyText.put("id", "anyText"); - anyText.put("type", "STRING"); - anyText.put("multivalued", false); - anyText.put("hidden", true); - - Map anyGeo = new HashMap<>(); - anyGeo.put("id", "anyGeo"); - anyGeo.put("type", "LOCATION"); - anyGeo.put("multivalued", false); - anyGeo.put("hidden", true); - - Map anyDate = new HashMap<>(); - anyDate.put("id", "anyDate"); - anyDate.put("type", "DATE"); - anyDate.put("multivalued", false); - anyDate.put("hidden", true); - - Map reservedBasicDatatype = new HashMap<>(); - reservedBasicDatatype.put("id", "reserved.basic-datatype"); - reservedBasicDatatype.put("type", "STRING"); - reservedBasicDatatype.put("multivalued", false); - reservedBasicDatatype.put("hidden", true); - reservedBasicDatatype.put("alias", "Types"); - - Map metacardType = new HashMap<>(); - metacardType.put("id", "metacard-type"); - metacardType.put("type", "STRING"); - metacardType.put("multivalued", false); - metacardType.put("readOnly", true); - - Map sourceId = new HashMap<>(); - sourceId.put("id", "source-id"); - sourceId.put("type", "STRING"); - sourceId.put("multivalued", false); - sourceId.put("readOnly", true); - - Map cached = new HashMap<>(); - cached.put("id", "cached"); - cached.put("type", "STRING"); - cached.put("multivalued", false); - - Map metacardTags = new HashMap<>(); - metacardTags.put("id", "metacard-tags"); - metacardTags.put("type", "STRING"); - metacardTags.put("multivalued", true); - - attributeMap.put("anyText", anyText); - attributeMap.put("anyGeo", anyGeo); - attributeMap.put("anyDate", anyDate); - attributeMap.put("reserved.basic-datatype", reservedBasicDatatype); - attributeMap.put("metacard-type", metacardType); - attributeMap.put("source-id", sourceId); - attributeMap.put("cached", cached); - attributeMap.put("metacard-tags", metacardTags); - - return attributeMap; - } - - private Map addAliases( - Map originalAttributeMap, Map attributeAliases) { - Map attributeMap = new HashMap<>(originalAttributeMap); - - for (Map.Entry alias : attributeAliases.entrySet()) { - Map attribute = (Map) attributeMap.get(alias.getKey()); - if (attribute != null) { - attribute.put("alias", alias.getValue()); - } - } - - return attributeMap; - } - - private boolean isHiddenType(Map attributeDetails) { - String id = (String) attributeDetails.get("id"); - if ("thumbnail".equals(id)) { - return false; - } - String type = (String) attributeDetails.get("type"); - return "XML".equals(type) || "BINARY".equals(type) || "OBJECT".equals(type); - } - - private Map addHidden( - Map originalAttributeMap, List hiddenAttributes) { - Map attributeMap = new HashMap<>(originalAttributeMap); - - for (String hiddenAttributeRegex : hiddenAttributes) { - Pattern pattern = Pattern.compile(hiddenAttributeRegex); - for (Map.Entry attributeEntry : attributeMap.entrySet()) { - String attributeId = attributeEntry.getKey(); - Map attributeDetails = (Map) attributeEntry.getValue(); - boolean hiddenByAttributeRegex = pattern.matcher(attributeId).find(); - - if (hiddenByAttributeRegex || isHiddenType(attributeDetails)) { - attributeDetails.put("hidden", true); - } - } - } - - return attributeMap; - } - - /** This will find deprecated enumerations as well because of how the enumExtractor works. */ - private Map addEnumerations(Map originalAttributeMap) { - Map attributeMap = new HashMap<>(originalAttributeMap); - - for (Entry attributeDefinition : attributeMap.entrySet()) { - Map attribute = (Map) attributeDefinition.getValue(); - attribute.put( - "enumerations", - enumExtractor - .getAttributeEnumerations(attributeDefinition.getKey()) - .get(attributeDefinition.getKey())); - } - - return attributeMap; - } - - /** - * The client needs a sorted list of attributes to display to users, so it's worth doing this work - * upfront for them, taking into account known aliases. - */ - public static List> sortAttributeMapToList(Map attributeMap) { - List> entryList = new ArrayList<>(attributeMap.entrySet()); - - Collections.sort( - entryList, - new Comparator>() { - @Override - public int compare(Map.Entry entry1, Map.Entry entry2) { - Object value1 = entry1.getValue(); - Object value2 = entry2.getValue(); - - if (value1 instanceof Map && value2 instanceof Map) { - Map map1 = (Map) value1; - Map map2 = (Map) value2; - String alias1 = ((String) map1.getOrDefault("alias", map1.get("id"))).toLowerCase(); - String alias2 = ((String) map2.getOrDefault("alias", map2.get("id"))).toLowerCase(); - return alias1.compareTo(alias2); - } - - // If "alias" is not present, fallback to comparing by key (id) - return entry1.getKey().toLowerCase().compareTo(entry2.getKey().toLowerCase()); - } - }); - - List> resultList = new ArrayList<>(); - for (Map.Entry entry : entryList) { - Object value = entry.getValue(); - if (value instanceof Map) { - resultList.add((Map) value); - } - } - - return resultList; - } - - @SuppressWarnings("unchecked") - @Override - public void init() { - - get( - "/compose/startup", - APPLICATION_JSON, - (req, res) -> { - Map payload = new HashMap<>(); - Map config = this.configuration.getConfig(); - payload.put("config", config); - - // Retrieve all Metacard types - Map metacardTypeMap = util.getMetacardTypeMap(); - - payload.put("metacardTypes", metacardTypeMap); - - Map attributeMap = getAttributeMap(config, metacardTypeMap); - - payload.put("attributeMap", attributeMap); - - payload.put("sortedAttributes", sortAttributeMapToList(attributeMap)); - - payload.put("user", this.userApplication.getUser()); - payload.put( - "platformUiConfiguration", - GSON.fromJson( - this.platformUiConfigurationApplication.getConfigAsJsonString(), Map.class)); - payload.put("sources", getSources(config)); - payload.put("localSourceId", catalogFramework.getId()); - - /** - * By default, the known harvested sources are simply the local source, so go ahead and - * set this for the clients. - */ - List harvestedSources = new ArrayList(); - harvestedSources.add(catalogFramework.getId()); - payload.put("harvestedSources", harvestedSources); - return util.getJson(payload); - }); - - after((req, res) -> res.type(APPLICATION_JSON)); - - exception(IOException.class, util::handleIOException); - - exception(RuntimeException.class, util::handleRuntimeException); - } - - /** - * The client does not need to know about the cache. The client does need to know what source is - * local. In addition, we can take advantage of our knowledge of the disableLocalCatalog config. - * - *

This puts sources into a form the client expects, so it doesn't need to do immediate work. - */ - private List getSources(Map config) throws IOException { - String localCatalogId = catalogFramework.getId(); - List sources = GSON.fromJson(this.catalogApplication.getSources(), List.class); - - // Use a stream to filter out sources with the id "cache" - sources = - sources - .stream() - .filter( - source -> { - Map sourceMap = (Map) source; - String sourceId = (String) sourceMap.get("id"); - return !sourceId.equals("cache"); - }) - .collect(Collectors.toList()); - - // Update "local" property && "harvested" for the remaining sources - sources.forEach( - source -> { - Map sourceMap = (Map) source; - String sourceId = (String) sourceMap.get("id"); - if (sourceId.equals(localCatalogId)) { - sourceMap.put("harvested", true); - sourceMap.put("local", true); - } else { - sourceMap.put("harvested", false); - sourceMap.put("local", false); - } - }); - - Boolean disableLocalCatalog = (Boolean) config.get("disableLocalCatalog"); - - if (disableLocalCatalog) { - sources = - sources - .stream() - .filter( - source -> { - Map sourceMap = (Map) source; - String sourceId = (String) sourceMap.get("id"); - return !sourceId.equals(localCatalogId); - }) - .collect(Collectors.toList()); - } - return sources; - } - - /** - * Transform the known attributes into a form the client expects, and can use to quickly look up - * information about attributes. - */ - private Map getAttributeMap( - Map config, Map metacardTypeMap) { - // Add each Metacard type's attributes to a common attribute map - Map attributeMap = new HashMap<>(getMandatoryAttributes()); - for (Object definition : metacardTypeMap.values()) { - if (definition instanceof Map) { - attributeMap.putAll((Map) definition); - } - } - Map attributeMapWithAliases = - addAliases(attributeMap, (Map) config.get("attributeAliases")); - - Map attributeMapWithEnums = addEnumerations(attributeMapWithAliases); - - Map attributeMapWithHidden = - addHidden(attributeMapWithEnums, (List) config.get("hiddenAttributes")); - - return attributeMapWithHidden; - } - - public void setSubjectOperations(SubjectOperations subjectOperations) { - this.subjectOperations = subjectOperations; - } - - public void setSecurityLogger(SecurityLogger securityLogger) { - this.securityLogger = securityLogger; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/config/ConfigurationApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/config/ConfigurationApplication.java deleted file mode 100644 index 439b030e8f2..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/config/ConfigurationApplication.java +++ /dev/null @@ -1,1267 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.config; - -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static org.apache.http.HttpHeaders.CONTENT_TYPE; -import static spark.Spark.exception; -import static spark.Spark.get; - -import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Splitter; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonSyntaxException; -import ddf.catalog.configuration.HistorianConfiguration; -import ddf.platform.resource.bundle.locator.ResourceBundleLocator; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.ResourceBundle; -import java.util.Set; -import java.util.TreeMap; -import java.util.TreeSet; -import java.util.stream.Collectors; -import org.apache.commons.collections.Factory; -import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang.StringUtils; -import org.codice.ddf.branding.BrandingPlugin; -import org.codice.ddf.catalog.ui.alias.AttributeAliases; -import org.codice.ddf.platform.util.uuidgenerator.UuidGenerator; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.codice.proxy.http.HttpProxyService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.servlet.SparkApplication; - -public class ConfigurationApplication implements SparkApplication { - - public static final String SERVLET_PATH = "./proxy"; - - public static final String URL = "url"; - - public static final String PROXY_ENABLED = "proxyEnabled"; - - public static final String ENDPOINT_NAME = "catalog"; - - public static final Factory NEW_SET_FACTORY = TreeSet::new; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationApplication.class); - - private final UuidGenerator uuidGenerator; - - private final AttributeAliases attributeAliases; - - private String format; - - private Map> iconConfig = new HashMap<>(); - - private List imageryProviders = new ArrayList<>(); - - private List defaultLayout = new ArrayList<>(); - - private List visualizations = new ArrayList<>(); - - private List imageryProviderUrlMaps = new ArrayList<>(); - - private List> imageryProviderMaps = new ArrayList<>(); - - private Map urlToProxyMap = new HashMap<>(); - - private Map terrainProvider; - - private Map proxiedTerrainProvider; - - private List imageryEndpoints = new ArrayList<>(); - - private String terrainEndpoint; - - private Boolean signInEnabled = true; - - private Boolean taskEnabled = false; - - private Boolean gazetteerEnabled = true; - - private Boolean onlineGazetteerEnabled = true; - - private Boolean cacheEnabled = true; - - private Boolean unknownErrorBoxEnabled = true; - - private Boolean experimentalEnabled = false; - - private Boolean webSocketsEnabled = false; - - private Boolean localCatalogEnabled = true; - - private Boolean relevanceScoresEnabled = false; - - private Boolean logoEnabled = false; - - private Boolean metacardPreviewEnabled = true; - - private Boolean customTextNotationEnabled = false; - - private String customTextNotationAttribute = "title"; - - private Boolean spellcheckEnabled = false; - - private Boolean phoneticsEnabled = false; - - private Boolean fuzzyResultsEnabled = true; - - private BrandingPlugin branding; - - private Integer timeout = 300000; - - private HttpProxyService httpProxy; - - private int incrementer = 0; - - private Integer resultCount = 250; - - private Integer exportResultLimit = 1000; - - private List requiredExportAttributes = Collections.emptyList(); - - private Set exportMetacardFormatOptions = new HashSet<>(); - - private Set exportMetacardsFormatOptions = new HashSet<>(); - - private String projection = "EPSG:4326"; - - private String bingKey = ""; - - private List scheduleFrequencyList; - - private Map> typeNameMapping = new HashMap<>(); - - private String mapHome = ""; - - private int maximumUploadSize = 1_048_576; - - private List readOnly = - ImmutableList.of( - "checksum", - "checksum-algorithm", - "id", - "metadata", - "source-id", - "^metacard\\.", - "^version\\.", - "^validation\\."); - - private List summaryShow = Collections.emptyList(); - - private List resultShow = Collections.emptyList(); - - private List hiddenAttributes = Collections.emptyList(); - - private List attributeSuggestionList = Collections.emptyList(); - - private List commonAttributes = Collections.emptyList(); - - private Map attributeDescriptions = Collections.emptyMap(); - - private int sourcePollInterval = 60000; - - private String product; - - private Integer relevancePrecision = 5; - - /** The current historian configuration. */ - private HistorianConfiguration historianConfiguration; - - private String theme; - - private List basicSearchTemporalSelectionDefault; - - private String basicSearchMatchType; - - private List defaultSources = Collections.emptyList(); - private List defaultTableColumns = Collections.emptyList(); - - private String customBranding; - - private String helpUrl; - - private String landingPageBackgroundSrc; - - private String topLeftLogoSrc; - - private String bottomLeftLogoSrc; - - private String bottomLeftBackgroundSrc; - - private String menuIconSrc; - - private Set editorAttributes = Collections.emptySet(); - private Set requiredAttributes = Collections.emptySet(); - private Map> attributeEnumMap = Collections.emptyMap(); - - private Map extra; - - private static final String INTRIGUE_BASE_NAME = "IntrigueBundle"; - - private volatile Map i18n = Collections.emptyMap(); - - public void setI18n(ResourceBundleLocator resourceBundleLocator) { - try { - ResourceBundle resourceBundle = resourceBundleLocator.getBundle(INTRIGUE_BASE_NAME); - - if (resourceBundle != null) { - Enumeration bundleKeys = resourceBundle.getKeys(); - - Map keywords = new HashMap<>(); - - while (bundleKeys.hasMoreElements()) { - String key = (String) bundleKeys.nextElement(); - String value = resourceBundle.getString(key); - - keywords.put(key, value); - } - - i18n = keywords; - } - } catch (IOException e) { - LOGGER.debug( - "An error occurred while creating class loader to URL for ResourceBundle: {}, {}", - INTRIGUE_BASE_NAME, - Locale.getDefault(), - e); - } - } - - @VisibleForTesting - void setI18n(Map i18n) { - this.i18n = i18n; - } - - @VisibleForTesting - Map getI18n() { - return this.i18n; - } - - public Set getEditorAttributes() { - return editorAttributes; - } - - public void setEditorAttributes(Set editorAttributes) { - this.editorAttributes = editorAttributes; - } - - public Set getRequiredAttributes() { - return requiredAttributes; - } - - public void setRequiredAttributes(List requiredAttributes) { - this.requiredAttributes = new LinkedHashSet<>(); - for (String entry : requiredAttributes) { - if (StringUtils.isNotBlank(entry)) { - this.requiredAttributes.add(entry); - } - } - } - - public Map> getAttributeEnumMap() { - return attributeEnumMap; - } - - public void setAttributeEnumMap(Map> attributeEnumMap) { - this.attributeEnumMap = attributeEnumMap; - } - - public Set extractValues(String valueString) { - return new LinkedHashSet<>(Splitter.on(',').trimResults().splitToList(valueString)); - } - - public void setAttributeEnumMap(List entries) { - Map> mergedEntryMap = new LinkedHashMap<>(); - - for (String entry : entries) { - if (StringUtils.isBlank(entry)) { - continue; - } - - String[] kvPair = entry.split("=", 2); - String attribute = kvPair[0].trim(); - if (!attribute.isEmpty()) { - Set values; - if (mergedEntryMap.containsKey(attribute)) { - values = mergedEntryMap.get(attribute); - } else { - values = new LinkedHashSet<>(); - mergedEntryMap.put(attribute, values); - } - - if (kvPair.length == 2) { - values.addAll(Splitter.on(',').trimResults().omitEmptyStrings().splitToList(kvPair[1])); - } - } - } - - Set attributeSet = new LinkedHashSet<>(mergedEntryMap.keySet()); - setEditorAttributes(attributeSet); - mergedEntryMap.entrySet().removeIf(entry -> entry.getValue().isEmpty()); - setAttributeEnumMap(mergedEntryMap); - } - - public void setExtra(String json) { - if (StringUtils.isBlank(json)) { - extra = Collections.emptyMap(); - return; - } - try { - extra = GSON.fromJson(json, Map.class); - } catch (JsonSyntaxException e) { - LOGGER.warn("Extra is not valid map JSON: {}", json, e); - extra = Collections.emptyMap(); - } - } - - public Map getExtra() { - return extra; - } - - public ConfigurationApplication(UuidGenerator uuidGenerator, AttributeAliases attributeAliases) { - this.uuidGenerator = uuidGenerator; - this.attributeAliases = attributeAliases; - } - - public List getScheduleFrequencyList() { - return scheduleFrequencyList; - } - - public List getSummaryShow() { - return summaryShow; - } - - public List getResultShow() { - return resultShow; - } - - public List getReadOnly() { - return readOnly; - } - - public List getHiddenAttributes() { - return hiddenAttributes; - } - - public List getAttributeDescriptions() { - return attributeDescriptions - .entrySet() - .stream() - .map(pair -> String.format("%s=%s", pair.getKey(), pair.getValue())) - .collect(Collectors.toList()); - } - - public void setScheduleFrequencyList(List scheduleFrequencyList) { - this.scheduleFrequencyList = scheduleFrequencyList; - } - - public void setReadOnly(List readOnly) { - this.readOnly = readOnly; - } - - public void setSummaryShow(List summaryShow) { - this.summaryShow = summaryShow; - } - - public void setResultShow(List resultShow) { - this.resultShow = resultShow; - } - - public void setMaximumUploadSize(int size) { - this.maximumUploadSize = size; - } - - public int getMaximumUploadSize() { - return maximumUploadSize; - } - - public void setHiddenAttributes(List hiddenAttributes) { - this.hiddenAttributes = hiddenAttributes; - } - - public void setAttributeSuggestionList(List list) { - this.attributeSuggestionList = list; - } - - public void setCommonAttributes(List commonAttributes) { - this.commonAttributes = commonAttributes; - } - - public void setAttributeDescriptions(List attributeDescriptions) { - this.attributeDescriptions = parseAttributeAndValuePairs(attributeDescriptions); - } - - public void setSourcePollInterval(int sourcePollInterval) { - this.sourcePollInterval = sourcePollInterval; - } - - public int getSourcePollInterval() { - return sourcePollInterval; - } - - public void destroy() { - stopImageryEndpoints(imageryEndpoints); - if (terrainEndpoint != null) { - try { - httpProxy.stop(terrainEndpoint); - } catch (Exception e) { - LOGGER.error("Unable to stop proxy endpoint.", e); - } - } - } - - private List getConfigImageryProviders() { - if (imageryProviderUrlMaps.isEmpty()) { - // @formatter:off - return Collections.singletonList( - ImmutableMap.builder() - .put("type", "SI") - .put("url", "./images/natural_earth_50m.png") - .put("parameters", ImmutableMap.of("imageSize", Arrays.asList(10800, 5400))) - .put("alpha", 1) - .put("name", "Default Layer") - .put("show", true) - .put("proxyEnabled", true) - .put("order", 0) - .build()); - // @formatter:on - } else { - return imageryProviderUrlMaps; - } - } - - private List getDefaultLayoutConfig() { - if (defaultLayout == null || defaultLayout.isEmpty()) { - // @formatter:off - return Collections.singletonList( - ImmutableMap.of( - "type", - "stack", - "content", - Arrays.asList( - ImmutableMap.of( - "type", "component", - "component", "cesium", - "componentName", "cesium", - "title", "3D Map"), - ImmutableMap.of( - "type", "component", - "component", "inspector", - "componentName", "inspector", - "title", "Inspector")))); - // @formatter:on - } else { - return defaultLayout; - } - } - - private List getVisualizationsConfig() { - if (visualizations == null || visualizations.isEmpty()) { - // @formatter:off - return Arrays.asList( - ImmutableMap.of("name", "openlayers", "title", "2D Map", "icon", "map"), - ImmutableMap.of("name", "cesium", "title", "3D Map", "icon", "globe"), - ImmutableMap.of("name", "inspector", "title", "Inspector", "icon", "info"), - ImmutableMap.of("name", "histogram", "title", "Histogram", "icon", "bar-chart"), - ImmutableMap.of("name", "table", "title", "Table", "icon", "table")); - // @formatter:on - } else { - return defaultLayout; - } - } - - public Map getConfig() { - Map config = new HashMap<>(); - - config.put("branding", getProductName()); - config.put("version", getProductVersion()); - config.put("format", format); - config.put("timeout", timeout); - config.put("resultCount", resultCount); - config.put("exportResultLimit", exportResultLimit); - config.put("requiredExportAttributes", requiredExportAttributes); - config.put("exportMetacardFormatOptions", exportMetacardFormatOptions); - config.put("exportMetacardsFormatOptions", exportMetacardsFormatOptions); - config.put("typeNameMapping", typeNameMapping); - config.put("terrainProvider", proxiedTerrainProvider); - config.put("imageryProviders", getConfigImageryProviders()); - config.put("gazetteer", gazetteerEnabled); - config.put("onlineGazetteer", onlineGazetteerEnabled); - config.put("projection", projection); - config.put("bingKey", bingKey); - config.put("readOnly", readOnly); - config.put("summaryShow", summaryShow); - config.put("resultShow", resultShow); - config.put("hiddenAttributes", hiddenAttributes); - config.put("attributeDescriptions", attributeDescriptions); - config.put("attributeAliases", attributeAliases.getAliasMap()); - config.put("sourcePollInterval", sourcePollInterval); - config.put("scheduleFrequencyList", scheduleFrequencyList); - config.put("isCacheDisabled", !cacheEnabled); - config.put("disableLocalCatalog", !localCatalogEnabled); - config.put("defaultLayout", getDefaultLayoutConfig()); - config.put("visualizations", getVisualizationsConfig()); - config.put("isExperimental", experimentalEnabled); - config.put("webSocketsEnabled", webSocketsEnabled); - config.put("iconConfig", iconConfig); - config.put("mapHome", mapHome); - config.put("product", product); - config.put("showRelevanceScores", relevanceScoresEnabled); - config.put("relevancePrecision", relevancePrecision); - config.put("showLogo", logoEnabled); - config.put("isCustomTextNotationEnabled", customTextNotationEnabled); - config.put("customTextNotationAttribute", customTextNotationAttribute); - config.put("isSpellcheckEnabled", spellcheckEnabled); - config.put("isPhoneticsEnabled", phoneticsEnabled); - config.put("isFuzzyResultsEnabled", fuzzyResultsEnabled); - config.put( - "isVersioningEnabled", - historianConfiguration != null && historianConfiguration.isHistoryEnabled()); - config.put("theme", theme); - config.put("disableUnknownErrorBox", !unknownErrorBoxEnabled); - config.put("editorAttributes", getEditorAttributes()); - config.put("requiredAttributes", getRequiredAttributes()); - config.put("enums", getAttributeEnumMap()); - config.put("basicSearchTemporalSelectionDefault", basicSearchTemporalSelectionDefault); - config.put("basicSearchMatchType", basicSearchMatchType); - config.put("useHyphensInUuid", uuidGenerator.useHyphens()); - config.put("i18n", i18n); - config.put("attributeSuggestionList", attributeSuggestionList); - config.put("commonAttributes", commonAttributes); - config.put("defaultSources", defaultSources); - config.put("defaultTableColumns", defaultTableColumns); - config.put("helpUrl", helpUrl); - config.put("landingPageBackgroundSrc", landingPageBackgroundSrc); - config.put("topLeftLogoSrc", topLeftLogoSrc); - config.put("bottomLeftLogoSrc", bottomLeftLogoSrc); - config.put("bottomLeftBackgroundSrc", bottomLeftBackgroundSrc); - config.put("menuIconSrc", menuIconSrc); - config.put("customBranding", customBranding); - config.put("extra", extra); - - return config; - } - - @Override - public void init() { - get("/config", (req, res) -> this.getConfig(), GSON::toJson); - - exception( - Exception.class, - (ex, req, res) -> { - res.status(500); - res.header(CONTENT_TYPE, APPLICATION_JSON); - LOGGER.warn("Failed to serve request.", ex); - res.body(GSON.toJson(ImmutableMap.of("message", ex.getMessage()))); - }); - } - - public String getProductName() { - if (branding != null) { - // Remove the version number - return StringUtils.substringBeforeLast(branding.getProductName(), " "); - } else { - return ""; - } - } - - public String getProductVersion() { - if (branding != null) { - // Remove the version number - return StringUtils.substringAfterLast(branding.getProductName(), " "); - } else { - return ""; - } - } - - public BrandingPlugin getBranding() { - return branding; - } - - public void setBranding(BrandingPlugin branding) { - this.branding = branding; - } - - public String getFormat() { - return format; - } - - public void setFormat(String format) { - this.format = format; - } - - public Integer getTimeout() { - return timeout; - } - - public void setTimeout(Integer timeout) { - this.timeout = timeout; - } - - public List getImageryProviderUrlMaps() { - return imageryProviderUrlMaps; - } - - public String getImageryProviders() { - return GSON.toJson(imageryProviders); - } - - public void setImageryProviders(String imageryProviders) { - if (StringUtils.isEmpty(imageryProviders)) { - this.imageryProviders = Collections.emptyList(); - } else { - try { - Object o = GSON.fromJson(imageryProviders, List.class); - if (o != null) { - this.imageryProviders = (List) o; - setProxiesForImagery(this.imageryProviders); - } else { - this.imageryProviders = Collections.emptyList(); - LOGGER.warn("Could not parse imagery providers as JSON, {}", imageryProviders); - } - } catch (ClassCastException e) { - this.imageryProviders = Collections.emptyList(); - LOGGER.error("Unable to parse terrain provider {} into map.", imageryProviders, e); - } - } - } - - public String getDefaultLayout() { - return GSON.toJson(defaultLayout); - } - - public void setDefaultLayout(String defaultLayout) { - if (StringUtils.isEmpty(defaultLayout)) { - this.defaultLayout = Collections.emptyList(); - } else { - try { - Object o = GSON.fromJson(defaultLayout, List.class); - if (o != null) { - this.defaultLayout = (List) o; - } else { - this.defaultLayout = Collections.emptyList(); - LOGGER.warn("Could not parse default layout config as JSON, {}", defaultLayout); - } - } catch (ClassCastException e) { - this.defaultLayout = Collections.emptyList(); - LOGGER.error("Unable to parse default layout config {} into map.", defaultLayout, e); - } - } - } - - public Map getProxiedTerrainProvider() { - return proxiedTerrainProvider; - } - - public String getTerrainProvider() { - return GSON.toJson(terrainProvider); - } - - public void setTerrainProvider(String terrainProvider) { - if (StringUtils.isEmpty(terrainProvider)) { - this.terrainProvider = null; - } else { - try { - Object o = GSON.fromJson(terrainProvider, Map.class); - if (o != null) { - this.terrainProvider = (Map) o; - } else { - this.terrainProvider = null; - LOGGER.warn("Could not parse terrain providers as JSON, {}", terrainProvider); - } - } catch (ClassCastException e) { - this.terrainProvider = null; - LOGGER.error("Unable to parse terrain provider {} into map.", terrainProvider, e); - } - } - setProxyForTerrain(this.terrainProvider); - } - - private void setProxiesForImagery(List> newImageryProviders) { - List> imageryProvidersToStop = new ArrayList<>(); - List> imageryProvidersToStart = new ArrayList<>(); - - findDifferences(imageryProviderMaps, newImageryProviders, imageryProvidersToStart); - findDifferences(newImageryProviders, imageryProviderMaps, imageryProvidersToStop); - - List proxiesToStop = - imageryProvidersToStop - .stream() - .map(provider -> urlToProxyMap.get(provider.get(URL).toString())) - .collect(Collectors.toList()); - - stopImageryEndpoints(proxiesToStop); - for (Map providerToStop : imageryProvidersToStop) { - urlToProxyMap.remove(providerToStop.get(URL).toString()); - } - startImageryEndpoints(imageryProvidersToStart); - imageryProviderUrlMaps.clear(); - for (Map newImageryProvider : newImageryProviders) { - HashMap map = new HashMap<>(newImageryProvider); - String imageryProviderUrl = newImageryProvider.get(URL).toString(); - boolean proxyEnabled = true; - Object proxyEnabledProp = newImageryProvider.get(PROXY_ENABLED); - if (proxyEnabledProp instanceof Boolean) { - proxyEnabled = (Boolean) proxyEnabledProp; - } - - if (proxyEnabled) { - map.put(URL, SERVLET_PATH + "/" + urlToProxyMap.get(imageryProviderUrl)); - } else { - map.put(URL, imageryProviderUrl); - } - imageryProviderUrlMaps.add(map); - } - imageryProviderMaps = newImageryProviders; - } - - private void findDifferences( - List> innerList, - List> outerList, - List> differences) { - differences.addAll(outerList); - differences.removeIf(innerList::contains); - } - - private void stopImageryEndpoints(List imageryEndpointsToStop) { - for (Iterator iterator = imageryEndpointsToStop.iterator(); iterator.hasNext(); ) { - String endpoint = iterator.next(); - try { - httpProxy.stop(endpoint); - iterator.remove(); - } catch (Exception e) { - LOGGER.error("Unable to stop proxy endpoint: {}", endpoint, e); - } - } - } - - private void startImageryEndpoints(List> imageryProvidersToStart) { - for (Map provider : imageryProvidersToStart) { - String url = provider.get(URL).toString(); - try { - String endpointName = ENDPOINT_NAME + incrementer++; - endpointName = httpProxy.start(endpointName, url, timeout); - urlToProxyMap.put(url, endpointName); - imageryEndpoints.add(endpointName); - } catch (Exception e) { - LOGGER.error("Unable to configure proxy for: {}", url, e); - } - } - } - - private void setProxyForTerrain(Map terrainProvider) { - if (terrainEndpoint != null) { - try { - httpProxy.stop(terrainEndpoint); - } catch (Exception e) { - LOGGER.error("Unable to stop proxy endpoint.", e); - } - } - - proxiedTerrainProvider = startTerrainEndpoint(terrainProvider); - } - - private Map startTerrainEndpoint(Map config) { - if (config == null) { - return null; - } - - if (config.containsKey(URL)) { - String url = config.get(URL).toString(); - - try { - String endpointName = ENDPOINT_NAME + incrementer++; - endpointName = httpProxy.start(endpointName, url, timeout); - terrainEndpoint = endpointName; - config.put(URL, SERVLET_PATH + "/" + endpointName); - } catch (Exception e) { - LOGGER.error("Unable to configure proxy for: {}", url, e); - } - } - - return config; - } - - public void setIconConfig(List icons) { - Map> iconMap = new HashMap<>(); - - icons.forEach( - icon -> { - String key = icon.split("=")[0]; - String[] config = icon.split("=")[1].split(","); - if (config.length != 4) { - LOGGER.debug("Icon Configuration entry [{}] malformed, discarding.", icon); - } else { - Map tempMap = new HashMap<>(); - tempMap.put("className", config[0]); - tempMap.put("code", config[1]); - tempMap.put("font", config[2]); - tempMap.put("size", config[3]); - iconMap.put(key, tempMap); - } - }); - - this.iconConfig = iconMap; - } - - private Map parseAttributeAndValuePairs(List pairs) { - return pairs - .stream() - .map(str -> str.split("=", 2)) - .filter( - (list) -> { - if (list.length <= 1) { - LOGGER.debug("Filtered out invalid attribute/value pair: {}", list[0]); - return false; - } - return true; - }) - .collect(Collectors.toMap(list -> list[0].trim(), list -> list[1].trim())); - } - - public HttpProxyService getHttpProxy() { - return httpProxy; - } - - public void setHttpProxy(HttpProxyService httpProxy) { - this.httpProxy = httpProxy; - } - - public Integer getResultCount() { - return resultCount; - } - - public void setResultCount(Integer resultCount) { - this.resultCount = resultCount; - } - - public Integer getExportResultLimit() { - return exportResultLimit; - } - - public void setExportResultLimit(Integer exportResultLimit) { - this.exportResultLimit = exportResultLimit; - } - - public List getRequiredExportAttributes() { - return requiredExportAttributes; - } - - public void setRequiredExportAttributes(List requiredExportAttributes) { - this.requiredExportAttributes = requiredExportAttributes; - } - - public Set getExportMetacardFormatOptions() { - return exportMetacardFormatOptions; - } - - public void setExportMetacardFormatOptions(String exportMetacardFormatOptions) { - this.exportMetacardFormatOptions = - Arrays.stream(exportMetacardFormatOptions.replaceAll("\\s+", "").split(",")) - .collect(Collectors.toCollection(LinkedHashSet::new)); - } - - public Set getExportMetacardsFormatOptions() { - return exportMetacardsFormatOptions; - } - - public void setExportMetacardsFormatOptions(String exportMetacardsFormatOptions) { - this.exportMetacardsFormatOptions = - Arrays.stream(exportMetacardsFormatOptions.replaceAll("\\s+", "").split(",")) - .collect(Collectors.toCollection(LinkedHashSet::new)); - } - - public Boolean getSignInEnabled() { - return signInEnabled; - } - - public void setSignInEnabled(Boolean signInEnabled) { - this.signInEnabled = signInEnabled; - } - - public Boolean getTaskEnabled() { - return taskEnabled; - } - - public void setTaskEnabled(Boolean taskEnabled) { - this.taskEnabled = taskEnabled; - } - - public Boolean getGazetteerEnabled() { - return gazetteerEnabled; - } - - public void setGazetteerEnabled(Boolean gazetteerEnabled) { - this.gazetteerEnabled = gazetteerEnabled; - } - - public Boolean getOnlineGazetteerEnabled() { - return onlineGazetteerEnabled; - } - - public void setOnlineGazetteerEnabled(Boolean onlineGazetteerEnabled) { - this.onlineGazetteerEnabled = onlineGazetteerEnabled; - } - - public void setCacheEnabled(Boolean cacheEnabled) { - this.cacheEnabled = cacheEnabled; - } - - public void setUnknownErrorBoxEnabled(Boolean unknownErrorBoxEnabled) { - this.unknownErrorBoxEnabled = unknownErrorBoxEnabled; - } - - public Boolean getUnknownErrorBoxEnabled() { - return unknownErrorBoxEnabled; - } - - public void setTypeNameMapping(String[] mappings) { - if (mappings != null) { - typeNameMapping = MapUtils.lazyMap(new TreeMap>(), NEW_SET_FACTORY); - - for (String mappingValue : mappings) { - // workaround for KARAF-1701 - for (String mapping : StringUtils.split(mappingValue, ",")) { - String[] nameAndType = StringUtils.split(mapping, "="); - if (nameAndType.length == 2) { - String displayName = StringUtils.strip(nameAndType[0]); - String type = StringUtils.strip(nameAndType[1]); - if (StringUtils.isNotBlank(displayName) && StringUtils.isNotBlank(type)) { - typeNameMapping.get(displayName).add(type); - } - } else { - LOGGER.info("Invalid type display name mapping format {}", mapping); - } - } - } - } - } - - public void setTypeNameMapping(List mappings) { - if (mappings != null) { - this.setTypeNameMapping(mappings.toArray(new String[mappings.size()])); - } - } - - public Map> getTypeNameMapping() { - return typeNameMapping; - } - - public void setTypeNameMapping(String string) { - if (string != null) { - this.setTypeNameMapping(new String[] {string}); - } - } - - public String getProjection() { - return projection; - } - - public void setProjection(String projection) { - this.projection = projection; - } - - public String getBingKey() { - return bingKey; - } - - public void setBingKey(String bingKey) { - this.bingKey = bingKey; - } - - public Boolean getLocalCatalogEnabled() { - return localCatalogEnabled; - } - - public void setLocalCatalogEnabled(Boolean localCatalogEnabled) { - this.localCatalogEnabled = localCatalogEnabled; - } - - public String getProduct() { - return product; - } - - public void setProduct(String product) { - this.product = product; - } - - public Boolean getRelevanceScoresEnabled() { - return this.relevanceScoresEnabled; - } - - public void setRelevanceScoresEnabled(Boolean relevanceScoresEnabled) { - this.relevanceScoresEnabled = relevanceScoresEnabled; - } - - public Integer getRelevancePrecision() { - return this.relevancePrecision; - } - - public void setRelevancePrecision(Integer relevancePrecision) { - if (relevancePrecision > 0) { - this.relevancePrecision = relevancePrecision; - } - } - - public Boolean getLogoEnabled() { - return logoEnabled; - } - - public void setLogoEnabled(Boolean logoEnabled) { - this.logoEnabled = logoEnabled; - } - - public Boolean getWebSocketsEnabled() { - return webSocketsEnabled; - } - - public void setWebSocketsEnabled(Boolean webSocketsEnabled) { - this.webSocketsEnabled = webSocketsEnabled; - } - - public Boolean getExperimentalEnabled() { - return experimentalEnabled; - } - - public void setExperimentalEnabled(Boolean experimentalEnabled) { - this.experimentalEnabled = experimentalEnabled; - } - - public String getMapHome() { - return mapHome; - } - - public void setMapHome(String mapHome) { - this.mapHome = mapHome; - } - - public Boolean getMetacardPreviewEnabled() { - return metacardPreviewEnabled; - } - - public void setMetacardPreviewEnabled(Boolean metacardPreviewEnabled) { - this.metacardPreviewEnabled = metacardPreviewEnabled; - } - - public Boolean getCustomTextNotationEnabled() { - return customTextNotationEnabled; - } - - public void setCustomTextNotationEnabled(Boolean customTextNotationEnabled) { - this.customTextNotationEnabled = customTextNotationEnabled; - } - - public String getCustomTextNotationAttribute() { - return customTextNotationAttribute; - } - - public void setCustomTextNotationAttribute(String customTextNotationAttribute) { - this.customTextNotationAttribute = customTextNotationAttribute; - } - - public Boolean getSpellcheckEnabled() { - return spellcheckEnabled; - } - - public void setSpellcheckEnabled(Boolean spellcheckEnabled) { - this.spellcheckEnabled = spellcheckEnabled; - } - - public Boolean getPhoneticsEnabled() { - return phoneticsEnabled; - } - - public void setPhoneticsEnabled(Boolean phoneticsEnabled) { - this.phoneticsEnabled = phoneticsEnabled; - } - - public Boolean getFuzzyResultsEnabled() { - return fuzzyResultsEnabled; - } - - public void setFuzzyResultsEnabled(Boolean fuzzyResultsEnabled) { - this.fuzzyResultsEnabled = fuzzyResultsEnabled; - } - - public void setHistorianConfiguration(HistorianConfiguration historian) { - if (historian != null) { - LOGGER.trace("Historian provided, enabled = {}", historian.isHistoryEnabled()); - this.historianConfiguration = historian; - return; - } - LOGGER.trace("Historian was null, enabled = false"); - } - - public String getTheme() { - return theme; - } - - public void setTheme(String theme) { - this.theme = theme; - } - - public void setBasicSearchTemporalSelectionDefault( - List basicSearchTemporalSelectionDefault) { - this.basicSearchTemporalSelectionDefault = basicSearchTemporalSelectionDefault; - } - - public List getBasicSearchTemporalSelectionDefault() { - return basicSearchTemporalSelectionDefault; - } - - public String getVisualizations() { - return GSON.toJson(visualizations); - } - - public void setVisualizations(String visualizations) { - if (StringUtils.isEmpty(visualizations)) { - this.visualizations = Collections.emptyList(); - } else { - try { - Object o = GSON.fromJson(visualizations, List.class); - if (o != null) { - this.visualizations = (List) o; - } else { - this.visualizations = Collections.emptyList(); - LOGGER.warn("Could not parse visualizations config as JSON, {}", visualizations); - } - } catch (ClassCastException e) { - this.visualizations = Collections.emptyList(); - LOGGER.error("Unable to parse visualizations config {} into map.", visualizations, e); - } - } - } - - public String getBasicSearchMatchType() { - return basicSearchMatchType; - } - - public void setBasicSearchMatchType(String basicSearchMatchType) { - this.basicSearchMatchType = basicSearchMatchType; - } - - public List getDefaultSources() { - return defaultSources; - } - - public void setDefaultSources(List defaultSources) { - if (defaultSources == null || defaultSources.isEmpty()) { - this.defaultSources = Collections.emptyList(); - } else { - this.defaultSources = - defaultSources - .stream() - .filter(StringUtils::isNotBlank) - .map(String::trim) - .collect(Collectors.toList()); - } - } - - public List setDefaultTableColumns() { - return defaultTableColumns; - } - - public void setDefaultTableColumns(List defaultTableColumns) { - if (defaultTableColumns == null || defaultTableColumns.isEmpty()) { - this.defaultTableColumns = Collections.emptyList(); - } else { - this.defaultTableColumns = - defaultTableColumns - .stream() - .filter(StringUtils::isNotBlank) - .map(String::trim) - .collect(Collectors.toList()); - } - } - - public String getHelpUrl() { - return helpUrl; - } - - public void setHelpUrl(String url) { - this.helpUrl = url; - } - - public String getCustomBranding() { - return customBranding; - } - - public void setCustomBranding(String customBranding) { - this.customBranding = customBranding; - } - - public String getLandingPageBackgroundSrc() { - return landingPageBackgroundSrc; - } - - public void setLandingPageBackgroundSrc(String landingPageBackgroundSrc) { - this.landingPageBackgroundSrc = landingPageBackgroundSrc; - } - - public String getTopLeftLogoSrc() { - return topLeftLogoSrc; - } - - public void setTopLeftLogoSrc(String topLeftLogoSrc) { - this.topLeftLogoSrc = topLeftLogoSrc; - } - - public String getBottomLeftLogoSrc() { - return bottomLeftLogoSrc; - } - - public void setBottomLeftLogoSrc(String bottomLeftLogoSrc) { - this.bottomLeftLogoSrc = bottomLeftLogoSrc; - } - - public String getBottomLeftBackgroundSrc() { - return bottomLeftBackgroundSrc; - } - - public void setBottomLeftBackgroundSrc(String bottomLeftBackgroundSrc) { - this.bottomLeftBackgroundSrc = bottomLeftBackgroundSrc; - } - - public String getMenuIconSrc() { - return menuIconSrc; - } - - public void setMenuIconSrc(String menuIconSrc) { - this.menuIconSrc = menuIconSrc; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/configuration/PlatformUiConfigurationApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/configuration/PlatformUiConfigurationApplication.java deleted file mode 100644 index 3e39795ab96..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/configuration/PlatformUiConfigurationApplication.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.configuration; - -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static org.apache.http.protocol.HTTP.CONTENT_TYPE; -import static spark.Spark.get; - -import org.codice.ddf.configuration.service.PlatformUiConfigurationService; -import spark.servlet.SparkApplication; - -public class PlatformUiConfigurationApplication implements SparkApplication { - - private PlatformUiConfigurationService platformUiConfigurationService; - - public PlatformUiConfigurationApplication(PlatformUiConfigurationService configurationService) { - platformUiConfigurationService = configurationService; - } - - @Override - public void init() { - get( - "/platform/config/ui", - APPLICATION_JSON, - (req, res) -> { - String response = getConfigAsJsonString(); - res.status(200); - res.header(CONTENT_TYPE, APPLICATION_JSON); - return response; - }); - } - - public String getConfigAsJsonString() { - return platformUiConfigurationService.getConfigAsJsonString(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/data/impl/UiAttributeImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/data/impl/UiAttributeImpl.java deleted file mode 100644 index 87f66731ca5..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/data/impl/UiAttributeImpl.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package ddf.catalog.data.impl; - -import ddf.catalog.data.Attribute; -import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.util.LinkedList; -import java.util.List; -import java.util.Objects; - -/** - * A simple implementation of {@link Attribute}. - * - *

- * - *

This class is {@link Serializable} and care should be taken with compatibility if changes are - * made. - * - *

- * - *

For what constitutes a compatible change in serialization, see Sun's - * Guidelines. - */ -public class UiAttributeImpl implements Attribute { - - private static final long serialVersionUID = 1L; - - /** - * Nontransient field that holds the name of the {@link Attribute}. - * - * @serial - */ - protected String name; - - private transient List values; - - /** - * Constructor - * - * @param name - the name of this {@link Attribute} - * @param value - the value of this {@link Attribute} - */ - public UiAttributeImpl(String name, Serializable value) { - /* - * If any defensive logic is added to this constructor, then that logic should be reflected - * in the deserialization (readObject()) of this object so that the integrity of a - * serialized object is maintained. For instance, if a null check is added in the - * constructor, the same check should be added in the readObject() method. - */ - this.name = name; - this.values = createPopulatedList(value); - } - - /** - * Static factory method to avoid ambiguous constructor references when passing a value that - * implements both {@link List} and {@link Serializable}, such as an {@link java.util.ArrayList}. - * See {@link #UiAttributeImpl(String, Serializable)}. - */ - public static UiAttributeImpl fromSingleValue(String name, Serializable value) { - return new UiAttributeImpl(name, value); - } - - /** - * Multivalued Constructor - * - * @param name - the name of this {@link Attribute} - * @param values - the value of this {@link Attribute} - */ - public UiAttributeImpl(String name, List values) { - /* - * If any defensive logic is added to this constructor, then that logic should be reflected - * in the deserialization (readObject()) of this object so that the integrity of a - * serialized object is maintained. For instance, if a null check is added in the - * constructor, the same check should be added in the readObject() method. - */ - this.name = name; - this.values = new LinkedList<>(values); - } - - /** - * Static factory method to avoid ambiguous constructor references when passing a value that - * implements both {@link List} and {@link Serializable}, such as an {@link java.util.ArrayList}. - * See {@link #UiAttributeImpl(String, List)}. - */ - public static UiAttributeImpl fromMultipleValues( - String name, List values) { - return new UiAttributeImpl(name, values); - } - - /** Copy Constructor */ - public UiAttributeImpl(Attribute attribute) { - /* - * If any defensive logic is added to this constructor, then that logic should be reflected - * in the deserialization (readObject()) of this object so that the integrity of a - * serialized object is maintained. For instance, if a null check is added in the - * constructor, the same check should be added in the readObject() method. - */ - this(attribute.getName(), attribute.getValues()); - } - - @Override - public String getName() { - return name; - } - - @Override - public Serializable getValue() { - if (!values.isEmpty()) { - return values.get(0); - } else { - return null; - } - } - - @Override - public List getValues() { - return values; - } - - /** - * Adds a value to this {@link Attribute} - * - * @param value the value to add - */ - public void addValue(Serializable value) { - values.add(value); - } - - /** Clears all {@link Attribute} values */ - public void clearValues() { - values.clear(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - - if (!(o instanceof Attribute)) { - return false; - } - - Attribute attribute = (Attribute) o; - - return Objects.equals(name, attribute.getName()) - && Objects.equals(values, attribute.getValues()); - } - - @Override - public int hashCode() { - return Objects.hash(name, values); - } - - private List createPopulatedList(Serializable value) { - List list = new LinkedList<>(); - if (value instanceof List) { - list.addAll((List) value); - } else { - list.add(value); - } - return list; - } - - /** - * Serializes this {@link UiAttributeImpl} instance. - * - * @param s - the {@link ObjectOutputStream} which contains the object to be serialized - * @throws IOException - * @serialData First, all non-transient fields are written out by the default Java serialization - * implementation (ObjectInputStream.defaultWriteObject()). Then the number of "value" objects - * is written out as an ({@code int}). After the number of objects, each "value" object is - * written out (each as {@code Serializable}). - */ - private void writeObject(ObjectOutputStream s) throws IOException { - - /* - * defaultWriteObject() is invoked for greater flexibility and compatibility. See the - * *Serialization Note* in MetacardImpl's class Javadoc. - */ - s.defaultWriteObject(); - - s.writeInt(values.size()); - - for (Serializable ser : values) { - s.writeObject(ser); - } - } - - /** - * Deserializes this {@link UiAttributeImpl}'s instance. - * - * @param s the {@link ObjectInputStream} that contains the bytes of the object - * @throws IOException - * @throws ClassNotFoundException - */ - private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { - - /* - * defaultReadObject() is invoked for greater flexibility and compatibility. See the - * *Serialization Note* in MetacardImpl's class Javadoc. - */ - s.defaultReadObject(); - - int numElements = s.readInt(); - - validateNonEmpty(numElements); - - values = new LinkedList(); - for (int i = 0; i < numElements; i++) { - values.add((Serializable) s.readObject()); - } - - validateUntampered(numElements); - } - - private void validateUntampered(int numElements) throws InvalidObjectException { - // Invariant: When the object was serialized, the integer written to - // disk matched the number of value objects written to disk. - if (values.size() != numElements) { - throw new InvalidObjectException( - "Corrupt object: written number of values does not match actual number of values."); - } - } - - private void validateNonEmpty(int numElements) throws InvalidObjectException { - // Invariant: This implementation does not allow an Attribute object - // with no values - if (numElements == 0) { - throw new InvalidObjectException( - "Cannot construct " + this.getClass().getName() + " object without any values."); - } - } - - @Override - public String toString() { - return getClass().getName() + " {name=" + this.name + ", values=" + this.values + "}"; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsApplication.java deleted file mode 100644 index e0366f0c0be..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsApplication.java +++ /dev/null @@ -1,428 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static org.codice.ddf.catalog.ui.forms.data.AttributeGroupType.ATTRIBUTE_GROUP_TAG; -import static org.codice.ddf.catalog.ui.forms.data.QueryTemplateType.QUERY_TEMPLATE_TAG; -import static org.codice.gsonsupport.GsonTypeAdapters.MAP_STRING_TO_OBJECT_TYPE; -import static spark.Spark.delete; -import static spark.Spark.exception; -import static spark.Spark.get; -import static spark.Spark.post; -import static spark.Spark.put; - -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.types.Core; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.DeleteResponse; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.DeleteRequestImpl; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.security.Subject; -import ddf.security.SubjectOperations; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.util.Comparator; -import java.util.Date; -import java.util.Map; -import java.util.Objects; -import java.util.function.Supplier; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import javax.annotation.Nullable; -import org.apache.shiro.SecurityUtils; -import org.codice.ddf.catalog.ui.forms.model.pojo.CommonTemplate; -import org.codice.ddf.catalog.ui.forms.model.pojo.FormTemplate; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.gsonsupport.GsonTypeAdapters.DateLongFormatTypeAdapter; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.opengis.filter.Filter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.Request; -import spark.Response; -import spark.servlet.SparkApplication; - -/** Provides an internal REST interface for working with custom form data for Intrigue. */ -public class SearchFormsApplication implements SparkApplication { - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .registerTypeAdapter(Date.class, new DateLongFormatTypeAdapter()) - .create(); - - private final CatalogFramework catalogFramework; - - private final FilterBuilder filterBuilder; - - private final TemplateTransformer transformer; - - private final EndpointUtil util; - - private final Supplier subjectSupplier; - - private SubjectOperations subjectOperations; - - private static final String RESP_MSG = "message"; - - private static final String SOMETHING_WENT_WRONG = "Something went wrong."; - - private static final String NO_VALID_TEMPLATE = "Could not update, no valid template specified"; - - private static final String CREATED_ON = "createdOn"; - - private static final Logger LOGGER = LoggerFactory.getLogger(SearchFormsApplication.class); - - public SearchFormsApplication( - CatalogFramework catalogFramework, - FilterBuilder filterBuilder, - TemplateTransformer transformer, - EndpointUtil util) { - this(catalogFramework, filterBuilder, transformer, util, SearchFormsApplication::getSubject); - } - - public SearchFormsApplication( - CatalogFramework catalogFramework, - FilterBuilder filterBuilder, - TemplateTransformer transformer, - EndpointUtil util, - Supplier subjectSupplier) { - this.catalogFramework = catalogFramework; - this.filterBuilder = filterBuilder; - this.transformer = transformer; - this.util = util; - this.subjectSupplier = subjectSupplier; - } - - /** - * Spark's API-mandated init (not OSGi related) for registering REST functions. If no forms - * directory exists, no PUT/DELETE routes will be registered. The feature is effectively "off". - */ - @Override - public void init() { - get( - "/forms/query/:id", - (req, res) -> { - String id = req.params("id"); - - Metacard metacard = getMetacardIfExistsOrNull(id); - FormTemplate form = transformer.toFormTemplate(metacard); - return GSON.toJson(form); - }); - - get( - "/forms/query", - (req, res) -> - util.getMetacardsByTag(QUERY_TEMPLATE_TAG) - .values() - .stream() - .map(Result::getMetacard) - .filter(Objects::nonNull) - .map(transformer::toFormTemplate) - .filter(Objects::nonNull) - .sorted(Comparator.comparing(CommonTemplate::getTitle)) - .collect(Collectors.toList()), - GSON::toJson); - - get( - "/forms/result", - (req, res) -> - util.getMetacardsByTag(ATTRIBUTE_GROUP_TAG) - .values() - .stream() - .map(Result::getMetacard) - .filter(Objects::nonNull) - .map(transformer::toFieldFilter) - .filter(Objects::nonNull) - .sorted(Comparator.comparing(CommonTemplate::getTitle)) - .collect(Collectors.toList()), - GSON::toJson); - - post( - "/forms/query", - APPLICATION_JSON, - (req, res) -> - runWhenNotGuest( - res, - () -> - doCreate( - res, - Stream.of(safeGetBody(req)) - .map(this::parseMap) - .map(transformer::toQueryTemplateMetacard) - .filter(Objects::nonNull) - .findFirst() - .orElse(null))), - GSON::toJson); - - put( - "/forms/query/:id", - APPLICATION_JSON, - (req, res) -> - runWhenNotGuest( - res, - () -> - doUpdate( - res, - Stream.of(safeGetBody(req)) - .map(this::parseMap) - .map(transformer::toQueryTemplateMetacard) - .filter(Objects::nonNull) - .findFirst() - .orElse(null), - req.params("id"))), - GSON::toJson); - - post( - "/forms/result", - APPLICATION_JSON, - (req, res) -> - runWhenNotGuest( - res, - () -> - doCreate( - res, - Stream.of(safeGetBody(req)) - .map(this::parseMap) - .map(transformer::toAttributeGroupMetacard) - .filter(Objects::nonNull) - .findFirst() - .orElse(null))), - GSON::toJson); - - put( - "/forms/result/:id", - APPLICATION_JSON, - (req, res) -> - runWhenNotGuest( - res, - () -> - doUpdate( - res, - Stream.of(safeGetBody(req)) - .map(this::parseMap) - .map(transformer::toAttributeGroupMetacard) - .filter(Objects::nonNull) - .findFirst() - .orElse(null), - req.params("id"))), - GSON::toJson); - - delete( - "/forms/:id", - APPLICATION_JSON, - (req, res) -> { - String id = req.params(":id"); - DeleteResponse deleteResponse = catalogFramework.delete(new DeleteRequestImpl(id)); - if (!deleteResponse.getProcessingErrors().isEmpty()) { - res.status(500); - LOGGER.debug("Failed to Delete Form {}", id); - return ImmutableMap.of(RESP_MSG, "Failed to delete."); - } - return ImmutableMap.of(RESP_MSG, "Successfully deleted."); - }, - util::getJson); - - exception( - IllegalArgumentException.class, - (e, req, res) -> { - LOGGER.debug("Template input was not valid", e); - res.status(400); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(util.getJson(ImmutableMap.of(RESP_MSG, "Input was not valid."))); - }); - - exception( - IngestException.class, - (ex, req, res) -> { - LOGGER.debug("Failed to persist form", ex); - res.status(404); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body( - util.getJson(ImmutableMap.of(RESP_MSG, "Form is either restricted or not found."))); - }); - - exception( - UnsupportedOperationException.class, - (e, req, res) -> { - LOGGER.debug("Could not use filter JSON because it contains unsupported operations", e); - res.status(501); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(util.getJson(ImmutableMap.of(RESP_MSG, "This operation is not supported."))); - }); - - exception( - SourceUnavailableException.class, - (ex, req, res) -> { - LOGGER.debug("Failed to persist form", ex); - res.status(503); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body( - util.getJson( - ImmutableMap.of(RESP_MSG, "Source not available, please try again later."))); - }); - - exception(UncheckedIOException.class, util::handleIOException); - - exception( - RuntimeException.class, - (e, req, res) -> { - LOGGER.error(SOMETHING_WENT_WRONG, e); - res.status(500); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(util.getJson(ImmutableMap.of(RESP_MSG, SOMETHING_WENT_WRONG))); - }); - - exception( - Exception.class, - (e, req, res) -> { - LOGGER.error(SOMETHING_WENT_WRONG, e); - res.status(500); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(util.getJson(ImmutableMap.of(RESP_MSG, SOMETHING_WENT_WRONG))); - }); - } - - private Map parseMap(String json) { - return GSON.fromJson(json, MAP_STRING_TO_OBJECT_TYPE); - } - - private Map runWhenNotGuest( - Response res, CheckedSupplier> templateOperation) throws Exception { - Subject subject = subjectSupplier.get(); - if (subjectOperations.isGuest(subject)) { - res.status(403); - return ImmutableMap.of(RESP_MSG, "Guests cannot perform this action."); - } - return templateOperation.get(); - } - - private String safeGetBody(Request req) { - try { - return util.safeGetBody(req); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - private Map doCreate(Response response, @Nullable Metacard metacard) - throws IngestException, SourceUnavailableException { - if (metacard == null) { - response.status(400); - return ImmutableMap.of(RESP_MSG, "Could not create metacard, no valid template specified"); - } - if (metacard.getId() != null) { - LOGGER.debug( - "Cannot specify an ID [{}] when creating form/result metacard", metacard.getId()); - response.status(400); - return ImmutableMap.of(RESP_MSG, "Could not create metacard, ID attribute not allowed"); - } - Metacard createdMetacard = - catalogFramework.create(new CreateRequestImpl(metacard)).getCreatedMetacards().get(0); - return ImmutableMap.builder() - .put(Core.ID, createdMetacard.getId()) - .put(CREATED_ON, createdMetacard.getAttribute(Core.CREATED).getValue()) - .build(); - } - - private Map doUpdate( - Response response, @Nullable Metacard metacard, @Nullable String expectedId) - throws IngestException, SourceUnavailableException, FederationException, - UnsupportedQueryException { - if (metacard == null) { - LOGGER.debug("Form/Result metacard was null"); - response.status(400); - return ImmutableMap.of(RESP_MSG, NO_VALID_TEMPLATE); - } - String id = metacard.getId(); - if (id == null) { - LOGGER.debug("Form/Result metacard [{}] had no ID on HTTP body", metacard); - response.status(400); - return ImmutableMap.of(RESP_MSG, NO_VALID_TEMPLATE); - } - if (expectedId == null || !expectedId.equals(id)) { - LOGGER.debug( - "Query param ID [{}] did not match body ID [{}] or was not provided", expectedId, id); - response.status(400); - return ImmutableMap.of(RESP_MSG, NO_VALID_TEMPLATE); - } - Metacard oldMetacard = getMetacardIfExistsOrNull(id); - if (oldMetacard == null) { - LOGGER.debug( - "Form/Result metacard [{}] with ID [{}] does not exist and cannot be updated", - metacard, - id); - response.status(400); - return ImmutableMap.of(RESP_MSG, NO_VALID_TEMPLATE); - } - for (AttributeDescriptor descriptor : oldMetacard.getMetacardType().getAttributeDescriptors()) { - Attribute metacardAttribute = metacard.getAttribute(descriptor.getName()); - if (metacardAttribute == null || metacardAttribute.getValue() == null) { - continue; - } - LOGGER.trace("Setting attribute [{}]", metacardAttribute); - oldMetacard.setAttribute(metacardAttribute); - } - catalogFramework.update(new UpdateRequestImpl(id, oldMetacard)); - return ImmutableMap.of(RESP_MSG, "Successfully updated"); - } - - @Nullable - private Metacard getMetacardIfExistsOrNull(String id) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - Filter idFilter = filterBuilder.attribute(Metacard.ID).is().equalTo().text(id); - Filter tagsFilter = filterBuilder.attribute(Metacard.TAGS).is().like().text("*"); - Filter filter = filterBuilder.allOf(idFilter, tagsFilter); - - QueryResponse queryResponse = - catalogFramework.query(new QueryRequestImpl(new QueryImpl(filter), false)); - - if (!queryResponse.getResults().isEmpty()) { - return queryResponse.getResults().get(0).getMetacard(); - } - - return null; - } - - private static Subject getSubject() { - return (Subject) SecurityUtils.getSubject(); - } - - @FunctionalInterface - @SuppressWarnings("squid:S00112" /* Supplier to mimic Spark's routing API */) - private interface CheckedSupplier { - T get() throws Exception; - } - - public void setSubjectOperations(SubjectOperations subjectOperations) { - this.subjectOperations = subjectOperations; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsLoader.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsLoader.java deleted file mode 100644 index 469bee3eb2c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsLoader.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.types.Core; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.function.Consumer; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import javax.annotation.Nullable; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.forms.data.AttributeGroupMetacard; -import org.codice.ddf.catalog.ui.forms.data.QueryTemplateMetacard; -import org.codice.ddf.catalog.ui.query.utility.EndpointUtility; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.configuration.AbsolutePathResolver; -import org.codice.ddf.security.Security; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Loads initial system template configuration from the file system so template defaults in - * distributions can vary independently. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class SearchFormsLoader { - private static final Logger LOGGER = LoggerFactory.getLogger(SearchFormsLoader.class); - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - private static final File DEFAULT_FORMS_DIRECTORY = - new File(new AbsolutePathResolver("etc/forms").getPath()); - - private static final String DEFAULT_FORMS_FILE = "forms.json"; - - private static final String DEFAULT_RESULTS_FILE = "results.json"; - - private final File formsDirectory; - - private final Security security; - - private final String formsFileName; - - private final String resultsFileName; - - private final CatalogFramework catalogFramework; - - private final TemplateTransformer transformer; - - private final EndpointUtility endpointUtil; - - public SearchFormsLoader( - CatalogFramework catalogFramework, - TemplateTransformer transformer, - EndpointUtil endpointUtil, - Security security) { - this(catalogFramework, transformer, endpointUtil, null, null, null, security); - } - - public SearchFormsLoader( - CatalogFramework catalogFramework, - TemplateTransformer transformer, - EndpointUtility endpointUtil, - @Nullable String formsDirectory, - @Nullable String formsFileName, - @Nullable String resultsFileName, - Security security) { - this.catalogFramework = catalogFramework; - this.transformer = transformer; - this.endpointUtil = endpointUtil; - this.formsFileName = (formsFileName == null) ? DEFAULT_FORMS_FILE : formsFileName; - this.resultsFileName = (resultsFileName == null) ? DEFAULT_RESULTS_FILE : resultsFileName; - this.formsDirectory = - (formsDirectory == null) - ? DEFAULT_FORMS_DIRECTORY - : new File(new AbsolutePathResolver(formsDirectory).getPath()); - this.security = security; - LOGGER.debug( - "Initializing forms loader with directory [{}], forms file name [{}], and results file name [{}]", - formsDirectory, - formsFileName, - resultsFileName); - } - - /** - * Setup the catalog with system templates. - * - * @param systemTemplates system templates loaded from config. - */ - public void bootstrap(List systemTemplates) { - security.runAsAdmin( - () -> { - security.getSystemSubject().execute(() -> this.createSystemMetacards(systemTemplates)); - return null; - }); - } - - public List retrieveSystemTemplateMetacards() { - if (!formsDirectory.exists()) { - LOGGER.warn("Could not locate forms directory [{}]", formsDirectory.getAbsolutePath()); - return Collections.emptyList(); - } - - File formsFile = formsDirectory.toPath().resolve(formsFileName).toFile(); - File resultsFile = formsDirectory.toPath().resolve(resultsFileName).toFile(); - - return Stream.concat( - loadFile(formsFile, this::formMapper), loadFile(resultsFile, this::resultsMapper)) - .collect(Collectors.toList()); - } - - /** - * Read the provided JSON file and return a stream of metacards. - * - * @param file the JSON file to read. - * @param mapper a transform function for converting raw JSON config into either a query or result - * template metacard, as appropriate - * @return a stream of the converted metacards. - */ - @SuppressWarnings("unchecked" /* Actually is checked, see early return if not a List */) - private Stream loadFile(File file, Function mapper) { - if (!file.exists()) { - LOGGER.debug("Could not locate {}", file.getName()); - return Stream.empty(); - } - - String payload = getFileContent(file); - if (payload == null) { - LOGGER.debug("Problem reading {}", file.getName()); - return Stream.empty(); - } - - Object configObject = GSON.fromJson(payload, Object.class); - if (!(configObject instanceof List)) { - LOGGER.warn( - "Could not load forms configuration in {}, JSON should be a list of maps", - file.getName()); - return Stream.empty(); - } - - List configs = (List) configObject; - return configs - .stream() - .peek(obj -> loggingConsumerFactory(file).accept(obj)) - .filter(Map.class::isInstance) - .map(Map.class::cast) - .map(mapper) - .filter(Objects::nonNull); - } - - /** Parse the JSON map for initializing system form templates. */ - @Nullable - private Metacard formMapper(Map map) { - String title = SearchFormsUtil.safeGet(map, Core.TITLE, String.class); - String description = SearchFormsUtil.safeGet(map, Core.DESCRIPTION, String.class); - String filterTemplateFile = SearchFormsUtil.safeGet(map, "filterTemplateFile", String.class); - Map querySettings = - SearchFormsUtil.safeGetMap(map, "querySettings", Object.class); - - if (SearchFormsUtil.anyNull(title, description, filterTemplateFile)) { - return null; - } - - File xmlFile = formsDirectory.toPath().resolve(filterTemplateFile).toFile(); - if (!xmlFile.exists()) { - LOGGER.warn("Filter XML file does not exist: {}", filterTemplateFile); - return null; - } - - String filterXml = getFileContent(xmlFile); - if (filterXml == null) { - return null; - } - - QueryTemplateMetacard metacard = new QueryTemplateMetacard(title, description); - Set newTags = new HashSet<>(metacard.getTags()); - newTags.add(SYSTEM_TEMPLATE); - metacard.setTags(newTags); - metacard.setFormsFilter(filterXml); - if (querySettings != null) { - metacard.setQuerySettings(querySettings); - } - - // Validation so the catalog is not contaminated on startup, which would impact every request - if (transformer.invalidFormTemplate(metacard)) { - LOGGER.warn("System forms configuration for template '{}' had one or more problems", title); - return null; - } - - return metacard; - } - - /** Parse the JSON map for initializing system result templates. */ - @Nullable - private Metacard resultsMapper(Map map) { - String title = SearchFormsUtil.safeGet(map, Core.TITLE, String.class); - String description = SearchFormsUtil.safeGet(map, Core.DESCRIPTION, String.class); - List descriptors = SearchFormsUtil.safeGetList(map, "descriptors", String.class); - - if (SearchFormsUtil.anyNull(title, description, descriptors)) { - return null; - } - - AttributeGroupMetacard metacard = new AttributeGroupMetacard(title, description); - Set newTags = new HashSet<>(metacard.getTags()); - newTags.add(SYSTEM_TEMPLATE); - metacard.setTags(newTags); - metacard.setGroupDescriptors(new HashSet<>(descriptors)); - return metacard; - } - - @Nullable - private String getFileContent(File file) { - try (InputStream is = new FileInputStream(file)) { - return IOUtils.toString(is, "UTF-8"); - } catch (IOException e) { - LOGGER.error("Problem reading from {}, {}", file.getName(), e.getMessage()); - LOGGER.debug("Problem reading from {}", file.getName(), e); - } - return null; - } - - private Set titlesTransform(Map resultMap) { - return resultMap - .values() - .stream() - .map(Result::getMetacard) - .map(Metacard::getTitle) - .filter(Objects::nonNull) - .collect(Collectors.toSet()); - } - - private Consumer loggingConsumerFactory(File file) { - return obj -> { - if (!(obj instanceof Map)) { - LOGGER.warn( - "Unexpected configuration in {}, values should be maps not {}", - file.getName(), - obj.getClass().getName()); - } - }; - } - - /** - * Creates system-template metacards from the transformed forms directory data. Ensures that no - * duplicate system forms can be stored. - * - * @param systemTemplates List of metacards loaded from the specified forms directory to store - * into the catalog - */ - private void createSystemMetacards(List systemTemplates) { - Set existentSystemTemplates = - titlesTransform(endpointUtil.getMetacardsByTag(SYSTEM_TEMPLATE)); - List dedupedTemplateMetacards = - systemTemplates - .stream() - .filter(metacard -> !existentSystemTemplates.contains(metacard.getTitle())) - .collect(Collectors.toList()); - - if (!dedupedTemplateMetacards.isEmpty()) { - try { - catalogFramework.create(new CreateRequestImpl(dedupedTemplateMetacards)); - } catch (SourceUnavailableException | IngestException e) { - // The wrapped exception stacktrace isn't shown when the forms are loaded from the - // console so we also log it here - LOGGER.debug("Could not create System Template metacards", e); - throw new RuntimeException("Could not load System Templates", e); - } - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsUtil.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsUtil.java deleted file mode 100644 index aeb1acd3269..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/SearchFormsUtil.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import java.util.AbstractMap; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SearchFormsUtil { - private static final Logger LOGGER = LoggerFactory.getLogger(SearchFormsUtil.class); - - private static final String EXCEPTION_OCCURRED_PARSING = "Exception occurred parsing config file"; - - public static boolean anyNull(Object... args) { - return args == null || Arrays.stream(args).anyMatch(Objects::isNull); - } - - public static Map safeGetMap(Map map, String key, Class valueType) { - Map unchecked = safeGet(map, key, Map.class); - if (unchecked == null) { - return Collections.emptyMap(); - } - try { - return unchecked - .entrySet() - .stream() - .map(e -> new AbstractMap.SimpleEntry<>(String.class.cast(e.getKey()), e.getValue())) - .map(e -> new AbstractMap.SimpleEntry<>(e.getKey(), valueType.cast(e.getValue()))) - .collect( - Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); - } catch (ClassCastException e) { - LOGGER.debug(EXCEPTION_OCCURRED_PARSING, e); - LOGGER.warn( - "Form configuration field {} was malformed, expected a querySettings Map containing type {}", - key, - valueType.getName()); - } - return Collections.emptyMap(); - } - - @Nullable - public static List safeGetList(Map map, String key, Class type) { - List unchecked = safeGet(map, key, List.class); - if (unchecked == null) { - return Collections.emptyList(); - } - try { - return (List) unchecked.stream().map(type::cast).collect(Collectors.toList()); - } catch (ClassCastException e) { - LOGGER.debug(EXCEPTION_OCCURRED_PARSING, e); - LOGGER.warn( - "Form configuration field {} was malformed, expected a List containing type {}", - key, - type.getName()); - } - return Collections.emptyList(); - } - - @Nullable - public static T safeGet(Map map, String key, Class type) { - Object value = map.get(key); - if (value == null) { - LOGGER.debug("Unexpected null entry: {}", key); - return null; - } - try { - return type.cast(value); - } catch (ClassCastException e) { - LOGGER.debug(EXCEPTION_OCCURRED_PARSING, e); - LOGGER.warn( - "Form configuration field {} was malformed, expected a {} but got {}", - key, - type.getName(), - value.getClass().getName()); - } - return null; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/TemplateTransformer.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/TemplateTransformer.java deleted file mode 100644 index 074eefa707c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/TemplateTransformer.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import java.io.ByteArrayInputStream; -import java.io.Serializable; -import java.nio.charset.StandardCharsets; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import javax.annotation.Nullable; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import net.opengis.filter.v_2_0.FilterType; -import org.apache.commons.lang3.StringUtils; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; -import org.codice.ddf.catalog.ui.forms.builder.JsonModelBuilder; -import org.codice.ddf.catalog.ui.forms.builder.XmlModelBuilder; -import org.codice.ddf.catalog.ui.forms.data.AttributeGroupMetacard; -import org.codice.ddf.catalog.ui.forms.data.QueryTemplateMetacard; -import org.codice.ddf.catalog.ui.forms.filter.FilterProcessingException; -import org.codice.ddf.catalog.ui.forms.filter.FilterReader; -import org.codice.ddf.catalog.ui.forms.filter.FilterWriter; -import org.codice.ddf.catalog.ui.forms.filter.TransformVisitor; -import org.codice.ddf.catalog.ui.forms.filter.VisitableJsonElementImpl; -import org.codice.ddf.catalog.ui.forms.filter.VisitableXmlElementImpl; -import org.codice.ddf.catalog.ui.forms.model.FilterNodeMapImpl; -import org.codice.ddf.catalog.ui.forms.model.pojo.FieldFilter; -import org.codice.ddf.catalog.ui.forms.model.pojo.FormTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Transform metacards into the data model expected by the frontend. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class TemplateTransformer { - private static final Logger LOGGER = LoggerFactory.getLogger(TemplateTransformer.class); - - private final FilterWriter writer; - - private final AttributeRegistry registry; - - public TemplateTransformer(FilterWriter writer, AttributeRegistry registry) { - this.writer = writer; - this.registry = registry; - } - - public boolean invalidFormTemplate(Metacard metacard) { - return toFormTemplate(metacard) == null; - } - - /** Convert the JSON representation of a FormTemplate to a QueryTemplateMetacard. */ - @Nullable - public Metacard toQueryTemplateMetacard(Map formTemplate) { - try { - Map filterJson = (Map) formTemplate.get("filterTemplate"); - if (filterJson == null) { - return null; - } - - String title = (String) formTemplate.get("title"); - if (StringUtils.isBlank(title)) { - throw new IllegalArgumentException("Search form title cannot be blank"); - } - - String description = (String) formTemplate.get("description"); - String id = (String) formTemplate.get("id"); - - TransformVisitor visitor = new TransformVisitor<>(new XmlModelBuilder(registry)); - VisitableJsonElementImpl.create(new FilterNodeMapImpl(filterJson)).accept(visitor); - JAXBElement filter = visitor.getResult(); - if (!filter.getDeclaredType().equals(FilterType.class)) { - LOGGER.error( - "Error occurred during filter processing, root type should be a {} but was {}", - FilterType.class.getName(), - filter.getDeclaredType().getName()); - return null; - } - - QueryTemplateMetacard metacard = - (id == null) - ? new QueryTemplateMetacard(title, description) - : new QueryTemplateMetacard(title, description, id); - - String filterXml = writer.marshal(filter); - metacard.setFormsFilter(filterXml); - Map querySettings = (Map) formTemplate.get("querySettings"); - if (querySettings != null) { - metacard.setQuerySettings(querySettings); - } - - return metacard; - } catch (JAXBException e) { - LOGGER.error("XML generation failed for query template metacard's filter", e); - } catch (FilterProcessingException e) { - LOGGER.error("Could not use filter JSON for template - {}", e.getMessage()); - } - return null; - } - - /** Convert a query template metacard into the JSON representation of FormTemplate. */ - @Nullable - public FormTemplate toFormTemplate(Metacard metacard) { - if (!QueryTemplateMetacard.isQueryTemplateMetacard(metacard)) { - LOGGER.debug("Metacard {} was not a query template metacard", metacard.getId()); - return null; - } - - QueryTemplateMetacard wrapped = new QueryTemplateMetacard(metacard); - TransformVisitor visitor = new TransformVisitor<>(new JsonModelBuilder(registry)); - - String metacardOwner = retrieveOwnerIfPresent(metacard); - Map> securityAttributes = retrieveSecurityIfPresent(metacard); - - try { - FilterReader reader = new FilterReader(); - String formsFilter = wrapped.getFormsFilter(); - if (formsFilter == null) { - LOGGER.debug( - "Invalid form data was ingested for metacard [{}], no form filter present", - wrapped.getId()); - return null; - } - JAXBElement root = - reader.unmarshalFilter( - new ByteArrayInputStream(formsFilter.getBytes(StandardCharsets.UTF_8))); - VisitableXmlElementImpl.create(root).accept(visitor); - return new FormTemplate( - wrapped, - visitor.getResult(), - securityAttributes, - metacardOwner, - wrapped.getQuerySettings()); - } catch (JAXBException e) { - LOGGER.error( - "XML parsing failed for query template metacard's filter, with metacard id " - + metacard.getId(), - e); - } catch (FilterProcessingException e) { - LOGGER.error( - "Could not use filter XML for template - {} [metacard id = {}]", - e.getMessage(), - metacard.getId()); - } catch (UnsupportedOperationException e) { - LOGGER.error( - "Could not use filter XML because it contains unsupported operations - {} [metacard id = {}]", - e.getMessage(), - metacard.getId()); - } - return null; - } - - /** Convert the JSON representation of FieldFilter to an AttributeGroupMetacard. */ - @Nullable - public Metacard toAttributeGroupMetacard(Map resultTemplateMap) { - FieldFilter fieldFilter = new FieldFilter(resultTemplateMap); - String id = fieldFilter.getId(); - - AttributeGroupMetacard metacard = - (id == null) - ? new AttributeGroupMetacard(fieldFilter.getTitle(), fieldFilter.getDescription()) - : new AttributeGroupMetacard(fieldFilter.getTitle(), fieldFilter.getDescription(), id); - - metacard.setGroupDescriptors(fieldFilter.getDescriptors()); - return metacard; - } - - /** Convert an attribute group metacard into the JSON representation of FieldFilter. */ - @Nullable - public FieldFilter toFieldFilter(Metacard metacard) { - - if (!AttributeGroupMetacard.isAttributeGroupMetacard(metacard)) { - LOGGER.debug("Metacard {} was not a result template metacard", metacard); - return null; - } - - String metacardOwner = retrieveOwnerIfPresent(metacard); - Map> securityAttributes = retrieveSecurityIfPresent(metacard); - - AttributeGroupMetacard wrapped = new AttributeGroupMetacard(metacard); - return new FieldFilter( - wrapped, wrapped.getGroupDescriptors(), metacardOwner, securityAttributes); - } - - /** Retrieves original creator of metacard if present to determine if system template or not */ - private static String retrieveOwnerIfPresent(Metacard inputMetacard) { - - String metacardOwner = "system"; - - if (inputMetacard.getAttribute(Core.METACARD_OWNER) != null) { - metacardOwner = inputMetacard.getAttribute(Core.METACARD_OWNER).getValue().toString(); - } - - return metacardOwner; - } - - /** - * Attaches relevant security attributes to metacard is present to be returned on the JSON - * response - */ - private static Map> retrieveSecurityIfPresent(Metacard inputMetacard) { - return ImmutableMap.of( - Security.ACCESS_INDIVIDUALS, - getValues(inputMetacard, SecurityAttributes.ACCESS_INDIVIDUALS), - Security.ACCESS_INDIVIDUALS_READ, - getValues(inputMetacard, SecurityAttributes.ACCESS_INDIVIDUALS_READ), - Security.ACCESS_GROUPS, - getValues(inputMetacard, SecurityAttributes.ACCESS_GROUPS), - Security.ACCESS_GROUPS_READ, - getValues(inputMetacard, SecurityAttributes.ACCESS_GROUPS_READ), - Security.ACCESS_ADMINISTRATORS, - getValues(inputMetacard, SecurityAttributes.ACCESS_ADMINISTRATORS)); - } - - private static List getValues(Metacard inputMetacard, String fieldName) { - if (inputMetacard.getAttribute(fieldName) != null) { - return inputMetacard.getAttribute(fieldName).getValues(); - } - return Collections.emptyList(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FilterNode.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FilterNode.java deleted file mode 100644 index d908565c1fa..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FilterNode.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.api; - -import java.util.List; -import java.util.Map; -import javax.annotation.Nullable; - -/** - * Represents a single node in a filter data structure. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public interface FilterNode { - - /** - * Determine if this filter node is terminal. Terminal filter nodes will safely return a property - * name and a target value. - * - * @return true if this node is terminal, false otherwise. - */ - boolean isLeaf(); - - /** - * Determine if this filter node is templated. Templated filter nodes must be terminal. Templated - * filter nodes will safely return a map of template properties. - * - * @return true if this node is templated, false otherwise. - */ - boolean isTemplated(); - - /** - * Get the operator assocated with this node. Every node has an operator. - * - * @return this node's operator. - */ - String getOperator(); - - /** - * If this node is a non-terminal node, fetch its list of children. - * - * @return a collection of filter nodes. - * @throws IllegalStateException if this node was a terminal node and does not have children. - * @throws IllegalArgumentException if invalid nodes were encountered while reading the children. - */ - List getChildren(); - - /** - * If this node is a templated node, fetch the properties associated with the template. - * - * @return a map of properties. - * @throws IllegalStateException if this node is not a templated node. - */ - Map getTemplateProperties(); - - /** - * If this node is a terminal node, fetch the property name associated with this node. - * - * @return a property name, or null if the value has not been set. - * @throws IllegalStateException if this node is not a terminal node. - */ - @Nullable - String getProperty(); - - /** - * If this node is a terminal node, fetch the target value associated with this node. - * - * @return the value associated with the property of this node, or null if the value has not been - * set. - * @throws IllegalStateException if this node is not a terminal node. - */ - @Nullable - String getValue(); - - /** - * If this node is a terminal node, fetch the distance value associated with this node. - * - * @return the distance, or null if the distance has not been set. - * @throws IllegalStateException if this node is not a terminal node. - */ - @Nullable - Double getDistance(); - - void setDistance(Double distance); - - /** - * Set this node's property name. - * - * @param property the property name to use. - * @throws NullPointerException if the given property name is null. - */ - void setProperty(String property); - - /** - * Set this node's target value. - * - * @param value the target value to use. - * @throws NullPointerException if the given target value is null. - */ - void setValue(String value); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FilterVisitor2.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FilterVisitor2.java deleted file mode 100644 index 649285d5305..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FilterVisitor2.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.api; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import net.opengis.filter.v_2_0.PropertyIsBetweenType; - -/** - * An experimental interface to support Filter XML 2.0 and all related capabilities. Able to visit - * implementations of {@link VisitableElement}. - * - *

Currently support is not provided for the following: - * - *

    - *
  • Functions as root elements in a filter structure - *
  • ID definitions - *
  • Extension ops - *
- * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public interface FilterVisitor2 { - - // Note: Scope is wider than EXPRESSION - could be any type within schema - void visitFilter(VisitableElement> visitable); - - // Value References bind to String instead of their own specific type - void visitString(VisitableElement visitable); - - void visitLiteralType(VisitableElement> visitable); - - void visitDistanceType(VisitableElement visitable); - - // Traversal for the time being will assume NO embedded functions / currying support - void visitFunctionType(VisitableElement> visitable); - - void visitBinaryLogicType(VisitableElement>> visitable); - - // Note: Scope is wider than EXPRESSION - could be any type within schema - void visitUnaryLogicType(VisitableElement> visitable); - - void visitBinaryTemporalType(VisitableElement> visitable); - - void visitBinarySpatialType(VisitableElement> visitable); - - void visitDistanceBufferType(VisitableElement> visitable); - - void visitBoundingBoxType(VisitableElement> visitable); - - void visitBinaryComparisonType(VisitableElement>> visitable); - - void visitPropertyIsLikeType(VisitableElement>> visitable); - - void visitPropertyIsNullType(VisitableElement> visitable); - - void visitPropertyIsNilType(VisitableElement> visitable); - - /** - * Visit a {@link PropertyIsBetweenType}. Note that this type will be strange; it's an expression - * with boundary components strongly typed, each yielding a single {@link - * javax.xml.bind.JAXBElement}. - * - *

For now the expected value will be that of a traditional expression ({@code - * List>} but is subject to change in the future. - * - *

Note: This construct is not yet fully supported and always throws {@link - * UnsupportedOperationException}. - * - * @param visitable the data node to visit. - * @throws UnsupportedOperationException this type of data is currently not supported. - * @see net.opengis.filter.v_2_0.UpperBoundaryType - * @see net.opengis.filter.v_2_0.LowerBoundaryType - * @see PropertyIsBetweenType#getExpression() - * @see PropertyIsBetweenType#getLowerBoundary() - * @see PropertyIsBetweenType#getUpperBoundary() - */ - void visitPropertyIsBetweenType(VisitableElement>> visitable); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FlatFilterBuilder.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FlatFilterBuilder.java deleted file mode 100644 index 46d9940bb04..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/FlatFilterBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.api; - -import java.util.Map; - -/** - * The traditional {@link ddf.catalog.filter.FilterBuilder} interface allows the construction of - * Filter 1.1 compliant data through a fluent-API, consisting of multiple interfaces, which provide - * compile-time validation of the built data. - * - *

For using the builder in a visitor pattern, this approach can be cumbersome, and requires the - * caching of various APIs since the data isn't known until it is visited. The {@link - * FlatFilterBuilder} API allows any element to be built from the top level interface at the cost of - * compile-time safety. Incorrect use of a {@link FlatFilterBuilder} is reported at runtime using - * {@link IllegalStateException}s. - * - *

{@link FlatFilterBuilder}s are only used once, then discarded. Once {@link #getResult()} is - * invoked, no more builder methods can be invoked. {@link #getResult()} can be called multiple - * times without issue, but no further mutation of the data structure is permitted. - * - *

New implementations of {@link FlatFilterBuilder} should register themselves as part of the - * parameterized {@code FlatFilterBuilderTest} to ensure the implementation conforms. - * - * @param the object type to return upon which the filter is built. - */ -public interface FlatFilterBuilder { - - T getResult(); - - FlatFilterBuilder beginBinaryLogicType(String operator); - - FlatFilterBuilder endBinaryLogicType(); - - FlatFilterBuilder beginBinaryComparisonType(String operator); - - FlatFilterBuilder beginPropertyIsLikeType(String operator, boolean matchCase); - - FlatFilterBuilder beginBinaryTemporalType(String operator); - - FlatFilterBuilder beginBinarySpatialType(String operator); - - FlatFilterBuilder endTerminalType(); - - FlatFilterBuilder setProperty(String property); - - FlatFilterBuilder setValue(String value); - - FlatFilterBuilder setDistance(Double distance); - - FlatFilterBuilder setTemplatedValues(Map templateProps); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/VisitableElement.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/VisitableElement.java deleted file mode 100644 index 94b804a1d0a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/api/VisitableElement.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.api; - -/** - * Can be visited by a {@link org.codice.ddf.catalog.ui.forms.api.FilterVisitor2}. Currently - * visitability is coupled to JAXB as a result of the Filter 2.0 binding implementation used. - * - *

This code is experimental. While this interface is functional and tested, it may change or - * be removed in a future version of the library. - */ -public interface VisitableElement { - - String getName(); - - T getValue(); - - void accept(FilterVisitor2 visitor); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/AttributeValueNormalizer.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/AttributeValueNormalizer.java deleted file mode 100644 index b52210f5702..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/AttributeValueNormalizer.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.builder; - -import static ddf.catalog.data.AttributeType.AttributeFormat.DATE; - -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeRegistry; -import java.time.DateTimeException; -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.format.DateTimeParseException; -import java.util.Objects; -import java.util.Optional; -import java.util.regex.Pattern; -import javax.annotation.Nullable; -import org.codice.ddf.catalog.ui.forms.filter.FilterProcessingException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Normalization for values on Filter JSON. - * - *

Input {@link #normalizeForXml(String, String)} should allow exceptions to propagate. Output - * {@link #normalizeForJson(String, String)} should be more forgiving so the feature is hardened - * against failure, since the output function reads directly from the database. - * - *

Property validation is done only on data entering the system, not exiting. - */ -class AttributeValueNormalizer { - private static final Logger LOGGER = LoggerFactory.getLogger(AttributeValueNormalizer.class); - - // Relaxed validation based upon the taxonomy guidelines; not a perfect representation - // Primary purpose is to protect persistence layer from bad symbols leaking into valid prop names - // https://codice.atlassian.net/wiki/spaces/CODICE/pages/77627393/Taxonomy+Guidelines - private static final Pattern EXPECTED_ATTRIBUTE_NAME_PATTERN = - Pattern.compile("(ext\\.)?(\\p{Alpha}+\\.)?\\p{Alpha}+(-\\p{Alpha}+)*"); - - private static final Pattern EXPECTED_RELATIVE_FUNCTION_PATTERN = - Pattern.compile("RELATIVE\\(\\p{Alnum}+\\)"); - - private final AttributeRegistry registry; - - AttributeValueNormalizer(AttributeRegistry registry) { - this.registry = registry; - } - - /** - * Normalize filter data values when leaving the catalog. Do not throw exceptions - * here so that the feature continues functioning regardless of bad data that might have found its - * way into the catalog. - * - * @param property the name of the attribute for this value. - * @param value the value of the attribute to normalize. - * @return the normalized attribute value, or the original if normalization was not possible. - */ - public String normalizeForJson(String property, String value) { - if (eitherStringIsNull(property, value)) { - return value; - } - if (isNotNormalizableDateValue(property, value)) { - return value; - } - Instant instant = instantFromEpoch(value); - if (instant != null) { - return instant.toString(); - } - - String isoDateRange = getIsoDateRangeFromEpoch(value); - if (isoDateRange != null) { - return isoDateRange; - } - - return value; - } - - @Nullable - private String getIsoDateRangeFromEpoch(String value) { - if (value.indexOf('/') >= 0) { - String dates[] = value.split("/", 2); - Instant instantFrom = instantFromEpoch(dates[0]); - Instant instantTo = instantFromEpoch(dates[1]); - - final String fromDate = (instantFrom != null) ? instantFrom.toString() : ""; - final String toDate = (instantTo != null) ? instantTo.toString() : ""; - - return fromDate + '/' + toDate; - } - - return null; - } - - /** - * Normalize filter data values when entering the catalog. Exceptions should be - * thrown if the provided data is not valid since at worst a create or update request will - * fail. This also draws attention to UI changes that would otherwise pollute the persistence - * layer. - * - * @param property the name of the attribute for this value. - * @param value the value of the attribute to normalize. - * @return the normalized attribute value, or the original if normalization was not possible. - * @throws FilterProcessingException if the provided data is not valid. - */ - public String normalizeForXml(String property, String value) { - if (eitherStringIsNull(property, value)) { - return value; - } - if (!EXPECTED_ATTRIBUTE_NAME_PATTERN.matcher(property).matches()) { - throw new FilterProcessingException("Malformed attribute name on search form: " + property); - } - if (isNotNormalizableDateValue(property, value)) { - return value; - } - Instant epoch = instantFromEpoch(value); - if (epoch != null) { - return value; - } - Instant iso = instantFromIso(value); - if (iso != null) { - return Objects.toString(iso.toEpochMilli()); - } - - if (value.equals("")) { - return ""; - } - - // Edge case for relative date function - if (EXPECTED_RELATIVE_FUNCTION_PATTERN.matcher(value).matches()) { - return value; - } - - // Edge case for a during date range (ISO/ISO) - String normalDateRange = normalizableDateRangeForXML(value); - if (normalDateRange != null) { - return normalDateRange; - } - - throw new FilterProcessingException("Unexpected date format on search form: " + value); - } - - @Nullable - private String normalizableDateRangeForXML(String dateRange) { - if (dateRange.indexOf('/') >= 0) { - String[] dates = dateRange.split("/", 2); - Instant dateFromInstant = instantFromIso(dates[0]); - Instant dateToInstant = instantFromIso(dates[1]); - - final String dateFrom = - (dateFromInstant != null) ? Objects.toString(dateFromInstant.toEpochMilli()) : ""; - final String dateTo = - (dateToInstant != null) ? Objects.toString(dateToInstant.toEpochMilli()) : ""; - - return dateFrom + '/' + dateTo; - } - return null; - } - - private boolean eitherStringIsNull(String property, String value) { - if (property == null || value == null) { - LOGGER.trace("Property [{}] or value [{}] was null, ignoring normalization", property, value); - return true; - } - return false; - } - - private boolean isNotNormalizableDateValue(String property, String value) { - Optional optional = registry.lookup(property); - if (!optional.isPresent()) { - LOGGER.trace("No descriptor available for property [{}]", property); - return true; - } - AttributeDescriptor descriptor = optional.get(); - if (descriptor.getType().getAttributeFormat() != DATE) { - LOGGER.trace( - "Descriptor for property [{}] and value [{}] did not have an AttributeFormat of DATE", - property, - value); - return true; - } - LOGGER.trace("Found date value [{}] for property [{}]", value, property); - return false; - } - - @Nullable - private static Instant instantFromEpoch(String epochString) { - try { - long epoch = Long.parseLong(epochString); - return Instant.ofEpochMilli(epoch); - } catch (DateTimeException | NumberFormatException e) { - LOGGER.debug("Error parsing epoch string [{}]", epochString, e); - return null; - } - } - - @Nullable - private static Instant instantFromIso(String isoString) { - try { - return Instant.parse(isoString); - } catch (DateTimeParseException e) { - LOGGER.debug("Error parsing ISO string [{}]", isoString, e); - } - try { - return OffsetDateTime.parse(isoString).toInstant(); - } catch (DateTimeParseException e) { - LOGGER.debug("Error parsing ISO string [{}]", isoString, e); - } - return null; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/JsonModelBuilder.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/JsonModelBuilder.java deleted file mode 100644 index a9213aa8db8..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/JsonModelBuilder.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.builder; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.AttributeRegistry; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Deque; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; -import org.codice.ddf.catalog.ui.forms.api.FlatFilterBuilder; -import org.codice.ddf.catalog.ui.forms.model.FilterNodeImpl; - -/** - * Single-use object for constructing a {@link FilterNode} that is serializable to JSON, typically - * for use on the frontend. Also supports building filter nodes with additional metadata in them, - * such as {@link FilterNodeImpl}s in a templated state. - * - *

As mentioned before, this object is single-use and only supports building a single model. It - * cannot be modified by builder methods once the result has been retrieved by calling {@link - * #getResult()}, but multiple calls to {@link #getResult()} are allowed to access the same - * reference to the resultant root node. - * - *

All filter nodes are constructed by opening (begin) them and closing (end) them, with data or - * subsequent nodes specified in the middle as appropriate per a Filter's structure. Proper use of - * this builder implies that all open nodes must be closed at some point before {@link #getResult()} - * is called. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class JsonModelBuilder implements FlatFilterBuilder { - private static final Map BINARY_COMPARE_MAPPING = - ImmutableMap.builder() - .put("PropertyIsEqualTo", "=") - .put("PropertyIsNotEqualTo", "!=") - .put("PropertyIsLessThan", "<") - .put("PropertyIsLessThanOrEqualTo", "<=") - .put("PropertyIsGreaterThan", ">") - .put("PropertyIsGreaterThanOrEqualTo", ">=") - .build(); - - private static final String PROPERTY_IS_LIKE = "PropertyIsLike"; - - private static final String ILIKE = "ILIKE"; - - private static final String LIKE = "LIKE"; - - private static final Map BINARY_TEMPORAL_MAPPING = - ImmutableMap.builder() - .put("Before", "BEFORE") - .put("After", "AFTER") - .put("During", "DURING") - .build(); - - private static final Set BINARY_SPATIAL_OPS = ImmutableSet.of("INTERSECTS", "DWITHIN"); - - private static final Set LOGIC_COMPARE_OPS = ImmutableSet.of("AND", "OR"); - - private final Deque> depth; - - private final AttributeValueNormalizer normalizer; - - private FilterNode rootNode = null; - - private FilterNode nodeInProgress = null; - - private boolean complete = false; - - public JsonModelBuilder(AttributeRegistry registry) { - this.depth = new ArrayDeque<>(); - this.normalizer = new AttributeValueNormalizer(registry); - } - - /** - * Retrieve the root of the filter tree that this builder was creating, and prevent subsequent - * builder operations upon this object. Can reliably be called multiple times to retrieve the same - * result. The result will not be null. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - * - * @return the root of the filter tree that this builder was creating. - * @throws IllegalStateException if begun/open nodes are not properly ended/closed or if no data - * exists to return. - */ - @Override - public FilterNode getResult() { - if (!complete) { - verifyTerminalNodeNotInProgress(); - verifyLogicalNodeNotInProgress(); - verifyResultNotNull(); - complete = true; - } - return rootNode; - } - - /** - * Begin describing a binary logic operation. Supports nested structures. - * - * @param operator either "AND" or "OR" to denote the logical operation to perform (case - * sensitive). - * @return {@code this} model builder to continue the fluent API. - * @throws IllegalStateException if this builder can no longer be modified, or if a leaf node has - * begun but was never ended. - */ - @Override - public JsonModelBuilder beginBinaryLogicType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - operator = operator.toUpperCase(); - if (!LOGIC_COMPARE_OPS.contains(operator)) { - throw new IllegalArgumentException("Invalid operator for logic comparison type: " + operator); - } - List nodes = new ArrayList<>(); - if (rootNode == null) { - rootNode = new FilterNodeImpl(operator, nodes); - } else { - depth.peek().add(new FilterNodeImpl(operator, nodes)); - } - depth.push(nodes); - return this; - } - - @Override - public JsonModelBuilder endBinaryLogicType() { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - verifyLogicalNodeInProgress(); - verifyLogicalNodeHasChildren(); - depth.pop(); - return this; - } - - // Note: Currently taking in the XML local part as the "operator" - @Override - public JsonModelBuilder beginBinaryComparisonType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - String jsonOperator = BINARY_COMPARE_MAPPING.get(operator); - if (jsonOperator == null) { - throw new IllegalArgumentException( - "Cannot find mapping for binary comparison operator: " + operator); - } - nodeInProgress = new FilterNodeImpl(jsonOperator); - return this; - } - - @Override - public FlatFilterBuilder beginPropertyIsLikeType(String operator, boolean matchCase) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - if (!PROPERTY_IS_LIKE.equals(operator)) { - throw new IllegalArgumentException("Cannot find mapping for like operator: " + operator); - } - // For now, will always choose ILIKE - String jsonOperator = (matchCase) ? LIKE : ILIKE; - nodeInProgress = new FilterNodeImpl(jsonOperator); - return this; - } - - @Override - public FlatFilterBuilder beginBinaryTemporalType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - String jsonOperator = BINARY_TEMPORAL_MAPPING.get(operator); - if (jsonOperator == null) { - throw new IllegalArgumentException( - "Cannot find mapping for binary temporal operator: " + operator); - } - nodeInProgress = new FilterNodeImpl(jsonOperator); - return this; - } - - @Override - public JsonModelBuilder beginBinarySpatialType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - if (!BINARY_SPATIAL_OPS.contains(operator)) { - throw new IllegalArgumentException("Invalid operator for binary spatial type: " + operator); - } - nodeInProgress = new FilterNodeImpl(operator); - return this; - } - - @Override - public JsonModelBuilder endTerminalType() { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - if (depth.isEmpty()) { - rootNode = nodeInProgress; - } else { - depth.peek().add(nodeInProgress); - } - nodeInProgress = null; - return this; - } - - @Override - public JsonModelBuilder setProperty(String property) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - nodeInProgress.setProperty(property); - return this; - } - - @Override - public JsonModelBuilder setValue(String value) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - String normalizedValue = normalizer.normalizeForJson(nodeInProgress.getProperty(), value); - nodeInProgress.setValue(normalizedValue); - return this; - } - - @Override - public JsonModelBuilder setDistance(Double distance) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - nodeInProgress.setDistance(distance); - return this; - } - - @Override - public JsonModelBuilder setTemplatedValues(Map templateProps) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - nodeInProgress = new FilterNodeImpl(nodeInProgress, templateProps); - return this; - } - - private void verifyResultNotYetRetrieved() { - if (complete) { - throw new IllegalStateException( - "This builder's result has been retrieved and no further modification is permitted"); - } - } - - private void verifyTerminalNodeInProgress() { - if (nodeInProgress == null) { - throw new IllegalStateException("Cannot complete operation, no leaf node in progress"); - } - } - - // Verify coverage: https://codice.atlassian.net/browse/DDF-3832 - private void verifyLogicalNodeInProgress() { - if (depth.isEmpty()) { - throw new IllegalStateException("Cannot end the logic node, no node in progress"); - } - } - - // Verify coverage: https://codice.atlassian.net/browse/DDF-3832 - private void verifyLogicalNodeNotInProgress() { - if (!depth.isEmpty()) { - throw new IllegalStateException("Logic node in progress, results not ready for return"); - } - } - - // Verify coverage: https://codice.atlassian.net/browse/DDF-3832 - private void verifyLogicalNodeHasChildren() { - if (!depth.isEmpty() && depth.peek().isEmpty()) { - throw new IllegalStateException("Cannot end the logic node, no children provided"); - } - } - - private void verifyResultNotNull() { - if (rootNode == null) { - throw new IllegalStateException( - "Cannot end the node or return a result, no data was specified"); - } - } - - private void verifyTerminalNodeNotInProgress() { - if (nodeInProgress != null) { - throw new IllegalStateException("Cannot complete operation, a leaf node is in progress"); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/XmlModelBuilder.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/XmlModelBuilder.java deleted file mode 100644 index 375427f1f11..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/builder/XmlModelBuilder.java +++ /dev/null @@ -1,514 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.builder; - -import static org.apache.commons.lang3.Validate.notNull; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.AttributeRegistry; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Deque; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.function.Supplier; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAttribute; -import net.opengis.filter.v_2_0.BinaryComparisonOpType; -import net.opengis.filter.v_2_0.BinaryLogicOpType; -import net.opengis.filter.v_2_0.BinarySpatialOpType; -import net.opengis.filter.v_2_0.BinaryTemporalOpType; -import net.opengis.filter.v_2_0.ComparisonOpsType; -import net.opengis.filter.v_2_0.DistanceBufferType; -import net.opengis.filter.v_2_0.FilterType; -import net.opengis.filter.v_2_0.FunctionType; -import net.opengis.filter.v_2_0.LiteralType; -import net.opengis.filter.v_2_0.LogicOpsType; -import net.opengis.filter.v_2_0.MeasureType; -import net.opengis.filter.v_2_0.ObjectFactory; -import net.opengis.filter.v_2_0.PropertyIsLikeType; -import net.opengis.filter.v_2_0.SpatialOpsType; -import net.opengis.filter.v_2_0.TemporalOpsType; -import org.codice.ddf.catalog.ui.forms.api.FlatFilterBuilder; -import org.codice.ddf.catalog.ui.forms.filter.FilterProcessingException; - -public class XmlModelBuilder implements FlatFilterBuilder { - private static final ObjectFactory FACTORY = new ObjectFactory(); - - // Possibly use a ValueAdapter to circumvent difference in return type; i.e. Literal vs Object - private static final Map TERMINAL_OPS = - ImmutableMap.builder() - .put("=", Mapper::equalTo) - .put("!=", Mapper::notEqualTo) - .put(">", Mapper::greaterThan) - .put(">=", Mapper::greaterThanOrEqualTo) - .put("<", Mapper::lessThan) - .put("<=", Mapper::lessThanOrEqualTo) - .put("ILIKE", Mapper::like) - .put("LIKE", Mapper::likeMatchCase) // For now, will never be selected - .put("INTERSECTS", Mapper::intersects) - .put("DWITHIN", Mapper::dwithin) - .put("BEFORE", Mapper::before) - .put("AFTER", Mapper::after) - .put("DURING", Mapper::during) - .build(); - - private static final Map LOGICAL_OPS = - ImmutableMap.builder() - .put("AND", Mapper::and) - .put("OR", Mapper::or) - .build(); - - /** - * Creating {@link BinaryLogicOpType}s requires the entire list of child nodes, which won't be - * known until {@link #endBinaryLogicType()}. Cache the operations here until that time. - */ - private final Deque logicOpCache; - - /** - * Cache the lists of child elements here for arbitrary levels of filter depth due to {@link - * BinaryLogicOpType}s. - */ - private final Deque>> depth; - - private final AttributeValueNormalizer normalizer; - - private JAXBElement rootNode; - - private TerminalNodeSupplier supplierInProgress; - - private boolean complete = false; - - public XmlModelBuilder(AttributeRegistry registry) { - this.logicOpCache = new ArrayDeque<>(); - this.depth = new ArrayDeque<>(); - this.normalizer = new AttributeValueNormalizer(registry); - } - - @Override - public JAXBElement getResult() { - if (!complete) { - verifyTerminalNodeNotInProgress(); - verifyLogicalNodeNotInProgress(); - verifyResultNotNull(); - complete = true; - } - return Mapper.filter(rootNode); - } - - @Override - public XmlModelBuilder beginBinaryLogicType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - MultiNodeReducer logicMapping = LOGICAL_OPS.get(operator); - if (logicMapping == null) { - throw new IllegalArgumentException("Invalid operator for logic comparison type: " + operator); - } - logicOpCache.push(logicMapping); - depth.push(new ArrayList<>()); - return this; - } - - @Override - public XmlModelBuilder endBinaryLogicType() { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - verifyLogicalNodeInProgress(); - verifyLogicalNodeHasChildren(); - JAXBElement result = logicOpCache.pop().apply(depth.pop()); - if (!depth.isEmpty()) { - depth.peek().add(result); - } else { - rootNode = result; - } - return this; - } - - // Note: Currently taking in JSON type symbol as the "operator" - @Override - public XmlModelBuilder beginBinaryComparisonType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - MultiNodeReducer comparisonMapping = TERMINAL_OPS.get(operator); - if (comparisonMapping == null) { - throw new IllegalArgumentException( - "Cannot find mapping for binary comparison operator: " + operator); - } - supplierInProgress = new TerminalNodeSupplier(comparisonMapping); - return this; - } - - @Override - public FlatFilterBuilder beginPropertyIsLikeType(String operator, boolean matchCase) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - MultiNodeReducer comparisonMapping = TERMINAL_OPS.get(operator); - if (comparisonMapping == null) { - throw new IllegalArgumentException("Cannot find mapping for like operator: " + operator); - } - supplierInProgress = new TerminalNodeSupplier(comparisonMapping); - return this; - } - - @Override - public FlatFilterBuilder beginBinaryTemporalType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - MultiNodeReducer temporalMapping = TERMINAL_OPS.get(operator); - if (temporalMapping == null) { - throw new IllegalArgumentException( - "Cannot find mapping for binary temporal operator: " + operator); - } - supplierInProgress = new TerminalNodeSupplier(temporalMapping); - return null; - } - - @Override - public XmlModelBuilder beginBinarySpatialType(String operator) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeNotInProgress(); - MultiNodeReducer spatialMapping = TERMINAL_OPS.get(operator); - if (spatialMapping == null) { - throw new IllegalArgumentException( - "Cannot find mapping for binary spatial operator: " + operator); - } - supplierInProgress = new TerminalNodeSupplier(spatialMapping); - return this; - } - - @Override - public XmlModelBuilder endTerminalType() { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - if (depth.isEmpty()) { - rootNode = supplierInProgress.get(); - } else { - depth.peek().add(supplierInProgress.get()); - } - supplierInProgress = null; - return this; - } - - @Override - public XmlModelBuilder setProperty(String property) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - supplierInProgress.setProperty(FACTORY.createValueReference(property)); - return this; - } - - @Override - public XmlModelBuilder setValue(String value) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - String normalizedValue = - normalizer.normalizeForXml(supplierInProgress.propertyNode.getValue(), value); - supplierInProgress.setValue( - FACTORY.createLiteral( - new LiteralType().withContent(Collections.singletonList(normalizedValue)))); - return this; - } - - public XmlModelBuilder setDistance(Double distance) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - supplierInProgress = new DistanceBufferSupplier(supplierInProgress, distance); - return this; - } - - @Override - public XmlModelBuilder setTemplatedValues(Map templateProps) { - verifyResultNotYetRetrieved(); - verifyTerminalNodeInProgress(); - - String defaultValue = (String) templateProps.get("defaultValue"); - String nodeId = (String) templateProps.get("nodeId"); - boolean isVisible = (boolean) templateProps.get("isVisible"); - boolean isReadOnly = (boolean) templateProps.get("isReadOnly"); - - supplierInProgress.setValue( - FACTORY.createFunction( - new FunctionType() - .withName("template.value.v1") - .withExpression( - FACTORY.createLiteral( - new LiteralType().withContent(Collections.singleton(defaultValue))), - FACTORY.createLiteral( - new LiteralType().withContent(Collections.singleton(nodeId))), - FACTORY.createLiteral( - new LiteralType() - .withContent(Collections.singleton(Boolean.toString(isVisible)))), - FACTORY.createLiteral( - new LiteralType() - .withContent(Collections.singleton(Boolean.toString(isReadOnly))))))); - return this; - } - - private void verifyResultNotYetRetrieved() { - if (complete) { - throw new IllegalStateException( - "This builder's result has been retrieved and no further modification is permitted"); - } - } - - private void verifyTerminalNodeInProgress() { - if (supplierInProgress == null) { - throw new IllegalStateException("Cannot complete operation, no leaf node in progress"); - } - } - - // Verify coverage: https://codice.atlassian.net/browse/DDF-3832 - private void verifyLogicalNodeInProgress() { - if (depth.isEmpty()) { - throw new IllegalStateException("Cannot end the logic node, no node in progress"); - } - } - - // Verify coverage: https://codice.atlassian.net/browse/DDF-3832 - private void verifyLogicalNodeNotInProgress() { - if (!depth.isEmpty()) { - throw new IllegalStateException("Logic node in progress, results not ready for return"); - } - } - - // Verify coverage: https://codice.atlassian.net/browse/DDF-3832 - private void verifyLogicalNodeHasChildren() { - if (!depth.isEmpty() && depth.peek().isEmpty()) { - throw new IllegalStateException("Cannot end the logic node, no children provided"); - } - } - - private void verifyResultNotNull() { - if (rootNode == null) { - throw new IllegalStateException( - "Cannot end the node or return a result, no data was specified"); - } - } - - private void verifyTerminalNodeNotInProgress() { - if (supplierInProgress != null) { - throw new IllegalStateException("Cannot complete operation, a leaf node is in progress"); - } - } - - /** - * Helper interface for cleanly representing operations that condense a list of XML elements to a - * single element. Use cases include the creation of logical op types in a filter structure, or - * the population of values for a terminal type. - */ - @FunctionalInterface - private interface MultiNodeReducer extends Function>, JAXBElement> {} - - private static class TerminalNodeSupplier implements Supplier> { - private final MultiNodeReducer reducer; - private JAXBElement propertyNode = null; - private JAXBElement valueNode; - - private TerminalNodeSupplier(final MultiNodeReducer reducer) { - notNull(reducer); - this.reducer = reducer; - } - - public void setProperty(JAXBElement propertyNode) { - notNull(propertyNode); - this.propertyNode = propertyNode; - } - - public void setValue(JAXBElement valueNode) { - notNull(valueNode); - this.valueNode = valueNode; - } - - @Override - public JAXBElement get() { - notNull(propertyNode); - notNull(valueNode); - List> terminals = new ArrayList<>(); - terminals.add(propertyNode); - terminals.add(valueNode); - return reducer.apply(terminals); - } - } - - private static class DistanceBufferSupplier extends TerminalNodeSupplier { - private static final String UOM_METERS = "m"; - private Double distance = null; - - DistanceBufferSupplier(final TerminalNodeSupplier original, Double distance) { - super(original.reducer); - if (original.propertyNode != null) { - this.setProperty(original.propertyNode); - } - if (original.valueNode != null) { - this.setValue(original.valueNode); - } - this.distance = distance; - } - - @Override - public JAXBElement get() { - JAXBElement reduced = super.get(); - notNull(distance, "The Distance element cannot be created without a distance value"); - if (!DistanceBufferType.class.equals(reduced.getDeclaredType()) - || !(reduced.getValue() instanceof DistanceBufferType)) { - throw new FilterProcessingException( - "Incorrect use of DistanceBufferSupplier for given type " + reduced.toString()); - } - DistanceBufferType value = (DistanceBufferType) reduced.getValue(); - value.setDistance(new MeasureType().withUom(UOM_METERS).withValue(distance)); - return reduced; - } - } - - private static class Mapper { - - @SuppressWarnings("unchecked") - private static JAXBElement filter(JAXBElement root) { - if (LogicOpsType.class.isAssignableFrom(root.getDeclaredType())) { - return FACTORY.createFilter( - new FilterType().withLogicOps((JAXBElement) root)); - } - if (ComparisonOpsType.class.isAssignableFrom(root.getDeclaredType())) { - return FACTORY.createFilter( - new FilterType() - .withComparisonOps((JAXBElement) root)); - } - if (SpatialOpsType.class.isAssignableFrom(root.getDeclaredType())) { - return FACTORY.createFilter( - new FilterType().withSpatialOps((JAXBElement) root)); - } - if (TemporalOpsType.class.isAssignableFrom(root.getDeclaredType())) { - return FACTORY.createFilter( - new FilterType().withTemporalOps((JAXBElement) root)); - } - - throw new UnsupportedOperationException( - "Attempting to build XML filter with unsupported element: " - + root.getDeclaredType().getName()); - } - - private static JAXBElement and(List> children) { - return FACTORY.createAnd(binaryLogicType(children)); - } - - private static JAXBElement or(List> children) { - return FACTORY.createOr(binaryLogicType(children)); - } - - private static JAXBElement equalTo(List> children) { - return FACTORY.createPropertyIsEqualTo(binaryComparisonType(children)); - } - - private static JAXBElement notEqualTo(List> children) { - return FACTORY.createPropertyIsNotEqualTo(binaryComparisonType(children)); - } - - private static JAXBElement greaterThan(List> children) { - return FACTORY.createPropertyIsGreaterThan(binaryComparisonType(children)); - } - - private static JAXBElement greaterThanOrEqualTo( - List> children) { - return FACTORY.createPropertyIsGreaterThanOrEqualTo(binaryComparisonType(children)); - } - - private static JAXBElement lessThan(List> children) { - return FACTORY.createPropertyIsLessThan(binaryComparisonType(children)); - } - - private static JAXBElement lessThanOrEqualTo( - List> children) { - return FACTORY.createPropertyIsLessThanOrEqualTo(binaryComparisonType(children)); - } - - private static JAXBElement like(List> children) { - return FACTORY.createPropertyIsLike(likeType(children, false)); - } - - private static JAXBElement likeMatchCase(List> children) { - return FACTORY.createPropertyIsLike(likeType(children, true)); - } - - private static JAXBElement before(List> children) { - return FACTORY.createBefore(binaryTemporalType(children)); - } - - private static JAXBElement after(List> children) { - return FACTORY.createAfter(binaryTemporalType(children)); - } - - private static JAXBElement during(List> children) { - return FACTORY.createDuring(binaryTemporalType(children)); - } - - private static JAXBElement intersects(List> children) { - return FACTORY.createIntersects(binarySpatialType(children)); - } - - private static JAXBElement dwithin(List> children) { - return FACTORY.createDWithin( - new DistanceBufferType().withExpressionOrAny(new ArrayList<>(children))); - } - - private static BinaryLogicOpType binaryLogicType(List> ops) { - return new BinaryLogicOpType().withOps(ops); - } - - private static BinaryComparisonOpType binaryComparisonType(List> children) { - return new BinaryComparisonOpType().withExpression(children); - } - - private static PropertyIsLikeType likeType(List> children, boolean matchCase) { - return new PropertyIsLikeTypeWithMatchCase() - .withMatchCase(matchCase) - .withEscapeChar("\\") - .withWildCard("%") - .withSingleChar("_") - .withExpression(children); - } - - private static BinaryTemporalOpType binaryTemporalType(List> children) { - return new BinaryTemporalOpType().withExpressionOrAny(new ArrayList<>(children)); - } - - private static BinarySpatialOpType binarySpatialType(List> children) { - return new BinarySpatialOpType().withExpressionOrAny(new ArrayList<>(children)); - } - } - - @SuppressWarnings("squid:S2160" /* Not being used in comparisons */) - private static class PropertyIsLikeTypeWithMatchCase extends PropertyIsLikeType { - @XmlAttribute(name = "matchCase") - protected Boolean matchCase; - - public boolean isMatchCase() { - if (matchCase == null) { - return true; - } else { - return matchCase; - } - } - - public void setMatchCase(boolean value) { - this.matchCase = value; - } - - PropertyIsLikeTypeWithMatchCase withMatchCase(boolean value) { - setMatchCase(value); - return this; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsLoaderCommand.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsLoaderCommand.java deleted file mode 100644 index 9f3993886b1..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsLoaderCommand.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.commands; - -import static org.fusesource.jansi.Ansi.Color.GREEN; -import static org.fusesource.jansi.Ansi.Color.YELLOW; -import static org.fusesource.jansi.Ansi.ansi; - -import com.google.common.annotations.VisibleForTesting; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.Metacard; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.List; -import javax.xml.bind.JAXBException; -import org.apache.karaf.shell.api.action.Action; -import org.apache.karaf.shell.api.action.Command; -import org.apache.karaf.shell.api.action.Option; -import org.apache.karaf.shell.api.action.lifecycle.Service; -import org.codice.ddf.catalog.ui.forms.SearchFormsLoader; -import org.codice.ddf.catalog.ui.forms.TemplateTransformer; -import org.codice.ddf.catalog.ui.forms.filter.FilterWriter; -import org.codice.ddf.catalog.ui.query.utility.EndpointUtility; -import org.codice.ddf.commands.catalog.SubjectCommands; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; - -@Service -@Command( - scope = "forms", - name = "load", - description = "Handles the ingestion of search forms and result set forms into the system" -) -public class SearchFormsLoaderCommand extends SubjectCommands implements Action { - - private final CatalogFramework catalogFramework; - - private final AttributeRegistry registry; - - private final EndpointUtility endpointUtil; - - @Option( - name = "--formsDirectory", - aliases = {"-d"}, - description = "Overrides the default forms directory path. Default: /etc/forms" - ) - protected String formsDir = null; - - @Option( - name = "--forms", - aliases = {"-f"}, - description = "Override the default forms.json file name. Default: forms.json" - ) - protected String formsFile = null; - - @Option( - name = "--results", - aliases = {"-r"}, - description = "Override the default results.json file name. Default: results.json" - ) - protected String resultsFile = null; - - public SearchFormsLoaderCommand() { - this(get(CatalogFramework.class), get(AttributeRegistry.class), get(EndpointUtility.class)); - } - - public SearchFormsLoaderCommand( - CatalogFramework catalogFramework, AttributeRegistry registry, EndpointUtility endpointUtil) { - this.catalogFramework = catalogFramework; - this.registry = registry; - this.endpointUtil = endpointUtil; - } - - @Override - protected Object executeWithSubject() throws Exception { - - console.println(ansi().fgBrightCyan().a("Initializing Search Form Template Loader").reset()); - final SearchFormsLoader loader = generateLoader(); - - List parsedMetacards = - AccessController.doPrivileged( - (PrivilegedAction>) () -> loader.retrieveSystemTemplateMetacards()); - - if (!parsedMetacards.isEmpty()) { - printColor(GREEN, "Loader initialized, beginning ingestion of system templates."); - loader.bootstrap(parsedMetacards); - printColor(GREEN, "System templates successfully ingested."); - } else { - printColor(YELLOW, "No system forms to load, halting ingest."); - } - return null; - } - - @VisibleForTesting - protected SearchFormsLoader generateLoader() throws JAXBException { - FilterWriter writer = new FilterWriter(true); - TemplateTransformer transformer = new TemplateTransformer(writer, registry); - return new SearchFormsLoader( - catalogFramework, transformer, endpointUtil, formsDir, formsFile, resultsFile, security); - } - - private static T get(Class type) { - BundleContext context = - FrameworkUtil.getBundle(SearchFormsLoaderCommand.class).getBundleContext(); - return context.getService(context.getServiceReference(type)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsManageCommand.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsManageCommand.java deleted file mode 100644 index 419bbd4ff4f..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsManageCommand.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.commands; - -import static org.apache.commons.lang3.StringUtils.isEmpty; -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; -import static org.fusesource.jansi.Ansi.Color.YELLOW; -import static org.fusesource.jansi.Ansi.ansi; - -import com.google.common.collect.ImmutableList; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Metacard; -import ddf.catalog.operation.DeleteResponse; -import ddf.catalog.operation.ProcessingDetails; -import ddf.catalog.operation.impl.DeleteRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import org.apache.karaf.shell.api.action.Action; -import org.apache.karaf.shell.api.action.Command; -import org.apache.karaf.shell.api.action.Option; -import org.apache.karaf.shell.api.action.lifecycle.Service; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.commands.catalog.SubjectCommands; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Service -@Command( - scope = "forms", - name = "manage", - description = "Provides the capability to view and delete system templates." -) -public class SearchFormsManageCommand extends SubjectCommands implements Action { - private static final Logger LOGGER = LoggerFactory.getLogger(SearchFormsManageCommand.class); - - private final CatalogFramework catalogFramework; - - private final EndpointUtil endpointUtil; - - @Option( - name = "--list", - aliases = {"-l"}, - description = "List all the system forms" - ) - protected boolean viewAll = false; - - @Option( - name = "--remove-single", - aliases = {"-s"}, - description = "Remove a single system template by metacard ID" - ) - protected String singleDeletion = null; - - @Option( - name = "--remove-all", - aliases = {"-r"}, - description = "Removes all the system templates" - ) - protected boolean massDeletion = false; - - public SearchFormsManageCommand() { - this(get(CatalogFramework.class), get(EndpointUtil.class)); - } - - public SearchFormsManageCommand(CatalogFramework catalogFramework, EndpointUtil endpointUtil) { - this.catalogFramework = catalogFramework; - this.endpointUtil = endpointUtil; - } - - @Override - protected Object executeWithSubject() { - - if (viewAll) { - printSystemTemplates(); - return null; - } - - if (massDeletion || !isEmpty(singleDeletion)) { - executeDeletion(); - return null; - } - - return null; - } - - private void printSystemTemplates() { - for (Metacard mc : retrieveSystemMetacards()) { - console.println( - ansi() - .fgBrightYellow() - .a("Title: " + mc.getTitle()) - .newline() - .fgGreen() - .a("\t- " + mc.getId()) - .reset()); - } - } - - private void executeDeletion() { - - List allSystemTemplates = retrieveSystemMetacards(); - if (allSystemTemplates.isEmpty()) { - printColor(YELLOW, "No system forms exist."); - return; - } - - try { - List systemTemplateIds = - singleDeletion != null - ? ImmutableList.of(singleDeletion) - : retrieveMetacardIds(allSystemTemplates); - - List deletedMetacardIds = this.executeSystemTemplateRemoval(systemTemplateIds); - - if (deletedMetacardIds.isEmpty()) { - printColor(YELLOW, "No system forms were deleted"); - } else { - for (String id : deletedMetacardIds) { - console.println(ansi().fgBrightYellow().a("Deleted: ").fgGreen().a(id).reset()); - } - } - } catch (IngestException | SourceUnavailableException e) { - LOGGER.debug("Error removing system forms", e); - printErrorMessage("Error removing system forms: " + e.getMessage()); - } - } - - private List executeSystemTemplateRemoval(List metacardList) - throws IngestException, SourceUnavailableException { - - LOGGER.debug("Preparing to remove the following system form metacards: {}", metacardList); - - DeleteResponse deleteResponse = - catalogFramework.delete(new DeleteRequestImpl(metacardList.toArray(new String[0]))); - - if (deleteResponse.getProcessingErrors() != null - && !deleteResponse.getProcessingErrors().isEmpty()) { - for (ProcessingDetails details : deleteResponse.getProcessingErrors()) { - if (details.hasException()) { - throw new IngestException( - "Failed to delete list of system form metacards", details.getException()); - } - } - - throw new IngestException("Failed to delete list of system form metacards"); - } - - List deletedMetacardIds = retrieveMetacardIds(deleteResponse.getDeletedMetacards()); - - LOGGER.debug("System forms deleted successfully {}", deletedMetacardIds); - - return deletedMetacardIds; - } - - private List retrieveMetacardIds(List metacards) { - return metacards - .stream() - .map(Metacard::getId) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - } - - private List retrieveSystemMetacards() { - return endpointUtil.getMetacardListByTag(SYSTEM_TEMPLATE); - } - - private static T get(Class type) { - BundleContext context = - FrameworkUtil.getBundle(SearchFormsManageCommand.class).getBundleContext(); - return context.getService(context.getServiceReference(type)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/AttributeGroupMetacard.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/AttributeGroupMetacard.java deleted file mode 100644 index 2afd6bcb657..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/AttributeGroupMetacard.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.data; - -import static org.codice.ddf.catalog.ui.forms.data.AttributeGroupType.ATTRIBUTE_GROUP_LIST; -import static org.codice.ddf.catalog.ui.forms.data.AttributeGroupType.ATTRIBUTE_GROUP_TAG; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.types.Core; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; -import org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil; - -/** - * Metacard used for storing sharing attribute groups in the catalog. Should not be used as a - * resource. Identifiable by the presence of {@link AttributeGroupType#ATTRIBUTE_GROUP_TAG} in - * {@link Metacard#TAGS}. - * - *

Relevant attributes: - * - *

    - *
  • {@link Core#TITLE} - display name for an attribute group, in general not necessary, but for - * groups it should be present and it should be unique. - *
  • {@link Core#DESCRIPTION} - additional information about a group, should be present but not - * necessarily unique. - *
  • {@link AttributeGroupType#ATTRIBUTE_GROUP_DESCRIPTORS} - contains a list of attribute - * descriptor names that denote the fields that are part of the group. - *
- * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class AttributeGroupMetacard extends MetacardImpl { - public AttributeGroupMetacard(String title, String description) { - super(new AttributeGroupType()); - setAttribute(Core.TITLE, title); - setAttribute(Core.DESCRIPTION, description); - setTags(Collections.singleton(ATTRIBUTE_GROUP_TAG)); - } - - public AttributeGroupMetacard(String title, String description, String id) { - this(title, description); - setId(id); - } - - public AttributeGroupMetacard(Metacard metacard) { - super(metacard); - } - - /** - * Check if a given metacard is an attribute group metacard by checking the tags metacard - * attribute. - * - * @param metacard the metacard to check. - * @return true if the provided metacard is a result template metacard, false otherwise. - */ - public static boolean isAttributeGroupMetacard(Metacard metacard) { - return metacard != null && metacard.getTags().contains(ATTRIBUTE_GROUP_TAG); - } - - public Set getGroupDescriptors() { - return new HashSet<>(AccessControlUtil.getValuesOrEmpty(this, ATTRIBUTE_GROUP_LIST)); - } - - public void setGroupDescriptors(Set resultDescriptors) { - setAttribute(ATTRIBUTE_GROUP_LIST, new ArrayList<>(resultDescriptors)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/AttributeGroupType.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/AttributeGroupType.java deleted file mode 100644 index 1d05c99399b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/AttributeGroupType.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.data; - -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import ddf.catalog.data.impl.MetacardTypeImpl; -import ddf.catalog.data.impl.types.CoreAttributes; -import ddf.catalog.data.impl.types.SecurityAttributes; -import java.util.Set; - -/** - * A sharing list of attribute descriptor names. They can represent sets of interesting fields. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class AttributeGroupType extends MetacardTypeImpl { - // If the tag changes, update the 'access-controlled-tag' service property as well - public static final String ATTRIBUTE_GROUP_TAG = "attribute-group"; - - public static final String ATTRIBUTE_GROUP_LIST = "ui.attribute-group"; - - // @formatter:off - private static final Set ATTRIBUTE_GROUP_DESCRIPTORS = - ImmutableSet.of( - new AttributeDescriptorImpl( - ATTRIBUTE_GROUP_LIST, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.STRING_TYPE)); - // @formatter:on - - public AttributeGroupType() { - super( - ATTRIBUTE_GROUP_TAG, - ImmutableSet.builder() - .addAll(new CoreAttributes().getAttributeDescriptors()) - .addAll(new SecurityAttributes().getAttributeDescriptors()) - .addAll(ATTRIBUTE_GROUP_DESCRIPTORS) - .build()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/QueryTemplateMetacard.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/QueryTemplateMetacard.java deleted file mode 100644 index d8d9865bc46..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/QueryTemplateMetacard.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.data; - -import static org.codice.ddf.catalog.ui.forms.data.QueryTemplateType.QUERY_TEMPLATE_FILTER; -import static org.codice.ddf.catalog.ui.forms.data.QueryTemplateType.QUERY_TEMPLATE_TAG; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.DETAIL_LEVEL; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.FACETS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_FEDERATION; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SORTS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SOURCES; -import static org.codice.ddf.catalog.ui.util.AccessUtil.safeGet; -import static org.codice.ddf.catalog.ui.util.AccessUtil.safeGetList; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.types.Core; -import java.io.Serializable; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil; - -/** - * Metacard used for storing query templates in the catalog. Should not be used as a resource. - * Identifiable by the presence of {@link QueryTemplateType#QUERY_TEMPLATE_TAG} in {@link - * Metacard#TAGS}. - * - *

Relevant attributes: - * - *

    - *
  • {@link Core#TITLE} - display name for a query template, in general not necessary, but for - * templates it should be present and it should be unique - *
  • {@link Core#DESCRIPTION} - additional information about a template, should be present but - * not necessarily unique - *
  • {@link QueryTemplateType#QUERY_TEMPLATE_FILTER} - contains validated Filter XML 2.0 that - * represents the query structure to execute, with filter functions denoting information that - * is needed before execution can occur. - *
- * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class QueryTemplateMetacard extends MetacardImpl { - public QueryTemplateMetacard(String title, String description) { - super(new QueryTemplateType()); - setAttribute(Core.TITLE, title); - setAttribute(Core.DESCRIPTION, description); - setTags(Collections.singleton(QUERY_TEMPLATE_TAG)); - } - - public QueryTemplateMetacard(String title, String description, String id) { - this(title, description); - setId(id); - } - - public QueryTemplateMetacard(Metacard metacard) { - super(metacard); - } - - /** - * Check if a given metacard is a query template metacard by checking the tags metacard attribute. - * - * @param metacard the metacard to check. - * @return true if the provided metacard is a query template metacard, false otherwise. - */ - public static boolean isQueryTemplateMetacard(Metacard metacard) { - return metacard != null && metacard.getTags().contains(QUERY_TEMPLATE_TAG); - } - - public String getFormsFilter() { - List values = AccessControlUtil.getValuesOrEmpty(this, QUERY_TEMPLATE_FILTER); - if (!values.isEmpty()) { - return values.get(0); - } - return null; - } - - public void setFormsFilter(String filterXml) { - setAttribute(QUERY_TEMPLATE_FILTER, filterXml); - } - - public Map getQuerySettings() { - Map querySettings = new HashMap<>(); - querySettings.put(QUERY_SORTS, safeGetList(this, QUERY_SORTS, String.class)); - querySettings.put("src", safeGetList(this, QUERY_SOURCES, String.class)); - querySettings.put(FACETS, safeGetList(this, FACETS, String.class)); - querySettings.put(QUERY_FEDERATION, safeGet(this, QUERY_FEDERATION, String.class)); - querySettings.put(DETAIL_LEVEL, safeGet(this, DETAIL_LEVEL, String.class)); - return querySettings; - } - - public void setQuerySettings(Map json) { - List sorts = safeGetList(json, QUERY_SORTS, Serializable.class); - if (sorts != null) { - setAttribute(new AttributeImpl(QUERY_SORTS, sorts)); - } - List sources = safeGetList(json, "src", Serializable.class); - if (sources != null) { - setAttribute(new AttributeImpl(QUERY_SOURCES, sources)); - } - List facets = safeGetList(json, FACETS, Serializable.class); - if (facets != null) { - setAttribute(new AttributeImpl(FACETS, facets)); - } - String federation = safeGet(json, QUERY_FEDERATION, String.class); - if (federation != null) { - setAttribute(QUERY_FEDERATION, federation); - } - String detailLevel = safeGet(json, DETAIL_LEVEL, String.class); - if (detailLevel != null) { - setAttribute(DETAIL_LEVEL, detailLevel); - } else { - setAttribute(DETAIL_LEVEL, ""); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/QueryTemplateType.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/QueryTemplateType.java deleted file mode 100644 index 754857ab63b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/data/QueryTemplateType.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.data; - -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import ddf.catalog.data.impl.MetacardTypeImpl; -import ddf.catalog.data.impl.types.CoreAttributes; -import ddf.catalog.data.impl.types.SecurityAttributes; -import java.util.Set; -import org.codice.ddf.catalog.ui.forms.filter.TransformVisitor; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardTypeImpl; - -/** - * Represents a data structure for storing a query template. The {@code template.query.filter} field - * stores standards compliant Filter XML 2.0 with substitution metadata expressed as a {@code - * fes:Function} element. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - * - * @see schemas.opengis.net/filter/2.0/ - * @see org.codice.ddf.catalog.ui.forms.model.pojo.FormTemplate - * @see org.codice.ddf.catalog.ui.forms.model.pojo.FilterNode - * @see TransformVisitor - */ -public class QueryTemplateType extends MetacardTypeImpl { - // If the tag changes, update the 'access-controlled-tag' service property as well - public static final String QUERY_TEMPLATE_TAG = "query-template"; - - public static final String QUERY_TEMPLATE_FILTER = "ui.template-filter"; - - // @formatter:off - private static final Set QUERY_TEMPLATE_ATTRIBUTES = - ImmutableSet.of( - new AttributeDescriptorImpl( - QUERY_TEMPLATE_FILTER, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.XML_TYPE)); - // @formatter:on - - public QueryTemplateType() { - super( - QUERY_TEMPLATE_TAG, - ImmutableSet.builder() - .addAll(new CoreAttributes().getAttributeDescriptors()) - .addAll(new SecurityAttributes().getAttributeDescriptors()) - .addAll(new QueryMetacardTypeImpl().getAttributeDescriptors()) - .addAll(QUERY_TEMPLATE_ATTRIBUTES) - .build()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/AbstractFilterVisitor2.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/AbstractFilterVisitor2.java deleted file mode 100644 index a2317da4e08..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/AbstractFilterVisitor2.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import org.codice.ddf.catalog.ui.forms.api.FilterVisitor2; -import org.codice.ddf.catalog.ui.forms.api.VisitableElement; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Provides common filter traversal logic which can be selectively extended for only the types that - * an implementation is interested in visiting. - * - *

Currently support is not provided for the following: - * - *

    - *
  • Functions as root elements in a filter structure - *
  • ID definitions - *
  • Extension ops - *
- * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public abstract class AbstractFilterVisitor2 implements FilterVisitor2 { - private static final Logger LOGGER = LoggerFactory.getLogger(AbstractFilterVisitor2.class); - - @Override - public void visitFilter(VisitableElement> visitable) { - traceName(visitable); - visitable.getValue().accept(this); - } - - @Override - public void visitString(VisitableElement visitable) { - traceName(visitable); - traceValue(visitable.getValue()); - } - - @Override - public void visitLiteralType(VisitableElement> visitable) { - if (LOGGER.isTraceEnabled()) { - visitable.getValue().forEach(AbstractFilterVisitor2::traceValue); - } - } - - @Override - public void visitDistanceType(VisitableElement visitable) { - traceName(visitable); - traceValue(visitable.getValue()); - } - - @Override - public void visitFunctionType(VisitableElement> visitable) { - traceName(visitable); - } - - @Override - public void visitBinaryLogicType(VisitableElement>> visitable) { - traceName(visitable); - visitable.getValue().forEach(v -> v.accept(this)); - } - - @Override - public void visitUnaryLogicType(VisitableElement> visitable) { - traceName(visitable); - visitable.accept(this); - } - - @Override - public void visitBinaryTemporalType(VisitableElement> visitable) { - traceName(visitable); - visitObjects(visitable); - } - - @Override - public void visitBinarySpatialType(VisitableElement> visitable) { - traceName(visitable); - visitObjects(visitable); - } - - @Override - public void visitDistanceBufferType(VisitableElement> visitable) { - traceName(visitable); - visitObjects(visitable); - } - - @Override - public void visitBoundingBoxType(VisitableElement> visitable) { - traceName(visitable); - throw new UnsupportedOperationException("BoundingBoxType currently is not supported"); - // Ticket for adding support - https://codice.atlassian.net/browse/DDF-3829 - } - - @Override - public void visitBinaryComparisonType(VisitableElement>> visitable) { - traceName(visitable); - visitable.getValue().forEach(v -> v.accept(this)); - } - - @Override - public void visitPropertyIsLikeType(VisitableElement>> visitable) { - traceName(visitable); - visitable.getValue().forEach(v -> v.accept(this)); - } - - @Override - public void visitPropertyIsNullType(VisitableElement> visitable) { - traceName(visitable); - throw new UnsupportedOperationException("PropertyIsNullType currently is not supported"); - // Ticket for adding support - https://codice.atlassian.net/browse/DDF-3829 - // When support is added, verify result of visiting embedded entity (might be null) - } - - @Override - public void visitPropertyIsNilType(VisitableElement> visitable) { - traceName(visitable); - throw new UnsupportedOperationException("PropertyIsNilType currently is not supported"); - // Ticket for adding support - https://codice.atlassian.net/browse/DDF-3829 - // When support is added, verify result of visiting embedded entity (might be null) - } - - @Override - public void visitPropertyIsBetweenType(VisitableElement>> visitable) { - traceName(visitable); - throw new UnsupportedOperationException("PropertyIsBetweenType currently is not supported"); - // Ticket for adding support - https://codice.atlassian.net/browse/DDF-3829 - } - - private void visitObjects(VisitableElement> visitable) { - visitable - .getValue() - .stream() - .map(VisitableElement.class::cast) - .forEachOrdered(v -> v.accept(this)); - } - - private static void traceName(VisitableElement element) { - LOGGER.trace("LocalPart: {}", element.getName()); - } - - private static void traceValue(Serializable value) { - LOGGER.trace("Value: {}", value); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterProcessingException.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterProcessingException.java deleted file mode 100644 index 6edda670610..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterProcessingException.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -/** - * Indicate a problem was encountered while traversing a Filter 2.0 structure. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class FilterProcessingException extends RuntimeException { - public FilterProcessingException() { - super(); - } - - public FilterProcessingException(String message) { - super(message); - } - - public FilterProcessingException(String message, Throwable cause) { - super(message, cause); - } - - public FilterProcessingException(Throwable cause) { - super(cause); - } - - protected FilterProcessingException( - String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterReader.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterReader.java deleted file mode 100644 index 91e498d566b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterReader.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import static java.lang.String.format; - -import java.io.InputStream; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; -import javax.xml.transform.Source; -import javax.xml.transform.sax.SAXSource; -import net.opengis.filter.v_2_0.FilterType; -import org.codice.ddf.platform.util.XMLUtils; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; - -/** Provide functions for hydrating Filter XML into Filter JAXB objects. */ -public class FilterReader { - private final JAXBContext context; - - private final SAXParserFactory factory; - - public FilterReader() throws JAXBException { - this.context = JAXBContext.newInstance(FilterType.class); - this.factory = XMLUtils.getInstance().getSecureSAXParserFactory(); - this.factory.setNamespaceAware(true); - } - - public JAXBElement unmarshalFilter(InputStream inputStream) throws JAXBException { - return unmarshal(inputStream, FilterType.class); - } - - @SuppressWarnings("unchecked") - private JAXBElement unmarshal(InputStream inputStream, Class tClass) - throws JAXBException { - SAXParser parser; - try { - parser = factory.newSAXParser(); - } catch (SAXException | ParserConfigurationException e) { - throw new JAXBException("Could not create SAX parser", e); - } - - XMLReader reader; - try { - reader = parser.getXMLReader(); - } catch (SAXException e) { - throw new JAXBException("Could not get XML reader", e); - } - - Source xmlSource = new SAXSource(reader, new InputSource(inputStream)); - Unmarshaller unmarshaller = context.createUnmarshaller(); - Object result = unmarshaller.unmarshal(xmlSource); - - if (!(result instanceof JAXBElement)) { - throw new JAXBException("Unmarshaller did not return a JAXB object"); - } - - JAXBElement element = (JAXBElement) result; - Object data = element.getValue(); - - if (!tClass.isInstance(data)) { - throw new JAXBException( - format( - "Unexpected data binding, expected %s but got %s", - tClass.getName(), data.getClass().getName())); - } - - return (JAXBElement) element; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterWriter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterWriter.java deleted file mode 100644 index bc25617271d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FilterWriter.java +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import java.io.InputStream; -import java.io.Reader; -import java.io.StringWriter; -import java.net.URI; -import java.net.URL; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.validation.SchemaFactory; -import net.opengis.filter.v_2_0.FilterType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.ls.LSInput; -import org.xml.sax.SAXException; - -@SuppressWarnings("squid:S1075" /* Will parameterize only if necessary. */) -public class FilterWriter { - private static final Logger LOGGER = LoggerFactory.getLogger(FilterWriter.class); - - private static final String FILTER_XSD_RESOURCE_PATH = "/schemas/filter.xsd"; - - private static final String SCHEMA_LANGUAGE = "http://www.w3.org/2001/XMLSchema"; - - private static final String HTTP = "http"; - - private final Marshaller marshaller; - - /** - * Create a {@link FilterWriter}. - * - *

Accessing {@link javax.xml.XMLConstants#W3C_XML_SCHEMA_NS_URI} through the constants class - * causes an error: {@code javax.xml.XMLConstants cannot be found by catalog-ui-search}. - * Workaround is to use {@link #SCHEMA_LANGUAGE} constant instead. - * - *

See - * SchemaFactory for more information. - * - *

See Filter 2.0 for original OGC schema - * documents. - * - *

To permit initialization and installation of this system without an internet connection, the - * XML schemas have been cached as bundle resources. The root schema document is being loaded - * directly using standard Java resource loading techniques. This works fine for schema documents - * within the same namespace being linked using the {@code } directive, but not - * for linking a separate namespace using the {@code } directive. To support that without - * modifying the XSD files, a custom {@link org.w3c.dom.ls.LSResourceResolver} is being used. - * - *

The {@code systemId} is the URI of the resource about to be loaded. The {@code baseURI} is - * the URI of the resource currently being processed, which references the {@code systemId}. By - * returning {@code null} in the resource resolver the {@code systemId} resource can be loaded in - * the default way without any custom handling. This works for {@code } cases because the - * filter namespace documents live on the same context path, so the {@code bundleresource:} - * URI that was constructed by OSGi via traditional resource loading can be reused. Instances of - * {@code systemId} will just be a simple file name in these cases, i.e. {@code sort.xsd}, without - * any qualifying information. - * - *

For {@code } cases, and bringing in documents under a separate namespace, it cannot - * be assumed their context paths are similar. In that regard, {@code systemId}s will be fully - * qualified HTTP URLs and returning {@code null} will invoke default behavior that performs a - * network request to the open internet. Instead, the resource resolver will parse the document's - * name and redirect the network request by overwriting the {@code systemId} URI to point to the - * local version of the XSD. - * - * @param validationEnabled true if all XML writing done by this {@link FilterWriter} should also - * be validated against the filter - * schema. False otherwise. - * @throws JAXBException if a problem occurs setting up and configuring JAXB. - * @see #FILTER_XSD_RESOURCE_PATH for how the root schema document is being loaded. - */ - public FilterWriter(boolean validationEnabled) throws JAXBException { - this.marshaller = JAXBContext.newInstance(FilterType.class).createMarshaller(); - if (validationEnabled) { - LOGGER.info("Loading filter schemas"); - URL schemaLocation = FilterWriter.class.getResource(FILTER_XSD_RESOURCE_PATH); - SchemaFactory schemaFactory = SchemaFactory.newInstance(SCHEMA_LANGUAGE); - schemaFactory.setResourceResolver( - (type, namespaceURI, publicId, systemId, baseURI) -> { - if (!SCHEMA_LANGUAGE.equals(type)) { - return null; - } - URI remoteSchema = URI.create(systemId); - String protocol = remoteSchema.getScheme(); - if (!HTTP.equals(protocol)) { - return null; - } - String path = remoteSchema.getPath(); - String filename = path.substring(path.lastIndexOf('/') + 1); - URL remoteSchemaLocal = FilterWriter.class.getResource("/schemas/" + filename); - return new LSInputImpl(publicId, remoteSchemaLocal.toString()); - }); - try { - marshaller.setSchema(schemaFactory.newSchema(schemaLocation)); - } catch (SAXException e) { - throw new JAXBException("Error reading filter schema", e); - } - } - } - - public String marshal(JAXBElement element) throws JAXBException { - StringWriter writer = new StringWriter(); - marshaller.marshal(element, writer); - return writer.toString(); - } - - @SuppressWarnings("squid:S1186" /* Minimum impl req's met to rewrite the systemId URI */) - private static class LSInputImpl implements LSInput { - private String publicId; - private String systemId; - - LSInputImpl(String publicId, String systemId) { - this.publicId = publicId; - this.systemId = systemId; - } - - @Override - public String getPublicId() { - return publicId; - } - - @Override - public void setPublicId(String publicId) { - this.publicId = publicId; - } - - @Override - public String getSystemId() { - return systemId; - } - - @Override - public void setSystemId(String systemId) { - this.systemId = systemId; - } - - /* --------------------------------------------------------------------------- */ - /* The below methods are not necessary for merely resending a new systemId URI */ - - @Override - public Reader getCharacterStream() { - return null; - } - - @Override - public void setCharacterStream(Reader characterStream) {} - - @Override - public InputStream getByteStream() { - return null; - } - - @Override - public void setByteStream(InputStream byteStream) {} - - @Override - public String getStringData() { - return null; - } - - @Override - public void setStringData(String stringData) {} - - @Override - public String getBaseURI() { - return null; - } - - @Override - public void setBaseURI(String baseURI) {} - - @Override - public String getEncoding() { - return null; - } - - @Override - public void setEncoding(String encoding) {} - - @Override - public boolean getCertifiedText() { - return false; - } - - @Override - public void setCertifiedText(boolean certifiedText) {} - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FunctionResolver.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FunctionResolver.java deleted file mode 100644 index c2deb27ce73..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/FunctionResolver.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import net.opengis.filter.v_2_0.LiteralType; - -public class FunctionResolver { - private static final Function BOOL_FUNC = - s -> Boolean.parseBoolean((String) s); - - private static final String TEMPLATE_SUBSTITUTIONS_V1 = "template.value.v1"; - - private static final Integer DEFAULT_VALUE_INDEX = 0; - - private static final Integer NODE_ID_INDEX = 1; - - private static final Integer IS_VISIBLE_INDEX = 2; - - private static final Integer IS_READONLY_INDEX = 3; - - // Should not be instantiated - private FunctionResolver() {} - - public static Map resolve(String functionName, List args) { - if (!TEMPLATE_SUBSTITUTIONS_V1.equals(functionName)) { - throw new FilterProcessingException("Unrecognized function: " + functionName); - } - - List> wrappedArgs = - args.stream() - .map(LiteralType::getContent) - .flatMap( - content -> - (content == null || content.isEmpty()) - ? Stream.of(Optional.empty()) - : content.stream().map(Optional::of)) - .collect(Collectors.toList()); - - Map result = new HashMap<>(); - result.put("defaultValue", get(wrappedArgs, DEFAULT_VALUE_INDEX, String.class)); - result.put("nodeId", get(wrappedArgs, NODE_ID_INDEX, String.class)); - result.put("isVisible", get(wrappedArgs, IS_VISIBLE_INDEX, BOOL_FUNC)); - result.put("isReadOnly", get(wrappedArgs, IS_READONLY_INDEX, BOOL_FUNC)); - return result; - } - - private static T get(List> args, int i, Class expectedType) { - return get(args, i, expectedType::cast); - } - - private static T get( - List> args, int i, Function transform) { - return transform.apply(args.get(i).orElse(null)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitor.java deleted file mode 100644 index aefd366f7c5..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitor.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import javax.xml.bind.JAXBElement; -import org.apache.commons.collections4.CollectionUtils; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; -import org.codice.ddf.catalog.ui.forms.api.FilterVisitor2; -import org.codice.ddf.catalog.ui.forms.api.FlatFilterBuilder; -import org.codice.ddf.catalog.ui.forms.api.VisitableElement; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Traverses a Filter represented by some root {@link VisitableElement} and builds a UI-compatible - * {@link FilterNode} that can be serialized as part of a model. This allows the persistence layer - * to contain standards-compliant Filter XML 2.0 which is transformed on-the-fly for the UI to - * consume. - * - *

Irrespective of errors in the bindings, at the moment, this visitor makes an assumption: Value - * references support a {@link List} but for our purposes we are only interested in - * the first value. The rest are ignored. - * - *

To get started, load XML using JAXB, create a {@link VisitableElement} from the root {@link - * JAXBElement}, and pass an instance of {@link TransformVisitor} into {@link - * VisitableElement#accept(FilterVisitor2)}. - * - *

While trying to wrap one's head around visitors, it would be helpful to set a breakpoint on - * {@link #visitLiteralType(VisitableElement)} and take some time analyzing the stack. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class TransformVisitor extends AbstractFilterVisitor2 { - private static final Logger LOGGER = LoggerFactory.getLogger(TransformVisitor.class); - - private final FlatFilterBuilder builder; - - public TransformVisitor(final FlatFilterBuilder builder) { - this.builder = builder; - } - - public T getResult() { - return builder.getResult(); - } - - // Work around for Value References not having an explicit binding - @Override - public void visitString(VisitableElement visitable) { - super.visitString(visitable); - builder.setProperty(visitable.getValue()); - } - - @Override - public void visitLiteralType(VisitableElement> visitable) { - super.visitLiteralType(visitable); - List values = visitable.getValue(); - if (CollectionUtils.isEmpty(values)) { - LOGGER.debug("No values found on literal type"); - return; - } - - // Assumption: we only support one literal value - builder.setValue(values.get(0).toString()); - } - - @Override - public void visitDistanceType(VisitableElement visitable) { - super.visitDistanceType(visitable); - Double value = visitable.getValue(); - if (value == null) { - LOGGER.debug("No values found on distance type"); - return; - } - - builder.setDistance(value); - } - - @Override - public void visitDistanceBufferType(VisitableElement> visitable) { - traceName(visitable); - List values = visitable.getValue(); - if (CollectionUtils.isEmpty(values)) { - LOGGER.debug("No values found on distance buffer type"); - return; - } - - builder.beginBinarySpatialType("DWITHIN"); - visitable - .getValue() - .stream() - .map(VisitableElement.class::cast) - .forEachOrdered(v -> v.accept(this)); - builder.endTerminalType(); - } - - @Override - public void visitFunctionType(VisitableElement> visitable) { - traceName(visitable); - Map args = visitable.getValue(); - if (LOGGER.isTraceEnabled()) { - args.forEach((key, value) -> LOGGER.trace("Key: {} | Value: {}", key, value)); - } - - builder.setTemplatedValues(args); - } - - @Override - public void visitBinaryLogicType(VisitableElement>> visitable) { - traceName(visitable); - builder.beginBinaryLogicType(visitable.getName()); - visitable.getValue().forEach(v -> v.accept(this)); - builder.endBinaryLogicType(); - } - - @Override - public void visitBinaryComparisonType(VisitableElement>> visitable) { - traceName(visitable); - builder.beginBinaryComparisonType(visitable.getName()); - visitable.getValue().forEach(v -> v.accept(this)); - builder.endTerminalType(); - } - - @Override - public void visitPropertyIsLikeType(VisitableElement>> visitable) { - traceName(visitable); - // For now, will always choose ILIKE - // For system templates defined in XML, matchCase="true" will be ignored - builder.beginPropertyIsLikeType(visitable.getName(), false); - visitable.getValue().forEach(v -> v.accept(this)); - builder.endTerminalType(); - } - - @Override - public void visitBinaryTemporalType(VisitableElement> visitable) { - traceName(visitable); - builder.beginBinaryTemporalType(visitable.getName()); - visitable - .getValue() - .stream() - .map(VisitableElement.class::cast) - .forEachOrdered(v -> v.accept(this)); - builder.endTerminalType(); - } - - @Override - public void visitBinarySpatialType(VisitableElement> visitable) { - traceName(visitable); - builder.beginBinarySpatialType("INTERSECTS"); - visitable - .getValue() - .stream() - .map(VisitableElement.class::cast) - .forEachOrdered(v -> v.accept(this)); - builder.endTerminalType(); - } - - private static void traceName(VisitableElement element) { - LOGGER.trace("LocalPart: {}", element.getName()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/VisitableJsonElementImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/VisitableJsonElementImpl.java deleted file mode 100644 index 119b9ea3548..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/VisitableJsonElementImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.function.BiConsumer; -import java.util.stream.Collectors; -import net.opengis.filter.v_2_0.BBOXType; -import net.opengis.filter.v_2_0.FilterType; -import net.opengis.filter.v_2_0.PropertyIsBetweenType; -import net.opengis.filter.v_2_0.PropertyIsNilType; -import net.opengis.filter.v_2_0.PropertyIsNullType; -import net.opengis.filter.v_2_0.UnaryLogicOpType; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; -import org.codice.ddf.catalog.ui.forms.api.FilterVisitor2; -import org.codice.ddf.catalog.ui.forms.api.VisitableElement; - -/** - * Notes on the JSON to XML mapping representation. - * - *

Mapping for {@link FilterType} is not necessary, because the JSON representation does not - * utilize an external envelope for data nodes. The filter simply begins with the first concrete - * data node. - * - *

The mapping for {@link net.opengis.filter.v_2_0.FunctionType} is a special case for JSON, and - * is handled in the constructor separate from the direct mapping in static state. - * - *

Still need to evaluate support for several types. - * - * @see UnaryLogicOpType - * @see BBOXType - * @see PropertyIsNullType - * @see PropertyIsNilType - * @see PropertyIsBetweenType - */ -public class VisitableJsonElementImpl implements VisitableElement { - private static final String LIKE = "LIKE"; - - private static final String FAKE_PROPERTY_OPERATOR = "PROPERTY"; - - private static final String FAKE_VALUE_OPERATOR = "VALUE"; - - private static final String FAKE_DISTANCE_OPERATOR = "DISTANCE"; - - private static final Map> VISIT_METHODS = - ImmutableMap.>builder() - // Fake operators to give a flat structure an XML-like "embedded" structure - .put(FAKE_PROPERTY_OPERATOR, FilterVisitor2::visitString) - .put(FAKE_VALUE_OPERATOR, FilterVisitor2::visitLiteralType) - .put(FAKE_DISTANCE_OPERATOR, FilterVisitor2::visitDistanceType) - // Logical operator mapping - .put("AND", FilterVisitor2::visitBinaryLogicType) - .put("OR", FilterVisitor2::visitBinaryLogicType) - // Temporal operator mapping - .put("BEFORE", FilterVisitor2::visitBinaryTemporalType) - .put("AFTER", FilterVisitor2::visitBinaryTemporalType) - .put("DURING", FilterVisitor2::visitBinaryTemporalType) - // Spatial operator mapping - .put("INTERSECTS", FilterVisitor2::visitBinarySpatialType) - .put("DWITHIN", FilterVisitor2::visitDistanceBufferType) - // Comparison operator mapping - .put("=", FilterVisitor2::visitBinaryComparisonType) - .put("!=", FilterVisitor2::visitBinaryComparisonType) - .put(">", FilterVisitor2::visitBinaryComparisonType) - .put(">=", FilterVisitor2::visitBinaryComparisonType) - .put("<", FilterVisitor2::visitBinaryComparisonType) - .put("<=", FilterVisitor2::visitBinaryComparisonType) - .put("LIKE", FilterVisitor2::visitPropertyIsLikeType) - .put("ILIKE", FilterVisitor2::visitPropertyIsLikeType) - .build(); - - private final BiConsumer visitMethod; - private final String name; - private final Object value; - - public static VisitableJsonElementImpl create(final FilterNode node) { - return new VisitableJsonElementImpl(node); - } - - private VisitableJsonElementImpl(final FilterNode node) { - if (LIKE.equals(node.getOperator())) { - throw new UnsupportedOperationException("LIKE (case sensitive) currently is not supported"); - // Ticket for adding support - https://codice.atlassian.net/browse/DDF-3829 - } - - this.visitMethod = VISIT_METHODS.get(node.getOperator()); - if (this.visitMethod == null) { - throw new FilterProcessingException( - "Encountered an unexpected or unsupported type: " + node.getOperator()); - } - - this.name = node.getOperator(); - if (node.isTemplated()) { - this.value = wrap(node.getProperty(), node.getTemplateProperties()); - return; - } - - if (node.isLeaf()) { - Double distance = node.getDistance(); - if (distance != null) { - this.value = wrap(node.getProperty(), node.getValue(), distance); - } else { - this.value = wrap(node.getProperty(), node.getValue()); - } - } else { - this.value = wrap(node.getChildren()); - } - } - - private VisitableJsonElementImpl(final String operator, final Object value) { - this.name = operator; - this.value = value; - this.visitMethod = VISIT_METHODS.get(operator); - if (this.visitMethod == null) { - throw new FilterProcessingException( - "Encountered an unexpected or unsupported type: " + operator); - } - } - - private VisitableJsonElementImpl( - final String operator, - final Object value, - final BiConsumer visitMethod) { - this.name = operator; - this.value = value; - this.visitMethod = visitMethod; - } - - private static List> wrap(String property, String value) { - return ImmutableList.of( - new VisitableJsonElementImpl(FAKE_PROPERTY_OPERATOR, property), - new VisitableJsonElementImpl(FAKE_VALUE_OPERATOR, Collections.singletonList(value))); - } - - private static List> wrap(String property, String value, Double distance) { - return ImmutableList.of( - new VisitableJsonElementImpl(FAKE_PROPERTY_OPERATOR, property), - new VisitableJsonElementImpl(FAKE_DISTANCE_OPERATOR, distance), - new VisitableJsonElementImpl(FAKE_VALUE_OPERATOR, Collections.singletonList(value))); - } - - private static List> wrap( - String property, Map templateProperties) { - return ImmutableList.of( - new VisitableJsonElementImpl(FAKE_PROPERTY_OPERATOR, property), - new VisitableJsonElementImpl( - FAKE_VALUE_OPERATOR, templateProperties, FilterVisitor2::visitFunctionType)); - } - - private static List> wrap(List children) { - return children.stream().map(VisitableJsonElementImpl::new).collect(Collectors.toList()); - } - - @Override - public String getName() { - return name; - } - - @Override - public Object getValue() { - return value; - } - - @Override - public void accept(FilterVisitor2 visitor) { - visitMethod.accept(visitor, this); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImpl.java deleted file mode 100644 index eb546cfef6f..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImpl.java +++ /dev/null @@ -1,500 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import static org.apache.commons.lang3.Validate.notNull; - -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.ImmutableMap; -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.function.BiConsumer; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import javax.xml.bind.JAXBElement; -import net.opengis.filter.v_2_0.AbstractIdType; -import net.opengis.filter.v_2_0.BBOXType; -import net.opengis.filter.v_2_0.BinaryComparisonOpType; -import net.opengis.filter.v_2_0.BinaryLogicOpType; -import net.opengis.filter.v_2_0.BinarySpatialOpType; -import net.opengis.filter.v_2_0.BinaryTemporalOpType; -import net.opengis.filter.v_2_0.DistanceBufferType; -import net.opengis.filter.v_2_0.FilterType; -import net.opengis.filter.v_2_0.FunctionType; -import net.opengis.filter.v_2_0.LiteralType; -import net.opengis.filter.v_2_0.PropertyIsBetweenType; -import net.opengis.filter.v_2_0.PropertyIsLikeType; -import net.opengis.filter.v_2_0.PropertyIsNilType; -import net.opengis.filter.v_2_0.PropertyIsNullType; -import net.opengis.filter.v_2_0.UnaryLogicOpType; -import org.codice.ddf.catalog.ui.forms.api.FilterVisitor2; -import org.codice.ddf.catalog.ui.forms.api.VisitableElement; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Wraps a {@link JAXBElement} containing a filter component. The goal of this class is to provide a - * mapping from the Filter 2.0 binding type to the visit method that should be invoked. - * - *

Also returns an appropriate abstraction to decouple visitable data structures from JAXB. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public abstract class VisitableXmlElementImpl implements VisitableElement { - private static final Logger LOGGER = LoggerFactory.getLogger(VisitableXmlElementImpl.class); - - private static final String INVALID_INVOCATION = "Could not find valid invocation for type: "; - - private static final Map> VISIT_METHODS = - ImmutableMap.>builder() - .put(FilterType.class, FilterVisitor2::visitFilter) - .put(String.class, FilterVisitor2::visitString) - .put(LiteralType.class, FilterVisitor2::visitLiteralType) - .put(FunctionType.class, FilterVisitor2::visitFunctionType) - .put(BinaryLogicOpType.class, FilterVisitor2::visitBinaryLogicType) - .put(UnaryLogicOpType.class, FilterVisitor2::visitUnaryLogicType) - .put(BinaryTemporalOpType.class, FilterVisitor2::visitBinaryTemporalType) - .put(BinarySpatialOpType.class, FilterVisitor2::visitBinarySpatialType) - .put(DistanceBufferType.class, FilterVisitor2::visitDistanceBufferType) - .put(BBOXType.class, FilterVisitor2::visitBoundingBoxType) - .put(BinaryComparisonOpType.class, FilterVisitor2::visitBinaryComparisonType) - .put(PropertyIsLikeType.class, FilterVisitor2::visitPropertyIsLikeType) - .put(PropertyIsNullType.class, FilterVisitor2::visitPropertyIsNullType) - .put(PropertyIsNilType.class, FilterVisitor2::visitPropertyIsNilType) - .put(PropertyIsBetweenType.class, FilterVisitor2::visitPropertyIsBetweenType) - .build(); - - private final JAXBElement element; - - @VisibleForTesting - VisitableXmlElementImpl(final JAXBElement element) { - notNull(element); - this.element = element; - } - - public static VisitableXmlElementImpl create(final JAXBElement element) { - return SubtypeFactory.createElement(element); - } - - @Override - public String getName() { - return element.getName().getLocalPart(); - } - - @Override - public void accept(FilterVisitor2 visitor) { - Class clazz = element.getDeclaredType(); - BiConsumer biConsumer = VISIT_METHODS.get(clazz); - if (biConsumer == null) { - throw new FilterProcessingException( - "Encountered an unexpected or unsupported type: " + clazz.getName()); - } - // Actually invoking one of the "visits" on local variable "visitor" - biConsumer.accept(visitor, this); - } - - private static JAXBElement extractFromFilter(Object object) { - FilterType filterType = (FilterType) object; - JAXBElement root = - Stream.of( - filterType.getComparisonOps(), - filterType.getLogicOps(), - filterType.getSpatialOps(), - filterType.getTemporalOps()) - .filter(Objects::nonNull) - .findAny() - .orElse(null); - - if (root != null) { - LOGGER.trace("Valid root found, beginning traversal"); - return root; - } - - // Support can be enhanced in the future, but currently these components aren't needed - // Ticket for adding support - https://codice.atlassian.net/browse/DDF-3829 - handleUnsupported(filterType.getId()); - handleUnsupported(filterType.getExtensionOps()); - - // Functions are supported but not as the FIRST element of a document - handleUnsupported(filterType.getFunction()); - - throw new FilterProcessingException("No valid starting element for the filter was found"); - } - - private static JAXBElement extractFromUnary(Object object) { - UnaryLogicOpType unaryLogicOpType = (UnaryLogicOpType) object; - JAXBElement node = - Stream.of( - unaryLogicOpType.getComparisonOps(), - unaryLogicOpType.getLogicOps(), - unaryLogicOpType.getSpatialOps(), - unaryLogicOpType.getTemporalOps()) - .filter(Objects::nonNull) - .findAny() - .orElse(null); - - if (node != null) { - LOGGER.trace("Found valid child for unary operator"); - return node; - } - - // Support can be enhanced in the future, but currently these components aren't needed - // Ticket for adding support - https://codice.atlassian.net/browse/DDF-3829 - handleUnsupported(unaryLogicOpType.getId()); - handleUnsupported(unaryLogicOpType.getExtensionOps()); - - // Functions are supported but not immediately after a Unary operator - handleUnsupported(unaryLogicOpType.getFunction()); - - throw new FilterProcessingException("No valid starting element for the unary op was found"); - } - - private static void handleUnsupported(Object type) { - if (type != null) { - throw new UnsupportedOperationException( - "Encountered XML filter with unsupported element: " + type.getClass().getName()); - } - } - - private static void handleUnsupported(List> list) { - if (!list.isEmpty()) { - throw new UnsupportedOperationException( - "Encountered XML filter with unsupported element: " - + list.get(0).getDeclaredType().getName()); - } - } - - /** - * Responsible for mapping the filter types to the correct instance of {@link - * VisitableXmlElementImpl}. - */ - private static class SubtypeFactory { - private static final Map> CTORS = - ImmutableMap.>builder() - // Value references - .put(String.class, ValueReferenceElement::new) - // Literals - .put(LiteralType.class, LiteralElement::new) - // Functions - .put(FunctionType.class, FunctionElement::new) - // Singleton Expression Elements - .put(FilterType.class, SingletonExpressionElement::new) - .put(UnaryLogicOpType.class, SingletonExpressionElement::new) - .put(PropertyIsNullType.class, SingletonExpressionElement::new) - .put(PropertyIsNilType.class, SingletonExpressionElement::new) - // Expression Elements - .put(BinaryLogicOpType.class, ExpressionElement::new) - .put(BinaryComparisonOpType.class, ExpressionElement::new) - .put(PropertyIsLikeType.class, ExpressionElement::new) - // Expression or Any Elements - .put(BinaryTemporalOpType.class, ExpressionOrAnyElement::new) - .put(BinarySpatialOpType.class, ExpressionOrAnyElement::new) - .put(DistanceBufferType.class, DistanceBufferElement::new) - .put(BBOXType.class, ExpressionOrAnyElement::new) - .build(); - - private static VisitableXmlElementImpl createElement(JAXBElement element) { - Function creatorFunction = - CTORS.get(element.getDeclaredType()); - if (creatorFunction == null) { - throw new FilterProcessingException( - "Could not find valid constructor for type: " + element.getDeclaredType().getName()); - } - return creatorFunction.apply(element); - } - } - - /** - * Represents an element that contains a Filter Function. That is, the node has children that can - * be decomposed into a {@code Map} for the use of templates. - * - *

Function currying (embedded functions) is not yet supported. - */ - private static class FunctionElement extends VisitableXmlElementImpl> { - private final Map value; - - private FunctionElement(JAXBElement element) { - super(element); - if (!element.getDeclaredType().equals(FunctionType.class)) { - throw new FilterProcessingException( - INVALID_INVOCATION + element.getDeclaredType().getName()); - } - FunctionType functionType = (FunctionType) element.getValue(); - this.value = - FunctionResolver.resolve( - functionType.getName(), - functionType - .getExpression() - .stream() - .map(JAXBElement::getValue) - .map(LiteralType.class::cast) - .collect(Collectors.toList())); - } - - @Override - public Map getValue() { - return value; - } - } - - /** - * Represents an element that contains a Filter Expression. That is, the node has children of the - * form {@code List>}. - * - *

The current implementation has several limitations: - * - *

    - *
  • {@link PropertyIsLikeType} is not fully supported yet, and the additional attributes need - * to be taken into account when support is built in. - *
- * - * @see PropertyIsLikeType#getEscapeChar() - * @see PropertyIsLikeType#getSingleChar() - * @see PropertyIsLikeType#getWildCard() - */ - private static class ExpressionElement - extends VisitableXmlElementImpl>> { - private static final Map, Function>>> PROVIDERS = - ImmutableMap., Function>>>builder() - .put(BinaryLogicOpType.class, t -> ((BinaryLogicOpType) t).getOps()) - .put(BinaryComparisonOpType.class, t -> ((BinaryComparisonOpType) t).getExpression()) - .put(PropertyIsLikeType.class, t -> ((PropertyIsLikeType) t).getExpression()) - .build(); - - private final List> value; - - private ExpressionElement(JAXBElement element) { - super(element); - Function>> invocation = PROVIDERS.get(element.getDeclaredType()); - if (invocation == null) { - throw new FilterProcessingException( - INVALID_INVOCATION + element.getDeclaredType().getName()); - } - this.value = - Stream.of(element) - .map(JAXBElement::getValue) - .map(invocation) - .flatMap(List::stream) - .map(SubtypeFactory::createElement) - .collect(Collectors.toList()); - } - - @Override - public List> getValue() { - return value; - } - } - - /** - * Represents an element that contains a single child in it's expression. That is, the node has - * children of the form {@code VisitableElement}. - * - *

Note that types {@link FilterType} and {@link UnaryLogicOpType} have a wider range for - * children than just a simple expression. As such, they get special static handler functions in - * the parent class. - */ - private static class SingletonExpressionElement - extends VisitableXmlElementImpl> { - private static final Map, Function>> PROVIDERS = - ImmutableMap., Function>>builder() - .put(FilterType.class, VisitableXmlElementImpl::extractFromFilter) - .put(UnaryLogicOpType.class, VisitableXmlElementImpl::extractFromUnary) - .put(PropertyIsNullType.class, t -> ((PropertyIsNullType) t).getExpression()) - .put(PropertyIsNilType.class, t -> ((PropertyIsNilType) t).getExpression()) - .build(); - - private final VisitableElement value; - - private SingletonExpressionElement(JAXBElement element) { - super(element); - Function> invocation = PROVIDERS.get(element.getDeclaredType()); - if (invocation == null) { - throw new FilterProcessingException( - INVALID_INVOCATION + element.getDeclaredType().getName()); - } - this.value = - Optional.of(element) - .map(JAXBElement::getValue) - .map(invocation) - .map(SubtypeFactory::createElement) - .orElseThrow(NullPointerException::new); // Should never occur - see super ctor - } - - @Override - public VisitableElement getValue() { - return value; - } - } - - /** - * Represents an element that contains a Filter Expression or any other data structure. That is, - * the node has children of the form {@code List}. The objects could be {@link - * VisitableElement}s or not. - * - *

The current implementation has some limitations: - * - *

    - *
  • It is currently expected that all children are simple representations of temporal and - * spatial data, for instance, individual date strings or WKT strings in a {@code - * } block. Thus casting to a {@link JAXBElement} is a temporary stop-gap measure. - *
- */ - private static class ExpressionOrAnyElement extends VisitableXmlElementImpl> { - private static final Map, Function>> PROVIDERS = - ImmutableMap., Function>>builder() - .put(BinaryTemporalOpType.class, t -> ((BinaryTemporalOpType) t).getExpressionOrAny()) - .put(BinarySpatialOpType.class, t -> ((BinarySpatialOpType) t).getExpressionOrAny()) - .put(DistanceBufferType.class, t -> ((DistanceBufferType) t).getExpressionOrAny()) - .put(BBOXType.class, t -> ((BBOXType) t).getExpressionOrAny()) - .build(); - - private final List value; - - private ExpressionOrAnyElement(JAXBElement element) { - super(element); - Function> invocation = PROVIDERS.get(element.getDeclaredType()); - if (invocation == null) { - throw new FilterProcessingException( - INVALID_INVOCATION + element.getDeclaredType().getName()); - } - try { - this.value = - Stream.of(element) - .map(JAXBElement::getValue) - .map(invocation) - .flatMap(List::stream) - // Will throw a ClassCastException for unexpected ANY data (GML, etc) - .map(JAXBElement.class::cast) - .map(SubtypeFactory::createElement) - .collect(Collectors.toList()); - } catch (ClassCastException e) { - // Ticket to add support: https://codice.atlassian.net/browse/DDF-3830 - throw new UnsupportedOperationException("GML or ANY XML is currently not supported", e); - } - } - - @Override - public List getValue() { - return value; - } - } - - private static class DistanceBufferElement extends ExpressionOrAnyElement { - - private double buffer; - - public DistanceBufferElement(JAXBElement element) { - super(element); - if (!element.getDeclaredType().equals(DistanceBufferType.class)) { - throw new FilterProcessingException( - INVALID_INVOCATION + element.getDeclaredType().getName()); - } - this.buffer = ((DistanceBufferType) element.getValue()).getDistance().getValue(); - } - - @Override - public List getValue() { - List values = super.getValue(); - values.add( - new VisitableElement() { - @Override - public String getName() { - return "Distance"; - } - - @Override - public Double getValue() { - return buffer; - } - - @Override - public void accept(FilterVisitor2 visitor) { - visitor.visitDistanceType(this); - } - }); - return values; - } - } - - /** - * Represents a node containing the name of a property. In Filter XML it corresponds to a {@code - * } type, but the binding does not supply a specific class for this type of - * element. - */ - private static class ValueReferenceElement extends VisitableXmlElementImpl { - private final String value; - - private ValueReferenceElement(JAXBElement element) { - super(element); - if (!element.getDeclaredType().equals(String.class)) { - throw new FilterProcessingException( - INVALID_INVOCATION + element.getDeclaredType().getName()); - } - this.value = - Optional.of(element) - .map(JAXBElement::getValue) - .map(String.class::cast) - .orElseThrow(NullPointerException::new); // Should never occur - see super ctor - } - - @Override - public String getValue() { - return value; - } - } - - /** - * Represents a node containing the value of a property. In Filter XML it corresponds to a {@code - * } type. - * - *

When a series of {@code } elements are encountered by the Filter JAXB binding, - * they are each read as their own {@link LiteralType} in order of appearance with the data - * of each element being populated into their own list of serializables, which can be obtained - * using {@link LiteralType#getContent()}. So, for the following series: - * - *

{@code 0.78 my value true } - * - *

The result would be a list of {@link LiteralType}s, each with a list of serializables of - * size one. The corresponding entry in each list on each {@link LiteralType} would be String - * values in the order of "0.78", "my value", and "true". Additional parsing is necessary to - * hydrate a primitive type. - */ - private static class LiteralElement extends VisitableXmlElementImpl> { - private final List value; - - private LiteralElement(JAXBElement element) { - super(element); - if (!element.getDeclaredType().equals(LiteralType.class)) { - throw new FilterProcessingException( - INVALID_INVOCATION + element.getDeclaredType().getName()); - } - this.value = - Optional.of(element) - .map(JAXBElement::getValue) - .map(LiteralType.class::cast) - .map(LiteralType::getContent) - .orElseThrow(NullPointerException::new); // Should never occur - see super ctor - } - - @Override - public List getValue() { - return value; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/FilterNodeImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/FilterNodeImpl.java deleted file mode 100644 index ec0cd05166c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/FilterNodeImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.model; - -import static org.apache.commons.lang3.Validate.notNull; - -import com.google.gson.annotations.SerializedName; -import java.util.List; -import java.util.Map; -import javax.annotation.Nullable; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; - -public class FilterNodeImpl implements FilterNode { - @SerializedName("type") - private final String operator; - - @SerializedName("filters") - private final List children; - - private String property; - - private String value; - - private Double distance; - - private Map templateProperties; - - public FilterNodeImpl(final String operator, final List children) { - notNull(operator); - notNull(children); - this.operator = operator; - this.children = children; - - this.property = null; - this.value = null; - this.distance = null; - this.templateProperties = null; - } - - public FilterNodeImpl(String operator) { - notNull(operator); - this.operator = operator; - this.children = null; - - this.property = null; - this.value = null; - this.distance = null; - this.templateProperties = null; - } - - public FilterNodeImpl(FilterNode node, Map templateProperties) { - notNull(node); - this.operator = node.getOperator(); - this.children = null; - - if (!node.isLeaf()) { - throw new IllegalArgumentException("Any node with template properties must be a leaf"); - } - - notNull(templateProperties); - this.property = node.getProperty(); - this.value = node.getValue(); - this.distance = node.getDistance(); - this.templateProperties = templateProperties; - } - - @Override - public boolean isLeaf() { - return children == null; - } - - @Override - public boolean isTemplated() { - return templateProperties != null; - } - - @Override - public String getOperator() { - return operator; - } - - @Override - public List getChildren() { - if (isLeaf()) { - throw new IllegalStateException("Leaf nodes do not have children"); - } - return children; - } - - @Override - @Nullable - public String getProperty() { - if (!isLeaf()) { - throw new IllegalStateException("No property value exists for a logical operator"); - } - return property; - } - - @Override - @Nullable - public String getValue() { - if (!isLeaf()) { - throw new IllegalStateException("No target value exists for a logical operator"); - } - return value; - } - - @Override - @Nullable - public Double getDistance() { - if (!isLeaf()) { - throw new IllegalStateException("No distance value exists for a logical operator"); - } - return distance; - } - - @Override - public void setProperty(String property) { - notNull(property); - this.property = property; - } - - @Override - public void setValue(String value) { - notNull(value); - this.value = value; - } - - @Override - public void setDistance(Double distance) { - this.distance = distance; - } - - @Override - public Map getTemplateProperties() { - if (!isTemplated()) { - throw new IllegalStateException("Non-templated nodes do not have template properties"); - } - return templateProperties; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/FilterNodeMapImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/FilterNodeMapImpl.java deleted file mode 100644 index aaacf732dc0..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/FilterNodeMapImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.model; - -import static org.apache.commons.lang3.Validate.notNull; - -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import javax.annotation.Nullable; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; - -public class FilterNodeMapImpl implements FilterNode { - private static final String CHILDREN = "filters"; - - private static final String PROPERTY = "property"; - - private static final String VALUE = "value"; - - private static final String DISTANCE = "distance"; - - private static final String TEMPLATE_PROPERTIES = "templateProperties"; - - private final String type; - - private final Map json; - - public FilterNodeMapImpl(final Map json) { - notNull(json); - this.type = (String) json.get("type"); - - notNull(type); - this.json = json; - - if (!(isValidLogical(json) || isValidTerminal(json))) { - throw new IllegalArgumentException("Filter node properties are invalid: " + json.toString()); - } - } - - @Override - public boolean isLeaf() { - return json.get(CHILDREN) == null; - } - - @Override - public boolean isTemplated() { - return json.get(TEMPLATE_PROPERTIES) != null; - } - - @Override - public String getOperator() { - return type; - } - - @Override - public List getChildren() { - List filters = (List) json.get(CHILDREN); - Stream streams = Stream.of(filters).flatMap(List::stream); - return streams.map(Map.class::cast).map(FilterNodeMapImpl::new).collect(Collectors.toList()); - } - - @Override - @SuppressWarnings("unchecked") - public Map getTemplateProperties() { - if (!isTemplated()) { - throw new IllegalStateException("Non-templated nodes do not have template properties"); - } - return (Map) json.get(TEMPLATE_PROPERTIES); - } - - @Override - @Nullable - public String getProperty() { - if (!isLeaf()) { - throw new IllegalStateException("No property value exists for a logical operator"); - } - return (String) json.get(PROPERTY); - } - - @Override - @Nullable - public String getValue() { - if (!isLeaf()) { - throw new IllegalStateException("No target value exists for a logical operator"); - } - return Objects.toString(json.get(VALUE)); - } - - @Override - public Double getDistance() { - if (!isLeaf()) { - throw new IllegalStateException("No distance value exists for a logical operator"); - } - - Object distance = json.get(DISTANCE); - if (distance == null) { - return null; - } - - if (distance instanceof Number) { - return ((Number) distance).doubleValue(); - } - - throw new IllegalStateException("The distance value could not be converted into a double"); - } - - @Override - public void setProperty(String property) { - notNull(property); - json.put(PROPERTY, property); - } - - @Override - public void setValue(String value) { - notNull(value); - json.put(VALUE, value); - } - - @Override - public void setDistance(Double distance) { - json.put(DISTANCE, distance); - } - - private static boolean isValidLogical(Map json) { - return json.containsKey(CHILDREN) && !json.containsKey(PROPERTY) && !json.containsKey(VALUE); - } - - private static boolean isValidTerminal(Map json) { - return !json.containsKey(CHILDREN) && json.containsKey(PROPERTY) && json.containsKey(VALUE); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/CommonTemplate.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/CommonTemplate.java deleted file mode 100644 index 00fa586cdbf..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/CommonTemplate.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.model.pojo; - -import static org.codice.ddf.catalog.ui.util.AccessUtil.safeGet; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * Provides data model pojo that can be annotated for JSON serialization. - * - *

{@link CommonTemplate} is the base used for transporting template data completely separate - * from any filter structures that may be needed. These properties apply to both query templates and - * result templates. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class CommonTemplate { - private final String id; - - private final String title; - - private final String description; - - private final Date created; - - private final Date modified; - - private final String owner; - - protected List accessGroups; - - protected List accessGroupsRead; - - protected List accessIndividuals; - - protected List accessIndividualsRead; - - protected List accessAdministrators; - - public CommonTemplate(Metacard metacard) { - this.id = safeGet(metacard, Core.ID, String.class); - this.title = safeGet(metacard, Core.TITLE, String.class); - this.description = safeGet(metacard, Core.DESCRIPTION, String.class); - - this.created = safeGet(metacard, Core.CREATED, Date.class); - this.modified = safeGet(metacard, Core.METACARD_MODIFIED, Date.class); - this.owner = safeGet(metacard, Core.METACARD_OWNER, String.class); - } - - public CommonTemplate(Metacard metacard, Map> securityAttributes) { - this.id = safeGet(metacard, Core.ID, String.class); - this.title = safeGet(metacard, Core.TITLE, String.class); - this.description = safeGet(metacard, Core.DESCRIPTION, String.class); - - this.created = safeGet(metacard, Core.CREATED, Date.class); - this.modified = safeGet(metacard, Core.METACARD_MODIFIED, Date.class); - this.owner = safeGet(metacard, Core.METACARD_OWNER, String.class); - - this.accessIndividuals = - securityAttributes.getOrDefault(Security.ACCESS_INDIVIDUALS, new ArrayList<>()); - this.accessIndividualsRead = - securityAttributes.getOrDefault(Security.ACCESS_INDIVIDUALS_READ, new ArrayList<>()); - this.accessGroups = securityAttributes.getOrDefault(Security.ACCESS_GROUPS, new ArrayList<>()); - this.accessGroupsRead = - securityAttributes.getOrDefault(Security.ACCESS_GROUPS_READ, new ArrayList<>()); - this.accessAdministrators = - securityAttributes.getOrDefault(Security.ACCESS_ADMINISTRATORS, new ArrayList<>()); - } - - public CommonTemplate(Map input) { - this.id = (String) input.get(Core.ID); - this.title = (String) input.get(Core.TITLE); - this.description = (String) input.get(Core.DESCRIPTION); - - // Let the framework decide on the date info when creating / updating - this.created = null; - this.modified = null; - - this.owner = (String) input.get(Core.METACARD_OWNER); - } - - public String getId() { - return id; - } - - public String getTitle() { - return title; - } - - public String getDescription() { - return description; - } - - public Date getCreated() { - return created; - } - - public Date getModified() { - return modified; - } - - public String getOwner() { - return owner; - } - - public List getAccessGroups() { - return accessGroups; - } - - public List getAccessGroupsRead() { - return accessGroupsRead; - } - - public List getAccessIndividuals() { - return accessIndividuals; - } - - public List getAccessIndividualsRead() { - return accessIndividualsRead; - } - - public List getAccessAdministrators() { - return accessAdministrators; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/FieldFilter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/FieldFilter.java deleted file mode 100644 index 978f311ccef..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/FieldFilter.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.model.pojo; - -import static org.apache.commons.lang.Validate.notEmpty; - -import ddf.catalog.data.Metacard; -import java.io.Serializable; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * Provides data model pojo that can be annotated for JSON serialization. - * - *

{@link FieldFilter}, also known as "detail level", specifies a result template, which is a - * list of attribute descriptor names that represent the fields that should be visible while - * browsing metacards after a query is executed. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class FieldFilter extends CommonTemplate { - @SuppressWarnings("squid:S1068" /* Needed for serialization */) - private final Set descriptors; - - private String creator; - - public FieldFilter( - Metacard metacard, - Set descriptors, - String creator, - Map> securityAttributes) { - super(metacard, securityAttributes); - notEmpty(descriptors); - this.descriptors = descriptors; - this.creator = creator; - } - - @SuppressWarnings("unchecked") - public FieldFilter(Map input) { - super(input); - List des = (List) input.get("descriptors"); - notEmpty(des); - this.descriptors = new HashSet<>(des); - } - - public Set getDescriptors() { - return descriptors; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/FormTemplate.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/FormTemplate.java deleted file mode 100644 index 5ef2796d7fe..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/model/pojo/FormTemplate.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.model.pojo; - -import com.google.gson.annotations.SerializedName; -import ddf.catalog.data.Metacard; -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; - -/** - * Provides data model pojo that can be annotated for JSON serialization. - * - *

{@link FormTemplate} specifies a query template, which is a special type of filter whose nodes - * and expressions may be annotated with additional data. Contains a {@link FilterNode} which is the - * root of the filter tree. - * - *

This code is experimental. While it is functional and tested, it may change or be removed - * in a future version of the library. - */ -public class FormTemplate extends CommonTemplate { - @SerializedName("filterTemplate") - private FilterNode root; - - private String creator; - - private Map querySettings; - - public FormTemplate( - Metacard metacard, - FilterNode root, - Map> securityAttributes, - String creator, - Map querySettings) { - super(metacard, securityAttributes); - this.root = root; - this.creator = creator; - this.querySettings = querySettings; - } - - public FilterNode getRoot() { - return root; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/AbstractAccessPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/AbstractAccessPlugin.java deleted file mode 100644 index 277c9a43dfd..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/AbstractAccessPlugin.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.security; - -import ddf.catalog.data.Metacard; -import ddf.catalog.operation.CreateRequest; -import ddf.catalog.operation.DeleteRequest; -import ddf.catalog.operation.DeleteResponse; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.ResourceRequest; -import ddf.catalog.operation.ResourceResponse; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.plugin.AccessPlugin; -import ddf.catalog.plugin.StopProcessingException; -import java.util.Map; - -/** - * Provides default behavior for an access plugin by returning the given {@link - * ddf.catalog.operation.Request} and enforcing no new access constraints. - */ -public abstract class AbstractAccessPlugin implements AccessPlugin { - @Override - public CreateRequest processPreCreate(CreateRequest input) throws StopProcessingException { - return input; - } - - @Override - public UpdateRequest processPreUpdate( - UpdateRequest input, Map existingMetacards) throws StopProcessingException { - return input; - } - - @Override - public DeleteRequest processPreDelete(DeleteRequest input) throws StopProcessingException { - return input; - } - - @Override - public DeleteResponse processPostDelete(DeleteResponse input) throws StopProcessingException { - return input; - } - - @Override - public QueryRequest processPreQuery(QueryRequest input) throws StopProcessingException { - return input; - } - - @Override - public QueryResponse processPostQuery(QueryResponse input) throws StopProcessingException { - return input; - } - - @Override - public ResourceRequest processPreResource(ResourceRequest input) throws StopProcessingException { - return input; - } - - @Override - public ResourceResponse processPostResource(ResourceResponse input, Metacard metacard) - throws StopProcessingException { - return input; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/AbstractPolicyPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/AbstractPolicyPlugin.java deleted file mode 100644 index 4b504ab120a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/AbstractPolicyPlugin.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.security; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.ResourceRequest; -import ddf.catalog.operation.ResourceResponse; -import ddf.catalog.plugin.PolicyPlugin; -import ddf.catalog.plugin.PolicyResponse; -import ddf.catalog.plugin.StopProcessingException; -import ddf.catalog.plugin.impl.PolicyResponseImpl; -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -/** - * Provides default behavior for a policy plugin by returning an empty {@link PolicyResponseImpl} - * since no policy information needs to be built up. - */ -public abstract class AbstractPolicyPlugin implements PolicyPlugin { - @Override - public PolicyResponse processPreCreate(Metacard input, Map properties) - throws StopProcessingException { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPreUpdate(Metacard newMetacard, Map properties) - throws StopProcessingException { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPreDelete( - List metacards, Map properties) - throws StopProcessingException { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPostDelete(Metacard input, Map properties) - throws StopProcessingException { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPreQuery(Query query, Map properties) - throws StopProcessingException { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPostQuery(Result input, Map properties) - throws StopProcessingException { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPreResource(ResourceRequest resourceRequest) - throws StopProcessingException { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPostResource(ResourceResponse resourceResponse, Metacard metacard) - throws StopProcessingException { - return new PolicyResponseImpl(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/SystemTemplateAccessPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/SystemTemplateAccessPlugin.java deleted file mode 100644 index c15555ab6fe..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/SystemTemplateAccessPlugin.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.security; - -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; - -import ddf.catalog.data.Metacard; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.plugin.StopProcessingException; -import java.util.Map; - -public class SystemTemplateAccessPlugin extends AbstractAccessPlugin { - - /** - * Prevents two illegal operations from occuring across all endpoints: - * - *

    - *
  1. ANY system template metacard is NOT ALLOWED to be the target of an update request - *
  2. ANY metacard is NOT ALLOWED to be updated such that it BECOMES a system template metacard - *
- * - * @param input the {@link UpdateRequest} to permit if all conditions are met; contains the new - * metacard states. - * @param existingMetacards the old metacard states. - * @return the {@link UpdateRequest} if the operation is permitted. - * @throws StopProcessingException if one or more of the above two conditions were detected. - */ - @Override - public UpdateRequest processPreUpdate( - UpdateRequest input, Map existingMetacards) throws StopProcessingException { - if (existingMetacards - .values() - .stream() - .map(Metacard::getTags) - .anyMatch(tags -> tags.contains(SYSTEM_TEMPLATE))) { - throw new StopProcessingException("Cannot update system template metacards"); - } - if (input - .getUpdates() - .stream() - .map(Map.Entry::getValue) - .map(Metacard::getTags) - .anyMatch(tags -> tags.contains(SYSTEM_TEMPLATE))) { - throw new StopProcessingException( - "Cannot coerce existing metacard to be a system template metacard"); - } - return input; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/SystemTemplatePolicyPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/SystemTemplatePolicyPlugin.java deleted file mode 100644 index 403e58e0330..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/forms/security/SystemTemplatePolicyPlugin.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.security; - -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; - -import ddf.catalog.data.Metacard; -import ddf.catalog.plugin.PolicyResponse; -import ddf.catalog.plugin.StopProcessingException; -import ddf.catalog.plugin.impl.PolicyResponseImpl; -import java.io.Serializable; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.function.Predicate; -import org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlSecurityConfiguration; - -public class SystemTemplatePolicyPlugin extends AbstractPolicyPlugin { - private final AccessControlSecurityConfiguration config; - - private final Predicate isSystemTemplateMetacard = - (metacard) -> - metacard != null - && metacard.getTags() != null - && metacard.getTags().contains(SYSTEM_TEMPLATE); - - public SystemTemplatePolicyPlugin(AccessControlSecurityConfiguration config) { - this.config = config; - } - - @Override - public PolicyResponse processPreCreate(Metacard input, Map properties) - throws StopProcessingException { - if (isSystemTemplateMetacard.test(input)) { - return new PolicyResponseImpl( - Collections.singletonMap( - config.getSystemUserAttribute(), - Collections.singleton(config.getSystemUserAttributeValue())), - Collections.emptyMap()); - } - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPreDelete( - List metacards, Map properties) - throws StopProcessingException { - if (metacards.stream().anyMatch(isSystemTemplateMetacard)) { - return new PolicyResponseImpl( - Collections.singletonMap( - config.getSystemUserAttribute(), - Collections.singleton(config.getSystemUserAttributeValue())), - Collections.emptyMap()); - } - return new PolicyResponseImpl(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/BuildApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/BuildApplication.java deleted file mode 100644 index 24a0ee11d5e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/BuildApplication.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static spark.Spark.get; - -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.ImmutableMap; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.metacard.internal.UserCreatableMetacardType; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import spark.servlet.SparkApplication; - -public class BuildApplication implements SparkApplication { - - private final EndpointUtil endpointUtil; - - private final List userCreatableMetacardTypeList; - - public BuildApplication( - EndpointUtil endpointUtil, List userCreatableMetacardTypeList) { - this.endpointUtil = endpointUtil; - this.userCreatableMetacardTypeList = userCreatableMetacardTypeList; - } - - @Override - public void init() { - /** Get the available types that were explicitly configured. */ - get( - "/builder/availabletypes", - (request, response) -> getAvailableTypes(), - endpointUtil::getJson); - } - - @VisibleForTesting - Map getAvailableTypes() { - - List> availableTypes = - this.userCreatableMetacardTypeList - .stream() - .map(this::convertUserCreatableMetacardTypeToMap) - .collect(Collectors.toList()); - - return Collections.singletonMap("availabletypes", availableTypes); - } - - private Map convertUserCreatableMetacardTypeToMap( - UserCreatableMetacardType userCreatableMetacardType) { - return new ImmutableMap.Builder() - .put("metacardType", userCreatableMetacardType.getAvailableType()) - .put("visibleAttributes", userCreatableMetacardType.getUserVisibleAttributes()) - .build(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/EntityTooLargeException.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/EntityTooLargeException.java deleted file mode 100644 index 3c5e4298cd8..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/EntityTooLargeException.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -/** Exception class for a HTTP 413 status code - Entity Too Large */ -public class EntityTooLargeException extends RuntimeException { - private String ip; - - private String userAgent; - - private String url; - - private int id; - - public EntityTooLargeException(String ip, String userAgent, String url, int id) { - super(); - this.ip = ip; - this.userAgent = userAgent; - this.url = url; - this.id = id; - } - - @Override - public String getMessage() { - return String.format( - "Client sent a request body that was too large. {ip='%s', userClient='%s', url='%s', id='0x%08X'", - ip, userAgent, url, id); - } - - public int getId() { - return id; - } - - public String getStringId() { - return String.format("0x%08X", id); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/ListApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/ListApplication.java deleted file mode 100644 index 92711e0dfdc..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/ListApplication.java +++ /dev/null @@ -1,352 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static spark.Spark.post; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.Constants; -import ddf.catalog.content.data.impl.ContentItemImpl; -import ddf.catalog.content.operation.CreateStorageRequest; -import ddf.catalog.content.operation.impl.CreateStorageRequestImpl; -import ddf.catalog.data.Metacard; -import ddf.catalog.operation.CreateResponse; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.mime.MimeTypeMapper; -import ddf.mime.MimeTypeResolutionException; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; -import java.util.stream.Stream; -import javax.activation.MimeType; -import javax.activation.MimeTypeParseException; -import javax.servlet.MultipartConfigElement; -import javax.servlet.http.Part; -import javax.ws.rs.InternalServerErrorException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response.Status; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.io.FilenameUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.codice.ddf.attachment.AttachmentInfo; -import org.codice.ddf.catalog.ui.splitter.Splitter; -import org.codice.ddf.catalog.ui.splitter.SplitterLocator; -import org.codice.ddf.catalog.ui.splitter.StopSplitterExecutionException; -import org.codice.ddf.catalog.ui.splitter.StorableResource; -import org.codice.ddf.catalog.ui.splitter.impl.StorableResourceImpl; -import org.codice.ddf.platform.util.TemporaryFileBackedOutputStream; -import org.codice.ddf.platform.util.uuidgenerator.UuidGenerator; -import org.codice.ddf.rest.api.CatalogService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.Response; -import spark.servlet.SparkApplication; - -public class ListApplication implements SparkApplication { - - private static final Logger LOGGER = LoggerFactory.getLogger(ListApplication.class); - - private static final Logger INGEST_LOGGER = LoggerFactory.getLogger(Constants.INGEST_LOGGER_NAME); - - private static final String LIST_TYPE_HEADER = "List-Type"; - - private final MimeTypeMapper mimeTypeMapper; - - private final CatalogFramework catalogFramework; - - private final UuidGenerator uuidGenerator; - - private final SplitterLocator splitterLocator; - - private CatalogService catalogService; - - public ListApplication( - MimeTypeMapper mimeTypeMapper, - CatalogFramework catalogFramework, - UuidGenerator uuidGenerator, - SplitterLocator splitterLocator, - CatalogService catalogService) { - this.mimeTypeMapper = mimeTypeMapper; - this.catalogFramework = catalogFramework; - this.uuidGenerator = uuidGenerator; - this.splitterLocator = splitterLocator; - this.catalogService = catalogService; - } - - @Override - public void init() { - post( - "/list/import", - (request, response) -> { - MultipartConfigElement multipartConfigElement = new MultipartConfigElement(""); - request.raw().setAttribute("org.eclipse.jetty.multipartConfig", multipartConfigElement); - - String listType = request.headers(LIST_TYPE_HEADER); - - if (StringUtils.isBlank(listType)) { - String exceptionMessage = String.format("The header %s must be set.", LIST_TYPE_HEADER); - LOGGER.info(exceptionMessage); - createBadRequestResponse(exceptionMessage, response); - return null; - } - - List parts = new ArrayList<>(request.raw().getParts()); - - Map.Entry attachmentInfo = - catalogService.parseParts(parts, null); - - if (attachmentInfo == null) { - String exceptionMessage = "Unable to parse the attachments."; - LOGGER.debug(exceptionMessage); - createBadRequestResponse(exceptionMessage, response); - return null; - } - - try (TemporaryFileBackedOutputStream temporaryFileBackedOutputStream = - new TemporaryFileBackedOutputStream()) { - - IOUtils.copy(attachmentInfo.getKey().getStream(), temporaryFileBackedOutputStream); - - for (Splitter splitter : lookupSplitters(attachmentInfo.getKey().getContentType())) { - try { - if (attemptToSplitAndStore( - response, listType, attachmentInfo, temporaryFileBackedOutputStream, splitter)) - break; - } catch (StopSplitterExecutionException e) { - LOGGER.debug("Failed to split file.", e); - createBadRequestResponse( - "Attached files do not contain the correct mimetypes", response); - return null; - } - } - } - - IOUtils.closeQuietly(attachmentInfo.getKey().getStream()); - - return ""; - }); - } - - private boolean attemptToSplitAndStore( - Response response, - String listType, - Map.Entry attachmentInfo, - TemporaryFileBackedOutputStream temporaryFileBackedOutputStream, - Splitter splitter) - throws IOException, StopSplitterExecutionException { - List ids = new LinkedList<>(); - List errorMessages = new LinkedList<>(); - - boolean isSplitSuccessful = false; - - try (InputStream temporaryInputStream = - temporaryFileBackedOutputStream.asByteSource().openStream()) { - - AttachmentInfo temporaryAttachmentInfo = - new AttachmentInfoImpl( - temporaryInputStream, - attachmentInfo.getKey().getFilename(), - attachmentInfo.getKey().getContentType()); - - try (Stream stream = - createStream(temporaryAttachmentInfo, splitter, listType)) { - isSplitSuccessful = true; - stream - .sequential() - .map(storableResource -> appendMessageIfError(errorMessages, storableResource)) - .filter(storableResource -> !storableResource.isError()) - .forEach( - storableResource -> - storeAndClose( - ids::add, errorMessages::add, storableResource, attachmentInfo.getValue())); - } catch (IOException e) { - LOGGER.debug("Failed to split the incoming data. Trying the next splitter.", e); - } - - if (isSplitSuccessful) { - /** TODO: DDF-3800 - Display these error messages in the UI. */ - errorMessages.forEach(s -> LOGGER.debug("Unable to ingest split item: {}", s)); - - response.header("Added-IDs", String.join(",", ids)); - return true; - } - } - return false; - } - - private void storeAndClose( - Consumer idConsumer, - Consumer errorMessageConsumer, - StorableResource storableResource, - Metacard metacard) { - - try { - store(getAttachmentInfo(storableResource), idConsumer, errorMessageConsumer, metacard); - } catch (IOException e) { - LOGGER.debug("Unable to create AttachmentInfo: ", e); - } finally { - try { - storableResource.close(); - } catch (Exception e) { - LOGGER.trace("Unable to close resource. Will continue.", e); - } - } - } - - private Stream createStream( - AttachmentInfo attachmentInfo, Splitter splitter, String listType) - throws IOException, StopSplitterExecutionException { - return splitter.split( - createStorableResource(attachmentInfo), - Collections.singletonMap(LIST_TYPE_HEADER, listType)); - } - - private StorableResource createStorableResource(AttachmentInfo attachmentInfo) - throws IOException { - return new StorableResourceImpl( - attachmentInfo.getStream(), attachmentInfo.getContentType(), attachmentInfo.getFilename()); - } - - private StorableResource appendMessageIfError( - List errorMessages, StorableResource storableResource) { - if (storableResource.isError()) { - errorMessages.add(storableResource.getErrorMessage()); - } - return storableResource; - } - - private AttachmentInfo getAttachmentInfo(StorableResource storableResource) throws IOException { - return new AttachmentInfoImpl( - storableResource.getInputStream(), - storableResource.getFilename(), - storableResource - .getMimeType() - .orElse(contentTypeFromFilename(storableResource.getFilename()))); - } - - private String contentTypeFromFilename(String filename) { - String fileExtension = FilenameUtils.getExtension(filename); - String contentType = null; - try { - contentType = mimeTypeMapper.getMimeTypeForFileExtension(fileExtension); - } catch (MimeTypeResolutionException e) { - LOGGER.debug("Unable to get contentType based on filename extension {}", fileExtension); - } - LOGGER.debug("Refined contentType = {}", contentType); - return contentType; - } - - private List lookupSplitters(String mimeType) throws MimeTypeParseException { - List splitters = splitterLocator.find(new MimeType(mimeType)); - if (CollectionUtils.isEmpty(splitters)) { - LOGGER.debug("Unable to find a splitter for mime-type {}", mimeType); - } - return splitters; - } - - private void store( - AttachmentInfo createInfo, - Consumer idConsumer, - Consumer errorMessageConsumer, - Metacard metacard) { - - CreateStorageRequest streamCreateRequest = - new CreateStorageRequestImpl( - Collections.singletonList( - new IncomingContentItem( - uuidGenerator, - createInfo.getStream(), - createInfo.getContentType(), - createInfo.getFilename(), - metacard)), - null); - try { - CreateResponse createResponse = catalogFramework.create(streamCreateRequest); - - createResponse.getCreatedMetacards().stream().map(Metacard::getId).forEach(idConsumer); - - } catch (IngestException e) { - String errorMessage = "Error while storing entry in catalog."; - LOGGER.info(errorMessage, e); - INGEST_LOGGER.warn(errorMessage, e); - errorMessageConsumer.accept(errorMessage); - } catch (SourceUnavailableException e) { - String exceptionMessage = "Cannot create catalog entry because source is unavailable."; - LOGGER.info(exceptionMessage, e); - INGEST_LOGGER.warn(exceptionMessage, e); - throw new InternalServerErrorException(exceptionMessage); - } - } - - private void createBadRequestResponse(String entityMessage, Response response) { - response.status(Status.BAD_REQUEST.getStatusCode()); - response.body("

" + entityMessage + "
"); - response.type(MediaType.TEXT_HTML); - } - - protected static class IncomingContentItem extends ContentItemImpl { - - private InputStream inputStream; - - private IncomingContentItem( - UuidGenerator uuidGenerator, - InputStream inputStream, - String mimeTypeRawData, - String filename, - Metacard metacard) { - super(uuidGenerator.generateUuid(), null, mimeTypeRawData, filename, 0L, metacard); - this.inputStream = inputStream; - } - - @Override - public InputStream getInputStream() { - return inputStream; - } - } - - private static class AttachmentInfoImpl implements AttachmentInfo { - - private InputStream inputStream; - private String filename; - private String contentType; - - AttachmentInfoImpl(InputStream inputStream, String filename, String contentType) { - this.inputStream = inputStream; - this.filename = filename; - this.contentType = contentType; - } - - @Override - public InputStream getStream() { - return inputStream; - } - - @Override - public String getFilename() { - return filename; - } - - @Override - public String getContentType() { - return contentType; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/MetacardApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/MetacardApplication.java deleted file mode 100644 index 5d5190a8472..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/MetacardApplication.java +++ /dev/null @@ -1,952 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static javax.ws.rs.core.MediaType.TEXT_PLAIN; -import static org.apache.commons.lang.StringUtils.isEmpty; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_TAG; -import static org.codice.gsonsupport.GsonTypeAdapters.LIST_STRING; -import static org.codice.gsonsupport.GsonTypeAdapters.MAP_STRING_TO_OBJECT_TYPE; -import static spark.Spark.after; -import static spark.Spark.delete; -import static spark.Spark.exception; -import static spark.Spark.get; -import static spark.Spark.patch; -import static spark.Spark.post; -import static spark.Spark.put; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Sets; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.reflect.TypeToken; -import ddf.catalog.CatalogFramework; -import ddf.catalog.core.versioning.MetacardVersion; -import ddf.catalog.core.versioning.impl.MetacardVersionImpl; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.AttributeType; -import ddf.catalog.data.BinaryContent; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.ResultImpl; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import ddf.catalog.operation.DeleteResponse; -import ddf.catalog.operation.UpdateResponse; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.DeleteRequestImpl; -import ddf.catalog.operation.impl.SourceResponseImpl; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.transform.QueryResponseTransformer; -import ddf.security.SubjectIdentity; -import ddf.security.SubjectOperations; -import ddf.security.audit.SecurityLogger; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.Serializable; -import java.lang.reflect.Type; -import java.time.Instant; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Function; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import javax.ws.rs.NotFoundException; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.shiro.SecurityUtils; -import org.codice.ddf.catalog.ui.config.ConfigurationApplication; -import org.codice.ddf.catalog.ui.enumeration.ExperimentalEnumerationExtractor; -import org.codice.ddf.catalog.ui.metacard.associations.Associated; -import org.codice.ddf.catalog.ui.metacard.edit.AttributeChange; -import org.codice.ddf.catalog.ui.metacard.edit.MetacardChanges; -import org.codice.ddf.catalog.ui.metacard.history.HistoryResponse; -import org.codice.ddf.catalog.ui.metacard.history.MetacardHistoryService; -import org.codice.ddf.catalog.ui.metacard.notes.NoteConstants; -import org.codice.ddf.catalog.ui.metacard.notes.NoteMetacard; -import org.codice.ddf.catalog.ui.metacard.notes.NoteUtil; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.transformer.CsvTransformImpl; -import org.codice.ddf.catalog.ui.metacard.validation.Validator; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl.AssociatedQueryMetacardsHandler; -import org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceService; -import org.codice.ddf.catalog.ui.subscription.SubscriptionsPersistentStore; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.security.Security; -import org.codice.gsonsupport.GsonTypeAdapters.DateLongFormatTypeAdapter; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.servlet.SparkApplication; - -public class MetacardApplication implements SparkApplication { - - private static final Logger LOGGER = LoggerFactory.getLogger(MetacardApplication.class); - - private static final String UPDATE_ERROR_MESSAGE = "Item is either restricted or not found."; - - private static final String ERROR_RESPONSE_TYPE = "error"; - - private static final String SUCCESS_RESPONSE_TYPE = "success"; - - private static final MetacardType SECURITY_ATTRIBUTES = new SecurityAttributes(); - - private static final Type METACARD_CHANGES_LIST_TYPE = - new TypeToken>() {}.getType(); - - private static final Type ATTRIBUTE_CHANGE_TYPE = new TypeToken() {}.getType(); - - private static final Type ASSOCIATED_EDGE_LIST_TYPE = - new TypeToken>() {}.getType(); - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .registerTypeAdapter(Date.class, new DateLongFormatTypeAdapter()) - .create(); - - private final CatalogFramework catalogFramework; - private final EndpointUtil util; - private final Validator validator; - private final WorkspaceTransformer transformer; - private final ExperimentalEnumerationExtractor enumExtractor; - private final SubscriptionsPersistentStore subscriptions; - private final List types; - private final Associated associated; - private final QueryResponseTransformer csvQueryResponseTransformer; - private final SubjectIdentity subjectIdentity; - - private final AttributeRegistry attributeRegistry; - - private final ConfigurationApplication configuration; - - private final NoteUtil noteUtil; - - private final WorkspaceService workspaceService; - - private final AssociatedQueryMetacardsHandler queryMetacardsHandler; - - private SubjectOperations subjectOperations; - - private SecurityLogger securityLogger; - - private MetacardHistoryService metacardHistoryService; - - public MetacardApplication( - CatalogFramework catalogFramework, - EndpointUtil endpointUtil, - Validator validator, - WorkspaceTransformer transformer, - ExperimentalEnumerationExtractor enumExtractor, - SubscriptionsPersistentStore subscriptions, - List types, - Associated associated, - QueryResponseTransformer csvQueryResponseTransformer, - AttributeRegistry attributeRegistry, - ConfigurationApplication configuration, - NoteUtil noteUtil, - SubjectIdentity subjectIdentity, - WorkspaceService workspaceService, - AssociatedQueryMetacardsHandler queryMetacardsHandler, - Security security, - MetacardHistoryService metacardHistoryService) { - this.catalogFramework = catalogFramework; - this.util = endpointUtil; - this.validator = validator; - this.transformer = transformer; - this.enumExtractor = enumExtractor; - this.subscriptions = subscriptions; - this.types = types; - this.associated = associated; - this.csvQueryResponseTransformer = csvQueryResponseTransformer; - this.attributeRegistry = attributeRegistry; - this.configuration = configuration; - this.noteUtil = noteUtil; - this.subjectIdentity = subjectIdentity; - this.workspaceService = workspaceService; - this.queryMetacardsHandler = queryMetacardsHandler; - this.metacardHistoryService = metacardHistoryService; - } - - private String getSubjectEmail() { - return subjectOperations.getEmailAddress(SecurityUtils.getSubject()); - } - - private String getSubjectIdentifier() { - return subjectIdentity.getUniqueIdentifier(SecurityUtils.getSubject()); - } - - @SuppressWarnings("unchecked") - @Override - public void init() { - get("/metacardtype", (req, res) -> util.getJson(util.getMetacardTypeMap())); - - get( - "/metacard/:id", - (req, res) -> { - String id = req.params(":id"); - String storeId = req.queryParams("storeId"); - return util.metacardToJson(id, storeId); - }); - - get( - "/metacard/:id/attribute/validation", - (req, res) -> { - String id = req.params(":id"); - return util.getJson(validator.getValidation(util.getMetacardById(id))); - }); - - get( - "/metacard/:id/validation", - (req, res) -> { - String id = req.params(":id"); - return util.getJson(validator.getFullValidation(util.getMetacardById(id))); - }); - get( - "/metacard/:id/:storeId/attribute/validation", - (req, res) -> { - String id = req.params(":id"); - String storeId = req.params(":storeId"); - return util.getJson(validator.getValidation(util.getMetacardById(id, storeId))); - }); - - get( - "/metacard/:id/:storeId/validation", - (req, res) -> { - String id = req.params(":id"); - String storeId = req.params(":storeId"); - return util.getJson(validator.getFullValidation(util.getMetacardById(id, storeId))); - }); - post( - "/prevalidate", - APPLICATION_JSON, - (req, res) -> { - Map stringObjectMap = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - MetacardImpl metacard = new MetacardImpl(); - stringObjectMap - .keySet() - .stream() - .map(s -> new AttributeImpl(s, (List) stringObjectMap.get(s))) - .forEach(metacard::setAttribute); - return util.getJson(validator.getValidation(metacard)); - }); - - post( - "/metacards", - APPLICATION_JSON, - (req, res) -> { - List ids = GSON.fromJson(util.safeGetBody(req), LIST_STRING); - List metacards = - util.getMetacardsWithTagById(ids, "*") - .values() - .stream() - .map(Result::getMetacard) - .collect(Collectors.toList()); - - return util.metacardsToJson(metacards); - }); - - delete( - "/metacards", - APPLICATION_JSON, - (req, res) -> { - List ids = GSON.fromJson(util.safeGetBody(req), LIST_STRING); - DeleteResponse deleteResponse = - catalogFramework.delete( - new DeleteRequestImpl(new ArrayList<>(ids), Metacard.ID, null)); - if (deleteResponse.getProcessingErrors() != null - && !deleteResponse.getProcessingErrors().isEmpty()) { - res.status(500); - return ImmutableMap.of("message", "Unable to archive metacards."); - } - - return ImmutableMap.of("message", "Successfully archived metacards."); - }, - util::getJson); - - patch( - "/metacards", - APPLICATION_JSON, - (req, res) -> { - String body = util.safeGetBody(req); - List metacardChanges = GSON.fromJson(body, METACARD_CHANGES_LIST_TYPE); - Set storeIds = - Optional.ofNullable(req.queryParams("storeId")) - .map(sourceListCSV -> sourceListCSV.split(",")) - .map(Arrays::asList) - .map(list -> list.stream().map(String::trim).collect(Collectors.toSet())) - .orElse(null); - UpdateResponse updateResponse = - patchMetacards(metacardChanges, getSubjectIdentifier(), storeIds); - if (updateResponse.getProcessingErrors() != null - && !updateResponse.getProcessingErrors().isEmpty()) { - res.status(500); - return updateResponse.getProcessingErrors(); - } - - return body; - }); - - put( - "/validate/attribute/:attribute", - TEXT_PLAIN, - (req, res) -> { - String attribute = req.params(":attribute"); - String value = util.safeGetBody(req); - return util.getJson(validator.validateAttribute(attribute, value)); - }); - - get( - "/history/:id/:storeId", - (req, res) -> { - String id = req.params(":id"); - String storeId = req.params(":storeId"); - List queryResponse = metacardHistoryService.getMetacardHistory(id, storeId); - if (queryResponse.isEmpty()) { - res.status(204); - return "[]"; - } - List response = - queryResponse - .stream() - .map(Result::getMetacard) - .map( - mc -> - new HistoryResponse( - mc.getId(), - (String) mc.getAttribute(MetacardVersion.EDITED_BY).getValue(), - (Date) mc.getAttribute(MetacardVersion.VERSIONED_ON).getValue())) - .sorted(Comparator.comparing(HistoryResponse::getVersioned)) - .collect(Collectors.toList()); - return util.getJson(response); - }); - - get( - "/history/revert/:id/:revertid/:storeId", - (req, res) -> { - String id = req.params(":id"); - String revertId = req.params(":revertid"); - String storeId = req.params(":storeId"); - Metacard versionMetacard = metacardHistoryService.revert(id, revertId, storeId); - return util.metacardToJson(MetacardVersionImpl.toMetacard(versionMetacard)); - }); - - get( - "/associations/:id", - (req, res) -> { - String id = req.params(":id"); - return util.getJson(associated.getAssociations(id)); - }); - - put( - "/associations/:id", - (req, res) -> { - String id = req.params(":id"); - String body = util.safeGetBody(req); - List edges = GSON.fromJson(body, ASSOCIATED_EDGE_LIST_TYPE); - associated.putAssociations(id, edges); - return body; - }); - - post( - "/subscribe/:id", - (req, res) -> { - String userid = getSubjectIdentifier(); - String email = getSubjectEmail(); - if (isEmpty(email)) { - throw new NotFoundException( - "Unable to subscribe to workspace, " + userid + " has no email address."); - } - String id = req.params(":id"); - subscriptions.addEmail(id, email); - return ImmutableMap.of( - "message", String.format("Successfully subscribed to id = %s.", id)); - }, - util::getJson); - - post( - "/unsubscribe/:id", - (req, res) -> { - String userid = getSubjectIdentifier(); - String email = getSubjectEmail(); - if (isEmpty(email)) { - throw new NotFoundException( - "Unable to un-subscribe from workspace, " + userid + " has no email address."); - } - String id = req.params(":id"); - if (StringUtils.isEmpty(req.body())) { - subscriptions.removeEmail(id, email); - return ImmutableMap.of( - "message", String.format("Successfully un-subscribed to id = %s.", id)); - } else { - String body = req.body(); - AttributeChange attributeChange = GSON.fromJson(body, ATTRIBUTE_CHANGE_TYPE); - subscriptions.removeEmails(id, new HashSet<>(attributeChange.getValues())); - return ImmutableMap.of( - "message", - String.format( - "Successfully un-subscribed emails %s id = %s.", - attributeChange.getValues().toString(), id)); - } - }, - util::getJson); - - get( - "/workspaces/:id", - (req, res) -> { - String id = req.params(":id"); - String email = getSubjectEmail(); - Metacard metacard = util.getMetacardById(id); - - // NOTE: the isEmpty is to guard against users with no email (such as guest). - boolean isSubscribed = - !isEmpty(email) && subscriptions.getEmails(metacard.getId()).contains(email); - - return ImmutableMap.builder() - .putAll(transformer.transform(metacard)) - .put("subscribed", isSubscribed) - .build(); - }, - util::getJson); - - get( - "/workspaces", - (req, res) -> { - String email = getSubjectEmail(); - // NOTE: the isEmpty is to guard against users with no email (such as guest). - Set ids = - isEmpty(email) ? Collections.emptySet() : subscriptions.getSubscriptions(email); - - return util.getMetacardsByTag(WorkspaceConstants.WORKSPACE_TAG) - .values() - .stream() - .map(Result::getMetacard) - .map( - metacard -> { - boolean isSubscribed = ids.contains(metacard.getId()); - try { - return ImmutableMap.builder() - .putAll(transformer.transform(metacard)) - .put("subscribed", isSubscribed) - .build(); - } catch (RuntimeException e) { - LOGGER.debug( - "Could not transform metacard. WARNING: This indicates there is invalid data in the system. Metacard title: '{}', id:'{}'", - metacard.getTitle(), - metacard.getId(), - e); - } - return null; - }) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - }, - util::getJson); - - post( - "/workspaces", - APPLICATION_JSON, - (req, res) -> { - Map incoming = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - - List queries = - ((List>) - incoming.getOrDefault( - WorkspaceConstants.WORKSPACE_QUERIES, Collections.emptyList())) - .stream() - .map(this::jsonToQueryMetacard) - .collect(Collectors.toList()); - - queryMetacardsHandler.create(Collections.emptyList(), queries); - - Metacard saved = saveMetacard(transformer.transform(incoming)); - Map response = transformer.transform(saved); - - res.status(201); - return util.getJson(response); - }); - - put( - "/workspaces/:id", - APPLICATION_JSON, - (req, res) -> { - String id = req.params(":id"); - - WorkspaceMetacardImpl existingWorkspace = workspaceService.getWorkspaceMetacard(id); - List existingQueryIds = existingWorkspace.getQueries(); - - Map updatedWorkspace = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - - List updatedQueryMetacards = - ((List>) - updatedWorkspace.getOrDefault( - WorkspaceConstants.WORKSPACE_QUERIES, Collections.emptyList())) - .stream() - .map(this::jsonToQueryMetacard) - .collect(Collectors.toList()); - - List updatedQueryIds = - updatedQueryMetacards.stream().map(Metacard::getId).collect(Collectors.toList()); - - List existingQueryMetacards = - workspaceService.getQueryMetacards(existingWorkspace); - - queryMetacardsHandler.create(existingQueryIds, updatedQueryMetacards); - queryMetacardsHandler.delete(existingQueryIds, updatedQueryIds); - queryMetacardsHandler.update( - existingQueryIds, existingQueryMetacards, updatedQueryMetacards); - - List> queryIdModel = - updatedQueryIds - .stream() - .map(queryId -> ImmutableMap.of("id", queryId)) - .collect(Collectors.toList()); - - updatedWorkspace.put("queries", queryIdModel); - Metacard metacard = transformer.transform(updatedWorkspace); - metacard.setAttribute(new AttributeImpl(Core.ID, id)); - Metacard updated = updateMetacard(id, metacard); - - return transformer.transform(updated); - }, - util::getJson); - - delete( - "/workspaces/:id", - APPLICATION_JSON, - (req, res) -> { - String id = req.params(":id"); - WorkspaceMetacardImpl workspace = workspaceService.getWorkspaceMetacard(id); - - String[] queryIds = workspace.getQueries().toArray(new String[0]); - - if (queryIds.length > 0) { - catalogFramework.delete(new DeleteRequestImpl(queryIds)); - } - - catalogFramework.delete(new DeleteRequestImpl(id)); - - subscriptions.removeSubscriptions(id); - return ImmutableMap.of("message", "Successfully deleted."); - }, - util::getJson); - - get( - "/workspaces/:id/queries", - (req, res) -> { - String workspaceId = req.params(":id"); - WorkspaceMetacardImpl workspace = workspaceService.getWorkspaceMetacard(workspaceId); - - List queryIds = workspace.getQueries(); - - return util.getMetacardsWithTagById(queryIds, QUERY_TAG) - .values() - .stream() - .map(Result::getMetacard) - .map(transformer::transform) - .collect(Collectors.toList()); - }, - util::getJson); - - get( - "/enumerations/deprecated/:type", - APPLICATION_JSON, - (req, res) -> util.getJson(enumExtractor.getDeprecatedEnumerations(req.params(":type")))); - - get( - "/enumerations/metacardtype/:type", - APPLICATION_JSON, - (req, res) -> util.getJson(enumExtractor.getEnumerations(req.params(":type")))); - - get( - "/enumerations/attribute/:attribute", - APPLICATION_JSON, - (req, res) -> - util.getJson(enumExtractor.getAttributeEnumerations(req.params(":attribute")))); - - get( - "/localcatalogid", - (req, res) -> - String.format("{\"%s\":\"%s\"}", "local-catalog-id", catalogFramework.getId())); - - post( - "/transform/csv", - APPLICATION_JSON, - (req, res) -> { - String body = util.safeGetBody(req); - CsvTransformImpl queryTransform = GSON.fromJson(body, CsvTransformImpl.class); - Map transformMap = GSON.fromJson(body, MAP_STRING_TO_OBJECT_TYPE); - queryTransform.setMetacards((List>) transformMap.get("metacards")); - - List metacards = - queryTransform - .getTransformedMetacards(types, attributeRegistry) - .stream() - .map(ResultImpl::new) - .collect(Collectors.toList()); - - Set matchedHiddenFields = Collections.emptySet(); - if (queryTransform.isApplyGlobalHidden()) { - matchedHiddenFields = getHiddenFields(metacards); - } - - SourceResponseImpl response = - new SourceResponseImpl(null, metacards, Long.valueOf(metacards.size())); - - Map arguments = - ImmutableMap.builder() - .put( - "hiddenFields", - new HashSet<>( - Sets.union(matchedHiddenFields, queryTransform.getHiddenFields()))) - .put("columnOrder", new ArrayList<>(queryTransform.getColumnOrder())) - .put("aliases", new HashMap<>(queryTransform.getColumnAliasMap())) - .build(); - - BinaryContent content = csvQueryResponseTransformer.transform(response, arguments); - - // Respond with content - res.type("text/csv"); - String attachment = - String.format("attachment;filename=export-%s.csv", Instant.now().toString()); - res.header("Content-Disposition", attachment); - - try (OutputStream servletOutputStream = res.raw().getOutputStream(); - InputStream resultStream = content.getInputStream()) { - IOUtils.copy(resultStream, servletOutputStream); - } - return ""; - }); - - post( - "/annotations", - (req, res) -> { - Map incoming = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - String workspaceId = incoming.get("workspace").toString(); - String queryId = incoming.get("parent").toString(); - String annotation = incoming.get("note").toString(); - String user = getSubjectIdentifier(); - if (user == null) { - res.status(401); - return util.getResponseWrapper( - ERROR_RESPONSE_TYPE, - "You are not authorized to create notes! A user email is required. " - + "Please ensure you are logged in and/or have a valid email registered in the system."); - } - if (StringUtils.isBlank(annotation)) { - res.status(400); - return util.getResponseWrapper(ERROR_RESPONSE_TYPE, "No annotation!"); - } - NoteMetacard noteMetacard = new NoteMetacard(queryId, user, annotation); - - Metacard workspaceMetacard = util.findWorkspace(workspaceId); - - if (workspaceMetacard == null) { - res.status(404); - return util.getResponseWrapper( - ERROR_RESPONSE_TYPE, "Cannot find the workspace metacard!"); - } - - util.copyAttributes(workspaceMetacard, SECURITY_ATTRIBUTES, noteMetacard); - - Metacard note = saveMetacard(noteMetacard); - - securityLogger.auditWarn( - "Attaching an annotation to a resource: resource={} annotation={}", - SecurityUtils.getSubject(), - workspaceId, - noteMetacard.getId()); - - Map responseNote = noteUtil.getResponseNote(note); - if (responseNote == null) { - res.status(500); - return util.getResponseWrapper( - ERROR_RESPONSE_TYPE, "Cannot serialize note metacard to json!"); - } - return util.getResponseWrapper(SUCCESS_RESPONSE_TYPE, util.getJson(responseNote)); - }); - - get( - "/annotations/:queryid", - (req, res) -> { - String queryId = req.params(":queryid"); - - List retrievedMetacards = - noteUtil.getAssociatedMetacardsByTwoAttributes( - NoteConstants.PARENT_ID, Core.METACARD_TAGS, queryId, "note"); - ArrayList getResponse = new ArrayList<>(); - retrievedMetacards.sort(Comparator.comparing(Metacard::getCreatedDate)); - for (Metacard metacard : retrievedMetacards) { - Map responseNote = noteUtil.getResponseNote(metacard); - if (responseNote != null) { - getResponse.add(util.getJson(responseNote)); - } - } - return util.getResponseWrapper(SUCCESS_RESPONSE_TYPE, getResponse.toString()); - }); - - put( - "/annotations/:id", - APPLICATION_JSON, - (req, res) -> { - Map incoming = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - String noteMetacardId = req.params(":id"); - String note = incoming.get("note").toString(); - Metacard metacard; - try { - metacard = util.getMetacardById(noteMetacardId); - } catch (NotFoundException e) { - LOGGER.debug("Note metacard was not found for updating. id={}", noteMetacardId); - res.status(404); - return util.getResponseWrapper(ERROR_RESPONSE_TYPE, "Note metacard was not found!"); - } - - Attribute attribute = metacard.getAttribute(Core.METACARD_OWNER); - if (attribute != null - && attribute.getValue() != null - && !attribute.getValue().equals(getSubjectIdentifier())) { - res.status(401); - return util.getResponseWrapper( - ERROR_RESPONSE_TYPE, "Owner of note metacard is invalid!"); - } - metacard.setAttribute(new AttributeImpl(NoteConstants.COMMENT, note)); - metacard = updateMetacard(metacard.getId(), metacard); - Map responseNote = noteUtil.getResponseNote(metacard); - return util.getResponseWrapper(SUCCESS_RESPONSE_TYPE, util.getJson(responseNote)); - }); - - delete( - "/annotations/:id", - (req, res) -> { - String noteToDeleteMetacardId = req.params(":id"); - Metacard metacard; - try { - metacard = util.getMetacardById(noteToDeleteMetacardId); - } catch (NotFoundException e) { - LOGGER.debug("Note metacard was not found for deleting. id={}", noteToDeleteMetacardId); - res.status(404); - return util.getResponseWrapper(ERROR_RESPONSE_TYPE, "Note metacard was not found!"); - } - Attribute attribute = metacard.getAttribute(Core.METACARD_OWNER); - if (attribute != null - && attribute.getValue() != null - && !attribute.getValue().equals(getSubjectIdentifier())) { - res.status(401); - return util.getResponseWrapper( - ERROR_RESPONSE_TYPE, "Owner of note metacard is invalid!"); - } - DeleteResponse deleteResponse = - catalogFramework.delete(new DeleteRequestImpl(noteToDeleteMetacardId)); - if (deleteResponse.getDeletedMetacards() != null - && !deleteResponse.getDeletedMetacards().isEmpty()) { - Map responseNote = - noteUtil.getResponseNote(deleteResponse.getDeletedMetacards().get(0)); - return util.getResponseWrapper(SUCCESS_RESPONSE_TYPE, util.getJson(responseNote)); - } - res.status(500); - return util.getResponseWrapper(ERROR_RESPONSE_TYPE, "Could not delete note metacard!"); - }); - - after((req, res) -> res.type(APPLICATION_JSON)); - - exception( - IngestException.class, - (ex, req, res) -> { - LOGGER.debug("Failed to ingest metacard", ex); - res.status(404); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(util.getJson(ImmutableMap.of("message", UPDATE_ERROR_MESSAGE))); - }); - - exception( - NotFoundException.class, - (ex, req, res) -> { - LOGGER.debug("Failed to find metacard.", ex); - res.status(404); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(util.getJson(ImmutableMap.of("message", ex.getMessage()))); - }); - - exception( - NumberFormatException.class, - (ex, req, res) -> { - res.status(400); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(util.getJson(ImmutableMap.of("message", "Invalid values for numbers"))); - }); - - exception(EntityTooLargeException.class, util::handleEntityTooLargeException); - - exception(IOException.class, util::handleIOException); - - exception(RuntimeException.class, util::handleRuntimeException); - } - - private Set getHiddenFields(List metacards) { - Set matchedHiddenFields; - List hiddenFieldPatterns = - configuration - .getHiddenAttributes() - .stream() - .map(Pattern::compile) - .collect(Collectors.toList()); - matchedHiddenFields = - metacards - .stream() - .map(Result::getMetacard) - .map(Metacard::getMetacardType) - .map(MetacardType::getAttributeDescriptors) - .flatMap(Collection::stream) - .map(AttributeDescriptor::getName) - .filter( - attr -> - hiddenFieldPatterns - .stream() - .map(Pattern::asPredicate) - .anyMatch(pattern -> pattern.test(attr))) - .collect(Collectors.toSet()); - return matchedHiddenFields; - } - - private AttributeDescriptor getDescriptor(Metacard target, String attribute) { - return Optional.ofNullable(target) - .map(Metacard::getMetacardType) - .map(mt -> mt.getAttributeDescriptor(attribute)) - .orElseThrow( - () -> new RuntimeException("Could not find attribute descriptor for: " + attribute)); - } - - protected UpdateResponse patchMetacards( - List metacardChanges, String subjectIdentifer, Set storeIds) - throws SourceUnavailableException, IngestException { - Set changedIds = - metacardChanges.stream().flatMap(mc -> mc.getIds().stream()).collect(Collectors.toSet()); - - Map results = - util.getMetacardsWithTagByAttributes(Core.ID, changedIds, "*", storeIds); - - for (MetacardChanges changeset : metacardChanges) { - for (AttributeChange attributeChange : changeset.getAttributes()) { - for (String id : changeset.getIds()) { - List values = attributeChange.getValues(); - Result result = results.get(id); - if (result == null) { - LOGGER.debug( - "Metacard {} either does not exist or user {} does not have permission to see it", - id, - subjectIdentifer); - throw new NotFoundException("Result was not found"); - } - Metacard resultMetacard = result.getMetacard(); - - Function mapFunc = Function.identity(); - if (isChangeTypeDate(attributeChange, resultMetacard)) { - mapFunc = mapFunc.andThen(serializable -> Date.from(util.parseDate(serializable))); - } - - resultMetacard.setAttribute( - new AttributeImpl( - attributeChange.getAttribute(), - values - .stream() - .filter(Objects::nonNull) - .map(mapFunc) - .collect(Collectors.toList()))); - } - } - } - - List changedMetacards = - results.values().stream().map(Result::getMetacard).collect(Collectors.toList()); - return catalogFramework.update( - new UpdateRequestImpl( - changedMetacards - .stream() - .map( - metacard -> - new AbstractMap.SimpleEntry( - metacard.getId(), metacard)) - .collect(Collectors.toList()), - Core.ID, - new HashMap<>(), - storeIds)); - } - - private boolean isChangeTypeDate(AttributeChange attributeChange, Metacard result) { - return getDescriptor(result, attributeChange.getAttribute()) - .getType() - .getAttributeFormat() - .equals(AttributeType.AttributeFormat.DATE); - } - - private Metacard updateMetacard(String id, Metacard metacard) - throws SourceUnavailableException, IngestException { - return catalogFramework - .update(new UpdateRequestImpl(id, metacard)) - .getUpdatedMetacards() - .get(0) - .getNewMetacard(); - } - - private Metacard saveMetacard(Metacard metacard) - throws IngestException, SourceUnavailableException { - return catalogFramework.create(new CreateRequestImpl(metacard)).getCreatedMetacards().get(0); - } - - private QueryMetacardImpl jsonToQueryMetacard(final Map queryJson) { - final QueryMetacardImpl queryMetacard = new QueryMetacardImpl(); - transformer.transformIntoMetacard(queryJson, queryMetacard); - return queryMetacard; - } - - public void setSubjectOperations(SubjectOperations subjectOperations) { - this.subjectOperations = subjectOperations; - } - - public void setSecurityLogger(SecurityLogger securityLogger) { - this.securityLogger = securityLogger; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/QueryMetacardApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/QueryMetacardApplication.java deleted file mode 100644 index 671983ac137..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/QueryMetacardApplication.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static spark.Spark.delete; -import static spark.Spark.get; -import static spark.Spark.post; -import static spark.Spark.put; - -import com.google.common.annotations.VisibleForTesting; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.CreateRequest; -import ddf.catalog.operation.CreateResponse; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.operation.UpdateResponse; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.DeleteRequestImpl; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.util.impl.ResultIterable; -import ddf.security.SubjectIdentity; -import java.util.Objects; -import java.util.stream.Collectors; -import org.apache.shiro.SecurityUtils; -import org.codice.ddf.catalog.ui.metacard.query.data.model.QueryBasic; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import spark.servlet.SparkApplication; - -public class QueryMetacardApplication implements SparkApplication { - - private static final Gson GSON = - new GsonBuilder().disableHtmlEscaping().serializeNulls().create(); - - private final CatalogFramework catalogFramework; - - private final EndpointUtil endpointUtil; - - private final FilterBuilder filterBuilder; - - private final SubjectIdentity subjectIdentity; - - public QueryMetacardApplication( - CatalogFramework catalogFramework, - EndpointUtil endpointUtil, - FilterBuilder filterBuilder, - SubjectIdentity subjectIdentity) { - this.catalogFramework = catalogFramework; - this.endpointUtil = endpointUtil; - this.filterBuilder = filterBuilder; - this.subjectIdentity = subjectIdentity; - } - - @Override - public void init() { - /* - * The start query parameter is used to specify the starting index for a collection of results. - * This value must be greater than or equal to 1. - * - * The count query parameter is used to specify the size of your page of results. This value - * must be greater than or equal to 0. - */ - get( - "/queries", - (req, res) -> { - RetreiveAllQueryRequests retreiveAllQueryRequests = - new RetreiveAllQueryRequests(req, filterBuilder); - - return ResultIterable.resultIterable( - catalogFramework, - retreiveAllQueryRequests.getQueryRequest(), - retreiveAllQueryRequests.getCount()) - .stream() - .filter(Objects::nonNull) - .map(Result::getMetacard) - .filter(Objects::nonNull) - .map(QueryBasic::new) - .collect(Collectors.toList()); - }, - GSON::toJson); - - get( - "/queries/:id", - (req, res) -> { - String id = req.params("id"); - - Metacard metacard = endpointUtil.getMetacardById(id); - QueryBasic query = new QueryBasic(metacard); - - return GSON.toJson(query); - }); - - post( - "/queries", - (req, res) -> { - String body = endpointUtil.safeGetBody(req); - QueryBasic query = GSON.fromJson(body, QueryBasic.class); - query.setOwnerAndAccessIndividuals(getSubjectIdentifier()); - - CreateRequest createRequest = new CreateRequestImpl(query.getMetacard()); - CreateResponse createResponse = catalogFramework.create(createRequest); - - Metacard metacard = createResponse.getCreatedMetacards().get(0); - QueryBasic created = new QueryBasic(metacard); - - res.status(201); - return GSON.toJson(created); - }); - - put( - "/queries/:id", - (req, res) -> { - String id = req.params("id"); - String body = endpointUtil.safeGetBody(req); - QueryBasic query = GSON.fromJson(body, QueryBasic.class); - - UpdateRequest request = new UpdateRequestImpl(id, query.getMetacard()); - UpdateResponse response = catalogFramework.update(request); - - Metacard metacard = response.getUpdatedMetacards().get(0).getNewMetacard(); - QueryBasic updated = new QueryBasic(metacard); - - return GSON.toJson(updated); - }); - - delete( - "/queries/:id", - (req, res) -> { - String id = req.params("id"); - - catalogFramework.delete(new DeleteRequestImpl(id)); - - res.status(204); - return null; - }, - GSON::toJson); - } - - @VisibleForTesting - String getSubjectIdentifier() { - return subjectIdentity.getUniqueIdentifier(SecurityUtils.getSubject()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/RetreiveAllQueryRequests.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/RetreiveAllQueryRequests.java deleted file mode 100644 index 1be7156224f..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/RetreiveAllQueryRequests.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_TAG; - -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.types.Core; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.impl.SortByImpl; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardTypeImpl; -import org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes; -import org.opengis.filter.Filter; -import org.opengis.filter.sort.SortOrder; -import spark.Request; - -public class RetreiveAllQueryRequests { - private static final int MIN_START = 1; - - private static final int MAX_PAGE_SIZE = 100; - - private static final String START = "start"; - - private static final String COUNT = "count"; - - private static final String ATTR = "attr"; - - private static final String TEXT = "text"; - - private static final String ASCENDING = "asc"; - - private static final String SORT_BY = "sort_by"; - - private final FilterBuilder filterBuilder; - - private static final Set SEARCHABLE_ATTRIBUTES = - ImmutableSet.of( - Core.TITLE, Core.METACARD_OWNER, Core.DESCRIPTION, QueryAttributes.QUERY_SOURCES); - - private final Request req; - - private QueryRequest queryRequest; - - private int count; - - public RetreiveAllQueryRequests(Request req, FilterBuilder filterBuilder) { - this.req = req; - this.filterBuilder = filterBuilder; - initializeQueryRequest(); - } - - private void initializeQueryRequest() { - int start = getOrDefaultParam(req, START, MIN_START); - this.count = getOrDefaultParam(req, COUNT, MAX_PAGE_SIZE); - - SortOrder sort = getSortOrder(req); - String attr = - getOrDefaultParam(req, ATTR, Core.MODIFIED, QueryMetacardTypeImpl.getQueryAttributeNames()); - String text = getOrDefaultParam(req, TEXT, null, Collections.emptySet()); - - Filter filter; - - if (StringUtils.isNotBlank(text)) { - filter = getFuzzyQueryMetacardAttributeFilter(text); - } else { - filter = getQueryMetacardFilter(); - } - - queryRequest = - new QueryRequestImpl( - new QueryImpl( - filter, - start, - count, - new SortByImpl(attr, sort), - false, - TimeUnit.SECONDS.toMillis(10)), - false); - } - - public int getCount() { - return count; - } - - public QueryRequest getQueryRequest() { - return queryRequest; - } - - private static String getOrDefaultParam( - Request request, String key, String defaultValue, Set validValues) { - String value = request.queryParams(key); - - if (value != null && (validValues.isEmpty() || validValues.contains(value.toLowerCase()))) { - return value; - } - - return defaultValue; - } - - private static int getOrDefaultParam(Request request, String key, int defaultValue) { - String value = request.queryParams(key); - - if (value != null) { - return Integer.parseInt(value); - } - - return defaultValue; - } - - private static SortOrder getSortOrder(Request request) { - String value = request.queryParams(SORT_BY); - - if (ASCENDING.equals(value)) { - return SortOrder.ASCENDING; - } else { - return SortOrder.DESCENDING; - } - } - - private Filter getFuzzyQueryMetacardAttributeFilter(String value) { - List attributeFilters = - SEARCHABLE_ATTRIBUTES - .stream() - .map(name -> getFuzzyAttributeFilter(name, value)) - .collect(Collectors.toList()); - return filterBuilder.allOf(getQueryMetacardFilter(), filterBuilder.anyOf(attributeFilters)); - } - - private Filter getQueryMetacardFilter() { - return filterBuilder.attribute(Core.METACARD_TAGS).is().equalTo().text(QUERY_TAG); - } - - private Filter getFuzzyAttributeFilter(String attribute, String value) { - return filterBuilder.attribute(attribute).is().like().fuzzyText(value); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/associations/Associated.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/associations/Associated.java deleted file mode 100644 index b097be0fd63..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/associations/Associated.java +++ /dev/null @@ -1,343 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.associations; - -import static ddf.catalog.util.impl.ResultIterable.resultIterable; - -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; -import ddf.catalog.CatalogFramework; -import ddf.catalog.core.versioning.DeletedMetacard; -import ddf.catalog.core.versioning.MetacardVersion; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.UiAttributeImpl; -import ddf.catalog.federation.FederationException; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.catalog.util.impl.ResultIterable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.opengis.filter.Filter; -import org.opengis.filter.sort.SortBy; - -public class Associated { - - private static final Set ASSOCIATION_TYPES = - ImmutableSet.of(Metacard.DERIVED, Metacard.RELATED); - - private final EndpointUtil util; - - private final CatalogFramework catalogFramework; - - private static int pageSize = 250; - - public Associated(EndpointUtil util, CatalogFramework catalogFramework) { - this.util = util; - this.catalogFramework = catalogFramework; - } - - public Collection getAssociations(String metacardId) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - Map metacardMap = query(withNonrestrictedTags(forRootAndParents(metacardId))); - if (metacardMap.isEmpty()) { - return Collections.emptyList(); - } - Metacard root = metacardMap.get(metacardId); - Collection parents = - metacardMap - .values() - .stream() - .filter(m -> !m.getId().equals(metacardId)) - .collect(Collectors.toList()); - - Map childMetacardMap = - query(withNonrestrictedTags(forChildAssociations(root))); - - Collection parentEdges = createParentEdges(parents, root); - Collection childrenEdges = createChildEdges(childMetacardMap.values(), root); - - Collection edges = - Stream.of(parentEdges, childrenEdges) - .flatMap(Collection::stream) - .collect(Collectors.toList()); - return edges; - } - - public void putAssociations(String id, Collection edges) - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - IngestException { - Collection oldEdges = getAssociations(id); - - List ids = - Stream.concat(oldEdges.stream(), edges.stream()) - .flatMap(e -> Stream.of(e.child, e.parent)) - .filter(Objects::nonNull) - .map(m -> m.get(Metacard.ID)) - .filter(Objects::nonNull) - .map(Object::toString) - .distinct() - .collect(Collectors.toList()); - - Map metacards = - util.getMetacardsWithTagById(ids, getNonrestrictedTagsFilter()) - .entrySet() - .stream() - .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().getMetacard())); - - Map changedMetacards = new HashMap<>(); - Set oldEdgeSet = new HashSet<>(oldEdges); - Set newEdgeSet = new HashSet<>(edges); - - Set oldDiff = Sets.difference(oldEdgeSet, newEdgeSet); - Set newDiff = Sets.difference(newEdgeSet, oldEdgeSet); - - for (Edge edge : oldDiff) { - removeEdge(edge, metacards, changedMetacards); - } - for (Edge edge : newDiff) { - addEdge(edge, metacards, changedMetacards); - } - - if (changedMetacards.isEmpty()) { - return; - } - - catalogFramework.update( - new UpdateRequestImpl( - changedMetacards.keySet().toArray(new String[0]), - new ArrayList<>(changedMetacards.values()))); - } - - private void removeEdge( - Edge edge, - Map metacards, - /*Mutable*/ Map changedMetacards) { - String id = edge.parent.get(Metacard.ID).toString(); - Metacard target = changedMetacards.getOrDefault(id, metacards.get(id)); - ArrayList values = - Optional.of(target) - .map(m -> m.getAttribute(edge.relation)) - .map(Attribute::getValues) - .map(util::getStringList) - .orElseGet(ArrayList::new); - values.remove(edge.child.get(Metacard.ID).toString()); - target.setAttribute(UiAttributeImpl.fromMultipleValues(edge.relation, values)); - changedMetacards.put(id, target); - } - - private void addEdge( - Edge edge, Map metacards, Map changedMetacards) { - String id = edge.parent.get(Metacard.ID).toString(); - Metacard target = changedMetacards.getOrDefault(id, metacards.get(id)); - ArrayList values = - Optional.of(target) - .map(m -> m.getAttribute(edge.relation)) - .map(Attribute::getValues) - .map(util::getStringList) - .orElseGet(ArrayList::new); - values.add(edge.child.get(Metacard.ID).toString()); - target.setAttribute(UiAttributeImpl.fromMultipleValues(edge.relation, values)); - changedMetacards.put(id, target); - } - - private Collection createChildEdges(Collection children, Metacard root) { - List edges = new ArrayList<>(); - for (Metacard child : children) { - List relations = getRelationsToChild(root, child); - edges.addAll( - relations - .stream() - .map(relation -> new Edge(root, child, relation)) - .collect(Collectors.toList())); - } - return edges; - } - - private Collection createParentEdges(Collection parents, Metacard root) { - List edges = new ArrayList<>(); - for (Metacard parent : parents) { - List relations = getRelationsToChild(parent, root); - edges.addAll( - relations - .stream() - .map(relation -> new Edge(parent, root, relation)) - .collect(Collectors.toList())); - } - return edges; - } - - private Filter forRootAndParents(String rootId) { - Filter root = util.getFilterBuilder().attribute(Metacard.ID).is().equalTo().text(rootId); - Filter related = util.getFilterBuilder().attribute(Metacard.RELATED).is().like().text(rootId); - Filter derived = util.getFilterBuilder().attribute(Metacard.DERIVED).is().like().text(rootId); - Filter parents = util.getFilterBuilder().anyOf(related, derived); - - return util.getFilterBuilder().anyOf(root, parents); - } - - private Filter withNonrestrictedTags(Filter filter) { - if (filter == null) { - return null; - } - return util.getFilterBuilder().allOf(filter, getNonrestrictedTagsFilter()); - } - - private Filter getNonrestrictedTagsFilter() { - return util.getFilterBuilder() - .not( - util.getFilterBuilder() - .anyOf( - util.getFilterBuilder() - .attribute(Metacard.TAGS) - .is() - .like() - .text(DeletedMetacard.DELETED_TAG), - util.getFilterBuilder() - .attribute(Metacard.TAGS) - .is() - .like() - .text(MetacardVersion.VERSION_TAG))); - } - - private Filter forChildAssociations(Metacard metacard) { - Set childIds = - ASSOCIATION_TYPES - .stream() - .map(metacard::getAttribute) - .filter(Objects::nonNull) - .map(Attribute::getValues) - .filter(Objects::nonNull) - .flatMap(Collection::stream) - .filter(String.class::isInstance) - .map(String.class::cast) - .collect(Collectors.toSet()); - - if (childIds.isEmpty()) { - return null; - } - return util.getFilterBuilder() - .anyOf( - childIds - .stream() - .map(id -> util.getFilterBuilder().attribute(Metacard.ID).is().equalTo().text(id)) - .collect(Collectors.toList())); - } - - private Map query(Filter filter) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - if (filter == null) { - return Collections.emptyMap(); - } - - ResultIterable resultIterable = - resultIterable( - catalogFramework, - new QueryRequestImpl( - new QueryImpl( - filter, - 1, - pageSize, - SortBy.NATURAL_ORDER, - false, - TimeUnit.SECONDS.toMillis(30)), - false)); - return resultIterable - .stream() - .map(Result::getMetacard) - .collect(Collectors.toMap(Metacard::getId, Function.identity())); - } - - private List getRelationsToChild(Metacard parent, Metacard child) { - List relations = new ArrayList<>(); - for (String associationType : ASSOCIATION_TYPES) { - if (Optional.of(parent) - .map(m -> m.getAttribute(associationType)) - .map(Attribute::getValues) - .map(util::getStringList) - .map(l -> l.contains(child.getId())) - .orElse(false)) { - relations.add(associationType); - } - } - - return relations; - } - - public class Edge { - private Map parent; - - private Map child; - - private String relation; - - public Edge(Metacard parent, Metacard child, String relation) { - this.parent = util.getMetacardMap(parent); - this.child = util.getMetacardMap(child); - this.relation = relation; - } - - public int hashCode() { - return new HashCodeBuilder() - .append(parent.get(Metacard.ID).toString()) - .append(child.get(Metacard.ID).toString()) - .append(relation) - .build(); - } - - public boolean equals(Object o) { - if (o == null) { - return false; - } - if (o == this) { - return true; - } - if (!(o instanceof Edge)) { - return false; - } - Edge rhs = (Edge) o; - return new EqualsBuilder() - .append(parent.get(Metacard.ID).toString(), rhs.parent.get(Metacard.ID).toString()) - .append(child.get(Metacard.ID).toString(), rhs.child.get(Metacard.ID).toString()) - .append(relation, rhs.relation) - .build(); - } - - @Override - public String toString() { - return String.format( - "%s [%s]-> %s", parent.get("id").toString(), relation, child.get("id").toString()); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/edit/AttributeChange.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/edit/AttributeChange.java deleted file mode 100644 index 220a4cce0fa..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/edit/AttributeChange.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.edit; - -import java.util.List; - -public class AttributeChange { - private String attribute; - - private List values; - - public String getAttribute() { - return attribute; - } - - public void setAttribute(String attribute) { - this.attribute = attribute; - } - - public List getValues() { - return values; - } - - public void setValues(List values) { - this.values = values; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/edit/MetacardChanges.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/edit/MetacardChanges.java deleted file mode 100644 index 5bff8c5a393..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/edit/MetacardChanges.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.edit; - -import java.util.List; - -public class MetacardChanges { - private List ids; - - private List attributes; - - public List getIds() { - return ids; - } - - public void setIds(List ids) { - this.ids = ids; - } - - public List getAttributes() { - return attributes; - } - - public void setAttributes(List attributes) { - this.attributes = attributes; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/history/HistoryResponse.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/history/HistoryResponse.java deleted file mode 100644 index 4fefab31e20..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/history/HistoryResponse.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.history; - -import java.time.Instant; -import java.util.Date; - -public class HistoryResponse { - private Instant versioned; - - private String id; - - private String editedBy; - - public HistoryResponse(String historyId, String editedBy, Instant versioned) { - this.id = historyId; - this.editedBy = editedBy; - this.versioned = versioned; - } - - public HistoryResponse(String historyId, String editedBy, Date versioned) { - this(historyId, editedBy, versioned.toInstant()); - } - - public Instant getVersioned() { - return versioned; - } - - public void setVersioned(Instant versioned) { - this.versioned = versioned; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getEditedBy() { - return editedBy; - } - - public void setEditedBy(String editedBy) { - this.editedBy = editedBy; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/history/MetacardHistoryService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/history/MetacardHistoryService.java deleted file mode 100644 index 75937ceead8..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/history/MetacardHistoryService.java +++ /dev/null @@ -1,388 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.history; - -import static ddf.catalog.util.impl.ResultIterable.resultIterable; - -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.common.io.ByteSource; -import ddf.catalog.CatalogFramework; -import ddf.catalog.content.data.ContentItem; -import ddf.catalog.content.data.impl.ContentItemImpl; -import ddf.catalog.content.operation.impl.CreateStorageRequestImpl; -import ddf.catalog.content.operation.impl.UpdateStorageRequestImpl; -import ddf.catalog.core.versioning.DeletedMetacard; -import ddf.catalog.core.versioning.MetacardVersion; -import ddf.catalog.core.versioning.MetacardVersion.Action; -import ddf.catalog.core.versioning.impl.MetacardVersionImpl; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.types.Core; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.ResourceResponse; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.DeleteRequestImpl; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.operation.impl.ResourceRequestById; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.resource.ResourceNotFoundException; -import ddf.catalog.resource.ResourceNotSupportedException; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.catalog.util.impl.ResultIterable; -import ddf.security.audit.SecurityLogger; -import java.io.IOException; -import java.io.InputStream; -import java.io.Serializable; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.Instant; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.TimeZone; -import java.util.concurrent.Callable; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; -import javax.ws.rs.NotFoundException; -import org.codice.ddf.catalog.ui.metacard.internal.OperationPropertySupplier; -import org.opengis.filter.Filter; -import org.opengis.filter.sort.SortBy; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class MetacardHistoryService { - - private static final Logger LOGGER = LoggerFactory.getLogger(MetacardHistoryService.class); - - private static final String ISO_8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"; - - private static final int PAGE_SIZE = 250; - - private static final Set DELETE_ACTIONS = - ImmutableSet.of(Action.DELETED, Action.DELETED_CONTENT); - - private static final Set CONTENT_ACTIONS = - ImmutableSet.of(Action.VERSIONED_CONTENT, Action.DELETED_CONTENT); - - private final CatalogFramework catalogFramework; - - private final FilterBuilder filterBuilder; - - private OperationPropertySupplier operationPropertySupplier; - - private SecurityLogger securityLogger; - - public MetacardHistoryService(CatalogFramework catalogFramework, FilterBuilder filterBuilder) { - this.catalogFramework = catalogFramework; - this.filterBuilder = filterBuilder; - } - - public void addOperationPropertySupplier(OperationPropertySupplier operationPropertySupplier) { - this.operationPropertySupplier = operationPropertySupplier; - } - - public void removeOperationPropertySupplier(OperationPropertySupplier operationPropertySupplier) { - this.operationPropertySupplier = null; - } - - public Metacard revert(String id, String revertId, String storeId) - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - IngestException, ResourceNotFoundException, IOException, ResourceNotSupportedException { - try { - Map properties = - operationPropertySupplier == null - ? new HashMap<>() - : operationPropertySupplier.properties(OperationPropertySupplier.QUERY_TYPE); - - Metacard versionMetacard = getMetacardById(revertId, properties); - - List queryResponse = getMetacardHistory(id, storeId); - if (queryResponse.isEmpty()) { - throw new NotFoundException("Could not find metacard with id: " + id); - } - - Optional contentVersion = - queryResponse - .stream() - .map(Result::getMetacard) - .filter( - mc -> - getVersionedOnDate(mc).isAfter(getVersionedOnDate(versionMetacard)) - || getVersionedOnDate(mc).equals(getVersionedOnDate(versionMetacard))) - .filter(mc -> CONTENT_ACTIONS.contains(Action.ofMetacard(mc))) - .filter(mc -> mc.getResourceURI() != null) - .filter(mc -> ContentItem.CONTENT_SCHEME.equals(mc.getResourceURI().getScheme())) - .min( - Comparator.comparing( - mc -> parseToDate(mc.getAttribute(MetacardVersion.VERSIONED_ON).getValue()))); - - if (!contentVersion.isPresent()) { - /* no content versions, just restore metacard */ - revertMetacard(versionMetacard, id, false); - } else { - revertContentandMetacard(contentVersion.get(), versionMetacard, id); - } - - securityLogger.audit("Reverted {} to metacard {}", revertId, id); - - return versionMetacard; - } catch (UnsupportedQueryException - | SourceUnavailableException - | FederationException - | IngestException - | ResourceNotFoundException - | IOException - | ResourceNotSupportedException e) { - securityLogger.audit("Failed to revert {} to metcard {}", revertId, id, e); - throw e; - } - } - - public List getMetacardHistory(String id, String sourceId) { - Map properties = - operationPropertySupplier == null - ? new HashMap<>() - : operationPropertySupplier.properties(OperationPropertySupplier.QUERY_TYPE); - - Filter historyFilter = - filterBuilder.attribute(Metacard.TAGS).is().equalTo().text(MetacardVersion.VERSION_TAG); - Filter idFilter = - filterBuilder.attribute(MetacardVersion.VERSION_OF_ID).is().equalTo().text(id); - - Filter filter = filterBuilder.allOf(historyFilter, idFilter); - Set sources = sourceId != null ? Collections.singleton(sourceId) : null; - ResultIterable resultIterable = - resultIterable( - catalogFramework, - new QueryRequestImpl( - new QueryImpl( - filter, - 1, - PAGE_SIZE, - SortBy.NATURAL_ORDER, - false, - TimeUnit.SECONDS.toMillis(10)), - false, - sources, - properties)); - return Lists.newArrayList(resultIterable); - } - - private void revertMetacard(Metacard versionMetacard, String id, boolean alreadyCreated) - throws SourceUnavailableException, IngestException { - LOGGER.trace("Reverting metacard [{}] to version [{}]", id, versionMetacard.getId()); - Metacard revertMetacard = MetacardVersionImpl.toMetacard(versionMetacard); - Action action = - Action.fromKey((String) versionMetacard.getAttribute(MetacardVersion.ACTION).getValue()); - - if (DELETE_ACTIONS.contains(action)) { - attemptDeleteDeletedMetacard(id); - if (!alreadyCreated) { - Map properties = - operationPropertySupplier == null - ? new HashMap<>() - : operationPropertySupplier.properties(OperationPropertySupplier.CREATE_TYPE); - - catalogFramework.create( - new CreateRequestImpl(Collections.singletonList(revertMetacard), properties)); - } - } else { - tryUpdate( - 4, - () -> { - catalogFramework.update(new UpdateRequestImpl(id, revertMetacard)); - return true; - }); - } - } - - private void revertContentandMetacard(Metacard latestContent, Metacard versionMetacard, String id) - throws SourceUnavailableException, IngestException, ResourceNotFoundException, IOException, - ResourceNotSupportedException { - LOGGER.trace( - "Reverting content and metacard for metacard [{}]. \nLatest content: [{}] \nVersion metacard: [{}]", - id, - latestContent.getId(), - versionMetacard.getId()); - Map properties = new HashMap<>(); - properties.put("no-default-tags", true); - ResourceResponse latestResource = - catalogFramework.getLocalResource( - new ResourceRequestById(latestContent.getId(), properties)); - - ContentItemImpl contentItem = - new ContentItemImpl( - id, - new ByteSourceWrapper(() -> latestResource.getResource().getInputStream()), - latestResource.getResource().getMimeTypeValue(), - latestResource.getResource().getName(), - latestResource.getResource().getSize(), - MetacardVersionImpl.toMetacard(versionMetacard)); - - // Try to delete the "deleted metacard" marker first. - boolean alreadyCreated = false; - Action action = - Action.fromKey((String) versionMetacard.getAttribute(MetacardVersion.ACTION).getValue()); - if (DELETE_ACTIONS.contains(action)) { - alreadyCreated = true; - catalogFramework.create( - new CreateStorageRequestImpl( - Collections.singletonList(contentItem), id, new HashMap<>())); - } else { - // Currently we can't guarantee the metacard will exist yet because of the 1 - // second - // soft commit in solr. this busy wait loop should be fixed when alternate - // solution - // is found. - tryUpdate( - 4, - () -> { - catalogFramework.update( - new UpdateStorageRequestImpl( - Collections.singletonList(contentItem), id, new HashMap<>())); - return true; - }); - } - LOGGER.trace("Successfully reverted metacard content for [{}]", id); - revertMetacard(versionMetacard, id, alreadyCreated); - } - - private Metacard getMetacardById(String id, Map properties) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - Filter idFilter = filterBuilder.attribute(Core.ID).is().equalTo().text(id); - Filter tagsFilter = filterBuilder.attribute(Core.METACARD_TAGS).is().like().text("*"); - Filter filter = filterBuilder.allOf(idFilter, tagsFilter); - - QueryResponse queryResponse = - catalogFramework.query( - new QueryRequestImpl(new QueryImpl(filter), false, null, properties)); - - if (queryResponse.getResults().isEmpty()) { - throw new NotFoundException("Could not find metacard for id: " + id); - } - - Result result = queryResponse.getResults().get(0); - - return result.getMetacard(); - } - - private Instant parseToDate(Serializable value) { - if (value instanceof Instant) { - return ((Instant) value); - } - if (value instanceof Date) { - return ((Date) value).toInstant(); - } - SimpleDateFormat dateFormat = new SimpleDateFormat(ISO_8601_DATE_FORMAT); - dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - try { - return dateFormat.parse(value.toString()).toInstant(); - } catch (ParseException e) { - throw new IllegalArgumentException(e); - } - } - - private void attemptDeleteDeletedMetacard(String id) { - LOGGER.trace("Attemping to delete metacard [{}]", id); - Filter tags = - filterBuilder.attribute(Metacard.TAGS).is().like().text(DeletedMetacard.DELETED_TAG); - Filter deletion = - filterBuilder.attribute(DeletedMetacard.DELETION_OF_ID).is().equalTo().text(id); - Filter filter = filterBuilder.allOf(tags, deletion); - - Map properties = - operationPropertySupplier == null - ? new HashMap<>() - : operationPropertySupplier.properties(OperationPropertySupplier.QUERY_TYPE); - - QueryResponse response = null; - try { - response = - catalogFramework.query( - new QueryRequestImpl(new QueryImpl(filter), false, null, properties)); - } catch (UnsupportedQueryException | SourceUnavailableException | FederationException e) { - LOGGER.debug("Could not find the deleted metacard marker to delete", e); - } - - if (response == null || response.getResults() == null || response.getResults().size() != 1) { - LOGGER.debug("There should have been one deleted metacard marker"); - return; - } - - final DeleteRequestImpl deleteRequest = - new DeleteRequestImpl(response.getResults().get(0).getMetacard().getId()); - deleteRequest.getProperties().put("operation.query-tags", ImmutableSet.of("*")); - try { - catalogFramework.delete(deleteRequest); - } catch (IngestException | SourceUnavailableException e) { - LOGGER.debug("Could not delete the deleted metacard marker", e); - } - LOGGER.trace("Deleted delete marker metacard successfully"); - } - - private void tryUpdate(int retries, Callable func) throws IngestException { - if (retries <= 0) { - throw new IngestException("Could not update metacard!"); - } - LOGGER.trace("Trying to update metacard."); - try { - func.call(); - LOGGER.trace("Successfully updated metacard."); - } catch (Exception e) { - LOGGER.trace("Failed to update metacard"); - trySleep(); - tryUpdate(retries - 1, func); - } - } - - private void trySleep() { - try { - Thread.sleep(350); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - } - - private Instant getVersionedOnDate(Metacard mc) { - return parseToDate(mc.getAttribute(MetacardVersion.VERSIONED_ON).getValue()); - } - - public void setSecurityLogger(SecurityLogger securityLogger) { - this.securityLogger = securityLogger; - } - - private static class ByteSourceWrapper extends ByteSource { - Supplier supplier; - - ByteSourceWrapper(Supplier supplier) { - this.supplier = supplier; - } - - @Override - public InputStream openStream() { - return supplier.get(); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/BaseLocator.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/BaseLocator.java deleted file mode 100644 index 14b2e50779f..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/BaseLocator.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.impl; - -import ddf.catalog.Constants; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Predicate; -import java.util.stream.Collectors; -import javax.activation.MimeType; -import org.apache.commons.lang3.StringUtils; -import org.codice.ddf.catalog.ui.splitter.ServiceProperties; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.InvalidSyntaxException; -import org.osgi.framework.ServiceReference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This class provides basic methods for locating services. It is intended that it will be extended - * to create service specific locators. - */ -public class BaseLocator { - - private static final Logger LOGGER = LoggerFactory.getLogger(BaseLocator.class); - - /** - * Determine if a service supports a given mime-type. The mime-type may include a property for - * {@link Constants#SERVICE_ID} used to further restrict matches. - * - * @param service the service being tested - * @param mimeType the mime-type being matched - * @param - * @return {@code true} if the service handles the given mime-type (and optional service - * identifier), otherwise {@code false} - */ - protected boolean filterByMimeType(T service, MimeType mimeType) { - return filterByMimeType(service.getMimeTypes(), service.getProperties(), mimeType); - } - - private boolean filterByMimeType( - Set serviceMimeTypes, - Map serviceProperties, - MimeType targetMimeType) { - - Set serviceBaseTypes = - serviceMimeTypes.stream().map(MimeType::getBaseType).collect(Collectors.toSet()); - - String targetServiceId = targetMimeType.getParameter(Constants.SERVICE_ID); - - String targetBaseType = targetMimeType.getBaseType(); - - String serviceId = getServiceId(serviceProperties); - - return serviceBaseTypes.contains(targetBaseType) - && (targetServiceId == null || StringUtils.equals(targetServiceId, serviceId)); - } - - private String getServiceId(Map properties) { - Object idServiceProperty = properties.get(Constants.SERVICE_ID); - - if (idServiceProperty != null) { - return idServiceProperty.toString(); - } - - return null; - } - - private BundleContext getContext() { - Bundle bundle = FrameworkUtil.getBundle(BaseLocator.class); - if (bundle != null) { - return bundle.getBundleContext(); - } - return null; - } - - private Collection> findServices( - Class clazz, String filter, BundleContext bundleContext) { - try { - return bundleContext.getServiceReferences(clazz, filter); - } catch (InvalidSyntaxException e) { - throw new IllegalArgumentException(String.format("Invalid syntax supplied: %s", filter)); - } - } - - protected List findServices( - Class clazz, String filter, Predicate servicePropertiesFilter) { - BundleContext bundleContext = getContext(); - - if (bundleContext == null) { - LOGGER.debug("Unable to get the OSGi bundle context."); - return Collections.emptyList(); - } - - Collection> refs = findServices(clazz, filter, bundleContext); - - if (refs != null) { - return refs.stream() - .sorted(Collections.reverseOrder()) - .map(bundleContext::getService) - .filter(servicePropertiesFilter) - .collect(Collectors.toList()); - } - - return Collections.emptyList(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/IdentitySplitter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/IdentitySplitter.java deleted file mode 100644 index 5efd1977bca..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/IdentitySplitter.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.impl; - -import java.io.Serializable; -import java.util.Collections; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.stream.Stream; -import javax.activation.MimeType; -import javax.activation.MimeTypeParseException; -import org.apache.tika.mime.MediaType; -import org.apache.tika.mime.MediaTypeRegistry; -import org.codice.ddf.catalog.ui.splitter.StorableResource; -import org.codice.ddf.catalog.ui.splitter.impl.AbstractSplitter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This splitter always returns a stream that contains the exact item passed in. This class will - * attempt to match all possible mime types. - */ -public class IdentitySplitter extends AbstractSplitter { - - private static final Logger LOGGER = LoggerFactory.getLogger(IdentitySplitter.class); - - private static final String ID = "identity-splitter"; - - private static final Set ALL_MIME_TYPES; - - static { - try { - ALL_MIME_TYPES = new HashSet<>(); - - MediaTypeRegistry mediaTypeRegistry = MediaTypeRegistry.getDefaultRegistry(); - - Set mediaTypes = mediaTypeRegistry.getTypes(); - Set mediaTypeAliases = new HashSet<>(); - - for (MediaType mediaType : mediaTypes) { - addMediaTypeToMimeTypes(mediaType); - mediaTypeAliases.addAll(mediaTypeRegistry.getAliases(mediaType)); - } - - for (MediaType mediaType : mediaTypeAliases) { - addMediaTypeToMimeTypes(mediaType); - } - - ALL_MIME_TYPES.add(new MimeType("image/jp2")); - ALL_MIME_TYPES.add(new MimeType("application/vnd.ms-visio.viewer")); - - LOGGER.debug("supported mime types: {}", ALL_MIME_TYPES); - - } catch (MimeTypeParseException e) { - throw new ExceptionInInitializerError(e); - } - } - - private static void addMediaTypeToMimeTypes(MediaType mediaType) throws MimeTypeParseException { - String mimeType = mediaType.getType() + "/" + mediaType.getSubtype(); - ALL_MIME_TYPES.add(new MimeType(mimeType)); - } - - public IdentitySplitter() { - super(ID, ALL_MIME_TYPES); - } - - @Override - public Stream split( - StorableResource storableResource, Map arguments) { - return Stream.of(storableResource); - } - - @Override - protected Map getAdditionalProperties() { - return Collections.emptyMap(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/SplitterLocatorImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/SplitterLocatorImpl.java deleted file mode 100644 index b5d113c2cb7..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/SplitterLocatorImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.impl; - -import java.util.List; -import javax.activation.MimeType; -import org.codice.ddf.catalog.ui.splitter.Splitter; -import org.codice.ddf.catalog.ui.splitter.SplitterLocator; - -public class SplitterLocatorImpl extends BaseLocator implements SplitterLocator { - - @Override - public List find(MimeType mimeType) { - return findServices(Splitter.class, null, t -> filterByMimeType(t, mimeType)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/UserCreatableMetacardTypeImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/UserCreatableMetacardTypeImpl.java deleted file mode 100644 index 892ad11c8c4..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/impl/UserCreatableMetacardTypeImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.impl; - -import ddf.catalog.data.MetacardType; -import java.util.Set; -import org.codice.ddf.catalog.ui.metacard.internal.UserCreatableMetacardType; - -/** Uses a {@link MetacardType} to get the available type string. */ -public class UserCreatableMetacardTypeImpl implements UserCreatableMetacardType { - - private final MetacardType metacardType; - private final Set visibleAttributes; - - public UserCreatableMetacardTypeImpl(MetacardType metacardType, Set visibleAttributes) { - this.metacardType = metacardType; - this.visibleAttributes = visibleAttributes; - } - - @Override - public String getAvailableType() { - return metacardType.getName(); - } - - @Override - public Set getUserVisibleAttributes() { - return visibleAttributes; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/internal/OperationPropertySupplier.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/internal/OperationPropertySupplier.java deleted file mode 100644 index 3803c9763c0..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/internal/OperationPropertySupplier.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.internal; - -import java.io.Serializable; -import java.util.Map; - -/** Supply addititonal properties for catalog operations. This allows properties to be injected. */ -public interface OperationPropertySupplier { - - String QUERY_TYPE = "query"; - - String CREATE_TYPE = "create"; - - /** - * Return properties for specific operation type (eg {@link #QUERY_TYPE} or {@link #CREATE_TYPE}) - * to be added to the catalog operations. - */ - Map properties(String type); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/internal/UserCreatableMetacardType.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/internal/UserCreatableMetacardType.java deleted file mode 100644 index 9a5d3001f53..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/internal/UserCreatableMetacardType.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.internal; - -import java.util.Set; - -/** - * This interface informs the UI that a specific metacard type is allowed to be manually created for - * metacard lists, and which attributes may be edited by the user. The UI may further restrict the - * set of visible attributes. - */ -public interface UserCreatableMetacardType { - - /** - * Get the name of the available type. - * - * @return name of the type - */ - String getAvailableType(); - - /** - * Get the basic set of attribute names that may be visible to the user. - * - * @return set of attribute names - */ - Set getUserVisibleAttributes(); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteAttributes.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteAttributes.java deleted file mode 100644 index 7073b94ad95..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteAttributes.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.notes; - -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import ddf.catalog.data.impl.types.AssociationsAttributes; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; - -public class NoteAttributes implements MetacardType { - - private static final Set DESCRIPTORS; - - private static final String NAME = "note"; - - static { - Set descriptors = new HashSet<>(); - descriptors.add(new AssociationsAttributes().getAttributeDescriptor(NoteConstants.PARENT_ID)); - descriptors.add( - new AttributeDescriptorImpl( - NoteConstants.COMMENT, - true /* indexed */, - true /* stored */, - true /* tokenized */, - true /* multivalued */, - BasicTypes.STRING_TYPE)); - DESCRIPTORS = Collections.unmodifiableSet(descriptors); - } - - @Override - public Set getAttributeDescriptors() { - return DESCRIPTORS; - } - - @Override - public AttributeDescriptor getAttributeDescriptor(String name) { - for (AttributeDescriptor attributeDescriptor : DESCRIPTORS) { - if (attributeDescriptor.getName().equals(name)) { - return attributeDescriptor; - } - } - return null; - } - - @Override - public String getName() { - return NAME; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteConstants.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteConstants.java deleted file mode 100644 index 509a5fa732e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteConstants.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.notes; - -import ddf.catalog.data.Metacard; - -public final class NoteConstants { - - /** - * The metacard ID of the parent object. Uses original taxonomy to preserve backwards - * compatibility. - */ - public static final String PARENT_ID = Metacard.RELATED; - - /** A comment against a result. */ - public static final String COMMENT = "ext.note.result-comment"; - - private NoteConstants() {} -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteMetacard.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteMetacard.java deleted file mode 100644 index ca1b496e219..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteMetacard.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.notes; - -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.types.Core; - -public class NoteMetacard extends MetacardImpl { - - private static final MetacardType TYPE = new NoteMetacardType(); - - /** - * @param id The parent ID of the note - * @param user the owner of the note - * @param comment The comment itself - */ - public NoteMetacard(final String id, final String user, final String comment) { - super(TYPE); - this.setAttribute(NoteConstants.PARENT_ID, id); - this.setAttribute(Core.METACARD_OWNER, user); - this.setAttribute(NoteConstants.COMMENT, comment); - this.setAttribute(Core.METACARD_TAGS, "note"); - this.setAttribute(Core.DESCRIPTION, "Note for a Metacard with ID " + id); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteMetacardType.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteMetacardType.java deleted file mode 100644 index da146b7f014..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteMetacardType.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.notes; - -import ddf.catalog.data.impl.MetacardTypeImpl; -import ddf.catalog.data.impl.types.SecurityAttributes; -import java.util.Arrays; - -public class NoteMetacardType extends MetacardTypeImpl { - public NoteMetacardType() { - super("resource-note", Arrays.asList(new NoteAttributes(), new SecurityAttributes())); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteUtil.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteUtil.java deleted file mode 100644 index 8c757790133..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/notes/NoteUtil.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.notes; - -import static ddf.catalog.util.impl.ResultIterable.resultIterable; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.types.Core; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.opengis.filter.Filter; -import org.opengis.filter.sort.SortBy; - -public class NoteUtil { - - private static final int PAGE_SIZE = 250; - - private final FilterBuilder filterBuilder; - - private final CatalogFramework catalogFramework; - - public NoteUtil(FilterBuilder filterBuilder, CatalogFramework catalogFramework) { - this.filterBuilder = filterBuilder; - this.catalogFramework = catalogFramework; - } - - /** - * Extracts the data required by the user from the note {@link Metacard} object. If any required - * fields are null the return object will also be null. - * - * @param metacard - the metacard object to abstract response data from - * @return map of the response note fields or null - */ - @Nullable - public Map getResponseNote(Metacard metacard) { - Map requiredAttributes = new HashMap<>(); - if (metacard.getId() != null) { - requiredAttributes.put("id", metacard.getId()); - } else { - return null; - } - if (metacard.getAttribute(NoteConstants.PARENT_ID) != null) { - requiredAttributes.put( - "parent", (String) metacard.getAttribute(NoteConstants.PARENT_ID).getValue()); - } else { - return null; - } - if (metacard.getCreatedDate() != null) { - requiredAttributes.put("created", metacard.getCreatedDate().toString()); - } - if (metacard.getModifiedDate() != null) { - requiredAttributes.put("modified", metacard.getModifiedDate().toString()); - } - if (metacard.getAttribute(NoteConstants.COMMENT) != null) { - requiredAttributes.put( - "note", (String) metacard.getAttribute(NoteConstants.COMMENT).getValue()); - } else { - return null; - } - if (metacard.getAttribute(Core.METACARD_OWNER) != null) { - requiredAttributes.put( - "owner", (String) metacard.getAttribute(Core.METACARD_OWNER).getValue()); - } else { - return null; - } - return requiredAttributes; - } - - /** - * Returns all associated metacards given two relatable attributes. - * - * @param primaryFilterAttribute The primary attribute to search against - * @param secondaryFilterAttribute The secondary attribute to search against - * @param primaryAttributeValue A primary attribute value - * @param secondaryAttributeValue A secondary attribute value - * @return A set of metacards, filtered by the given attributes and it's values - * @throws UnsupportedQueryException Error - * @throws SourceUnavailableException Error - * @throws FederationException Error - */ - public List getAssociatedMetacardsByTwoAttributes( - String primaryFilterAttribute, - String secondaryFilterAttribute, - String primaryAttributeValue, - String secondaryAttributeValue) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - - Filter idFilter = - filterBuilder.attribute(primaryFilterAttribute).is().equalTo().text(primaryAttributeValue); - Filter tagsFilter = - filterBuilder - .attribute(secondaryFilterAttribute) - .is() - .equalTo() - .text(secondaryAttributeValue); - Filter filter = filterBuilder.allOf(idFilter, tagsFilter); - - return resultIterable( - catalogFramework, - new QueryRequestImpl( - new QueryImpl( - filter, - 1, - PAGE_SIZE, - SortBy.NATURAL_ORDER, - true, - TimeUnit.SECONDS.toMillis(10)), - false)) - .stream() - .map(Result::getMetacard) - .collect(Collectors.toList()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/metacard/QueryMetacardImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/metacard/QueryMetacardImpl.java deleted file mode 100644 index 1260fd4833e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/metacard/QueryMetacardImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.query.data.metacard; - -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_CQL; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_ENTERPRISE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SOURCES; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_TAG; - -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public class QueryMetacardImpl extends MetacardImpl { - private static final QueryMetacardTypeImpl TYPE = new QueryMetacardTypeImpl(); - - public QueryMetacardImpl() { - super(TYPE); - setTags(Collections.singleton(QUERY_TAG)); - } - - public QueryMetacardImpl(String title) { - this(); - setTitle(title); - } - - public QueryMetacardImpl(Metacard wrappedMetacard) { - super(wrappedMetacard, TYPE); - - for (AttributeDescriptor attrDesc : TYPE.getAttributeDescriptors()) { - Attribute attr = wrappedMetacard.getAttribute(attrDesc.getName()); - - if (attr != null && attrDesc.isMultiValued()) { - this.setAttribute(new AttributeImpl(attr.getName(), attr.getValues())); - } else if (attr != null && !attrDesc.isMultiValued()) { - this.setAttribute(new AttributeImpl(attr.getName(), attr.getValue())); - } - } - // Set tags last in case tags from the wrapped metacard were copied above - setTags(Collections.singleton(QUERY_TAG)); - } - - public static QueryMetacardImpl from(Metacard metacard) { - return new QueryMetacardImpl(metacard); - } - - public String getCql() { - return (String) getAttribute(QUERY_CQL).getValue(); - } - - public void setCql(String cql) { - setAttribute(QUERY_CQL, cql); - } - - public void setEnterprise(Boolean b) { - setAttribute(QUERY_ENTERPRISE, b); - } - - /** - * Get a list of the query sources. - * - * @return list of source (always non-null) - */ - public List getSources() { - Attribute attribute = getAttribute(QUERY_SOURCES); - if (attribute == null) { - return Collections.emptyList(); - } - return attribute - .getValues() - .stream() - .filter(String.class::isInstance) - .map(String.class::cast) - .collect(Collectors.toList()); - } - - public void setSources(List sources) { - setAttribute(QUERY_SOURCES, new ArrayList<>(sources)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/metacard/QueryMetacardTypeImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/metacard/QueryMetacardTypeImpl.java deleted file mode 100644 index 3e6564f9c2b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/metacard/QueryMetacardTypeImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.query.data.metacard; - -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.DETAIL_LEVEL; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.FACETS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.PHONETICS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_CQL; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_ENTERPRISE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_FEDERATION; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_FILTER_TREE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_METACARD_TYPE_NAME; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_POLLING; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SORTS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SOURCES; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_TYPE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.SCHEDULES; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.SPELLCHECK; - -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.MetacardTypeImpl; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import java.util.HashSet; -import java.util.Set; -import java.util.stream.Collectors; - -public class QueryMetacardTypeImpl extends MetacardTypeImpl { - private static final Set QUERY_DESCRIPTORS; - - private static final Set QUERY_ATTRIBUTE_NAMES; - - static { - QUERY_DESCRIPTORS = new HashSet<>(); - - QUERY_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.ID)); - - QUERY_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.TITLE)); - - QUERY_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.CREATED)); - - QUERY_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.MODIFIED)); - - QUERY_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.METACARD_OWNER)); - - QUERY_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.DESCRIPTION)); - - QUERY_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.METACARD_TAGS)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_CQL, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_FILTER_TREE, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_ENTERPRISE, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.BOOLEAN_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_SOURCES, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_SORTS, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_POLLING, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.INTEGER_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_FEDERATION, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - QUERY_TYPE, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - DETAIL_LEVEL, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - SCHEDULES, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.XML_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - FACETS, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.STRING_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - SPELLCHECK, - true /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.BOOLEAN_TYPE)); - - QUERY_DESCRIPTORS.add( - new AttributeDescriptorImpl( - PHONETICS, - true /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.BOOLEAN_TYPE)); - - QUERY_DESCRIPTORS.addAll(new SecurityAttributes().getAttributeDescriptors()); - - QUERY_ATTRIBUTE_NAMES = - QUERY_DESCRIPTORS.stream().map(AttributeDescriptor::getName).collect(Collectors.toSet()); - } - - public QueryMetacardTypeImpl() { - this(QUERY_METACARD_TYPE_NAME, QUERY_DESCRIPTORS); - } - - public QueryMetacardTypeImpl(String name, Set descriptors) { - super(name, descriptors); - } - - public static Set getQueryAttributeNames() { - return QUERY_ATTRIBUTE_NAMES; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/model/QueryBasic.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/model/QueryBasic.java deleted file mode 100644 index 4bc06272b72..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/data/model/QueryBasic.java +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.query.data.model; - -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.DETAIL_LEVEL; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.FACETS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.PHONETICS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_CQL; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_ENTERPRISE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_FEDERATION; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_FILTER_TREE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_POLLING; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SORTS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SOURCES; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_TYPE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.SCHEDULES; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.SPELLCHECK; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.annotations.SerializedName; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import java.io.Serializable; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; - -public class QueryBasic { - - private static final Gson GSON = - new GsonBuilder().disableHtmlEscaping().serializeNulls().create(); - - @SerializedName("id") - private String metacardId; - - @SerializedName("title") - private String title; - - @SerializedName("created") - private Date created; - - @SerializedName("modified") - private Date modified; - - @SerializedName("owner") - private String owner; - - @SerializedName("description") - private String description; - - @SerializedName("cql") - private String cql; - - @SerializedName("filterTree") - private String filterTree; - - @SerializedName("enterprise") - private Boolean enterprise; - - @SerializedName("sources") - private List sources; - - @SerializedName("sorts") - private List> sorts; - - @SerializedName("polling") - private Integer polling; - - @SerializedName("federation") - private String federation; - - @SerializedName("type") - private String type; - - @SerializedName("detailLevel") - private String detailLevel; - - @SerializedName("schedules") - private List schedules; - - @SerializedName("facets") - private List facets; - - @SerializedName("spellcheck") - private Boolean spellcheck; - - @SerializedName("phonetics") - private Boolean phonetics; - - @SerializedName("accessAdministrators") - private List accessAdministrators; - - @SerializedName("accessIndividuals") - private List accessIndividuals; - - @SerializedName("accessIndividualsRead") - private List accessIndividualsRead; - - @SerializedName("accessGroups") - private List accessGroups; - - @SerializedName("accessGroupsRead") - private List accessGroupsRead; - - public QueryBasic(Metacard metacard) { - this.metacardId = getAttributeValue(metacard, Core.ID, String.class); - this.title = getAttributeValue(metacard, Core.TITLE, String.class); - this.owner = getAttributeValue(metacard, Core.METACARD_OWNER, String.class); - this.description = getAttributeValue(metacard, Core.DESCRIPTION, String.class); - this.created = getAttributeValue(metacard, Core.CREATED, Date.class); - this.modified = getAttributeValue(metacard, Core.MODIFIED, Date.class); - this.cql = getAttributeValue(metacard, QUERY_CQL, String.class); - this.filterTree = getAttributeValue(metacard, QUERY_FILTER_TREE, String.class); - this.enterprise = getAttributeValue(metacard, QUERY_ENTERPRISE, Boolean.class); - this.sources = getAttributeValues(metacard, QUERY_SOURCES, String.class); - - Class> clazz = (Class>) (Class) Map.class; - this.sorts = - getAttributeValues(metacard, QUERY_SORTS, String.class) - .stream() - .map(sortStr -> GSON.fromJson(sortStr, clazz)) - .collect(Collectors.toList()); - - this.polling = getAttributeValue(metacard, QUERY_POLLING, Integer.class); - this.federation = getAttributeValue(metacard, QUERY_FEDERATION, String.class); - this.type = getAttributeValue(metacard, QUERY_TYPE, String.class); - this.detailLevel = getAttributeValue(metacard, DETAIL_LEVEL, String.class); - this.schedules = getAttributeValues(metacard, SCHEDULES, String.class); - this.facets = getAttributeValues(metacard, FACETS, String.class); - this.spellcheck = getAttributeValue(metacard, SPELLCHECK, Boolean.class); - this.phonetics = getAttributeValue(metacard, PHONETICS, Boolean.class); - - this.accessAdministrators = - getAttributeValues(metacard, Security.ACCESS_ADMINISTRATORS, String.class); - this.accessIndividuals = - getAttributeValues(metacard, Security.ACCESS_INDIVIDUALS, String.class); - this.accessIndividualsRead = - getAttributeValues(metacard, Security.ACCESS_INDIVIDUALS_READ, String.class); - this.accessGroups = getAttributeValues(metacard, Security.ACCESS_GROUPS, String.class); - this.accessGroupsRead = getAttributeValues(metacard, Security.ACCESS_GROUPS_READ, String.class); - } - - public Metacard getMetacard() { - Metacard metacard = new MetacardImpl(); - - metacard.setAttribute(new AttributeImpl(Core.ID, this.metacardId)); - metacard.setAttribute(new AttributeImpl(Core.TITLE, this.title)); - metacard.setAttribute(new AttributeImpl(Core.METACARD_OWNER, this.owner)); - metacard.setAttribute(new AttributeImpl(Core.DESCRIPTION, this.description)); - metacard.setAttribute(new AttributeImpl(Core.CREATED, this.created)); - metacard.setAttribute(new AttributeImpl(Core.MODIFIED, this.modified)); - metacard.setAttribute(new AttributeImpl(QUERY_CQL, this.cql)); - metacard.setAttribute(new AttributeImpl(QUERY_FILTER_TREE, this.filterTree)); - metacard.setAttribute(new AttributeImpl(QUERY_ENTERPRISE, this.enterprise)); - metacard.setAttribute(new AttributeImpl(QUERY_SOURCES, (Serializable) this.sources)); - - List sortFields = getSortsField(); - metacard.setAttribute(new AttributeImpl(QUERY_SORTS, (Serializable) sortFields)); - - metacard.setAttribute(new AttributeImpl(QUERY_POLLING, this.polling)); - metacard.setAttribute(new AttributeImpl(QUERY_FEDERATION, this.federation)); - metacard.setAttribute(new AttributeImpl(QUERY_TYPE, this.type)); - metacard.setAttribute(new AttributeImpl(DETAIL_LEVEL, this.detailLevel)); - metacard.setAttribute(new AttributeImpl(SCHEDULES, (Serializable) this.schedules)); - metacard.setAttribute(new AttributeImpl(FACETS, (Serializable) this.facets)); - metacard.setAttribute(new AttributeImpl(SPELLCHECK, this.spellcheck)); - metacard.setAttribute(new AttributeImpl(PHONETICS, this.phonetics)); - metacard.setAttribute( - new AttributeImpl( - Security.ACCESS_ADMINISTRATORS, (Serializable) this.accessAdministrators)); - metacard.setAttribute( - new AttributeImpl(Security.ACCESS_INDIVIDUALS, (Serializable) this.accessIndividuals)); - metacard.setAttribute( - new AttributeImpl( - Security.ACCESS_INDIVIDUALS_READ, (Serializable) this.accessIndividualsRead)); - metacard.setAttribute( - new AttributeImpl(Security.ACCESS_GROUPS, (Serializable) this.accessGroups)); - metacard.setAttribute( - new AttributeImpl(Security.ACCESS_GROUPS_READ, (Serializable) this.accessGroupsRead)); - - return new QueryMetacardImpl(metacard); - } - - private List getSortsField() { - if (this.sorts == null) { - return Collections.emptyList(); - } - return this.sorts.stream().map(GSON::toJson).collect(Collectors.toList()); - } - - public void setOwnerAndAccessIndividuals(String owner) { - this.owner = owner; - this.accessIndividuals = Collections.singletonList(owner); - } - - private static T getAttributeValue(Metacard metacard, String name, Class type) { - Attribute attr = metacard.getAttribute(name); - - if (attr == null) { - return null; - } - - Serializable value = attr.getValue(); - - if (!type.isInstance(value)) { - return null; - } - - return type.cast(value); - } - - private static List getAttributeValues(Metacard metacard, String name, Class type) { - Attribute attr = metacard.getAttribute(name); - - if (attr == null) { - return Collections.emptyList(); - } - - return attr.getValues() - .stream() - .filter(type::isInstance) - .map(type::cast) - .collect(Collectors.toList()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/util/QueryAttributes.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/util/QueryAttributes.java deleted file mode 100644 index 7e47b23e850..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/query/util/QueryAttributes.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.query.util; - -public class QueryAttributes { - - public static final String QUERY_TAG = "query"; - - public static final String QUERY_METACARD_TYPE_NAME = "metacard.query"; - - public static final String QUERY_CQL = "cql"; - - public static final String QUERY_FILTER_TREE = "filterTree"; - - public static final String QUERY_SOURCES = "sources"; - - public static final String QUERY_ENTERPRISE = "enterprise"; - - public static final String QUERY_SORTS = "sorts"; - - public static final String QUERY_POLLING = "polling"; - - public static final String QUERY_FEDERATION = "federation"; - - public static final String QUERY_TYPE = "type"; - - public static final String DETAIL_LEVEL = "detail-level"; - - public static final String SCHEDULES = "schedules"; - - public static final String FACETS = "facets"; - - public static final String SPELLCHECK = "spellcheck"; - - public static final String PHONETICS = "phonetics"; - - private QueryAttributes() {} -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/AttributeValidationResponse.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/AttributeValidationResponse.java deleted file mode 100644 index 757f77b3d96..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/AttributeValidationResponse.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.validation; - -import ddf.catalog.validation.violation.ValidationViolation; -import java.util.Set; - -public class AttributeValidationResponse { - private Set violations; - - private Set suggestedValues; - - public AttributeValidationResponse( - Set violations, Set suggestedValues) { - this.violations = violations; - this.suggestedValues = suggestedValues; - } - - public Set getViolations() { - return violations; - } - - public void setViolations(Set violations) { - this.violations = violations; - } - - public Set getSuggestedValues() { - return suggestedValues; - } - - public void setSuggestedValues(Set suggestedValues) { - this.suggestedValues = suggestedValues; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/Validator.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/Validator.java deleted file mode 100644 index 1827e6cf635..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/Validator.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.validation; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.federation.FederationException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.catalog.validation.AttributeValidator; -import ddf.catalog.validation.AttributeValidatorRegistry; -import ddf.catalog.validation.ReportingMetacardValidator; -import ddf.catalog.validation.report.AttributeValidationReport; -import ddf.catalog.validation.report.MetacardValidationReport; -import ddf.catalog.validation.violation.ValidationViolation; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - -public class Validator { - private final List validators; - - private final List attributeValidatorRegistry; - - public Validator( - List validators, - List attributeValidatorRegistry) { - this.validators = validators; - this.attributeValidatorRegistry = attributeValidatorRegistry; - } - - public List getValidation(Metacard metacard) - throws SourceUnavailableException, UnsupportedQueryException, FederationException { - Set attributeValidationViolations = - validators - .stream() - .map(v -> v.validateMetacard(metacard)) - .filter(Optional::isPresent) - .map(Optional::get) - .map(MetacardValidationReport::getAttributeValidationViolations) - .reduce( - (left, right) -> { - HashSet res = new HashSet<>(); - res.addAll(left); - res.addAll(right); - return res; - }) - .orElse(new HashSet<>()); - Map violationsResult = - getViolationsResult(attributeValidationViolations); - - return violationsResult - .entrySet() - .stream() - .map(Map.Entry::getValue) - .collect(Collectors.toList()); - } - - public List getFullValidation(Metacard metacard) { - Set attributeValidationViolations = - validators - .stream() - .map(v -> v.validateMetacard(metacard)) - .filter(Optional::isPresent) - .map(Optional::get) - .map(MetacardValidationReport::getMetacardValidationViolations) - .reduce( - (left, right) -> { - HashSet res = new HashSet<>(); - res.addAll(left); - res.addAll(right); - return res; - }) - .orElse(new HashSet<>()); - return new ArrayList<>(attributeValidationViolations); - } - - public AttributeValidationResponse validateAttribute(String attribute, String value) { - Set attributeValidators = - attributeValidatorRegistry - .stream() - .map(avr -> avr.getValidators(attribute)) - .reduce( - (left, right) -> { - left.addAll(right); - return left; - }) - .orElse(new HashSet<>()); - - Set suggestedValues = new HashSet<>(); - Set violations = new HashSet<>(); - for (AttributeValidator validator : attributeValidators) { - Optional validationReport = - validator.validate(new AttributeImpl(attribute, value)); - if (validationReport.isPresent()) { - AttributeValidationReport report = validationReport.get(); - if (!report.getSuggestedValues().isEmpty()) { - suggestedValues = report.getSuggestedValues(); - } - violations.addAll(report.getAttributeValidationViolations()); - } - } - - return new AttributeValidationResponse(violations, suggestedValues); - } - - private Map getViolationsResult( - Set attributeValidationViolations) { - Map violationsResult = new HashMap<>(); - for (ValidationViolation violation : attributeValidationViolations) { - for (String attribute : violation.getAttributes()) { - if (!violationsResult.containsKey(attribute)) { - violationsResult.put(attribute, new ViolationResult()); - } - ViolationResult violationResponse = violationsResult.get(attribute); - violationResponse.setAttribute(attribute); - - if (ValidationViolation.Severity.ERROR.equals(violation.getSeverity())) { - violationResponse.getErrors().add(violation.getMessage()); - } else if (ValidationViolation.Severity.WARNING.equals(violation.getSeverity())) { - violationResponse.getWarnings().add(violation.getMessage()); - } else { - throw new IllegalArgumentException("Unexpected Severity Level"); - } - } - } - return violationsResult; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/ViolationResult.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/ViolationResult.java deleted file mode 100644 index 6b91f204527..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/validation/ViolationResult.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.validation; - -import java.util.ArrayList; -import java.util.List; - -public class ViolationResult { - private String attribute; - - private List errors = new ArrayList<>(); - - private List warnings = new ArrayList<>(); - - public String getAttribute() { - return attribute; - } - - public void setAttribute(String attribute) { - this.attribute = attribute; - } - - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - public List getWarnings() { - return warnings; - } - - public void setWarnings(List warnings) { - this.warnings = warnings; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/ListMetacardImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/ListMetacardImpl.java deleted file mode 100644 index 5eda3cde373..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/ListMetacardImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.MetacardImpl; -import java.util.Collections; - -public class ListMetacardImpl extends MetacardImpl { - public static final ListMetacardTypeImpl TYPE = new ListMetacardTypeImpl(); - - public ListMetacardImpl() { - super(TYPE); - setTags(Collections.singleton(ListMetacardTypeImpl.LIST_TAG)); - } - - public ListMetacardImpl(String title) { - this(); - setTitle(title); - } - - public ListMetacardImpl(Metacard wrappedMetacard) { - super(wrappedMetacard, TYPE); - setTags(Collections.singleton(ListMetacardTypeImpl.LIST_TAG)); - } - - public static ListMetacardImpl from(Metacard metacard) { - return new ListMetacardImpl(metacard); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/ListMetacardTypeImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/ListMetacardTypeImpl.java deleted file mode 100644 index 2821ac1c1e6..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/ListMetacardTypeImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace; - -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.MetacardTypeImpl; -import ddf.catalog.data.types.Core; -import java.util.HashSet; -import java.util.Set; - -public class ListMetacardTypeImpl extends MetacardTypeImpl { - - public static final String LIST_TAG = "list"; - - public static final String LIST_METACARD_TYPE_NAME = "metacard.list"; - - public static final String LIST_CQL = "list.cql"; - - public static final String LIST_ICON = "list.icon"; - - public static final String LIST_BOOKMARKS = "list.bookmarks"; - - private static final Set LIST_DESCRIPTORS; - - static { - LIST_DESCRIPTORS = new HashSet<>(); - - LIST_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.ID)); - - LIST_DESCRIPTORS.add(MetacardImpl.BASIC_METACARD.getAttributeDescriptor(Core.TITLE)); - - LIST_DESCRIPTORS.add( - new AttributeDescriptorImpl( - LIST_CQL, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE)); - - LIST_DESCRIPTORS.add( - new AttributeDescriptorImpl( - LIST_ICON, - false /* indexed */, - true /* stored */, - false /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE)); - - LIST_DESCRIPTORS.add( - new AttributeDescriptorImpl( - LIST_BOOKMARKS, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.STRING_TYPE)); - } - - public ListMetacardTypeImpl() { - this(LIST_METACARD_TYPE_NAME, LIST_DESCRIPTORS); - } - - public ListMetacardTypeImpl(String name, Set descriptors) { - super(name, descriptors); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceAttributes.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceAttributes.java deleted file mode 100644 index 702deed94d3..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceAttributes.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import ddf.catalog.data.types.Core; -import java.util.Map; -import java.util.Set; - -public class WorkspaceAttributes implements MetacardType { - - private static final String NAME = "workspace"; - - // @formatter:off - private static final Map DESCRIPTORS = - ImmutableMap.of( - Core.METACARD_OWNER, - new AttributeDescriptorImpl( - Core.METACARD_OWNER, - true /* indexed */, - true /* stored */, - true /* tokenized */, - false /* multivalued */, - BasicTypes.STRING_TYPE), - WorkspaceConstants.WORKSPACE_QUERIES, - new AttributeDescriptorImpl( - WorkspaceConstants.WORKSPACE_QUERIES, - true /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.STRING_TYPE), - WorkspaceConstants.WORKSPACE_LISTS, - new AttributeDescriptorImpl( - WorkspaceConstants.WORKSPACE_LISTS, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.XML_TYPE), - WorkspaceConstants.WORKSPACE_SHARING, - new AttributeDescriptorImpl( - WorkspaceConstants.WORKSPACE_SHARING, - false /* indexed */, - true /* stored */, - false /* tokenized */, - true /* multivalued */, - BasicTypes.XML_TYPE)); - // @formatter:on - - @Override - public Set getAttributeDescriptors() { - return ImmutableSet.copyOf(DESCRIPTORS.values()); - } - - @Override - public AttributeDescriptor getAttributeDescriptor(String name) { - return DESCRIPTORS.get(name); - } - - @Override - public String getName() { - return NAME; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardImpl.java deleted file mode 100644 index 774c3000bbd..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace; - -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.types.Associations; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil; - -public class WorkspaceMetacardImpl extends MetacardImpl { - - public static final MetacardType TYPE = new WorkspaceMetacardType(); - - public WorkspaceMetacardImpl() { - super(TYPE); - setTags(Collections.singleton(WorkspaceConstants.WORKSPACE_TAG)); - } - - public WorkspaceMetacardImpl(String id) { - this(); - setId(id); - } - - public WorkspaceMetacardImpl(Metacard metacard) { - super(metacard); - } - - /** Wrap any metacard as a WorkspaceMetacardImpl. */ - public static WorkspaceMetacardImpl from(Metacard metacard) { - return new WorkspaceMetacardImpl(metacard); - } - - public static WorkspaceMetacardImpl from(Map attributes) { - WorkspaceMetacardImpl workspace = new WorkspaceMetacardImpl(); - - attributes - .entrySet() - .stream() - .forEach(entry -> workspace.setAttribute(entry.getKey(), entry.getValue())); - - return workspace; - } - - public static boolean isWorkspaceMetacard(Metacard metacard) { - return metacard != null && metacard.getTags().contains(WorkspaceConstants.WORKSPACE_TAG); - } - - public List getMetacards() { - return AccessControlUtil.getValuesOrEmpty(this, Associations.RELATED); - } - - public void setMetacards(List items) { - setAttribute(WorkspaceConstants.WORKSPACE_QUERIES, new ArrayList<>(items)); - } - - public List getQueries() { - Attribute queryAttr = this.getAttribute(WorkspaceConstants.WORKSPACE_QUERIES); - return queryAttr == null - ? new ArrayList<>() - : queryAttr - .getValues() - .stream() - .filter(String.class::isInstance) - .map(String.class::cast) - .collect(Collectors.toList()); - } - - public void setQueries(List queryIds) { - setAttribute(WorkspaceConstants.WORKSPACE_QUERIES, new ArrayList<>(queryIds)); - } - - public void addQueryAssociation(String queryId) { - List queryIds = this.getQueries(); - queryIds.add(queryId); - this.setQueries(queryIds); - } - - public void removeQueryAssociation(String queryId) { - List queryIds = this.getQueries(); - queryIds.remove(queryId); - this.setQueries(queryIds); - } - - public List getContent() { - return AccessControlUtil.getValuesOrEmpty(this, WorkspaceConstants.WORKSPACE_LISTS); - } - - public WorkspaceMetacardImpl setContent(List lists) { - setAttribute(WorkspaceConstants.WORKSPACE_LISTS, new ArrayList<>(lists)); - return this; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardType.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardType.java deleted file mode 100644 index 92afda5b422..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardType.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace; - -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.types.AssociationsAttributes; -import ddf.catalog.data.impl.types.CoreAttributes; -import ddf.catalog.data.impl.types.SecurityAttributes; -import java.util.Collection; -import java.util.Set; -import java.util.stream.Collectors; - -public class WorkspaceMetacardType implements MetacardType { - - private static final Set ATTRIBUTE_DESCRIPTORS = - ImmutableSet.of( - new CoreAttributes(), - new SecurityAttributes(), - new WorkspaceAttributes(), - new AssociationsAttributes()) - .stream() - .map(MetacardType::getAttributeDescriptors) - .flatMap(Collection::stream) - .collect(Collectors.toSet()); - - @Override - public String getName() { - return WorkspaceConstants.WORKSPACE_TAG; - } - - @Override - public Set getAttributeDescriptors() { - return ATTRIBUTE_DESCRIPTORS; - } - - @Override - public AttributeDescriptor getAttributeDescriptor(String s) { - for (AttributeDescriptor attributeDescriptor : ATTRIBUTE_DESCRIPTORS) { - if (attributeDescriptor.getName().equals(s)) { - return attributeDescriptor; - } - } - return null; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/AssociatedQueryMetacardsHandler.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/AssociatedQueryMetacardsHandler.java deleted file mode 100644 index 91b9f9a4901..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/AssociatedQueryMetacardsHandler.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Metacard; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.DeleteRequestImpl; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardTypeImpl; - -public class AssociatedQueryMetacardsHandler { - - private final CatalogFramework catalogFramework; - - private static final Set QUERY_ATTRIBUTE_NAMES = - QueryMetacardTypeImpl.getQueryAttributeNames(); - - public AssociatedQueryMetacardsHandler(CatalogFramework catalogFramework) { - this.catalogFramework = catalogFramework; - } - - public void create(List existingQueryIds, List updatedQueryMetacards) - throws IngestException, SourceUnavailableException { - List createMetacards = - updatedQueryMetacards - .stream() - .filter(Objects::nonNull) - .filter(query -> !existingQueryIds.contains(query.getId())) - .collect(Collectors.toList()); - if (!createMetacards.isEmpty()) { - catalogFramework.create(new CreateRequestImpl(createMetacards)); - } - } - - public void delete(List existingQueryIds, List updatedQueryIds) - throws IngestException, SourceUnavailableException { - String[] deleteIds = - existingQueryIds - .stream() - .filter(Objects::nonNull) - .filter(queryId -> !updatedQueryIds.contains(queryId)) - .toArray(String[]::new); - if (deleteIds.length > 0) { - catalogFramework.delete(new DeleteRequestImpl(deleteIds)); - } - } - - public void update( - List existingQueryIds, - List existingQueryMetacards, - List updatedQueryMetacards) - throws IngestException, SourceUnavailableException { - Map existingQueryMap = - existingQueryMetacards - .stream() - .collect(Collectors.toMap(QueryMetacardImpl::getId, query -> query)); - List updateMetacards = - updatedQueryMetacards - .stream() - .filter(query -> existingQueryIds.contains(query.getId())) - .filter(query -> hasChanges(existingQueryMap.get(query.getId()), query)) - .collect(Collectors.toList()); - if (!updateMetacards.isEmpty()) { - String[] updateMetacardIds = - updateMetacards.stream().map(Metacard::getId).toArray(String[]::new); - catalogFramework.update(new UpdateRequestImpl(updateMetacardIds, updateMetacards)); - } - } - - private boolean hasChanges(Metacard existing, Metacard updated) { - Optional difference = - QUERY_ATTRIBUTE_NAMES - .stream() - .filter( - attributeName -> - !Objects.equals( - existing.getAttribute(attributeName), updated.getAttribute(attributeName))) - .findFirst(); - return difference.isPresent(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/EmbeddedListMetacardsHandler.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/EmbeddedListMetacardsHandler.java deleted file mode 100644 index c7e22ec1e84..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/EmbeddedListMetacardsHandler.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import static java.util.stream.Collectors.toList; - -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.ImmutableMap; -import ddf.action.ActionRegistry; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import org.codice.ddf.catalog.ui.metacard.workspace.ListMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.EmbeddedMetacardsHandler; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; - -public class EmbeddedListMetacardsHandler extends EmbeddedMetacardsHandler { - @VisibleForTesting static final String LIST_ACTION_PREFIX = "catalog.data.metacard.list"; - - @VisibleForTesting static final String ACTIONS_KEY = "actions"; - - private static final Set EXTERNAL_LIST_ATTRIBUTES = Collections.singleton(ACTIONS_KEY); - - private final ActionRegistry actionRegistry; - - public EmbeddedListMetacardsHandler(ActionRegistry actionRegistry) { - this.actionRegistry = actionRegistry; - } - - /** {@inheritDoc} Add "actions" key to list metacards. */ - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, List metacardXMLStrings, Metacard workspaceMetacard) { - - final Optional listMetacardsOptional = - super.metacardValueToJsonValue(transformer, metacardXMLStrings, workspaceMetacard); - - listMetacardsOptional.ifPresent( - listMetacards -> - ((List) listMetacards) - .stream() - .filter(Map.class::isInstance) - .map(Map.class::cast) - .forEach( - listMetacardMap -> - addListActionsToListMetacard( - listMetacardMap, workspaceMetacard, transformer))); - - return listMetacardsOptional; - } - - private void addListActionsToListMetacard( - Map listMetacardAsMap, Metacard workspaceMetacard, WorkspaceTransformer transformer) { - final Metacard listMetacard = new ListMetacardImpl(); - transformer.transformIntoMetacard(listMetacardAsMap, listMetacard); - final List> listActions = getListActions(workspaceMetacard, listMetacard); - listMetacardAsMap.put(ACTIONS_KEY, listActions); - } - - /** {@inheritDoc} Remove "actions" key from list metacard map. */ - @Override - public Optional jsonValueToMetacardValue( - WorkspaceTransformer transformer, List metacardJsonData) { - - ((List) metacardJsonData) - .stream() - .filter(Map.class::isInstance) - .map(Map.class::cast) - .forEach(this::removeExternalListAttributes); - - return super.jsonValueToMetacardValue(transformer, metacardJsonData); - } - - private void removeExternalListAttributes(Map listMetacardMap) { - EXTERNAL_LIST_ATTRIBUTES.forEach(listMetacardMap::remove); - } - - /** - * Given a {@link org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl} and a {@link - * org.codice.ddf.catalog.ui.metacard.workspace.ListMetacardImpl}, get a list of actions that can - * be executed on a list. - */ - private List> getListActions( - Metacard workspaceMetacard, Metacard listMetacard) { - final Map listContext = - ImmutableMap.of("workspace", workspaceMetacard, "list", listMetacard); - - return actionRegistry - .list(listContext) - .stream() - .filter(action -> action.getId().startsWith(LIST_ACTION_PREFIX)) - .map( - action -> { - final Map actionMap = new HashMap<>(); - actionMap.put("id", action.getId()); - actionMap.put("url", action.getUrl()); - actionMap.put("title", action.getTitle()); - actionMap.put("description", action.getDescription()); - return actionMap; - }) - .collect(toList()); - } - - @Override - public String getKey() { - return WorkspaceConstants.WORKSPACE_LISTS; - } - - @Override - public MetacardType getMetacardType() { - return ListMetacardImpl.TYPE; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/FilterBlankAccessIndividuals.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/FilterBlankAccessIndividuals.java deleted file mode 100644 index a63e3435db4..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/FilterBlankAccessIndividuals.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.types.Security; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceValueTransformation; - -public class FilterBlankAccessIndividuals extends WorkspaceValueTransformation { - @Override - public String getKey() { - return Security.ACCESS_INDIVIDUALS; - } - - @Override - public Class getMetacardValueType() { - return List.class; - } - - @Override - public Class getJsonValueType() { - return List.class; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, List metacardValue, Metacard workspaceMetacard) { - return Optional.of( - ((List) metacardValue) - .stream() - .filter(String.class::isInstance) - .map(String.class::cast) - .filter(StringUtils::isNotBlank) - .collect(Collectors.toList())); - } - - @Override - public Optional jsonValueToMetacardValue(WorkspaceTransformer transformer, List jsonValue) { - return Optional.of(jsonValue); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/QueryIdsParser.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/QueryIdsParser.java deleted file mode 100644 index 8bccf90af9b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/QueryIdsParser.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.Metacard; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceValueTransformation; - -public class QueryIdsParser extends WorkspaceValueTransformation { - - @Override - public String getKey() { - return WorkspaceConstants.WORKSPACE_QUERIES; - } - - @Override - public Class getMetacardValueType() { - return List.class; - } - - @Override - public Class getJsonValueType() { - return List.class; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, List metacardValue, Metacard workspaceMetacard) { - return Optional.of( - ((List) metacardValue) - .stream() - .filter(String.class::isInstance) - .map(String.class::cast) - .map(queryId -> ImmutableMap.of("id", queryId)) - .collect(Collectors.toList())); - } - - @Override - public Optional jsonValueToMetacardValue(WorkspaceTransformer transformer, List jsonValue) { - return Optional.of( - ((List) jsonValue) - .stream() - .filter(Map.class::isInstance) - .map(Map.class::cast) - .map(queryId -> queryId.getOrDefault("id", "")) - .collect(Collectors.toList())); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/QuerySortsParser.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/QuerySortsParser.java deleted file mode 100644 index c9a270f3ed2..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/QuerySortsParser.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SORTS; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.Metacard; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceValueTransformation; - -public class QuerySortsParser extends WorkspaceValueTransformation { - @Override - public Class getJsonValueType() { - return List.class; - } - - @Override - public Class getMetacardValueType() { - return List.class; - } - - @Override - public String getKey() { - return QUERY_SORTS; - } - - @Override - public Optional jsonValueToMetacardValue(WorkspaceTransformer transformer, List jsonValue) { - return Optional.of( - ((List) jsonValue) - .stream() - .filter(Map.class::isInstance) - .map(Map.class::cast) - .map( - sortsObject -> - sortsObject.getOrDefault("attribute", "") - + "," - + sortsObject.getOrDefault("direction", "")) - .collect(Collectors.toList())); - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, List metacardValue, Metacard workspaceMetacard) { - return Optional.of( - ((List) metacardValue) - .stream() - .filter(String.class::isInstance) - .map(String.class::cast) - .map( - sortString -> { - final String[] sortParameters = sortString.split(","); - return ImmutableMap.builder() - .put("attribute", sortParameters[0]) - .put("direction", sortParameters[1]) - .build(); - }) - .collect(Collectors.toList())); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/RemoveMetacardTags.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/RemoveMetacardTags.java deleted file mode 100644 index 0d7dc595b94..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/RemoveMetacardTags.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.types.Core; -import java.util.Optional; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceValueTransformation; - -public class RemoveMetacardTags extends WorkspaceValueTransformation { - @Override - public String getKey() { - return Core.METACARD_TAGS; - } - - @Override - public Class getMetacardValueType() { - return Object.class; - } - - @Override - public Class getJsonValueType() { - return Object.class; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, Object metacardValue, Metacard workspaceMetacard) { - return Optional.of(metacardValue); - } - - @Override - public Optional jsonValueToMetacardValue( - WorkspaceTransformer transformer, Object jsonValue) { - return Optional.empty(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/SrcToQuerySources.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/SrcToQuerySources.java deleted file mode 100644 index 4e3d4d14f22..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/SrcToQuerySources.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SOURCES; - -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceKeyTransformation; - -public class SrcToQuerySources extends WorkspaceKeyTransformation { - @Override - public String getMetacardKey() { - return QUERY_SOURCES; - } - - @Override - public String getJsonKey() { - return "sources"; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceMetacardsKeyToAssociations.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceMetacardsKeyToAssociations.java deleted file mode 100644 index 12a40874630..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceMetacardsKeyToAssociations.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import ddf.catalog.data.types.Associations; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceKeyTransformation; - -public class WorkspaceMetacardsKeyToAssociations extends WorkspaceKeyTransformation { - @Override - public String getMetacardKey() { - return Associations.RELATED; - } - - @Override - public String getJsonKey() { - return WorkspaceConstants.WORKSPACE_METACARDS; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformException.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformException.java deleted file mode 100644 index 27f425f1ca9..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformException.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -/** A Runtime exception class for workspace transformers */ -public class WorkspaceTransformException extends RuntimeException { - public WorkspaceTransformException(Exception e) { - super(e); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformerImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformerImpl.java deleted file mode 100644 index 334da1b4efc..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformerImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.transform.CatalogTransformerException; -import ddf.catalog.transform.InputTransformer; -import java.io.IOException; -import java.io.InputStream; -import java.io.Serializable; -import java.nio.charset.Charset; -import java.util.AbstractMap; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformation; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class WorkspaceTransformerImpl implements WorkspaceTransformer { - private static final Logger LOGGER = LoggerFactory.getLogger(WorkspaceTransformerImpl.class); - - private final CatalogFramework catalogFramework; - - private final InputTransformer inputTransformer; - - private final EndpointUtil endpointUtil; - - private final List transformations; - - public WorkspaceTransformerImpl( - CatalogFramework catalogFramework, - InputTransformer inputTransformer, - EndpointUtil endpointUtil, - List transformations) { - this.catalogFramework = catalogFramework; - this.inputTransformer = inputTransformer; - this.endpointUtil = endpointUtil; - this.transformations = transformations; - } - - private Optional> metacardEntryToJsonEntry( - final Map.Entry entry, - WorkspaceTransformation transformation, - Metacard workspaceMetacard) { - if (transformation.getMetacardValueType().isInstance(entry.getValue())) { - final String newKey = transformation.getJsonKey(); - return transformation - .metacardValueToJsonValue( - this, transformation.getMetacardValueType().cast(entry.getValue()), workspaceMetacard) - .map(newValue -> new AbstractMap.SimpleEntry<>(newKey, newValue)); - } else { - LOGGER.warn( - "A workspace transformation expected a value of type {} for metacard attribute \"{}\", but instead found a value of type {}.", - transformation.getMetacardValueType().getName(), - entry.getKey(), - entry.getValue().getClass().getName()); - return Optional.empty(); - } - } - - private Optional> metacardEntryToJsonEntry( - final Map.Entry entry, Metacard workspaceMetacard) { - return transformations - .stream() - .filter(transformation -> entry.getKey().equals(transformation.getMetacardKey())) - .findFirst() - .map(transformation -> metacardEntryToJsonEntry(entry, transformation, workspaceMetacard)) - .orElse(Optional.of(entry)); - } - - private Optional> jsonEntryToMetacardEntry( - Map.Entry entry, WorkspaceTransformation transformation) { - if (transformation.getJsonValueType().isInstance(entry.getValue())) { - final String newKey = transformation.getMetacardKey(); - return transformation - .jsonValueToMetacardValue(this, transformation.getJsonValueType().cast(entry.getValue())) - .map(newValue -> new AbstractMap.SimpleEntry<>(newKey, newValue)); - } else { - LOGGER.debug( - "A workspace transformation expected a value of type {} for JSON key \"{}\", but instead found a value of type {}.", - transformation.getJsonValueType().getName(), - entry.getKey(), - entry.getValue().getClass().getName()); - return Optional.empty(); - } - } - - private Optional> jsonEntryToMetacardEntry( - Map.Entry entry) { - return transformations - .stream() - .filter(transformation -> entry.getKey().equals(transformation.getJsonKey())) - .findFirst() - .map(transformation -> jsonEntryToMetacardEntry(entry, transformation)) - .orElse(Optional.of(entry)); - } - - private void addAttributeValue(Metacard metacard, Map.Entry entry) { - final Object value = entry.getValue(); - - LOGGER.trace( - "The map key \"{}\" with value \"{}\" is being added to the metacard.", - entry.getKey(), - value); - - if (value instanceof Serializable) { - metacard.setAttribute(new AttributeImpl(entry.getKey(), (Serializable) value)); - } else if (value instanceof List) { - try { - metacard.setAttribute(new AttributeImpl(entry.getKey(), (List) value)); - } catch (ClassCastException ex) { - LOGGER.debug( - "The value was expected to be Serializable or a list of Serializable items.", ex); - } - } else { - LOGGER.debug( - "The {} was expected to be Serializable or a list of Serializable items.", value); - } - } - - @Override - public void transformIntoMetacard(Map json, Metacard init) { - json.entrySet() - .stream() - .map(this::jsonEntryToMetacardEntry) - .filter(Optional::isPresent) - .map(Optional::get) - .map(endpointUtil::convertDateEntries) - .filter(Objects::nonNull) - .forEach(entry -> addAttributeValue(init, entry)); - } - - @Override - public Metacard transform(Map json) { - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(); - transformIntoMetacard(json, workspaceMetacard); - return workspaceMetacard; - } - - @Override - public Map transform(Metacard workspaceMetacard) { - return transform(workspaceMetacard, workspaceMetacard); - } - - @Nullable - private Map.Entry getEntryFromDescriptor( - Metacard metacard, AttributeDescriptor descriptor) { - Attribute attribute = metacard.getAttribute(descriptor.getName()); - if (attribute == null) { - return null; - } else if (descriptor.isMultiValued()) { - return new AbstractMap.SimpleEntry<>(attribute.getName(), attribute.getValues()); - } else { - return new AbstractMap.SimpleEntry<>(attribute.getName(), attribute.getValue()); - } - } - - @Override - public Map transform(Metacard workspaceMetacard, Metacard metacard) { - return Optional.of(metacard) - .map(Metacard::getMetacardType) - .map(MetacardType::getAttributeDescriptors) - .orElseGet(Collections::emptySet) - .stream() - .map(descriptor -> getEntryFromDescriptor(metacard, descriptor)) - .filter(Objects::nonNull) - .map(entry -> this.metacardEntryToJsonEntry(entry, workspaceMetacard)) - .filter(Optional::isPresent) - .map(Optional::get) - .filter(entry -> entry.getKey() != null) - .filter(entry -> entry.getValue() != null) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (left, right) -> left)); - } - - @Override - public List> transform(List metacards) { - return metacards.stream().map(this::transform).collect(Collectors.toList()); - } - - @Override - public String metacardToXml(Metacard metacard) { - try (InputStream stream = catalogFramework.transform(metacard, "xml", null).getInputStream()) { - return IOUtils.toString(stream, Charset.defaultCharset()); - } catch (IOException | CatalogTransformerException e) { - throw new WorkspaceTransformException(e); - } - } - - @Override - public Metacard xmlToMetacard(String xml) { - try (InputStream is = IOUtils.toInputStream(xml, Charset.defaultCharset())) { - return inputTransformer.transform(is); - } catch (IOException | CatalogTransformerException ex) { - throw new WorkspaceTransformException(ex); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/preferences/DefaultCatalogUiPreferences.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/preferences/DefaultCatalogUiPreferences.java deleted file mode 100644 index 3aa4c9605db..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/preferences/DefaultCatalogUiPreferences.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.preferences; - -import com.google.common.collect.ImmutableMap; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import org.codice.ddf.catalog.ui.config.ConfigurationApplication; -import org.codice.ddf.preferences.DefaultPreferencesSupplier; - -public class DefaultCatalogUiPreferences implements DefaultPreferencesSupplier { - - private final ConfigurationApplication configurationApplication; - - public DefaultCatalogUiPreferences(ConfigurationApplication configurationApplication) { - this.configurationApplication = configurationApplication; - } - - @Override - public Map create() { - - Map defaults = new HashMap<>(); - - defaults.put("resultDisplay", "List"); - defaults.put("resultPreview", Collections.singletonList("modified")); - defaults.put("inspector-hideEmpty", false); - defaults.put("inspector-summaryShown", Collections.emptyList()); - defaults.put("inspector-summaryOrder", Collections.emptyList()); - defaults.put( - "inspector-detailsOrder", Arrays.asList("title", "created", "modified", "thumbnail")); - defaults.put("inspector-detailsHidden", Collections.emptyList()); - defaults.put("results-attributesShownTable", Collections.emptyList()); - defaults.put("results-attributesShownList", Collections.emptyList()); - defaults.put("homeFilter", "Owned by anyone"); - defaults.put("homeSort", "Last modified"); - defaults.put("homeDisplay", "Grid"); - defaults.put("decimalPrecision", 2); - defaults.put("alertPersistence", true); - defaults.put("alertExpiration", 2592000000L); - defaults.put("visualization", "3dmap"); - defaults.put("columnHide", Collections.emptyList()); - defaults.put("columnOrder", Arrays.asList("title", "created", "modified", "thumbnail")); - defaults.put("columnWidths", Collections.emptyList()); - defaults.put("hasSelectedColumns", false); - defaults.put("oauth", Collections.emptyList()); - defaults.put("fontSize", 16); - defaults.put("resultCount", 250); - defaults.put( - "dateTimeFormat", - new ImmutableMap.Builder<>() - .put("datetimefmt", "YYYY-MM-DD[T]HH:mm:ss.SSSZ") - .put("timefmt", "HH:mm:ssZ") - .build()); - defaults.put("timeZone", "Etc/UTC"); - defaults.put("coordinateFormat", "degrees"); - defaults.put("autoPan", true); - defaults.put("animation", true); - defaults.put("hoverPreview", true); - defaults.put("layoutId", "custom"); - - Map params = - new ImmutableMap.Builder() - .put("imageSize", Arrays.asList(10800, 5400)) - .build(); - - // TODO what about the id field?? The MapLayers in the UI code was providing this id, but I'm - // not sure what I should set it to here - defaults.put( - "mapLayers", - Collections.singletonList( - new ImmutableMap.Builder<>() - .put("type", "SI") - .put("url", "./images/natural_earth_50m.png") - .put("parameters", params) - .put("alpha", 1) - .put("name", "Default Layer") - .put("show", true) - .put("proxyEnabled", true) - .put("order", 0) - .put("label", "Type: SI") - .put("id", "ea47d249-a502-4a08-93c5-2fc53c63532c") - .build())); - defaults.put("alerts", Collections.emptyList()); - defaults.put("uploads", Collections.emptyList()); - defaults.put( - "theme", - new ImmutableMap.Builder<>().put("palette", "custom").put("theme", "dark").build()); - defaults.put( - "querySettings", - new ImmutableMap.Builder<>() - .put("type", "text") - .put("sources", configurationApplication.getDefaultSources()) - .put( - "sorts", - Collections.singletonList( - new ImmutableMap.Builder<>() - .put("attribute", "modified") - .put("direction", "descending") - .build())) - .put("spellcheck", false) - .put("phonetics", false) - .build()); - - return defaults; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/QueryApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/QueryApplication.java deleted file mode 100644 index 54733d4944e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/QueryApplication.java +++ /dev/null @@ -1,276 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query; - -import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; -import static spark.Spark.before; -import static spark.Spark.exception; -import static spark.Spark.get; -import static spark.Spark.halt; -import static spark.Spark.post; - -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.operation.ProcessingDetails; -import ddf.catalog.plugin.OAuthPluginException; -import ddf.catalog.source.UnsupportedQueryException; -import java.io.IOException; -import java.util.Date; -import java.util.LinkedList; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.codice.ddf.catalog.ui.metacard.EntityTooLargeException; -import org.codice.ddf.catalog.ui.query.cql.CqlRequestImpl; -import org.codice.ddf.catalog.ui.query.cql.SourceWarningsFilterManager; -import org.codice.ddf.catalog.ui.query.geofeature.FeatureService; -import org.codice.ddf.catalog.ui.query.handlers.CqlTransformHandler; -import org.codice.ddf.catalog.ui.query.suggestion.DmsCoordinateProcessor; -import org.codice.ddf.catalog.ui.query.suggestion.LatLonCoordinateProcessor; -import org.codice.ddf.catalog.ui.query.suggestion.MgrsCoordinateProcessor; -import org.codice.ddf.catalog.ui.query.suggestion.UtmUpsCoordinateProcessor; -import org.codice.ddf.catalog.ui.query.utility.CqlQueryResponse; -import org.codice.ddf.catalog.ui.query.validate.CqlValidationHandler; -import org.codice.ddf.catalog.ui.util.CqlQueriesImpl; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.catalog.ui.ws.JsonRpc; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.codice.gsonsupport.GsonTypeAdapters.DateLongFormatTypeAdapter; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.geotools.geojson.feature.FeatureJSON; -import org.opengis.feature.simple.SimpleFeature; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.servlet.SparkApplication; - -public class QueryApplication implements SparkApplication, Function { - - private static final Logger LOGGER = LoggerFactory.getLogger(QueryApplication.class); - - private static final String APPLICATION_JSON = "application/json"; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .registerTypeAdapter(Date.class, new DateLongFormatTypeAdapter()) - .create(); - - private static final String MESSAGE = "message"; - - private static final String QUERY_ENDPOINT_FAILED = "Query endpoint failed"; - - private static final String ID_KEY = "id"; - - private static final String URL_KEY = "url"; - - private final LatLonCoordinateProcessor latLonCoordinateProcessor; - - private final DmsCoordinateProcessor dmsCoordinateProcessor; - - private final MgrsCoordinateProcessor mgrsCoordinateProcessor; - - private final UtmUpsCoordinateProcessor utmUpsCoordinateProcessor; - - private final SourceWarningsFilterManager sourceWarningsFilterManager; - - private FeatureService featureService; - - private CqlTransformHandler cqlTransformHandler; - - private CqlValidationHandler cqlValidationHandler; - - private EndpointUtil util; - - private CqlQueriesImpl cqlQueryUtil; - - public QueryApplication( - CqlTransformHandler cqlTransformHandler, - CqlValidationHandler cqlValidationHandler, - LatLonCoordinateProcessor latLonCoordinateProcessor, - DmsCoordinateProcessor dmsCoordinateProcessor, - MgrsCoordinateProcessor mgrsCoordinateProcessor, - UtmUpsCoordinateProcessor utmUpsCoordinateProcessor, - SourceWarningsFilterManager sourceWarningsFilterManager) { - this.latLonCoordinateProcessor = latLonCoordinateProcessor; - this.dmsCoordinateProcessor = dmsCoordinateProcessor; - this.mgrsCoordinateProcessor = mgrsCoordinateProcessor; - this.utmUpsCoordinateProcessor = utmUpsCoordinateProcessor; - this.cqlTransformHandler = cqlTransformHandler; - this.cqlValidationHandler = cqlValidationHandler; - this.sourceWarningsFilterManager = sourceWarningsFilterManager; - } - - @Override - public void init() { - before((req, res) -> res.type(APPLICATION_JSON)); - - post( - "/cql", - APPLICATION_JSON, - (req, res) -> { - try { - CqlRequestImpl cqlRequest = GSON.fromJson(util.safeGetBody(req), CqlRequestImpl.class); - CqlQueryResponse cqlQueryResponse = cqlQueryUtil.executeCqlQuery(cqlRequest); - addApplicableWarningsTo(cqlQueryResponse); - return GSON.toJson(cqlQueryResponse); - } catch (OAuthPluginException e) { - res.status(e.getErrorType().getStatusCode()); - return GSON.toJson(ImmutableMap.of(ID_KEY, e.getSourceId(), URL_KEY, e.getUrl())); - } catch (CqlParseException e) { - LOGGER.debug("Unable to parse CQL", e); - halt(400, "Unable to parse CQL filter"); - return null; - } - }); - - post("/cql/transform/:transformerId", cqlTransformHandler, GSON::toJson); - - post("/cql/validator/:validatorId", cqlValidationHandler, GSON::toJson); - - get( - "/geofeature/suggestions", - (req, res) -> { - String query = req.queryParams("q"); - List results = this.featureService.getSuggestedFeatureNames(query, 10); - List efficientPrependingResults = new LinkedList<>(results); - this.utmUpsCoordinateProcessor.enhanceResults(efficientPrependingResults, query); - this.mgrsCoordinateProcessor.enhanceResults(efficientPrependingResults, query); - this.dmsCoordinateProcessor.enhanceResults(efficientPrependingResults, query); - this.latLonCoordinateProcessor.enhanceResults(efficientPrependingResults, query); - return GSON.toJson(efficientPrependingResults); - }); - - get( - "/geofeature", - (req, res) -> { - String id = req.queryParams("id"); - SimpleFeature feature = this.featureService.getFeatureById(id); - if (feature == null) { - res.status(404); - return GSON.toJson(ImmutableMap.of(MESSAGE, "Feature not found")); - } - return new FeatureJSON().toString(feature); - }); - - exception( - UnsupportedQueryException.class, - (e, request, response) -> { - response.status(400); - response.header(CONTENT_TYPE, APPLICATION_JSON); - response.body(GSON.toJson(ImmutableMap.of(MESSAGE, "Unsupported query request."))); - LOGGER.error(QUERY_ENDPOINT_FAILED, e); - }); - - exception(IOException.class, util::handleIOException); - - exception(EntityTooLargeException.class, util::handleEntityTooLargeException); - - exception(RuntimeException.class, util::handleRuntimeException); - - exception( - Exception.class, - (e, request, response) -> { - response.status(500); - response.header(CONTENT_TYPE, APPLICATION_JSON); - response.body( - GSON.toJson(ImmutableMap.of(MESSAGE, "Error while processing query request."))); - LOGGER.error(QUERY_ENDPOINT_FAILED, e); - }); - } - - @Override - public Object apply(Object req) { - if (!(req instanceof List)) { - return JsonRpc.invalidParams("parameters not a list", req); - } - - List params = (List) req; - - if (params.size() != 1) { - return JsonRpc.invalidParams("must pass exactly 1 parameter", params); - } - - Object param = params.get(0); - - if (!(param instanceof String)) { - return JsonRpc.invalidParams("parameter not a string", param); - } - - CqlRequestImpl cqlRequest; - - try { - cqlRequest = GSON.fromJson((String) param, CqlRequestImpl.class); - } catch (RuntimeException e) { - return JsonRpc.invalidParams("parameter not valid json", param); - } - - try { - return cqlQueryUtil.executeCqlQuery(cqlRequest); - } catch (OAuthPluginException e) { - return JsonRpc.error( - e.getErrorType().getStatusCode(), - GSON.toJson(ImmutableMap.of(ID_KEY, e.getSourceId(), URL_KEY, e.getUrl()))); - } catch (UnsupportedQueryException e) { - LOGGER.error(QUERY_ENDPOINT_FAILED, e); - return JsonRpc.error(400, "Unsupported query request."); - } catch (RuntimeException e) { - LOGGER.debug("Exception occurred", e); - return JsonRpc.error(404, "Could not find what you were looking for"); - } catch (Exception e) { - LOGGER.error(QUERY_ENDPOINT_FAILED, e); - return JsonRpc.error(500, "Error while processing query request."); - } - } - - public void setFeatureService(FeatureService featureService) { - this.featureService = featureService; - } - - public void setEndpointUtil(EndpointUtil util) { - this.util = util; - } - - public void setCqlQueryUtil(CqlQueriesImpl cqlQueryUtil) { - this.cqlQueryUtil = cqlQueryUtil; - } - - private void addApplicableWarningsTo(CqlQueryResponse response) { - if (response.getQueryResponse() == null) { - LOGGER.debug( - "could not add warnings to the response {} because the field of the response which would contain the warnings is null", - response); - return; - } - - if (response.getWarnings() == null) { - LOGGER.debug( - "could not add warnings to the response {} because the application received a null value when it got the response's warnings", - response); - return; - } - - response - .getQueryResponse() - .getProcessingDetails() - .stream() - .map(sourceWarningsFilterManager::filterWarningsOf) - .map(ProcessingDetails::getWarnings) - .filter(Objects::nonNull) - .forEach(response.getWarnings()::addAll); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlQueryResponseImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlQueryResponseImpl.java deleted file mode 100644 index d3a62900129..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlQueryResponseImpl.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import static ddf.catalog.Constants.EXPERIMENTAL_FACET_RESULTS_KEY; - -import ddf.action.ActionRegistry; -import ddf.catalog.Constants; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.Result; -import ddf.catalog.filter.FilterAdapter; -import ddf.catalog.operation.FacetAttributeResult; -import ddf.catalog.operation.FacetValueCount; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.ResultHighlight; -import ddf.catalog.source.UnsupportedQueryException; -import java.io.Serializable; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.query.delegate.SearchTerm; -import org.codice.ddf.catalog.ui.query.delegate.SearchTermsDelegate; -import org.codice.ddf.catalog.ui.query.utility.CqlQueryResponse; -import org.codice.ddf.catalog.ui.query.utility.CqlResult; -import org.codice.ddf.catalog.ui.query.utility.MetacardAttribute; -import org.codice.ddf.catalog.ui.query.utility.Status; -import org.codice.ddf.catalog.ui.security.LogSanitizer; -import org.codice.ddf.catalog.ui.transformer.TransformerDescriptors; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class CqlQueryResponseImpl implements CqlQueryResponse { - - private static final Logger LOGGER = LoggerFactory.getLogger(CqlQueryResponseImpl.class); - - private static final SearchTermsDelegate SEARCH_TERMS_DELEGATE = new SearchTermsDelegate(); - - public static final String DID_YOU_MEAN = "didYouMean"; - public static final String SHOWING_RESULTS_FOR = "showingResultsFor"; - public static final String SPELLCHECK = "spellcheck"; - - private final List results; - - private final String id; - - private final Map> types; - - private final Map> facets; - - private final List showingResultsForFields, didYouMeanFields; - - private final Boolean userSpellcheckIsOn; - - private final Map statusBySource; - - private final List highlights; - - private final Set warnings = new HashSet<>(); - - // Transient so as not to be serialized to/from JSON - private final transient QueryResponse queryResponse; - - public CqlQueryResponseImpl( - String id, - QueryRequest request, - QueryResponse queryResponse, - String source, - boolean normalize, - FilterAdapter filterAdapter, - ActionRegistry actionRegistry, - TransformerDescriptors descriptors) { - this.id = id; - - this.queryResponse = queryResponse; - - AtomicBoolean logOnceState = new AtomicBoolean(false); - Consumer logOnce = - (str) -> { - if (logOnceState.compareAndSet(false, true)) { - LOGGER.debug(str); - } - }; - - types = - queryResponse - .getResults() - .stream() - .map(Result::getMetacard) - .filter(Objects::nonNull) - .map(Metacard::getMetacardType) - .filter(Objects::nonNull) - .collect(Collectors.toSet()) - .stream() - .collect( - Collectors.toMap( - MetacardType::getName, - mt -> - mt.getAttributeDescriptors() - .stream() - .collect( - Collectors.toMap( - AttributeDescriptor::getName, - MetacardAttributeImpl::new, - (ad1, ad2) -> { - logOnce.accept( - "Removed duplicate attribute descriptor(s). For more information:\n" - + "(log:set trace org.codice.ddf.catalog.ui.query.cql)"); - LOGGER.trace( - "Removed duplicate attribute descriptor.({})", - LogSanitizer.sanitize(ad1)); - return ad1; - })), - (mt1, mt2) -> { - LOGGER.debug("Removed duplicate metacard type."); - return mt1; - })); - - final Set searchTerms = extractSearchTerms(request.getQuery(), filterAdapter); - results = - queryResponse - .getResults() - .stream() - .map( - result -> - new CqlResultImpl( - result, - searchTerms, - queryResponse.getRequest(), - normalize, - filterAdapter, - actionRegistry)) - .map(cqlResult -> new CqlResultImpl(cqlResult, descriptors)) - .collect(Collectors.toList()); - - this.facets = getFacetResults(queryResponse.getPropertyValue(EXPERIMENTAL_FACET_RESULTS_KEY)); - this.didYouMeanFields = (List) queryResponse.getProperties().get(DID_YOU_MEAN); - this.showingResultsForFields = - (List) queryResponse.getProperties().get(SHOWING_RESULTS_FOR); - this.userSpellcheckIsOn = (Boolean) queryResponse.getProperties().get(SPELLCHECK); - this.highlights = - (List) queryResponse.getProperties().get(Constants.QUERY_HIGHLIGHT_KEY); - this.statusBySource = (Map) queryResponse.getProperties().get("statusBySource"); - } - - private Map> getFacetResults(Serializable facetResults) { - if (!(facetResults instanceof List)) { - return Collections.emptyMap(); - } - List list = (List) facetResults; - return list.stream() - .filter(result -> result instanceof FacetAttributeResult) - .map(result -> (FacetAttributeResult) result) - .collect( - Collectors.toMap( - FacetAttributeResult::getAttributeName, - FacetAttributeResult::getFacetValues, - (a, b) -> b)); - } - - private Set extractSearchTerms(Query query, FilterAdapter filterAdapter) { - Set searchTerms = Collections.emptySet(); - try { - searchTerms = filterAdapter.adapt(query, SEARCH_TERMS_DELEGATE); - } catch (UnsupportedQueryException e) { - LOGGER.debug("Unable to parse search terms", e); - } - return searchTerms; - } - - public QueryResponse getQueryResponse() { - return queryResponse; - } - - public List getResults() { - return results; - } - - public Map> getTypes() { - return types; - } - - public String getId() { - return id; - } - - public Set getWarnings() { - return warnings; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlRequestImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlRequestImpl.java deleted file mode 100644 index 7a292b0831e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlRequestImpl.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import org.apache.commons.collections4.CollectionUtils; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.codice.ddf.catalog.ui.query.utility.CqlRequest; - -public class CqlRequestImpl implements CqlRequest { - - private String id; - - private String src; - - private List srcs = Collections.emptyList(); - - private long timeout = 300000L; - - private int start = 1; - - private int count = 10; - - private String cql; - - private String queryType; - - private String batchId; - - private Boolean spellcheck; - - private Boolean phonetics; - - private String cacheId; - - private List sorts = Collections.emptyList(); - - private Set facets = Collections.emptySet(); - - private boolean normalize = false; - - private boolean excludeUnnecessaryAttributes = true; - - private boolean fromUI = false; - - private String additionalOptions; - - @Override - public String getCacheId() { - return cacheId; - } - - @Override - public void setCacheId(String cacheId) { - this.cacheId = cacheId; - } - - @Override - public Set getFacets() { - return facets; - } - - @Override - public void setFacets(Set facets) { - this.facets = facets; - } - - @Override - public List getSrcs() { - return srcs; - } - - @Override - public String getSrc() { - return src; - } - - @Override - public void setQueryType(String queryType) { - this.queryType = queryType; - } - - @Override - public String getQueryType() { - return queryType; - } - - @Override - public void setBatchId(String batchId) { - this.batchId = batchId; - } - - @Override - public String getBatchId() { - return batchId; - } - - @Override - public void setSpellcheck(boolean spellcheck) { - this.spellcheck = spellcheck; - } - - @Override - public boolean getSpellcheck() { - return spellcheck; - } - - @Override - public void setPhonetics(boolean phonetics) { - this.phonetics = phonetics; - } - - @Override - public boolean getPhonetics() { - return phonetics; - } - - @Override - public void setSrc(String src) { - this.src = src; - } - - @Override - public void setSrcs(List srcs) { - this.srcs = srcs; - } - - @Override - public long getTimeout() { - return timeout; - } - - @Override - public void setTimeout(long timeout) { - this.timeout = timeout; - } - - @Override - public int getStart() { - return start; - } - - @Override - public void setStart(int start) { - this.start = start; - } - - @Override - public int getCount() { - return count; - } - - @Override - public void setCount(int count) { - this.count = count; - } - - @Override - public String getCql() { - return cql; - } - - @Override - public void setCql(String cql) { - this.cql = cql; - } - - @Override - public List getSorts() { - return sorts; - } - - @Override - public void setSorts(List sorts) { - this.sorts = sorts; - } - - @Override - public boolean isNormalize() { - return normalize; - } - - @Override - public void setNormalize(boolean normalize) { - this.normalize = normalize; - } - - @Override - public void setAdditionalOptions(String additionalOptions) { - this.additionalOptions = additionalOptions; - } - - @Override - public String getAdditionalOptions() { - return additionalOptions; - } - - @Override - public QueryRequest createQueryRequest(String localSource, FilterBuilder filterBuilder) - throws CqlParseException { - - QueryRequestBuilder builder = - new QueryRequestBuilder(localSource, filterBuilder, sorts, start, count, timeout, id, cql); - - if (src != null) { - builder.setSrc(src); - } - - if (srcs != null) { - builder.setSources(srcs); - } - - builder.setExcludeUnnecessaryAttributes(excludeUnnecessaryAttributes); - - builder.setFromUI(fromUI); - - if (batchId != null) { - builder.setBatchId(batchId); - } - - if (queryType != null) { - builder.setQueryType(queryType); - } - - builder.setSpellcheck(spellcheck); - builder.setPhonetics(phonetics); - builder.setAdditionalOptions(additionalOptions); - - if (cacheId != null) { - builder.setCacheId(cacheId); - } - - if (facets != null) { - builder.setFacets(facets); - } - - return builder.build(); - } - - @Override - public String getSourceResponseString() { - if (!CollectionUtils.isEmpty(srcs)) { - return String.join(", ", srcs); - } else { - return src; - } - } - - @Override - public String getSource() { - return src; - } - - @Override - public String getId() { - return id; - } - - @Override - public void setId(String id) { - this.id = id; - } - - @Override - public boolean isExcludeUnnecessaryAttributes() { - return excludeUnnecessaryAttributes; - } - - @Override - public void setExcludeUnnecessaryAttributes(boolean excludeUnnecessaryAttributes) { - this.excludeUnnecessaryAttributes = excludeUnnecessaryAttributes; - } - - @Override - public boolean isFromUI() { - return fromUI; - } - - @Override - public void setFromUI(boolean fromUI) { - this.fromUI = fromUI; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlResultImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlResultImpl.java deleted file mode 100644 index f7bce10e27c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/CqlResultImpl.java +++ /dev/null @@ -1,327 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import ddf.action.Action; -import ddf.action.ActionRegistry; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeType; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.filter.FilterAdapter; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.catalog.transform.CatalogTransformerException; -import ddf.catalog.transformer.metacard.propertyjson.PropertyJsonMetacardTransformer; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.StringReader; -import java.text.ParseException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; -import org.apache.commons.lang3.StringUtils; -import org.codice.ddf.catalog.ui.query.delegate.SearchTerm; -import org.codice.ddf.catalog.ui.query.delegate.WktQueryDelegate; -import org.codice.ddf.catalog.ui.query.utility.CqlResult; -import org.codice.ddf.catalog.ui.transformer.TransformerDescriptors; -import org.joda.time.DateTime; -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; -import org.locationtech.spatial4j.context.SpatialContext; -import org.locationtech.spatial4j.context.SpatialContextFactory; -import org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory; -import org.locationtech.spatial4j.context.jts.ValidationRule; -import org.locationtech.spatial4j.distance.DistanceUtils; -import org.locationtech.spatial4j.io.ShapeReader; -import org.locationtech.spatial4j.shape.Shape; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class CqlResultImpl implements CqlResult { - - private static final Logger LOGGER = LoggerFactory.getLogger(CqlResultImpl.class); - - // For queries we use repairConvexHull which my cause false positives to be returned but this - // is better than potentially missing some results due to false negatives. - private static final Map SPATIAL_CONTEXT_ARGUMENTS = - ImmutableMap.of( - "spatialContextFactory", - JtsSpatialContextFactory.class.getName(), - "validationRule", - ValidationRule.repairConvexHull.name(), - "allowMultiOverlap", - "true"); - - private static final SpatialContext SPATIAL_CONTEXT = - SpatialContextFactory.makeSpatialContext( - SPATIAL_CONTEXT_ARGUMENTS, CqlResultImpl.class.getClassLoader()); - - private static final ShapeReader WKT_READER = SPATIAL_CONTEXT.getFormats().getWktReader(); - - private static final WktQueryDelegate WKT_QUERY_DELEGATE = new WktQueryDelegate(); - - private static final String CACHED = "cached"; - - private static final DateTimeFormatter ISO_8601_DATE_FORMAT = - DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ").withZoneUTC(); - - private Map matches = new HashMap<>(); - - private Map metacard; - - private Double distance; - - private Double relevance; - - private List actions; - - private boolean hasThumbnail; - - private boolean isResourceLocal; - - public CqlResultImpl(CqlResult result, TransformerDescriptors descriptors) { - this.hasThumbnail = result.getHasThumbnail(); - this.isResourceLocal = result.getIsResourceLocal(); - this.distance = result.getDistance(); - this.relevance = result.getRelevance(); - this.metacard = result.getMetacard(); - this.actions = - result - .getActions() - .stream() - .filter(action -> !isBlacklistedTransformer(descriptors, action.getId())) - .map( - action -> - new DisplayableAction( - action, getDisplayName(descriptors, action.getId(), action.getTitle()))) - .collect(Collectors.toList()); - } - - public CqlResultImpl( - Result result, - Set searchTerms, - QueryRequest queryRequest, - boolean normalize, - FilterAdapter filterAdapter, - ActionRegistry actionRegistry) { - - Metacard mc = result.getMetacard(); - - hasThumbnail = - Optional.of(mc).map(Metacard::getThumbnail).map(thumb -> thumb.length > 0).orElse(false); - - isResourceLocal = - Optional.of(mc) - .map(m -> m.getAttribute("internal.local-resource")) - .map(Attribute::getValue) - .filter(Boolean.class::isInstance) - .map(Boolean.class::cast) - .orElse(false); - - distance = normalizeDistance(result, queryRequest.getQuery(), filterAdapter); - - relevance = result.getRelevanceScore(); - if (normalize) { - countMatches(searchTerms, mc); - } - - actions = - actionRegistry - .list(result.getMetacard()) - .stream() - .map(action -> new DisplayableAction(action, action.getId())) - .collect(Collectors.toList()); - metacard = metacardToMap(result); - } - - private String getDisplayName(TransformerDescriptors descriptors, String id, String title) { - Map transformerDescriptor = descriptors.getMetacardTransformer(id); - - if (transformerDescriptor != null) { - return transformerDescriptor.get("displayName"); - } - - return title.replaceFirst("^Export( as)?\\s+\\b", ""); - } - - private static boolean isBlacklistedTransformer(TransformerDescriptors descriptors, String id) { - return descriptors - .getBlackListedMetacardTransformerIds() - .stream() - .anyMatch(s -> id.endsWith(s)); - } - - private void countMatches(Set searchTerms, Metacard mc) { - List textAttributes = - mc.getMetacardType() - .getAttributeDescriptors() - .stream() - .filter(Objects::nonNull) - .filter(CqlResultImpl::isTextAttribute) - .map(descriptor -> mc.getAttribute(descriptor.getName())) - .filter(Objects::nonNull) - .map(attribute -> Optional.ofNullable(attribute.getValue())) - .filter(Optional::isPresent) - .map(Optional::get) - .map(Object::toString) - .collect(Collectors.toList()); - - List terms = - searchTerms - .stream() - .filter(term -> !"*".equals(term.getTerm())) - .collect(Collectors.toList()); - - int totalTokens = 0; - for (String value : textAttributes) { - BufferedReader reader = new BufferedReader(new StringReader(value.toLowerCase())); - String line; - try { - while ((line = reader.readLine()) != null) { - String[] tokens = line.split("[\\s\\p{Punct}]+"); - for (String token : tokens) { - totalTokens++; - for (SearchTerm term : terms) { - if (term.match(token)) { - matches.put(term.getTerm(), matches.getOrDefault(term.getTerm(), 0) + 1); - } - } - } - } - } catch (IOException e) { - LOGGER.debug("Unable to read line", e); - } - matches.put("*", totalTokens); - } - } - - private void addCachedDate(Metacard metacard, Map json) { - Attribute cachedDate = metacard.getAttribute(CACHED); - if (cachedDate != null && cachedDate.getValue() != null) { - json.put(CACHED, ISO_8601_DATE_FORMAT.print(new DateTime(cachedDate.getValue()))); - } else { - json.put(CACHED, ISO_8601_DATE_FORMAT.print(new DateTime())); - } - } - - private Double normalizeDistance(Result result, Query query, FilterAdapter filterAdapter) { - Double resultDistance = result.getDistanceInMeters(); - - try { - String queryWkt = filterAdapter.adapt(query, WKT_QUERY_DELEGATE); - if (StringUtils.isNotBlank(queryWkt)) { - Shape queryShape = WKT_READER.read(queryWkt); - if (result.getMetacard() != null - && StringUtils.isNotBlank(result.getMetacard().getLocation())) { - Shape locationShape = WKT_READER.read(result.getMetacard().getLocation()); - - resultDistance = - DistanceUtils.degrees2Dist( - SPATIAL_CONTEXT.calcDistance( - locationShape.getCenter(), queryShape.getCenter()), - DistanceUtils.EARTH_MEAN_RADIUS_KM) - * 1000; - } - } - } catch (IOException | ParseException | UnsupportedQueryException e) { - LOGGER.debug("Unable to parse query wkt", e); - } - - if (resultDistance != null && (resultDistance < 0 || resultDistance > Double.MAX_VALUE)) { - resultDistance = null; - } - return resultDistance; - } - - private Map metacardToMap(Result result) { - Map geoJson = null; - MetacardImpl resultMetacard = - new MetacardImpl(result.getMetacard(), result.getMetacard().getMetacardType()); - try { - - for (AttributeDescriptor descriptor : - resultMetacard.getMetacardType().getAttributeDescriptors()) { - switch (descriptor.getType().getAttributeFormat()) { - case BINARY: - case XML: - case OBJECT: - resultMetacard.setAttribute(descriptor.getName(), null); - break; - default: - break; - } - } - - geoJson = - PropertyJsonMetacardTransformer.convertToJSON( - resultMetacard, - ImmutableList.of( - AttributeType.AttributeFormat.BINARY, - AttributeType.AttributeFormat.XML, - AttributeType.AttributeFormat.OBJECT)); - addCachedDate(resultMetacard, geoJson); - } catch (CatalogTransformerException e) { - LOGGER.debug("Unable to convert metacard to GeoJSON", e); - } - return geoJson; - } - - private static boolean isTextAttribute(AttributeDescriptor descriptor) { - switch (descriptor.getType().getAttributeFormat()) { - case STRING: - case XML: - return true; - default: - return false; - } - } - - public Map getMetacard() { - return metacard; - } - - public Double getDistance() { - return distance; - } - - public Double getRelevance() { - return relevance; - } - - public List getActions() { - return actions; - } - - public boolean getHasThumbnail() { - return hasThumbnail; - } - - public boolean getIsResourceLocal() { - return isResourceLocal; - } - - public Map getMatches() { - return matches; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/DisplayableAction.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/DisplayableAction.java deleted file mode 100644 index dcdd1ce8f3b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/DisplayableAction.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import ddf.action.Action; -import ddf.action.impl.ActionImpl; - -public class DisplayableAction extends ActionImpl { - - private String displayName; - - public DisplayableAction(Action action, String displayName) { - super(action.getId(), action.getTitle(), action.getDescription(), action.getUrl()); - this.displayName = displayName; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/MetacardAttributeImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/MetacardAttributeImpl.java deleted file mode 100644 index dd1f60a58b7..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/MetacardAttributeImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import ddf.catalog.data.AttributeDescriptor; -import org.codice.ddf.catalog.ui.query.utility.MetacardAttribute; - -public class MetacardAttributeImpl implements MetacardAttribute { - - private final String format; - - private final boolean multivalued; - - private final boolean indexed; - - public MetacardAttributeImpl(AttributeDescriptor descriptor) { - format = descriptor.getType().getAttributeFormat().toString(); - indexed = descriptor.isIndexed(); - multivalued = descriptor.isMultiValued(); - } - - public boolean getMultivalued() { - return multivalued; - } - - public boolean getIndexed() { - return indexed; - } - - public String getFormat() { - return format; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/QueryRequestBuilder.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/QueryRequestBuilder.java deleted file mode 100644 index f2be7cfdbd6..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/QueryRequestBuilder.java +++ /dev/null @@ -1,320 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import static ddf.catalog.Constants.ADDITIONAL_SORT_BYS; - -import com.google.common.collect.Sets; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.FilterDelegate; -import ddf.catalog.filter.impl.SortByImpl; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.impl.FacetedQueryRequest; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.operation.impl.TermFacetPropertiesImpl; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Locale; -import java.util.Set; -import java.util.stream.Collectors; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang.StringUtils; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.codice.ddf.catalog.ui.query.utility.CqlRequest; -import org.geotools.filter.text.cql2.CQLException; -import org.geotools.filter.text.ecql.ECQL; -import org.opengis.filter.Filter; -import org.opengis.filter.sort.SortBy; -import org.opengis.filter.sort.SortOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class QueryRequestBuilder { - - private static final Logger LOGGER = LoggerFactory.getLogger(QueryRequestBuilder.class); - - private static final String LOCAL_SOURCE = "local"; - - private static final String CACHE_SOURCE = "cache"; - - private static final String DEFAULT_SORT_ORDER = "desc"; - - private static final String MODE = "mode"; - - private static final String UPDATE = "update"; - - private final String localSource; - - private final FilterBuilder filterBuilder; - - private final List sorts; - - private final int start; - - private final int count; - - private final long timeout; - - private List srcs = Collections.emptyList(); - - private String src; - - private boolean excludeUnnecessaryAttributes = true; - - private boolean fromUI = false; - - private final String id; - - private String batchId; - - private String queryType; - - private Boolean spellcheck; - - private Boolean phonetics; - - private String cacheId; - - private Set facets = Collections.emptySet(); - - private String additionalOptions; - - private final String cql; - - public QueryRequestBuilder( - String localSource, - FilterBuilder filterBuilder, - List sorts, - int start, - int count, - long timeout, - String id, - String cql) { - this.localSource = localSource; - this.filterBuilder = filterBuilder; - this.sorts = sorts; - this.start = start; - this.count = count; - this.timeout = timeout; - this.id = id; - this.cql = cql; - } - - public QueryRequestBuilder setSrc(String src) { - this.src = src; - return this; - } - - public QueryRequestBuilder setSources(List srcs) { - this.srcs = srcs; - return this; - } - - public QueryRequestBuilder setExcludeUnnecessaryAttributes( - boolean isExcludeUnnecessaryAttributes) { - this.excludeUnnecessaryAttributes = isExcludeUnnecessaryAttributes; - return this; - } - - public QueryRequestBuilder setFromUI(boolean fromUI) { - this.fromUI = fromUI; - return this; - } - - public QueryRequestBuilder setBatchId(String batchId) { - this.batchId = batchId; - return this; - } - - public QueryRequestBuilder setQueryType(String queryType) { - this.queryType = queryType; - return this; - } - - public QueryRequestBuilder setSpellcheck(Boolean isSpellcheck) { - this.spellcheck = isSpellcheck; - return this; - } - - public QueryRequestBuilder setPhonetics(Boolean isPhonetics) { - this.phonetics = isPhonetics; - return this; - } - - public QueryRequestBuilder setAdditionalOptions(String additionalOptions) { - this.additionalOptions = additionalOptions; - return this; - } - - public QueryRequestBuilder setCacheId(String cacheId) { - this.cacheId = cacheId; - return this; - } - - public QueryRequestBuilder setFacets(Set facets) { - this.facets = facets; - return this; - } - - public QueryRequest build() throws CqlParseException { - - List sortBys = - sorts == null - ? new ArrayList<>() - : sorts - .stream() - .filter( - s -> - StringUtils.isNotEmpty(s.getAttribute()) - && StringUtils.isNotEmpty(s.getDirection())) - .map(s -> parseSort(s.getAttribute(), s.getDirection())) - .collect(Collectors.toList()); - if (sortBys.isEmpty()) { - sortBys.add(new SortByImpl(Result.TEMPORAL, DEFAULT_SORT_ORDER)); - } - Query query = - new QueryImpl(createFilter(filterBuilder), start, count, sortBys.get(0), true, timeout); - - QueryRequest queryRequest; - if (!CollectionUtils.isEmpty(srcs)) { - parseSrcs(localSource); - queryRequest = new QueryRequestImpl(query, srcs); - queryRequest.getProperties().put(MODE, UPDATE); - } else { - String source = parseSrc(localSource); - if (CACHE_SOURCE.equals(source)) { - queryRequest = new QueryRequestImpl(query, true); - queryRequest.getProperties().put(MODE, CACHE_SOURCE); - } else { - queryRequest = new QueryRequestImpl(query, Collections.singleton(source)); - queryRequest.getProperties().put(MODE, UPDATE); - } - } - - queryRequest = facetQueryRequest(queryRequest); - - if (excludeUnnecessaryAttributes) { - queryRequest - .getProperties() - .put("excludeAttributes", Sets.newHashSet(Metacard.METADATA, "lux")); - } - - if (sortBys.size() > 1) { - queryRequest - .getProperties() - .put(ADDITIONAL_SORT_BYS, sortBys.subList(1, sortBys.size()).toArray(new SortBy[0])); - } - - queryRequest.getProperties().put("requestId", id); - - if (StringUtils.isNotEmpty(batchId)) { - queryRequest.getProperties().put("batchId", batchId); - } - - if (StringUtils.isNotEmpty(queryType)) { - queryRequest.getProperties().put("queryType", queryType); - } - - if (spellcheck != null) { - queryRequest.getProperties().put("spellcheck", spellcheck); - } - - if (phonetics != null) { - queryRequest.getProperties().put("phonetics", phonetics); - } - - if (additionalOptions != null) { - queryRequest.getProperties().put("additionalOptions", additionalOptions); - } - - if (cacheId != null) { - queryRequest.getProperties().put("cacheId", cacheId); - } - - queryRequest.getProperties().put("fromUI", fromUI); - - return queryRequest; - } - - private QueryRequest facetQueryRequest(QueryRequest request) { - if (facets.isEmpty()) { - return request; - } - - return new FacetedQueryRequest( - request.getQuery(), - request.isEnterprise(), - request.getSourceIds(), - request.getProperties(), - new TermFacetPropertiesImpl(facets)); - } - - private Filter createFilter(FilterBuilder filterBuilder) throws CqlParseException { - - Filter filter; - try { - filter = ECQL.toFilter(cql); - } catch (CQLException e) { - throw new CqlParseException(e); - } - - if (filter == null) { - LOGGER.debug("Received an empty filter. Using a wildcard contextual filter instead."); - filter = - filterBuilder.attribute(Metacard.ANY_TEXT).is().like().text(FilterDelegate.WILDCARD_CHAR); - } - - return filter; - } - - private String parseSrc(String localSource) { - if (StringUtils.equalsIgnoreCase(src, LOCAL_SOURCE) || StringUtils.isBlank(src)) { - src = localSource; - } - - return src; - } - - private void parseSrcs(String localSource) { - for (int i = 0; i < srcs.size(); i++) { - if (StringUtils.equalsIgnoreCase(srcs.get(i), LOCAL_SOURCE)) { - srcs.set(i, localSource); - } - } - } - - private SortBy parseSort(String sortField, String sortOrder) { - SortBy sort; - switch (sortOrder.toLowerCase(Locale.getDefault())) { - case "ascending": - case "asc": - sort = new SortByImpl(sortField, SortOrder.ASCENDING); - break; - case "descending": - case "desc": - sort = new SortByImpl(sortField, SortOrder.DESCENDING); - break; - default: - throw new IllegalArgumentException( - "Incorrect sort order received, must be 'asc', 'ascending', 'desc', or 'descending'"); - } - - return sort; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/QueryRequestFactoryImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/QueryRequestFactoryImpl.java deleted file mode 100644 index 9562ebf5966..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/QueryRequestFactoryImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import java.util.List; -import java.util.Set; -import javax.annotation.Nullable; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.codice.ddf.catalog.ui.query.utility.CqlRequest; -import org.codice.ddf.catalog.ui.query.utility.QueryRequestFactory; - -public class QueryRequestFactoryImpl implements QueryRequestFactory { - @Override - public QueryRequest build( - String localSource, - FilterBuilder filterBuilder, - List sorts, - int start, - int count, - long timeout, - String id, - String cql, - @Nullable String src, - @Nullable List srcs, - boolean isExcludeUnnecessaryAttribute, - @Nullable String batchId, - @Nullable String queryType, - boolean isSpellcheck, - boolean isPhonetics, - @Nullable String cacheId, - @Nullable Set facets, - boolean fromUI) - throws CqlParseException { - - QueryRequestBuilder builder = - new QueryRequestBuilder(localSource, filterBuilder, sorts, start, count, timeout, id, cql); - - if (src != null) { - builder.setSrc(src); - } - - if (srcs != null) { - builder.setSources(srcs); - } - - builder.setExcludeUnnecessaryAttributes(isExcludeUnnecessaryAttribute); - - builder.setFromUI(fromUI); - - if (batchId != null) { - builder.setBatchId(batchId); - } - - if (queryType != null) { - builder.setQueryType(queryType); - } - - builder.setSpellcheck(isSpellcheck); - builder.setPhonetics(isPhonetics); - - if (cacheId != null) { - builder.setCacheId(cacheId); - } - - if (facets != null) { - builder.setFacets(facets); - } - - return builder.build(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/SourceWarningsFilterManager.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/SourceWarningsFilterManager.java deleted file mode 100644 index 313b9454266..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/SourceWarningsFilterManager.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import ddf.catalog.operation.ProcessingDetails; -import ddf.catalog.operation.impl.ProcessingDetailsImpl; -import ddf.catalog.security.SourceWarningsFilter; -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -/** - * A {@code SourceWarningsFilterManager} {@linkplain #filterWarningsOf(ProcessingDetails) filters - * the {@code warnings} of} {@link ProcessingDetails} with the {@linkplain - * #getBestCompatibleFilterFor(ProcessingDetails) best compatible} {@link SourceWarningsFilter} in - * its {@code filters}} such that the {@link ProcessingDetails} only contain {@code warnings} which - * the {@link SourceWarningsFilter} deems useful to the user. - */ -public class SourceWarningsFilterManager { - - private final List filters; - - public SourceWarningsFilterManager(List filters) { - if (filters == null) { - throw new IllegalArgumentException( - "the constructor of SourceWarningsFilterManager received a null List of Filters"); - } - - this.filters = filters; - } - - public ProcessingDetails filterWarningsOf(ProcessingDetails processingDetails) { - if (!canInspect(processingDetails)) { - return new ProcessingDetailsImpl(); - } - - return getBestCompatibleFilterFor(processingDetails) - .map(bestFilter -> bestFilter.filter(processingDetails)) - .orElse(new ProcessingDetailsImpl()); - } - - private boolean canInspect(ProcessingDetails processingDetails) { - return processingDetails != null && !filters.isEmpty(); - } - - private Optional getBestCompatibleFilterFor( - ProcessingDetails processingDetails) { - return filters - .stream() - .filter(Objects::nonNull) - .filter(filter -> filter.canFilter(processingDetails)) - .findFirst(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/StatusImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/StatusImpl.java deleted file mode 100644 index ccd41e698c5..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/cql/StatusImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import ddf.catalog.operation.ProcessingDetails; -import ddf.catalog.operation.QueryResponse; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.query.utility.Status; - -public class StatusImpl implements Status { - - private final long hits; - - private final long count; - - private final long elapsed; - - private final String id; - - private final boolean successful; - - private List warnings = new ArrayList<>(); - - private List errors = new ArrayList<>(); - - public StatusImpl(QueryResponse response, String source, long elapsedTime) { - elapsed = elapsedTime; - id = source; - - count = response.getResults().size(); - hits = response.getHits(); - successful = isSuccessful(response.getProcessingDetails()); - warnings = getWarnings(response.getProcessingDetails()); - errors = getErrors(response.getProcessingDetails()); - } - - public StatusImpl( - String source, long count, long elapsedTime, long hits, Set details) { - this.id = source; - this.count = count; - this.hits = hits; - this.elapsed = elapsedTime; - this.successful = isSuccessful(details); - this.warnings = getWarnings(details); - this.errors = getErrors(details); - } - - private boolean isSuccessful(final Set details) { - for (ProcessingDetails detail : details) { - if (detail.hasException()) { - return false; - } - } - return true; - } - - private List getWarnings(final Set details) { - return details - .stream() - .filter(detail -> !detail.hasException()) - .map(detail -> detail.getWarnings()) - .flatMap(procesingWarnings -> procesingWarnings.stream()) - .collect(Collectors.toList()); - } - - private List getErrors(final Set details) { - return details - .stream() - .filter(detail -> detail.hasException()) - .map(detail -> detail.getWarnings()) - .flatMap(procesingWarnings -> procesingWarnings.stream()) - .collect(Collectors.toList()); - } - - public long getHits() { - return hits; - } - - public long getElapsed() { - return elapsed; - } - - public String getId() { - return id; - } - - public long getCount() { - return count; - } - - public boolean getSuccessful() { - return successful; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/SearchTerm.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/SearchTerm.java deleted file mode 100644 index f3251875c9e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/SearchTerm.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.delegate; - -import java.util.regex.Pattern; -import org.codice.util.tlmatcher.TimeLimitedMatcher; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SearchTerm { - private static final Logger LOGGER = LoggerFactory.getLogger(SearchTerm.class); - - private final String term; - - private final Pattern pattern; - - private final String cqlTerm; - - public SearchTerm(String searchTerm) { - term = searchTerm.toLowerCase(); - cqlTerm = searchTerm.replace("*", "%"); - - if (searchTerm.contains("*")) { - pattern = Pattern.compile("^" + searchTerm.replace("*", ".*"), Pattern.CASE_INSENSITIVE); - } else { - pattern = null; - } - } - - public String getCqlTerm() { - return cqlTerm; - } - - public String getTerm() { - return term; - } - - public boolean match(String other) { - if ("*".equals(term)) { - return true; - } - if (pattern != null) { - try { - return TimeLimitedMatcher.create(pattern, other).matches(); - } catch (TimeLimitedMatcher.TimeoutException e) { - LOGGER.warn("Timeout performing RegEx match for {} against string {}", term, other); - return false; - } - } else { - return term.equals(other); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/SearchTermsDelegate.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/SearchTermsDelegate.java deleted file mode 100644 index 437aeda2c2e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/SearchTermsDelegate.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.delegate; - -import ddf.catalog.filter.impl.SimpleFilterDelegate; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -public class SearchTermsDelegate extends SimpleFilterDelegate> { - - @Override - public Set defaultOperation( - Object property, S literal, Class literalClass, Enum operation) { - return Collections.emptySet(); - } - - @Override - public Set propertyIsLike( - String propertyName, String pattern, boolean isCaseSensitive) { - String[] patternWords = pattern.toLowerCase().split("[\\s\\p{Punct}&&[^*]]+"); - - return Arrays.stream(patternWords).map(SearchTerm::new).collect(Collectors.toSet()); - } - - @Override - public Set and(List> operands) { - return operands.stream().flatMap(Collection::stream).collect(Collectors.toSet()); - } - - @Override - public Set or(List> operands) { - return operands.stream().flatMap(Collection::stream).collect(Collectors.toSet()); - } - - @Override - public Set not(Set operand) { - return Collections.emptySet(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/WktQueryDelegate.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/WktQueryDelegate.java deleted file mode 100644 index a145fdbbfc1..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/delegate/WktQueryDelegate.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.delegate; - -import ddf.catalog.filter.impl.SimpleFilterDelegate; -import java.util.List; - -public class WktQueryDelegate extends SimpleFilterDelegate { - - @Override - public String defaultOperation( - Object property, S literal, Class literalClass, Enum operation) { - return ""; - } - - @Override - public String spatialOperation( - String propertyName, - S wkt, - Class wktClass, - SpatialPropertyOperation spatialPropertyOperation) { - return wkt.toString(); - } - - @Override - public String and(List operands) { - return operands.stream().filter(op -> !"".equals(op)).findFirst().orElse(""); - } - - @Override - public String or(List operands) { - return operands.stream().filter(op -> !"".equals(op)).findFirst().orElse(""); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/feedback/FeedbackException.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/feedback/FeedbackException.java deleted file mode 100644 index 8255ebc96a4..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/feedback/FeedbackException.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.feedback; - -public class FeedbackException extends Exception { - private static final long serialVersionUID = 1L; - - /** Constructs new exception. */ - public FeedbackException() { - super(); - } - - /** - * Constructs new exception with given message. - * - * @param message the detail message. - */ - public FeedbackException(String message) { - super(message); - } - - /** - * Constructs new exception with given message and cause. - * - * @param message the detail message. - * @param cause the cause. - */ - public FeedbackException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructs new exception with the given cause. - * - * @param cause the cause. - */ - public FeedbackException(Throwable cause) { - super(cause); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/feedback/FeedbackRequest.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/feedback/FeedbackRequest.java deleted file mode 100644 index 4c0e6c64a96..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/feedback/FeedbackRequest.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.feedback; - -public class FeedbackRequest { - private String username; - - private String email; - - private String authUsername; - - private String workspaceId; - - private String workspaceName; - - private String query; - - private String queryInitiated; - - private String queryResults; - - private String queryStatus; - - private String comments; - - public FeedbackRequest() {} - - /** - * Username providing feedback. - * - * @return username - */ - public String getUsername() { - return username; - } - - /** - * Sets the username for the user providing feedback. - * - * @param username Username from the search UI. - */ - public void setUsername(String username) { - this.username = username; - } - - /** - * Email for the user providing feedback. - * - * @return email - */ - public String getEmail() { - return email; - } - - /** - * Set the email address for the user providing feedback. - * - * @param email User's email address. - */ - public void setEmail(String email) { - this.email = email; - } - - /** - * The workspace ID that the feedback pertains to. - * - * @return workspaceId - */ - public String getWorkspaceId() { - return workspaceId; - } - - /** - * Set the workspace id from which the feedback comments are being provided. - * - * @param workspaceId Specific workspace id - */ - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - } - - /** - * Workspace name that the feedback pertains to. - * - * @return workspaceName - */ - public String getWorkspaceName() { - return workspaceName; - } - - /** - * Set the workspace id from which the feedback comments are being provided - * - * @param workspaceName Friendly name of the workspace as set by the workspace creator - */ - public void setWorkspaceName(String workspaceName) { - this.workspaceName = workspaceName; - } - - /** - * Authenticated username from the service side receiving feedback. - * - * @return authUsername - */ - public String getAuthUsername() { - return authUsername; - } - - /** - * Set the authenticated username as known by the service receiving the feedback comments. - * - * @param authUsername Authenticated username - */ - public void setAuthUsername(String authUsername) { - this.authUsername = authUsername; - } - - /** - * The catalog query. - * - * @return query - */ - public String getQuery() { - return query; - } - - /** - * Set the specific query that was executed. - * - * @param query Query that was executed. - */ - public void setQuery(String query) { - this.query = query; - } - - /** - * The time that the query was initiated. - * - * @return queryInitiated - */ - public String getQueryInitiated() { - return queryInitiated; - } - - /** - * Sets the time that the query was initiated. - * - * @param queryInitiated Time of query. - */ - public void setQueryInitiated(String queryInitiated) { - this.queryInitiated = queryInitiated; - } - - /** - * Results from the query. - * - * @return queryResults - */ - public String getQueryResults() { - return queryResults; - } - - /** - * Sets the query results - * - * @param queryResults - Query results from the search criteria provided back to the user. - */ - public void setQueryResults(String queryResults) { - this.queryResults = queryResults; - } - - /** - * Status of the query as returned to the UI - * - * @return queryStatus - */ - public String getQueryStatus() { - return queryStatus; - } - - /** - * Sets the query status - * - * @param queryStatus Query status from the search. - */ - public void setQueryStatus(String queryStatus) { - this.queryStatus = queryStatus; - } - - /** - * User provided comments about the query. - * - * @return comments - */ - public String getComments() { - return comments; - } - - /** - * Set the user provided comments about the query. - * - * @param comments User query comments. - */ - public void setComments(String comments) { - this.comments = comments; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/geofeature/FeatureService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/geofeature/FeatureService.java deleted file mode 100644 index 9d34b0e63ca..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/geofeature/FeatureService.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.geofeature; - -import java.util.List; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.opengis.feature.simple.SimpleFeature; - -/** - * This code is experimental. While this interface is functional and tested, it may change or be - * removed in a future version of the library. - */ -public interface FeatureService { - /** - * Searches for geographic features by name, returning the names of the closest n matches. - * Intended for use by an autocomplete widget. - * - * @param query search term - * @param maxResults maximum number of results to return - * @return list of names found - */ - List getSuggestedFeatureNames(String query, int maxResults); - - /** - * Retrieves a specific geographic feature by its exact id (as returned by - * getSuggestedFeatureNames). - * - * @param id id of a geographic feature - * @return the feature if found, otherwise null - */ - SimpleFeature getFeatureById(String id); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/geofeature/GazetteerFeatureService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/geofeature/GazetteerFeatureService.java deleted file mode 100644 index 04bc0628799..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/geofeature/GazetteerFeatureService.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.geofeature; - -import static org.codice.ddf.spatial.geocoding.GeoCodingConstants.COUNTRY_FEATURE_CODES; - -import com.google.common.annotations.VisibleForTesting; -import java.util.Collections; -import java.util.List; -import org.apache.commons.collections.CollectionUtils; -import org.codice.ddf.spatial.geocoder.GeoResult; -import org.codice.ddf.spatial.geocoder.GeoResultCreator; -import org.codice.ddf.spatial.geocoding.FeatureQueryException; -import org.codice.ddf.spatial.geocoding.FeatureQueryable; -import org.codice.ddf.spatial.geocoding.GeoEntry; -import org.codice.ddf.spatial.geocoding.GeoEntryQueryException; -import org.codice.ddf.spatial.geocoding.GeoEntryQueryable; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.geotools.feature.simple.SimpleFeatureBuilder; -import org.geotools.feature.simple.SimpleFeatureTypeBuilder; -import org.geotools.geometry.jts.JTS; -import org.geotools.referencing.crs.DefaultGeographicCRS; -import org.locationtech.jts.geom.Envelope; -import org.locationtech.jts.geom.Geometry; -import org.locationtech.jts.geom.Polygon; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.geometry.primitive.Point; -import org.osgi.service.blueprint.container.ServiceUnavailableException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Implements a FeatureService using gazetteer(s). Currently the only gazetteer is provided by the - * GeoEntryQueryable interface, which queries geonames.org data. It is intended that more will be - * added and the results federated. - */ -public class GazetteerFeatureService implements FeatureService { - private static final Logger LOGGER = LoggerFactory.getLogger(GazetteerFeatureService.class); - - private GeoEntryQueryable geoEntryQueryable; - - private FeatureQueryable featureQueryable; - - public void setGeoEntryQueryable(GeoEntryQueryable geoEntryQueryable) { - this.geoEntryQueryable = geoEntryQueryable; - } - - public void setFeatureQueryable(FeatureQueryable featureQueryable) { - this.featureQueryable = featureQueryable; - } - - @Override - public List getSuggestedFeatureNames(String query, int maxResults) { - try { - return geoEntryQueryable.getSuggestedNames(query, maxResults); - } catch (GeoEntryQueryException e) { - LOGGER.debug("Suggestion query failed", e); - } - return Collections.emptyList(); - } - - @Override - public SimpleFeature getFeatureById(String id) { - GeoEntry entry; - try { - entry = this.geoEntryQueryable.queryById(id); - } catch (GeoEntryQueryException e) { - LOGGER.debug("Error while making feature service request.", e); - return null; - } - if (entry == null) { - return null; - } - - if (COUNTRY_FEATURE_CODES.contains(entry.getFeatureCode())) { - SimpleFeature feature = findCountryShape(entry); - if (feature != null) { - return feature; - } - } - - return getFeatureFromGeoResult(GeoResultCreator.createGeoResult(entry)); - } - - private SimpleFeature findCountryShape(GeoEntry entry) { - String countryCode = entry.getCountryCode(); - - if (countryCode == null) { - return null; - } - - try { - List countries = this.featureQueryable.query(countryCode, null, 1); - if (CollectionUtils.isNotEmpty(countries)) { - return countries.get(0); - } - } catch (FeatureQueryException e) { - LOGGER.debug("Error while querying for feature.", e); - } catch (ServiceUnavailableException e) { - LOGGER.debug("Feature index unavailable", e); - } - return null; - } - - private static SimpleFeature getFeatureFromGeoResult(GeoResult geoResult) { - Polygon polygon = getPolygonFromBBox(geoResult.getBbox()); - SimpleFeatureBuilder builder = getSimpleFeatureBuilder(polygon); - return builder.buildFeature(geoResult.getFullName()); - } - - @VisibleForTesting - static SimpleFeatureBuilder getSimpleFeatureBuilder(Geometry geometry) { - SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder(); - typeBuilder.setName("featureType"); - typeBuilder.setCRS(DefaultGeographicCRS.WGS84); - typeBuilder.add("coordinates", geometry.getClass()); - SimpleFeatureType featureType = typeBuilder.buildFeatureType(); - SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType); - builder.add(geometry); - return builder; - } - - private static Polygon getPolygonFromBBox(List bbox) { - double[] p0 = bbox.get(0).getDirectPosition().getCoordinate(); - double[] p1 = bbox.get(1).getDirectPosition().getCoordinate(); - Envelope envelope = new Envelope(); - envelope.expandToInclude(p0[0], p0[1]); - envelope.expandToInclude(p1[0], p1[1]); - return JTS.toGeometry(envelope); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/handlers/CqlTransformHandler.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/handlers/CqlTransformHandler.java deleted file mode 100644 index c446895213e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/handlers/CqlTransformHandler.java +++ /dev/null @@ -1,539 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.handlers; - -import static java.util.stream.Collectors.toList; - -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeType; -import ddf.catalog.data.BinaryContent; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.federation.FederationException; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.operation.impl.QueryResponseImpl; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.catalog.transform.CatalogTransformerException; -import ddf.catalog.transform.QueryResponseTransformer; -import ddf.catalog.util.impl.CollectionResultComparator; -import ddf.catalog.util.impl.DistanceResultComparator; -import ddf.catalog.util.impl.RelevanceResultComparator; -import ddf.security.audit.SecurityLogger; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.Serializable; -import java.time.Instant; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import javax.ws.rs.core.HttpHeaders; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.tika.mime.MimeTypeException; -import org.apache.tika.mime.MimeTypes; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.codice.ddf.catalog.ui.metacard.transformer.CsvTransformImpl; -import org.codice.ddf.catalog.ui.query.cql.CqlRequestImpl; -import org.codice.ddf.catalog.ui.query.utility.CqlQueryResponse; -import org.codice.ddf.catalog.ui.query.utility.CqlRequest; -import org.codice.ddf.catalog.ui.util.CqlQueriesImpl; -import org.codice.ddf.catalog.ui.util.CswConstants; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.gsonsupport.GsonTypeAdapters.DateLongFormatTypeAdapter; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.eclipse.jetty.http.HttpStatus; -import org.geotools.filter.text.ecql.ECQL; -import org.opengis.filter.sort.SortOrder; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.Request; -import spark.Response; -import spark.Route; -import spark.utils.IOUtils; - -public class CqlTransformHandler implements Route { - - public static final String TRANSFORMER_ID_PROPERTY = "id"; - - private static final Logger LOGGER = LoggerFactory.getLogger(CqlTransformHandler.class); - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .registerTypeAdapter(Date.class, new DateLongFormatTypeAdapter()) - .create(); - - private EndpointUtil util; - private List queryResponseTransformers; - private BundleContext bundleContext; - private CqlQueriesImpl cqlQueryUtil; - private SecurityLogger securityLogger; - - public CqlTransformHandler( - List queryResponseTransformers, - BundleContext bundleContext, - EndpointUtil endpointUtil, - CqlQueriesImpl cqlQueryUtil, - SecurityLogger securityLogger) { - this.queryResponseTransformers = queryResponseTransformers; - this.bundleContext = bundleContext; - this.util = endpointUtil; - this.cqlQueryUtil = cqlQueryUtil; - this.securityLogger = securityLogger; - } - - public class Arguments { - private Map args; - - public Arguments() { - this.args = Collections.emptyMap(); - } - - public void setArguments(Map arguments) { - this.args = arguments; - } - - public Map getArguments() { - return this.args; - } - - public Map getSerializableArguments() { - if (this.args != null) { - return this.args - .entrySet() - .stream() - .map( - entry -> - entry.getValue() instanceof CharSequence - ? new AbstractMap.SimpleEntry<>(entry.getKey(), entry.getValue().toString()) - : entry) - .filter(entry -> entry.getValue() instanceof Serializable) - .collect(Collectors.toMap(Map.Entry::getKey, e -> (Serializable) e.getValue())); - } - return Collections.emptyMap(); - } - } - - public class CqlTransformRequest { - private String exportTitle = String.format("export-%s", Instant.now().toString()); - private List searches = Collections.emptyList(); - private int count = 0; - private List sorts = Collections.emptyList(); - private boolean phonetics = false; - private boolean spellcheck = false; - private List hiddenResults = Collections.emptyList(); - private String additionalOptions = null; - - public void setSearches(List searches) { - this.searches = searches; - } - - public List getSearches() { - return this.searches; - } - - public void setCount(int count) { - this.count = count; - } - - public int getCount() { - return this.count; - } - - public void setPhonetics(boolean phonetics) { - this.phonetics = phonetics; - } - - public boolean getPhonetics() { - return this.phonetics; - } - - public void setSpellcheck(boolean spellcheck) { - this.spellcheck = spellcheck; - } - - public boolean getSpellcheck() { - return this.spellcheck; - } - - public void setSorts(List sorts) { - this.sorts = sorts; - } - - public List getSorts() { - return this.sorts; - } - - public void setHiddenResults(List hiddenResults) { - this.hiddenResults = hiddenResults; - } - - public List getHiddenResults() { - return this.hiddenResults; - } - - public void setAdditionalOptions(String additionalOptions) { - this.additionalOptions = additionalOptions; - } - - public String getAdditionalOptions() { - return this.additionalOptions; - } - } - - @Override - public Object handle(Request request, Response response) throws Exception { - String transformerId = request.params(":transformerId"); - String body = util.safeGetBody(request); - CqlTransformRequest cqlTransformRequest; - - try { - cqlTransformRequest = GSON.fromJson(body, CqlTransformRequest.class); - } catch (IllegalArgumentException | ArrayIndexOutOfBoundsException e) { - LOGGER.debug("Error fetching cql request"); - response.status(HttpStatus.BAD_REQUEST_400); - return ImmutableMap.of("message", "Error retrieving cql request"); - } - - List cqlRequests = - cqlTransformRequest - .getSearches() - .stream() - .filter( - cqlRequest -> - cqlRequest.getCql() != null - && (cqlRequest.getSrc() != null - || CollectionUtils.isNotEmpty(cqlRequest.getSrcs()))) - .collect(toList()); - - cqlRequests.forEach( - cqlRequest -> { - cqlRequest.setSorts(cqlTransformRequest.getSorts()); - cqlRequest.setPhonetics((cqlTransformRequest.getPhonetics())); - cqlRequest.setSpellcheck((cqlTransformRequest.getSpellcheck())); - cqlRequest.setAdditionalOptions(cqlTransformRequest.getAdditionalOptions()); - }); - - if (CollectionUtils.isEmpty(cqlRequests)) { - LOGGER.debug("Cql not found in request"); - response.status(HttpStatus.BAD_REQUEST_400); - return ImmutableMap.of("message", "Cql not found in request"); - } - - Map arguments = - GSON.fromJson(body, Arguments.class).getSerializableArguments(); - - LOGGER.trace("Finding transformer to transform query response."); - - ServiceReference queryResponseTransformer = - queryResponseTransformers - .stream() - .filter( - transformer -> - transformerId.equals(transformer.getProperty(TRANSFORMER_ID_PROPERTY))) - .findFirst() - .orElse(null); - - if (queryResponseTransformer == null) { - LOGGER.debug("Could not find transformer with id: {}", transformerId); - response.status(HttpStatus.NOT_FOUND_404); - return ImmutableMap.of("message", "Service not found"); - } - - List results = - cqlRequests - .stream() - .map( - cqlRequest -> { - CqlQueryResponse cqlQueryResponse = null; - try { - cqlQueryResponse = cqlQueryUtil.executeCqlQuery(cqlRequest); - } catch (UnsupportedQueryException - | SourceUnavailableException - | FederationException - | CqlParseException e) { - LOGGER.debug("Error fetching cql request for {}", cqlRequest.getSrc()); - return null; - } - return cqlQueryResponse.getQueryResponse().getResults(); - }) - .filter(cqlResults -> CollectionUtils.isNotEmpty(cqlResults)) - .flatMap(cqlResults -> cqlResults.stream()) - .collect(toList()); - - results.sort(getResultComparators(cqlTransformRequest.getSorts())); - - results = - results.size() > cqlTransformRequest.getCount() - ? results.subList(0, cqlTransformRequest.getCount()) - : results; - - results = - CollectionUtils.isEmpty(cqlTransformRequest.getHiddenResults()) - ? results - : results - .stream() - .filter( - result -> - !cqlTransformRequest - .getHiddenResults() - .contains(result.getMetacard().getId())) - .collect(toList()); - - String exportTitle = - (results.size() == 1) - ? results.get(0).getMetacard().getId() - : String.format("export-%s", Instant.now().toString()); - - Map> exportsBySource = - results - .stream() - .collect( - Collectors.toMap( - result -> result.getMetacard().getSourceId(), - result -> new ArrayList<>(Arrays.asList(result.getMetacard().getId())), - (existing, replacement) -> { - existing.addAll(replacement); - return existing; - })); - - for (Map.Entry sourceExportMap : exportsBySource.entrySet()) { - securityLogger.audit( - String.format( - "exported metacards: %s from source: %s to format: %s", - sourceExportMap.getValue(), sourceExportMap.getKey(), transformerId)); - } - - QueryResponse combinedResponse = - new QueryResponseImpl( - new QueryRequestImpl(new QueryImpl(ECQL.toFilter(cqlRequests.get(0).getCql()))), - results, - results.size()); - - Object schema = queryResponseTransformer.getProperty("schema"); - - List mimeTypeServiceProperty = - queryResponseTransformer.getProperty("mime-type") instanceof List - ? (List) queryResponseTransformer.getProperty("mime-type") - : Collections.singletonList((String) queryResponseTransformer.getProperty("mime-type")); - - if (mimeTypeServiceProperty.contains("text/csv") - || mimeTypeServiceProperty.contains( - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") - || mimeTypeServiceProperty.contains("application/rtf")) { - arguments = csvTransformArgumentsAdapter(arguments); - } else if (schema != null && schema.toString().equals(CswConstants.CSW_NAMESPACE_URI)) { - arguments = cswTransformArgumentsAdapter(); - } - - List metacardIds = - results.stream().map(Result::getMetacard).map(Metacard::getId).collect(toList()); - - Set sources = - results - .stream() - .map(Result::getMetacard) - .map(Metacard::getSourceId) - .collect(Collectors.toSet()); - - attachFileToResponse( - response, - queryResponseTransformer, - combinedResponse, - arguments, - exportTitle, - metacardIds, - sources, - transformerId); - - return ""; - } - - public List getQueryResponseTransformers() { - return queryResponseTransformers; - } - - private void setHttpHeaders(Response response, BinaryContent content, String exportTitle) - throws MimeTypeException { - String mimeType = content.getMimeTypeValue(); - - if (mimeType == null) { - LOGGER.debug("Failure to fetch file extension, mime-type is empty"); - throw new IllegalArgumentException("Binary Content contains null mime-type value."); - } - - String fileExt = getFileExtFromMimeType(mimeType); - - response.type(mimeType); - String attachment = String.format("attachment;filename=\"%s%s\"", exportTitle, fileExt); - response.header(HttpHeaders.CONTENT_DISPOSITION, attachment); - } - - private String getFileExtFromMimeType(String mimeType) throws MimeTypeException { - MimeTypes allTypes = MimeTypes.getDefaultMimeTypes(); - String fileExt = allTypes.forName(mimeType).getExtension(); - if (StringUtils.isEmpty(fileExt)) { - LOGGER.debug("Null or empty file extension from mime-type {}", mimeType); - } - return fileExt; - } - - private void attachFileToResponse( - Response response, - ServiceReference queryResponseTransformer, - QueryResponse cqlQueryResponse, - Map arguments, - String exportTitle, - List metacardIds, - Set sources, - String transformerId) - throws CatalogTransformerException, IOException, MimeTypeException { - BinaryContent content = - bundleContext.getService(queryResponseTransformer).transform(cqlQueryResponse, arguments); - - setHttpHeaders(response, content, exportTitle); - - try (OutputStream servletOutputStream = response.raw().getOutputStream(); - InputStream resultStream = content.getInputStream()) { - long byteCount = IOUtils.copyLarge(resultStream, servletOutputStream); - securityLogger.audit( - String.format( - "exported metacards: %s from source(s): %s to format: %s with output size: %d bytes", - metacardIds, sources, transformerId, byteCount)); - } - - response.status(HttpStatus.OK_200); - - LOGGER.trace( - "Successfully output file using transformer id {}", - queryResponseTransformer.getProperty("id")); - } - - private CollectionResultComparator getResultComparators(List sorts) { - CollectionResultComparator resultComparator = new CollectionResultComparator(); - if (sorts == null) { - return resultComparator; - } - for (CqlRequest.Sort sort : sorts) { - Comparator comparator; - - String sortType = sort.getAttribute(); - SortOrder sortOrder = - (sort.getDirection() != null && sort.getDirection().equals("descending")) - ? SortOrder.DESCENDING - : SortOrder.ASCENDING; - - if (Result.RELEVANCE.equals(sortType)) { - comparator = new RelevanceResultComparator(sortOrder); - } else if (Result.DISTANCE.equals(sortType)) { - comparator = new DistanceResultComparator(sortOrder); - } else { - comparator = - Comparator.comparing( - r -> getAttributeValue((Result) r, sortType), - ((sortOrder == SortOrder.ASCENDING) - ? Comparator.nullsLast(Comparator.naturalOrder()) - : Comparator.nullsLast(Comparator.reverseOrder()))); - } - resultComparator.addComparator(comparator); - } - return resultComparator; - } - - private static Comparable getAttributeValue(Result result, String attributeName) { - final Attribute attribute = result.getMetacard().getAttribute(attributeName); - - if (attribute == null) { - return null; - } - - AttributeType.AttributeFormat format = - result - .getMetacard() - .getMetacardType() - .getAttributeDescriptor(attributeName) - .getType() - .getAttributeFormat(); - - switch (format) { - case STRING: - return attribute.getValue() != null ? attribute.getValue().toString().toLowerCase() : ""; - case DATE: - case BOOLEAN: - case INTEGER: - case FLOAT: - return attribute.getValue() instanceof Comparable - ? (Comparable) attribute.getValue() - : null; - default: - return ""; - } - } - - private Map cswTransformArgumentsAdapter() { - Map args = new HashMap<>(); - args.put(CswConstants.IS_BY_ID_QUERY, true); - return args; - } - - private Map csvTransformArgumentsAdapter( - Map arguments) { - String columnOrder = "\"columnOrder\":" + GSON.toJson(arguments.get("columnOrder")); - String hiddenFields = "\"hiddenFields\":" + GSON.toJson(arguments.get("hiddenFields")); - String columnAliasMap = "\"columnAliasMap\":" + GSON.toJson(arguments.get("columnAliasMap")); - String csvBody = String.format("{%s,%s,%s}", columnOrder, columnAliasMap, hiddenFields); - - CsvTransformImpl queryTransform = GSON.fromJson(csvBody, CsvTransformImpl.class); - - Set hiddenFieldsSet = - queryTransform.getHiddenFields() != null - ? queryTransform.getHiddenFields() - : Collections.emptySet(); - - List columnOrderList = - queryTransform.getColumnOrder() != null - ? queryTransform.getColumnOrder() - : Collections.emptyList(); - - Map aliasMap = - queryTransform.getColumnAliasMap() != null - ? queryTransform.getColumnAliasMap() - : Collections.emptyMap(); - - return ImmutableMap.builder() - .put("hiddenFields", (Serializable) hiddenFieldsSet) - .put("columnOrder", (Serializable) columnOrderList) - .put("aliases", (Serializable) aliasMap) - .build(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/FilterService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/FilterService.java deleted file mode 100644 index 3773f4ece58..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/FilterService.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -import java.util.Date; -import org.opengis.filter.Filter; - -public interface FilterService { - - Filter buildWorkspaceTagFilter(); - - /** - * Build a filter for matching a metacard on its id - * - * @param id metacard id - * @return filter - */ - Filter buildMetacardIdFilter(String id); - - Filter getModifiedDateFilter(Date lastCheckDate); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/MetacardFormatter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/MetacardFormatter.java deleted file mode 100644 index ef1092b22b8..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/MetacardFormatter.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; - -/** Transform a template string based on a workspace metacard and a hit count. */ -public interface MetacardFormatter { - - /** - * Transform a template string based on a workspace metacard and a hit count. - * - * @param template must be non-null - * @param workspaceMetacard must be non-null - * @param hitCount must be non-null - * @return formatted string (non-null) - */ - String format(String template, WorkspaceMetacardImpl workspaceMetacard, Long hitCount); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/QueryService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/QueryService.java deleted file mode 100644 index 9a83510e5d0..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/QueryService.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; - -/** Determine if a query metacard is active. */ -public interface QueryService { - - /** - * @param queryMetacard must be non-null - * @return true if the query is active - */ - boolean isActiveStandingQuery(QueryMetacardImpl queryMetacard); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/QueryUpdateSubscriber.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/QueryUpdateSubscriber.java deleted file mode 100644 index 9f7741b0858..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/QueryUpdateSubscriber.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -import java.util.Map; -import org.apache.commons.lang3.tuple.Pair; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; - -public interface QueryUpdateSubscriber { - - /** - * @param workspaceMetacardMap map of workspace identifiers to workspace metacards and query hit - * count (must be non-null) - */ - void notify(Map> workspaceMetacardMap); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/SecurityService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/SecurityService.java deleted file mode 100644 index dd0638faf59..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/SecurityService.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -import ddf.security.Subject; -import java.io.Serializable; -import java.util.Map; - -public interface SecurityService { - - /** - * Get the system subject. - * - * @return system subject - */ - Subject getSystemSubject(); - - /** - * Add the system subject to a properties map and return the result. The returned map is not - * guaranteed to be the same instance. - * - * @param properties must be non-null - * @return new properties (non-null) - */ - Map addSystemSubject(Map properties); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceMetacardFilter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceMetacardFilter.java deleted file mode 100644 index 0501add205c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceMetacardFilter.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; - -public interface WorkspaceMetacardFilter { - - boolean filter(WorkspaceMetacardImpl workspaceMetacard); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceQueryService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceQueryService.java deleted file mode 100644 index 09da9994b7e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceQueryService.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -public interface WorkspaceQueryService { - - /** Run all scheduled queries known to the WorkSpaceQueryService */ - void run(); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceService.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceService.java deleted file mode 100644 index 21aa7652b48..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/api/WorkspaceService.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.api; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang3.tuple.Pair; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; - -public interface WorkspaceService { - - /** - * Get a collection of workspace metacards. - * - * @return collection of workspace metacards (non-null) - */ - List getWorkspaceMetacards(); - - /** - * Get a list of query metacards for a workspace metacard. - * - * @param workspaceMetacard must be non-null - * @return list of query metacards - */ - List getQueryMetacards(WorkspaceMetacardImpl workspaceMetacard); - - /** - * Get a list of workspace metacards for a set of workspace identifiers. - * - * @param workspaceIds must be non-null - * @return list of workspace metacards (non-null) - */ - List getWorkspaceMetacards(Set workspaceIds); - - /** - * Uses {@link #getWorkspaceMetacards()} and {@link #getQueryMetacards(WorkspaceMetacardImpl)} to - * get a map of workspace metacard to a list of query metacards. - * - * @return map of workspace metacards to a list of query metacards - */ - Map>> getQueryMetacards(); - - /** - * Uses {@link #getWorkspaceMetacards(Set)} to get a single workspace metacard. - * - * @param workspaceId workspace identifier - * @return workspace metacard - */ - @SuppressWarnings("unused") - WorkspaceMetacardImpl getWorkspaceMetacard(String workspaceId); - - /** - * Get a workspace metacard that has a query with a specified id - * - * @param queryId must be non-null - * @return workspace metacard - */ - WorkspaceMetacardImpl getWorkspaceFromQueryId(String queryId); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/email/EmailNotifier.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/email/EmailNotifier.java deleted file mode 100644 index 9468002c4c1..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/email/EmailNotifier.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.email; - -import static org.apache.commons.lang3.Validate.notBlank; -import static org.apache.commons.lang3.Validate.notNull; - -import java.util.Map; -import javax.mail.Message; -import javax.mail.MessagingException; -import javax.mail.Session; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeMessage; -import org.apache.commons.lang3.tuple.Pair; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.MetacardFormatter; -import org.codice.ddf.catalog.ui.query.monitor.api.QueryUpdateSubscriber; -import org.codice.ddf.catalog.ui.subscription.SubscriptionsPersistentStore; -import org.codice.ddf.platform.email.SmtpClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** Sends an email for each workspace to the owner of the workspace. */ -public class EmailNotifier implements QueryUpdateSubscriber { - - private static final Logger LOGGER = LoggerFactory.getLogger(EmailNotifier.class); - - private final MetacardFormatter metacardFormatter; - - private String bodyTemplate; - - private String subjectTemplate; - - private String fromEmail; - - private SubscriptionsPersistentStore subscriptionsPersistentStore; - - private SmtpClient smtpClient; - - /** - * The {@code bodyTemplate} and {@code subjectTemplate} may contain the tags supported by the - * {@code metacardFormatter}. - * - * @param bodyTemplate A string that represents the email body, will be passed to {@link - * MetacardFormatter}. - * @param subjectTemplate A string that represents the subject line of the email, will be passed - * to {@link MetacardFormatter}. - * @param fromEmail The 'from' email address to be set in the email. - * @param metacardFormatter Used to format the body and subject line. - * @param subscriptionsPersistentStore Used to find the email address associated with a workspace - * id. - * @param smtpClient The {@link SmtpClient} that will send the email. - */ - public EmailNotifier( - String bodyTemplate, - String subjectTemplate, - String fromEmail, - MetacardFormatter metacardFormatter, - SubscriptionsPersistentStore subscriptionsPersistentStore, - SmtpClient smtpClient) { - notNull(bodyTemplate, "bodyTemplate must be non-null"); - notNull(subjectTemplate, "subjectTemplate must be non-null"); - notNull(fromEmail, "fromEmail must be non-null"); - notNull(subscriptionsPersistentStore, "subscriptionsPersistentStore must be non-null"); - notNull(smtpClient, "smtpClient must be non-null"); - - this.bodyTemplate = bodyTemplate; - this.subjectTemplate = subjectTemplate; - this.fromEmail = fromEmail; - this.metacardFormatter = metacardFormatter; - this.subscriptionsPersistentStore = subscriptionsPersistentStore; - this.smtpClient = smtpClient; - } - - /** - * The template string used for the email body. - * - * @param bodyTemplate must be non-null - */ - @SuppressWarnings("unused") - public void setBodyTemplate(String bodyTemplate) { - notNull(bodyTemplate, "bodyTemplate must be non-null"); - LOGGER.debug("Setting bodyTemplate : {}", bodyTemplate); - this.bodyTemplate = bodyTemplate; - } - - /** - * The template string used for the email subject. - * - * @param subjectTemplate must be non-null - */ - @SuppressWarnings("unused") - public void setSubjectTemplate(String subjectTemplate) { - notNull(subjectTemplate, "subjectTemplate must be non-null"); - LOGGER.debug("Setting subjectTemplate : {}", subjectTemplate); - this.subjectTemplate = subjectTemplate; - } - - /** - * The FROM email address. - * - * @param fromEmail must be non-blank - */ - @SuppressWarnings("unused") - public void setFromEmail(String fromEmail) { - notBlank(fromEmail, "fromEmail must be non-blank"); - LOGGER.debug("Setting fromEmail : {}", fromEmail); - this.fromEmail = fromEmail.trim(); - } - - @Override - public void notify(Map> workspaceMetacardMap) { - notNull(workspaceMetacardMap, "workspaceMetacardMap must be non-null"); - workspaceMetacardMap - .values() - .forEach(pair -> sendEmailsForWorkspace(pair.getLeft(), pair.getRight())); - } - - private void sendEmailsForWorkspace(WorkspaceMetacardImpl workspaceMetacard, Long hitCount) { - subscriptionsPersistentStore - .getEmails(workspaceMetacard.getId()) - .forEach(email -> sendEmailForWorkspace(workspaceMetacard, hitCount, email)); - } - - private void sendEmailForWorkspace( - WorkspaceMetacardImpl workspaceMetacard, Long hitCount, String email) { - - String emailBody = metacardFormatter.format(bodyTemplate, workspaceMetacard, hitCount); - - String subject = metacardFormatter.format(subjectTemplate, workspaceMetacard, hitCount); - - Session session = smtpClient.createSession(); - - try { - MimeMessage mimeMessage = new MimeMessage(session); - - mimeMessage.setFrom(new InternetAddress(fromEmail)); - - mimeMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(email)); - - mimeMessage.setSubject(subject); - - mimeMessage.setText(emailBody); - - LOGGER.trace("Attempting to send email"); - - smtpClient.send(mimeMessage); - - } catch (MessagingException e) { - LOGGER.warn("unable to send email to {}", email, e); - } - } - - @Override - public String toString() { - return "EmailNotifier{" - + "metacardFormatter=" - + metacardFormatter - + ", bodyTemplate='" - + bodyTemplate - + '\'' - + ", subjectTemplate='" - + subjectTemplate - + '\'' - + ", fromEmail='" - + fromEmail - + '\'' - + ", subscriptionsPersistentStore=" - + subscriptionsPersistentStore - + '}'; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/AttributeMetacardFormatter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/AttributeMetacardFormatter.java deleted file mode 100644 index 9bed6c4c5d9..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/AttributeMetacardFormatter.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.notNull; - -import ddf.catalog.data.Attribute; -import java.io.Serializable; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.apache.commons.lang3.StringUtils; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; - -/** - * Replace tags with values from the metacard. For example {@code %[attribute=id]} will be replaced - * with the metacard identifier. This formatter will continue to loop over the template until all - * tags are replaced. This allows a tag that gets a another template. For example {@code - * %[attribute=subjectLine]} could return {@code %[attribute=title] (id: %[attribute=id])}, which - * will then get expanded. If the metacard attribute returns multiple values, then the values will - * be separated with a comma. If the metacard does not return a value, then a default value - * (specified in ctor) will be used. The maximum number of iterations is limited to prevent infinite - * loops. - */ -public class AttributeMetacardFormatter extends BaseMetacardFormatter { - - private static final String PREFIX = "%[attribute="; - - private static final String SUFFIX = "]"; - - private static final String REGEX = - ".*" + Pattern.quote(PREFIX) + "([^]]+)" + Pattern.quote(SUFFIX) + ".*"; - - private static final Pattern PATTERN = Pattern.compile(REGEX); - - private static final int CAPTURE_GROUP = 1; - - private static final String LIST_SEPARATOR = ", "; - - private static final int MAX_ITERATIONS = 100; - - private final String defaultReplacement; - - /** @param defaultReplacement must be non-null */ - public AttributeMetacardFormatter(String defaultReplacement) { - notNull(defaultReplacement, "defaultReplacement must be non-null"); - this.defaultReplacement = defaultReplacement; - } - - @Override - public String toString() { - return "AttributeMetacardFormatter{" + "defaultReplacement='" + defaultReplacement + '\'' + '}'; - } - - @Override - protected String doFormat( - String template, WorkspaceMetacardImpl workspaceMetacard, Long hitCount) { - - int iterationCount = 0; - - String tmp = template; - - Matcher m = PATTERN.matcher(tmp); - while (m.matches() && (++iterationCount < MAX_ITERATIONS)) { - String attributeName = m.group(CAPTURE_GROUP); - - String replacement = defaultReplacement; - Attribute attribute = workspaceMetacard.getAttribute(attributeName); - if (attribute != null) { - List serializables = attribute.getValues(); - if (serializables != null) { - replacement = StringUtils.join(serializables, LIST_SEPARATOR); - } - } - - tmp = tmp.replace(PREFIX + attributeName + SUFFIX, replacement); - - m = PATTERN.matcher(tmp); - } - - return tmp; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/BaseMetacardFormatter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/BaseMetacardFormatter.java deleted file mode 100644 index 5e78f4cd41d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/BaseMetacardFormatter.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.notNull; - -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.MetacardFormatter; - -/** - * Base class that ensures arguments to {@link #format(String, WorkspaceMetacardImpl, Long)} are - * checked. - */ -public abstract class BaseMetacardFormatter implements MetacardFormatter { - - @Override - public final String format( - String template, WorkspaceMetacardImpl workspaceMetacard, Long hitCount) { - notNull(template, "template must be non-null"); - notNull(workspaceMetacard, "workspaceMetacard must be non-null"); - notNull(hitCount, "hitCount must be non-null"); - return doFormat(template, workspaceMetacard, hitCount); - } - - /** - * The arguments are guaranteed to be non-null. - * - * @param template non-null - * @param workspaceMetacard non-null - * @param hitCount non-null - * @return formatted string - */ - protected abstract String doFormat( - String template, WorkspaceMetacardImpl workspaceMetacard, Long hitCount); -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/FilterServiceImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/FilterServiceImpl.java deleted file mode 100644 index 34d12243947..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/FilterServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import ddf.catalog.data.Metacard; -import ddf.catalog.filter.FilterBuilder; -import java.util.Date; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; -import org.codice.ddf.catalog.ui.query.monitor.api.FilterService; -import org.opengis.filter.Filter; - -public class FilterServiceImpl implements FilterService { - - private final FilterBuilder filterBuilder; - - public FilterServiceImpl(FilterBuilder filterBuilder) { - this.filterBuilder = filterBuilder; - } - - @Override - public Filter buildWorkspaceTagFilter() { - return filterBuilder - .attribute(Metacard.TAGS) - .is() - .like() - .text(WorkspaceConstants.WORKSPACE_TAG); - } - - @Override - public Filter buildMetacardIdFilter(String id) { - return filterBuilder.attribute(Metacard.ID).is().equalTo().text(id); - } - - @Override - public Filter getModifiedDateFilter(Date lastCheckDate) { - return filterBuilder.attribute(Metacard.MODIFIED).after().date(lastCheckDate); - } - - @Override - public String toString() { - return "FilterServiceImpl{" + "filterBuilder=" + filterBuilder + '}'; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/HitCountFormatter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/HitCountFormatter.java deleted file mode 100644 index f9a825d7019..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/HitCountFormatter.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import java.util.regex.Pattern; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; - -/** Replaces all tags {@code %[hitCount]} with the hit count. */ -public class HitCountFormatter extends BaseMetacardFormatter { - - private static final String HIT_COUNT_TAG = "%[hitCount]"; - - @Override - protected String doFormat( - String template, WorkspaceMetacardImpl workspaceMetacard, Long hitCount) { - return template.replaceAll(Pattern.quote(HIT_COUNT_TAG), hitCount.toString()); - } - - @Override - public String toString() { - return "HitCountFormatter{}"; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/ListMetacardFormatter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/ListMetacardFormatter.java deleted file mode 100644 index 2cefc117814..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/ListMetacardFormatter.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.noNullElements; -import static org.apache.commons.lang3.Validate.notNull; - -import java.util.List; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.MetacardFormatter; - -/** Iterate through a list of {@link MetacardFormatter} objects as a daisy chain. */ -public class ListMetacardFormatter extends BaseMetacardFormatter { - - private final List metacardFormatterList; - - /** @param metacardFormatterList must be non-null, elements must be non-null */ - public ListMetacardFormatter(List metacardFormatterList) { - notNull(metacardFormatterList, "metacardFormatterList must be non-null"); - noNullElements(metacardFormatterList); - this.metacardFormatterList = metacardFormatterList; - } - - @Override - protected String doFormat( - String template, WorkspaceMetacardImpl workspaceMetacard, Long hitCount) { - - String tmp = template; - for (MetacardFormatter metacardFormatter : metacardFormatterList) { - tmp = metacardFormatter.format(tmp, workspaceMetacard, hitCount); - } - - return tmp; - } - - @Override - public String toString() { - return "ListMetacardFormatter{" + "metacardFormatterList=" + metacardFormatterList + '}'; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryJob.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryJob.java deleted file mode 100644 index a425fec046d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryJob.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; -import org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceQueryService; -import org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.quartz.SchedulerContext; -import org.quartz.SchedulerException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Quartz Job that calls {@link WorkspaceQueryService#run()}. Requires that a WorkspaceQueryService - * be registered as a service reference. - */ -public class QueryJob implements Job { - - private static final Logger LOGGER = LoggerFactory.getLogger(QueryJob.class); - - private static final Lock LOCK = new ReentrantLock(); - - @Override - public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { - LOGGER.trace("Calling execute"); - LOCK.lock(); - try { - SchedulerContext schedulerContext = jobExecutionContext.getScheduler().getContext(); - WorkspaceQueryService workspaceQueryService = - (WorkspaceQueryService) schedulerContext.get(WorkspaceQueryServiceImpl.JOB_IDENTITY); - workspaceQueryService.run(); - } catch (SchedulerException e) { - LOGGER.warn("Could not get Scheduler Context. The job will not run", e); - } finally { - LOCK.unlock(); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryUpdateSubscriberList.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryUpdateSubscriberList.java deleted file mode 100644 index 7f695d37eb1..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryUpdateSubscriberList.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.notNull; - -import java.util.List; -import java.util.Map; -import org.apache.commons.lang3.tuple.Pair; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.QueryUpdateSubscriber; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Execute a list of QueryUpdateSubscriber objects. Catches runtime exceptions thrown by the - * subscriber and logs it as a warning, then continues executing the remaining subscribers. - */ -public class QueryUpdateSubscriberList implements QueryUpdateSubscriber { - - private static final Logger LOGGER = LoggerFactory.getLogger(QueryUpdateSubscriberList.class); - - private final List queryUpdateSubscriberList; - - /** @param queryUpdateSubscriberList must be non-null */ - public QueryUpdateSubscriberList(List queryUpdateSubscriberList) { - notNull(queryUpdateSubscriberList, "queryUpdateSubscriberList must be non-null"); - this.queryUpdateSubscriberList = queryUpdateSubscriberList; - } - - @Override - public void notify(Map> workspaceMetacardMap) { - notNull(workspaceMetacardMap, "workspaceMetacardMap must be non-null"); - queryUpdateSubscriberList.forEach( - subscriber -> { - try { - subscriber.notify(workspaceMetacardMap); - } catch (RuntimeException e) { - LOGGER.warn("QueryUpdateSubscriber failed to run: subscriber={}", subscriber, e); - } - }); - } - - @Override - public String toString() { - return "QueryUpdateSubscriberList{" + "list=" + queryUpdateSubscriberList + '}'; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/SecurityServiceImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/SecurityServiceImpl.java deleted file mode 100644 index b6f71448f9a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/SecurityServiceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import ddf.security.SecurityConstants; -import ddf.security.Subject; -import java.io.Serializable; -import java.util.Map; -import org.codice.ddf.catalog.ui.query.monitor.api.SecurityService; -import org.codice.ddf.security.Security; - -public class SecurityServiceImpl implements SecurityService { - - private final Security security; - - public SecurityServiceImpl(Security security) { - this.security = security; - } - - @Override - public Subject getSystemSubject() { - return security.runAsAdmin(() -> security.getSystemSubject()); - } - - @Override - public Map addSystemSubject(Map properties) { - properties.put(SecurityConstants.SECURITY_SUBJECT, getSystemSubject()); - return properties; - } - - @Override - public String toString() { - return "SecurityServiceImpl{}"; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/SubscriptionsPersistentStoreImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/SubscriptionsPersistentStoreImpl.java deleted file mode 100644 index c77c7a58154..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/SubscriptionsPersistentStoreImpl.java +++ /dev/null @@ -1,333 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.notBlank; -import static org.apache.commons.lang3.Validate.notNull; - -import com.google.common.annotations.VisibleForTesting; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.codice.ddf.catalog.ui.subscription.SubscriptionsPersistentStore; -import org.codice.ddf.persistence.PersistenceException; -import org.codice.ddf.persistence.PersistentItem; -import org.codice.ddf.persistence.PersistentStore; -import org.codice.ddf.persistence.PersistentStore.PersistenceType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Associate sets of emails with an ID. This implementation will preserve any other properties - * stored under the ID. - */ -public class SubscriptionsPersistentStoreImpl implements SubscriptionsPersistentStore { - - private static final Logger LOGGER = LoggerFactory.getLogger(SubscriptionsPersistentStore.class); - - private static final String EMAIL_PROPERTY = "emails"; - - private static final String ID = "id"; - - private static final String SUBSCRIPTIONS_TYPE = PersistenceType.SUBSCRIPTION_TYPE.toString(); - - @VisibleForTesting static final int START_INDEX = 0; - - @VisibleForTesting static final int PAGE_SIZE = 1000; - - private static final Lock LOCK = new ReentrantLock(); - - private final PersistentStore persistentStore; - - /** @param persistentStore must be non-null */ - public SubscriptionsPersistentStoreImpl(PersistentStore persistentStore) { - notNull(persistentStore, "persistentStore must be non-null"); - this.persistentStore = persistentStore; - } - - private List> query(String query) throws PersistenceException { - LOCK.lock(); - try { - List> results = - persistentStore.get(SUBSCRIPTIONS_TYPE, query, START_INDEX, PAGE_SIZE); - assert results.size() <= 1; - return results; - } finally { - LOCK.unlock(); - } - } - - private List> get(String id) throws PersistenceException { - return query(queryId(id)); - } - - @SuppressWarnings("unchecked") - @Override - public void addEmails(String id, Set emails) { - notBlank(id, "id must be non-blank"); - notNull(emails, "emails must be non-null"); - emails.forEach(email -> notBlank(email, "emails in set must be non-blank")); - - LOCK.lock(); - try { - List> results = get(id); - - if (!results.isEmpty()) { - PersistentItem item = convert(results.get(0)); - - if (item.containsKey(EMAIL_PROPERTY + PersistentItem.TEXT_SUFFIX)) { - Set newValue = new HashSet<>(emails); - Object value = item.get(EMAIL_PROPERTY + PersistentItem.TEXT_SUFFIX); - if (value instanceof String) { - newValue.add((String) value); - } else if (value instanceof Set) { - ((Set) value) - .stream() - .filter(String.class::isInstance) - .forEach(obj -> newValue.add((String) obj)); - } - item.addProperty(EMAIL_PROPERTY, newValue); - } else { - item.addProperty(EMAIL_PROPERTY, emails); - } - persistentStore.add(SUBSCRIPTIONS_TYPE, item); - } else { - PersistentItem persistentItem = new PersistentItem(); - persistentItem.addIdProperty(id); - persistentItem.addProperty(EMAIL_PROPERTY, emails); - persistentStore.add(SUBSCRIPTIONS_TYPE, persistentItem); - } - - } catch (PersistenceException e) { - LOGGER.warn("unable to add emails to workspace: workspaceId={} emails={}", id, emails, e); - } finally { - LOCK.unlock(); - } - } - - private String queryEmail(String email) { - return "\"" + EMAIL_PROPERTY + "\"=" + quote(email); - } - - private String queryId(String id) { - return quote(ID) + "=" + quote(id); - } - - private PersistentItem convert(Map map) { - PersistentItem item = new PersistentItem(); - - item.putAll(map); - - return item; - } - - @SuppressWarnings("unchecked") - private PersistentItem strip(PersistentItem item, Set emails) { - Object itemValue = item.get(EMAIL_PROPERTY + PersistentItem.TEXT_SUFFIX); - Optional.ofNullable(itemValue) - .ifPresent( - value -> { - if (value instanceof String) { - String currentEmail = (String) value; - if (emails.contains(currentEmail)) { - item.remove(EMAIL_PROPERTY + PersistentItem.TEXT_SUFFIX); - } - } else if (value instanceof Set) { - Set currentEmails = new HashSet<>((Set) value); - currentEmails.removeAll(emails); - if (currentEmails.isEmpty()) { - item.remove(EMAIL_PROPERTY + PersistentItem.TEXT_SUFFIX); - } else { - item.put(EMAIL_PROPERTY + PersistentItem.TEXT_SUFFIX, currentEmails); - } - } - }); - - return item; - } - - private void add(String id, PersistentItem item) { - LOCK.lock(); - try { - persistentStore.add(SUBSCRIPTIONS_TYPE, item); - } catch (PersistenceException e) { - LOGGER.warn( - "unable to add PersistentItem to the PersistentStore: id={} item={}", id, item, e); - - } finally { - LOCK.unlock(); - } - } - - @Override - public void removeEmails(String id, Set emails) { - notBlank(id, "id must be non-blank"); - - LOCK.lock(); - try { - List> results = get(id); - - results - .stream() - .map(this::convert) - .map(item -> strip(item, emails)) - .forEach(item -> add(id, item)); - - } catch (PersistenceException e) { - LOGGER.warn("unable to delete emails from workspace: id={}", id, e); - } finally { - LOCK.unlock(); - } - } - - private Set merge(Set set1, Set set2) { - return Stream.of(set1, set2).flatMap(Collection::stream).collect(Collectors.toSet()); - } - - private String quote(String value) { - return "'" + value + "'"; - } - - @SuppressWarnings("unchecked") - @Override - public Set getSubscriptions(String email) { - notBlank(email, "email must be non-blank"); - - LOCK.lock(); - try { - - List> results = query(queryEmail(email)); - - List mapValues = - results - .stream() - .map(PersistentItem::stripSuffixes) - .filter(result -> result.containsKey(ID)) - .map(result -> result.get(ID)) - .collect(Collectors.toList()); - - Set emailsFromSet = - streamToStrings( - mapValues - .stream() - .filter(Set.class::isInstance) - .map(Set.class::cast) - .flatMap(Set::stream)); - - Set emailsFromString = streamToStrings(mapValues.stream()); - - return merge(emailsFromSet, emailsFromString); - } catch (PersistenceException e) { - LOGGER.warn("unable to get workspace ids: email={}", email, e); - } finally { - LOCK.unlock(); - } - - return Collections.emptySet(); - } - - @Override - public void removeSubscriptions(String id) { - final String ecql = queryId(id); - - LOCK.lock(); - try { - persistentStore.delete(SUBSCRIPTIONS_TYPE, ecql, START_INDEX, PAGE_SIZE); - } catch (PersistenceException e) { - LOGGER.debug("Could not delete subscriptions for query {}", ecql, e); - } finally { - LOCK.unlock(); - } - } - - @SuppressWarnings("unchecked") - @Override - public Set getEmails(String id) { - notBlank(id, "id must be non-blank"); - - LOCK.lock(); - try { - - List> results = get(id); - - List mapValues = - results - .stream() - .map(PersistentItem::stripSuffixes) - .filter(result -> result.containsKey(EMAIL_PROPERTY)) - .map(result -> result.get(EMAIL_PROPERTY)) - .collect(Collectors.toList()); - - Set emailsFromSet = - streamToStrings( - mapValues - .stream() - .filter(Set.class::isInstance) - .map(Set.class::cast) - .flatMap(Set::stream)); - - Set emailsFromString = streamToStrings(mapValues.stream()); - - return merge(emailsFromSet, emailsFromString); - } catch (PersistenceException e) { - LOGGER.warn("unable to get workspace emails: id={}", id, e); - } finally { - LOCK.unlock(); - } - - return Collections.emptySet(); - } - - /** - * Convert a stream of objects into a set of strings. - * - * @param stream stream of objects - * @return set of strings - */ - private Set streamToStrings(Stream stream) { - return stream - .filter(String.class::isInstance) - .map(String.class::cast) - .collect(Collectors.toSet()); - } - - @Override - public final void addEmail(String id, String email) { - notBlank(id, "id must be non-blank"); - notBlank(email, "email must be non-blank"); - - addEmails(id, Collections.singleton(email)); - } - - @Override - public final void removeAllEmails(String id) { - removeEmails(id, getEmails(id)); - } - - @Override - public final void removeEmail(String id, String email) { - notBlank(id, "id must be non-blank"); - notBlank(email, "email must be non-blank"); - - removeEmails(id, Collections.singleton(email)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/TrivialSubscriptionsPersistentStore.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/TrivialSubscriptionsPersistentStore.java deleted file mode 100644 index 3c8cbf1b5d5..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/TrivialSubscriptionsPersistentStore.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.notBlank; - -import java.util.Collections; -import java.util.Set; -import org.codice.ddf.catalog.ui.subscription.SubscriptionsPersistentStore; - -public class TrivialSubscriptionsPersistentStore implements SubscriptionsPersistentStore { - - private final String emailAddress; - - public TrivialSubscriptionsPersistentStore(String emailAddress) { - this.emailAddress = emailAddress; - } - - @Override - public void addEmails(String id, Set emails) { - // Do nothing - } - - @Override - public void removeEmails(String id, Set emails) { - // Do nothing - } - - @Override - public Set getEmails(String id) { - return Collections.singleton(emailAddress); - } - - @Override - public Set getSubscriptions(String email) { - return Collections.emptySet(); - } - - @Override - public void removeSubscriptions(String id) { - // Do nothing - } - - @Override - public final void addEmail(String id, String email) { - notBlank(id, "id must be non-blank"); - notBlank(email, "email must be non-blank"); - - addEmails(id, Collections.singleton(email)); - } - - @Override - public final void removeAllEmails(String id) { - removeEmails(id, getEmails(id)); - } - - @Override - public final void removeEmail(String id, String email) { - notBlank(id, "id must be non-blank"); - notBlank(email, "email must be non-blank"); - - removeEmails(id, Collections.singleton(email)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryBuilder.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryBuilder.java deleted file mode 100644 index 6db52d8aacc..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import ddf.catalog.filter.FilterBuilder; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.query.monitor.api.FilterService; -import org.opengis.filter.Filter; - -public class WorkspaceQueryBuilder { - private final FilterBuilder filterBuilder; - - private final FilterService filterService; - - @SuppressWarnings("WeakerAccess" /* constructor must be public for blueprint access */) - public WorkspaceQueryBuilder(FilterBuilder filterBuilder, FilterService filterService) { - this.filterBuilder = filterBuilder; - this.filterService = filterService; - } - - @SuppressWarnings("WeakerAccess" /* this method could be package-private, but codacy complains */) - public Filter createFilter(Set workspaceIds) { - return createAndFilter(createWorkspaceTagFilter(), createOrWorkspaceIdsFilter(workspaceIds)); - } - - private Filter createOrWorkspaceIdsFilter(Set workspaceIds) { - return createOrFilter(createWorkspaceIdFilters(workspaceIds)); - } - - private List createWorkspaceIdFilters(Set workspaceIds) { - return workspaceIds - .stream() - .map(filterService::buildMetacardIdFilter) - .collect(Collectors.toList()); - } - - private Filter createOrFilter(List filters) { - return filterBuilder.anyOf(filters); - } - - private Filter createAndFilter(Filter... filters) { - return filterBuilder.allOf(filters); - } - - private Filter createWorkspaceTagFilter() { - return filterService.buildWorkspaceTagFilter(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryServiceImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryServiceImpl.java deleted file mode 100644 index 2dde2c3944a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryServiceImpl.java +++ /dev/null @@ -1,404 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.notEmpty; -import static org.apache.commons.lang3.Validate.notNull; -import static org.quartz.CronScheduleBuilder.cronSchedule; -import static org.quartz.JobBuilder.newJob; -import static org.quartz.TriggerBuilder.newTrigger; - -import com.google.common.collect.Lists; -import ddf.catalog.CatalogFramework; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.security.Subject; -import java.io.Serializable; -import java.time.Instant; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ForkJoinTask; -import java.util.concurrent.RecursiveTask; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.function.BiFunction; -import java.util.function.Supplier; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.FilterService; -import org.codice.ddf.catalog.ui.query.monitor.api.QueryUpdateSubscriber; -import org.codice.ddf.catalog.ui.query.monitor.api.SecurityService; -import org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceQueryService; -import org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceService; -import org.codice.ddf.platform.util.ForkJoinPoolFactory; -import org.geotools.filter.text.cql2.CQLException; -import org.geotools.filter.text.ecql.ECQL; -import org.opengis.filter.And; -import org.opengis.filter.Filter; -import org.quartz.CronTrigger; -import org.quartz.JobDetail; -import org.quartz.Scheduler; -import org.quartz.SchedulerException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class WorkspaceQueryServiceImpl implements WorkspaceQueryService { - - public static final String JOB_IDENTITY = "WorkspaceQueryServiceJob"; - - private static final Logger LOGGER = LoggerFactory.getLogger(WorkspaceQueryServiceImpl.class); - - private static final String UNKNOWN_SOURCE = "unknown"; - - private static final String TRIGGER_NAME = "WorkspaceQueryTrigger"; - - private final QueryUpdateSubscriber queryUpdateSubscriber; - - private final WorkspaceService workspaceService; - - private final CatalogFramework catalogFramework; - - private final FilterBuilder filterBuilder; - - @SuppressWarnings("FieldCanBeLocal") - private Scheduler scheduler; - - private SecurityService securityService; - - private FilterService filterService; - - private long queryTimeoutMinutes; - - private Integer queryTimeInterval; - - private JobDetail jobDetail; - - private Subject subject; - - /** - * @param queryUpdateSubscriber must be non-null - * @param workspaceService must be non-null - * @param catalogFramework must be non-null - * @param filterBuilder must be non-null - * @param schedulerSupplier must be non-null - * @param securityService must be non-null - * @param filterService must be non-null - */ - public WorkspaceQueryServiceImpl( - QueryUpdateSubscriber queryUpdateSubscriber, - WorkspaceService workspaceService, - CatalogFramework catalogFramework, - FilterBuilder filterBuilder, - Supplier> schedulerSupplier, - SecurityService securityService, - FilterService filterService) - throws SchedulerException { - - notNull(queryUpdateSubscriber, "queryUpdateSubscriber must be non-null"); - notNull(workspaceService, "workspaceService must be non-null"); - notNull(catalogFramework, "catalogFramework must be non-null"); - notNull(filterBuilder, "filterBuilder must be non-null"); - notNull(schedulerSupplier, "scheduleSupplier must be non-null"); - notNull(securityService, "securityService must be non-null"); - notNull(filterService, "filterService must be non-null"); - - this.queryUpdateSubscriber = queryUpdateSubscriber; - this.workspaceService = workspaceService; - this.catalogFramework = catalogFramework; - this.filterBuilder = filterBuilder; - this.securityService = securityService; - this.filterService = filterService; - - Optional schedulerOptional = schedulerSupplier.get(); - - if (schedulerOptional.isPresent()) { - scheduler = schedulerOptional.get(); - scheduler.getContext().put(JOB_IDENTITY, this); - jobDetail = newJob(QueryJob.class).withIdentity(JOB_IDENTITY).build(); - scheduler.start(); - } else { - LOGGER.warn("unable to get a quartz scheduler object, email notifications will not run"); - } - } - - public Integer getQueryTimeInterval() { - return this.queryTimeInterval; - } - - public void setQueryTimeInterval(Integer queryTimeInterval) { - notNull(queryTimeInterval, "queryTimeInterval must be non-null"); - if (queryTimeInterval > 0 && queryTimeInterval <= 1440) { - LOGGER.debug("Setting query time interval : {}", queryTimeInterval); - this.queryTimeInterval = queryTimeInterval; - } else if (this.queryTimeInterval == null) { - this.queryTimeInterval = 1440; - } - } - - /** @param cronString cron string (must be non-null) */ - @SuppressWarnings("unused") - public void setCronString(String cronString) { - notNull(cronString, "cronString must be non-null"); - notNull(scheduler, "scheduler must be non-null"); - notNull(jobDetail, "jobDetail must be non-null"); - - try { - scheduler.deleteJob(jobDetail.getKey()); - LOGGER.debug("Scheduling job {}", jobDetail); - CronTrigger trigger = - newTrigger() - .withIdentity(TRIGGER_NAME) - .startNow() - .withSchedule(cronSchedule(cronString)) - .build(); - scheduler.scheduleJob(jobDetail, trigger); - LOGGER.debug("Setting cron string : {}", cronString); - } catch (SchedulerException e) { - LOGGER.warn("Unable to update scheduler with cron string: cron=[{}]", cronString, e); - } - } - - /** @param queryTimeoutMinutes minutes (must be non-null) */ - @SuppressWarnings("unused") - public void setQueryTimeoutMinutes(Long queryTimeoutMinutes) { - notNull(queryTimeoutMinutes, "queryTimeoutMinutes must be non-null"); - LOGGER.debug("Setting queryTimeOutMinutes : {}", queryTimeoutMinutes); - this.queryTimeoutMinutes = queryTimeoutMinutes; - } - - public void setSubject(Subject subject) { - this.subject = subject; - } - - public void destroy() { - LOGGER.trace("Shutting down"); - try { - scheduler.shutdown(); - } catch (SchedulerException e) { - LOGGER.warn("Unable to shut down scheduler", e); - } - } - - /** Main entry point, should be called by a scheduler. */ - public void run() { - securityService - .getSystemSubject() - .execute( - () -> { - LOGGER.trace("running workspace query service"); - - Map>> queryMetacards = - workspaceService.getQueryMetacards(); - - LOGGER.debug("queryMetacards: size={}", queryMetacards.size()); - - List workspaceTasks = createWorkspaceTasks(queryMetacards); - - LOGGER.debug("workspaceTasks: size={}", workspaceTasks.size()); - - Map> results = - executeWorkspaceTasks(workspaceTasks, queryTimeoutMinutes, TimeUnit.MINUTES); - - LOGGER.debug("results: {}", results); - - queryUpdateSubscriber.notify(results); - }); - } - - private Map> executeWorkspaceTasks( - List workspaceTasks, long timeout, TimeUnit timeoutUnit) { - Map> results = new ConcurrentHashMap<>(); - - workspaceTasks - .stream() - .map(ForkJoinPoolFactory.getNewForkJoinPool(null, false)::submit) - .map(task -> getTaskResult(task, timeout, timeoutUnit)) - .filter(Objects::nonNull) - .forEach( - pair -> - results.put( - pair.getLeft().getId(), new ImmutablePair<>(pair.getLeft(), pair.getRight()))); - - return results; - } - - private Pair getTaskResult( - ForkJoinTask> workspaceTask, - long timeout, - TimeUnit timeoutUnit) { - try { - return workspaceTask.get(timeout, timeoutUnit); - } catch (TimeoutException e) { - LOGGER.warn("Timeout", e); - } catch (ExecutionException | InterruptedException e) { - LOGGER.warn("ForkJoinPool error", e); - - Thread.currentThread().interrupt(); - } - return null; - } - - private List createWorkspaceTasks( - Map>> queryMetacards) { - List workspaceTasks = new ArrayList<>(); - - for (Pair> workspaceQueryPair : - queryMetacards.values()) { - Map> queryMetacardsGroupedBySource = - groupBySource(workspaceQueryPair.getRight()); - List queryRequests = - getQueryRequests(queryMetacardsGroupedBySource.values().stream()); - if (!queryRequests.isEmpty()) { - workspaceTasks.add(new WorkspaceTask(workspaceQueryPair.getLeft(), queryRequests)); - } - } - - return workspaceTasks; - } - - private Map> groupBySource( - List queryMetacards) { - final Map> groupedBySource = new HashMap<>(); - for (QueryMetacardImpl queryMetacard : queryMetacards) { - List sources = queryMetacard.getSources(); - if (!sources.isEmpty()) { - sources.forEach(sourceId -> groupedBySource.compute(sourceId, addToList(queryMetacard))); - } else { - groupedBySource.compute(UNKNOWN_SOURCE, addToList(queryMetacard)); - } - } - return groupedBySource; - } - - private BiFunction, List> addToList( - QueryMetacardImpl queryMetacard) { - return (id, queries) -> { - if (queries == null) { - return Lists.newArrayList(queryMetacard); - } else { - queries.add(queryMetacard); - return queries; - } - }; - } - - private List getQueryRequests( - Stream> queriesGroupedBySource) { - final Filter modifiedFilter = filterService.getModifiedDateFilter(calculateQueryTimeInterval()); - return queriesGroupedBySource - .map(this::queryMetacardsToFilters) - .map(filterBuilder::anyOf) - .map(filter -> filterBuilder.allOf(modifiedFilter, filter)) - .map(this::filterToQuery) - .map(this::queryToQueryRequest) - .collect(Collectors.toList()); - } - - private List queryMetacardsToFilters(List queriesForSource) { - return queriesForSource - .stream() - .map(this::metacardToFilter) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - } - - private QueryRequestImpl queryToQueryRequest(QueryImpl query) { - final Map properties = securityService.addSystemSubject(new HashMap<>()); - return new QueryRequestImpl(query, properties); - } - - private QueryImpl filterToQuery(And filter) { - final QueryImpl query = new QueryImpl(filter); - query.setRequestsTotalResultsCount(true); - return query; - } - - private Filter metacardToFilter(QueryMetacardImpl queryMetacard) { - try { - return ECQL.toFilter(queryMetacard.getCql()); - } catch (CQLException e) { - LOGGER.warn("Error parsing CQL", e); - return null; - } - } - - private Date calculateQueryTimeInterval() { - return Date.from(Instant.now().minus(queryTimeInterval, ChronoUnit.MINUTES)); - } - - private class QueryTask extends RecursiveTask { - private final QueryRequest queryRequest; - - private QueryTask(QueryRequest queryRequest) { - this.queryRequest = queryRequest; - } - - @Override - protected Long compute() { - try { - final QueryResponse response = catalogFramework.query(queryRequest); - return response.getHits(); - } catch (UnsupportedQueryException | FederationException | SourceUnavailableException e) { - LOGGER.warn("Query error", e); - return 0L; - } - } - } - - private class WorkspaceTask extends RecursiveTask> { - private final WorkspaceMetacardImpl workspaceMetacard; - - private final List queryRequests; - - private WorkspaceTask( - WorkspaceMetacardImpl workspaceMetacard, List queryRequests) { - notNull(workspaceMetacard, "WorkspaceMetacardImpl must be non-null"); - notNull(queryRequests, "queryRequests must be non-null"); - notEmpty(queryRequests, "queryRequests must be non-empty"); - this.workspaceMetacard = workspaceMetacard; - this.queryRequests = queryRequests; - } - - @Override - protected Pair compute() { - final long result = - queryRequests - .stream() - .map(QueryTask::new) - .map(QueryTask::fork) - .mapToLong(ForkJoinTask::join) - .sum(); - - return Pair.of(workspaceMetacard, result); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceServiceImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceServiceImpl.java deleted file mode 100644 index 8f3130c7e38..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceServiceImpl.java +++ /dev/null @@ -1,345 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.apache.commons.lang3.Validate.notNull; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_TAG; -import static org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants.WORKSPACE_TAG; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Result; -import ddf.catalog.data.types.Core; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.impl.SortByImpl; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.SourceResponse; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.operation.impl.QueryResponseImpl; -import ddf.catalog.util.impl.CatalogQueryException; -import ddf.catalog.util.impl.QueryFunction; -import ddf.catalog.util.impl.ResultIterable; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.atomic.AtomicLong; -import java.util.stream.Collectors; -import javax.annotation.concurrent.ThreadSafe; -import javax.ws.rs.NotFoundException; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl.WorkspaceTransformerImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.SecurityService; -import org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceService; -import org.codice.ddf.persistence.PersistenceException; -import org.codice.ddf.persistence.PersistentStore; -import org.codice.ddf.persistence.PersistentStore.PersistenceType; -import org.opengis.filter.Filter; -import org.opengis.filter.sort.SortOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@ThreadSafe -public class WorkspaceServiceImpl implements WorkspaceService { - - private static final Logger LOGGER = LoggerFactory.getLogger(WorkspaceServiceImpl.class); - - private static final String ID_FIELD = "id_txt"; - - private final CatalogFramework catalogFramework; - - private final WorkspaceTransformerImpl workspaceTransformer; - - private final SecurityService securityService; - - private final PersistentStore persistentStore; - - private final WorkspaceQueryBuilder workspaceQueryBuilder; - - private final FilterBuilder filterBuilder; - - /** Use {@code volatile} to make the class thread-safe. */ - private volatile int maxSubscriptions; - - /** - * @param catalogFramework must be non-null - * @param workspaceTransformer must be non-null - * @param securityService must be non-null - * @param persistentStore must be non-null - * @param workspaceQueryBuilder must be non-null - * @param filterBuilder must be non-null - */ - @SuppressWarnings("WeakerAccess" /* Needed by blueprint. */) - public WorkspaceServiceImpl( - CatalogFramework catalogFramework, - WorkspaceTransformerImpl workspaceTransformer, - WorkspaceQueryBuilder workspaceQueryBuilder, - SecurityService securityService, - PersistentStore persistentStore, - FilterBuilder filterBuilder) { - notNull(catalogFramework, "catalogFramework must be non-null"); - notNull(workspaceTransformer, "workspaceTransformer must be non-null"); - notNull(securityService, "securityService must be non-null"); - notNull(persistentStore, "persistentStore must be non-null"); - notNull(workspaceQueryBuilder, "workspaceQueryBuilder must be non-null"); - notNull(filterBuilder, "filterBuilder must be non-null"); - - this.catalogFramework = catalogFramework; - this.workspaceTransformer = workspaceTransformer; - this.securityService = securityService; - this.persistentStore = persistentStore; - this.workspaceQueryBuilder = workspaceQueryBuilder; - this.filterBuilder = filterBuilder; - } - - @SuppressWarnings({"unused", "WeakerAccess"} /* Needed by metatype. */) - public void setMaxSubscriptions(int maxSubscriptions) { - this.maxSubscriptions = maxSubscriptions; - } - - @Override - public String toString() { - return String.format( - "WorkspaceServiceImpl{securityService=%s, catalogFramework=%s, workspaceTransformer=%s, maxSubscriptions=%d}", - securityService, catalogFramework, workspaceTransformer, maxSubscriptions); - } - - @Override - public List getWorkspaceMetacards() { - return createQueryRequestForSubscribedToWorkspaces() - .map(this::queryRequestToWorkspaceMetacards) - .orElse(Collections.emptyList()); - } - - @Override - public List getQueryMetacards(WorkspaceMetacardImpl workspaceMetacard) { - List queryIds = workspaceMetacard.getQueries(); - - if (queryIds.isEmpty()) { - LOGGER.trace( - "Workspace metacard with id [{}] does not contain any queries", - workspaceMetacard.getId()); - return Collections.emptyList(); - } - - Query query = new QueryImpl(getQueriesFilter(queryIds)); - QueryRequest queryRequest = new QueryRequestImpl(query); - - return ResultIterable.resultIterable(catalogFramework::query, queryRequest) - .stream() - .map(Result::getMetacard) - .filter(Objects::nonNull) - .map(QueryMetacardImpl::new) - .collect(Collectors.toList()); - } - - private Filter getQueriesFilter(List queryIds) { - List queryFilters = - queryIds - .stream() - .map(id -> filterBuilder.attribute(Core.ID).is().text(id)) - .collect(Collectors.toList()); - - return filterBuilder.allOf( - filterBuilder.attribute(Core.METACARD_TAGS).is().text(QUERY_TAG), - filterBuilder.anyOf(queryFilters)); - } - - private List queryRequestToWorkspaceMetacards(QueryRequest queryRequest) { - try { - return createWorkspaceMetacards(query(queryRequest)); - } catch (CatalogQueryException e) { - LOGGER.info("Error querying for workspaces", e); - } - return Collections.emptyList(); - } - - private QueryResponse query(QueryRequest queryRequest) { - AtomicLong hitCount = new AtomicLong(0); - - QueryFunction queryFunction = - qr -> { - SourceResponse sourceResponse = catalogFramework.query(qr); - hitCount.compareAndSet(0, sourceResponse.getHits()); - return sourceResponse; - }; - - ResultIterable results = - ResultIterable.resultIterable(queryFunction, queryRequest, maxSubscriptions); - - List resultList = results.stream().collect(Collectors.toList()); - - long totalHits = hitCount.get() != 0 ? hitCount.get() : resultList.size(); - - return new QueryResponseImpl(queryRequest, resultList, totalHits); - } - - /** Get the metacards from the query response and convert them to workspace metacards. */ - private List createWorkspaceMetacards(QueryResponse response) { - return response - .getResults() - .stream() - .map(Result::getMetacard) - .filter(WorkspaceMetacardImpl::isWorkspaceMetacard) - .map(WorkspaceMetacardImpl::from) - .collect(Collectors.toList()); - } - - private Map createProperties() { - return securityService.addSystemSubject(new HashMap<>()); - } - - private Filter getWorkspaceFilterFromIds(Set workspaceIds) { - List workspaceFilters = new ArrayList<>(); - - for (String workspaceId : workspaceIds) { - workspaceFilters.add(getWorkspaceFilter(workspaceId)); - } - - return filterBuilder.anyOf(workspaceFilters); - } - - private Filter getWorkspaceFilter(String workspaceId) { - return filterBuilder.allOf( - filterBuilder.attribute(Core.METACARD_TAGS).is().like().text(WORKSPACE_TAG), - filterBuilder.attribute(Core.ID).is().equalTo().text(workspaceId)); - } - - @Override - public List getWorkspaceMetacards(Set workspaceIds) { - - if (workspaceIds.isEmpty()) { - return Collections.emptyList(); - } - - final Filter filter = getWorkspaceFilterFromIds(workspaceIds); - - final QueryRequest queryRequest = createQueryRequest(filter); - - try { - return createWorkspaceMetacards(query(queryRequest)); - } catch (CatalogQueryException e) { - LOGGER.info("Error querying for workspaces: queryRequest={}", queryRequest, e); - } - - return Collections.emptyList(); - } - - /** - * Create a query request to find all workspace metacards. - * - * @return query request - */ - private Optional createQueryRequestForSubscribedToWorkspaces() { - final List> subscriptions = findSubscriptions(); - if (subscriptions.isEmpty()) { - return Optional.empty(); - } - final Set ids = getIdsFromSubscriptions(subscriptions); - return Optional.of(getQueryRequestFromIds(ids)); - } - - private QueryRequest getQueryRequestFromIds(Set ids) { - return createQueryRequest(workspaceQueryBuilder.createFilter(ids)); - } - - private Set getIdsFromSubscriptions(List> subscriptions) { - return subscriptions - .stream() - .map(subscription -> subscription.get(ID_FIELD)) - .filter(Objects::nonNull) - .map(Object::toString) - .collect(Collectors.toSet()); - } - - private List> findSubscriptions() { - try { - return persistentStore.get( - PersistenceType.SUBSCRIPTION_TYPE.toString(), "", 0, maxSubscriptions); - } catch (PersistenceException e) { - LOGGER.debug("Failed to get subscriptions for workspaces.", e); - } - return Collections.emptyList(); - } - - /** - * Create a query request for a filter. - * - * @param filter the filter - * @return query request - */ - private QueryRequest createQueryRequest(Filter filter) { - QueryImpl query = new QueryImpl(filter); - query.setPageSize(maxSubscriptions); - query.setSortBy(new SortByImpl(Core.MODIFIED, SortOrder.DESCENDING)); - return new QueryRequestImpl(query, createProperties()); - } - - @Override - public Map>> getQueryMetacards() { - Map>> queryMetacards = - new HashMap<>(); - for (WorkspaceMetacardImpl workspaceMetacard : getWorkspaceMetacards()) { - queryMetacards.put( - workspaceMetacard.getId(), - new ImmutablePair<>(workspaceMetacard, getQueryMetacards(workspaceMetacard))); - } - return queryMetacards; - } - - @Override - public WorkspaceMetacardImpl getWorkspaceMetacard(String workspaceId) { - return getWorkspaceMetacards(Collections.singleton(workspaceId)) - .stream() - .findFirst() - .orElseThrow( - () -> - new NotFoundException( - String.format("Could not find workspace metacard with id [%s].", workspaceId))); - } - - @Override - public WorkspaceMetacardImpl getWorkspaceFromQueryId(String queryId) { - Filter queryFilter = - filterBuilder.allOf( - filterBuilder.attribute(Core.METACARD_TAGS).like().text(WORKSPACE_TAG), - filterBuilder.attribute(WorkspaceConstants.WORKSPACE_QUERIES).like().text(queryId)); - - Query query = new QueryImpl(queryFilter); - QueryRequest queryRequest = new QueryRequestImpl(query); - - return ResultIterable.resultIterable(catalogFramework::query, queryRequest) - .stream() - .map(Result::getMetacard) - .filter(Objects::nonNull) - .map(WorkspaceMetacardImpl::new) - .findFirst() - .orElseThrow( - () -> - new NotFoundException( - String.format( - "Could not find workspace metacard that contains query id [%s]", queryId))); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/quartz/DefaultScheduler.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/quartz/DefaultScheduler.java deleted file mode 100644 index cb1eae8c7c0..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/monitor/impl/quartz/DefaultScheduler.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl.quartz; - -import java.util.Optional; -import java.util.function.Supplier; -import org.quartz.Scheduler; -import org.quartz.SchedulerException; -import org.quartz.impl.StdSchedulerFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class DefaultScheduler implements Supplier> { - - private static final Logger LOGGER = LoggerFactory.getLogger(DefaultScheduler.class); - - @Override - public Optional get() { - try { - return Optional.of(StdSchedulerFactory.getDefaultScheduler()); - } catch (SchedulerException e) { - LOGGER.warn("unable to get default quartz scheduler", e); - } - return Optional.empty(); - } - - @Override - public String toString() { - return "DefaultScheduler{}"; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/DmsCoordinateProcessor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/DmsCoordinateProcessor.java deleted file mode 100644 index 85f2645a43a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/DmsCoordinateProcessor.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import java.text.DecimalFormat; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.annotation.Nullable; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A regex-based processor for identifying potential DMS coordinate literals in a given input string - * despite deviations from the official spec. The general policy is to be as forgiving as possible - * without sacrificing determinism. - */ -public class DmsCoordinateProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(DmsCoordinateProcessor.class); - - private static final String DEGREES_LAT_REGEX_STRING = "90|[0-8]?[0-9]"; - private static final String DEGREES_LON_REGEX_STRING = "180|1[0-7][0-9]|0?[0-9]?[0-9]"; - - private static final String MINUTES_REGEX_STRING = "[0-5]?[0-9]"; - private static final String SECONDS_REGEX_STRING = "[0-5]?[0-9](?:\\.\\d*)?"; - - private static final String DMS_LAT_REGEX_STRING = - "(?:\\d+\\D|\\D)*?(" - + DEGREES_LAT_REGEX_STRING - + ")\\D+(" - + MINUTES_REGEX_STRING - + ")\\D+(" - + SECONDS_REGEX_STRING - + ")\\D*([NnSs])\\D*"; - - private static final String DMS_LON_REGEX_STRING = - "(?:\\d+\\D|\\D)*?(" - + DEGREES_LON_REGEX_STRING - + ")\\D+(" - + MINUTES_REGEX_STRING - + ")\\D+(" - + SECONDS_REGEX_STRING - + ")\\D*([EeWw])\\D*"; - - private static final int DEGREES_LAT_GROUP = 1; - private static final int MINUTES_LAT_GROUP = 2; - private static final int SECONDS_LAT_GROUP = 3; - private static final int DIRECTION_LAT_GROUP = 4; - - private static final int DEGREES_LON_GROUP = 5; - private static final int MINUTES_LON_GROUP = 6; - private static final int SECONDS_LON_GROUP = 7; - private static final int DIRECTION_LON_GROUP = 8; - - private static final Pattern PATTERN_DMS_COORDINATES = - Pattern.compile(DMS_LAT_REGEX_STRING + DMS_LON_REGEX_STRING); - - // This key tells the UI that the geo is on the suggestion itself - private static final String LITERAL_SUGGESTION_ID = "LITERAL-DMS"; - - /** - * Given a list of {@link Suggestion}s and the query that yielded them, enhance the list with - * additional suggestions based upon the presence of coordinate literals in the query string. - * - * @param results the list of results to enhance. - * @param query the user-provided gazetteer query text, which may contain coordinate literals. - */ - public void enhanceResults(final List results, final String query) { - LOGGER.trace("(DMS) Adding result for query [{}]", query); - final LiteralSuggestion dmsSuggestion = getDmsSuggestion(query); - if (dmsSuggestion != null && dmsSuggestion.hasGeo()) { - LOGGER.trace("Adding the DMS suggestion to results [{}]", dmsSuggestion); - results.add(0, dmsSuggestion); - } - LOGGER.trace("(DMS) Done"); - } - - @Nullable - private static LatLon dmsToLatLon(final String dmsString) { - final DMSCoordinates dmsCoordinates = DMSCoordinates.parseDms(dmsString); - if (dmsCoordinates == null) { - return null; - } - - final DMSComponent dmsLat = dmsCoordinates.lat; - final DMSComponent dmsLon = dmsCoordinates.lon; - final int latModifier = dmsLat.direction.equalsIgnoreCase("N") ? 1 : -1; - final int lonModifier = dmsLon.direction.equalsIgnoreCase("E") ? 1 : -1; - final Double lat = dmsLat.toDecimalDegrees() * latModifier; - final Double lon = dmsLon.toDecimalDegrees() * lonModifier; - - return LatLon.createIfValid(lat, lon); - } - - @Nullable - private LiteralSuggestion getDmsSuggestion(final String query) { - final List dmsCoordinates = new ArrayList<>(); - final Matcher matcher = PATTERN_DMS_COORDINATES.matcher(query); - final StringBuilder nameBuilder = new StringBuilder("DMS:"); - - int start = 0; - while (matcher.find()) { - final String dmsString = query.substring(start, matcher.end()); - final LatLon latLon = dmsToLatLon(dmsString); - start = matcher.end(); - if (latLon != null) { - LOGGER.trace("Match found [{}]", matcher.group()); - dmsCoordinates.add(latLon); - nameBuilder - .append(" [ ") - .append(DMSCoordinates.normalizedDmsString(dmsString)) - .append(" ]"); - } - } - if (dmsCoordinates.isEmpty()) { - LOGGER.trace("No valid DMS strings could be inferred from query [{}]", query); - return null; - } - return new LiteralSuggestion(LITERAL_SUGGESTION_ID, nameBuilder.toString(), dmsCoordinates); - } - - private static class DMSComponent { - private final int degrees; - private final int minutes; - private final double seconds; - private final String direction; - private final DecimalFormat degreeFormat; - - private DMSComponent( - String degrees, - String minutes, - String seconds, - String direction, - DecimalFormat degreeFormat) { - this.degrees = Integer.parseInt(degrees); - this.minutes = Integer.parseInt(minutes); - this.seconds = Double.parseDouble(seconds); - this.direction = direction; - this.degreeFormat = degreeFormat; - } - - private Double toDecimalDegrees() { - return degrees + minutes / 60.0 + seconds / 3600.0; - } - } - - private static class DMSCoordinates { - private DMSComponent lat; - private DMSComponent lon; - - private DMSCoordinates(DMSComponent lat, DMSComponent lon) { - this.lat = lat; - this.lon = lon; - } - - /** - * Deserialize a DMS string. - * - * @param dmsString the DMS string to deserialize. - * @return [dmsLat, dmsLon] The two deserialized parts of the DMS string. - */ - @Nullable - private static DMSCoordinates parseDms(final String dmsString) { - final Matcher matcher = PATTERN_DMS_COORDINATES.matcher(dmsString); - - if (matcher.matches()) { - final DMSComponent lat = - new DMSComponent( - matcher.group(DEGREES_LAT_GROUP), - matcher.group(MINUTES_LAT_GROUP), - matcher.group(SECONDS_LAT_GROUP), - matcher.group(DIRECTION_LAT_GROUP), - new DecimalFormat("00")); - final DMSComponent lon = - new DMSComponent( - matcher.group(DEGREES_LON_GROUP), - matcher.group(MINUTES_LON_GROUP), - matcher.group(SECONDS_LON_GROUP), - matcher.group(DIRECTION_LON_GROUP), - new DecimalFormat("000")); - return new DMSCoordinates(lat, lon); - } - return null; - } - - private static String normalizedDmsString(final String dmsString) { - final DMSCoordinates dmsCoordinates = parseDms(dmsString); - final List dmsParts = - dmsCoordinates == null - ? new ArrayList<>() - : Arrays.asList(dmsCoordinates.lat, dmsCoordinates.lon); - final NumberFormat minutesSecondsFormat = new DecimalFormat("00.###"); - - final StringBuilder dmsBuilder = new StringBuilder(); - for (DMSComponent dmsPart : dmsParts) { - dmsBuilder - .append(dmsPart.degreeFormat.format(dmsPart.degrees)) - .append("\u00B0") - .append(minutesSecondsFormat.format(dmsPart.minutes)) - .append("\'") - .append(minutesSecondsFormat.format(dmsPart.seconds)) - .append("\"") - .append(dmsPart.direction.toUpperCase()) - .append(" "); - } - return dmsBuilder.toString().trim(); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LatLon.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LatLon.java deleted file mode 100644 index 90d8c5af080..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LatLon.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import static org.apache.commons.lang3.Validate.notNull; - -import com.google.common.collect.ImmutableList; -import java.util.List; -import javax.annotation.Nullable; -import org.apache.commons.math3.util.Precision; -import org.codice.usng4j.BoundingBox; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This class is used to serialize lat/lon data for the frontend. While there exists several third - * party classes that could have been used, taking this approach ensures that: - * - *

    - *
  1. The serialization format lives within the application, nearby its usage. - *
  2. The serialization format cannot break when third party dependencies are upgraded. - *
- */ -class LatLon { - private static final Logger LOGGER = LoggerFactory.getLogger(LatLon.class); - - private final Double lat; - private final Double lon; - - LatLon(Double lat, Double lon) { - LOGGER.trace("Creating LatLon ({}, {})", lat, lon); - this.lat = lat; - this.lon = lon; - } - - @Nullable - public static LatLon createIfValid(Double lat, Double lon) { - return (LatLon.isValidLatitude(lat) && LatLon.isValidLongitude(lon)) - ? new LatLon(lat, lon) - : null; - } - - Double getLat() { - return lat; - } - - Double getLon() { - return lon; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LatLon latLon = (LatLon) o; - return Precision.equals(lat, latLon.lat, .0000000001) - && Precision.equals(lon, latLon.lon, .0000000001); - } - - @Override - public int hashCode() { - int result = lat.hashCode(); - result = 31 * result + lon.hashCode(); - return result; - } - - @Override - public String toString() { - return "(" + getLat() + ", " + getLon() + ")"; - } - - static boolean isValidLatitude(double latitude) { - return latitude >= -90 && latitude <= 90; - } - - static boolean isValidLongitude(double longitude) { - return longitude >= -180 && longitude <= 180; - } - - static List fromBoundingBox(BoundingBox bb) { - LOGGER.trace("Creating LatLon from BoundingBox [{}]", bb); - notNull(bb, "The provided bounding box cannot be null"); - return ImmutableList.of( - new LatLon(bb.getSouth(), bb.getWest()), - new LatLon(bb.getNorth(), bb.getWest()), - new LatLon(bb.getNorth(), bb.getEast()), - new LatLon(bb.getSouth(), bb.getEast())); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LatLonCoordinateProcessor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LatLonCoordinateProcessor.java deleted file mode 100644 index b75231e041d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LatLonCoordinateProcessor.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The {@link LatLonCoordinateProcessor} enables search suggestions for Lat/Lon coordinate literals - * whenever a pair of decimal numbers is encountered within the expected bounds. The general policy - * is to be as forgiving as possible without sacrificing determinism. - */ -public class LatLonCoordinateProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(LatLonCoordinateProcessor.class); - - private static final String REGEX_LAT_LON = "[-]?(([\\d]+(\\.[\\d]+)?)|(\\.[\\d]+))"; - - private static final Pattern PATTERN_LAT_LON = Pattern.compile(REGEX_LAT_LON); - - // This key tells the UI that the geo is on the suggestion itself - private static final String LITERAL_SUGGESTION_ID = "LITERAL-LAT-LON"; - - /** - * Given a list of {@link Suggestion}s and the query that yielded them, enhance the list with - * additional suggestions based upon the presence of coordinate literals in the query string. - * - * @param results the list to add results to. - * @param query the query string with potential coordinate literals present. - */ - public void enhanceResults(List results, String query) { - final LiteralSuggestion literal = getLatLonSuggestions(query); - if (literal != null && literal.hasGeo()) { - LOGGER.trace("Adding the Lat/Lon suggestion to results [{}]", literal); - results.add(0, literal); - } - } - - private LiteralSuggestion getLatLonSuggestions(String query) { - Matcher matcher = PATTERN_LAT_LON.matcher(query); - List numbers = new ArrayList<>(); - while (matcher.find()) { - numbers.add(Double.parseDouble(matcher.group())); - } - if (numbers.size() <= 1) { - LOGGER.trace("Not enough numbers found to suggest a Lat/Lon"); - return null; - } - List latLonList = getLatLonList(numbers); - String name = - "Lat/Lon: " + latLonList.stream().map(LatLon::toString).collect(Collectors.joining(", ")); - return new LiteralSuggestion(LITERAL_SUGGESTION_ID, name, latLonList); - } - - private List getLatLonList(List numbers) { - List latLons = new ArrayList<>(); - for (int index = 0; index < numbers.size(); index++) { - double latitude = numbers.get(index); - if (LatLon.isValidLatitude(latitude) && index + 1 < numbers.size()) { - - double longitude = numbers.get(index + 1); - if (LatLon.isValidLongitude(longitude)) { - latLons.add(new LatLon(latitude, longitude)); - ++index; - } - } - } - return latLons; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LiteralSuggestion.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LiteralSuggestion.java deleted file mode 100644 index ce52c03155e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/LiteralSuggestion.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import java.util.List; -import org.codice.ddf.spatial.geocoding.Suggestion; - -class LiteralSuggestion implements Suggestion { - private final String id; - private final String name; - private final List geo; - - LiteralSuggestion(String id, String name, List geo) { - this.id = id; - this.name = name; - this.geo = geo; - } - - @Override - public String getId() { - return id; - } - - @Override - public String getName() { - return name; - } - - List getGeo() { - return geo; - } - - boolean hasGeo() { - return geo != null && !geo.isEmpty(); - } - - @Override - public String toString() { - return getName(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/MgrsCoordinateProcessor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/MgrsCoordinateProcessor.java deleted file mode 100644 index e67307f02e7..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/MgrsCoordinateProcessor.java +++ /dev/null @@ -1,339 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import static java.lang.String.format; -import static org.apache.commons.lang3.StringUtils.leftPad; - -import com.google.common.annotations.VisibleForTesting; -import java.text.ParseException; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.codice.usng4j.BoundingBox; -import org.codice.usng4j.CoordinateSystemTranslator; -import org.codice.usng4j.UsngCoordinate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A regex-based processor for identifying potential MGRS coordinate literals in a given input - * string despite deviations from the official spec. The general policy is to be as forgiving as - * possible without sacrificing determinism. - * - *

Due to the strict expectations of usng4j regarding input strings, some additional processing - * is done to "backfill" necessary zeros for occurrences of a {@link MgrsPartType#NUMERIC} string. - * - * @see #processNumericType(String) for more information on this "backfilling" behavior. - */ -public class MgrsCoordinateProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(MgrsCoordinateProcessor.class); - - private static final Pattern PATTERN_MGRS_ZONE_AND_LATITUDE_BAND = - Pattern.compile( - "(" - + UsngCoordinate.ZONE_REGEX_STRING - + ")" - + UsngCoordinate.LATITUDE_BAND_PART_ONE_REGEX_STRING); - - private static final Pattern PATTERN_MGRS_100KM = - Pattern.compile(UsngCoordinate.LATITUDE_BAND_PART_TWO_REGEX_STRING); - - private static final Pattern PATTERN_MGRS_NUMERIC = - Pattern.compile("((\\d){1,5}(\\h)+(\\d){1,5}(\\W)+)|((\\d){2,10})"); - - private static final Pattern PATTERN_MGRS_ANYPART = - Pattern.compile( - format( - "(%s)|(%s)|(%s)", - PATTERN_MGRS_ZONE_AND_LATITUDE_BAND.pattern(), - PATTERN_MGRS_100KM.pattern(), - PATTERN_MGRS_NUMERIC.pattern()), - Pattern.CASE_INSENSITIVE); - - // usng4j helper constant for backfilling zeros - private static final Integer MAX_COORDINATE_LENGTH = 5; - - // This key tells the UI that the geo is on the suggestion itself - private static final String LITERAL_SUGGESTION_ID = "LITERAL-MGRS"; - - private static final String ZERO = "0"; - - private static final String WHITESPACE = " "; - - /** - * An {@link MgrsPartType} identifies one of the three different component strings that are glued - * together to form a valid MGRS coordinate string, including a category {@link #NONE} to be used - * when the string is unsuitable for any part of an MGRS coordinate or the type has not been - * provided yet. - * - *

Each type corresponds to a regex defined above. - */ - private enum MgrsPartType { - NONE, - ZONE, - HUNDRED_KM, - NUMERIC - } - - private final CoordinateSystemTranslator translator; - - public MgrsCoordinateProcessor(CoordinateSystemTranslator translator) { - this.translator = translator; - } - - /** - * Given a list of {@link Suggestion}s and the query that yielded them, enhance the list with - * additional suggestions based upon the presence of coordinate literals in the query string. - * - * @param results the list of results to enhance. - * @param query the query string to search for coordinate literals. - */ - public void enhanceResults(List results, String query) { - final LiteralSuggestion literal = getMgrsSuggestion(query); - if (literal != null && literal.hasGeo()) { - LOGGER.trace("Adding the MGRS suggestion to results [{}]", literal); - results.add(0, literal); - } - } - - /** - * Build the MGRS suggestion. - * - * @param query the query string to search for coordinate literals. - * @return a suggestion object with geometry attached to it; a {@link BoundingBox} if only one - * coordinate was detected, or a collection of {@link LatLon} center points otherwise. If no - * MGRS was detected in the query, {@code null} is returned. - */ - @Nullable - private LiteralSuggestion getMgrsSuggestion(String query) { - final List matches = getMgrsCoordinateStrings(query); - if (matches.isEmpty()) { - LOGGER.debug("No valid MGRS strings could be inferred from query [{}]", query); - return null; - } - - final List mgrsCoordinates = new ArrayList<>(); - final StringBuilder nameBuilder = new StringBuilder("MGRS:"); - for (String match : matches) { - final UsngCoordinate coordinate = parseMgrsString(match); - if (coordinate == null || mgrsCoordinates.contains(coordinate)) { - continue; - } - mgrsCoordinates.add(coordinate); - nameBuilder.append(" [ ").append(coordinate.toMgrsString()).append(" ]"); - } - - if (mgrsCoordinates.size() == 1) { - final UsngCoordinate mgrsCoord = mgrsCoordinates.get(0); - final BoundingBox bb = translator.toBoundingBox(mgrsCoord); - return new LiteralSuggestion( - LITERAL_SUGGESTION_ID, nameBuilder.toString(), LatLon.fromBoundingBox(bb)); - } - return new LiteralSuggestion( - LITERAL_SUGGESTION_ID, - nameBuilder.toString(), - mgrsCoordinates - .stream() - .map(translator::toLatLon) - .map(d -> new LatLon(d.getLat(), d.getLon())) - .collect(Collectors.toList())); - } - - @Nullable - private UsngCoordinate parseMgrsString(String mgrs) { - try { - return translator.parseMgrsString(mgrs); - } catch (ParseException e) { - LOGGER.debug("Detected string [{}] was not valid MGRS", mgrs, e); - return null; - } - } - - /** - * Given the user's query, return a list of valid MGRS strings that could be inferred from the - * query. The strings should be ready for submission to usng4j to be parsed and mathematically - * evaluated. - * - *

The query is terminated with whitespace so the user does not have to. See the LHS of {@link - * #PATTERN_MGRS_NUMERIC} for the cases where this is useful. - * - *

There should be no duplicate entries in the returned list. The order of the entries matters - * so a {@link java.util.Set} cannot be used. - * - * @param query the input string potentially holding MGRS values. - * @return a list of valid MGRS values that can be sent to usng4j. - * @throws IllegalStateException if the provided query yields an {@link MgrsPartType#NONE}. - */ - @VisibleForTesting - List getMgrsCoordinateStrings(String query) { - final String terminatedQuery = query.concat(WHITESPACE); - final Matcher matcher = PATTERN_MGRS_ANYPART.matcher(terminatedQuery); - final List mgrsStrings = new ArrayList<>(); - final StringBuilder mgrsBuilder = new StringBuilder(); - - MgrsPartType previousType = MgrsPartType.NONE; - - while (matcher.find()) { - final String mgrsPart = matcher.group().toUpperCase(); - final MgrsPartType type = getPartType(mgrsPart); - switch (type) { - case ZONE: - handleZoneWithPreviousType(mgrsPart, previousType, mgrsBuilder, mgrsStrings); - break; - case HUNDRED_KM: - handleHundredKmWithPreviousType(mgrsPart, previousType, mgrsBuilder); - break; - case NUMERIC: - handleNumericWithPreviousType(mgrsPart, previousType, mgrsBuilder, mgrsStrings); - break; - case NONE: - // This should not be reachable or testable; it indicates the regex contract was broken. - throw new IllegalStateException( - format("The provided mgrs part [ %s ] must map to a valid type", mgrsPart)); - } - LOGGER.debug( - "MGRS strings [{}], builder state [{}], and types [{}|{}]", - mgrsStrings, - mgrsBuilder, - previousType, - type); - previousType = type; - } - LOGGER.trace("Builder's final state [{}]", mgrsBuilder); - if (previousType != MgrsPartType.NUMERIC && mgrsBuilder.length() > 0) { - mgrsStrings.add(mgrsBuilder.toString()); - } - return mgrsStrings.stream().distinct().collect(Collectors.toList()); - } - - private static void handleZoneWithPreviousType( - String mgrsPart, - MgrsPartType previousType, - StringBuilder mgrsBuilder, - List mgrsStrings) { - LOGGER.trace("Found a ZONE [{}] which occurs after a {}", mgrsPart, previousType); - switch (previousType) { - case ZONE: - case HUNDRED_KM: - LOGGER.trace( - "Storing final result coordinate, clearing the builder, and saving this part [{}]", - mgrsPart); - mgrsStrings.add(mgrsBuilder.toString()); - mgrsBuilder.delete(0, mgrsBuilder.length()); - mgrsBuilder.append(mgrsPart); - break; - case NUMERIC: - LOGGER.trace("Clearing the builder and saving this part [{}]", mgrsPart); - mgrsBuilder.delete(0, mgrsBuilder.length()); - mgrsBuilder.append(mgrsPart); - break; - case NONE: - LOGGER.trace("Saving this part [{}]", mgrsPart); - mgrsBuilder.append(mgrsPart); - } - } - - private static void handleHundredKmWithPreviousType( - String mgrsPart, MgrsPartType previousType, StringBuilder mgrsBuilder) { - LOGGER.trace("Found a 100KM [{}] which occurs after a {}", mgrsPart, previousType); - switch (previousType) { - case ZONE: - LOGGER.trace("Saving this part [{}]", mgrsPart); - mgrsBuilder.append(mgrsPart); - break; - case HUNDRED_KM: - case NUMERIC: - case NONE: - LOGGER.trace("Ignoring this part [{}], since 100KM is only valid after a ZONE", mgrsPart); - } - } - - private static void handleNumericWithPreviousType( - String mgrsPart, - MgrsPartType previousType, - StringBuilder mgrsBuilder, - List mgrsStrings) { - LOGGER.trace("Found a NUMERIC [{}] which occurs after a {}", mgrsPart, previousType); - switch (previousType) { - case ZONE: - case HUNDRED_KM: - case NUMERIC: - String processed = processNumericType(mgrsPart); - LOGGER.trace( - "NUMERIC [{}] processed = [{}], storing final result coordinate", mgrsPart, processed); - mgrsStrings.add(mgrsBuilder.toString() + processed); - break; - case NONE: - LOGGER.trace( - "Ignoring this part [{}], since NUMERIC is only valid in a ZONE but no ZONE was provided", - mgrsPart); - } - } - - /** - * Given an MGRS {@link MgrsPartType#NUMERIC} part format the string to ensure an accurate - * conversion, using whitespace as a hint as to the user's intentions. - * - *

The usng4j library demands a minimum of 6 symbols if the easting / northing data is not to - * be ignored. That is, the easting component must be fully specified for the conversion to work. - * To accomodate this, zeros are prepended onto the easting to whatever appropriate degree. - * - *

For example, an input of 4Q KJ 1 2 will become 4QKJ000012 so the - * easting / northing is not ignored. - * - *

Refer to the unit tests for more comprehensive examples. - * - *

TODO DDF-4243 - This should be simplified if usng4j is improved - * - * @see #assemble(String, String) - * @param mgrsPart an MGRS substring that contains BOTH the easting and northing. - * @return a modified easting/northing string with zeros backfilled to ensure accurate conversion. - */ - @SuppressWarnings("squid:S1135" /* Ticket number provided on to-do comment */) - private static String processNumericType(String mgrsPart) { - final String[] numericParts = mgrsPart.split("(\\W)+"); - if (numericParts.length >= 3 || numericParts.length == 0) { - throw new IllegalArgumentException( - "The mgrs part provided is not a valid NUMERIC type: " + mgrsPart); - } - if (numericParts.length == 2) { - return assemble(numericParts[0], numericParts[1]); - } - String eastingAndNorthing = numericParts[0]; - if (eastingAndNorthing.length() % 2 > 0) { - eastingAndNorthing = eastingAndNorthing.substring(0, eastingAndNorthing.length() - 1); - } - final int halfway = eastingAndNorthing.length() / 2; - final String easting = eastingAndNorthing.substring(0, halfway); - final String northing = eastingAndNorthing.substring(halfway); - return assemble(easting, northing); - } - - private static String assemble(String easting, String northing) { - return leftPad(easting, MAX_COORDINATE_LENGTH, ZERO) - + leftPad(northing, MAX_COORDINATE_LENGTH, ZERO); - } - - private static MgrsPartType getPartType(String mgrsPart) { - if (PATTERN_MGRS_ZONE_AND_LATITUDE_BAND.matcher(mgrsPart).matches()) return MgrsPartType.ZONE; - if (PATTERN_MGRS_100KM.matcher(mgrsPart).matches()) return MgrsPartType.HUNDRED_KM; - if (PATTERN_MGRS_NUMERIC.matcher(mgrsPart).matches()) return MgrsPartType.NUMERIC; - return MgrsPartType.NONE; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/UtmUpsCoordinateProcessor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/UtmUpsCoordinateProcessor.java deleted file mode 100644 index 8d88cd2794e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/suggestion/UtmUpsCoordinateProcessor.java +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import static java.util.stream.Collectors.toList; -import static org.apache.commons.lang3.Validate.notNull; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Stream; -import javax.annotation.Nullable; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.codice.usng4j.CoordinateSystemTranslator; -import org.codice.usng4j.DecimalDegreesCoordinate; -import org.codice.usng4j.NSIndicator; -import org.codice.usng4j.UsngCoordinate; -import org.codice.usng4j.UtmUpsCoordinate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A regex-based processor for identifying potential UTM/UPS coordinate literals in a given input - * string despite deviations from the official spec. The general policy is to be as forgiving as - * possible without sacrificing determinism. - */ -public class UtmUpsCoordinateProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(UtmUpsCoordinateProcessor.class); - - private static final Character SPACE_CHAR = ' '; - - private static final Pattern PATTERN_UTM_COORDINATE = - Pattern.compile( - "(" - + UsngCoordinate.ZONE_REGEX_STRING - + ")" - + UsngCoordinate.LATITUDE_BAND_PART_ONE_REGEX_STRING - + "?( )+(\\d){1,6}(me)?( )+(\\d{1,7}|10000000)(mn)?", - Pattern.CASE_INSENSITIVE); - - private static final Pattern PATTERN_UPS_COORDINATE = - Pattern.compile("0?[ABYZ]( )+(\\d){1,7}(me)?( )+(\\d){1,7}(mn)?", Pattern.CASE_INSENSITIVE); - - private static final Pattern PATTERN_UTM_OR_UPS_COORDINATE = - Pattern.compile( - String.format( - "(%s)|(%s)", PATTERN_UTM_COORDINATE.pattern(), PATTERN_UPS_COORDINATE.pattern()), - Pattern.CASE_INSENSITIVE); - - // This key tells the UI that the geo is on the suggestion itself - private static final String LITERAL_SUGGESTION_ID = "LITERAL-UTM-UPS"; - - private final CoordinateSystemTranslator translator; - - public UtmUpsCoordinateProcessor(CoordinateSystemTranslator translator) { - this.translator = translator; - } - - /** - * Given a list of {@link Suggestion}s and the query that yielded them, enhance the list with - * additional suggestions based upon the presence of coordinate literals in the query string. - * - * @param results the list of results to enhance. - * @param query the user-provided gazetteer query text, which may contain coordinate literals. - */ - public void enhanceResults(final List results, final String query) { - LOGGER.trace("(UTM/UPS) Adding result for query [{}]", query); - final List literals = getUtmUpsSuggestions(query); - literals - .stream() - .filter(Objects::nonNull) - .filter(LiteralSuggestion::hasGeo) - .forEach( - literal -> { - LOGGER.trace("Adding the UTM/UPS suggestion to results [{}]", literal); - results.add(0, literal); - }); - LOGGER.trace("(UTM/UPS) Done"); - } - - private List getUtmUpsSuggestions(final String query) { - final Matcher matcher = PATTERN_UTM_OR_UPS_COORDINATE.matcher(query); - final List utmUpsMatches = new ArrayList<>(); - while (matcher.find()) { - final String group = matcher.group(); - LOGGER.trace("Match found [{}]", group); - utmUpsMatches.add(capitalizeLatBand(group)); - } - - if (utmUpsMatches.isEmpty()) { - LOGGER.trace("No valid UTM or UPS strings could be inferred from query [{}]", query); - return Collections.emptyList(); - } - - return utmUpsMatches.size() == 1 - ? suggestionsForSinglePoint(utmUpsMatches.get(0)) - : Collections.singletonList(suggestionForMultiplePoints(utmUpsMatches)); - } - - /** - * Generates a list of {@link LiteralSuggestion}s based on the given {@code utmUpsCoord} string. - * This method is only used to generate suggestions when the user enters a single UTM/UPS - * coordinate. The following suggestions are returned depending on the information provided in the - * coordinate: - * - *

    - *
  • If the {@code utmUpsCoord} does not have a latitude band, then two suggestions are - * returned - one for each hemisphere - and the hemisphere is denoted by a "N" or "S" - * suffix. Example: "18 631054mE 4776851mN" -> "UTM/UPS: [ 18N 631054mE 4776851mN N ]", - * "UTM/UPS: [ 18S 631054mE 4776851mN S ]" - *
  • If the {@code utmpUpsCoord} has an S latitude band, then two suggestions are also - * returned: one for the S latitude band coordinate and another for the Southern hemisphere - * coordinate. This is because the "S" is ambiguous - it can either refer to the latitude - * band or the Southern hemisphere. Example: "15S 533427mE 3796272mN" -> "UTM/UPS: [ 15S - * 533427mE 3796272mN ]", "UTM/UPS: [ 15S 533427mE 3796272mN S ]" - *
  • If the {@code utmUpsCoord} has an N latitude band, then two suggestions are returned: one - * for the N latitude band and another for the Northern hemisphere. The "N" isn't ambiguous - * in this case, but the Northern hemisphere suggestion is included for consistency and to - * teach users about the N/S hemisphere syntax. Example: "9N 365103mE 659568mN" -> "UTM/UPS: - * [ 9N 365103mE 659568mN ]", "UTM/UPS: [ 9N 365103mE 659568mN N ]" - *
  • Otherwise, one suggestion is returned. Example: "20M 48831mE09437282mN" -> "UTM/UPS: [ - * 20M 48831mE09437282mN ]" - *
- * - * @param utmUpsCoord the user-provided gazetteer query text. It must match the {@code - * PATTERN_UTM_OR_UPS_COORDINATE} pattern. - * @return a list of either one or two {@link LiteralSuggestion}s, depending on the latitude band - * of {@code utmUpsCoord} - */ - private List suggestionsForSinglePoint(String utmUpsCoord) { - final Character latBand = getLatBand(utmUpsCoord); - if (latBand == null) { - // A coordinate without an NS indicator and a lat band is invalid so show two suggestions, - // one for the northern hemisphere and another for the southern hemisphere. - return Stream.of(parseUtmUpsString(utmUpsCoord + " S"), parseUtmUpsString(utmUpsCoord + " N")) - .filter(Objects::nonNull) - .map(this::suggestion) - .collect(toList()); - } else if (latBand.equals('N')) { - // If the coordinate has a N lat band, include the northern hemisphere suggestion for - // convenience - return Stream.of( - parseUtmUpsString(removeLatBand(utmUpsCoord) + " N"), parseUtmUpsString(utmUpsCoord)) - .filter(Objects::nonNull) - .map(this::suggestion) - .collect(toList()); - } else if (latBand.equals('S')) { - // Similarly, if the coordinate has an S lat band, include the southern hemisphere - // suggestion for convenience - return Stream.of( - parseUtmUpsString(removeLatBand(utmUpsCoord) + " S"), parseUtmUpsString(utmUpsCoord)) - .filter(Objects::nonNull) - .map(this::suggestion) - .collect(toList()); - } else { - return Stream.of(parseUtmUpsString(utmUpsCoord)) - .filter(Objects::nonNull) - .map(this::suggestion) - .collect(toList()); - } - } - - private LiteralSuggestion suggestion(UtmUpsCoordinate utmUps) { - return new LiteralSuggestion( - LITERAL_SUGGESTION_ID, - makeSuggestionText(utmUps), - Collections.singletonList(latLonFromUtmUtps(utmUps))); - } - - /** - * Generates one {@link LiteralSuggestion} by combining the latitude/longitude values of each - * UTM/UPS coordinate in the {@code utmUpsCoords} list. This method is used to generate a - * suggestion when the user enters multiple UTM/UPS coordinates. No additional suggestions are - * made for each point for simplicity since the map will pan to the extent or bounding box of all - * the points. As a result, the N/S characters of each coordinate are always treated as latitude - * bands and a coordinate is considered invalid if a latitude band is not included. Example: "12S - * 241451mE 4101052mN 13R 37090mE 63394439mN" -> "UTM/UPS: [ 12S 241451mE 4101052mN ] [ 13R - * 37090mE 63394439mN ]" - * - * @param utmUpsCoords a list of strings matching the {@code PATTERN_UTM_OR_UPS_COORDINATE} - * pattern, created from the user-provided gazetteer query text. - * @return a singleton list with one {@link LiteralSuggestion} with the combined list of - * latitude/longitude values. - */ - private LiteralSuggestion suggestionForMultiplePoints(final List utmUpsCoords) { - List utmUpsList = - utmUpsCoords - .stream() - .map(this::parseUtmUpsString) - .filter(Objects::nonNull) - .collect(toList()); - List latLonList = - utmUpsList.stream().map(this::latLonFromUtmUtps).filter(Objects::nonNull).collect(toList()); - String suggestionText = makeSuggestionText(utmUpsList); - - return new LiteralSuggestion(LITERAL_SUGGESTION_ID, suggestionText, latLonList); - } - - private static String makeSuggestionText(UtmUpsCoordinate utmUps) { - final StringBuilder nameBuilder = new StringBuilder(); - if (utmUps.isUTM()) { - nameBuilder.append("UTM: [ ").append(utmUps.toString()).append(" ]"); - if (utmUps.getLatitudeBand() == null) { - if (utmUps.getNSIndicator() == NSIndicator.SOUTH) { - nameBuilder.append(" (Southern)"); - } else { - nameBuilder.append(" (Northern)"); - } - } - } else { - nameBuilder.append("UPS: [ ").append(utmUps.toString()).append(" ]"); - } - return nameBuilder.toString(); - } - - private static String makeSuggestionText(List utmUpsList) { - final StringBuilder nameBuilder = new StringBuilder(); - long numberOfUtmCoords = utmUpsList.stream().filter(UtmUpsCoordinate::isUTM).count(); - int total = utmUpsList.size(); - if (numberOfUtmCoords == total) { - nameBuilder.append("UTM:"); - } else if (numberOfUtmCoords == 0) { - nameBuilder.append("UPS:"); - } else { - nameBuilder.append("UTM/UPS:"); - } - for (UtmUpsCoordinate utmUps : utmUpsList) { - nameBuilder.append(" [ ").append(utmUps.toString()).append(" ]"); - } - return nameBuilder.toString(); - } - - @Nullable - private LatLon latLonFromUtmUtps(UtmUpsCoordinate utmUps) { - DecimalDegreesCoordinate d = toLatLon(utmUps); - if (d == null) { - return null; - } - return new LatLon(d.getLat(), d.getLon()); - } - - /** - * USNG's error handling API is inconsistent. Some inputs will trigger an {@link - * IllegalArgumentException} while some trigger a {@link java.text.ParseException}. For the - * purposes of this class, all errors are the same if the string could not be parsed. - * - * @param utmUps the utm or ups string to parse. - * @return a valid coordinate instance, or null if the parsing failed. - */ - @Nullable - private UtmUpsCoordinate parseUtmUpsString(final String utmUps) { - try { - return translator.parseUtmUpsString(utmUps); - } catch (Exception e) { - LOGGER.debug("Detected string [{}] was not valid UTM/UPS", utmUps, e); - return null; - } - } - - @Nullable - private DecimalDegreesCoordinate toLatLon(final UtmUpsCoordinate utmUps) { - final DecimalDegreesCoordinate ddc = translator.toLatLon(utmUps); - if (ddc == null) { - LOGGER.trace("Invalid coordinate [{}], output was null", utmUps); - } - return ddc; - } - - /** - * Transform the UTM string to disambiguate multiple hemisphere clues. - * - * @param utmOrUps the UTM string to transform. - * @return a UTM string with a single piece of data that defines hemisphere. - */ - private static String capitalizeLatBand(final String utmOrUps) { - if (!PATTERN_UTM_COORDINATE.matcher(utmOrUps).matches()) { - LOGGER.trace("No transform necessary, coordinate [{}] was not UTM", utmOrUps); - return utmOrUps; // Must be UPS, do nothing - } - final Character latBand = getLatBand(utmOrUps); - if (latBand == null) { - LOGGER.trace("No lat band found on input [{}], skipping conversion to upper case", utmOrUps); - return utmOrUps; - } - if (Character.isLowerCase(latBand)) { - final String asUpperCase = setLatBand(utmOrUps, Character.toUpperCase(latBand)); - LOGGER.trace( - "Found lower case lat band on input [{}], converting to upper case [{}]", - utmOrUps, - asUpperCase); - return asUpperCase; - } - LOGGER.trace("Found lat band on input [{}]", utmOrUps); - return utmOrUps; - } - - /** - * Private utility method that detects if a latitude band is present in a UTM input string and - * returns it, or null if it didn't exist. The provided input must match {@link - * #PATTERN_UTM_COORDINATE}. - * - * @param input UTM string input to search. - * @return the lat band character, or null if it wasn't on the input string. - */ - @Nullable - private static Character getLatBand(final String input) { - final int indexOfLastSymbolInZoneClause = input.indexOf(SPACE_CHAR) - 1; - final char lastSymbolInZoneClause = input.charAt(indexOfLastSymbolInZoneClause); - if (Character.isLetter(lastSymbolInZoneClause)) { - return lastSymbolInZoneClause; - } - return null; - } - - /** - * Private utility method for updating a UTM string in-place with a new latitude band. The - * provided input must match {@link #PATTERN_UTM_COORDINATE}. - * - * @param input UTM string input; must match {@link #PATTERN_UTM_COORDINATE}. - * @param newLatBand character to use as the new latitude band for the new UTM string. - * @return a new UTM string with the provided {@code newLatBand}, regardless if the original UTM - * {@code input} had a lat band or not. - */ - private static String setLatBand(final String input, final Character newLatBand) { - notNull(newLatBand, "newLatBand cannot be null"); - final int indexOfFirstWhiteSpace = input.indexOf(SPACE_CHAR); - final int indexOfFirstWhiteSpaceOrLatBand = - Character.isLetter(input.charAt(indexOfFirstWhiteSpace - 1)) - ? indexOfFirstWhiteSpace - 1 // Use lat band index instead - : indexOfFirstWhiteSpace; - return input - .substring(0, indexOfFirstWhiteSpaceOrLatBand) - .concat(Character.toString(newLatBand)) - .concat(input.substring(indexOfFirstWhiteSpace)); - } - - /** - * Private utility method for removing the latitude band in a UTM string in-place. The provided - * input must match {@link #PATTERN_UTM_COORDINATE}. - * - * @param input UTM string input; must match {@link #PATTERN_UTM_COORDINATE}. - * @return a new UTM string with the latitude band removed, regardless if the original UTM {@code - * input} had a lat band or not. - */ - private static String removeLatBand(final String input) { - final int indexOfFirstWhiteSpace = input.indexOf(SPACE_CHAR); - final int indexOfFirstWhiteSpaceOrLatBand = - Character.isLetter(input.charAt(indexOfFirstWhiteSpace - 1)) - ? indexOfFirstWhiteSpace - 1 // Use lat band index instead - : indexOfFirstWhiteSpace; - return input - .substring(0, indexOfFirstWhiteSpaceOrLatBand) - .concat(input.substring(indexOfFirstWhiteSpace)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/CqlRequestParser.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/CqlRequestParser.java deleted file mode 100644 index eed4f7c073c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/CqlRequestParser.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.validate; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.CatalogFramework; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import java.io.IOException; -import java.util.Date; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.codice.ddf.catalog.ui.query.cql.CqlRequestImpl; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.gsonsupport.GsonTypeAdapters.DateLongFormatTypeAdapter; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import spark.Request; - -public class CqlRequestParser { - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .registerTypeAdapter(Date.class, new DateLongFormatTypeAdapter()) - .create(); - - private CatalogFramework catalogFramework; - - private FilterBuilder filterBuilder; - - private EndpointUtil endpointUtil; - - public CqlRequestParser( - CatalogFramework catalogFramework, FilterBuilder filterBuilder, EndpointUtil endpointUtil) { - this.catalogFramework = catalogFramework; - this.filterBuilder = filterBuilder; - this.endpointUtil = endpointUtil; - } - - public QueryRequest parse(Request request) throws IOException, CqlParseException { - CqlRequestImpl cqlRequest = - GSON.fromJson(endpointUtil.safeGetBody(request), CqlRequestImpl.class); - return cqlRequest.createQueryRequest(catalogFramework.getId(), filterBuilder); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/CqlValidationHandler.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/CqlValidationHandler.java deleted file mode 100644 index 3c39754b48c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/CqlValidationHandler.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.validate; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.operation.QueryRequest; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.validation.QueryValidator; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.Request; -import spark.Response; -import spark.Route; - -public class CqlValidationHandler implements Route { - - private static final Logger LOGGER = LoggerFactory.getLogger(CqlValidationHandler.class); - - private QueryValidators queryValidators; - - private CqlRequestParser parser; - - public CqlValidationHandler(QueryValidators queryValidators, CqlRequestParser parser) { - this.queryValidators = queryValidators; - this.parser = parser; - } - - @Override - public Object handle(Request request, Response response) throws Exception { - String validatorId = request.params(":validatorId"); - - QueryValidator validator = queryValidators.get(validatorId); - if (validator == null) { - LOGGER.debug( - "No query validator could be found with id \"{}\". Skipping validation.", validatorId); - response.status(404); - return ImmutableMap.of( - "error", - "No validator matching id " + validatorId, - "validationViolations", - Collections.emptyList()); - } - - QueryRequest queryRequest = parser.parse(request); - Set violations = validator.validate(queryRequest); - - List> violationResponses = - violations - .stream() - .map(v -> constructViolationResponse(v, validatorId)) - .collect(Collectors.toList()); - return ImmutableMap.of("validationViolations", violationResponses); - } - - private Map constructViolationResponse( - QueryValidationViolation violation, String type) { - return ImmutableMap.of( - "type", - type, - "severity", - violation.getSeverity(), - "message", - violation.getMessage(), - "extraData", - violation.getExtraData()); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/QueryValidators.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/QueryValidators.java deleted file mode 100644 index ef90a3b5042..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/query/validate/QueryValidators.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.validate; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import org.codice.ddf.catalog.ui.validation.QueryValidator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A collection of {@code QueryValidator} instances that have been registered in the system. These - * instances can be fetched by their unique id (see {@code QueryValidator#getValidatorId}). - */ -public class QueryValidators { - - private static final Logger LOGGER = LoggerFactory.getLogger(QueryValidators.class); - - private Map validators = new ConcurrentHashMap<>(); - - /** - * Gets a registered {@code QueryValidator} instance by it's id. - * - * @return a {@code QueryValidator} instance whose id matches {@code id}, otherwise null. - */ - public QueryValidator get(String id) { - return validators.getOrDefault(id, null); - } - - /** - * Adds a new {@code QueryValidator} to the {@code validators} map. Called by blueprint when a new - * {@code QueryValidator} is registered as a service. - * - * @param queryValidator the new {@code QueryValidator} to be registered. - */ - public void bind(QueryValidator queryValidator) { - if (queryValidator != null) { - LOGGER.trace("Adding query validator with id \"{}\"", queryValidator.getValidatorId()); - validators.put(queryValidator.getValidatorId(), queryValidator); - } - } - - /** - * Removes an existing {@code QueryValidator} from the {@code validators} map. Called by blueprint - * when an existing {@code QueryValidator} service is removed. - * - * @param queryValidator the {@code QueryValidator} to be removed from the collection. - */ - public void unbind(QueryValidator queryValidator) { - if (queryValidator != null) { - LOGGER.trace("Removing query validator with id \"{}\"", queryValidator); - validators.remove(queryValidator.getValidatorId()); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/MetacardEditEndpoint.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/MetacardEditEndpoint.java deleted file mode 100644 index dd5980fc583..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/MetacardEditEndpoint.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.searchui.standard.endpoints; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.AttributeType; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.federation.FederationException; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import org.codice.ddf.catalog.ui.util.EndpointUtil; - -@Path("/edit") -public class MetacardEditEndpoint { - - private final CatalogFramework catalogFramework; - - private final AttributeRegistry attributeRegistry; - - private final EndpointUtil endpointUtil; - - public MetacardEditEndpoint( - CatalogFramework catalogFramework, - AttributeRegistry attributeRegistry, - EndpointUtil endpointUtil) { - this.catalogFramework = catalogFramework; - this.attributeRegistry = attributeRegistry; - this.endpointUtil = endpointUtil; - } - - @GET - @Path("/{id}/{attribute}") - public Response getAttribute( - @Context HttpServletResponse response, - @PathParam("id") String id, - @PathParam("attribute") String attribute) - throws MetacardEndpointException { - try { - Metacard metacard = endpointUtil.getMetacardById(id); - Attribute metacardAttribute = metacard.getAttribute(attribute); - if (metacardAttribute == null) { - return Response.status(200).build(); - } - Optional attributeDescriptor = attributeRegistry.lookup(attribute); - if (!attributeDescriptor.isPresent()) { - /* Could not find attribute descriptor for requested attribute */ - return Response.status(404).build(); - } - - AttributeDescriptor descriptor = attributeDescriptor.get(); - Map result = getResponseMap(attribute, metacardAttribute, descriptor); - return Response.ok(endpointUtil.getJson(result), MediaType.APPLICATION_JSON).build(); - } catch (UnsupportedQueryException | SourceUnavailableException | FederationException e) { - throw new MetacardEndpointException("Error retrieving metacard attribute.", e); - } - } - - @PUT - @Path("/{id}/{attribute}") - @Consumes(MediaType.TEXT_PLAIN) - public Response setAttribute( - @Context HttpServletResponse response, - @PathParam("id") String id, - @PathParam("attribute") String attribute, - String value) - throws MetacardEndpointException { - try { - Metacard metacard = endpointUtil.getMetacardById(id); - if (metacard == null) { - return Response.status(404).build(); - } - - Attribute metacardAttribute = metacard.getAttribute(attribute); - Optional attributeDescriptor = attributeRegistry.lookup(attribute); - if (!attributeDescriptor.isPresent()) { - /* Could not find attribute descriptor for requested attribute */ - return Response.status(404).build(); - } - - AttributeDescriptor descriptor = attributeDescriptor.get(); - if (descriptor.isMultiValued()) { - if (metacardAttribute == null || metacardAttribute.getValues() == null) { - metacard.setAttribute(new AttributeImpl(attribute, Collections.singletonList(value))); - } else { - List values = new ArrayList<>(metacardAttribute.getValues()); - if (!values.contains(value)) { - values.add(value); - } - metacard.setAttribute(new AttributeImpl(attribute, values)); - } - } else { // not multivalued - metacard.setAttribute(new AttributeImpl(attribute, value)); - } - - catalogFramework.update(new UpdateRequestImpl(id, metacard)); - Map responseMap = - getResponseMap(attribute, metacard.getAttribute(attribute), descriptor); - return Response.ok(endpointUtil.getJson(responseMap), MediaType.APPLICATION_JSON).build(); - } catch (UnsupportedQueryException - | SourceUnavailableException - | FederationException - | IngestException e) { - throw new MetacardEndpointException("Error updating metacard attribute.", e); - } - } - - @PUT - @Path("/{id}/{attribute}") - @Consumes(MediaType.APPLICATION_OCTET_STREAM) - @SuppressWarnings("squid:S2175" /* byte[] in the list is appropriate */) - public Response setBinaryAttribute( - @Context HttpServletResponse response, - @PathParam("id") String id, - @PathParam("attribute") String attribute, - byte[] value) - throws MetacardEndpointException { - try { - Metacard metacard = endpointUtil.getMetacardById(id); - if (metacard == null) { - return Response.status(404).build(); - } - - Attribute metacardAttribute = metacard.getAttribute(attribute); - Optional attributeDescriptor = attributeRegistry.lookup(attribute); - if (!attributeDescriptor.isPresent()) { - /* Could not find attribute descriptor for requested attribute */ - response.setStatus(404); - return Response.status(404).build(); - } - AttributeDescriptor descriptor = attributeDescriptor.get(); - if (!descriptor.getType().getAttributeFormat().equals(AttributeType.AttributeFormat.BINARY)) { - return Response.status(400).build(); - } - - if (descriptor.isMultiValued()) { - List values; - if (metacardAttribute == null) { - values = new ArrayList<>(); - } else { - values = metacardAttribute.getValues(); - } - if (!values.contains(value)) { - values.add(value); - } - metacard.setAttribute(new AttributeImpl(attribute, values)); - } else { - metacard.setAttribute(new AttributeImpl(attribute, value)); - } - - catalogFramework.update(new UpdateRequestImpl(id, metacard)); - Map responseMap = - getResponseMap(attribute, metacard.getAttribute(attribute), descriptor); - return Response.ok(endpointUtil.getJson(responseMap), MediaType.APPLICATION_JSON).build(); - } catch (IngestException - | SourceUnavailableException - | UnsupportedQueryException - | FederationException e) { - throw new MetacardEndpointException("Error updating binary metacard attribute.", e); - } - } - - @DELETE - @Path("/{id}/{attribute}") - public Response deleteAttribute( - @Context HttpServletResponse response, - @PathParam("id") String id, - @PathParam("attribute") String attribute, - String value) - throws MetacardEndpointException { - try { - Metacard metacard = endpointUtil.getMetacardById(id); - Attribute metacardAttribute = metacard.getAttribute(attribute); - - if (metacardAttribute == null) { - return Response.ok().build(); - } - - metacard.setAttribute(new AttributeImpl(attribute, (Serializable) null)); - catalogFramework.update(new UpdateRequestImpl(id, metacard)); - return Response.ok().build(); - } catch (UnsupportedQueryException - | SourceUnavailableException - | FederationException - | IngestException e) { - throw new MetacardEndpointException("Error deleting metacard attribute.", e); - } - } - - private Map getResponseMap( - String attribute, Attribute metacardAttribute, AttributeDescriptor descriptor) { - Map result = new HashMap<>(); - result.put("multivalued", descriptor.isMultiValued()); - result.put("type", descriptor.getType().getAttributeFormat().name()); - if (descriptor.isMultiValued()) { - result.put(attribute, metacardAttribute.getValues()); - - } else { - result.put(attribute, metacardAttribute.getValue()); - } - return result; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/MetacardEndpointException.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/MetacardEndpointException.java deleted file mode 100644 index aa4188e288e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/MetacardEndpointException.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.searchui.standard.endpoints; - -public class MetacardEndpointException extends Exception { - - public MetacardEndpointException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/WorkspaceBodyReader.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/WorkspaceBodyReader.java deleted file mode 100644 index b9fc87ce0f1..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/WorkspaceBodyReader.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.searchui.standard.endpoints; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; -import java.util.Map; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; - -public class WorkspaceBodyReader implements MessageBodyReader { - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - @Override - public boolean isReadable( - Class aClass, Type type, Annotation[] annotations, MediaType mediaType) { - return true; - } - - @Override - public Map readFrom( - Class type, - Type genericType, - Annotation[] annotations, - MediaType mediaType, - MultivaluedMap httpHeaders, - InputStream entityStream) - throws IOException { - return GSON.fromJson(new InputStreamReader(entityStream), Map.class); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/WorkspaceBodyWriter.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/WorkspaceBodyWriter.java deleted file mode 100644 index 05478b63e8e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/searchui/standard/endpoints/WorkspaceBodyWriter.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.searchui.standard.endpoints; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyWriter; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; - -public class WorkspaceBodyWriter implements MessageBodyWriter { - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - @Override - public boolean isWriteable( - Class type, Type genericType, Annotation[] annotations, MediaType mediaType) { - return true; - } - - @Override - public long getSize( - Object o, Class type, Type genericType, Annotation[] annotations, MediaType mediaType) { - return -1; - } - - @Override - public void writeTo( - Object o, - Class type, - Type genericType, - Annotation[] annotations, - MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) - throws IOException { - GSON.toJson(o, new OutputStreamWriter(entityStream)); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/Constants.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/Constants.java deleted file mode 100644 index c45edeb9d8d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/Constants.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security; - -public class Constants { - - public static final String SYSTEM_TEMPLATE = "system-template"; - - public static final String ROLES_CLAIM_URI = - "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role"; - - public static final String EMAIL_ADDRESS_CLAIM_URI = - "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"; -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/LogSanitizer.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/LogSanitizer.java deleted file mode 100644 index 4f55b2799ea..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/LogSanitizer.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security; - -import org.apache.commons.lang.StringEscapeUtils; -import org.apache.commons.lang.StringUtils; - -public class LogSanitizer { - private final Object object; - - public LogSanitizer(Object object) { - this.object = object; - } - - public static LogSanitizer sanitize(Object object) { - return new LogSanitizer(object); - } - - @Override - public String toString() { - if (object == null) { - return ""; - } - final String objStr = object.toString(); - if (StringUtils.isEmpty(objStr)) { - // Explicitly log the empty string for null or empty values coming out of toString - return ""; - } - return StringEscapeUtils.escapeHtml(objStr.replace('\n', '_').replace('\r', '_')); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/README.md b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/README.md deleted file mode 100644 index e323cd62dc4..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Metacard Access Control ---- - -This readme describes the workflow of access control and what conditions must be satisfied to be granted/denied access. Before -continuing, it will be beneficial to clarify some definitions. - -The set of security attributes or security taxonomy will be referred to as the ACL (access control list). The access control list will be an all-encompassing set of security attributes containing the following: - -```$xslt -• security.access-individuals -• security.access-groups -• security.access-administrators -``` - -### What Can Each Security Grouping Do? - -1. **Am I an access administrator?**
- a. Yes – Then I can explicitly grant permission capabilities to other users
- b. No – I cannot grant permission capabilities to other users - - -2. **Am I an access individual?**
- a. Yes – I can read/write to metacards, but I cannot grant permissions
- b. No – I cannot read/write to metacards unless I am in the access group, nor -can I grant permissions. - -3. **Am I an access group member?**
-a. Yes – I can read/write to metacards, but I cannot grant permissions
-b. No – I cannot read/write to metacards unless I am in the access-individuals -list, nor can I grant permissions. - - -### Security Plugin Execution Overview - -The trivial flow is a metacard gets passed through the system that has no ACL present. In this case, we pass through an empty policy map and all permissions are implied due to the lacking presence of any extraneous data left on the security map. - -The non trivial flow involves execution through the *access control access plugin*, *access control policy plugin* and *access control policy extension plugin*. These plugins are defined below: - -**Access Control Access Plugin** - -- Simply does a diff on the ACL to ask - - Has the ACL changed? - - Yes – Ensure the subject identity is within the ACL access admin or fail
- No – No-Op - -**Access Control Policy Plugin** - -- We need to populate the transient policy map to ensure we can later imply permissions. This population will ultimately aide in determining whether or not something is accessible. - -- First, we want to ensure that the metacard has an ACL. As mentioned above, the lack of ACL is trivial as we pass through an empty policy map. Contrary, the non-trivial case is the presence of an ACL. - - Is ACL present? - - Yes - Attach ACL attributes in security policy map to later imply - - No – Do nothing, PDP will need to imply the empty set. - -**Access Control Policy Extension Plugin** - -While the policy plugin has the sole responsibility of populating the policy map to curry through the system, the extension has the job of attempting to imply permissions and remove them from the map. This permission implication process is what ultimately allows something to be accessible or non-accessible based on various conditionals. - -The conditionals that ultimately decide if access control permissions can be implied are referenced in the above section. - -Simple example: - -If the requesting subjectIdentity exists within the access individuals list of the current metacard, access control permissions can be implied and removed from the policy map. \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlAccessPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlAccessPlugin.java deleted file mode 100644 index c13cb491946..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlAccessPlugin.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.forms.data.AttributeGroupType.ATTRIBUTE_GROUP_TAG; -import static org.codice.ddf.catalog.ui.forms.data.QueryTemplateType.QUERY_TEMPLATE_TAG; -import static org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants.WORKSPACE_TAG; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.ACCESS_ADMIN_HAS_CHANGED; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.ACCESS_GROUPS_HAS_CHANGED; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.ACCESS_GROUPS_READ_HAS_CHANGED; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.ACCESS_INDIVIDUALS_HAS_CHANGED; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.ACCESS_INDIVIDUALS_READ_HAS_CHANGED; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.ATTRIBUTE_TO_SET; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.OWNER_HAS_CHANGED; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.isAnyObjectNull; - -import ddf.catalog.data.Metacard; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import ddf.catalog.operation.CreateRequest; -import ddf.catalog.operation.DeleteRequest; -import ddf.catalog.operation.DeleteResponse; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.ResourceRequest; -import ddf.catalog.operation.ResourceResponse; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.plugin.AccessPlugin; -import ddf.catalog.plugin.StopProcessingException; -import ddf.security.SubjectIdentity; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.function.Supplier; -import java.util.stream.Collectors; -import org.apache.shiro.SecurityUtils; - -public class AccessControlAccessPlugin implements AccessPlugin { - - private static final String FAILURE_OWNER_CANNOT_CHANGE = - "Cannot update metacard(s). Owner cannot be changed."; - - private static final String FAILURE_NOT_ADMIN_OR_OWNER = - "Cannot update metacard(s). " - + "Subject cannot change access control permissions because they are not in the assigned " - + "access-administrators list."; - - private Supplier subjectSupplier; - - public AccessControlAccessPlugin(SubjectIdentity subjectIdentity) { - this.subjectSupplier = () -> subjectIdentity.getUniqueIdentifier(SecurityUtils.getSubject()); - } - - // Because embedding '!' in the following predicates might be easily overlooked - private static boolean invert(boolean b) { - return !b; - } - - // Equivalent to doing a set intersection of the subject with the access-admin list - private final Predicate subjectIsNotAccessAdmin = - newMetacard -> - invert( - ATTRIBUTE_TO_SET - .apply(newMetacard, Security.ACCESS_ADMINISTRATORS) - .contains(subjectSupplier.get())); - - private final Predicate subjectIsNotOwner = - newMetacard -> - invert( - ATTRIBUTE_TO_SET - .apply(newMetacard, Core.METACARD_OWNER) - .contains(subjectSupplier.get())); - - private final Predicate hasIntrigueTag = - metacard -> - metacard.getTags().contains(WORKSPACE_TAG) - || metacard.getTags().contains(QUERY_TEMPLATE_TAG) - || metacard.getTags().contains(ATTRIBUTE_GROUP_TAG); - - private boolean isAccessControlUpdated(Metacard prev, Metacard updated) { - return !isAnyObjectNull(prev, updated) - && (ACCESS_ADMIN_HAS_CHANGED.apply(prev, updated) - || ACCESS_INDIVIDUALS_HAS_CHANGED.apply(prev, updated) - || ACCESS_INDIVIDUALS_READ_HAS_CHANGED.apply(prev, updated) - || ACCESS_GROUPS_HAS_CHANGED.apply(prev, updated) - || ACCESS_GROUPS_READ_HAS_CHANGED.apply(prev, updated)); - } - - private boolean isOwnerChanged(Metacard prev, Metacard updated) { - return !isAnyObjectNull(prev, updated) && OWNER_HAS_CHANGED.apply(prev, updated); - } - - @Override - public CreateRequest processPreCreate(CreateRequest input) { - return input; - } - - @Override - public UpdateRequest processPreUpdate( - UpdateRequest input, Map existingMetacards) throws StopProcessingException { - Map filteredExistingMetacards = - existingMetacards - .values() - .stream() - .filter(hasIntrigueTag) - .collect(Collectors.toMap(Metacard::getId, Function.identity())); - - Function oldMetacard = - update -> - Optional.ofNullable(update.getId()).map(filteredExistingMetacards::get).orElse(null); - - List newMetacards = - input.getUpdates().stream().map(Map.Entry::getValue).collect(Collectors.toList()); - - if (newMetacards.stream().anyMatch(m -> isOwnerChanged(oldMetacard.apply(m), m))) { - throw new StopProcessingException(FAILURE_OWNER_CANNOT_CHANGE); - } - - if (newMetacards - .stream() - .filter( - newVersionOfMetacard -> - isAccessControlUpdated( - oldMetacard.apply(newVersionOfMetacard), newVersionOfMetacard)) - .filter(Objects::nonNull) - .map(oldMetacard) - .filter(Objects::nonNull) - .filter(subjectIsNotOwner) - .anyMatch(subjectIsNotAccessAdmin)) { - throw new StopProcessingException(FAILURE_NOT_ADMIN_OR_OWNER); - } - - return input; - } - - @Override - public DeleteRequest processPreDelete(DeleteRequest input) { - return input; - } - - @Override - public DeleteResponse processPostDelete(DeleteResponse input) { - return input; - } - - @Override - public QueryRequest processPreQuery(QueryRequest input) { - return input; - } - - @Override - public QueryResponse processPostQuery(QueryResponse input) { - return input; - } - - @Override - public ResourceRequest processPreResource(ResourceRequest input) { - return input; - } - - @Override - public ResourceResponse processPostResource(ResourceResponse input, Metacard metacard) { - return input; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyExtension.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyExtension.java deleted file mode 100644 index f67ea9e3f02..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyExtension.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static ddf.security.permission.CollectionPermission.READ_ACTION; - -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import ddf.security.SubjectIdentity; -import ddf.security.permission.CollectionPermission; -import ddf.security.permission.KeyValueCollectionPermission; -import ddf.security.permission.KeyValuePermission; -import ddf.security.permission.impl.KeyValueCollectionPermissionImpl; -import ddf.security.policy.extension.PolicyExtension; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.BiFunction; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.function.Supplier; -import java.util.stream.Collectors; -import org.apache.commons.collections4.SetUtils; -import org.apache.shiro.authz.Permission; -import org.codice.ddf.catalog.ui.security.Constants; - -public class AccessControlPolicyExtension implements PolicyExtension { - - // Marker interface to clean up method signature for predicate - public interface SecurityPredicate - extends BiFunction>, Map>, Boolean> {} - - private static final Set ACCESS_CONTROL_IMPLIED = - new ImmutableSet.Builder() - .add( - Core.METACARD_OWNER, - SecurityAttributes.ACCESS_ADMINISTRATORS, - SecurityAttributes.ACCESS_INDIVIDUALS, - SecurityAttributes.ACCESS_INDIVIDUALS_READ, - SecurityAttributes.ACCESS_GROUPS_READ, - SecurityAttributes.ACCESS_GROUPS) - .build(); - - private final SecurityPredicate isOwner; - - private final SecurityPredicate hasAccessAdministrators; - - private final SecurityPredicate hasAccessGroups; - - private final SecurityPredicate hasAccessGroupsReadOnly; - - private final SecurityPredicate hasAccessIndividuals; - - private final SecurityPredicate hasAccessIndividualsReadOnly; - - private final Predicate>> isSystem; - - public AccessControlPolicyExtension( - AccessControlSecurityConfiguration config, SubjectIdentity subjectIdentity) { - isOwner = predicate(subjectIdentity.getIdentityAttribute(), Core.METACARD_OWNER); - - isSystem = - (s) -> { - Set subject = - s.getOrDefault(config.getSystemUserAttribute(), Collections.emptySet()); - return subject.contains(config.getSystemUserAttributeValue()); - }; - - hasAccessAdministrators = - predicate(subjectIdentity.getIdentityAttribute(), Security.ACCESS_ADMINISTRATORS); - - hasAccessGroups = predicate(Constants.ROLES_CLAIM_URI, SecurityAttributes.ACCESS_GROUPS); - - hasAccessGroupsReadOnly = - predicate(Constants.ROLES_CLAIM_URI, SecurityAttributes.ACCESS_GROUPS_READ); - - hasAccessIndividuals = - predicate(subjectIdentity.getIdentityAttribute(), SecurityAttributes.ACCESS_INDIVIDUALS); - - hasAccessIndividualsReadOnly = - predicate( - subjectIdentity.getIdentityAttribute(), SecurityAttributes.ACCESS_INDIVIDUALS_READ); - } - - private Map> getPermissions(List permissions) { - return permissions - .stream() - .filter(p -> p instanceof KeyValuePermission) - .map(p -> (KeyValuePermission) p) - .collect( - Collectors.toMap( - KeyValuePermission::getKey, KeyValuePermission::getValues, Sets::union)); - } - - private SecurityPredicate predicate(String subjectAttribute, String metacardAttribute) { - return (s, m) -> { - Set subject = s.getOrDefault(subjectAttribute, Collections.emptySet()); - Set metacard = m.getOrDefault(metacardAttribute, Collections.emptySet()); - subject = subject.stream().map(String::toLowerCase).collect(Collectors.toSet()); - metacard = metacard.stream().map(String::toLowerCase).collect(Collectors.toSet()); - return !SetUtils.intersection(metacard, subject).isEmpty(); - }; - } - - private KeyValueCollectionPermission isPermitted( - CollectionPermission s, - KeyValueCollectionPermission match, - KeyValueCollectionPermission allPerms) { - Map> subject = getPermissions(s.getPermissionList()); - Map> metacard = getPermissions(allPerms.getPermissionList()); - - // There is nothing to imply if the incoming permission set doesn't contain _ALL_ ACL attributes - if (Collections.disjoint(metacard.keySet(), ACCESS_CONTROL_IMPLIED)) { - return match; // Simply imply nothing early on (essentially a no-op in this extension) - } - - // To be able to have viewing access to the metacard, you must satisfy the following criteria - SecurityPredicate subjectImpliesACL = - (sub, mc) -> - hasAccessAdministrators.apply(sub, mc) - || hasAccessIndividuals.apply(sub, mc) - || hasAccessGroups.apply(sub, mc) - || (READ_ACTION.equals(allPerms.getAction()) - && (hasAccessGroupsReadOnly.apply(sub, mc) - || hasAccessIndividualsReadOnly.apply(sub, mc))); - - // get all permissions implied by the subject, this function returns what permissions - // to filter from the key-value permission collection - Supplier> impliedPermissions = - () -> { - if (isSystem.test(subject) || isOwner.apply(subject, metacard)) { - return metacard.keySet(); // all permissions are implied - } else if (subjectImpliesACL.apply(subject, metacard)) { - return ACCESS_CONTROL_IMPLIED; // access control perms implied - } else { - return Collections.emptySet(); // nothing is implied - } - }; - - // filter out all implied permissions - Function, KeyValueCollectionPermission> filterPermissions = - (implied) -> { - List values = - match - .getPermissionList() - .stream() - .map(p -> (KeyValuePermission) p) - .filter((permission) -> !implied.contains((permission).getKey())) - .collect(Collectors.toList()); - - return new KeyValueCollectionPermissionImpl(match.getAction(), values); - }; - - return filterPermissions.apply(impliedPermissions.get()); - } - - @Override - public KeyValueCollectionPermission isPermittedMatchAll( - CollectionPermission subject, - KeyValueCollectionPermission matchAll, - KeyValueCollectionPermission allPermissionsCollection) { - return isPermitted(subject, matchAll, allPermissionsCollection); - } - - @Override - public KeyValueCollectionPermission isPermittedMatchOne( - CollectionPermission subject, - KeyValueCollectionPermission matchOne, - KeyValueCollectionPermission allPermissionsCollection) { - return isPermitted(subject, matchOne, allPermissionsCollection); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyPlugin.java deleted file mode 100644 index bbd7e198b43..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyPlugin.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil.CONTAINS_ACL_ATTRIBUTES; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Sets; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.ResourceRequest; -import ddf.catalog.operation.ResourceResponse; -import ddf.catalog.plugin.PolicyPlugin; -import ddf.catalog.plugin.PolicyResponse; -import ddf.catalog.plugin.impl.PolicyResponseImpl; -import java.io.Serializable; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -public class AccessControlPolicyPlugin implements PolicyPlugin { - - private Map> getAccessAdministratorPermission(Metacard metacard) { - return ImmutableMap.of( - Security.ACCESS_ADMINISTRATORS, AccessControlUtil.getAccessAdministrators(metacard)); - } - - private Map> getIndividualPermission(Metacard metacard) { - return ImmutableMap.of( - Security.ACCESS_INDIVIDUALS, AccessControlUtil.getAccessIndividuals(metacard)); - } - - private Map> getReadOnlyIndividualPermission(Metacard metacard) { - return ImmutableMap.of( - Security.ACCESS_INDIVIDUALS_READ, AccessControlUtil.getAccessReadOnlyIndividuals(metacard)); - } - - private Map> getGroupPermission(Metacard metacard) { - return ImmutableMap.of(Security.ACCESS_GROUPS, AccessControlUtil.getAccessGroups(metacard)); - } - - private Map> getReadOnlyGroupPermission(Metacard metacard) { - return ImmutableMap.of( - Security.ACCESS_GROUPS_READ, AccessControlUtil.getAccessReadOnlyGroups(metacard)); - } - - private Map> getOwner(Metacard metacard) { - return ImmutableMap.of(Core.METACARD_OWNER, AccessControlUtil.getOwnerOrEmptySet(metacard)); - } - - private Map> getPolicyForMetacard(Metacard metacard) { - return Stream.of( - getOwner(metacard), - getAccessAdministratorPermission(metacard), - getGroupPermission(metacard), - getReadOnlyGroupPermission(metacard), - getReadOnlyIndividualPermission(metacard), - getIndividualPermission(metacard)) - .map(Map::entrySet) - .flatMap(Collection::stream) - .filter(entry -> !entry.getValue().isEmpty()) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, Sets::union)); - } - - private Map> getPolicy(Metacard metacard) { - return Optional.of(metacard) - .filter(CONTAINS_ACL_ATTRIBUTES) - .map(this::getPolicyForMetacard) - .orElseGet(ImmutableMap::of); - } - - private Map> getPolicy(List metacards) { - return metacards - .stream() - .filter(CONTAINS_ACL_ATTRIBUTES) - .map(this::getPolicy) - .map(Map::entrySet) - .flatMap(Collection::stream) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, Sets::union)); - } - - @Override - public PolicyResponse processPostQuery(Result input, Map properties) { - Metacard metacard = input.getMetacard(); - return new PolicyResponseImpl(Collections.emptyMap(), getPolicy(metacard)); - } - - @Override - public PolicyResponse processPreUpdate(Metacard metacard, Map properties) { - return new PolicyResponseImpl(Collections.emptyMap(), getPolicy(metacard)); - } - - @Override - public PolicyResponse processPreDelete( - List metacards, Map properties) { - return new PolicyResponseImpl(getPolicy(metacards), getPolicy(metacards)); - } - - @Override - public PolicyResponse processPreCreate(Metacard input, Map properties) { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPostDelete(Metacard input, Map properties) { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPreQuery(Query query, Map properties) { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPreResource(ResourceRequest resourceRequest) { - return new PolicyResponseImpl(); - } - - @Override - public PolicyResponse processPostResource(ResourceResponse resourceResponse, Metacard metacard) { - return new PolicyResponseImpl(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreIngestPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreIngestPlugin.java deleted file mode 100644 index e1c0cf2feac..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreIngestPlugin.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; - -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.types.Security; -import ddf.catalog.operation.CreateRequest; -import ddf.catalog.operation.DeleteRequest; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.plugin.PreIngestPlugin; -import ddf.catalog.plugin.StopProcessingException; -import ddf.security.SubjectIdentity; -import ddf.security.SubjectOperations; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.subject.Subject; -import org.codice.ddf.catalog.ui.forms.data.AttributeGroupType; -import org.codice.ddf.catalog.ui.forms.data.QueryTemplateType; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; - -public class AccessControlPreIngestPlugin implements PreIngestPlugin { - - private final SubjectIdentity subjectIdentity; - - private SubjectOperations subjectOperations; - - /** - * This set is final and not supposed to be added to. This plugin is designed to support backwards - * compatability for the existing "ACL" types. Currently, the only requirement for something to be - * ACL capable is to have at least one security attribute set on the metacard. - * - *

- access-individuals - access-groups - access-administrators - * - *

This plugin specifically ensures that guests cannot create metacards that are ACL - * controlled, which pertains to the subset of metacards directly that are (workspaces, query - * templates, attribute group types). For extensibility, this plugin is irrelevant. For new - * metacards that need to be access-controlled, this plugin is irrelevant. - */ - private final Set aclMetacardTypes = - ImmutableSet.of( - WorkspaceConstants.WORKSPACE_TAG, - AttributeGroupType.ATTRIBUTE_GROUP_TAG, - QueryTemplateType.QUERY_TEMPLATE_TAG); - - public AccessControlPreIngestPlugin(SubjectIdentity subjectIdentity) { - this.subjectIdentity = subjectIdentity; - } - - /** - * Ensures an ACL metacard has an owner. - * - * @param request the {@link CreateRequest} to process - * @throws StopProcessingException - if the current subject doesn't have an owner attribute - */ - @Override - public CreateRequest process(CreateRequest request) throws StopProcessingException { - Subject ownerSubject = getSubject(); - - List metacards = - request - .getMetacards() - .stream() - .filter(m -> aclMetacardTypes.contains(m.getMetacardType().getName())) - .filter(m -> !m.getTags().contains(SYSTEM_TEMPLATE)) - .collect(Collectors.toList()); - - boolean missingOwner = - metacards - .stream() - .anyMatch(metacard -> StringUtils.isEmpty(AccessControlUtil.getOwner(metacard))); - - if (missingOwner) { - if (subjectOperations.isGuest(ownerSubject)) { - throw new StopProcessingException( - "Guest user not allowed to create access-controlled resources"); - } - - metacards.forEach( - metacard -> { - String owner = - AccessControlUtil.getOwner(metacard) != null - ? AccessControlUtil.getOwner(metacard) - : subjectIdentity.getUniqueIdentifier(ownerSubject); - AccessControlUtil.setOwner(metacard, owner); - setAccessAdministrator(metacard, owner); - }); - } - - return request; - } - - @Override - @SuppressWarnings("squid:S1854" /*previous is used and makes the stream forEach more efficient*/) - public UpdateRequest process(UpdateRequest request) { - return request; - } - - @Override - public DeleteRequest process(DeleteRequest input) { - return input; - } - - protected Subject getSubject() { - return SecurityUtils.getSubject(); - } - - private static void setAccessAdministrator(Metacard metacard, String subjectIdentity) { - metacard.setAttribute( - new AttributeImpl( - Security.ACCESS_ADMINISTRATORS, Collections.singletonList(subjectIdentity))); - } - - public void setSubjectOperations(SubjectOperations subjectOperations) { - this.subjectOperations = subjectOperations; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreQueryPlugin.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreQueryPlugin.java deleted file mode 100644 index 1aa16605623..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreQueryPlugin.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; - -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Sets; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.plugin.PreQueryPlugin; -import ddf.security.Subject; -import ddf.security.SubjectIdentity; -import ddf.security.SubjectOperations; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.apache.commons.collections.CollectionUtils; -import org.apache.shiro.SecurityUtils; -import org.geotools.filter.visitor.DuplicatingFilterVisitor; -import org.opengis.filter.Filter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Plugin that looks for queries that target access controlled metacards (workspaces, forms, etc) - * and updates the query filter so part of the access control security policy is baked in, removing - * a significant burden from post-query filtering. - * - *

This plugin does not add any new policy. It only optimizes existing policy by adding the - * rules to the {@link Filter} so the database does some heavy lifting for us. - * - *

When identifying a {@link Filter} that only selects access controlled metacards, the current - * implementation takes a best effort approach on the entire filter as a whole. It does not perform - * modification on individual subtrees, only the entire filter, or not at all. - * - *

While passing a filter to this plugin that contains logical redundancy will not result in - * over-filtering, it could cause a potentially optimizable filter to be ignored. If the filter - * contains tags within double negation, for example. See {@link TagAggregationVisitor}'s javadoc. - * - *

This plugin will skip processing queries when any of the below are true: - * - *

    - *
  • The user has the {@link AccessControlSecurityConfiguration} group. - *
  • When no predicates operating on {@link Core#METACARD_TAGS} were found in the filter. - *
  • There was at least one tags predicate on the filter that was not in the {@link - * AccessControlTags}. - *
- * - * This plugin will ignore {@link Core#METACARD_TAGS} present on filter predicates if any of the - * below are true: - * - *
    - *
  • The predicate is a negative check, such as {@link org.opengis.filter.PropertyIsNotEqualTo}. - *
  • The predicate falls under the logical composite {@link org.opengis.filter.Not} operator. - *
- */ -public class AccessControlPreQueryPlugin implements PreQueryPlugin { - - private static final Logger LOGGER = LoggerFactory.getLogger(AccessControlPreQueryPlugin.class); - - private final FilterBuilder filterBuilder; - - private final SubjectIdentity identity; - - private final AccessControlTags tagSet; - - private final AccessControlSecurityConfiguration configuration; - - private SubjectOperations subjectOperations; - - public AccessControlPreQueryPlugin( - FilterBuilder filterBuilder, - SubjectIdentity identity, - AccessControlTags tagSet, - AccessControlSecurityConfiguration configuration) { - this.filterBuilder = filterBuilder; - this.identity = identity; - this.tagSet = tagSet; - this.configuration = configuration; - } - - @Override - public QueryRequest process(QueryRequest input) { - if (!configuration.isPolicyToFilterEnabled()) { - LOGGER.debug( - "Will not modify filter because policy to filter mapping is disabled; " - + "refer to Catalog UI Search Workspace Security config to enable this behavior"); - return input; - } - - final String subjectIdentifier = getSubjectIdentifier(); - final Set groups = new HashSet<>(getSubjectGroups()); - final String groupThatCanSeeEverything = configuration.getSystemUserAttributeValue(); - - if (groups.contains(groupThatCanSeeEverything)) { - LOGGER.debug( - "Will not modify filter; subject ({}) had at least one group [{}] that was exempt [{}]", - subjectIdentifier, - groups, - groupThatCanSeeEverything); - return input; - } - - final Query query = input.getQuery(); - LOGGER.trace("Received query [{}]", query); - - final TagAggregationVisitor tagVisitor = new TagAggregationVisitor(); - query.accept(tagVisitor, null); - - final Set discoveredTags = tagVisitor.getTags(); - if (CollectionUtils.isEmpty(discoveredTags)) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug( - "Will not modify filter; subject's ({}) query [{}] did not imply all results had tags", - subjectIdentifier, - filterOnly(query)); - } - return input; - } - - final Set tagsThatAreAccessControlled = tagSet.getAccessControlledTags(); - final Set tagsNotAccessControlled = - Sets.difference(discoveredTags, tagsThatAreAccessControlled); - if (CollectionUtils.isNotEmpty(tagsNotAccessControlled)) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug( - "Will not modify filter; subject's ({}) query [{}] referenced tags " - + "[{}] that are not in access controlled set [{}]", - subjectIdentifier, - filterOnly(query), - tagsNotAccessControlled, - tagsThatAreAccessControlled); - } - return input; - } - - final Filter policyBranch = createSecurityPolicySubset(subjectIdentifier, groups); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug( - "Query filter [{}] will be modified with access control policy [{}]", - filterOnly(query), - policyBranch); - } - - final Filter combined = filterBuilder.allOf(query, policyBranch); - return new QueryRequestImpl( - new QueryImpl( - combined, - query.getStartIndex(), - query.getPageSize(), - query.getSortBy(), - query.requestsTotalResultsCount(), - query.getTimeoutMillis()), - input.isEnterprise(), - input.getSourceIds(), - input.getProperties()); - } - - @VisibleForTesting - String getSubjectIdentifier() { - final Subject subject = (Subject) SecurityUtils.getSubject(); - final String uniqueIdentifier = identity.getUniqueIdentifier(subject); - LOGGER.debug("Obtained user's unique identifier: {}", uniqueIdentifier); - return uniqueIdentifier; - } - - @VisibleForTesting - List getSubjectGroups() { - final Subject subject = (Subject) SecurityUtils.getSubject(); - final List groups = - subjectOperations.getAttribute(subject, configuration.getSystemUserAttribute()); - LOGGER.debug("Obtained user's groups: {}", groups); - return groups; - } - - private Filter filterOnly(Query query) { - final DuplicatingFilterVisitor dupeVisitor = new DuplicatingFilterVisitor(); - return (Filter) query.accept(dupeVisitor, null); - } - - private Filter createSecurityPolicySubset(String identifier, Set groups) { - final ImmutableList.Builder policyBranch = ImmutableList.builder(); - policyBranch.add(isEqualToText(Core.METACARD_OWNER, identifier)); - policyBranch.add(isEqualToText(Core.METACARD_TAGS, SYSTEM_TEMPLATE)); - - policyBranch.add(isEqualToText(Security.ACCESS_INDIVIDUALS, identifier)); - policyBranch.add(isEqualToText(Security.ACCESS_INDIVIDUALS_READ, identifier)); - policyBranch.add(isEqualToText(Security.ACCESS_ADMINISTRATORS, identifier)); - - groups.forEach(group -> policyBranch.add(isEqualToText(Security.ACCESS_GROUPS, group))); - groups.forEach(group -> policyBranch.add(isEqualToText(Security.ACCESS_GROUPS_READ, group))); - - return filterBuilder.anyOf(policyBranch.build()); - } - - private Filter isEqualToText(String attribute, String text) { - LOGGER.trace("Adding \"{}\" = '{}' to filter", attribute, text); - return filterBuilder.attribute(attribute).is().equalTo().text(text); - } - - public void setSubjectOperations(SubjectOperations subjectOperations) { - this.subjectOperations = subjectOperations; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlSecurityConfiguration.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlSecurityConfiguration.java deleted file mode 100644 index ab18ad1619f..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlSecurityConfiguration.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import org.codice.ddf.catalog.ui.security.Constants; - -public class AccessControlSecurityConfiguration { - - private String systemUserAttribute = Constants.ROLES_CLAIM_URI; - - private String systemUserAttributeValue = "system-user"; - - private boolean policyToFilterEnabled = true; - - public String getSystemUserAttribute() { - return systemUserAttribute; - } - - public void setSystemUserAttribute(String systemUserAttribute) { - this.systemUserAttribute = systemUserAttribute.trim(); - } - - public boolean isPolicyToFilterEnabled() { - return policyToFilterEnabled; - } - - public String getSystemUserAttributeValue() { - return systemUserAttributeValue; - } - - public void setSystemUserAttributeValue(String systemUserAttributeValue) { - this.systemUserAttributeValue = systemUserAttributeValue.trim(); - } - - public void setPolicyToFilterEnabled(boolean policyToFilterEnabled) { - this.policyToFilterEnabled = policyToFilterEnabled; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlTags.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlTags.java deleted file mode 100644 index 704b4f493db..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlTags.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import com.google.common.annotations.VisibleForTesting; -import ddf.catalog.data.MetacardType; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; -import java.util.stream.Collectors; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AccessControlTags { - private static final Logger LOGGER = LoggerFactory.getLogger(AccessControlTags.class); - - private static final String ACCESS_CONTROLLED_TAG = "access-controlled-tag"; - - private final Set accessControlledTags; - - public AccessControlTags() { - this.accessControlledTags = new HashSet<>(); - } - - AccessControlTags(final Set accessControlledTags) { - this.accessControlledTags = accessControlledTags; - } - - public Set getAccessControlledTags() { - return accessControlledTags; - } - - // Invoked by listener in blueprint - public void bindTag(ServiceReference metacardTypeRef) { - if (metacardTypeRef == null) { - LOGGER.trace("New reference to metacard type was null"); - return; - } - - final Object tagObject = metacardTypeRef.getProperty(ACCESS_CONTROLLED_TAG); - if (tagObject == null) { - if (LOGGER.isTraceEnabled()) { - LOGGER.trace( - "Registered metacard type {} is not access-controlled", typeName(metacardTypeRef)); - } - return; - } - - final Set tags = convertToTagSet(tagObject); - if (tags.isEmpty()) { - if (LOGGER.isWarnEnabled()) { - LOGGER.warn( - "The service property 'access-controlled-tag' [{}] is not valid for metacard type {}, " - + "verify the blueprint XML document is correct", - tagObject, - typeName(metacardTypeRef)); - } - return; - } - - if (LOGGER.isTraceEnabled()) { - LOGGER.trace( - "Found access-controlled metacard type '{}', caching tags '{}'", - typeName(metacardTypeRef), - tags); - } - accessControlledTags.addAll(tags); - } - - // Invoked by listener in blueprint - public void unbindTag(ServiceReference metacardTypeRef) { - if (metacardTypeRef == null) { - LOGGER.trace("Reference to old metacard type was null"); - return; - } - - final Object tagObject = metacardTypeRef.getProperty(ACCESS_CONTROLLED_TAG); - if (tagObject == null) { - if (LOGGER.isTraceEnabled()) { - LOGGER.trace( - "Deregistered metacard type {} is not access-controlled", typeName(metacardTypeRef)); - } - return; - } - - final Set tags = convertToTagSet(tagObject); - if (tags.isEmpty()) { - if (LOGGER.isWarnEnabled()) { - LOGGER.warn( - "The service property 'access-controlled-tag' [{}] is not valid for metacard type {}, " - + "verify the blueprint XML document is correct", - tagObject, - typeName(metacardTypeRef)); - } - return; - } - - if (LOGGER.isTraceEnabled()) { - LOGGER.trace( - "Found access-controlled metacard type '{}', removing cached tags '{}'", - typeName(metacardTypeRef), - tags); - } - accessControlledTags.removeAll(tags); - } - - /** - * Attempt to convert the service property blueprint object to a set of strings. The size of the - * sets passing through this method should be reasonably small (~ 3 - 5). Returning an empty set - * instead of throwing an exception will provide developers with warn logging that something is - * wrong with the blueprint file. - */ - private Set convertToTagSet(Object tagObject) { - if (tagObject instanceof String) { - LOGGER.trace("Found single tag {}", tagObject); - return Collections.singleton((String) tagObject); - } - if (tagObject instanceof Set) { - LOGGER.trace("Found set of tags {}", tagObject); - Set tagSet = (Set) tagObject; - if (tagSet.size() != tagSet.stream().filter(String.class::isInstance).count()) { - LOGGER.trace("At least one of the objects in the set is not a string"); - return Collections.emptySet(); - } - return tagSet.stream().map(String.class::cast).collect(Collectors.toSet()); - } - LOGGER.trace("Unrecognized tag object {}", tagObject); - return Collections.emptySet(); - } - - @SuppressWarnings( - "unchecked" /* We only ever inject references to metacard types in this class */) - @VisibleForTesting - String typeName(ServiceReference metacardTypeRef) { - BundleContext context = - FrameworkUtil.getBundle(AccessControlPreQueryPlugin.class).getBundleContext(); - MetacardType type = (MetacardType) context.getService(metacardTypeRef); - return type.getName(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlUtil.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlUtil.java deleted file mode 100644 index 52d1d2a1c05..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlUtil.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.function.BiFunction; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -public class AccessControlUtil { - - // Should not be instantiated - private AccessControlUtil() {} - - /** - * Takes a {@link Metacard} and attribute name and returns a set of the corresponding values if - * they exist - */ - public static final BiFunction> ATTRIBUTE_TO_SET = - (metacard, attr) -> new HashSet<>(getValuesOrEmpty(metacard, attr)); - - private static final BiFunction METACARD_DESCRIPTORS_CONTAIN = - (metacard, attr) -> metacard.getAttribute(attr) != null; - - /** - * It will be a pre-condition contain the full set of security attributes to enable access - * control. - */ - public static final Predicate CONTAINS_ACL_ATTRIBUTES = - metacard -> - METACARD_DESCRIPTORS_CONTAIN.apply(metacard, Security.ACCESS_ADMINISTRATORS) - || METACARD_DESCRIPTORS_CONTAIN.apply(metacard, Security.ACCESS_GROUPS) - || METACARD_DESCRIPTORS_CONTAIN.apply(metacard, Security.ACCESS_INDIVIDUALS); - - /** - * Does a diff between the old set of {@link Metacard} owners with the new set to see if anyone - * was added or removed. - */ - public static final BiFunction OWNER_HAS_CHANGED = - (oldMetacard, newMetacard) -> - attributeHasChanged(oldMetacard, newMetacard, Core.METACARD_OWNER); - - /** - * Does a diff between the old set of {@link Metacard} access-administrators with the new set to - * see if anyone was added or removed. - */ - public static final BiFunction ACCESS_ADMIN_HAS_CHANGED = - (oldMetacard, newMetacard) -> - attributeHasChanged(oldMetacard, newMetacard, Security.ACCESS_ADMINISTRATORS); - - /** - * Does a diff between the old set of {@link Metacard} access-individuals with the new set to see - * if anyone was added or removed. - */ - public static final BiFunction ACCESS_INDIVIDUALS_HAS_CHANGED = - (oldMetacard, newMetacard) -> - attributeHasChanged(oldMetacard, newMetacard, Security.ACCESS_INDIVIDUALS); - - /** - * Does a diff between the old set of {@link Metacard} access-individuals_read with the new set to - * see if anyone was added or removed. - */ - public static final BiFunction ACCESS_INDIVIDUALS_READ_HAS_CHANGED = - (oldMetacard, newMetacard) -> - attributeHasChanged(oldMetacard, newMetacard, Security.ACCESS_INDIVIDUALS_READ); - - /** - * Does a diff between the old set of {@link Metacard} access-groups with the new set to see if a - * role was added or removed. - */ - public static final BiFunction ACCESS_GROUPS_HAS_CHANGED = - (oldMetacard, newMetacard) -> - attributeHasChanged(oldMetacard, newMetacard, Security.ACCESS_GROUPS); - - /** - * Does a diff between the old set of {@link Metacard} access-groups_read with the new set to see - * if a role was added or removed. - */ - public static final BiFunction ACCESS_GROUPS_READ_HAS_CHANGED = - (oldMetacard, newMetacard) -> - attributeHasChanged(oldMetacard, newMetacard, Security.ACCESS_GROUPS_READ); - - /** - * Does a diff between the old set of values on the specified {@link Metacard} {@link Attribute} - * with the new set to see if a value was added, removed, or otherwise altered. - * - * @param oldMetacard the old version of the metacard that contains the attribute to check. - * @param newMetacard the new version of the metacard that contains the attribute to check. - * @param attribute the name of the attribute to check. - * @return true if the given attribute changed across versions of the metacard, false otherwise. - */ - private static boolean attributeHasChanged( - Metacard oldMetacard, Metacard newMetacard, String attribute) { - return !Sets.symmetricDifference( - ATTRIBUTE_TO_SET.apply(oldMetacard, attribute), - ATTRIBUTE_TO_SET.apply(newMetacard, attribute)) - .isEmpty(); - } - - /** - * Pulls off a list of values associated with a particular attribute on a {@link Metacard} - * - * @param metacard that you want to pull values from - * @param attributeName that you are targeting to pull off in the input {@link Metacard} - * @return Populated list of string values if attribute was found, otherwise empty list - */ - public static List getValuesOrEmpty(Metacard metacard, String attributeName) { - Attribute attribute = metacard.getAttribute(attributeName); - if (attribute != null) { - return attribute.getValues().stream().map(String::valueOf).collect(Collectors.toList()); - } - return Collections.emptyList(); - } - - /** - * @return List of access-individuals from input {@link Metacard} if they exist, otherwise return - * an empty set - */ - public static Set getAccessIndividuals(Metacard metacard) { - return ATTRIBUTE_TO_SET.apply(metacard, Security.ACCESS_INDIVIDUALS); - } - - /** - * @return List of access-individuals with read-only perms from input {@link Metacard} if they - * exist, otherwise return an empty set - */ - public static Set getAccessReadOnlyIndividuals(Metacard metacard) { - return ATTRIBUTE_TO_SET.apply(metacard, Security.ACCESS_INDIVIDUALS_READ); - } - - /** - * @return List of access-groups from input {@link Metacard} if they exist, otherwise return an - * empty set - */ - public static Set getAccessGroups(Metacard metacard) { - return ATTRIBUTE_TO_SET.apply(metacard, Security.ACCESS_GROUPS); - } - - /** - * @return List of access-groups with read-only perms from input {@link Metacard} if they exist, - * otherwise return an empty set - */ - public static Set getAccessReadOnlyGroups(Metacard metacard) { - return ATTRIBUTE_TO_SET.apply(metacard, Security.ACCESS_GROUPS_READ); - } - - /** - * @return List of access-administrators from input {@link Metacard} if they exist, otherwise - * return an empty set - */ - public static Set getAccessAdministrators(Metacard metacard) { - return ATTRIBUTE_TO_SET.apply(metacard, Security.ACCESS_ADMINISTRATORS); - } - - /** Sets owner value associated with a particular {@link Metacard} */ - public static Metacard setOwner(Metacard metacard, String subjectIdentity) { - metacard.setAttribute(new AttributeImpl(Core.METACARD_OWNER, subjectIdentity)); - return metacard; - } - - /** Retrieves owner value associated with a particular {@link Metacard} */ - public static String getOwner(Metacard metacard) { - List values = getValuesOrEmpty(metacard, Core.METACARD_OWNER); - if (!values.isEmpty()) { - return values.get(0); - } - return null; - } - - /** Retrieves owner value associated with a particular {@link Metacard} */ - public static Set getOwnerOrEmptySet(Metacard metacard) { - List values = getValuesOrEmpty(metacard, Core.METACARD_OWNER); - if (!values.isEmpty()) { - return ImmutableSet.of(values.get(0)); - } - return Collections.emptySet(); - } - - /** Given a variable number of arguments, checks if any are null */ - public static boolean isAnyObjectNull(Object... objects) { - for (Object o : objects) { - if (o == null) { - return true; - } - } - return false; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationRule.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationRule.java deleted file mode 100644 index 29dda5650cc..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationRule.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -/** - * While visiting a {@link org.opengis.filter.Filter} it is important to validate that the query - * does not target data that the access control policy does not apply to. A {@link - * TagAggregationRule} may be used to keep track of the tags it has been given and a flag indicating - * if some filter predicate was encountered that does not concern {@link - * ddf.catalog.data.types.Core#METACARD_TAGS}. - * - *

This is useful when validating the {@link org.opengis.filter.Or} branches of filters to make - * sure that tagging predicates apply to entire result set. - */ -public class TagAggregationRule { - private final Set tags; - private boolean notLimitedToTagCriteria; - - public static TagAggregationRule newEmptyRule() { - return new TagAggregationRule(); - } - - private TagAggregationRule() { - tags = new HashSet<>(); - notLimitedToTagCriteria = false; - } - - public Set getTags() { - return tags; - } - - public boolean isNotLimitedToTagCriteria() { - return notLimitedToTagCriteria; - } - - public void foundTag(final String foundTag) { - tags.add(foundTag); - } - - public void foundTags(final Collection foundTags) { - tags.addAll(foundTags); - } - - public void foundOtherCriteria() { - notLimitedToTagCriteria = true; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationVisitor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationVisitor.java deleted file mode 100644 index 58071635b8a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationVisitor.java +++ /dev/null @@ -1,267 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import ddf.catalog.data.types.Core; -import java.util.ArrayDeque; -import java.util.Deque; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import javax.annotation.Nullable; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.StringUtils; -import org.opengis.filter.And; -import org.opengis.filter.Filter; -import org.opengis.filter.Not; -import org.opengis.filter.Or; -import org.opengis.filter.PropertyIsEqualTo; -import org.opengis.filter.PropertyIsLike; -import org.opengis.filter.PropertyIsNotEqualTo; -import org.opengis.filter.expression.Expression; -import org.opengis.filter.expression.Literal; -import org.opengis.filter.expression.PropertyName; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Visits a filter and aggregates the tags. When the query corresponding to the filter is run, it is - * guaranteed any result in the list will have at least one tag found in {@link #getTags()}. If this - * cannot be guaranteed, the resultant tag set will be empty. - * - *

Note that {@link PropertyIsNotEqualTo} is not implemented, despite it potentially referencing - * metacard tags. That's because aggregation can only effectively operate on what is known to be - * true, not necessarily what is known to be false. This is because true predicates narrow down the - * result space in deterministic ways without the need of the entire taxonomy or database schema to - * compute the truthy alternative for a falsey filter, which would be prohibitively large. - * - *

For best results, run this visitor against a simplified filter. Running against filters - * without optimized logic is only partially supported. Tags within the following logical operators - * will be propagated up the tree correctly: - * - *

    - *
  • AND within an AND - *
  • OR within an OR - *
- * - *

Tags within the following logical operators will be ignored: - * - *

    - *
  • NOT within a NOT - *
- * - *

Given the vast majority of filters will not explicitly contain double negation, and the UI - * already does some optimization work for us, skipping policy optimization on these kinds of - * filters is acceptable. - */ -@SuppressWarnings("squid:S1192" /* Constants not actually helpful for log statements */) -public class TagAggregationVisitor extends TagBaseVisitor { - private static final Logger LOGGER = LoggerFactory.getLogger(TagAggregationVisitor.class); - private final Deque rules = new ArrayDeque<>(); - private final Set tags = new HashSet<>(); - - @Override - protected Object preProcessNonTagPredicate(Filter filter, Object data) { - reportNonTagEncountered(); - return data; - } - - public Set getTags() { - return tags; - } - - @Override - public Object visit(Not filter, Object data) { - rules.addFirst(TagAggregationRule.newEmptyRule()); - data = super.visit(filter, data); - rules.removeFirst(); - - if (CollectionUtils.isNotEmpty(rules)) { - // Any NOT operation counts as "other criteria" - rules.peekFirst().foundOtherCriteria(); - } - - return data; - } - - @Override - public Object visit(And filter, Object data) { - rules.addFirst(TagAggregationRule.newEmptyRule()); - data = super.visit(filter, data); - - TagAggregationRule rule = rules.removeFirst(); - if (rules.isEmpty()) { - tags.addAll(rule.getTags()); - } else if (rule.getTags().isEmpty()) { - // An AND without tags should set the flag in case it's the child of an OR - rules.peekFirst().foundOtherCriteria(); - } else { - rules.peekFirst().foundTags(rule.getTags()); - } - - return data; - } - - @Override - public Object visit(Or filter, Object data) { - rules.addFirst(TagAggregationRule.newEmptyRule()); - data = super.visit(filter, data); - - TagAggregationRule rule = rules.removeFirst(); - if (rule.isNotLimitedToTagCriteria()) { - // An OR with "other criteria" cannot guarantee result set is a proper subset of policy - return data; - } - - if (rules.isEmpty()) { - tags.addAll(rule.getTags()); - } else { - rules.peekFirst().foundTags(rule.getTags()); - } - - return data; - } - - @Override - public Object visit(PropertyIsLike filter, Object data) { - final Map.Entry pair = - filterAsKeyValuePair(filter.getExpression(), filter.getLiteral()); - if (pair != null) { - LOGGER.trace("Found key-value predicate {}, looking for metacard tags", pair); - saveTag(pair.getKey(), pair.getValue()); - } else { - LOGGER.trace( - "Filter {} could not be converted to key-value pair thus is not referring to metacard tags", - filter); - reportNonTagEncountered(); - } - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsEqualTo filter, Object data) { - final Map.Entry pair = - filterAsKeyValuePair(filter.getExpression1(), filter.getExpression2()); - if (pair != null) { - LOGGER.trace("Found key-value predicate {}, looking for metacard tags", pair); - saveTag(pair.getKey(), pair.getValue()); - } else { - LOGGER.trace( - "Filter {} could not be converted to key-value pair thus is not referring to metacard tags", - filter); - reportNonTagEncountered(); - } - return super.visit(filter, data); - } - - private void saveTag(String property, String value) { - if (!Core.METACARD_TAGS.equals(property)) { - LOGGER.trace("Property \"{}\" and value '{}' do not concern metacard tags", property, value); - reportNonTagEncountered(); - return; - } - - if (StringUtils.isBlank(value)) { - LOGGER.debug("Found blank string in query on metacard tags field \"{}\", ignoring", property); - return; - } - - if (rules.isEmpty()) { - tags.add(value); - } else { - rules.peekFirst().foundTag(value); - } - } - - private void reportNonTagEncountered() { - if (CollectionUtils.isNotEmpty(rules)) { - LOGGER.trace("Search criteria found that is not a metacard tag, setting flag"); - rules.peekFirst().foundOtherCriteria(); - return; - } - LOGGER.trace( - "Rule Deque was empty so the flag cannot be set, this query must not have any nesting logic"); - } - - @Nullable - private static Map.Entry filterAsKeyValuePair( - Expression expression1, String literal) { - final String property = expressionPropertyAsString(expression1); - if (property == null || literal == null) { - LOGGER.trace( - "Given expression [{}] and literal [{}], either the property [{}] or " - + "original literal was null", - expression1, - literal, - property); - return null; - } - return new HashMap.SimpleEntry<>(property, literal); - } - - @Nullable - private static Map.Entry filterAsKeyValuePair( - Expression expression1, Expression expression2) { - final String property = expressionPropertyAsString(expression1); - final String value = expressionLiteralAsString(expression2); - if (property == null || value == null) { - LOGGER.trace( - "Given expression1 [{}] and expression2 [{}], either the derived property [{}] or " - + "derived value [{}] was null", - expression1, - expression2, - property, - value); - return null; - } - return new HashMap.SimpleEntry<>(property, value); - } - - @Nullable - private static String expressionPropertyAsString(Expression expression) { - if (!(expression instanceof PropertyName)) { - LOGGER.trace( - "Expected an {} but got {}", - PropertyName.class.getTypeName(), - expression.getClass().getTypeName()); - return null; - } - - final PropertyName name = (PropertyName) expression; - return name.getPropertyName(); - } - - @Nullable - private static String expressionLiteralAsString(Expression expression) { - if (!(expression instanceof Literal)) { - LOGGER.trace( - "Expected an {} but got {}", - Literal.class.getTypeName(), - expression.getClass().getTypeName()); - return null; - } - - final Literal literal = (Literal) expression; - final Object value = literal.getValue(); - - if (!(value instanceof String)) { - LOGGER.trace( - "Expected an {} but got {}", String.class.getTypeName(), value.getClass().getTypeName()); - return null; - } - - return (String) value; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagBaseVisitor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagBaseVisitor.java deleted file mode 100644 index 28db2b55f8d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagBaseVisitor.java +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import org.geotools.filter.visitor.DefaultFilterVisitor; -import org.opengis.filter.ExcludeFilter; -import org.opengis.filter.Filter; -import org.opengis.filter.Id; -import org.opengis.filter.IncludeFilter; -import org.opengis.filter.PropertyIsBetween; -import org.opengis.filter.PropertyIsGreaterThan; -import org.opengis.filter.PropertyIsGreaterThanOrEqualTo; -import org.opengis.filter.PropertyIsLessThan; -import org.opengis.filter.PropertyIsLessThanOrEqualTo; -import org.opengis.filter.PropertyIsNil; -import org.opengis.filter.PropertyIsNull; -import org.opengis.filter.spatial.BBOX; -import org.opengis.filter.spatial.Beyond; -import org.opengis.filter.spatial.Contains; -import org.opengis.filter.spatial.Crosses; -import org.opengis.filter.spatial.DWithin; -import org.opengis.filter.spatial.Disjoint; -import org.opengis.filter.spatial.Equals; -import org.opengis.filter.spatial.Intersects; -import org.opengis.filter.spatial.Overlaps; -import org.opengis.filter.spatial.Touches; -import org.opengis.filter.spatial.Within; -import org.opengis.filter.temporal.After; -import org.opengis.filter.temporal.AnyInteracts; -import org.opengis.filter.temporal.Before; -import org.opengis.filter.temporal.Begins; -import org.opengis.filter.temporal.BegunBy; -import org.opengis.filter.temporal.During; -import org.opengis.filter.temporal.EndedBy; -import org.opengis.filter.temporal.Ends; -import org.opengis.filter.temporal.Meets; -import org.opengis.filter.temporal.MetBy; -import org.opengis.filter.temporal.OverlappedBy; -import org.opengis.filter.temporal.TContains; -import org.opengis.filter.temporal.TEquals; -import org.opengis.filter.temporal.TOverlaps; - -/** - * Provides both default traversal behavior and a {@link #preProcessNonTagPredicate(Filter, Object)} - * function for defining default visit behavior when any filter that does not support tagging - * is encountered during processing. - */ -public abstract class TagBaseVisitor extends DefaultFilterVisitor { - - /** - * For any filter type that could not possibly reference {@link - * ddf.catalog.data.types.Core#METACARD_TAGS}, this method is invoked prior to the actual visit - * method. - * - *

The following types do not call this function prior to a visit: - * - *

    - *
  • {@link org.opengis.filter.And} - *
  • {@link org.opengis.filter.Or} - *
  • {@link org.opengis.filter.Not} - *
  • {@link org.opengis.filter.PropertyIsEqualTo} - *
  • {@link org.opengis.filter.PropertyIsNotEqualTo} - *
  • {@link org.opengis.filter.PropertyIsLike} - *
  • Any {@link org.opengis.filter.expression.Expression} - *
- * - * @param filter the filter about to be visited. - * @param data the data being passed. - * @return the data being returned. - */ - protected abstract Object preProcessNonTagPredicate(Filter filter, Object data); - - @Override - public Object visit(ExcludeFilter filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(IncludeFilter filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Id filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsBetween filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsGreaterThan filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsGreaterThanOrEqualTo filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsLessThan filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsLessThanOrEqualTo filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsNull filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(PropertyIsNil filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(BBOX filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Beyond filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Contains filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Crosses filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Disjoint filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(DWithin filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Equals filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Intersects filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Overlaps filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Touches filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visit(Within filter, Object data) { - data = preProcessNonTagPredicate(filter, data); - return super.visit(filter, data); - } - - @Override - public Object visitNullFilter(Object data) { - data = preProcessNonTagPredicate(null, data); - return super.visitNullFilter(data); - } - - @Override - public Object visit(After after, Object data) { - data = preProcessNonTagPredicate(after, data); - return super.visit(after, data); - } - - @Override - public Object visit(AnyInteracts anyInteracts, Object data) { - data = preProcessNonTagPredicate(anyInteracts, data); - return super.visit(anyInteracts, data); - } - - @Override - public Object visit(Before before, Object data) { - data = preProcessNonTagPredicate(before, data); - return super.visit(before, data); - } - - @Override - public Object visit(Begins begins, Object data) { - data = preProcessNonTagPredicate(begins, data); - return super.visit(begins, data); - } - - @Override - public Object visit(BegunBy begunBy, Object data) { - data = preProcessNonTagPredicate(begunBy, data); - return super.visit(begunBy, data); - } - - @Override - public Object visit(During during, Object data) { - data = preProcessNonTagPredicate(during, data); - return super.visit(during, data); - } - - @Override - public Object visit(EndedBy endedBy, Object data) { - data = preProcessNonTagPredicate(endedBy, data); - return super.visit(endedBy, data); - } - - @Override - public Object visit(Ends ends, Object data) { - data = preProcessNonTagPredicate(ends, data); - return super.visit(ends, data); - } - - @Override - public Object visit(Meets meets, Object data) { - data = preProcessNonTagPredicate(meets, data); - return super.visit(meets, data); - } - - @Override - public Object visit(MetBy metBy, Object data) { - data = preProcessNonTagPredicate(metBy, data); - return super.visit(metBy, data); - } - - @Override - public Object visit(OverlappedBy overlappedBy, Object data) { - data = preProcessNonTagPredicate(overlappedBy, data); - return super.visit(overlappedBy, data); - } - - @Override - public Object visit(TContains contains, Object data) { - data = preProcessNonTagPredicate(contains, data); - return super.visit(contains, data); - } - - @Override - public Object visit(TEquals equals, Object data) { - data = preProcessNonTagPredicate(equals, data); - return super.visit(equals, data); - } - - @Override - public Object visit(TOverlaps contains, Object data) { - data = preProcessNonTagPredicate(contains, data); - return super.visit(contains, data); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/app/LogoutApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/app/LogoutApplication.java deleted file mode 100644 index d1963813165..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/app/LogoutApplication.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.app; - -import static spark.Spark.get; - -import org.apache.http.HttpStatus; -import org.codice.ddf.security.logout.service.LogoutService; -import spark.servlet.SparkApplication; - -public class LogoutApplication implements SparkApplication { - - private LogoutService logoutService; - - public LogoutApplication(LogoutService logoutService) { - this.logoutService = logoutService; - } - - @Override - public void init() { - get( - "/logout/actions", - (req, res) -> { - String jsonString = logoutService.getActionProviders(req.raw(), res.raw()); - - res.status(HttpStatus.SC_OK); - res.header("Cache-Control", "no-cache, no-store"); - res.header("Pragma", "no-cache"); - return jsonString; - }); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/app/UserApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/app/UserApplication.java deleted file mode 100644 index 0e85bf0256c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/security/app/UserApplication.java +++ /dev/null @@ -1,348 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.app; - -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -import static org.codice.gsonsupport.GsonTypeAdapters.MAP_STRING_TO_OBJECT_TYPE; -import static spark.Spark.delete; -import static spark.Spark.exception; -import static spark.Spark.get; -import static spark.Spark.put; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.filter.FilterBuilder; -import ddf.security.Subject; -import ddf.security.SubjectIdentity; -import ddf.security.SubjectOperations; -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import java.util.UUID; -import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang3.math.NumberUtils; -import org.apache.shiro.SecurityUtils; -import org.codice.ddf.catalog.ui.metacard.EntityTooLargeException; -import org.codice.ddf.catalog.ui.security.Constants; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.persistence.PersistenceException; -import org.codice.ddf.persistence.PersistentItem; -import org.codice.ddf.persistence.PersistentStore; -import org.codice.ddf.persistence.PersistentStore.PersistenceType; -import org.codice.ddf.preferences.Preferences; -import org.codice.ddf.preferences.PreferencesException; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.geotools.filter.text.ecql.ECQL; -import org.joda.time.DateTime; -import org.opengis.filter.Filter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.servlet.SparkApplication; - -public class UserApplication implements SparkApplication { - - private static final Logger LOGGER = LoggerFactory.getLogger(UserApplication.class); - - private static final String MAX_PAGE_SIZE_PROPERTY = "catalog.maxPageSize"; - - private static final Integer DEFAULT_MAX_PAGE_SIZE = 1000; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - private final EndpointUtil util; - - private final Preferences preferences; - - private final PersistentStore persistentStore; - - private final SubjectIdentity subjectIdentity; - - private final FilterBuilder filterBuilder; - - private SubjectOperations subjectOperations; - - public UserApplication( - EndpointUtil util, - PersistentStore persistentStore, - Preferences preferences, - SubjectIdentity subjectIdentity, - FilterBuilder filterBuilder) { - this.util = util; - this.persistentStore = persistentStore; - this.preferences = preferences; - this.subjectIdentity = subjectIdentity; - this.filterBuilder = filterBuilder; - } - - private static Integer determineAndRetrieveMaxPageSize() { - return NumberUtils.toInt(System.getProperty(MAX_PAGE_SIZE_PROPERTY), DEFAULT_MAX_PAGE_SIZE); - } - - @Override - public void init() { - get( - "/user", - (req, res) -> { - res.type(APPLICATION_JSON); - return getUser(); - }, - util::getJson); - - put( - "/user/preferences", - APPLICATION_JSON, - (req, res) -> { - Subject subject = (Subject) SecurityUtils.getSubject(); - - if (subjectOperations.isGuest(subject)) { - res.status(401); - return ImmutableMap.of("message", "Guest cannot save preferences."); - } - - Map preferences = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - - if (preferences == null) { - preferences = new HashMap<>(); - } - - setUserPreferences(subject, preferences); - - return preferences; - }, - util::getJson); - - put( - "/user/notifications", - APPLICATION_JSON, - (req, res) -> { - Subject subject = (Subject) SecurityUtils.getSubject(); - - if (subjectOperations.isGuest(subject)) { - res.status(401); - return ImmutableMap.of("message", "Guest cannot save notifications."); - } - - Map alerts = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - - List> notifications = - (List>) alerts.getOrDefault("alerts", Collections.emptyList()); - notifications.forEach(notification -> addUserNotification(subject, notification)); - return ""; - }, - util::getJson); - - delete( - "/user/notifications", - APPLICATION_JSON, - (req, res) -> { - Subject subject = (Subject) SecurityUtils.getSubject(); - - if (subjectOperations.isGuest(subject)) { - res.status(401); - return ImmutableMap.of("message", "Guest cannot save notifications."); - } - - Map> notification = - GSON.fromJson(util.safeGetBody(req), MAP_STRING_TO_OBJECT_TYPE); - - deleteNotifications(notification.get("alerts")); - - return ""; - }, - util::getJson); - - exception(EntityTooLargeException.class, util::handleEntityTooLargeException); - - exception(IOException.class, util::handleIOException); - - exception(RuntimeException.class, util::handleRuntimeException); - } - - public Map getUser() { - Subject subject = (Subject) SecurityUtils.getSubject(); - return getSubjectAttributes(subject); - } - - private void setUserPreferences(Subject subject, Map preferences) { - - String userid = subjectIdentity.getUniqueIdentifier(subject); - - try { - this.preferences.add(preferences, userid); - } catch (PreferencesException e) { - LOGGER.info("Exception while trying to persist preferences for user {}", userid, e); - } - } - - private Set getSubjectRoles(Subject subject) { - return new TreeSet<>(subjectOperations.getAttribute(subject, Constants.ROLES_CLAIM_URI)); - } - - private Map getSubjectPreferences(Subject subject) { - String userid = subjectIdentity.getUniqueIdentifier(subject); - - try { - Map preferencesMap = preferences.get(userid); - Map results = new HashMap<>(preferencesMap); - /* - * Replace alert attribute of preferences with alerts stored in notifications - * core - * Alerts may be added to Notification core by User.js (addAlert()) in DDF - */ - results.put("alerts", getSubjectNotifications(subject)); - return results; - } catch (PreferencesException e) { - LOGGER.info( - "Exception while trying to retrieve persisted preferences for user {}", userid, e); - } - - return Collections.emptyMap(); - } - - private List> getSubjectNotifications(Subject subject) { - String userid = subjectIdentity.getUniqueIdentifier(subject); - String filter = String.format("user = '%s'", userid); - try { - List> notificationsList = - persistentStore.get( - PersistenceType.NOTIFICATION_TYPE.toString(), - filter, - 0, - determineAndRetrieveMaxPageSize()); - return notificationsList.stream().map(this::mapAttributes).collect(Collectors.toList()); - } catch (PersistenceException e) { - LOGGER.debug( - "PersistenceException while trying to retrieve persisted notifications for user {}", - userid, - e); - } - return Collections.emptyList(); - } - - private Map mapAttributes(Map persistentItem) { - persistentItem = PersistentItem.stripSuffixes(persistentItem); - /* - * The persistent store implementation only returns a collection if there is - * more than one item in the field, else it returns a string - * We need to check if it is a string, and if so add it to a collection - */ - Object srcs = persistentItem.getOrDefault("src", Collections.emptySet()); - if (srcs instanceof String) { - srcs = ImmutableSet.of((String) srcs); - } - - Object metacardIds = persistentItem.getOrDefault("metacardIds", Collections.emptySet()); - if (metacardIds instanceof String) { - metacardIds = ImmutableSet.of((String) metacardIds); - } - return new ImmutableMap.Builder() - .put("id", persistentItem.get("id")) - .put("src", srcs) - .put("metacardIds", metacardIds) - .put("queryId", persistentItem.getOrDefault("queryId", "")) - .put("serverGenerated", persistentItem.getOrDefault("serverGenerated", "true")) - .put("when", persistentItem.getOrDefault("when", DateTime.now().toInstant().getMillis())) - .put("unseen", Boolean.parseBoolean((String) persistentItem.getOrDefault("unseen", "true"))) - .put("count", persistentItem.getOrDefault("count", -1)) - .build(); - } - - private Map getSubjectAttributes(Subject subject) { - // @formatter:off - Map required = - ImmutableMap.of( - "userid", subjectIdentity.getUniqueIdentifier(subject), - "username", subjectOperations.getName(subject), - "isGuest", subjectOperations.isGuest(subject), - "roles", getSubjectRoles(subject), - "preferences", getSubjectPreferences(subject)); - // @formatter:on - - String email = subjectOperations.getEmailAddress(subject); - - if (StringUtils.isEmpty(email)) { - return required; - } - - return ImmutableMap.builder().putAll(required).put("email", email).build(); - } - - private void addUserNotification(Subject subject, Map alert) { - - String userid = subjectIdentity.getUniqueIdentifier(subject); - PersistentItem item = new PersistentItem(); - item.addIdProperty(alert.getOrDefault("id", UUID.randomUUID().toString())); - item.addProperty("user", userid); - item.addProperty("when", alert.getOrDefault("when", DateTime.now().toInstant().getMillis())); - item.addProperty("queryId", alert.getOrDefault("queryId", "")); - item.addProperty("serverGenerated", alert.getOrDefault("serverGenerated", false)); - item.addProperty("unseen", alert.getOrDefault("unseen", true)); - item.addProperty("count", alert.getOrDefault("count", -1)); - if (alert.containsKey("metacardIds")) { - item.addProperty("metacardIds", ImmutableSet.copyOf((List) alert.get("metacardIds"))); - } else { - item.addProperty("metacardIds", Collections.emptySet()); - } - if (alert.containsKey("src")) { - item.addProperty("src", ImmutableSet.copyOf((List) alert.get("src"))); - } else { - item.addProperty("src", Collections.emptySet()); - } - try { - persistentStore.add(PersistenceType.NOTIFICATION_TYPE.toString(), item); - } catch (PersistenceException e) { - LOGGER.debug( - "PersistenceException while trying to persist notification for user {}", userid, e); - } - } - - private void deleteNotifications(List ids) { - if (ids.isEmpty()) { - LOGGER.debug("Received empty list of notification ids to delete"); - return; - } - List idsToDelete = - ids.stream() - .map(id -> filterBuilder.attribute("id").is().equalTo().text(id)) - .collect(Collectors.toList()); - try { - persistentStore.delete( - PersistenceType.NOTIFICATION_TYPE.toString(), - ECQL.toCQL(filterBuilder.anyOf(idsToDelete))); - persistentStore.delete("result_cache", ECQL.toCQL(filterBuilder.anyOf(idsToDelete))); - } catch (PersistenceException e) { - LOGGER.debug( - "PersistenceException while trying to delete persisted notifications with ids {} ", - ids, - e); - } - } - - public void setSubjectOperations(SubjectOperations subjectOperations) { - this.subjectOperations = subjectOperations; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/session/SessionManagementApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/session/SessionManagementApplication.java deleted file mode 100644 index f868be00a6a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/session/SessionManagementApplication.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.session; - -import static spark.Spark.get; - -import java.net.URI; -import org.codice.ddf.security.session.management.service.SessionManagementService; -import spark.servlet.SparkApplication; - -public class SessionManagementApplication implements SparkApplication { - - private SessionManagementService sessionManagement; - - public SessionManagementApplication(SessionManagementService sessionManagementService) { - sessionManagement = sessionManagementService; - } - - @Override - public void init() { - get( - "/session/expiry", - (req, res) -> { - String body = sessionManagement.getExpiry(req.raw()); - res.status(200); - return body; - }); - - get( - "/session/invalidate", - (req, res) -> { - URI uri = sessionManagement.getInvalidate(req.raw()); - res.status(200); - return uri.toString(); - }); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/spatial/GeoCoderApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/spatial/GeoCoderApplication.java deleted file mode 100644 index 0082257562c..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/spatial/GeoCoderApplication.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.spatial; - -import static spark.Spark.get; - -import org.apache.http.HttpStatus; -import org.codice.ddf.spatial.geocoding.GeoCoderService; -import org.codice.ddf.spatial.geocoding.GeoEntryQueryException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.servlet.SparkApplication; - -public class GeoCoderApplication implements SparkApplication { - - private static final Logger LOGGER = LoggerFactory.getLogger(GeoCoderApplication.class); - - private GeoCoderService geoCoderService; - - public GeoCoderApplication(GeoCoderService geoCoderService) { - this.geoCoderService = geoCoderService; - } - - @Override - public void init() { - get( - "/REST/v1/Locations", - (req, res) -> { - String jsonp = req.queryParams("jsonp"); - String jsonString = geoCoderService.getLocation(jsonp, req.queryParams("query")); - - if (jsonString != null) { - res.status(HttpStatus.SC_OK); - return jsonp + "(" + jsonString + ")"; - } else { - res.status(HttpStatus.SC_BAD_REQUEST); - return ""; - } - }); - - get( - "/REST/v1/Locations/nearby/cities/:wkt", - (req, res) -> { - String wkt = req.params(":wkt"); - - try { - String jsonString = geoCoderService.getNearbyCities(wkt); - - if (jsonString != null) { - res.status(HttpStatus.SC_OK); - return jsonString; - } else { - res.status(HttpStatus.SC_NO_CONTENT); - return ""; - } - - } catch (GeoEntryQueryException e) { - LOGGER.debug("Error querying GeoNames resource with wkt:{}", wkt, e); - res.status(HttpStatus.SC_BAD_REQUEST); - return ""; - } - }); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptorApplication.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptorApplication.java deleted file mode 100644 index 52d86dc1afa..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptorApplication.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.transformer; - -import static spark.Spark.get; - -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import java.util.Locale; -import java.util.Map; -import spark.servlet.SparkApplication; - -public class TransformerDescriptorApplication implements SparkApplication { - - private TransformerDescriptors descriptors; - - private static final Gson GSON = - new GsonBuilder().disableHtmlEscaping().serializeNulls().create(); - - private static final Map TRANSFORMER_NOT_FOUND_RESPONSE = - new ImmutableMap.Builder().put("message", "Transformer not found").build(); - - private static final Map TRANSFORMER_TYPE_NOT_FOUND_RESPONSE = - new ImmutableMap.Builder() - .put("message", "Transformer type not found") - .build(); - - private static final String QUERY_RESPONSE_TRANSFORMER = "query"; - - private static final String METACARD_TRANSFORMER = "metacard"; - - @Override - public void init() { - get( - "/transformers/metacard", - (req, res) -> { - res.type("application/json"); - return descriptors.getMetacardTransformers(); - }, - GSON::toJson); - - get( - "/transformers/query", - (req, res) -> { - res.type("application/json"); - return descriptors.getQueryResponseTransformers(); - }, - GSON::toJson); - - get( - "/transformers/:type/:id", - (req, res) -> { - String id = req.params(":id"); - String type = req.params(":type").toLowerCase(Locale.US); - - Map descriptor; - - res.type("application/json"); - - if (METACARD_TRANSFORMER.equalsIgnoreCase(type)) { - descriptor = descriptors.getMetacardTransformer(id); - } else if (QUERY_RESPONSE_TRANSFORMER.equalsIgnoreCase(type)) { - descriptor = descriptors.getQueryResponseTransformer(id); - } else { - res.status(404); - return GSON.toJson(TRANSFORMER_TYPE_NOT_FOUND_RESPONSE); - } - - if (descriptor == null) { - res.status(404); - return GSON.toJson(TRANSFORMER_NOT_FOUND_RESPONSE); - } - - return GSON.toJson(descriptor); - }); - } - - @SuppressWarnings("WeakerAccess" /* setter must be public for blueprint access */) - public void setDescriptors(TransformerDescriptors descriptors) { - this.descriptors = descriptors; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptors.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptors.java deleted file mode 100644 index 05dd166da38..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptors.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.transformer; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.osgi.framework.ServiceReference; - -/** - * Provides descriptors for all metacard and query response transformers. This class provides - * transformer blacklisting as well as display names. - */ -public class TransformerDescriptors { - - private final List metacardTransformers; - - private final List queryResponseTransformers; - - private Set blackListedMetacardTransformerIds = Collections.emptySet(); - - private Set blackListedQueryResponseTransformerIds = ImmutableSet.of("zipCompression"); - - public TransformerDescriptors( - List metacardTransformers, - List queryResponseTransformers) { - this.metacardTransformers = metacardTransformers; - this.queryResponseTransformers = queryResponseTransformers; - } - - public List> getMetacardTransformers() { - return getTransformerDescriptors(metacardTransformers, blackListedMetacardTransformerIds); - } - - public List> getQueryResponseTransformers() { - return getTransformerDescriptors( - queryResponseTransformers, blackListedQueryResponseTransformerIds); - } - - @Nullable - public Map getMetacardTransformer(String id) { - return getTransformerDescriptor(metacardTransformers, blackListedMetacardTransformerIds, id); - } - - @Nullable - public Map getQueryResponseTransformer(String id) { - return getTransformerDescriptor( - queryResponseTransformers, blackListedQueryResponseTransformerIds, id); - } - - public Set getBlackListedMetacardTransformerIds() { - return blackListedMetacardTransformerIds; - } - - public void setBlackListedMetacardTransformerIds(Set blackListedMetacardTransformerIds) { - this.blackListedMetacardTransformerIds = blackListedMetacardTransformerIds; - } - - public void setBlackListedQueryResponseTransformerIds( - Set blackListedQueryResponseTransformerIds) { - this.blackListedQueryResponseTransformerIds = blackListedQueryResponseTransformerIds; - } - - @Nullable - private Map getTransformerDescriptor( - List serviceReferences, Set blacklist, String id) { - for (ServiceReference serviceRef : serviceReferences) { - Object idProperty = serviceRef.getProperty("id"); - - if (idProperty != null) { - String serviceId = idProperty.toString(); - - if (!blacklist.contains(serviceId) && id.endsWith(serviceId)) { - return getTransformerDescriptor(serviceRef); - } - } - } - - return null; - } - - private List> getTransformerDescriptors( - List transformers, Set blacklist) { - return transformers - .stream() - .filter(serviceRef -> serviceRef.getProperty("id") != null) - .filter(serviceRef -> !blacklist.contains(serviceRef.getProperty("id").toString())) - .map(this::getTransformerDescriptor) - .collect(Collectors.toList()); - } - - private Map getTransformerDescriptor(ServiceReference serviceRef) { - return new ImmutableMap.Builder() - .put("id", serviceRef.getProperty("id").toString()) - .put("displayName", getDisplayName(serviceRef)) - .build(); - } - - private String getDisplayName(ServiceReference serviceRef) { - Object displayName = serviceRef.getProperty("displayName"); - - if (displayName == null) { - return serviceRef.getProperty("id").toString(); - } - - return displayName.toString(); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/AccessUtil.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/AccessUtil.java deleted file mode 100644 index d3e6d056d6d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/AccessUtil.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.util; - -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import java.io.Serializable; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AccessUtil { - private static final Logger LOGGER = LoggerFactory.getLogger(AccessUtil.class); - - private AccessUtil() { - // Should not be instantiated - } - - @Nullable - public static T safeGet(Metacard metacard, String attributeName, Class type) { - Attribute attribute = metacard.getAttribute(attributeName); - if (attribute == null) { - LOGGER.debug("Attribute {} was null for metacard {}", attributeName, metacard); - return null; - } - Serializable serializable = attribute.getValue(); - if (serializable == null) { - LOGGER.debug( - "Attribute {} for metacard {} was itself not null, but contained a null value", - attributeName, - metacard); - return null; - } - if (!type.isInstance(serializable)) { - LOGGER.debug( - "Attribute {} for metacard {} had a value of unexpected type, was expecting {} but got {}", - attributeName, - metacard, - type.getName(), - serializable.getClass().getName()); - return null; - } - return type.cast(serializable); - } - - @Nullable - public static List safeGetList(Metacard metacard, String attributeName, Class type) { - Attribute attribute = metacard.getAttribute(attributeName); - if (attribute == null) { - LOGGER.debug("Attribute {} was null for metacard {}", attributeName, metacard); - return null; - } - List serializables = attribute.getValues(); - if (serializables == null) { - LOGGER.debug( - "Attribute {} for metacard {} was itself not null, but contained a null list", - attributeName, - metacard); - return null; - } - Optional entryWithBadType = - serializables.stream().filter(o -> !type.isInstance(o)).findAny(); - if (entryWithBadType.isPresent()) { - Serializable invalid = entryWithBadType.get(); - LOGGER.debug( - "Attribute {} for metacard {} had a value of unexpected type, was expecting {} but got {}", - attributeName, - metacard, - type.getName(), - invalid.getClass().getName()); - return null; - } - return serializables.stream().map(type::cast).collect(Collectors.toList()); - } - - @SuppressWarnings("unchecked") - @Nullable - public static List safeGetList(Map map, String key, Class type) { - List unchecked = safeGet(map, key, List.class); - if (unchecked == null) { - return null; - } - try { - return (List) unchecked.stream().map(type::cast).collect(Collectors.toList()); - } catch (ClassCastException e) { - // Improve tests & don't catch - https://codice.atlassian.net/browse/DDF-3834 - LOGGER.debug( - "Unexpected type for key = {}, expected a List containing type {}", key, type.getName()); - } - return null; - } - - @Nullable - public static T safeGet(Map map, String key, Class type) { - Object value = map.get(key); - if (value == null) { - LOGGER.debug("Unexpected null entry: {}", key); - return null; - } - try { - return type.cast(value); - } catch (ClassCastException e) { - // Improve tests & don't catch - https://codice.atlassian.net/browse/DDF-3834 - LOGGER.debug( - "Unexpected type for key = {}, expected a {} but got {}", - key, - type.getName(), - value.getClass().getName()); - } - return null; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/CqlQueriesImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/CqlQueriesImpl.java deleted file mode 100644 index c5617a46263..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/CqlQueriesImpl.java +++ /dev/null @@ -1,249 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.util; - -import com.google.common.base.Stopwatch; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.action.ActionRegistry; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Result; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterAdapter; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.ProcessingDetails; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.impl.QueryResponseImpl; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.catalog.util.impl.QueryFunction; -import ddf.catalog.util.impl.ResultIterable; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.codice.ddf.catalog.ui.metacard.transformer.CsvTransformImpl; -import org.codice.ddf.catalog.ui.query.cql.CqlQueryResponseImpl; -import org.codice.ddf.catalog.ui.query.cql.CqlRequestImpl; -import org.codice.ddf.catalog.ui.query.cql.StatusImpl; -import org.codice.ddf.catalog.ui.query.utility.CqlQueries; -import org.codice.ddf.catalog.ui.query.utility.CqlQueryResponse; -import org.codice.ddf.catalog.ui.query.utility.CqlRequest; -import org.codice.ddf.catalog.ui.query.utility.CsvTransform; -import org.codice.ddf.catalog.ui.query.utility.Status; -import org.codice.ddf.catalog.ui.transformer.TransformerDescriptors; -import org.codice.gsonsupport.GsonTypeAdapters; - -public class CqlQueriesImpl implements CqlQueries { - - private final CatalogFramework catalogFramework; - - private final FilterBuilder filterBuilder; - - private TransformerDescriptors descriptors; - - private ActionRegistry actionRegistry; - - private FilterAdapter filterAdapter; - - private static final String METRICS_SOURCE_ELAPSED_PREFIX = "metrics.source.elapsed."; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(GsonTypeAdapters.LongDoubleTypeAdapter.FACTORY) - .registerTypeAdapter(Date.class, new GsonTypeAdapters.DateLongFormatTypeAdapter()) - .create(); - - public CqlQueriesImpl( - CatalogFramework catalogFramework, - FilterBuilder filterBuilder, - FilterAdapter filterAdapter, - ActionRegistry actionRegistry) { - this.catalogFramework = catalogFramework; - this.filterBuilder = filterBuilder; - this.filterAdapter = filterAdapter; - this.actionRegistry = actionRegistry; - } - - @Override - public CqlQueryResponse executeCqlQuery(CqlRequest cqlRequest) - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - CqlParseException { - QueryRequest request = cqlRequest.createQueryRequest(catalogFramework.getId(), filterBuilder); - Stopwatch stopwatch = Stopwatch.createStarted(); - - List responses = Collections.synchronizedList(new ArrayList<>()); - - List results; - if (cqlRequest.getCount() == 0) { - results = retrieveHitCount(request, responses); - } else { - results = retrieveResults(cqlRequest, request, responses); - } - - final List sourceIds = new ArrayList<>(); - if (request.getSourceIds() != null) { - sourceIds.addAll(request.getSourceIds()); - } - - final Map properties = - responses - .stream() - .filter(Objects::nonNull) - .map(QueryResponse::getProperties) - .findFirst() - .orElse(Collections.emptyMap()); - - stopwatch.stop(); - - final Set processingDetails = - responses - .stream() - .filter(Objects::nonNull) - .map(QueryResponse::getProcessingDetails) - .reduce( - new HashSet<>(), - (l, r) -> { - l.addAll(r); - return l; - }); - - Map statusBySource = new HashMap<>(); - - final long totalElapsedtime = stopwatch.elapsed(TimeUnit.MILLISECONDS); - - // If only one source was provided, construct the status dynamically. Otherwise, use the - // properties. - if (sourceIds.size() <= 1) { - final String id = sourceIds.size() == 1 ? sourceIds.get(0) : "cache"; - statusBySource.put( - id, - new StatusImpl( - id, results.size(), totalElapsedtime, responses.get(0).getHits(), processingDetails)); - } else { - Map hitsPerSource = - (Map) properties.getOrDefault("hitsPerSource", new HashMap()); - - Map elapsedPerSource = new HashMap<>(); - properties.forEach( - (key, value) -> { - if (key.startsWith(METRICS_SOURCE_ELAPSED_PREFIX)) { - String source = key.substring(METRICS_SOURCE_ELAPSED_PREFIX.length()); - if (value instanceof Integer) { - elapsedPerSource.put(source, new Long((Integer) value)); - } - } - }); - - Map countPerSource = new HashMap<>(); - sourceIds.forEach(id -> countPerSource.put(id, 0L)); - results - .stream() - .map(Result::getMetacard) - .forEach( - metacard -> { - final String sourceId = (String) metacard.getSourceId(); - countPerSource.merge(sourceId, 1L, Long::sum); - }); - - for (int i = 0; i < sourceIds.size(); i++) { - final String id = sourceIds.get(i); - long elapsed = elapsedPerSource.getOrDefault(id, 0L); - long count = countPerSource.getOrDefault(id, 0L); - long hits = hitsPerSource.getOrDefault(id, 0L); - statusBySource.put(id, new StatusImpl(id, count, elapsed, hits, processingDetails)); - } - } - - properties.put("statusBySource", (Serializable) statusBySource); - - QueryResponse response = - new QueryResponseImpl( - request, - results, - true, - responses - .stream() - .filter(Objects::nonNull) - .map(QueryResponse::getHits) - .findFirst() - .orElse(-1L), - properties, - processingDetails); - - return new CqlQueryResponseImpl( - cqlRequest.getId(), - request, - response, - cqlRequest.getSourceResponseString(), - cqlRequest.isNormalize(), - filterAdapter, - actionRegistry, - descriptors); - } - - private List retrieveHitCount(QueryRequest request, List responses) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - QueryResponse queryResponse = catalogFramework.query(request); - responses.add(queryResponse); - return queryResponse.getResults(); - } - - /** - * @param cqlRequest CQL Request (only used for count) - * @param request Catalog Query Request - * @param responses List of responses to append to. - * @return A ResultIterable of results, additionally adding the query response to a mutatable list - * for additiol context as we query. - */ - private List retrieveResults( - CqlRequest cqlRequest, QueryRequest request, List responses) { - QueryFunction queryFunction = - (queryRequest) -> { - QueryResponse queryResponse = catalogFramework.query(queryRequest); - responses.add(queryResponse); - return queryResponse; - }; - return ResultIterable.resultIterable(queryFunction, request, cqlRequest.getCount()) - .stream() - .collect(Collectors.toList()); - } - - @Override - public CqlRequest getCqlRequestFromJson(String jsonBody) { - return GSON.fromJson(jsonBody, CqlRequestImpl.class); - } - - @Override - public CsvTransform getCsvTransformFromJson(String jsonBody) { - return GSON.fromJson(jsonBody, CsvTransformImpl.class); - } - - @SuppressWarnings("WeakerAccess" /* setter must be public for blueprint access */) - public void setDescriptors(TransformerDescriptors descriptors) { - this.descriptors = descriptors; - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/CswConstants.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/CswConstants.java deleted file mode 100644 index 2ba96638286..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/CswConstants.java +++ /dev/null @@ -1,660 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.util; - -import com.google.common.net.HttpHeaders; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import javax.ws.rs.core.MediaType; -import javax.xml.namespace.QName; - -public final class CswConstants { - - private CswConstants() {} - - /** - * Used as prefix on attribute names that clash with basic Metacard attribute names e.g., "title" - * vs. "csw.title" - */ - public static final String CSW_ATTRIBUTE_PREFIX = "csw."; - - public static final String CSW_NAMESPACE_URI = "http://www.opengis.net/cat/csw/2.0.2"; - - public static final String CSW_METACARD_TYPE_NAME = "csw:Record"; - - public static final String CSW_IDENTIFIER = "identifier"; - - /** Substitution name for "identifier" */ - public static final String CSW_BIBLIOGRAPHIC_CITATION = "bibliographicCitation"; - - public static final String CSW_TITLE = CSW_ATTRIBUTE_PREFIX + "title"; - - /** Substitution name for "title" */ - public static final String CSW_ALTERNATIVE = "alternative"; - - public static final String CSW_TYPE = "type"; - - public static final String CSW_SUBJECT = "subject"; - - public static final String CSW_FORMAT = "format"; - - /** Substitution name for "format" */ - public static final String CSW_EXTENT = "extent"; - - /** Substitution name for "format" */ - public static final String CSW_MEDIUM = "medium"; - - public static final String CSW_RELATION = "relation"; - - /** Substitution name for "relation" */ - public static final String CSW_CONFORMS_TO = "conformsTo"; - - /** Substitution name for "relation" */ - public static final String CSW_HAS_FORMAT = "hasFormat"; - - /** Substitution name for "relation" */ - public static final String CSW_HAS_PART = "hasPart"; - - /** Substitution name for "relation" */ - public static final String CSW_HAS_VERSION = "hasVersion"; - - /** Substitution name for "relation" */ - public static final String CSW_IS_FORMAT_OF = "isFormatOf"; - - /** Substitution name for "relation" */ - public static final String CSW_IS_PART_OF = "isPartOf"; - - /** Substitution name for "relation" */ - public static final String CSW_IS_REFERENCED_BY = "isReferencedBy"; - - /** Substitution name for "relation" */ - public static final String CSW_IS_REPLACED_BY = "isReplacedBy"; - - /** Substitution name for "relation" */ - public static final String CSW_IS_REQUIRED_BY = "isRequiredBy"; - - /** Substitution name for "relation" */ - public static final String CSW_IS_VERSION_OF = "isVersionOf"; - - /** Substitution name for "relation" */ - public static final String CSW_REFERENCES = "references"; - - /** Substitution name for "relation" */ - public static final String CSW_REPLACES = "replaces"; - - /** Substitution name for "relation" */ - public static final String CSW_REQUIRES = "requires"; - - public static final String CSW_DATE = "date"; - - /** Substitution name for "date" */ - public static final String CSW_MODIFIED = CSW_ATTRIBUTE_PREFIX + "modified"; - - /** Substitution name for "date" */ - public static final String CSW_CREATED = CSW_ATTRIBUTE_PREFIX + "created"; - - /** Substitution name for "date" */ - public static final String CSW_DATE_ACCEPTED = "dateAccepted"; - - /** Substitution name for "date" */ - public static final String CSW_DATE_COPYRIGHTED = "dateCopyrighted"; - - /** Substitution name for "date" */ - public static final String CSW_DATE_SUBMITTED = "dateSubmitted"; - - /** Substitution name for "date" */ - public static final String CSW_ISSUED = "issued"; - - /** Substitution name for "date" */ - public static final String CSW_VALID = "valid"; - - // Synonyms: abstract, tableOfContents - public static final String CSW_DESCRIPTION = CSW_ATTRIBUTE_PREFIX + "description"; - - /** Substitution name for "description" */ - public static final String CSW_ABSTRACT = "abstract"; - - /** Substitution name for "description" */ - public static final String CSW_TABLE_OF_CONTENTS = "tableOfContents"; - - // coverage: temporal and/or spatial info - public static final String CSW_COVERAGE = "coverage"; - - public static final String CSW_SPATIAL = "spatial"; - - public static final String CSW_TEMPORAL = "temporal"; - - public static final String OWS_BOUNDING_BOX = "BoundingBox"; - - public static final String CSW_CREATOR = "creator"; - - public static final String CSW_PUBLISHER = "publisher"; - - public static final String CSW_CONTRIBUTOR = "contributor"; - - public static final String CSW_LANGUAGE = "language"; - - public static final String CSW_RIGHTS = "rights"; - - /** Substitution name for "rights" */ - public static final String CSW_ACCESS_RIGHTS = "accessRights"; - - /** Substitution name for "rights" */ - public static final String CSW_LICENSE = "license"; - - public static final String CSW_SOURCE = "source"; - - public static final String ELEMENT_SET_TYPE = "ELEMENT_SET_TYPE"; - - public static final String ELEMENT_NAMES = "ELEMENT_NAMES"; - - public static final String IS_BY_ID_QUERY = "IS_BY_ID_QUERY"; - - public static final String WRITE_NAMESPACES = "WRITE_NAMESPACES"; - - public static final String NAMESPACE_DECLARATIONS = "NAMESPACE_DECLARATIONS"; - - public static final String ROOT_NODE_NAME = "ROOT_NODE_NAME"; - - public static final String CSW_MAPPING = "CSW_MAPPING"; - - public static final String AXIS_ORDER_PROPERTY = "AXIS_ORDER"; - - public static final String OMIT_XML_DECLARATION = "OMIT_XML_DECLARATION"; - - public static final String GET_CAPABILITIES = "GetCapabilities"; - - public static final String DESCRIBE_RECORD = "DescribeRecord"; - - public static final String GET_RECORDS = "GetRecords"; - - public static final String GET_RECORDS_RESPONSE = "GetRecordsResponse"; - - public static final String GET_RECORD_BY_ID = "GetRecordById"; - - public static final String GET_RECORD_BY_ID_RESPONSE = "GetRecordByIdResponse"; - - public static final String CAPABILITIES = "Capabilities"; - - public static final String TRANSACTION = "Transaction"; - - public static final String CSW = "CSW"; - - public static final String XML = "XML"; - - public static final String SERVICE = "service"; - - public static final String VERSION = "version"; - - public static final String VERBOSE_RESPONSE = "verboseResponse"; - - public static final String VERSION_2_0_2 = "2.0.2"; - - public static final String VERSION_2_0_1 = "2.0.1"; - - public static final String OUTPUT_FORMAT_PARAMETER = "OutputFormat"; - - public static final String ELEMENT_SET_NAME_PARAMETER = "ElementSetName"; - - public static final String RESULT_TYPE_PARAMETER = "ResultType"; - - public static final String FEDERATED_CATALOGS = "FederatedCatalogs"; - - public static final String PRODUCT_RETRIEVAL_HTTP_HEADER = "X-Csw-Product"; - - public static final String BYTES = "bytes"; - - public static final String BYTES_EQUAL = "bytes="; - - public static final String BYTES_TO_SKIP = "BytesToSkip"; - - public static final String RANGE_HEADER = HttpHeaders.RANGE; - - public static final String ACCEPT_RANGES_HEADER = HttpHeaders.ACCEPT_RANGES; - - /* - * typeName vs typeNames: typeName applies to DescribeRecord, where typeNames applies to - * getRecords. However, throughout the csw 2.0.2 specification, in particular in section 10.8, - * the use of typeName vs typeNames is inconsistent. Therefore, when parsing getCapabilities for - * getRecords, both are accepted. - * - * TODO: If this proves to be a continuing problem amongst supported services, getRecordsRequest - * may need to support typeName as well. - */ - public static final String TYPE_NAME_PARAMETER = "typeName"; - - public static final String TYPE_NAMES_PARAMETER = "typeNames"; - - public static final String HANDLE_PARAMETER = "handle"; - - public static final String OUTPUT_SCHEMA_PARAMETER = "OutputSchema"; - - public static final String TRANSFORMER_LOOKUP_KEY = "TransformerLookupKey"; - - public static final String TRANSFORMER_LOOKUP_VALUE = "TransformerLookupValue"; - - public static final String CONSTRAINT_LANGUAGE_PARAMETER = "ConstraintLanguage"; - - public static final String CONSTRAINT_LANGUAGE_FILTER = "Filter"; - - public static final String CONSTRAINT_LANGUAGE_CQL = "CQL_Text"; - - public static final List CONSTRAINT_LANGUAGES = - Arrays.asList(CONSTRAINT_LANGUAGE_FILTER, CONSTRAINT_LANGUAGE_CQL); - - public static final String OWS_NAMESPACE = "http://www.opengis.net/ows"; - - public static final QName POST = new QName(OWS_NAMESPACE, "Post"); - - public static final QName GET = new QName(OWS_NAMESPACE, "Get"); - - public static final String POST_ENCODING = "PostEncoding"; - - public static final String XMLNS = "xmlns"; - - public static final String XMLNS_DEFINITION_PREFIX = XMLNS + "("; - - public static final String XMLNS_DEFINITION_POSTFIX = ")"; - - public static final String ESCAPE = "!"; - - public static final String SINGLE_CHAR = "#"; - - public static final String WILD_CARD = "*"; - - public static final String COMMA = ","; - - public static final String NAMESPACE_DELIMITER = ":"; - - public static final String EQUALS_CHAR = "="; - - // NOTE: "csw:" prefix is not needed for AnyText queries - public static final String ANY_TEXT = "AnyText"; - - public static final String XML_SCHEMA_NAMESPACE_PREFIX = "xs"; - - public static final String XML_SCHEMA_INSTANCE_NAMESPACE_PREFIX = "xsi"; - - public static final String OWS_NAMESPACE_PREFIX = "ows"; - - public static final String OGC_NAMESPACE_PREFIX = "ogc"; - - public static final String GML_NAMESPACE_PREFIX = "gml"; - - public static final String CSW_NAMESPACE_PREFIX = "csw"; - - public static final String EBRIM_NAMESPACE_PREFIX = "rim"; - - public static final String DUBLIN_CORE_NAMESPACE_PREFIX = "dc"; - - public static final String DUBLIN_CORE_TERMS_NAMESPACE_PREFIX = "dct"; - - public static final String CSW_RECORD_LOCAL_NAME = "Record"; - - public static final String EBRIM_RECORD_LOCAL_NAME = "RegistryPackage"; - - public static final String CSW_SUMMARY_RECORD_LOCAL_NAME = "SummaryRecord"; - - public static final String CSW_BRIEF_RECORD_LOCAL_NAME = "BriefRecord"; - - public static final String CSW_RECORD = - CSW_NAMESPACE_PREFIX + NAMESPACE_DELIMITER + CSW_RECORD_LOCAL_NAME; - - public static final String CSW_SUMMARY_RECORD = - CSW_NAMESPACE_PREFIX + NAMESPACE_DELIMITER + CSW_SUMMARY_RECORD_LOCAL_NAME; - - public static final String CSW_BRIEF_RECORD = - CSW_NAMESPACE_PREFIX + NAMESPACE_DELIMITER + CSW_BRIEF_RECORD_LOCAL_NAME; - - public static final String CSW_OUTPUT_SCHEMA = "http://www.opengis.net/cat/csw/2.0.2"; - - public static final String OGC_SCHEMA = "http://www.opengis.net/ogc"; - - public static final String GML_SCHEMA = "http://www.opengis.net/gml"; - - public static final String EBRIM_SCHEMA = "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"; - - public static final String DUBLIN_CORE_SCHEMA = "http://purl.org/dc/elements/1.1/"; - - public static final String DUBLIN_CORE_TERMS_SCHEMA = "http://purl.org/dc/terms/"; - - public static final QName DC_IDENTIFIER_QNAME = new QName(DUBLIN_CORE_SCHEMA, "identifier"); - - public static final QName DC_TITLE_QNAME = new QName(DUBLIN_CORE_SCHEMA, "title"); - - public static final String CONSTRAINT_VERSION = "1.1.0"; - - public static final String OGC_CSW_PACKAGE = "net.opengis.cat.csw.v_2_0_2"; - - public static final String OGC_FILTER_PACKAGE = "net.opengis.filter.v_1_1_0"; - - public static final String OGC_GML_PACKAGE = "net.opengis.gml.v_3_1_1"; - - public static final String OGC_OWS_PACKAGE = "net.opengis.ows.v_1_0_0"; - - public static final String XML_SCHEMA_LANGUAGE = "http://www.w3.org/XML/Schema"; - - public static final String CSW_NO_PREFIX_TITLE = "title"; - - public static final String CSW_NO_PREFIX_MODIFIED = "modified"; - - public static final String CSW_NO_PREFIX_CREATED = "created"; - - public static final String GML_POINT = "Point"; - - public static final String GML_LINESTRING = "LineString"; - - public static final String GML_POLYGON = "Polygon"; - - public static final String BBOX_PROP = "ows:BoundingBox"; - - public static final String SPATIAL_PROP = "dct:Spatial"; - - public static final String METERS = "METERS"; - - public static final String CRS = "crs"; - - public static final String SRS_NAME = "EPSG:4326"; - - public static final String SRS_URL = "urn:x-ogc:def:crs:EPSG:6.11:4326"; - - public static final String OWS_UPPER_CORNER = "UpperCorner"; - - public static final String OWS_LOWER_CORNER = "LowerCorner"; - - public static final double DEGREES_TO_RADIANS = Math.PI / 180.0; - - public static final double RADIANS_TO_DEGREES = 1 / DEGREES_TO_RADIANS; - - public static final double EARTH_MEAN_RADIUS_METERS = 6371008.7714; - - public static final String CSW_TRANSACTION = "csw:Transaction"; - - public static final String CSW_TRANSACTION_INSERT_NODE = "csw:Insert"; - - public static final String CSW_TRANSACTION_UPDATE_NODE = "csw:Update"; - - public static final String CSW_TRANSACTION_DELETE_NODE = "csw:Delete"; - - public static final String CSW_CONSTRAINT = "csw:Constraint"; - - public static final String CSW_CQL_TEXT = "ogc:CqlText"; - - // Exception Codes - public static final String VERSION_NEGOTIATION_FAILED = "VersionNegotiationFailed"; - - public static final String MISSING_PARAMETER_VALUE = "MissingParameterValue"; - - public static final String INVALID_PARAMETER_VALUE = "InvalidParameterValue"; - - public static final String OPERATION_NOT_SUPPORTED = "OperationNotSupported"; - - public static final String NO_APPLICABLE_CODE = "NoApplicableCode"; - - public static final String TRANSACTION_FAILED = "TransactionFailed"; - - public static final String OUTPUT_FORMAT_XML = MediaType.APPLICATION_XML; - - public static final String SCHEMA_LANGUAGE_X_SCHEMA_2001 = "http://www.w3.org/2001/XMLSchema"; - - public static final String SCHEMA_LANGUAGE_X_SCHEMA = "http://www.w3.org/XMLSchema"; - - public static final String SCHEMA_LANGUAGE_XML_SCHEMA = "http://www.w3.org/XML/Schema"; - - public static final String SCHEMA_LANGUAGE_XML_TR = "http://www.w3.org/TR/xmlschema-1/"; - - public static final QName CSW_IDENTIFIER_QNAME; - - public static final QName CSW_BIBLIOGRAPHIC_CITATION_QNAME; - - public static final QName CSW_TITLE_QNAME; - - public static final QName CSW_ALTERNATIVE_QNAME; - - public static final QName CSW_TYPE_QNAME; - - public static final QName CSW_SUBJECT_QNAME; - - public static final QName CSW_FORMAT_QNAME; - - public static final QName CSW_EXTENT_QNAME; - - public static final QName CSW_MEDIUM_QNAME; - - public static final QName CSW_RELATION_QNAME; - - public static final QName CSW_CONFORMS_TO_QNAME; - - public static final QName CSW_HAS_FORMAT_QNAME; - - public static final QName CSW_HAS_PART_QNAME; - - public static final QName CSW_HAS_VERSION_QNAME; - - public static final QName CSW_IS_FORMAT_OF_QNAME; - - public static final QName CSW_IS_PART_OF_QNAME; - - public static final QName CSW_IS_REFERENCED_BY_QNAME; - - public static final QName CSW_IS_REPLACED_BY_QNAME; - - public static final QName CSW_IS_REQUIRED_BY_QNAME; - - public static final QName CSW_IS_VERSION_OF_QNAME; - - public static final QName CSW_REFERENCES_QNAME; - - public static final QName CSW_REPLACES_QNAME; - - public static final QName CSW_REQUIRES_QNAME; - - public static final QName CSW_DATE_QNAME; - - public static final QName CSW_MODIFIED_QNAME; - - public static final QName CSW_CREATED_QNAME; - - public static final QName CSW_DATE_ACCEPTED_QNAME; - - public static final QName CSW_DATE_COPYRIGHTED_QNAME; - - public static final QName CSW_DATE_SUBMITTED_QNAME; - - public static final QName CSW_ISSUED_QNAME; - - public static final QName CSW_VALID_QNAME; - - public static final QName CSW_DESCRIPTION_QNAME; - - public static final QName CSW_ABSTRACT_QNAME; - - public static final QName CSW_TABLE_OF_CONTENTS_QNAME; - - public static final QName CSW_COVERAGE_QNAME; - - public static final QName CSW_SPATIAL_QNAME; - - public static final QName CSW_TEMPORAL_QNAME; - - public static final QName OWS_BOUNDING_BOX_QNAME; - - public static final QName CSW_CREATOR_QNAME; - - public static final QName CSW_PUBLISHER_QNAME; - - public static final QName CSW_CONTRIBUTOR_QNAME; - - public static final QName CSW_LANGUAGE_QNAME; - - public static final QName CSW_RIGHTS_QNAME; - - public static final QName CSW_ACCESS_RIGHTS_QNAME; - - public static final QName CSW_LICENSE_QNAME; - - public static final QName CSW_SOURCE_QNAME; - - public static final List REQUIRED_FIELDS; - - public static final List BRIEF_CSW_RECORD_FIELDS; - - public static final List SUMMARY_CSW_RECORD_FIELDS; - - public static final List FULL_CSW_RECORD_FIELDS; - - public static final List VALID_SCHEMA_LANGUAGES = - new ArrayList<>( - Arrays.asList( - SCHEMA_LANGUAGE_X_SCHEMA, - SCHEMA_LANGUAGE_XML_SCHEMA, - SCHEMA_LANGUAGE_X_SCHEMA_2001, - SCHEMA_LANGUAGE_XML_TR)); - - public enum BinarySpatialOperand { - GEOMETRY, - ENVELOPE, - NONE - } - - static { - CSW_TITLE_QNAME = createDublinCoreQName(CSW_NO_PREFIX_TITLE); - CSW_MODIFIED_QNAME = createDublinCoreTermQName(CSW_NO_PREFIX_MODIFIED); - CSW_CREATED_QNAME = createDublinCoreTermQName(CSW_NO_PREFIX_CREATED); - - CSW_IDENTIFIER_QNAME = createDublinCoreQName(CSW_IDENTIFIER); - CSW_TYPE_QNAME = createDublinCoreQName(CSW_TYPE); - CSW_SUBJECT_QNAME = createDublinCoreQName(CSW_SUBJECT); - CSW_FORMAT_QNAME = createDublinCoreQName(CSW_FORMAT); - CSW_RELATION_QNAME = createDublinCoreQName(CSW_RELATION); - CSW_DATE_QNAME = createDublinCoreQName(CSW_DATE); - CSW_DESCRIPTION_QNAME = createDublinCoreQName(CSW_DESCRIPTION); - CSW_COVERAGE_QNAME = createDublinCoreQName(CSW_COVERAGE); - CSW_CREATOR_QNAME = createDublinCoreQName(CSW_CREATOR); - CSW_PUBLISHER_QNAME = createDublinCoreQName(CSW_PUBLISHER); - CSW_CONTRIBUTOR_QNAME = createDublinCoreQName(CSW_CONTRIBUTOR); - CSW_LANGUAGE_QNAME = createDublinCoreQName(CSW_LANGUAGE); - CSW_RIGHTS_QNAME = createDublinCoreQName(CSW_RIGHTS); - CSW_SOURCE_QNAME = createDublinCoreQName(CSW_SOURCE); - - CSW_ALTERNATIVE_QNAME = createDublinCoreTermQName(CSW_ALTERNATIVE); - CSW_BIBLIOGRAPHIC_CITATION_QNAME = createDublinCoreTermQName(CSW_BIBLIOGRAPHIC_CITATION); - CSW_EXTENT_QNAME = createDublinCoreTermQName(CSW_EXTENT); - CSW_MEDIUM_QNAME = createDublinCoreTermQName(CSW_MEDIUM); - CSW_CONFORMS_TO_QNAME = createDublinCoreTermQName(CSW_CONFORMS_TO); - CSW_HAS_FORMAT_QNAME = createDublinCoreTermQName(CSW_HAS_FORMAT); - CSW_HAS_PART_QNAME = createDublinCoreTermQName(CSW_HAS_PART); - CSW_HAS_VERSION_QNAME = createDublinCoreTermQName(CSW_HAS_VERSION); - CSW_IS_FORMAT_OF_QNAME = createDublinCoreTermQName(CSW_IS_FORMAT_OF); - CSW_IS_PART_OF_QNAME = createDublinCoreTermQName(CSW_IS_PART_OF); - CSW_IS_REFERENCED_BY_QNAME = createDublinCoreTermQName(CSW_IS_REFERENCED_BY); - CSW_IS_REPLACED_BY_QNAME = createDublinCoreTermQName(CSW_IS_REPLACED_BY); - CSW_IS_REQUIRED_BY_QNAME = createDublinCoreTermQName(CSW_IS_REQUIRED_BY); - CSW_IS_VERSION_OF_QNAME = createDublinCoreTermQName(CSW_IS_VERSION_OF); - CSW_REFERENCES_QNAME = createDublinCoreTermQName(CSW_REFERENCES); - CSW_REPLACES_QNAME = createDublinCoreTermQName(CSW_REPLACES); - CSW_REQUIRES_QNAME = createDublinCoreTermQName(CSW_REQUIRES); - CSW_DATE_ACCEPTED_QNAME = createDublinCoreTermQName(CSW_DATE_ACCEPTED); - CSW_DATE_COPYRIGHTED_QNAME = createDublinCoreTermQName(CSW_DATE_COPYRIGHTED); - CSW_DATE_SUBMITTED_QNAME = createDublinCoreTermQName(CSW_DATE_SUBMITTED); - CSW_ISSUED_QNAME = createDublinCoreTermQName(CSW_ISSUED); - CSW_VALID_QNAME = createDublinCoreTermQName(CSW_VALID); - CSW_ABSTRACT_QNAME = createDublinCoreTermQName(CSW_ABSTRACT); - CSW_TABLE_OF_CONTENTS_QNAME = createDublinCoreTermQName(CSW_TABLE_OF_CONTENTS); - CSW_SPATIAL_QNAME = createDublinCoreTermQName(CSW_SPATIAL); - CSW_TEMPORAL_QNAME = createDublinCoreTermQName(CSW_TEMPORAL); - CSW_ACCESS_RIGHTS_QNAME = createDublinCoreTermQName(CSW_ACCESS_RIGHTS); - CSW_LICENSE_QNAME = createDublinCoreTermQName(CSW_LICENSE); - - OWS_BOUNDING_BOX_QNAME = new QName(OWS_NAMESPACE, OWS_BOUNDING_BOX, OWS_NAMESPACE_PREFIX); - - REQUIRED_FIELDS = Arrays.asList(CSW_IDENTIFIER_QNAME, CSW_TITLE_QNAME); - - BRIEF_CSW_RECORD_FIELDS = - Arrays.asList( - CSW_IDENTIFIER_QNAME, CSW_TITLE_QNAME, CSW_TYPE_QNAME, OWS_BOUNDING_BOX_QNAME); - - SUMMARY_CSW_RECORD_FIELDS = - Arrays.asList( - CSW_IDENTIFIER_QNAME, - CSW_TITLE_QNAME, - CSW_TYPE_QNAME, - CSW_SUBJECT_QNAME, - CSW_FORMAT_QNAME, - CSW_RELATION_QNAME, - CSW_MODIFIED_QNAME, - CSW_ABSTRACT_QNAME, - CSW_SPATIAL_QNAME, - OWS_BOUNDING_BOX_QNAME); - - FULL_CSW_RECORD_FIELDS = - Arrays.asList( - CSW_IDENTIFIER_QNAME, - CSW_BIBLIOGRAPHIC_CITATION_QNAME, - CSW_TITLE_QNAME, - CSW_ALTERNATIVE_QNAME, - CSW_TYPE_QNAME, - CSW_SUBJECT_QNAME, - CSW_FORMAT_QNAME, - CSW_EXTENT_QNAME, - CSW_MEDIUM_QNAME, - CSW_RELATION_QNAME, - CSW_CONFORMS_TO_QNAME, - CSW_HAS_FORMAT_QNAME, - CSW_HAS_PART_QNAME, - CSW_HAS_VERSION_QNAME, - CSW_IS_FORMAT_OF_QNAME, - CSW_IS_PART_OF_QNAME, - CSW_IS_REFERENCED_BY_QNAME, - CSW_IS_REPLACED_BY_QNAME, - CSW_IS_REQUIRED_BY_QNAME, - CSW_IS_VERSION_OF_QNAME, - CSW_REFERENCES_QNAME, - CSW_REPLACES_QNAME, - CSW_REQUIRES_QNAME, - CSW_DATE_QNAME, - CSW_MODIFIED_QNAME, - CSW_CREATED_QNAME, - CSW_DATE_ACCEPTED_QNAME, - CSW_DATE_COPYRIGHTED_QNAME, - CSW_DATE_SUBMITTED_QNAME, - CSW_ISSUED_QNAME, - CSW_VALID_QNAME, - CSW_DESCRIPTION_QNAME, - CSW_ABSTRACT_QNAME, - CSW_TABLE_OF_CONTENTS_QNAME, - CSW_COVERAGE_QNAME, - CSW_SPATIAL_QNAME, - CSW_TEMPORAL_QNAME, - OWS_BOUNDING_BOX_QNAME, - CSW_CREATOR_QNAME, - CSW_PUBLISHER_QNAME, - CSW_CONTRIBUTOR_QNAME, - CSW_LANGUAGE_QNAME, - CSW_RIGHTS_QNAME, - CSW_ACCESS_RIGHTS_QNAME, - CSW_LICENSE_QNAME, - CSW_SOURCE_QNAME, - OWS_BOUNDING_BOX_QNAME); - } - - private static QName createDublinCoreQName(final String field) { - return new QName(DUBLIN_CORE_SCHEMA, field, DUBLIN_CORE_NAMESPACE_PREFIX); - } - - private static QName createDublinCoreTermQName(final String field) { - return new QName(DUBLIN_CORE_TERMS_SCHEMA, field, DUBLIN_CORE_TERMS_NAMESPACE_PREFIX); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/EndpointUtil.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/EndpointUtil.java deleted file mode 100644 index 98d6adf6993..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/util/EndpointUtil.java +++ /dev/null @@ -1,837 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.util; - -import static ddf.catalog.Constants.ADDITIONAL_SORT_BYS; -import static ddf.catalog.util.impl.ResultIterable.resultIterable; -import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; - -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.AttributeType; -import ddf.catalog.data.InjectableAttribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.RequiredAttributesRegistry; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.impl.SortByImpl; -import ddf.catalog.impl.filter.GeoToolsFunctionFactory; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.catalog.util.impl.ResultIterable; -import java.io.IOException; -import java.io.Serializable; -import java.nio.charset.Charset; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.Instant; -import java.time.OffsetDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Base64; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Optional; -import java.util.Random; -import java.util.Set; -import java.util.TimeZone; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import javax.ws.rs.NotFoundException; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.io.input.BoundedInputStream; -import org.apache.commons.lang3.StringUtils; -import org.codice.ddf.catalog.ui.config.ConfigurationApplication; -import org.codice.ddf.catalog.ui.metacard.EntityTooLargeException; -import org.codice.ddf.catalog.ui.query.utility.EndpointUtility; -import org.codice.ddf.catalog.ui.security.LogSanitizer; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.geotools.factory.CommonFactoryFinder; -import org.geotools.factory.FactoryIteratorProvider; -import org.geotools.factory.GeoTools; -import org.geotools.filter.FunctionFactory; -import org.opengis.filter.Filter; -import org.opengis.filter.sort.SortBy; -import org.opengis.filter.sort.SortOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import spark.Request; -import spark.Response; - -public class EndpointUtil implements EndpointUtility { - - private static final Logger LOGGER = LoggerFactory.getLogger(EndpointUtil.class); - public static final String MESSAGE = "message"; - - private final List metacardTypes; - - private final CatalogFramework catalogFramework; - - private final FilterBuilder filterBuilder; - - private final List injectableAttributes; - - private final AttributeRegistry attributeRegistry; - - private final ConfigurationApplication config; - - private final RequiredAttributesRegistry requiredAttributesRegistry; - - private static final String ISO_8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"; - - private static final String APPLICATION_JSON = "application/json"; - - private static final String TYPE_KEY = "type"; - - private static final String MULTIVALUED_KEY = "multivalued"; - - private static final String ID_KEY = "id"; - - private static final String ISINJECTED_KEY = "isInjected"; - - private static final String REQUIRED_KEY = "required"; - - private static int pageSize = 250; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .setDateFormat(ISO_8601_DATE_FORMAT) - .create(); - - private final Random random = new Random(); - - private List whiteListedMetacardTypes = Collections.emptyList(); - - public EndpointUtil( - List metacardTypes, - CatalogFramework catalogFramework, - FilterBuilder filterBuilder, - List injectableAttributes, - AttributeRegistry attributeRegistry, - RequiredAttributesRegistry requiredAttributesRegistry, - ConfigurationApplication config) { - this.metacardTypes = metacardTypes; - this.catalogFramework = catalogFramework; - this.filterBuilder = filterBuilder; - this.injectableAttributes = injectableAttributes; - this.attributeRegistry = attributeRegistry; - this.requiredAttributesRegistry = requiredAttributesRegistry; - this.config = config; - registerGeoToolsFunctionFactory(); - } - - public List getWhiteListedMetacardTypes() { - return whiteListedMetacardTypes; - } - - public void setWhiteListedMetacardTypes(List whiteListedMetacardTypes) { - this.whiteListedMetacardTypes = whiteListedMetacardTypes; - } - - @SuppressWarnings("squid:S1604") // generics cannot be lambdas - private void registerGeoToolsFunctionFactory() { - GeoTools.addFactoryIteratorProvider( - new FactoryIteratorProvider() { - @Override - public Iterator iterator(Class category) { - if (FunctionFactory.class == category) { - List functionFactories = new LinkedList<>(); - functionFactories.add(new GeoToolsFunctionFactory()); - return (Iterator) functionFactories.iterator(); - } - return null; - } - }); - CommonFactoryFinder.reset(); - } - - public Metacard getMetacardById(String id) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - return getMetacardById(id, null, null); - } - - public Metacard getMetacardById(String id, Map properties) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - return getMetacardById(id, null, properties); - } - - public Metacard getMetacardById(String id, String storeId) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - return getMetacardById(id, storeId, null); - } - - public Metacard getMetacardById(String id, String storeId, Map properties) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - Collection storeIds; - if (storeId == null) { - storeIds = null; - } else { - storeIds = Arrays.asList(storeId); - } - Filter idFilter = filterBuilder.attribute(Core.ID).is().equalTo().text(id); - Filter tagsFilter = filterBuilder.attribute(Core.METACARD_TAGS).is().like().text("*"); - Filter filter = filterBuilder.allOf(idFilter, tagsFilter); - - QueryResponse queryResponse = - catalogFramework.query( - new QueryRequestImpl(new QueryImpl(filter), false, storeIds, properties)); - - if (queryResponse.getResults().isEmpty()) { - throw new NotFoundException("Could not find metacard for id: " + id); - } - - Result result = queryResponse.getResults().get(0); - - return result.getMetacard(); - } - - public String getResponseWrapper(String responseType, Object response) { - Map result = new HashMap<>(); - result.put("responseType", responseType); - result.put("response", response); - return getJson(result); - } - - @Override - public Map getMetacardsByTag(String tagStr) { - Filter filter = filterBuilder.attribute(Core.METACARD_TAGS).is().like().text(tagStr); - - ResultIterable resultIterable = - resultIterable( - catalogFramework, - new QueryRequestImpl( - new QueryImpl( - filter, - 1, - pageSize, - new SortByImpl(Core.MODIFIED, SortOrder.DESCENDING), - false, - TimeUnit.SECONDS.toMillis(10)), - false, - null, - additionalSort(new HashMap<>(), Core.ID, SortOrder.ASCENDING))); - return resultIterable - .stream() - .collect( - Collectors.toMap( - result -> result.getMetacard().getId(), - Function.identity(), - EndpointUtil::firstInWinsMerge)); - } - - public List getMetacardListByTag(String tagStr) { - Filter filter = filterBuilder.attribute(Core.METACARD_TAGS).is().like().text(tagStr); - - return resultIterable( - catalogFramework, - new QueryRequestImpl( - new QueryImpl( - filter, - 1, - pageSize, - new SortByImpl(Core.MODIFIED, SortOrder.DESCENDING), - false, - TimeUnit.SECONDS.toMillis(10)), - false, - null, - null)) - .stream() - .filter(Objects::nonNull) - .map(Result::getMetacard) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - } - - public Map getMetacardsWithTagByLikeAttributes( - Map> attributeMap, String tagStr) { - return getMetacardsWithTagByLikeAttributes( - attributeMap, filterBuilder.attribute(Core.METACARD_TAGS).is().like().text(tagStr)); - } - - public Map getMetacardsWithTagByLikeAttributes( - Map> attributeMap, Filter tagFilter) { - - List attributeFilters = new ArrayList<>(); - - for (Entry> entry : attributeMap.entrySet()) { - attributeFilters.add(buildAttributeFilter(entry.getKey(), entry.getValue(), false)); - } - - Filter filter = filterBuilder.allOf(filterBuilder.anyOf(attributeFilters), tagFilter); - - ResultIterable resultIterable = - resultIterable( - catalogFramework, - new QueryRequestImpl( - new QueryImpl( - filter, - 1, - pageSize, - new SortByImpl(Core.MODIFIED, SortOrder.DESCENDING), - false, - TimeUnit.SECONDS.toMillis(10)), - false, - null, - additionalSort(new HashMap<>(), Core.ID, SortOrder.ASCENDING))); - return resultIterable - .stream() - .collect( - Collectors.toMap( - result -> result.getMetacard().getId(), - Function.identity(), - EndpointUtil::firstInWinsMerge)); - } - - public Map getMetacardsWithTagById(Collection ids, String tagFilter) { - return getMetacardsWithTagByAttributes(Core.ID, ids, tagFilter); - } - - public Map getMetacardsWithTagById(Collection ids, Filter tagFilter) { - return getMetacardsWithTagByAttributes(Core.ID, ids, tagFilter); - } - - public Map getMetacardsWithTagByAttributes( - String attributeName, Collection attributeValues, String tag) { - return getMetacardsWithTagByAttributes( - attributeName, - attributeValues, - filterBuilder.attribute(Core.METACARD_TAGS).is().like().text(tag)); - } - - public Map getMetacardsWithTagByAttributes( - String attributeName, Collection attributeValues, Filter tagFilter) { - return getMetacardsWithTagByAttributes(attributeName, attributeValues, tagFilter, null); - } - - public Map getMetacardsWithTagByAttributes( - String attributeName, - Collection attributeValues, - String tag, - @Nullable Set storeIds) { - return getMetacardsWithTagByAttributes( - attributeName, - attributeValues, - filterBuilder.attribute(Core.METACARD_TAGS).is().like().text(tag), - storeIds); - } - - public Map getMetacardsWithTagByAttributes( - String attributeName, - Collection attributeValues, - Filter tagFilter, - @Nullable Set storeIds) { - if (attributeValues.isEmpty()) { - return new HashMap<>(); - } - - Filter attributeFilter = buildAttributeFilter(attributeName, attributeValues, true); - Filter queryFilter = filterBuilder.allOf(attributeFilter, tagFilter); - - ResultIterable resultIterable = - resultIterable( - catalogFramework, - new QueryRequestImpl( - new QueryImpl( - queryFilter, - 1, - pageSize, - new SortByImpl(Core.MODIFIED, SortOrder.DESCENDING), - false, - TimeUnit.SECONDS.toMillis(10)), - false, - storeIds, - additionalSort(new HashMap<>(), Core.ID, SortOrder.ASCENDING))); - - return resultIterable - .stream() - .collect( - Collectors.toMap( - result -> result.getMetacard().getId(), - Function.identity(), - EndpointUtil::firstInWinsMerge)); - } - - private Filter buildAttributeFilter( - String attributeName, Collection attributeValues, boolean isExactMatch) { - if (CollectionUtils.isEmpty(attributeValues)) { - return null; - } - - List filters = new ArrayList<>(); - for (String value : attributeValues) { - if (isExactMatch) { - filters.add(filterBuilder.attribute(attributeName).is().equalTo().text(value)); - } else { - filters.add(filterBuilder.attribute(attributeName).is().like().text(value)); - } - } - - if (filters.size() == 1) { - return filters.get(0); - } else { - return filterBuilder.anyOf(filters); - } - } - - private Map additionalSort( - Map properties, String propertyName, SortOrder order) { - SortBy[] additionalSorts = {new SortByImpl(propertyName, order)}; - properties.put(ADDITIONAL_SORT_BYS, additionalSorts); - return properties; - } - - private List getFilteredMetacardTypes() { - if (!whiteListedMetacardTypes.isEmpty()) { - return metacardTypes - .stream() - .filter(metacardType -> whiteListedMetacardTypes.contains(metacardType.getName())) - .collect(Collectors.toList()); - } - return metacardTypes; - } - - public Map getMetacardTypeMap() { - Map resultTypes = new HashMap<>(); - for (MetacardType metacardType : getFilteredMetacardTypes()) { - Map attributes = new HashMap<>(); - for (AttributeDescriptor descriptor : metacardType.getAttributeDescriptors()) { - Map attributeProperties = new HashMap<>(); - attributeProperties.put(TYPE_KEY, descriptor.getType().getAttributeFormat().name()); - attributeProperties.put(MULTIVALUED_KEY, descriptor.isMultiValued()); - attributeProperties.put(ID_KEY, descriptor.getName()); - attributeProperties.put(ISINJECTED_KEY, false); - attributeProperties.put( - REQUIRED_KEY, - requiredAttributesRegistry.isRequired(metacardType.getName(), descriptor.getName())); - attributes.put(descriptor.getName(), attributeProperties); - } - resultTypes.put(metacardType.getName(), attributes); - } - for (InjectableAttribute attribute : injectableAttributes) { - Optional lookup = attributeRegistry.lookup(attribute.attribute()); - if (!lookup.isPresent()) { - continue; - } - - AttributeDescriptor descriptor = lookup.get(); - Map attributeProperties = new HashMap<>(); - attributeProperties.put(TYPE_KEY, descriptor.getType().getAttributeFormat().name()); - attributeProperties.put(MULTIVALUED_KEY, descriptor.isMultiValued()); - attributeProperties.put(ID_KEY, descriptor.getName()); - attributeProperties.put(ISINJECTED_KEY, true); - Set types = - attribute.metacardTypes().isEmpty() ? resultTypes.keySet() : attribute.metacardTypes(); - - types - .stream() - .filter(type -> isAttributeMissing(resultTypes, attribute, type)) - .forEach( - type -> - mergeMetacardTypeIntoResults(resultTypes, attribute, attributeProperties, type)); - } - - return resultTypes; - } - - @SuppressWarnings("unchecked") - private void mergeMetacardTypeIntoResults( - Map resultTypes, - InjectableAttribute attribute, - Map attributeProperties, - String type) { - Map attributes = - (Map) resultTypes.getOrDefault(type, new HashMap()); - attributeProperties.put( - REQUIRED_KEY, requiredAttributesRegistry.isRequired(type, attribute.attribute())); - attributes.put(attribute.attribute(), attributeProperties); - resultTypes.put(type, attributes); - } - - @SuppressWarnings("unchecked") - private boolean isAttributeMissing( - Map resultTypes, InjectableAttribute attribute, String type) { - if (!resultTypes.containsKey(type)) { - return true; - } - - Map attributes = (Map) resultTypes.get(type); - - return !attributes.containsKey(attribute.attribute()); - } - - @SuppressWarnings("squid:S1319") // needs to match signature of AttributeImpl - public ArrayList getStringList(List list) { - if (list == null) { - return new ArrayList<>(); - } - return list.stream().map(String::valueOf).collect(Collectors.toCollection(ArrayList::new)); - } - - public Map transformToMap(Metacard metacard) { - return transformToMap(Collections.singletonList(metacard)); - } - - public Map transformToMap(List metacards) { - List> metacardJsons = - metacards.stream().map(this::getMetacardMap).collect(Collectors.toList()); - - Set types = - metacards - .stream() - .map(Metacard::getMetacardType) - .map(MetacardType::getName) - .collect(Collectors.toSet()); - - List> typesList = new ArrayList<>(); - for (String type : types) { - Map typeMap = new HashMap<>(); - typeMap.put("type-name", type); - typeMap.put("type", getMetacardTypeMap().get(type)); - - typeMap.put( - "ids", - metacards - .stream() - .filter(mc -> type.equals(mc.getMetacardType().getName())) - .map(Metacard::getId) - .collect(Collectors.toList())); - typesList.add(typeMap); - } - - Map outerMap = new HashMap<>(); - outerMap.put("metacards", metacardJsons); - outerMap.put("metacard-types", typesList); - - return outerMap; - } - - public String metacardToJson(String id, String storeId) - throws SourceUnavailableException, UnsupportedQueryException, FederationException { - return metacardToJson(getMetacardById(id, storeId, null)); - } - - public String metacardToJson(Metacard metacard) { - return getJson(transformToMap(metacard)); - } - - public String metacardsToJson(List metacards) { - return getJson(transformToMap(metacards)); - } - - public String getJson(Object result) { - return GSON.toJson(result); - } - - public Map getMetacardMap(Metacard metacard) { - Set attributeDescriptors = - metacard.getMetacardType().getAttributeDescriptors(); - Map result = new HashMap<>(); - for (AttributeDescriptor descriptor : attributeDescriptors) { - if (handleNullName(metacard, result, descriptor) - || handleThumbnail(metacard, result, descriptor)) { - continue; - } - handleDate(metacard, result, descriptor); - handleMultivalued(metacard, result, descriptor); - } - return result; - } - - private void handleMultivalued( - Metacard metacard, Map result, AttributeDescriptor descriptor) { - if (descriptor.isMultiValued()) { - result.put(descriptor.getName(), metacard.getAttribute(descriptor.getName()).getValues()); - } else { - result.put(descriptor.getName(), metacard.getAttribute(descriptor.getName()).getValue()); - } - } - - private void handleDate( - Metacard metacard, Map result, AttributeDescriptor descriptor) { - if (descriptor.getType().getAttributeFormat().equals(AttributeType.AttributeFormat.DATE)) { - Attribute attribute = metacard.getAttribute(descriptor.getName()); - if (descriptor.isMultiValued()) { - result.put( - descriptor.getName(), - attribute.getValues().stream().map(this::parseDate).collect(Collectors.toList())); - } else { - result.put(descriptor.getName(), parseDate(attribute.getValue())); - } - } - } - - private boolean handleThumbnail( - Metacard metacard, Map result, AttributeDescriptor descriptor) { - if (Core.THUMBNAIL.equals(descriptor.getName())) { - if (metacard.getThumbnail() != null) { - result.put( - descriptor.getName(), Base64.getEncoder().encodeToString(metacard.getThumbnail())); - } else { - result.put(descriptor.getName(), null); - } - return true; - } - return false; - } - - private boolean handleNullName( - Metacard metacard, Map result, AttributeDescriptor descriptor) { - if (metacard.getAttribute(descriptor.getName()) == null) { - if (descriptor.isMultiValued()) { - result.put(descriptor.getName(), Collections.emptyList()); - } else { - result.put(descriptor.getName(), null); - } - return true; - } - return false; - } - - public Instant parseToDate(Serializable value) { - if (value instanceof Instant) { - return ((Instant) value); - } - if (value instanceof Date) { - return ((Date) value).toInstant(); - } - SimpleDateFormat dateFormat = new SimpleDateFormat(ISO_8601_DATE_FORMAT); - dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - try { - return dateFormat.parse(value.toString()).toInstant(); - } catch (ParseException e) { - throw new IllegalArgumentException(e); - } - } - - @SuppressWarnings("squid:S2293") // results in class cast error - public Map.Entry convertDateEntries(Map.Entry entry) { - if (entry == null || entry.getKey() == null || entry.getValue() == null) { - return entry; - } - - return attributeRegistry - .lookup(entry.getKey()) - .filter(ad -> AttributeType.AttributeFormat.DATE.equals(ad.getType().getAttributeFormat())) - .map( - attributeDescriptor -> { - Serializable date = parseDate((Serializable) entry.getValue()); - if (date instanceof Instant) { - // must be Date object for solr to parse correctly - date = Date.from((Instant) date); - } - return (Map.Entry) - new AbstractMap.SimpleEntry(entry.getKey(), date); - }) - .orElse(entry); - } - - private Pattern jsonDefault = - Pattern.compile("[a-zA-Z]{3}\\s[a-zA-Z]{3}\\s\\d+\\s[0-9:]+\\s(\\w+\\s)?\\d+"); - - private Pattern iso8601Z = Pattern.compile("\\d+-?\\d+-?\\d+T\\d+:?\\d+:?\\d+(\\.\\d+)?Z"); - - private Pattern iso8601Offset = - Pattern.compile("\\d+-?\\d+-?\\d+T\\d+:?\\d+:?\\d+(\\.\\d+)?[+\\-]\\d+:\\d+"); - - public Instant parseDate(Serializable value) { - - if (value instanceof Date) { - return ((Date) value).toInstant(); - } - - if (value instanceof Long) { - return Instant.ofEpochMilli((Long) value); - } - - if (!(value instanceof String)) { - return null; - } - - String string = String.valueOf(value); - - if (StringUtils.isBlank(string)) { - return null; - } - - if (StringUtils.isNumeric(string)) { - try { - return Instant.ofEpochMilli(Long.parseLong(string)); - } catch (NumberFormatException ex) { - LOGGER.debug("Failed to create Epoch time from a numeric: {}", string, ex); - return null; - } - } - - if (iso8601Z.matcher(string).matches()) { - return Instant.parse(string); - } - - if (iso8601Offset.matcher(string).matches()) { - return OffsetDateTime.parse(string).toInstant(); - } - - SimpleDateFormat dateFormat; - if (jsonDefault.matcher(string).matches()) { - dateFormat = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy"); - } else { - dateFormat = new SimpleDateFormat(); - } - dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - - try { - return dateFormat.parse(string).toInstant(); - } catch (ParseException e) { - LOGGER.debug("Failed to parse as a dateFormat time from a date string: {}", string, e); - return null; - } - } - - public String safeGetBody(Request req) throws IOException { - if (req.contentLength() > config.getMaximumUploadSize()) { - throw new EntityTooLargeException(req.ip(), req.userAgent(), req.url(), random.nextInt()); - } - byte[] bytes = - IOUtils.toByteArray( - new BoundedInputStream(req.raw().getInputStream(), config.getMaximumUploadSize() + 1L)); - if (bytes.length > config.getMaximumUploadSize()) { - throw new EntityTooLargeException(req.ip(), req.userAgent(), req.url(), random.nextInt()); - } - - return new String(bytes, Charset.defaultCharset()); - } - - @SuppressWarnings("squid:S1172") // needed for compilation - public void handleRuntimeException(Exception ex, Request req, Response res) { - LOGGER.debug("Exception occurred", ex); - res.status(404); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body(getJson(ImmutableMap.of(MESSAGE, "Could not find what you were looking for"))); - } - - @SuppressWarnings("squid:S1172") // needed for compilation - public void handleEntityTooLargeException(Exception ex, Request req, Response res) { - LOGGER.info( - "User uploaded object greater than maximum size ({} bytes). If this is a valid request then you may consider increasing the maximum allowed request size under: /admin/index.html > Search UI > Catalog UI Search > Maximum Endpoint Upload Size. Please consider the constraints of system memory before adjusting this value. It is roughly 3 * (max number concurrent system users) * (maximum endpoint upload bytes size) just for this endpoint, not considering the rest of the system. ", - config.getMaximumUploadSize(), - ex); - String errorId = null; - if (ex instanceof EntityTooLargeException) { - errorId = ((EntityTooLargeException) ex).getStringId(); - } - res.status(413); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body( - getJson( - ImmutableMap.of( - MESSAGE, - "The data sent was too large. Please contact your Systems Administrator. Error Code: " - + errorId))); - } - - @SuppressWarnings("squid:S1172") // needed for compilation - public void handleIOException(Exception ex, Request req, Response res) { - LOGGER.debug("Exception occurred", ex); - res.status(500); - res.header(CONTENT_TYPE, APPLICATION_JSON); - res.body( - getJson( - ImmutableMap.of( - MESSAGE, - "Something went wrong, please retry. If the problem persists please contact your Systems Administrator."))); - } - - public FilterBuilder getFilterBuilder() { - return filterBuilder; - } - - private static Result firstInWinsMerge(Result current, Result incoming) { - LOGGER.trace( - "While collecting metacards into map, there were metacards found with a duplicate key.\nOld: {}\nNew: {}", - LogSanitizer.sanitize(current), - LogSanitizer.sanitize(incoming)); - return current; - } - - /** - * Copy the attributes from a metacard to another metacard. - * - * @param sourceMetacard the source metacard - * @param metacardType copy all attributes represented by this metacard type - * @param destinationMetacard the destination metacard - */ - public void copyAttributes( - Metacard sourceMetacard, MetacardType metacardType, Metacard destinationMetacard) { - metacardType - .getAttributeDescriptors() - .stream() - .filter(descriptor -> sourceMetacard.getAttribute(descriptor.getName()) != null) - .map(descriptor -> copyAttribute(descriptor, sourceMetacard)) - .forEach(destinationMetacard::setAttribute); - } - - private Attribute copyAttribute(AttributeDescriptor attributeDescriptor, Metacard metacard) { - String name = attributeDescriptor.getName(); - if (attributeDescriptor.isMultiValued()) { - List values = new ArrayList<>(metacard.getAttribute(name).getValues()); - return new AttributeImpl(name, values); - } - return metacard.getAttribute(name); - } - - /** - * Find the workspace metacard based on the workspace identifier. If the workspsace cannot be - * found, then return null. - * - * @param workspaceId the workspace identifier - * @return workspace metacard - */ - public Metacard findWorkspace(String workspaceId) { - try { - return getMetacardById(workspaceId); - } catch (NotFoundException - | UnsupportedQueryException - | SourceUnavailableException - | FederationException e) { - return null; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validation/impl/violation/QueryValidationViolationImpl.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validation/impl/violation/QueryValidationViolationImpl.java deleted file mode 100644 index a8c4ff6279b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validation/impl/violation/QueryValidationViolationImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validation.impl.violation; - -import java.util.Map; -import java.util.Objects; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation; - -public class QueryValidationViolationImpl implements QueryValidationViolation { - - private Severity severity; - - private String message; - - private Map extraData; - - public QueryValidationViolationImpl( - final Severity severity, final String message, final Map extraData) { - this.severity = severity; - this.message = message; - this.extraData = extraData; - } - - @Override - public Severity getSeverity() { - return severity; - } - - @Override - public String getMessage() { - return message; - } - - @Override - public Map getExtraData() { - return extraData; - } - - @Override - public String toString() { - return "QueryValidationViolationImpl{" - + "severity=" - + severity - + ", message='" - + message - + '\'' - + ", extraData=" - + extraData - + '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QueryValidationViolationImpl that = (QueryValidationViolationImpl) o; - return severity == that.severity - && Objects.equals(message, that.message) - && Objects.equals(extraData, that.extraData); - } - - @Override - public int hashCode() { - return Objects.hash(severity, message, extraData); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/AttributeExtractor.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/AttributeExtractor.java deleted file mode 100644 index ddee4251e94..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/AttributeExtractor.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validator.query.unsupportedattributes; - -import ddf.catalog.filter.FilterAdapter; -import ddf.catalog.filter.impl.SimpleFilterDelegate; -import ddf.catalog.source.UnsupportedQueryException; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.opengis.filter.Filter; - -public class AttributeExtractor { - - private FilterAdapter filterAdapter; - - public AttributeExtractor(FilterAdapter filterAdapter) { - this.filterAdapter = filterAdapter; - } - - public Set extractAttributes(Filter filter) throws UnsupportedQueryException { - AttributeFilterDelegate filterDelegate = new AttributeFilterDelegate(); - filterAdapter.adapt(filter, filterDelegate); - return filterDelegate.getAttributes(); - } - - private class AttributeFilterDelegate extends SimpleFilterDelegate { - - private Set attributesInFilter = new HashSet<>(); - - @Override - public Boolean defaultOperation( - Object property, S literal, Class literalClass, Enum operation) { - return Boolean.TRUE; - } - - @Override - public Boolean comparisonOperation( - String propertyName, - S literal, - Class literalClass, - ComparisonPropertyOperation comparisonPropertyOperation) { - attributesInFilter.add(propertyName); - return Boolean.TRUE; - } - - @Override - public Boolean spatialOperation( - String propertyName, - S wkt, - Class wktClass, - SpatialPropertyOperation spatialPropertyOperation) { - attributesInFilter.add(propertyName); - return Boolean.TRUE; - } - - @Override - public Boolean temporalOperation( - String propertyName, - S literal, - Class literalClass, - TemporalPropertyOperation temporalPropertyOperation) { - attributesInFilter.add(propertyName); - return Boolean.TRUE; - } - - @Override - public Boolean and(List operands) { - return Boolean.TRUE; - } - - @Override - public Boolean or(List operands) { - return Boolean.TRUE; - } - - @Override - public Boolean not(Boolean operand) { - return Boolean.TRUE; - } - - public Set getAttributes() { - return this.attributesInFilter; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/MessageFormatSupplier.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/MessageFormatSupplier.java deleted file mode 100644 index 5fcba1db6a6..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/MessageFormatSupplier.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validator.query.unsupportedattributes; - -import ddf.platform.resource.bundle.locator.ResourceBundleLocator; -import java.io.IOException; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.function.Supplier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class MessageFormatSupplier implements Supplier { - - private static final Logger LOGGER = LoggerFactory.getLogger(MessageFormatSupplier.class); - - private static final String INTRIGUE_BASE_NAME = "IntrigueBundle"; - - private static final String DEFAULT_MESSAGE_FORMAT = - "The field \"{attribute}\" is not supported by the {sources} Source(s)"; - - private ResourceBundleLocator resourceBundleLocator; - - public MessageFormatSupplier(ResourceBundleLocator resourceBundleLocator) { - this.resourceBundleLocator = resourceBundleLocator; - } - - @Override - public String get() { - return AccessController.doPrivileged( - (PrivilegedAction) - () -> { - try { - return resourceBundleLocator - .getBundle(INTRIGUE_BASE_NAME) - .getString("validation.attribute.unsupported"); - } catch (IOException e) { - LOGGER.debug( - "Failed getting {} resource bundle, using default \"{}\"", - INTRIGUE_BASE_NAME, - DEFAULT_MESSAGE_FORMAT); - return DEFAULT_MESSAGE_FORMAT; - } - }); - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/UnsupportedAttributeQueryValidator.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/UnsupportedAttributeQueryValidator.java deleted file mode 100644 index 379a93e4773..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/UnsupportedAttributeQueryValidator.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validator.query.unsupportedattributes; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.source.SourceAttributeRestriction; -import ddf.catalog.source.UnsupportedQueryException; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Supplier; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.validation.QueryValidator; -import org.codice.ddf.catalog.ui.validation.impl.violation.QueryValidationViolationImpl; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation.Severity; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UnsupportedAttributeQueryValidator implements QueryValidator { - - private static final Logger LOGGER = - LoggerFactory.getLogger(UnsupportedAttributeQueryValidator.class); - - private AttributeExtractor attributeExtractor; - - private Supplier messageFormatSupplier; - - private Map> sourceIdToSupportedAttributesMap = new ConcurrentHashMap<>(); - - public UnsupportedAttributeQueryValidator( - AttributeExtractor attributeExtractor, Supplier messageFormatSupplier) { - this.attributeExtractor = attributeExtractor; - this.messageFormatSupplier = messageFormatSupplier; - } - - @Override - public String getValidatorId() { - return "unsupportedAttribute"; - } - - @Override - public Set validate(QueryRequest request) { - Set queryAttributes = getAttributes(request); - Set sourceIds = - request.getSourceIds() != null ? request.getSourceIds() : Collections.emptySet(); - - return queryAttributes - .stream() - .map(attr -> getViolation(attr, sourceIds)) - .filter(Optional::isPresent) - .map(Optional::get) - .collect(Collectors.toSet()); - } - - private Set getAttributes(QueryRequest request) { - try { - return attributeExtractor.extractAttributes(request.getQuery()); - } catch (UnsupportedQueryException e) { - LOGGER.debug( - "Skipping validation: Failed to aggregate all attributes from query {}", - request.getQuery(), - e); - return Collections.emptySet(); - } - } - - private Optional getViolation(String attribute, Set sourceIds) { - Set sourcesThatDontSupportAttribute = new HashSet<>(); - for (String sourceId : sourceIds) { - if (!sourceIdToSupportedAttributesMap.containsKey(sourceId)) { - LOGGER.debug("Source {} supports querying by all attributes", sourceId); - continue; - } - Set supportedAttributes = sourceIdToSupportedAttributesMap.get(sourceId); - if (!supportedAttributes.contains(attribute)) { - LOGGER.debug( - "Source \"{}\" does not support querying by attribute {}", sourceId, attribute); - sourcesThatDontSupportAttribute.add(sourceId); - } else { - LOGGER.debug("Source \"{}\" supports querying by attribute {}", sourceId, attribute); - } - } - - if (sourcesThatDontSupportAttribute.isEmpty()) { - return Optional.empty(); - } - - return Optional.of( - new QueryValidationViolationImpl( - Severity.ERROR, - createMessage(attribute, sourcesThatDontSupportAttribute), - createExtras(attribute, sourcesThatDontSupportAttribute))); - } - - private Map createExtras(String invalidAttribute, Set sourceIds) { - return ImmutableMap.of("attribute", invalidAttribute, "sources", sourceIds); - } - - private String createMessage(String invalidAttribute, Set sourceIds) { - String messageFormat = messageFormatSupplier.get(); - return messageFormat - .replace("{attribute}", invalidAttribute) - .replace("{sources}", prettyPrintSources(sourceIds)); - } - - private String prettyPrintSources(Set sourceIds) { - List sourceIdsList = sourceIds.stream().sorted().collect(Collectors.toList()); - if (sourceIds.size() == 1) { - return sourceIdsList.get(0); - } else if (sourceIds.size() == 2) { - return String.format("%s and %s", sourceIdsList.get(0), sourceIdsList.get(1)); - } else { - String allSourcesExceptLast = - String.join(", ", sourceIdsList.subList(0, sourceIdsList.size() - 1)); - String lastSource = sourceIdsList.get(sourceIdsList.size() - 1); - return String.format("%s, and %s", allSourcesExceptLast, lastSource); - } - } - - /** - * Adds a new {@code SourceAttributeRestriction} to the {@code sourceIdToSupportedAttributesMap} - * map. Called by blueprint when a new {@code SourceAttributeRestriction} is registered as a - * service. - * - * @param sourceAttributeRestriction the new {@code SourceAttributeRestriction} to be registered. - */ - public void bind(SourceAttributeRestriction sourceAttributeRestriction) { - if (sourceAttributeRestriction != null) { - String sourceId = sourceAttributeRestriction.getSource().getId(); - LOGGER.trace("Binding new SourceAttributeRestriction instance with id {}", sourceId); - sourceIdToSupportedAttributesMap.put( - sourceId, sourceAttributeRestriction.getSupportedAttributes()); - } - } - - /** - * Removes an existing {@code SourceAttributeRestriction} from the {@code - * sourceIdToSupportedAttributesMap} map. Called by blueprint when an existing {@code - * SourceAttributeRestriction} service is removed. - * - * @param sourceAttributeRestriction the {@code SourceAttributeRestriction} to be removed from the - * collection. - */ - public void unbind(SourceAttributeRestriction sourceAttributeRestriction) { - if (sourceAttributeRestriction != null) { - String sourceId = sourceAttributeRestriction.getSource().getId(); - LOGGER.trace("Unbinding SourceAttributeRestriction instance with id {}", sourceId); - sourceIdToSupportedAttributesMap.remove(sourceId); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/ws/JsonRpc.java b/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/ws/JsonRpc.java deleted file mode 100644 index 01e9eea9c66..00000000000 --- a/ui-backend/catalog-ui-search/src/main/java/org/codice/ddf/catalog/ui/ws/JsonRpc.java +++ /dev/null @@ -1,246 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.ws; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.security.audit.SecurityLogger; -import java.io.IOException; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.BiFunction; -import java.util.function.Function; -import org.codice.ddf.security.servlet.web.socket.WebSocket; -import org.codice.ddf.security.servlet.web.socket.WebSocketAuthenticationException; -import org.codice.gsonsupport.GsonTypeAdapters.DateLongFormatTypeAdapter; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.eclipse.jetty.websocket.api.Session; - -// An implementation of http://www.jsonrpc.org/specification over websockets -public class JsonRpc implements WebSocket { - - public static final String VERSION = "2.0"; - - public static final int PARSE_ERROR = -32700; - public static final int INVALID_REQUEST = -32600; - public static final int METHOD_NOT_FOUND = -32601; - public static final int INVALID_PARAMS = 32602; - public static final int INTERNAL_ERROR = -32603; - public static final int NOT_LOGGED_IN_ERROR = -32000; - - private static final String JSON_RPC = "jsonrpc"; - private static final String METHOD = "method"; - private static final String ID = "id"; - - private static final int WS_MAX_TEXT_MSG_SIZE = 1_000_000; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .registerTypeAdapter(Date.class, new DateLongFormatTypeAdapter()) - .create(); - - private final Map methods; - - private SecurityLogger securityLogger; - - public JsonRpc(Map methods) { - this.methods = methods; - } - - public static Error error(int code, String message) { - return new Error(code, message); - } - - public static Error invalidParams(String message, Object params) { - return error(INVALID_PARAMS, String.format("Invalid parameters: %s", message), params); - } - - private static Error error(int code, String message, Object data) { - return new Error(code, message, data); - } - - private static Map response(Object id, Object value) { - Map response = new HashMap<>(); - response.put(JSON_RPC, VERSION); - response.put(ID, id); - if (value instanceof Error) { - response.put("error", value); - } else { - response.put("result", value); - } - return response; - } - - private static Error invalid(String message) { - return invalid(message, null); - } - - private static Error invalid(String message, Object data) { - return error(INVALID_REQUEST, String.format("Invalid Request: %s", message), data); - } - - @Override - public void onOpen(Session session) { - session.getPolicy().setMaxTextMessageSize(WS_MAX_TEXT_MSG_SIZE); - } - - @Override - public void onClose(Session session, int statusCode, String reason) { - // no action required on close - } - - @Override - public void onError(Session session, Throwable ex) { - if (ex instanceof WebSocketAuthenticationException) { - securityLogger.audit("Received WebSockets request for user that is not logged in."); - handleMessage( - session, - ((WebSocketAuthenticationException) ex).getWsMessage(), - (message, id) -> error(NOT_LOGGED_IN_ERROR, ex.getMessage())); - } else { - // no action required - } - } - - @Override - public void onMessage(Session session, String message) throws IOException { - handleMessage(session, message, this::callMethod); - } - - private void handleMessage( - Session session, String message, BiFunction handleFunc) { - Object id; - Object result; - - try { - Map messageMap = parseMessage(message); - id = parseId(messageMap); - validateJsonRpcVersion(messageMap, id); - result = handleFunc.apply(messageMap, id); - } catch (JsonRpcException exception) { - id = exception.messageId; - result = exception.error; - } - - session.getRemote().sendStringByFuture(GSON.toJson(response(id, result))); - } - - private Map parseMessage(String message) throws JsonRpcException { - Map parsed; - - try { - parsed = GSON.fromJson(message, Map.class); - } catch (RuntimeException ex) { - throw new JsonRpcException(null, error(PARSE_ERROR, "Parse error", message)); - } - - return parsed; - } - - private Object parseId(Map message) throws JsonRpcException { - if (!message.containsKey(ID)) { - throw new JsonRpcException(null, invalid(String.format("required key `%s` missing", ID))); - } - - Object id = message.get(ID); - - if (!(id instanceof String || id instanceof Number || id == null)) { - throw new JsonRpcException( - null, invalid(String.format("key `%s` not string or number or null", ID), id)); - } else { - return id; - } - } - - private void validateJsonRpcVersion(Map message, Object id) throws JsonRpcException { - if (!message.containsKey(JSON_RPC)) { - throw new JsonRpcException(id, invalid(String.format("required key `%s` missing", JSON_RPC))); - } - - if (!VERSION.equals(message.get(JSON_RPC))) { - throw new JsonRpcException( - id, - invalid( - String.format("key `%s` not equal to `%s`", JSON_RPC, VERSION), - message.get(JSON_RPC))); - } - } - - private Object callMethod(Map message, Object id) throws JsonRpcException { - if (!message.containsKey(METHOD)) { - throw new JsonRpcException(id, invalid(String.format("required key `%s` missing", METHOD))); - } - - if (!(message.get(METHOD) instanceof String)) { - throw new JsonRpcException( - id, invalid(String.format("key `%s` not string", METHOD), message.get(METHOD))); - } - - String method = (String) message.get(METHOD); - - if (!methods.containsKey(method)) { - throw new JsonRpcException( - id, error(METHOD_NOT_FOUND, String.format("method `%s` not found", method))); - } - - Object params = message.get("params"); - - if (params != null && !(params instanceof List || params instanceof Map)) { - throw new JsonRpcException( - id, invalidParams("parameters must be a structured value", params)); - } - - try { - return methods.get(method).apply(params); - } catch (RuntimeException e) { - throw new JsonRpcException(id, error(INTERNAL_ERROR, "Internal Error")); - } - } - - public void setSecurityLogger(SecurityLogger securityLogger) { - this.securityLogger = securityLogger; - } - - private static class JsonRpcException extends RuntimeException { - private final Object messageId; - private final Error error; - - private JsonRpcException(Object messageId, Error error) { - this.messageId = messageId; - this.error = error; - } - } - - private static class Error { - private final int code; - private final String message; - private final Object data; - private Object id; - - private Error(int code, String message) { - this(code, message, null); - } - - private Error(int code, String message, Object data) { - this.code = code; - this.message = message; - this.data = data; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/main/resources/META-INF/services/org.geotools.filter.FunctionFactory b/ui-backend/catalog-ui-search/src/main/resources/META-INF/services/org.geotools.filter.FunctionFactory deleted file mode 100644 index c47a2656bd0..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/META-INF/services/org.geotools.filter.FunctionFactory +++ /dev/null @@ -1 +0,0 @@ -ddf.catalog.impl.filter.GeoToolsFunctionFactory \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 962beee4e5d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,606 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/consumes.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/consumes.xml deleted file mode 100644 index 8d0078d17de..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/consumes.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/endpoints.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/endpoints.xml deleted file mode 100644 index 7a023b9a394..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/endpoints.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/provides.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/provides.xml deleted file mode 100644 index 90eb2430189..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/provides.xml +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/validation.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/validation.xml deleted file mode 100644 index ac177c858b6..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/validation.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.attribute.aliases.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.attribute.aliases.xml deleted file mode 100644 index 8dc133fdf6a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.attribute.aliases.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.attribute.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.attribute.xml deleted file mode 100644 index 9c8a624520b..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.attribute.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.email.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.email.xml deleted file mode 100644 index 53d8c988858..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.email.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.query.monitor.impl.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.query.monitor.impl.xml deleted file mode 100644 index 9259b48a983..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.query.monitor.impl.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.querymonitor.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.querymonitor.xml deleted file mode 100644 index 1366c71bb4a..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.querymonitor.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.security.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.security.xml deleted file mode 100644 index a9b7b82af9d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.security.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.theme.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.theme.xml deleted file mode 100644 index 6e43e851281..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.theme.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.transformer.blacklist.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.transformer.blacklist.xml deleted file mode 100644 index 9d3e6f26a46..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.transformer.blacklist.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.whitelist.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.whitelist.xml deleted file mode 100644 index 71c89435b95..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.whitelist.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.xml b/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.xml deleted file mode 100644 index 4f6814db471..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/metatype/org.codice.ddf.catalog.ui.xml +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/expr.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/expr.xsd deleted file mode 100644 index 262b14f0ec9..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/expr.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - Filter Encoding is an OGC Standard. - Copyright (c) 2010, 2014 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/filter.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/filter.xsd deleted file mode 100644 index 9c05f11e07d..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/filter.xsd +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - Filter Encoding is an OGC Standard. - Copyright (c) 2010, 2014 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/filterAll.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/filterAll.xsd deleted file mode 100644 index 929b2f2b0bd..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/filterAll.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - This XML Schema document includes and imports, directly or indirectly, - all the XML Schema defined by the Filter Encoding Standard. - - Filter Encoding is an OGC Standard. - Copyright (c) 2010, 2014 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/filterCapabilities.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/filterCapabilities.xsd deleted file mode 100644 index b948190f179..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/filterCapabilities.xsd +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - This XML Schema defines OGC query filter capabilities documents. - - Filter Encoding is an OGC Standard. - Copyright (c) 2010, 2014 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/ows19115subset.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/ows19115subset.xsd deleted file mode 100644 index ae702dba505..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/ows19115subset.xsd +++ /dev/null @@ -1,236 +0,0 @@ - - - - ows19115subset.xsd - This XML Schema Document encodes the parts of ISO 19115 used by the common "ServiceIdentification" and "ServiceProvider" sections of the GetCapabilities operation response, known as the service metadata XML document. The parts encoded here are the MD_Keywords, CI_ResponsibleParty, and related classes. The UML package prefixes were omitted from XML names, and the XML element names were all capitalized, for consistency with other OWS Schemas. This document also provides a simple coding of text in multiple languages, simplified from Annex J of ISO 19115. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - Text string with the language of the string identified as recommended in the XML 1.0 W3C Recommendation, section 2.12. - - - - - - - - - - - Title of this resource, normally used for display to a human. - - - - - - Brief narrative description of this resource, normally used for display to a human. - - - - - - - - Unordered list of one or more commonly used or formalised word(s) or phrase(s) used to describe the subject. When needed, the optional "type" can name the type of the associated list of keywords that shall all have the same type. Also when needed, the codeSpace attribute of that "type" can reference the type name authority and/or thesaurus. - If the xml:lang attribute is not included in a Keyword element, then no language is specified for that element unless specified by another means. All Keyword elements in the same Keywords element that share the same xml:lang attribute value represent different keywords in that language. - For OWS use, the optional thesaurusName element was omitted as being complex information that could be referenced by the codeSpace attribute of the Type element. - - - - - - - - - - Name or code with an (optional) authority. If the codeSpace attribute is present, its value shall reference a dictionary, thesaurus, or authority for the name or code, such as the organisation who assigned the value, or the dictionary from which it is taken. - Type copied from basicTypes.xsd of GML 3 with documentation edited, for possible use outside the ServiceIdentification section of a service metadata document. - - - - - - - - - - - Identification of, and means of communication with, person(s) responsible for the resource(s). - For OWS use in the ServiceProvider section of a service metadata document, the optional organizationName element was removed, since this type is always used with the ProviderName element which provides that information. The optional individualName element was made mandatory, since either the organizationName or individualName element is mandatory. The mandatory "role" element was changed to optional, since no clear use of this information is known in the ServiceProvider section. - - - - - - Identification of, and means of communication with, person responsible for the server. At least one of IndividualName, OrganisationName, or PositionName shall be included. - - - - - - - - - - - - - - Identification of, and means of communication with, person responsible for the server. - For OWS use in the ServiceProvider section of a service metadata document, the optional organizationName element was removed, since this type is always used with the ProviderName element which provides that information. The mandatory "role" element was changed to optional, since no clear use of this information is known in the ServiceProvider section. - - - - - - - - - - - - Name of the responsible person: surname, given name, title separated by a delimiter. - - - - - - Name of the responsible organization. - - - - - - Role or position of the responsible person. - - - - - - Function performed by the responsible party. Possible values of this Role shall include the values and the meanings listed in Subclause B.5.5 of ISO 19115:2003. - - - - - - Address of the responsible party. - - - - - - Information required to enable contact with the responsible person and/or organization. - For OWS use in the service metadata document, the optional hoursOfService and contactInstructions elements were retained, as possibly being useful in the ServiceProvider section. - - - - - Telephone numbers at which the organization or individual may be contacted. - - - - - Physical and email address at which the organization or individual may be contacted. - - - - - On-line information that can be used to contact the individual or organization. OWS specifics: The xlink:href attribute in the xlink:simpleAttrs attribute group shall be used to reference this resource. Whenever practical, the xlink:href attribute with type anyURI should be a URL from which more contact information can be electronically retrieved. The xlink:title attribute with type "string" can be used to name this set of information. The other attributes in the xlink:simpleAttrs attribute group should not be used. - - - - - Time period (including time zone) when individuals can contact the organization or individual. - - - - - Supplemental instructions on how or when to contact the individual or organization. - - - - - - - - Reference to on-line resource from which data can be obtained. - For OWS use in the service metadata document, the CI_OnlineResource class was XML encoded as the attributeGroup "xlink:simpleAttrs", as used in GML. - - - - - - - Telephone numbers for contacting the responsible individual or organization. - - - - - Telephone number by which individuals can speak to the responsible organization or individual. - - - - - Telephone number of a facsimile machine for the responsible -organization or individual. - - - - - - - - Location of the responsible individual or organization. - - - - - Address line for the location. - - - - - City of the location. - - - - - State or province of the location. - - - - - ZIP or other postal code. - - - - - Country of the physical address. - - - - - Address of the electronic mailbox of the responsible organization or individual. - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsAll.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsAll.xsd deleted file mode 100644 index a2fbd773b16..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsAll.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - owsAll.xsd - This XML Schema Document includes and imports, directly and indirectly, all the XML Schemas defined by the OWS Common Implemetation Specification. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsCommon.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsCommon.xsd deleted file mode 100644 index dedc7992718..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsCommon.xsd +++ /dev/null @@ -1,158 +0,0 @@ - - - - owsCommon.xsd - This XML Schema Document encodes various parameters and parameter types that can be used in OWS operation requests and responses. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - XML encoded identifier of a standard MIME type, possibly a parameterized MIME type. - - - - - - - - - Specification version for OWS operation. The string value shall contain one x.y.z "version" value (e.g., "2.1.3"). A version number shall contain three non-negative integers separated by decimal points, in the form "x.y.z". The integers y and z shall not exceed 99. Each version shall be for the Implementation Specification (document) and the associated XML Schemas to which requested operations will conform. An Implementation Specification version normally specifies XML Schemas against which an XML encoded operation response must conform and should be validated. See Version negotiation subclause for more information. - - - - - - - - - - - This element either references or contains more metadata about the element that includes this element. To reference metadata stored remotely, at least the xlinks:href attribute in xlink:simpleAttrs shall be included. Either at least one of the attributes in xlink:simpleAttrs or a substitute for the AbstractMetaData element shall be included, but not both. An Implementation Specification can restrict the contents of this element to always be a reference or always contain metadata. (Informative: This element was adapted from the metaDataProperty element in GML 3.0.) - - - - - - - Reference to metadata recorded elsewhere, either external to this XML document or within it. Whenever practical, the xlink:href attribute with type anyURI should include a URL from which this metadata can be electronically retrieved. - - - - - Optional reference to the aspect of the element which includes this "metadata" element that this metadata provides more information about. - - - - - - - Abstract element containing more metadata about the element that includes the containing "metadata" element. A specific server implementation, or an Implementation Specification, can define concrete elements in the AbstractMetaData substitution group. - - - - - - - - - XML encoded minimum rectangular bounding box (or region) parameter, surrounding all the associated data. - This type is adapted from the EnvelopeType of GML 3.1, with modified contents and documentation for encoding a MINIMUM size box SURROUNDING all associated data. - - - - - Position of the bounding box corner at which the value of each coordinate normally is the algebraic minimum within this bounding box. In some cases, this position is normally displayed at the top, such as the top left for some image coordinates. For more information, see Subclauses 10.2.5 and C.13. - - - - - Position of the bounding box corner at which the value of each coordinate normally is the algebraic maximum within this bounding box. In some cases, this position is normally displayed at the bottom, such as the bottom right for some image coordinates. For more information, see Subclauses 10.2.5 and C.13. - - - - - - Usually references the definition of a CRS, as specified in [OGC Topic 2]. Such a CRS definition can be XML encoded using the gml:CoordinateReferenceSystemType in [GML 3.1]. For well known references, it is not required that a CRS definition exist at the location the URI points to. If no anyURI value is included, the applicable CRS must be either: -a) Specified outside the bounding box, but inside a data structure that includes this bounding box, as specified for a specific OWS use of this bounding box type. -b) Fixed and specified in the Implementation Specification for a specific OWS use of the bounding box type. - - - - - The number of dimensions in this CRS (the length of a coordinate sequence in this use of the PositionType). This number is specified by the CRS definition, but can also be specified here. - - - - - - - Position instances hold the coordinates of a position in a coordinate reference system (CRS) referenced by the related "crs" attribute or elsewhere. For an angular coordinate axis that is physically continuous for multiple revolutions, but whose recorded values can be discontinuous, special conditions apply when the bounding box is continuous across the value discontinuity: -a) If the bounding box is continuous clear around this angular axis, then ordinate values of minus and plus infinity shall be used. -b) If the bounding box is continuous across the value discontinuity but is not continuous clear around this angular axis, then some non-normal value can be used if specified for a specific OWS use of the BoundingBoxType. For more information, see Subclauses 10.2.5 and C.13. - This type is adapted from DirectPositionType and doubleList of GML 3.1. The adaptations include omission of all the attributes, since the needed information is included in the BoundingBoxType. - - - - - - - - - XML encoded minimum rectangular bounding box (or region) parameter, surrounding all the associated data. This box is specialized for use with the 2D WGS 84 coordinate reference system with decimal values of longitude and latitude. - This type is adapted from the general BoundingBoxType, with modified contents and documentation for use with the 2D WGS 84 coordinate reference system. - - - - - - - Position of the bounding box corner at which the values of longitude and latitude normally are the algebraic minimums within this bounding box. For more information, see Subclauses 10.4.5 and C.13. - - - - - Position of the bounding box corner at which the values of longitude and latitude normally are the algebraic minimums within this bounding box. For more information, see Subclauses 10.4.5 and C.13. - - - - - - This attribute can be included when considered useful. When included, this attribute shall reference the 2D WGS 84 coordinate reference system with longitude before latitude and decimal values of longitude and latitude. - - - - - The number of dimensions in this CRS (the length of a coordinate sequence in this use of the PositionType). This number is specified by the CRS definition, but can also be specified here. - - - - - - - - - Two-dimensional position instances hold the longitude and latitude coordinates of a position in the 2D WGS 84 coordinate reference system. The longitude value shall be listed first, followed by the latitude value, both in decimal degrees. Latitude values shall range from -90 to +90 degrees, and longitude values shall normally range from -180 to +180 degrees. For the longitude axis, special conditions apply when the bounding box is continuous across the +/- 180 degrees meridian longitude value discontinuity: -a) If the bounding box is continuous clear around the Earth, then longitude values of minus and plus infinity shall be used. -b) If the bounding box is continuous across the value discontinuity but is not continuous clear around the Earth, then some non-normal value can be used if specified for a specific OWS use of the WGS84BoundingBoxType. For more information, see Subclauses 10.4.5 and C.13. - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsContents.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsContents.xsd deleted file mode 100644 index 5a1f47bd596..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsContents.xsd +++ /dev/null @@ -1,87 +0,0 @@ - - - - owsContents.xsd - This XML Schema Document encodes the typical Contents section of an OWS service metadata (Capabilities) document. This Schema can be built upon to define the Contents section for a specific OWS. If the ContentsBaseType in this XML Schema cannot be restricted and extended to define the Contents section for a specific OWS, all other relevant parts defined in owsContents.xsd shall be used by the "ContentsType" in the wxsContents.xsd prepared for the specific OWS. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - Contents of typical Contents section of an OWS service metadata (Capabilities) document. This type shall be extended and/or restricted if needed for specific OWS use to include the specific metadata needed. - - - - - Unordered set of summary descriptions for the datasets available from this OWS server. This set shall be included unless another source is referenced and all this metadata is available from that source. - - - - - Unordered set of references to other sources of metadata describing the coverage offerings available from this server. - - - - - - - - Reference to a source of metadata describing coverage offerings available from this server. This parameter can reference a catalogue server from which dataset metadata is available. This ability is expected to be used by servers with thousands or millions of datasets, for which searching a catalogue is more feasible than fetching a long Capabilities XML document. When no DatasetDescriptionSummaries are included, and one or more catalogue servers are referenced, this set of catalogues shall contain current metadata summaries for all the datasets currently available from this OWS server, with the metadata for each such dataset referencing this OWS server. - - - - - - - - Typical dataset metadata in typical Contents section of an OWS service metadata (Capabilities) document. This type shall be extended and/or restricted if needed for specific OWS use, to include the specific Dataset description metadata needed. - - - - - - - Unordered list of zero or more minimum bounding rectangles surrounding coverage data, using the WGS 84 CRS with decimal degrees and longitude before latitude. If no WGS 84 bounding box is recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall apply to this coverage. If WGS 84 bounding box(es) are recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall be ignored. For each lowest-level coverage in a hierarchy, at least one applicable WGS84BoundingBox shall be either recorded or inherited, to simplify searching for datasets that might overlap a specified region. If multiple WGS 84 bounding boxes are included, this shall be interpreted as the union of the areas of these bounding boxes. - - - - - Unambiguous identifier or name of this coverage, unique for this server. - - - - - Unordered list of zero or more minimum bounding rectangles surrounding coverage data, in AvailableCRSs. Zero or more BoundingBoxes are allowed in addition to one or more WGS84BoundingBoxes to allow more precise specification of the Dataset area in AvailableCRSs. These Bounding Boxes shall not use any CRS not listed as an AvailableCRS. However, an AvailableCRS can be listed without a corresponding Bounding Box. If no such bounding box is recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall apply to this coverage. If such bounding box(es) are recorded for a coverage, any such bounding boxes recorded for a higher level in a hierarchy of datasets shall be ignored. If multiple bounding boxes are included with the same CRS, this shall be interpreted as the union of the areas of these bounding boxes. - - - - - Optional unordered list of additional metadata about this dataset. A list of optional metadata elements for this dataset description could be specified in the Implementation Specification for this service. - - - - - Metadata describing zero or more unordered subsidiary datasets available from this server. - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsDataIdentification.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsDataIdentification.xsd deleted file mode 100644 index b28c4c3858e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsDataIdentification.xsd +++ /dev/null @@ -1,128 +0,0 @@ - - - - owsDataIdentification.xsd - This XML Schema Document encodes the parts of the MD_DataIdentification class of ISO 19115 (OGC Abstract Specification Topic 11) which are expected to be used for most datasets. This Schema also encodes the parts of this class that are expected to be useful for other metadata. Both may be used within the Contents section of OWS service metadata (Capabilities) documents. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - Human-readable descriptive information for the object it is included within. -This type shall be extended if needed for specific OWS use to include additional metadata for each type of information. This type shall not be restricted for a specific OWS to change the multiplicity (or optionality) of some elements. - If the xml:lang attribute is not included in a Title, Abstract or Keyword element, then no language is specified for that element unless specified by another means. All Title, Abstract and Keyword elements in the same Description that share the same xml:lang attribute value represent the description of the parent object in that language. Multiple Title or Abstract elements shall not exist in the same Description with the same xml:lang attribute value unless otherwise specified. - - - - - - - - - - - Basic metadata identifying and describing a set of data. - - - - - - - Optional unique identifier or name of this dataset. - - - - - Optional unordered list of additional metadata about this data(set). A list of optional metadata elements for this data identification could be specified in the Implementation Specification for this service. - - - - - - - - - - Extended metadata identifying and describing a set of data. This type shall be extended if needed for each specific OWS to include additional metadata for each type of dataset. If needed, this type should first be restricted for each specific OWS to change the multiplicity (or optionality) of some elements. - - - - - - - Unordered list of zero or more bounding boxes whose union describes the extent of this dataset. - - - - - Unordered list of zero or more references to data formats supported for server outputs. - - - - - Unordered list of zero or more available coordinate reference systems. - - - - - - - - - - Unique identifier or name of this dataset. - - - - - - Reference to a format in which this data can be encoded and transferred. More specific parameter names should be used by specific OWS specifications wherever applicable. More than one such parameter can be included for different purposes. - - - - - - - Coordinate reference system in which data from this data(set) or resource is available or supported. More specific parameter names should be used by specific OWS specifications wherever applicable. More than one such parameter can be included for different purposes. - - - - - - Access constraint applied to assure the protection of privacy or intellectual property, or any other restrictions on retrieving or using data from or otherwise using this server. The reserved value NONE (case insensitive) shall be used to mean no access constraints are imposed. - - - - - - Fees and terms for retrieving data from or otherwise using this server, including the monetary units as specified in ISO 4217. The reserved value NONE (case insensitive) shall be used to mean no fees or terms. - - - - - - Identifier of a language used by the data(set) contents. This language identifier shall be as specified in IETF RFC 4646. When this element is omitted, the language used is not identified. - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsDomainType.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsDomainType.xsd deleted file mode 100644 index c3006f37f26..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsDomainType.xsd +++ /dev/null @@ -1,280 +0,0 @@ - - - - owsDomainType.xsd - This XML Schema Document encodes the allowed values (or domain) of a quantity, often for an input or output parameter to an OWS. Such a parameter is sometimes called a variable, quantity, literal, or typed literal. Such a parameter can use one of many data types, including double, integer, boolean, string, or URI. The allowed values can also be encoded for a quantity that is not explicit or not transferred, but is constrained by a server implementation. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - Valid domain (or allowed set of values) of one quantity, with its name or identifier. - - - - - - Name or identifier of this quantity. - - - - - - - - - Valid domain (or allowed set of values) of one quantity, with needed metadata but without a quantity name or identifier. - - - - - - Optional default value for this quantity, which should be included when this quantity has a default value. - - - - - Meaning metadata should be referenced or included for each quantity. - - - - - This data type metadata should be referenced or included for each quantity. - - - - - Unit of measure, which should be included when this set of PossibleValues has units or a more complete reference system. - - - - - Optional unordered list of other metadata about this quantity. A list of required and optional other metadata elements for this quantity should be specified in the Implementation Specification for this service. - - - - - - - - Specifies the possible values of this quantity. - - - - - - - - - - - - Specifies that any value is allowed for this parameter. - - - - - - - Specifies that no values are allowed for this parameter or quantity. - - - - - - - Reference to externally specified list of all the valid values and/or ranges of values for this quantity. (Informative: This element was simplified from the metaDataProperty element in GML 3.0.) - - - - - - Human-readable name of the list of values provided by the referenced document. Can be empty string when this list has no name. - - - - - - - - - - - Indicates that this quantity has units or a reference system, and identifies the unit or reference system used by the AllowedValues or ValuesReference. - - - - - Identifier of unit of measure of this set of values. Should be included then this set of values has units (and not a more complete reference system). - - - - - Identifier of reference system used by this set of values. Should be included then this set of values has a reference system (not just units). - - - - - - - - - List of all the valid values and/or ranges of values for this quantity. For numeric quantities, signed values should be ordered from negative infinity to positive infinity. - - - - - - - - - - - - - - A single value, encoded as a string. This type can be used for one value, for a spacing between allowed values, or for the default value of a parameter. - - - - - - - - - The default value for a quantity for which multiple values are allowed. - - - - - - - - A range of values of a numeric parameter. This range can be continuous or discrete, defined by a fixed spacing between adjacent valid values. If the MinimumValue or MaximumValue is not included, there is no value limit in that direction. Inclusion of the specified minimum and maximum values in the range shall be defined by the rangeClosure. - - - - - - - Shall be included when the allowed values are NOT continuous in this range. Shall not be included when the allowed values are continuous in this range. - - - - - - Shall be included unless the default value applies. - - - - - - - Minimum value of this numeric parameter. - - - - - - Maximum value of this numeric parameter. - - - - - - The regular distance or spacing between the allowed values in a range. - - - - - - Specifies which of the minimum and maximum values are included in the range. Note that plus and minus infinity are considered closed bounds. - - - - - - The specified minimum and maximum values are included in this range. - - - - - The specified minimum and maximum values are NOT included in this range. - - - - - The specified minimum value is NOT included in this range, and the specified maximum value IS included in this range. - - - - - The specified minimum value IS included in this range, and the specified maximum value is NOT included in this range. - - - - - - - - - - References metadata about a quantity, and provides a name for this metadata. (Informative: This element was simplified from the metaDataProperty element in GML 3.0.) - - - - - Human-readable name of the metadata described by associated referenced document. - - - - - - - - - Reference to data or metadata recorded elsewhere, either external to this XML document or within it. Whenever practical, this attribute should be a URL from which this metadata can be electronically retrieved. Alternately, this attribute can reference a URN for well-known metadata. For example, such a URN could be a URN defined in the "ogc" URN namespace. - - - - - - Definition of the meaning or semantics of this set of values. This Meaning can provide more specific, complete, precise, machine accessible, and machine understandable semantics about this quantity, relative to other available semantic information. For example, other semantic information is often provided in "documentation" elements in XML Schemas or "description" elements in GML objects. - - - - - - Definition of the data type of this set of values. In this case, the xlink:href attribute can reference a URN for a well-known data type. For example, such a URN could be a data type identification URN defined in the "ogc" URN namespace. - - - - - - Definition of the reference system used by this set of values, including the unit of measure whenever applicable (as is normal). In this case, the xlink:href attribute can reference a URN for a well-known reference system, such as for a coordinate reference system (CRS). For example, such a URN could be a CRS identification URN defined in the "ogc" URN namespace. - - - - - - Definition of the unit of measure of this set of values. In this case, the xlink:href attribute can reference a URN for a well-known unit of measure (uom). For example, such a URN could be a UOM identification URN defined in the "ogc" URN namespace. - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsExceptionReport.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsExceptionReport.xsd deleted file mode 100644 index c6751f99eb4..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsExceptionReport.xsd +++ /dev/null @@ -1,77 +0,0 @@ - - - - owsExceptionReport.xsd - This XML Schema Document encodes the Exception Report response to all OWS operations. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - Report message returned to the client that requested any OWS operation when the server detects an error while processing that operation request. - - - - - - Unordered list of one or more Exception elements that each describes an error. These Exception elements shall be interpreted by clients as being independent of one another (not hierarchical). - - - - - - Specification version for OWS operation. The string value shall contain one x.y.z "version" value (e.g., "2.1.3"). A version number shall contain three non-negative integers separated by decimal points, in the form "x.y.z". The integers y and z shall not exceed 99. Each version shall be for the Implementation Specification (document) and the associated XML Schemas to which requested operations will conform. An Implementation Specification version normally specifies XML Schemas against which an XML encoded operation response must conform and should be validated. See Version negotiation subclause for more information. - - - - - - - - - - Identifier of the language used by all included exception text values. These language identifiers shall be as specified in IETF RFC 4646. When this attribute is omitted, the language used is not identified. - - - - - - - - - - An Exception element describes one detected error that a server chooses to convey to the client. - - - - - Ordered sequence of text strings that describe this specific exception or error. The contents of these strings are left open to definition by each server implementation. A server is strongly encouraged to include at least one ExceptionText value, to provide more information about the detected error than provided by the exceptionCode. When included, multiple ExceptionText values shall provide hierarchical information about one detected error, with the most significant information listed first. - - - - - - A code representing the type of this exception, which shall be selected from a set of exceptionCode values specified for the specific service operation and server. - - - - - When included, this locator shall indicate to the client where an exception was encountered in servicing the client's operation request. This locator should be included whenever meaningful information can be provided by the server. The contents of this locator will depend on the specific exceptionCode and OWS service, and shall be specified in the OWS Implementation Specification. - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsGetCapabilities.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsGetCapabilities.xsd deleted file mode 100644 index 4ab69a69099..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsGetCapabilities.xsd +++ /dev/null @@ -1,113 +0,0 @@ - - - - owsGetCapabilities.xsd - This XML Schema Document defines the GetCapabilities operation request and response XML elements and types, which are common to all OWSs. This XML Schema shall be edited by each OWS, for example, to specify a specific value for the "service" attribute. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - XML encoded GetCapabilities operation response. This document provides clients with service metadata about a specific service instance, usually including metadata about the tightly-coupled data served. If the server does not implement the updateSequence parameter, the server shall always return the complete Capabilities document, without the updateSequence parameter. When the server implements the updateSequence parameter and the GetCapabilities operation request included the updateSequence parameter with the current value, the server shall return this element with only the "version" and "updateSequence" attributes. Otherwise, all optional elements shall be included or not depending on the actual value of the Contents parameter in the GetCapabilities operation request. This base type shall be extended by each specific OWS to include the additional contents needed. - - - - - - - - - - Service metadata document version, having values that are "increased" whenever any change is made in service metadata document. Values are selected by each server, and are always opaque to clients. When not supported by server, server shall not return this attribute. - - - - - - - - - XML encoded GetCapabilities operation request. This operation allows clients to retrieve service metadata about a specific service instance. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. This base type shall be extended by each specific OWS to include the additional required "service" attribute, with the correct value for that OWS. - - - - - When omitted, server shall return latest supported version. - - - - - When omitted or not supported by server, server shall return complete service metadata (Capabilities) document. - - - - - When omitted or not supported by server, server shall return service metadata document using the MIME type "text/xml". - - - - - - When omitted or not supported by server, server shall return latest complete service metadata document. - - - - - - - - Service type identifier, where the string value is the OWS type abbreviation, such as "WMS" or "WFS". - - - - - - - Prioritized sequence of one or more specification versions accepted by client, with preferred versions listed first. See Version negotiation subclause for more information. - - - - - - - - - Unordered list of zero or more names of requested sections in complete service metadata document. Each Section value shall contain an allowed section name as specified by each OWS specification. See Sections parameter subclause for more information. - - - - - - - - - Service metadata document version, having values that are "increased" whenever any change is made in service metadata document. Values are selected by each server, and are always opaque to clients. See updateSequence parameter use subclause for more information. - - - - - - - Prioritized sequence of zero or more GetCapabilities operation response formats desired by client, with preferred formats listed first. Each response format shall be identified by its MIME type. See AcceptFormats parameter use subclause for more information. - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsGetResourceByID.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsGetResourceByID.xsd deleted file mode 100644 index 553601a44c1..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsGetResourceByID.xsd +++ /dev/null @@ -1,52 +0,0 @@ - - - - owsGetResourceByID.xsd - This XML Schema Document encodes the GetResourceByID operation request message. This typical operation is specified as a base for profiling in specific OWS specifications. For information on the allowed changes and limitations in such profiling, see Subclause 9.4.1 of the OWS Common specification. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - XML encoded GetResourceByID operation response. The complexType used by this element shall be specified by each specific OWS. - - - - - - - - Request to a service to perform the GetResourceByID operation. This operation allows a client to retrieve one or more identified resources, including datasets and resources that describe datasets or parameters. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. - - - - - Unordered list of zero or more resource identifiers. These identifiers can be listed in the Contents section of the service metadata (Capabilities) document. For more information on this parameter, see Subclause 9.4.2.1 of the OWS Common specification. - - - - - Optional reference to the data format to be used for response to this operation request. This element shall be included when multiple output formats are available for the selected resource(s), and the client desires a format other than the specified default, if any. - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsInputOutputData.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsInputOutputData.xsd deleted file mode 100644 index 7bdd52bf4ef..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsInputOutputData.xsd +++ /dev/null @@ -1,60 +0,0 @@ - - - - owsInputOutputData.xsd - This XML Schema Document specifies types and elements for input and output of operation data, allowing including multiple data items with each data item either included or referenced. The contents of each type and element specified here can be restricted and/or extended for each use in a specific OWS specification. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - Response from an OWS operation, allowing including multiple output data items with each item either included or referenced. This OperationResponse element, or an element using the ManifestType with a more specific element name, shall be used whenever applicable for responses from OWS operations. - This element is specified for use where the ManifestType contents are needed for an operation response, but the Manifest element name is not fully applicable. This element or the ManifestType shall be used instead of using the ows:ReferenceType proposed in OGC 04-105. - - - - - - Input data in a XML-encoded OWS operation request, allowing including multiple data items with each data item either included or referenced. This InputData element, or an element using the ManifestType with a more-specific element name (TBR), shall be used whenever applicable within XML-encoded OWS operation requests. - - - - - - - - Complete reference to a remote resource that needs to be retrieved from an OWS using an XML-encoded operation request. This element shall be used, within an InputData or Manifest element that is used for input data, when that input data needs to be retrieved from another web service using a XML-encoded OWS operation request. This element shall not be used for local payload input data or for requesting the resource from a web server using HTTP Get. - - - - - - - The XML-encoded operation request message to be sent to request this input data from another web server using HTTP Post. - - - - - Reference to the XML-encoded operation request message to be sent to request this input data from another web server using HTTP Post. The referenced message shall be attached to the same message (using the cid scheme), or be accessible using a URL. - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsManifest.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsManifest.xsd deleted file mode 100644 index d450db159cb..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsManifest.xsd +++ /dev/null @@ -1,125 +0,0 @@ - - - - owsManifest.xsd - This XML Schema Document specifies types and elements for document or resource references and for package manifests that contain multiple references. The contents of each type and element specified here can be restricted and/or extended for each use in a specific OWS specification. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - Base for a reference to a remote or local resource. - This type contains only a restricted and annotated set of the attributes from the xlink:simpleAttrs attributeGroup. - - - - - Reference to a remote resource or local payload. A remote resource is typically addressed by a URL. For a local payload (such as a multipart mime message), the xlink:href must start with the prefix cid:. - - - - - Reference to a resource that describes the role of this reference. When no value is supplied, no particular role value is to be inferred. - - - - - Although allowed, this attribute is not expected to be useful in this application of xlink:simpleAttrs. - - - - - Describes the meaning of the referenced resource in a human-readable fashion. - - - - - Although allowed, this attribute is not expected to be useful in this application of xlink:simpleAttrs. - - - - - Although allowed, this attribute is not expected to be useful in this application of xlink:simpleAttrs. - - - - - - - - - Complete reference to a remote or local resource, allowing including metadata about that resource. - - - - - - - Optional unique identifier of the referenced resource. - - - - - - The format of the referenced resource. This element is omitted when the mime type is indicated in the http header of the reference. - - - - - Optional unordered list of additional metadata about this resource. A list of optional metadata elements for this ReferenceType could be specified in the Implementation Specification for each use of this type in a specific OWS. - - - - - - - - - - - - - Logical group of one or more references to remote and/or local resources, allowing including metadata about that group. A Group can be used instead of a Manifest that can only contain one group. - - - - - - - - - - - - - - - Unordered list of one or more groups of references to remote and/or local resources. - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsOperationsMetadata.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsOperationsMetadata.xsd deleted file mode 100644 index 4861a90d7e8..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsOperationsMetadata.xsd +++ /dev/null @@ -1,141 +0,0 @@ - - - - owsOperationsMetadata.xsd - This XML Schema Document encodes the basic contents of the "OperationsMetadata" section of the GetCapabilities operation response, also known as the Capabilities XML document. - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - Metadata about the operations and related abilities specified by this service and implemented by this server, including the URLs for operation requests. The basic contents of this section shall be the same for all OWS types, but individual services can add elements and/or change the optionality of optional elements. - - - - - - Metadata for unordered list of all the (requests for) operations that this server interface implements. The list of required and optional operations implemented shall be specified in the Implementation Specification for this service. - - - - - Optional unordered list of parameter valid domains that each apply to one or more operations which this server interface implements. The list of required and optional parameter domain limitations shall be specified in the Implementation Specification for this service. - - - - - Optional unordered list of valid domain constraints on non-parameter quantities that each apply to this server. The list of required and optional constraints shall be specified in the Implementation Specification for this service. - - - - - - - - - - Individual software vendors and servers can use this element to provide metadata about any additional server abilities. - - - - - - Metadata for one operation that this server implements. - - - - - - Unordered list of Distributed Computing Platforms (DCPs) supported for this operation. At present, only the HTTP DCP is defined, so this element will appear only once. - - - - - Optional unordered list of parameter domains that each apply to this operation which this server implements. If one of these Parameter elements has the same "name" attribute as a Parameter element in the OperationsMetadata element, this Parameter element shall override the other one for this operation. The list of required and optional parameter domain limitations for this operation shall be specified in the Implementation Specification for this service. - - - - - Optional unordered list of valid domain constraints on non-parameter quantities that each apply to this operation. If one of these Constraint elements has the same "name" attribute as a Constraint element in the OperationsMetadata element, this Constraint element shall override the other one for this operation. The list of required and optional constraints for this operation shall be specified in the Implementation Specification for this service. - - - - - Optional unordered list of additional metadata about this operation and its' implementation. A list of required and optional metadata elements for this operation should be specified in the Implementation Specification for this service. (Informative: This metadata might specify the operation request parameters or provide the XML Schemas for the operation request.) - - - - - - Name or identifier of this operation (request) (for example, GetCapabilities). The list of required and optional operations implemented shall be specified in the Implementation Specification for this service. - - - - - - - - Information for one distributed Computing Platform (DCP) supported for this operation. At present, only the HTTP DCP is defined, so this element only includes the HTTP element. - - - - - - - - - - - - Connect point URLs for the HTTP Distributed Computing Platform (DCP). Normally, only one Get and/or one Post is included in this element. More than one Get and/or Post is allowed to support including alternative URLs for uses such as load balancing or backup. - - - - - - Connect point URL prefix and any constraints for the HTTP "Get" request method for this operation request. - - - - - Connect point URL and any constraints for the HTTP "Post" request method for this operation request. - - - - - - - - - Connect point URL and any constraints for this HTTP request method for this operation request. In the OnlineResourceType, the xlink:href attribute in the xlink:simpleAttrs attribute group shall be used to contain this URL. The other attributes in the xlink:simpleAttrs attribute group should not be used. - - - - - - - Optional unordered list of valid domain constraints on non-parameter quantities that each apply to this request method for this operation. If one of these Constraint elements has the same "name" attribute as a Constraint element in the OperationsMetadata or Operation element, this Constraint element shall override the other one for this operation. The list of required and optional constraints for this request method for this operation shall be specified in the Implementation Specification for this service. - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsServiceIdentification.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsServiceIdentification.xsd deleted file mode 100644 index c15fcfa4113..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsServiceIdentification.xsd +++ /dev/null @@ -1,61 +0,0 @@ - - - - owsServiceIdentification.xsd - This XML Schema Document encodes the common "ServiceIdentification" section of the GetCapabilities operation response, known as the Capabilities XML document. This section encodes the SV_ServiceIdentification class of ISO 19119 (OGC Abstract Specification Topic 12). - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - General metadata for this specific server. This XML Schema of this section shall be the same for all OWS. - - - - - - - - A service type name from a registry of services. For example, the values of the codeSpace URI and name and code string may be "OGC" and "catalogue." This type name is normally used for machine-to-machine communication. - - - - - Unordered list of one or more versions of this service type implemented by this server. This information is not adequate for version negotiation, and shall not be used for that purpose. - - - - - Unordered list of identifiers of Application Profiles that are implemented by this server. This element should be included for each specified application profile implemented by this server. The identifier value should be specified by each Application Profile. If this element is omitted, no meaning is implied. - - - - - If this element is omitted, no meaning is implied. - - - - - Unordered list of access constraints applied to assure the protection of privacy or intellectual property, and any other restrictions on retrieving or using data from or otherwise using this server. The reserved value NONE (case insensitive) shall be used to mean no access constraints are imposed. When this element is omitted, no meaning is implied. - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsServiceProvider.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/owsServiceProvider.xsd deleted file mode 100644 index bce3e64d009..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/owsServiceProvider.xsd +++ /dev/null @@ -1,48 +0,0 @@ - - - - owsServiceProvider.xsd - This XML Schema Document encodes the common "ServiceProvider" section of the GetCapabilities operation response, known as the Capabilities XML document. This section encodes the SV_ServiceProvider class of ISO 19119 (OGC Abstract Specification Topic 12). - - OWS is an OGC Standard. - Copyright (c) 2006,2010 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - Metadata about the organization that provides this specific service instance or server. - - - - - - A unique identifier for the service provider organization. - - - - - Reference to the most relevant web site of the service provider. - - - - - Information for contacting the service provider. The OnlineResource element within this ServiceContact element should not be used to reference a web site of the service provider. - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/query.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/query.xsd deleted file mode 100644 index b7c2588d8e4..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/query.xsd +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - Filter Encoding is an OGC Standard. - Copyright (c) 2010, 2014 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/sort.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/sort.xsd deleted file mode 100644 index 18c6322b213..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/sort.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Filter Encoding is an OGC Standard. - Copyright (c) 2010, 2014 Open Geospatial Consortium. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/xlink.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/xlink.xsd deleted file mode 100644 index f6e909e0c1e..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/xlink.xsd +++ /dev/null @@ -1,270 +0,0 @@ - - - - - This schema document provides attribute declarations and -attribute group, complex type and simple type definitions which can be used in -the construction of user schemas to define the structure of particular linking -constructs, e.g. - - - - - - - ... - - ... - - - ... -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Intended for use as the type of user-declared elements to make them - simple links. - - - - - - - - - - - - - - - - - - - - - - - - - Intended for use as the type of user-declared elements to make them - extended links. - Note that the elements referenced in the content model are all abstract. - The intention is that by simply declaring elements with these as their - substitutionGroup, all the right things will happen. - - - - - - - - - - - - - - xml:lang is not required, but provides much of the - motivation for title elements in addition to attributes, and so - is provided here for convenience. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - label is not required, but locators have no particular - XLink function if they are not labeled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - from and to have default behavior when values are missing - - - - - - - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-search/src/main/resources/schemas/xml.xsd b/ui-backend/catalog-ui-search/src/main/resources/schemas/xml.xsd deleted file mode 100644 index aea7d0db0a4..00000000000 --- a/ui-backend/catalog-ui-search/src/main/resources/schemas/xml.xsd +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - -
-

About the XML namespace

- -
-

- This schema document describes the XML namespace, in a form - suitable for import by other schema documents. -

-

- See - http://www.w3.org/XML/1998/namespace.html and - - http://www.w3.org/TR/REC-xml for information - about this namespace. -

-

- Note that local names in this namespace are intended to be - defined only by the World Wide Web Consortium or its subgroups. - The names currently defined in this namespace are listed below. - They should not be used with conflicting semantics by any Working - Group, specification, or document instance. -

-

- See further below in this document for more information about how to refer to this schema document from your own - XSD schema documents and about the - namespace-versioning policy governing this schema document. -

-
-
-
-
- - - - -
- -

lang (as an attribute name)

-

- denotes an attribute whose value - is a language code for the natural language of the content of - any element; its value is inherited. This name is reserved - by virtue of its definition in the XML specification.

- -
-
-

Notes

-

- Attempting to install the relevant ISO 2- and 3-letter - codes as the enumerated possible values is probably never - going to be a realistic possibility. -

-

- See BCP 47 at - http://www.rfc-editor.org/rfc/bcp/bcp47.txt - and the IANA language subtag registry at - - http://www.iana.org/assignments/language-subtag-registry - for further information. -

-

- The union allows for the 'un-declaration' of xml:lang with - the empty string. -

-
-
-
- - - - - - - - - -
- - - - -
- -

space (as an attribute name)

-

- denotes an attribute whose - value is a keyword indicating what whitespace processing - discipline is intended for the content of the element; its - value is inherited. This name is reserved by virtue of its - definition in the XML specification.

- -
-
-
- - - - - - -
- - - -
- -

base (as an attribute name)

-

- denotes an attribute whose value - provides a URI to be used as the base for interpreting any - relative URIs in the scope of the element on which it - appears; its value is inherited. This name is reserved - by virtue of its definition in the XML Base specification.

- -

- See http://www.w3.org/TR/xmlbase/ - for information about this attribute. -

-
-
-
-
- - - - -
- -

id (as an attribute name)

-

- denotes an attribute whose value - should be interpreted as if declared to be of type ID. - This name is reserved by virtue of its definition in the - xml:id specification.

- -

- See http://www.w3.org/TR/xml-id/ - for information about this attribute. -

-
-
-
-
- - - - - - - - - - -
- -

Father (in any context at all)

- -
-

- denotes Jon Bosak, the chair of - the original XML Working Group. This name is reserved by - the following decision of the W3C XML Plenary and - XML Coordination groups: -

-
-

- In appreciation for his vision, leadership and - dedication the W3C XML Plenary on this 10th day of - February, 2000, reserves for Jon Bosak in perpetuity - the XML name "xml:Father". -

-
-
-
-
-
- - - -
-

About this schema document

- -
-

- This schema defines attributes and an attribute group suitable - for use by schemas wishing to allow xml:base, - xml:lang, xml:space or - xml:id attributes on elements they define. -

-

- To enable this, such a schema must import this schema for - the XML namespace, e.g. as follows: -

-
-          <schema . . .>
-           . . .
-           <import namespace="http://www.w3.org/XML/1998/namespace"
-                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-     
-

- or -

-
-           <import namespace="http://www.w3.org/XML/1998/namespace"
-                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
-     
-

- Subsequently, qualified reference to any of the attributes or the - group defined below will have the desired effect, e.g. -

-
-          <type . . .>
-           . . .
-           <attributeGroup ref="xml:specialAttrs"/>
-     
-

- will define a type which will schema-validate an instance element - with any of those attributes. -

-
-
-
-
- - - -
-

Versioning policy for this schema document

-
-

- In keeping with the XML Schema WG's standard versioning - policy, this schema document will persist at - - http://www.w3.org/2009/01/xml.xsd. -

-

- At the date of issue it can also be found at - - http://www.w3.org/2001/xml.xsd. -

-

- The schema document at that URI may however change in the future, - in order to remain compatible with the latest version of XML - Schema itself, or with the XML namespace itself. In other words, - if the XML Schema or XML namespaces change, the version of this - document at - http://www.w3.org/2001/xml.xsd - - will change accordingly; the version at - - http://www.w3.org/2009/01/xml.xsd - - will not change. -

-

- Previous dated (and unchanging) versions of this schema - document are at: -

- -
-
-
-
- -
- diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/alias/AttributeAliasesImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/alias/AttributeAliasesImplTest.java deleted file mode 100644 index b876097a146..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/alias/AttributeAliasesImplTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.alias; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; - -import com.google.common.collect.ImmutableList; -import java.util.List; -import java.util.Map; -import org.junit.Before; -import org.junit.Test; - -public class AttributeAliasesImplTest { - - private static final List ALIAS_CONFIG = ImmutableList.of("a=b", "c=d"); - - private AttributeAliasesImpl attributeAliases; - - @Before - public void setup() { - attributeAliases = new AttributeAliasesImpl(); - attributeAliases.setAttributeAliases(ALIAS_CONFIG); - } - - @Test - public void testGetAlias() { - assertThat(attributeAliases.getAlias("a"), is("b")); - } - - @Test - public void testHasAlias() { - assertThat(attributeAliases.hasAlias("a"), is(true)); - assertThat(attributeAliases.hasAlias("z"), is(false)); - } - - @Test(expected = UnsupportedOperationException.class) - public void testGetAliasMapIsImmutable() { - Map aliasMap = attributeAliases.getAliasMap(); - aliasMap.put("y", "z"); - } - - @Test - public void testSetAttributeAliasesTrimsStrings() { - List untrimmedConfig = ImmutableList.of(" a = b "); - attributeAliases.setAttributeAliases(untrimmedConfig); - assertThat(attributeAliases.getAlias("a"), is("b")); - } - - @Test - public void testSetAttributeAliasesOnlySplitsOnFirstEqualsSign() { - List extraEqualsConfig = ImmutableList.of("a=b=c"); - attributeAliases.setAttributeAliases(extraEqualsConfig); - assertThat(attributeAliases.getAlias("a"), is("b=c")); - } - - @Test - public void testSetAttributeAliasesSkipsConfigsWithoutAtLeastOneEquals() { - List noEqualsConfig = ImmutableList.of("noequals"); - attributeAliases.setAttributeAliases(noEqualsConfig); - assertThat(attributeAliases.getAliasMap().size(), is(0)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/config/ConfigurationApplicationTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/config/ConfigurationApplicationTest.java deleted file mode 100644 index f28e6cc69a9..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/config/ConfigurationApplicationTest.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.config; - -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsMapContaining.hasEntry; -import static org.hamcrest.collection.IsMapContaining.hasKey; -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyInt; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import ddf.platform.resource.bundle.locator.ResourceBundleLocator; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.Map; -import java.util.ResourceBundle; -import java.util.Set; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.alias.AttributeAliases; -import org.codice.ddf.platform.util.uuidgenerator.UuidGenerator; -import org.codice.proxy.http.HttpProxyService; -import org.junit.Before; -import org.junit.Test; -import org.mockito.internal.util.collections.Sets; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -public class ConfigurationApplicationTest { - - private static final String PROXY_SERVER = "http://www.example.com/wms"; - - private static final String BUNDLE_SYMBOLIC_NAME = "mySymbolicName"; - - private ConfigurationApplication configurationApplication; - - private ResourceBundleLocator resourceBundleLocator; - - @Before - public void setUp() { - configurationApplication = - new ConfigurationApplication(mock(UuidGenerator.class), mock(AttributeAliases.class)); - resourceBundleLocator = mock(ResourceBundleLocator.class); - } - - @Test - public void testSetImageryProviders() throws Exception { - // Setup - HttpProxyService mockHttpProxyService = mock(HttpProxyService.class); - BundleContext mockBundleContext = mock(BundleContext.class); - Bundle mockBundle = mock(Bundle.class); - when(mockBundleContext.getBundle()).thenReturn(mockBundle); - when(mockBundle.getSymbolicName()).thenReturn(BUNDLE_SYMBOLIC_NAME); - when(mockHttpProxyService.start(anyString(), anyString(), anyInt())).thenReturn(PROXY_SERVER); - - configurationApplication.setHttpProxy(mockHttpProxyService); - configurationApplication.setImageryProviders( - IOUtils.toString(getClass().getResourceAsStream("/imagery-providers.json"))); - - // Verify - for (Map provider : configurationApplication.getImageryProviderUrlMaps()) { - assertTrue(provider.get(ConfigurationApplication.URL).toString().contains(PROXY_SERVER)); - } - } - - @Test - public void testSetTerrainProvider() throws Exception { - // Setup - HttpProxyService mockHttpProxyService = mock(HttpProxyService.class); - BundleContext mockBundleContext = mock(BundleContext.class); - Bundle mockBundle = mock(Bundle.class); - when(mockBundleContext.getBundle()).thenReturn(mockBundle); - when(mockBundle.getSymbolicName()).thenReturn(BUNDLE_SYMBOLIC_NAME); - when(mockHttpProxyService.start(anyString(), anyString(), anyInt())).thenReturn(PROXY_SERVER); - - configurationApplication.setHttpProxy(mockHttpProxyService); - configurationApplication.setTerrainProvider( - IOUtils.toString(getClass().getResourceAsStream("/terrain-provider.json"))); - - // Verify - assertTrue( - configurationApplication - .getProxiedTerrainProvider() - .get(ConfigurationApplication.URL) - .toString() - .contains(PROXY_SERVER)); - } - - @Test - public void testContentTypeMappings() throws Exception { - // Setup - configurationApplication.setTypeNameMapping( - Arrays.asList( - "foo=bar,foo=baz", - "foo=qux", - "alpha=beta, alpha = omega ", - "=,=,", - "bad,input", - "name=,=type") - .toArray(String[]::new)); - - // Verify - assertThat(configurationApplication.getTypeNameMapping().size(), is(2)); - assertThat( - configurationApplication.getTypeNameMapping(), - hasEntry("foo", Sets.newSet("bar", "baz", "qux"))); - assertThat( - configurationApplication.getTypeNameMapping(), - hasEntry("alpha", Sets.newSet("beta", "omega"))); - } - - @Test - public void testContentTypeMappingsList() throws Exception { - // Setup - configurationApplication.setTypeNameMapping( - Arrays.asList( - "foo=bar,foo=baz", - "foo=qux", - "alpha=beta, alpha = omega ", - "=,=,", - "bad,input", - "name=,=type")); - - // Verify - assertThat(configurationApplication.getTypeNameMapping().size(), is(2)); - assertThat( - configurationApplication.getTypeNameMapping(), - hasEntry("foo", Sets.newSet("bar", "baz", "qux"))); - assertThat( - configurationApplication.getTypeNameMapping(), - hasEntry("alpha", Sets.newSet("beta", "omega"))); - } - - @Test - public void testContentTypeMappingsListString() throws Exception { - // Setup - configurationApplication.setTypeNameMapping( - "foo=bar,foo=baz,foo=qux,alpha=beta, alpha = omega , =,=,bad,input,name=,=type"); - - // Verify - assertThat(configurationApplication.getTypeNameMapping().size(), is(2)); - assertThat( - configurationApplication.getTypeNameMapping(), - hasEntry("foo", Sets.newSet("bar", "baz", "qux"))); - assertThat( - configurationApplication.getTypeNameMapping(), - hasEntry("alpha", Sets.newSet("beta", "omega"))); - } - - @Test - public void testSetAttributeEnumMap() { - configurationApplication.setAttributeEnumMap( - Arrays.asList( - "", - "unrestrictedAttribute", - "restrictedAttributeWithEmptyEnum=", - "=blank,attribute,name", - " restrictedAttributeWithSpaces = list,of, possible ,values", - "restrictedAttributeWithDuplicates=duplicate, duplicate, values, values", - "duplicateAttribute=value1", - "duplicateAttribute=value2")); - Map> attributeEnumMap = configurationApplication.getAttributeEnumMap(); - - assertThat(configurationApplication.getEditorAttributes().size(), is(5)); - assertThat(attributeEnumMap.size(), is(3)); - assertThat(attributeEnumMap, not(hasKey("restrictedAttributeWithEmptyEnum"))); - assertThat(attributeEnumMap, not(hasKey(""))); - assertThat(attributeEnumMap.get("restrictedAttributeWithSpaces"), hasItem("possible")); - assertThat(attributeEnumMap.get("restrictedAttributeWithDuplicates").size(), is(2)); - assertThat(attributeEnumMap.get("duplicateAttribute").size(), is(2)); - } - - @Test - public void testSetRequiredAttributes() { - configurationApplication.setRequiredAttributes(Arrays.asList("", "attribute")); - Set requiredAttributes = configurationApplication.getRequiredAttributes(); - - assertThat(requiredAttributes.size(), is(1)); - assertThat(requiredAttributes, hasItem("attribute")); - } - - @Test - public void testGetDefaultKeywords() { - assertThat(configurationApplication.getI18n(), is(Collections.emptyMap())); - } - - @Test - public void testGetKeywords() throws IOException { - doReturn(ResourceBundle.getBundle("IntrigueBundle")) - .when(resourceBundleLocator) - .getBundle(any(String.class)); - configurationApplication.setI18n(resourceBundleLocator); - - Map keywords = configurationApplication.getI18n(); - - assertThat(keywords.size(), is(4)); - assertThat(keywords.get("Source"), is("Source")); - assertThat(keywords.get("source"), is("source")); - assertThat(keywords.get("Sources"), is("Sources")); - assertThat(keywords.get("sources"), is("sources")); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/FilterNodeAssertionSupport.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/FilterNodeAssertionSupport.java deleted file mode 100644 index 2cddaf0d997..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/FilterNodeAssertionSupport.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import static junit.framework.TestCase.assertTrue; -import static org.apache.commons.lang3.Validate.notNull; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsCollectionWithSize.hasSize; -import static org.hamcrest.core.Is.is; - -import java.io.Serializable; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.function.BiConsumer; -import java.util.function.Consumer; -import java.util.function.Function; -import javax.xml.bind.JAXBElement; -import net.opengis.filter.v_2_0.DistanceBufferType; -import net.opengis.filter.v_2_0.LiteralType; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; - -/** As more test cases are added, more support functions will be needed. */ -public class FilterNodeAssertionSupport { - private FilterNodeAssertionSupport() {} - - public static void assertParentNode( - FilterNode node, String expectedType, int expectedChildCount) { - assertParentNode(node, expectedType); - assertThat(node.getChildren(), hasSize(expectedChildCount)); - } - - public static void assertParentNode(FilterNode node, String expectedType) { - assertThat(node.getOperator(), is(expectedType)); - assertThat(node.getChildren(), notNullValue()); - assertThat(node.isLeaf(), is(false)); - } - - public static void assertLeafNode( - FilterNode node, - String expectedType, - String expectedProperty, - String expectedValue, - Double expectedDistance) { - assertThat(node.getOperator(), is(expectedType)); - assertThat(node.isLeaf(), is(true)); - - assertThat(node.getProperty(), is(expectedProperty)); - assertThat(node.getValue(), is(expectedValue)); - assertThat(node.getDistance(), is(expectedDistance)); - assertThat(node.isTemplated(), is(false)); - } - - public static void assertTemplatedNode( - FilterNode node, - String expectedType, - String expectedProperty, - String defaultValue, - String nodeId) { - assertThat(node.getOperator(), is(expectedType)); - assertThat(node.isLeaf(), is(true)); - - assertThat(node.getProperty(), is(expectedProperty)); - assertThat(node.getValue(), is(nullValue())); - assertThat(node.isTemplated(), is(true)); - - Map templateProps = node.getTemplateProperties(); - assertThat(templateProps.get("defaultValue"), is(defaultValue)); - assertThat(templateProps.get("nodeId"), is(nodeId)); - } - - @SuppressWarnings("unchecked" /* Casting since the data structure is known */) - private static void assertExpression( - List> elements, String property, Serializable value) { - JAXBElement propertyNode = (JAXBElement) elements.get(0); - JAXBElement valueNode = (JAXBElement) elements.get(1); - assertThat(propertyNode.getValue(), is(property)); - assertThat(valueNode.getValue().getContent(), hasItem(value)); - } - - @SuppressWarnings("unchecked" /* Casting since the data structure is known */) - private static void assertExpressionOrAny( - List objects, String property, Serializable value) { - JAXBElement propertyNode = (JAXBElement) objects.get(0); - JAXBElement valueNode = (JAXBElement) objects.get(1); - assertThat(propertyNode.getValue(), is(property)); - assertThat(valueNode.getValue().getContent(), hasItem(value)); - } - - /** - * Starting point for all JAXB structure validations using the fluent assertion API below. - * - * @param element root {@link JAXBElement} to validate. - * @return the next stage of validation options. - */ - public static JAXBValidationStarter forElement(JAXBElement element) { - return new JAXBValidationStarter(element); - } - - public static class JAXBValidationStarter { - private JAXBElement element; - - private JAXBValidationStarter(JAXBElement element) { - notNull(element); - this.element = element; - } - - /** - * Validate the current {@link JAXBElement}'s binding to a particular class. - * - * @param binding the class of object within the {@link JAXBElement}. - * @param type parameter corresponding to the binding class. - * @return assertion object used to take the next validation step. - */ - public final JAXBClassBindingAssertion withBinding(Class binding) { - return new JAXBClassBindingAssertion<>(binding, element); - } - } - - public static class JAXBClassBindingAssertion { - private final T elementValue; - - private Function> nextElement; - - @SuppressWarnings("unchecked" /* Assertions handle the check - if they pass, the value is T */) - private JAXBClassBindingAssertion(final Class binding, final JAXBElement element) { - notNull(binding); - notNull(element); - // Need to use assertTrue because assertThat cannot infer capture types on generic methods - assertTrue(binding.equals(element.getDeclaredType())); - assertTrue(binding.isInstance(element.getValue())); - this.elementValue = (T) element.getValue(); - } - - /** - * Specify an operation to perform on {@code T} that returns the next element in the JAXB data - * structure. - * - * @param nextElement mapping operation for data structure traversal. - * @return assertion object used to take the next validation step. - */ - public JAXBClassBindingAssertion forElement( - Function> nextElement) { - notNull(nextElement); - this.nextElement = nextElement; - return this; - } - - /** - * Validate the current {@link JAXBElement}'s binding to a particular class. - * - * @param binding the class of object within the {@link JAXBElement}. - * @param type parameter corresponding to the binding class. - * @return assertion object used to take the next validation step. - */ - public JAXBClassBindingAssertion withBinding(Class binding) { - notNull(nextElement); - return new JAXBClassBindingAssertion(binding, nextElement.apply(elementValue)); - } - - /** - * Begin data validation on a non-terminal elements. - * - * @param expressionMapper mapping operation for data structure traversal. - * @return assertion object used to take the next validation step. - */ - public JAXBCollectionAssertion withExpression( - Function>> expressionMapper) { - notNull(expressionMapper); - return new JAXBCollectionAssertion(expressionMapper.apply(elementValue)); - } - - /** - * Begin validation on terminal elements whose values conform to {@code List>}. - * - * @param expressionMapper mapping operation for data structure traversal. - * @return assertion object used to take the next validation step. - */ - public JAXBPropertyValueAssertion verifyExpression( - Function>> expressionMapper) { - return new JAXBPropertyValueAssertion( - (p, v) -> assertExpression(expressionMapper.apply(elementValue), p, v)); - } - - /** - * Begin validation on terminal elements whose values conform to {@code List}. - * - * @param expressionOrAnyMapper mapping operation for data structure traversal. - * @return assertion object used to take the next validation step. - */ - public JAXBPropertyValueAssertion verifyExpressionOrAny( - Function> expressionOrAnyMapper) { - return new JAXBPropertyValueAssertion( - (p, v) -> assertExpressionOrAny(expressionOrAnyMapper.apply(elementValue), p, v)); - } - - public JAXBPropertyValueDistanceAssertion verifyDistanceBuffer() { - assertThat(elementValue, instanceOf(DistanceBufferType.class)); - DistanceBufferType t = (DistanceBufferType) elementValue; - return new JAXBPropertyValueDistanceAssertion( - (p, v) -> assertExpressionOrAny(t.getExpressionOrAny(), p, v), - (d) -> assertThat(d, is(equalTo(t.getDistance().getValue())))); - } - } - - public static class JAXBPropertyValueAssertion { - private final BiConsumer assertion; - - private JAXBPropertyValueAssertion(BiConsumer assertion) { - this.assertion = assertion; - } - - /** - * Specify the data to test for. This is a terminal operation. - * - * @param property the expected value for the property field, also called the {@code - * }. - * @param value the expected value for the value field, also called the {@code }. - */ - public void withData(String property, Serializable value) { - assertion.accept(property, value); - } - } - - public static class JAXBPropertyValueDistanceAssertion extends JAXBPropertyValueAssertion { - private final Consumer distanceAssertion; - - private JAXBPropertyValueDistanceAssertion( - BiConsumer assertion, Consumer distanceAssertion) { - super(assertion); - this.distanceAssertion = distanceAssertion; - } - - public JAXBPropertyValueDistanceAssertion withDistance(Double distance) { - distanceAssertion.accept(distance); - return this; - } - } - - public static class JAXBCollectionAssertion { - private final List> elements; - - private JAXBCollectionAssertion(List> elements) { - this.elements = elements; - } - - /** - * Provide a set of assertions that define the collection of {@link JAXBElement}s. - * - *

The number of assertions provided should be equal to the number of {@link JAXBElement}s - * present in the list or the test will fail. The first assertion will be executed against the - * first {@link JAXBElement}, the second assertion against the 2nd element, and so on in this - * fashion. - * - * @param assertions set of assertions to map to the {@link JAXBElement}s. - */ - @SafeVarargs - public final void satisfies(Consumer>... assertions) { - List>> assertionsList = Arrays.asList(assertions); - assertThat(elements.size(), is(assertionsList.size())); - for (int i = 0; i < assertionsList.size(); i++) { - assertionsList.get(i).accept(elements.get(i)); - } - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/SearchFormsLoaderTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/SearchFormsLoaderTest.java deleted file mode 100644 index abd6107b9be..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/SearchFormsLoaderTest.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsCollectionWithSize.hasSize; -import static org.hamcrest.core.Is.is; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.when; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.Metacard; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.file.Paths; -import java.util.List; -import java.util.Optional; -import javax.xml.bind.JAXBException; -import org.codice.ddf.catalog.ui.forms.data.AttributeGroupMetacard; -import org.codice.ddf.catalog.ui.forms.data.QueryTemplateMetacard; -import org.codice.ddf.catalog.ui.forms.filter.FilterWriter; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.security.Security; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -@RunWith(MockitoJUnitRunner.class) -public class SearchFormsLoaderTest { - private @Mock CatalogFramework catalogFramework; - - private @Mock EndpointUtil endpointUtil; - - private @Mock AttributeRegistry registry; - - private @Mock Security security; - - private static final URL LOADER_RESOURCES_DIR = - SearchFormsLoaderTest.class.getResource("/forms/loader"); - - private static final String ROOT; - - static { - String filePath; - try { - filePath = Paths.get(LOADER_RESOURCES_DIR.toURI()).toFile().toString(); - } catch (URISyntaxException e) { - filePath = ""; - } - ROOT = filePath; - } - - private TemplateTransformer transformer; - - @Before - public void setUp() throws JAXBException { - when(registry.lookup(any())).thenReturn(Optional.empty()); - transformer = new TemplateTransformer(new FilterWriter(false), registry); - } - - @Test - public void testEmptyConfigurationDirectory() { - List metacards = - new SearchFormsLoader(catalogFramework, transformer, endpointUtil, security) - .retrieveSystemTemplateMetacards(); - expectedCounts(metacards, 0, 0, 0); - } - - @Test - public void testValidConfigurationWithFallbackValues() { - List metacards = - new SearchFormsLoader( - catalogFramework, transformer, endpointUtil, ROOT + "/valid", null, null, security) - .retrieveSystemTemplateMetacards(); - expectedCounts(metacards, 3, 2, 1); - } - - @Test - public void testValidConfigurationWithExplicitValues() { - List metacards = - new SearchFormsLoader( - catalogFramework, - transformer, - endpointUtil, - ROOT + "/valid", - "forms.json", - "results.json", - security) - .retrieveSystemTemplateMetacards(); - expectedCounts(metacards, 3, 2, 1); - } - - @Test - public void testMissingXmlLinksExplicitValues() { - List metacards = - new SearchFormsLoader( - catalogFramework, - transformer, - endpointUtil, - ROOT + "/missing", - "forms.json", - "results.json", - security) - .retrieveSystemTemplateMetacards(); - expectedCounts(metacards, 1, 0, 1); - } - - @Test - public void testInvalidStructureFallbackValues() { - List metacards = - new SearchFormsLoader( - catalogFramework, - transformer, - endpointUtil, - ROOT + "/invalid-structure", - null, - null, - security) - .retrieveSystemTemplateMetacards(); - expectedCounts(metacards, 1, 0, 1); - } - - @Test - public void testInvalidEntriesFallbackValues() { - List metacards = - new SearchFormsLoader( - catalogFramework, - transformer, - endpointUtil, - ROOT + "/invalid-entries", - null, - null, - security) - .retrieveSystemTemplateMetacards(); - expectedCounts(metacards, 4, 1, 3); - } - - private static void expectedCounts( - List metacards, int total, int queryTemplates, int resultTemplates) { - assertThat( - "Expected total number of generated metacards to be " + total, metacards, hasSize(total)); - assertThat( - "Expected number of generated query template metacards to be " + queryTemplates, - metacards.stream().filter(QueryTemplateMetacard::isQueryTemplateMetacard).count(), - is((long) queryTemplates)); - assertThat( - "Expected number of generated result template metacards to be " + resultTemplates, - metacards.stream().filter(AttributeGroupMetacard::isAttributeGroupMetacard).count(), - is((long) resultTemplates)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/SearchFormsSymbolsIT.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/SearchFormsSymbolsIT.java deleted file mode 100644 index 811ebebd17d..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/SearchFormsSymbolsIT.java +++ /dev/null @@ -1,384 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import static java.lang.String.format; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.reset; -import static org.mockito.Mockito.when; -import static spark.Spark.stop; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.ResultImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.proxy.builder.GeotoolsFilterBuilder; -import ddf.catalog.operation.CreateRequest; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.CreateResponseImpl; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.operation.impl.QueryResponseImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.security.Subject; -import io.restassured.RestAssured; -import io.restassured.http.Header; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.StringWriter; -import java.net.ServerSocket; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.time.Instant; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Nullable; -import javax.xml.bind.JAXBException; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.text.StrSubstitutor; -import org.codice.ddf.catalog.ui.config.ConfigurationApplication; -import org.codice.ddf.catalog.ui.forms.data.QueryTemplateMetacard; -import org.codice.ddf.catalog.ui.forms.filter.FilterWriter; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.mockito.ArgumentCaptor; -import org.opengis.filter.Filter; -import spark.Spark; - -/** - * Spin up the {@link SearchFormsApplication} spark application and verify the REST contract against - * a mocked {@link CatalogFramework}. - * - *

This test suite uses HTTP to verify one of the data contracts for catalog-ui-search. By - * testing the network directly, the tests remain stable regardless of the JSON solution used. - * - *

This particular test suite verifies both directions of JSON and XML transforms using - * parameterized REST messages that are interpolated with actual test values at runtime. The - * objective of this test suite is to ensure serialization can handle any special character. - */ -@RunWith(Parameterized.class) -public class SearchFormsSymbolsIT { - /** - * Set of symbols upon which to parameterize the tests; defined as they appear in a JSON document. - */ - @Parameterized.Parameters(name = "Verify search form REST I/O for symbol: {0}") - public static Iterable data() { - return Arrays.asList( - "'", "\\\"", "\\\\", ">", "<", "&", "{", "}", "[", "]", ":", ";", ",", ".", "?", "/", "|", - "-", "_", "+", "=", "*", "^", "%", "$", "#", "@", "!", "~", "`", "(", ")"); - } - - /** - * Not all JSON representations are communitively validatable against XML. This mapping is what - * all the tests use to ensure expected XML counterparts are built correctly. - */ - private static final Map JSON_TO_XML_SYMBOL_MAPPING = - ImmutableMap.of( - "\\\"", "\"", - "\\\\", "\\", - ">", ">", - "<", "<", - "&", "&"); - - private static final Header CONTENT_IS_JSON = new Header("Content-Type", "application/json"); - - private static final String TEMPLATE_FORM_METACARD_JSON_SIMPLE = - getContentsOfFile("/forms/app/form-simple.json"); - - private static final String TEMPLATE_FORM_METACARD_JSON_SIMPLE_RESPONSE = - removePrettyPrintingOnJson(getContentsOfFile("/forms/app/form-simple-response.json")); - - private static final String TEMPLATE_FORM_FILTER_XML_SIMPLE = - removePrettyPrintingOnXml(getContentsOfFile("/forms/app/form-filter-simple.xml")); - - private static final String MSG_COULD_NOT_LOAD = "Could not load test resource"; - - private static final String CANNED_TITLE = "MY_TITLE"; - - private static final String CANNED_DESCRIPTION = "MY_DESCRIPTION"; - - private static final String CANNED_ID = "abcdefg"; - - private static final String CANNED_ISO_DATE = "2018-12-10T13:09:40Z"; - - private static final FilterBuilder FILTER_BUILDER = new GeotoolsFilterBuilder(); - - private static final CatalogFramework MOCK_FRAMEWORK = mock(CatalogFramework.class); - - private static final Subject MOCK_SUBJECT = mock(Subject.class); - - private static final ConfigurationApplication MOCK_CONFIG = mock(ConfigurationApplication.class); - - private static final TemplateTransformer TRANSFORMER = - new TemplateTransformer(getWriter(), getRegistry()); - - private static final EndpointUtil UTIL = - new EndpointUtil( - null, // No interaction - MOCK_FRAMEWORK, - FILTER_BUILDER, - null, // No interaction - null, // No interaction - null, // No interaction - MOCK_CONFIG); - - private static final SearchFormsApplication APPLICATION = - new SearchFormsApplication( - MOCK_FRAMEWORK, FILTER_BUILDER, TRANSFORMER, UTIL, () -> MOCK_SUBJECT); - - // Will be initialized by setUpClass() when the port is known - private static String localhostFormsUrl = null; - - private final ArgumentCaptor requestCaptor; - - private final String formFilterXml; - - private final String formRequestJson; - - private final String formResponseJson; - - // Ctor necessary for parameterization - public SearchFormsSymbolsIT(String symbolUnderTest) { - this.requestCaptor = ArgumentCaptor.forClass(CreateRequest.class); - StrSubstitutor substitutor = - new StrSubstitutor(ImmutableMap.of("value", "hello" + symbolUnderTest)); - - this.formRequestJson = substitutor.replace(TEMPLATE_FORM_METACARD_JSON_SIMPLE); - this.formResponseJson = substitutor.replace(TEMPLATE_FORM_METACARD_JSON_SIMPLE_RESPONSE); - - final String xmlVariation = JSON_TO_XML_SYMBOL_MAPPING.get(symbolUnderTest); - if (xmlVariation == null) { - this.formFilterXml = substitutor.replace(TEMPLATE_FORM_FILTER_XML_SIMPLE); - } else { - StrSubstitutor xmlSubstitutor = - new StrSubstitutor(ImmutableMap.of("value", "hello" + xmlVariation)); - this.formFilterXml = xmlSubstitutor.replace(TEMPLATE_FORM_FILTER_XML_SIMPLE); - } - } - - @BeforeClass - public static void setUpClass() { - Spark.port(getAvailablePort()); - APPLICATION.init(); - Spark.awaitInitialization(); - localhostFormsUrl = format("http://localhost:%d/forms/query", Spark.port()); - } - - @AfterClass - public static void tearDownClass() { - stop(); - } - - @Before - public void setUp() { - when(MOCK_CONFIG.getMaximumUploadSize()).thenReturn(1024); - } - - @After - public void tearDown() { - reset(MOCK_FRAMEWORK, MOCK_SUBJECT, MOCK_CONFIG); - } - - @Test - public void testJsonToXml() throws IngestException, SourceUnavailableException { - // Prepare - MetacardImpl metacardWithIdAndCreatedDate = new MetacardImpl(); - metacardWithIdAndCreatedDate.setId(CANNED_ID); - metacardWithIdAndCreatedDate.setCreatedDate(new Date()); - - doReturn( - new CreateResponseImpl( - new CreateRequestImpl(Collections.emptyList()), - Collections.emptyMap(), - Collections.singletonList(metacardWithIdAndCreatedDate))) - .when(MOCK_FRAMEWORK) - .create(requestCaptor.capture()); - - // Execute - int statusCode = - RestAssured.given() - .header(CONTENT_IS_JSON) - .content(formRequestJson) - .post(localhostFormsUrl) - .statusCode(); - assertThat(statusCode, is(200)); - assertThat(getCapturedXml(), is(formFilterXml)); - } - - @Test - public void testXmlToJson() - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - // Prepare - QueryTemplateMetacard queryTemplateMetacard = - new QueryTemplateMetacard(CANNED_TITLE, CANNED_DESCRIPTION, CANNED_ID); - queryTemplateMetacard.setFormsFilter(formFilterXml); - queryTemplateMetacard.setCreatedDate(Date.from(Instant.parse(CANNED_ISO_DATE))); - queryTemplateMetacard.setAttribute( - Core.METACARD_MODIFIED, Date.from(Instant.parse(CANNED_ISO_DATE))); - - QueryResponseImpl response = - new QueryResponseImpl(new QueryRequestImpl(new QueryImpl(Filter.INCLUDE))); - response.addResult(new ResultImpl(queryTemplateMetacard), true); - - doReturn(response).when(MOCK_FRAMEWORK).query(any()); - - // Execute - String json = - RestAssured.given().header(CONTENT_IS_JSON).get(localhostFormsUrl).body().asString(); - assertThat(json, is(formResponseJson)); - } - - private String getCapturedXml() { - Metacard searchForm = requestCaptor.getValue().getMetacards().get(0); - return ((QueryTemplateMetacard) searchForm).getFormsFilter(); - } - - /** - * Given a pretty JSON string, flatten out the string to enable string comparison operations - * regardless of formatting. - * - * @param json the input JSON string to flatten to a single line. - * @return a single line string of the given JSON. - */ - private static String removePrettyPrintingOnJson(String json) { - return json.replaceAll("\\h|\\v", ""); - } - - /** - * Given a pretty XML string, flatten out the string to enable string comparison operations - * regardless of formatting. - * - * @param xml the input XML string to flatten to a single line. - * @return a single line string of the given XML. - */ - private static String removePrettyPrintingOnXml(String xml) { - try { - TransformerFactory factory = TransformerFactory.newInstance(); - Source xslt = new StreamSource(getResourceFile("/forms/app/inline-xml.xslt")); - Transformer transformer = factory.newTransformer(xslt); - - Source text = new StreamSource(new ByteArrayInputStream(xml.getBytes())); - StringWriter destination = new StringWriter(); - - transformer.transform(text, new StreamResult(destination)); - - // Replace the header that the XSLT transform removed - return destination - .toString() - .replace( - "", - ""); - } catch (TransformerException e) { - throw new AssertionError("Could not remove pretty printing from XML, " + xml, e); - } - } - - private static FilterWriter getWriter() { - try { - return new FilterWriter(true); - } catch (JAXBException e) { - throw new AssertionError("Could not make filter writer, " + e.getMessage()); - } - } - - private static AttributeRegistry getRegistry() { - AttributeRegistry registry = mock(AttributeRegistry.class); - doReturn(Optional.empty()).when(registry).lookup(any()); - return registry; - } - - private static File getResourceFile(String resourceRoute) { - try { - URL url = SearchFormsSymbolsIT.class.getResource(resourceRoute); - if (url == null) { - throw new AssertionError(MSG_COULD_NOT_LOAD + ", the URL came back null"); - } - return new File(url.toURI()); - } catch (URISyntaxException e) { - throw new AssertionError(MSG_COULD_NOT_LOAD + ", URI syntax not valid", e); - } - } - - private static String getContentsOfFile(String resourceRoute) { - File resourceFile = getResourceFile(resourceRoute); - try (FileInputStream fis = new FileInputStream(resourceFile)) { - return IOUtils.toString(fis, StandardCharsets.UTF_8); - } catch (IOException e) { - throw new AssertionError("Could not complete test setup due to exception", e); - } - } - - /** - * Return an available port number after binding and releasing it. - * - *

The discovered port should be available for another client to bind to by the time this - * function has returned. Given this detail, running unit tests on environments that are in the - * process of being provisioned or are otherwise in a state of flux may cause erroneous failures - * due to port binding race conditions. - * - * @return a port number the caller can reasonably assume is available to bind to. - * @throws AssertionError if no port was available to bind to or the binding operation failed. - */ - private static int getAvailablePort() { - ServerSocket socket = null; - try { - socket = new ServerSocket(0); - return socket.getLocalPort(); - } catch (IOException e) { - throw new AssertionError("Could not autobind to available port", e); - } finally { - tryCloseSocket(socket); - } - } - - private static void tryCloseSocket(@Nullable ServerSocket socket) { - try { - if (socket != null) { - socket.close(); - } - } catch (IOException e) { - throw new AssertionError( - "Problem while enumerating ports (specifically, port " + socket.getLocalPort() + ")", e); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/TemplateTransformerTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/TemplateTransformerTest.java deleted file mode 100644 index b0af35d9b34..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/TemplateTransformerTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms; - -import com.google.common.collect.ImmutableMap; -import java.util.HashMap; -import org.junit.Test; - -public class TemplateTransformerTest { - - @Test(expected = IllegalArgumentException.class) - public void testTransformerErrorsWithoutTitle() { - TemplateTransformer transformer = new TemplateTransformer(null, null); - transformer.toQueryTemplateMetacard(ImmutableMap.of("filterTemplate", new HashMap<>())); - } - - @Test(expected = IllegalArgumentException.class) - public void testTransformerErrorsWithEmptyTitle() { - TemplateTransformer transformer = new TemplateTransformer(null, null); - transformer.toQueryTemplateMetacard( - ImmutableMap.of("filterTemplate", new HashMap<>(), "title", "")); - } - - @Test(expected = IllegalArgumentException.class) - public void testTransformerErrorsWithBlankTitle() { - TemplateTransformer transformer = new TemplateTransformer(null, null); - transformer.toQueryTemplateMetacard( - ImmutableMap.of("filterTemplate", new HashMap<>(), "title", " ")); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/api/FlatFilterBuilderTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/api/FlatFilterBuilderTest.java deleted file mode 100644 index b656efed138..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/api/FlatFilterBuilderTest.java +++ /dev/null @@ -1,245 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.api; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.AttributeRegistry; -import java.util.Arrays; -import java.util.Optional; -import java.util.function.Supplier; -import org.codice.ddf.catalog.ui.forms.builder.JsonModelBuilder; -import org.codice.ddf.catalog.ui.forms.builder.XmlModelBuilder; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -/** - * Conformance test suite for implementations of {@link - * org.codice.ddf.catalog.ui.forms.api.FlatFilterBuilder}s to ensure their states are being managed - * correctly. This test suite validates correct use, not necessarily expected results. - * - *

The below test names follow a simple convention: {@code (context) + (builder method) + - * (validation method or meaningful commentary)}. There are several contexts currently in use. - * - *

    - *
  1. Failure Condition - these map directly to the validation methods found in builder impls - *
  2. Input - ensure implementations validate input correctly, to the degree the contract states - *
  3. Awkward Case - misc tests that don't map to validation methods but are still useful, if not - * immediately obvious - *
- * - *

Most of the time, test names clearly define a mapping between builder function and the - * verification that occurs behind the scenes. Refer to the state checks found in the builder - * implementations. - */ -@RunWith(Parameterized.class) -public class FlatFilterBuilderTest { - private static JsonModelBuilder json() { - AttributeRegistry registry = mock(AttributeRegistry.class); - when(registry.lookup(any())).thenReturn(Optional.empty()); - return new JsonModelBuilder(registry); - } - - private static XmlModelBuilder xml() { - AttributeRegistry registry = mock(AttributeRegistry.class); - when(registry.lookup(any())).thenReturn(Optional.empty()); - return new XmlModelBuilder(registry); - } - - @Parameterized.Parameters(name = "FlatFilterBuilder impl {index}: {3}") - public static Iterable data() { - return Arrays.asList( - new Object[][] { - { - (Supplier) FlatFilterBuilderTest::json, - "And", - "PropertyIsEqualTo", - "JSON" - }, - {(Supplier) FlatFilterBuilderTest::xml, "AND", "=", "XML"} - }); - } - - private final Supplier builderSupplier; - - private final String logicalOp; - - private final String comparisonOp; - - private FlatFilterBuilder builder; - - public FlatFilterBuilderTest( - Supplier builderSupplier, - String logicalOp, - String comparisonOp, - // Label only used for identifying the parameterized run of the test - String label) { - this.builderSupplier = builderSupplier; - this.logicalOp = logicalOp; - this.comparisonOp = comparisonOp; - } - - @Before - public void setup() { - this.builder = builderSupplier.get(); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionBeginBinaryLogicTypeWhenResultNotYetRetrieved() { - setupDefaultTestValue(builder); - builder.beginBinaryLogicType(logicalOp); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionBeginBinaryLogicTypeWhenTerminalNodeNotInProgress() { - builder.beginBinaryComparisonType(comparisonOp).beginBinaryLogicType(logicalOp); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionEndBinaryLogicTypeWhenResultNotYetRetrieved() { - setupDefaultTestValue(builder); - builder.endBinaryLogicType(); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionEndBinaryLogicTypeWhenTerminalNodeNotInProgress() { - builder.beginBinaryComparisonType(comparisonOp).endBinaryLogicType(); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionEndBinaryLogicTypeWhenResultNotNull() { - builder.endBinaryLogicType(); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionBeginBinaryComparisonTypeWhenResultNotYetRetrieved() { - setupDefaultTestValue(builder); - builder.beginBinaryComparisonType(comparisonOp); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionBeginBinaryComparisonTypeWhenTerminalNodeNotInProgresss() { - builder - .beginBinaryComparisonType(comparisonOp) - .beginBinaryComparisonType("PropertyIsGreaterThan"); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionEndBinaryComparisonTypeWhenResultNotYetRetrieved() { - setupDefaultTestValue(builder); - builder.endTerminalType(); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionGetResultWhenTerminalNodeNotInProgress() { - builder.beginBinaryComparisonType(comparisonOp).getResult(); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionGetResultWhenResultNotNull() { - builder.getResult(); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionSetPropertyWhenResultNotYetRetrieved() { - setupDefaultTestValue(builder); - builder.setProperty("property"); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionSetPropertyWhenTerminalNodeInProgress() { - builder.setProperty("property"); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionSetValueWhenResultNotYetRetrieved() { - setupDefaultTestValue(builder); - builder.setValue("value"); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionSetValueWhenTerminalNodeInProgress() { - builder.setValue("value"); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionSetTemplatedValuesWhenResultNotYetRetrieved() { - setupDefaultTestValue(builder); - builder.setTemplatedValues( - ImmutableMap.of( - "defaultValue", "5", "nodeId", "id", "isVisible", true, "isReadOnly", false)); - } - - @Test(expected = IllegalStateException.class) - public void testFailureConditionSetTemplatedValuesWhenTerminalNodeInProgress() { - builder.setTemplatedValues( - ImmutableMap.of( - "defaultValue", "5", "nodeId", "id", "isVisible", true, "isReadOnly", false)); - } - - @Test(expected = IllegalArgumentException.class) - public void testInputBinaryLogicTypeBadOperator() { - builder.beginBinaryLogicType("bad"); - } - - @Test(expected = IllegalArgumentException.class) - public void testInputBinaryComparisonTypeBadOperator() { - builder.beginBinaryComparisonType("bad"); - } - - @Test(expected = IllegalStateException.class) - public void testAwkwardCaseEndTerminalTypeCalledTwiceIncorrectly() { - builder - .beginBinaryComparisonType(comparisonOp) - .setProperty("name") - .setValue("value") - .endTerminalType() - .endTerminalType(); - } - - @Test(expected = IllegalStateException.class) - public void testAwkwardCaseEndTerminalTypeCalledTwiceInLogicTypeIncorrectly() { - builder - .beginBinaryLogicType(logicalOp) - .beginBinaryComparisonType(comparisonOp) - .setProperty("name") - .setValue("value") - .endTerminalType() - .endTerminalType(); - } - - @Test(expected = IllegalStateException.class) - public void testAwkwardCaseEndBinaryLogicTypeWhenNothingInProgress() { - builder.endBinaryLogicType(); - } - - @Test(expected = IllegalStateException.class) - public void testAwkwardCaseEndBinaryLogicTypeWithoutAnyChildren() { - builder.beginBinaryLogicType(logicalOp).endBinaryLogicType(); - } - - private void setupDefaultTestValue(FlatFilterBuilder builder) { - builder - .beginBinaryComparisonType(comparisonOp) - .setProperty("name") - .setValue("value") - .endTerminalType() - .getResult(); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/AttributeValueNormalizerTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/AttributeValueNormalizerTest.java deleted file mode 100644 index 400d245c378..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/AttributeValueNormalizerTest.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.builder; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.nullValue; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import java.util.Optional; -import org.codice.ddf.catalog.ui.forms.filter.FilterProcessingException; -import org.junit.Before; -import org.junit.Test; - -public class AttributeValueNormalizerTest { - - private static final String PROPERTY_NAME = "anyText"; - - private static final String PROPERTY_NAME_WITH_QUOTES = "\"anyText\""; - - private static final String NON_DATE_INPUT = "hello"; - - private static final String VALID_ISO_8601_DATE_STRING = "2018-12-10T13:09:40Z"; - - private static final String VALID_ISO_8601_DATE_STRING_WITH_OFFSET = "2007-12-03T10:15:30+01:00"; - - private static final String VALID_MS_SINCE_EPOCH_DATE_STRING = "1544447380000"; - - private static final String VALID_MS_SINCE_EPOCH_DATE_STRING_WITH_OFFSET = "1196673330000"; - - private static final String VALID_RELATIVE_FUNCTION = "RELATIVE(P1D)"; - - private static final String INVALID_RELATIVE_FUNCTION = "RELATIVE()"; - - private static final AttributeDescriptor DATE_DESCRIPTOR = createDateDescriptor(); - - private AttributeValueNormalizer normalizer; - - private AttributeRegistry registry; - - @Before - public void setUp() { - registry = mock(AttributeRegistry.class); - when(registry.lookup(anyString())).thenReturn(Optional.empty()); - normalizer = new AttributeValueNormalizer(registry); - } - - @Test - public void testNullPropertyNullValueToJson() { - assertThat(normalizer.normalizeForJson(null, null), is(nullValue())); - } - - @Test - public void testNullPropertyNullValueToXml() { - assertThat(normalizer.normalizeForXml(null, null), is(nullValue())); - } - - @Test - public void testNonNullPropertyNullValueToJson() { - assertThat(normalizer.normalizeForJson(PROPERTY_NAME, null), is(nullValue())); - } - - @Test - public void testNonNullPropertyNullValueToXml() { - assertThat(normalizer.normalizeForXml(PROPERTY_NAME, null), is(nullValue())); - } - - @Test - public void testNullPropertyNonNullValueToJson() { - assertThat( - normalizer.normalizeForJson(null, VALID_MS_SINCE_EPOCH_DATE_STRING), - is(equalTo(VALID_MS_SINCE_EPOCH_DATE_STRING))); - } - - @Test - public void testNullPropertyNonNullValueToXml() { - assertThat( - normalizer.normalizeForXml(null, VALID_ISO_8601_DATE_STRING), - is(equalTo(VALID_ISO_8601_DATE_STRING))); - } - - @Test - public void testNonDateValueToJson() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.empty()); - assertThat( - normalizer.normalizeForJson(PROPERTY_NAME, NON_DATE_INPUT), is(equalTo(NON_DATE_INPUT))); - } - - @Test - public void testNonDateValueToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.empty()); - assertThat( - normalizer.normalizeForXml(PROPERTY_NAME, NON_DATE_INPUT), is(equalTo(NON_DATE_INPUT))); - } - - @Test - public void testEpochDateValueToJson() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForJson(PROPERTY_NAME, VALID_MS_SINCE_EPOCH_DATE_STRING), - is(equalTo(VALID_ISO_8601_DATE_STRING))); - } - - @Test - public void testIsoDateValueToJson() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForJson(PROPERTY_NAME, VALID_ISO_8601_DATE_STRING), - is(equalTo(VALID_ISO_8601_DATE_STRING))); - } - - @Test - public void testUnexpectedDateValueToJson() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForJson(PROPERTY_NAME, NON_DATE_INPUT), is(equalTo(NON_DATE_INPUT))); - } - - @Test - public void testEpochDateValueToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml(PROPERTY_NAME, VALID_MS_SINCE_EPOCH_DATE_STRING), - is(equalTo(VALID_MS_SINCE_EPOCH_DATE_STRING))); - } - - @Test - public void testIsoDateValueToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml(PROPERTY_NAME, VALID_ISO_8601_DATE_STRING), - is(equalTo(VALID_MS_SINCE_EPOCH_DATE_STRING))); - } - - @Test - public void testIsoDateWithOffsetValueToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml(PROPERTY_NAME, VALID_ISO_8601_DATE_STRING_WITH_OFFSET), - is(equalTo(VALID_MS_SINCE_EPOCH_DATE_STRING_WITH_OFFSET))); - } - - @Test - public void testBadPropertyNameToJson() { - when(registry.lookup(eq(PROPERTY_NAME_WITH_QUOTES))).thenReturn(Optional.empty()); - assertThat( - normalizer.normalizeForJson(PROPERTY_NAME_WITH_QUOTES, VALID_ISO_8601_DATE_STRING), - is(equalTo(VALID_ISO_8601_DATE_STRING))); - } - - @Test(expected = FilterProcessingException.class) - public void testBadPropertyNameToXml() { - normalizer.normalizeForXml(PROPERTY_NAME_WITH_QUOTES, VALID_ISO_8601_DATE_STRING); - } - - @Test(expected = FilterProcessingException.class) - public void testUnexpectedDateValueToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - normalizer.normalizeForXml(PROPERTY_NAME, NON_DATE_INPUT); - } - - @Test - public void testRelativeFunctionToJson() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForJson(PROPERTY_NAME, VALID_RELATIVE_FUNCTION), - is(equalTo(VALID_RELATIVE_FUNCTION))); - } - - @Test - public void testInvalidRelativeFunctionToJson() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForJson(PROPERTY_NAME, INVALID_RELATIVE_FUNCTION), - is(equalTo(INVALID_RELATIVE_FUNCTION))); - } - - @Test - public void testRelativeFunctionToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml(PROPERTY_NAME, VALID_RELATIVE_FUNCTION), - is(equalTo(VALID_RELATIVE_FUNCTION))); - } - - @Test(expected = FilterProcessingException.class) - public void testInvalidRelativeFunctionToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - normalizer.normalizeForXml(PROPERTY_NAME, INVALID_RELATIVE_FUNCTION); - } - - @Test - public void testValidDuringRangeToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml( - PROPERTY_NAME, VALID_ISO_8601_DATE_STRING + "/" + VALID_ISO_8601_DATE_STRING), - is(equalTo(VALID_MS_SINCE_EPOCH_DATE_STRING + "/" + VALID_MS_SINCE_EPOCH_DATE_STRING))); - } - - @Test - public void testValidOffsetDuringRangeToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml( - PROPERTY_NAME, - VALID_ISO_8601_DATE_STRING_WITH_OFFSET + "/" + VALID_ISO_8601_DATE_STRING_WITH_OFFSET), - is( - equalTo( - VALID_MS_SINCE_EPOCH_DATE_STRING_WITH_OFFSET - + "/" - + VALID_MS_SINCE_EPOCH_DATE_STRING_WITH_OFFSET))); - } - - @Test - public void testValidOnlyFromDuringRangeToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml(PROPERTY_NAME, VALID_ISO_8601_DATE_STRING_WITH_OFFSET + "/"), - is(equalTo(VALID_MS_SINCE_EPOCH_DATE_STRING_WITH_OFFSET + "/"))); - } - - @Test - public void testValidOnlyToDuringRangeToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat( - normalizer.normalizeForXml(PROPERTY_NAME, "/" + VALID_ISO_8601_DATE_STRING_WITH_OFFSET), - is(equalTo("/" + VALID_MS_SINCE_EPOCH_DATE_STRING_WITH_OFFSET))); - } - - @Test - public void testValidEmptyDuringRangeToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - assertThat(normalizer.normalizeForXml(PROPERTY_NAME, "/"), is(equalTo("/"))); - - assertThat(normalizer.normalizeForXml(PROPERTY_NAME, ""), is(equalTo(""))); - } - - @Test(expected = FilterProcessingException.class) - public void testInvalidDuringRangeToXml() { - when(registry.lookup(eq(PROPERTY_NAME))).thenReturn(Optional.of(DATE_DESCRIPTOR)); - normalizer.normalizeForXml( - PROPERTY_NAME, VALID_ISO_8601_DATE_STRING + VALID_ISO_8601_DATE_STRING); - } - - private static AttributeDescriptor createDateDescriptor() { - return new AttributeDescriptorImpl("created", true, true, true, false, BasicTypes.DATE_TYPE); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/JsonModelBuilderTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/JsonModelBuilderTest.java deleted file mode 100644 index 0bda49a84b3..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/JsonModelBuilderTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.builder; - -import static org.codice.ddf.catalog.ui.forms.FilterNodeAssertionSupport.assertLeafNode; -import static org.codice.ddf.catalog.ui.forms.FilterNodeAssertionSupport.assertParentNode; -import static org.codice.ddf.catalog.ui.forms.FilterNodeAssertionSupport.assertTemplatedNode; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.AttributeRegistry; -import java.util.Optional; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; -import org.junit.Before; -import org.junit.Test; - -public class JsonModelBuilderTest { - private static final String AND = "And"; - - private static final String OR = "Or"; - - private static final String JSON_EQUAL = "="; - - private static final String XML_EQUAL = "PropertyIsEqualTo"; - - private JsonModelBuilder builder; - - @Before - public void setup() { - AttributeRegistry registry = mock(AttributeRegistry.class); - when(registry.lookup(any())).thenReturn(Optional.empty()); - builder = new JsonModelBuilder(registry); - } - - @Test - public void testBinaryComparisonType() { - FilterNode node = - builder - .beginBinaryComparisonType(XML_EQUAL) - .setProperty("name") - .setValue("value") - .endTerminalType() - .getResult(); - - assertLeafNode(node, JSON_EQUAL, "name", "value", null); - } - - @Test - public void testBinaryComparisonTypeTemplated() { - FilterNode node = - builder - .beginBinaryComparisonType(XML_EQUAL) - .setProperty("name") - .setTemplatedValues( - ImmutableMap.of( - "defaultValue", "5", "nodeId", "id", "isVisible", true, "isReadOnly", false)) - .endTerminalType() - .getResult(); - - assertTemplatedNode(node, JSON_EQUAL, "name", "5", "id"); - } - - @Test - public void testBinarySpatialTypeDWithin() { - FilterNode node = - builder - .beginBinarySpatialType("DWITHIN") - .setProperty("name") - .setValue("value") - .setDistance(10.5) - .endTerminalType() - .getResult(); - - assertLeafNode(node, "DWITHIN", "name", "value", 10.5); - } - - @Test - public void testBinaryLogicTypeAnd() { - FilterNode node = - builder - .beginBinaryLogicType(AND) - .beginBinaryComparisonType(XML_EQUAL) - .setProperty("name") - .setValue("value") - .endTerminalType() - .endBinaryLogicType() - .getResult(); - - assertParentNode(node, "AND", 1); - } - - @Test - public void testBinaryLogicTypeAllOperators() { - new JsonModelBuilder(null).beginBinaryLogicType(AND); - new JsonModelBuilder(null).beginBinaryLogicType(OR); - // No IllegalArgumentException indicates a passing test - } - - @Test - public void testBinaryComparisonTypeAllOperators() { - new JsonModelBuilder(null).beginBinaryComparisonType("PropertyIsEqualTo"); - new JsonModelBuilder(null).beginBinaryComparisonType("PropertyIsGreaterThan"); - new JsonModelBuilder(null).beginBinaryComparisonType("PropertyIsGreaterThanOrEqualTo"); - new JsonModelBuilder(null).beginBinaryComparisonType("PropertyIsLessThan"); - new JsonModelBuilder(null).beginBinaryComparisonType("PropertyIsLessThanOrEqualTo"); - new JsonModelBuilder(null).beginBinaryComparisonType("PropertyIsNotEqualTo"); - // No IllegalArgumentException indicates a passing test - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/XmlModelBuilderTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/XmlModelBuilderTest.java deleted file mode 100644 index 2e780c4926c..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/builder/XmlModelBuilderTest.java +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.builder; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.AttributeRegistry; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Optional; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; -import net.opengis.filter.v_2_0.FilterType; -import org.codice.ddf.catalog.ui.forms.filter.FilterWriter; -import org.junit.Before; -import org.junit.Test; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -public class XmlModelBuilderTest { - private static final String AND = "AND"; - - private static final String OR = "OR"; - - private static final String JSON_EQUAL = "="; - - private XmlModelBuilder builder; - - @Before - public void setup() { - AttributeRegistry registry = mock(AttributeRegistry.class); - when(registry.lookup(any())).thenReturn(Optional.empty()); - builder = new XmlModelBuilder(registry); - } - - @Test - public void testBinaryComparisonType() throws Exception { - JAXBElement filter = - builder - .beginBinaryComparisonType(JSON_EQUAL) - .setProperty("name") - .setValue("value") - .endTerminalType() - .getResult(); - - assertThat(filter.getDeclaredType(), is(FilterType.class)); - - forNode(filter).verifyTerminalNode("/Filter/PropertyIsEqualTo", "name", "value"); - } - - @Test - public void testBinaryComparisonTypeTemplated() throws Exception { - JAXBElement filter = - builder - .beginBinaryComparisonType(JSON_EQUAL) - .setProperty("name") - .setTemplatedValues( - ImmutableMap.of( - "defaultValue", "5", "nodeId", "id", "isVisible", true, "isReadOnly", false)) - .endTerminalType() - .getResult(); - - assertThat(filter.getDeclaredType(), is(FilterType.class)); - - forNode(filter) - .verifyTerminalTemplatedNode("/Filter/PropertyIsEqualTo", "name", "5", "id", true, false); - } - - @Test - public void testBinarySpatialTypeDWithin() throws Exception { - JAXBElement filter = - builder - .beginBinarySpatialType("DWITHIN") - .setProperty("name") - .setValue("value") - .setDistance(10.5) - .endTerminalType() - .getResult(); - - assertThat(filter.getDeclaredType(), is(FilterType.class)); - - forNode(filter) - .verifyTerminalNode("/Filter/DWithin", "name", "value") - .verifyTerminalNode("/Filter/DWithin", 10.5); - } - - @Test - public void testBinaryLogicTypeAnd() throws Exception { - JAXBElement filter = - builder - .beginBinaryLogicType(AND) - .beginBinaryComparisonType(JSON_EQUAL) - .setProperty("name") - .setValue("value") - .endTerminalType() - .endBinaryLogicType() - .getResult(); - - assertThat(filter.getDeclaredType(), is(FilterType.class)); - - forNode(filter).verifyTerminalNode("/Filter/And/PropertyIsEqualTo", "name", "value"); - } - - @Test - public void testComplexEmbeddedLogicNodes() throws Exception { - JAXBElement filter = - builder - .beginBinaryLogicType("AND") - .beginBinaryComparisonType(JSON_EQUAL) - .setProperty("name") - .setValue("Bob") - .endTerminalType() - .beginBinaryComparisonType(">=") - .setProperty("benumber") - .setValue("0.45") - .endTerminalType() - .beginBinaryLogicType("OR") - .beginBinaryComparisonType("<") - .setProperty("length") - .setValue("120") - .endTerminalType() - .beginBinaryComparisonType("<=") - .setProperty("width") - .setValue("20") - .endTerminalType() - .endBinaryLogicType() - .endBinaryLogicType() - .getResult(); - - assertThat(filter.getDeclaredType(), is(FilterType.class)); - - forNode(filter) - .verifyTerminalNode("/Filter/And/PropertyIsEqualTo", "name", "Bob") - .verifyTerminalNode("/Filter/And/PropertyIsGreaterThanOrEqualTo", "benumber", "0.45") - .verifyTerminalNode("/Filter/And/Or/PropertyIsLessThan", "length", "120") - .verifyTerminalNode("/Filter/And/Or/PropertyIsLessThanOrEqualTo", "width", "20"); - } - - @Test - public void testBinaryLogicTypeAllOperators() { - new XmlModelBuilder(null).beginBinaryLogicType(AND); - new XmlModelBuilder(null).beginBinaryLogicType(OR); - // No IllegalArgumentException indicates a passing test - } - - @Test - public void testBinaryComparisonTypeAllOperators() { - new XmlModelBuilder(null).beginBinaryComparisonType("="); - new XmlModelBuilder(null).beginBinaryComparisonType(">"); - new XmlModelBuilder(null).beginBinaryComparisonType(">="); - new XmlModelBuilder(null).beginBinaryComparisonType("<"); - new XmlModelBuilder(null).beginBinaryComparisonType("<="); - new XmlModelBuilder(null).beginBinaryComparisonType("!="); - // No IllegalArgumentException indicates a passing test - } - - private static XPathAssertionSupport forNode(JAXBElement node) throws Exception { - return new XPathAssertionSupport(node); - } - - private static class XPathAssertionSupport { - private final XPath xPath; - private final DocumentBuilderFactory factory; - private final DocumentBuilder builder; - private final FilterWriter filterWriter; - private final Document document; - - private XPathAssertionSupport(final JAXBElement element) - throws IOException, JAXBException, SAXException, ParserConfigurationException { - this.xPath = XPathFactory.newInstance().newXPath(); - this.factory = DocumentBuilderFactory.newInstance(); - this.builder = this.factory.newDocumentBuilder(); - this.filterWriter = new FilterWriter(false); - - String rawXml = filterWriter.marshal(element); - try (InputStream inputStream = new ByteArrayInputStream(rawXml.getBytes())) { - this.document = builder.parse(inputStream); - } - } - - private XPathAssertionSupport verifyTerminalNode(String xpathToNode, Double distance) - throws XPathExpressionException { - Number actualDistance = - (Number) - xPath.compile(xpathToNode + "/Distance").evaluate(document, XPathConstants.NUMBER); - assertThat(actualDistance, is(distance)); - return this; - } - - private XPathAssertionSupport verifyTerminalNode( - String xpathToNode, String valueRef, String literal) throws XPathExpressionException { - String actualValueRef = - (String) - xPath - .compile(xpathToNode + "/ValueReference") - .evaluate(document, XPathConstants.STRING); - String actualLiteral = - (String) - xPath.compile(xpathToNode + "/Literal").evaluate(document, XPathConstants.STRING); - assertThat(actualValueRef, is(valueRef)); - assertThat(actualLiteral, is(literal)); - return this; - } - - private XPathAssertionSupport verifyTerminalTemplatedNode( - String xpathToNode, - String valueRef, - String defaultValue, - String id, - boolean isVisible, - boolean isReadOnly) - throws XPathExpressionException { - String actualValueRef = - (String) - xPath - .compile(xpathToNode + "/ValueReference") - .evaluate(document, XPathConstants.STRING); - - // Template values (in order) - String literal1 = - (String) - xPath - .compile(xpathToNode + "/Function/Literal[1]") - .evaluate(document, XPathConstants.STRING); - String literal2 = - (String) - xPath - .compile(xpathToNode + "/Function/Literal[2]") - .evaluate(document, XPathConstants.STRING); - String literal3 = - (String) - xPath - .compile(xpathToNode + "/Function/Literal[3]") - .evaluate(document, XPathConstants.STRING); - String literal4 = - (String) - xPath - .compile(xpathToNode + "/Function/Literal[4]") - .evaluate(document, XPathConstants.STRING); - - assertThat(actualValueRef, is(valueRef)); - assertThat(literal1, is(defaultValue)); - assertThat(literal2, is(id)); - assertThat(literal3, is(Boolean.toString(isVisible))); - assertThat(literal4, is(Boolean.toString(isReadOnly))); - return this; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsLoaderCommandTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsLoaderCommandTest.java deleted file mode 100644 index 1b0d4440b67..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsLoaderCommandTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.commands; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.StringContains.containsString; -import static org.mockito.ArgumentMatchers.refEq; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import com.google.common.collect.ImmutableList; -import ddf.catalog.data.Metacard; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.net.URL; -import java.util.Collections; -import org.codice.ddf.catalog.ui.forms.SearchFormsLoader; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.Mock; - -@RunWith(JUnit4.class) -public class SearchFormsLoaderCommandTest { - - private static final URL LOADER_RESOURCES_DIR = - SearchFormsLoaderCommandTest.class.getResource("/forms/loader"); - - private static final String ROOT = LOADER_RESOURCES_DIR.getPath(); - - private static ByteArrayOutputStream buffer; - - private static PrintStream realSystemOut; - private @Mock SearchFormsLoader mockLoader; - - private @Mock Metacard mockMetacard1; - - private @Mock Metacard mockMetacard2; - - private SearchFormsLoaderCommand cmd = - new SearchFormsLoaderCommand(null, null, null) { - @Override - public SearchFormsLoader generateLoader() { - return mockLoader; - } - }; - - @BeforeClass - public static void setupOutput() { - interceptSystemOut(); - } - - @Before - public void setup() { - initMocks(this); - when(mockMetacard1.getId()).thenReturn("1"); - when(mockMetacard2.getId()).thenReturn("2"); - when(mockMetacard1.getTitle()).thenReturn("title1"); - when(mockMetacard2.getTitle()).thenReturn("title2"); - - when(mockLoader.retrieveSystemTemplateMetacards()) - .thenReturn(ImmutableList.of(mockMetacard1, mockMetacard2)); - } - - @After - public void resetBuffer() { - buffer.reset(); - } - - @AfterClass - public static void closeOutput() throws IOException { - System.setOut(realSystemOut); - buffer.close(); - } - - @Test - public void testLoadMetacardsFromDirectory() throws Exception { - cmd.formsDir = ROOT + "/valid"; - cmd.formsFile = "forms.json"; - cmd.resultsFile = "results.json"; - - cmd.executeWithSubject(); - assertThat(this.getOutput(), containsString("Initializing Search Form Template Loader")); - assertThat( - this.getOutput(), - containsString("Loader initialized, beginning ingestion of system templates.")); - assertThat(this.getOutput(), containsString("System templates successfully ingested.")); - verify(mockLoader, times(1)).retrieveSystemTemplateMetacards(); - verify(mockLoader, times(1)).bootstrap(refEq(ImmutableList.of(mockMetacard1, mockMetacard2))); - } - - @Test - public void testNoMetacardsRetrieved() throws Exception { - when(mockLoader.retrieveSystemTemplateMetacards()).thenReturn(Collections.emptyList()); - - cmd.executeWithSubject(); - assertThat(this.getOutput(), containsString("Initializing Search Form Template Loader")); - assertThat(this.getOutput(), containsString("No system forms to load, halting ingest.")); - verify(mockLoader, times(1)).retrieveSystemTemplateMetacards(); - } - - private static void interceptSystemOut() { - realSystemOut = System.out; - buffer = new ByteArrayOutputStream(); - System.setOut(new PrintStream(buffer)); - } - - public String getOutput() { - return buffer.toString(); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsManageCommandTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsManageCommandTest.java deleted file mode 100644 index b882ca12f0c..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/commands/SearchFormsManageCommandTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.commands; - -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.StringContains.containsString; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.refEq; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableList; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Metacard; -import ddf.catalog.operation.DeleteRequest; -import ddf.catalog.operation.DeleteResponse; -import ddf.catalog.operation.impl.DeleteRequestImpl; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.Collections; -import java.util.List; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -@RunWith(MockitoJUnitRunner.class) -public class SearchFormsManageCommandTest { - private @Mock CatalogFramework catalogFramework; - - private @Mock EndpointUtil endpointUtil; - - private @Mock DeleteResponse deleteResponse; - - private @Mock Metacard mockMetacard1; - - private @Mock Metacard mockMetacard2; - - private static ByteArrayOutputStream buffer; - - private static PrintStream realSystemOut; - - private SearchFormsManageCommand cmd; - - @BeforeClass - public static void setupOutput() { - interceptSystemOut(); - } - - @Before - public void setup() throws SourceUnavailableException, IngestException { - when(mockMetacard1.getId()).thenReturn("1"); - when(mockMetacard2.getId()).thenReturn("2"); - when(mockMetacard1.getTitle()).thenReturn("title1"); - when(mockMetacard2.getTitle()).thenReturn("title2"); - when(deleteResponse.getDeletedMetacards()).thenReturn(ImmutableList.of(mockMetacard1)); - when(catalogFramework.delete(any(DeleteRequest.class))).thenReturn(deleteResponse); - when(endpointUtil.getMetacardListByTag(SYSTEM_TEMPLATE)) - .thenReturn(ImmutableList.of(mockMetacard1, mockMetacard2)); - - cmd = new SearchFormsManageCommand(catalogFramework, endpointUtil); - } - - @After - public void resetBuffer() { - buffer.reset(); - } - - @AfterClass - public static void closeOutput() throws IOException { - System.setOut(realSystemOut); - buffer.close(); - } - - @Test - public void testLoadingEmptyMetacards() { - when(endpointUtil.getMetacardListByTag(SYSTEM_TEMPLATE)).thenReturn(Collections.emptyList()); - cmd.massDeletion = true; - cmd.executeWithSubject(); - assertThat(this.getOutput(), containsString("No system forms exist.")); - } - - @Test - public void testSingleDeletionDeletesMetacard() - throws SourceUnavailableException, IngestException { - cmd.singleDeletion = "1"; - cmd.executeWithSubject(); - List idToDelete = Collections.singletonList("1"); - DeleteRequest mockDeleteReq = new DeleteRequestImpl(idToDelete.toArray(new String[0])); - verify(catalogFramework).delete(refEq(mockDeleteReq)); - assertThat(this.getOutput(), containsString("[93mDeleted: \u001B[32m1\u001B[m")); - } - - @Test - public void testRemovalAllMultiDeletion() throws SourceUnavailableException, IngestException { - when(deleteResponse.getDeletedMetacards()) - .thenReturn(ImmutableList.of(mockMetacard1, mockMetacard2)); - cmd.massDeletion = true; - cmd.executeWithSubject(); - List idToDelete = ImmutableList.of("1", "2"); - DeleteRequest mockDeleteReq = new DeleteRequestImpl(idToDelete.toArray(new String[0])); - verify(catalogFramework).delete(refEq(mockDeleteReq)); - assertThat( - this.getOutput(), - containsString("\u001B[93mDeleted: \u001B[32m1\u001B[m" + System.lineSeparator())); - assertThat( - this.getOutput(), - containsString("\u001B[93mDeleted: \u001B[32m2\u001B[m" + System.lineSeparator())); - } - - @Test - public void testPrintAllSystemTemplates() { - cmd.viewAll = true; - cmd.executeWithSubject(); - assertThat( - this.getOutput(), - containsString( - "\u001B[93mTitle: title1" - + System.lineSeparator() - + "\u001B[32m\t- 1\u001B[m" - + System.lineSeparator() - + "\u001B[93mTitle: title2" - + System.lineSeparator() - + "\u001B[32m\t- 2\u001B[m" - + System.lineSeparator())); - } - - private static void interceptSystemOut() { - realSystemOut = System.out; - buffer = new ByteArrayOutputStream(); - System.setOut(new PrintStream(buffer)); - } - - public String getOutput() { - return buffer.toString(); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitorJsonTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitorJsonTest.java deleted file mode 100644 index f6e8cc31371..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitorJsonTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import static java.lang.String.format; -import static junit.framework.TestCase.fail; -import static org.codice.ddf.catalog.ui.forms.FilterNodeAssertionSupport.assertLeafNode; -import static org.codice.ddf.catalog.ui.forms.FilterNodeAssertionSupport.assertParentNode; -import static org.codice.ddf.catalog.ui.forms.FilterNodeAssertionSupport.assertTemplatedNode; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import ddf.catalog.data.AttributeRegistry; -import java.io.File; -import java.io.FileInputStream; -import java.net.URL; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.Optional; -import javax.xml.bind.JAXBElement; -import net.opengis.filter.v_2_0.FilterType; -import org.codice.ddf.catalog.ui.forms.SearchFormsLoaderTest; -import org.codice.ddf.catalog.ui.forms.api.FilterNode; -import org.codice.ddf.catalog.ui.forms.api.VisitableElement; -import org.codice.ddf.catalog.ui.forms.builder.JsonModelBuilder; -import org.junit.Before; -import org.junit.Test; - -public class TransformVisitorJsonTest { - private static final URL FILTER_RESOURCES_DIR = - SearchFormsLoaderTest.class.getResource("/forms/filter2"); - - private static final String DEPTH_PROP = "depth"; - - private static final String DEPTH_VAL = "100"; - - private TransformVisitor visitor; - - @Before - public void setup() { - AttributeRegistry registry = mock(AttributeRegistry.class); - when(registry.lookup(any())).thenReturn(Optional.empty()); - visitor = new TransformVisitor<>(new JsonModelBuilder(registry)); - } - - @Test - public void testVisitPropertyIsEqualTo() throws Exception { - getRootXmlFilterNode("comparison-binary-ops", "PropertyIsEqualTo.xml").accept(visitor); - assertLeafNode(visitor.getResult(), "=", DEPTH_PROP, DEPTH_VAL, null); - } - - @Test - public void testVisitPropertyIsNotEqualTo() throws Exception { - getRootXmlFilterNode("comparison-binary-ops", "PropertyIsNotEqualTo.xml").accept(visitor); - assertLeafNode(visitor.getResult(), "!=", DEPTH_PROP, DEPTH_VAL, null); - } - - @Test - public void testVisitPropertyIsLessThan() throws Exception { - getRootXmlFilterNode("comparison-binary-ops", "PropertyIsLessThan.xml").accept(visitor); - assertLeafNode(visitor.getResult(), "<", DEPTH_PROP, DEPTH_VAL, null); - } - - @Test - public void testVisitPropertyIsLessThanOrEqualTo() throws Exception { - getRootXmlFilterNode("comparison-binary-ops", "PropertyIsLessThanOrEqualTo.xml") - .accept(visitor); - assertLeafNode(visitor.getResult(), "<=", DEPTH_PROP, DEPTH_VAL, null); - } - - @Test - public void testVisitPropertyIsGreaterThan() throws Exception { - getRootXmlFilterNode("comparison-binary-ops", "PropertyIsGreaterThan.xml").accept(visitor); - assertLeafNode(visitor.getResult(), ">", DEPTH_PROP, DEPTH_VAL, null); - } - - @Test - public void testVisitPropertyIsGreaterThanOrEqualTo() throws Exception { - getRootXmlFilterNode("comparison-binary-ops", "PropertyIsGreaterThanOrEqualTo.xml") - .accept(visitor); - assertLeafNode(visitor.getResult(), ">=", DEPTH_PROP, DEPTH_VAL, null); - } - - @Test - public void testVisitDWithin() throws Exception { - VisitableElement xmlElem = getRootXmlFilterNode("spatial-distance-ops", "DWithin.xml"); - xmlElem.accept(visitor); - assertLeafNode(visitor.getResult(), "DWITHIN", "location", "POINT(10, 10)", 150.50); - } - - @Test - public void testVisitIntersectsWithFunction() throws Exception { - getRootXmlFilterNode("function-ops", "Intersects.xml").accept(visitor); - assertTemplatedNode(visitor.getResult(), "INTERSECTS", "location", null, "id"); - } - - @Test - public void testVariety2() throws Exception { - getRootXmlFilterNode("hybrid", "hybrid-example-2.xml").accept(visitor); - assertParentNode(visitor.getResult(), "AND", 6); - assertLeafNode(visitor.getResult().getChildren().get(2), "ILIKE", "name", "Bob", null); - } - - private static VisitableElement getRootXmlFilterNode(String... resourceRoute) throws Exception { - File dir = new File(FILTER_RESOURCES_DIR.toURI()); - if (!dir.exists()) { - fail( - format( - "Invalid setup parameter '%s', the directory does not exist", - FILTER_RESOURCES_DIR.toString())); - } - - Path route = Arrays.stream(resourceRoute).map(Paths::get).reduce(Path::resolve).orElse(null); - if (route == null) { - fail("Could not reduce resource route to a single path"); - } - - File xmlFile = dir.toPath().resolve(route).toFile(); - if (!xmlFile.exists()) { - fail("File was not found " + xmlFile.getAbsolutePath()); - } - - JAXBElement filter = - new FilterReader().unmarshalFilter(new FileInputStream(xmlFile)); - return VisitableXmlElementImpl.create(filter); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitorXmlTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitorXmlTest.java deleted file mode 100644 index 0876d592c0e..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/TransformVisitorXmlTest.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import static java.lang.String.format; -import static junit.framework.TestCase.fail; -import static org.codice.ddf.catalog.ui.forms.FilterNodeAssertionSupport.forElement; -import static org.codice.gsonsupport.GsonTypeAdapters.MAP_STRING_TO_OBJECT_TYPE; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.data.AttributeRegistry; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.Optional; -import javax.xml.bind.JAXBElement; -import net.opengis.filter.v_2_0.BinaryComparisonOpType; -import net.opengis.filter.v_2_0.BinaryLogicOpType; -import net.opengis.filter.v_2_0.BinarySpatialOpType; -import net.opengis.filter.v_2_0.BinaryTemporalOpType; -import net.opengis.filter.v_2_0.DistanceBufferType; -import net.opengis.filter.v_2_0.FilterType; -import net.opengis.filter.v_2_0.PropertyIsLikeType; -import org.codice.ddf.catalog.ui.forms.SearchFormsLoaderTest; -import org.codice.ddf.catalog.ui.forms.api.VisitableElement; -import org.codice.ddf.catalog.ui.forms.builder.XmlModelBuilder; -import org.codice.ddf.catalog.ui.forms.model.FilterNodeMapImpl; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.junit.Before; -import org.junit.Test; - -public class TransformVisitorXmlTest { - private static final URL FILTER_RESOURCES_DIR = - SearchFormsLoaderTest.class.getResource("/forms/filter-json"); - - private static final String EXPECTED_DATE = "2018-02-08T23:24:12.709Z"; - - private static final String DEPTH_PROP = "depth"; - - private static final String DEPTH_VAL = "100"; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - private TransformVisitor visitor; - - @Before - public void setup() { - AttributeRegistry registry = mock(AttributeRegistry.class); - when(registry.lookup(any())).thenReturn(Optional.empty()); - visitor = new TransformVisitor<>(new XmlModelBuilder(registry)); - } - - @Test - public void testVisitPropertyIsEqualTo() throws Exception { - getRootJsonFilterNode("comparison-binary-ops", "Equal.json").accept(visitor); - forElement(visitor.getResult()) - .withBinding(FilterType.class) - .forElement(FilterType::getComparisonOps) - .withBinding(BinaryComparisonOpType.class) - .verifyExpression(BinaryComparisonOpType::getExpression) - .withData(DEPTH_PROP, DEPTH_VAL); - } - - @Test - public void testVisitDWithin() throws Exception { - getRootJsonFilterNode("spatial-distance-ops", "DWithin.json").accept(visitor); - forElement(visitor.getResult()) - .withBinding(FilterType.class) - .forElement(FilterType::getSpatialOps) - .withBinding(DistanceBufferType.class) - .verifyDistanceBuffer() - .withDistance(123.45) - .withData("anyGeo", "WKT()"); - } - - @Test - public void testVisitVarietyFilter1() throws Exception { - getRootJsonFilterNode("hybrid", "hybrid-example-1.json").accept(visitor); - forElement(visitor.getResult()) - .withBinding(FilterType.class) - .forElement(FilterType::getLogicOps) - .withBinding(BinaryLogicOpType.class) - .withExpression(BinaryLogicOpType::getOps) - .satisfies( - child1 -> - forElement(child1) - .withBinding(BinaryComparisonOpType.class) - .verifyExpression(BinaryComparisonOpType::getExpression) - .withData(DEPTH_PROP, DEPTH_VAL), - child2 -> - forElement(child2) - .withBinding(BinarySpatialOpType.class) - .verifyExpressionOrAny(BinarySpatialOpType::getExpressionOrAny) - .withData("anyGeo", "WKT()")); - } - - @Test - public void testVisitVarietyFilter2() throws Exception { - getRootJsonFilterNode("hybrid", "hybrid-example-2.json").accept(visitor); - forElement(visitor.getResult()) - .withBinding(FilterType.class) - .forElement(FilterType::getLogicOps) - .withBinding(BinaryLogicOpType.class) - .withExpression(BinaryLogicOpType::getOps) - .satisfies( - depth1Child1 -> - forElement(depth1Child1) - .withBinding(BinaryComparisonOpType.class) - .verifyExpression(BinaryComparisonOpType::getExpression) - .withData(DEPTH_PROP, DEPTH_VAL), - depth1Child2 -> - forElement(depth1Child2) - .withBinding(BinaryLogicOpType.class) - .withExpression(BinaryLogicOpType::getOps) - .satisfies( - depth2Child1 -> - forElement(depth2Child1) - .withBinding(BinaryComparisonOpType.class) - .verifyExpression(BinaryComparisonOpType::getExpression) - .withData(DEPTH_PROP, DEPTH_VAL), - depth2Child2 -> - forElement(depth2Child2) - .withBinding(BinaryTemporalOpType.class) - .verifyExpressionOrAny(BinaryTemporalOpType::getExpressionOrAny) - .withData("created", EXPECTED_DATE), - depth2Child3 -> - forElement(depth2Child3) - .withBinding(PropertyIsLikeType.class) - .verifyExpression(PropertyIsLikeType::getExpression) - .withData("name", "Bob"))); - } - - private static VisitableElement getRootJsonFilterNode(String... resourceRoute) throws Exception { - File dir = new File(FILTER_RESOURCES_DIR.toURI()); - if (!dir.exists()) { - fail( - format( - "Invalid setup parameter '%s', the directory does not exist", - FILTER_RESOURCES_DIR.toString())); - } - - Path route = Arrays.stream(resourceRoute).map(Paths::get).reduce(Path::resolve).orElse(null); - if (route == null) { - fail("Could not reduce resource route to a single path"); - } - - File jsonFile = dir.toPath().resolve(route).toFile(); - if (!jsonFile.exists()) { - fail("File was not found " + jsonFile.getAbsolutePath()); - } - - try (FileInputStream fis = new FileInputStream(jsonFile)) { - FilterNodeMapImpl node = - new FilterNodeMapImpl( - GSON.fromJson(new InputStreamReader(fis), MAP_STRING_TO_OBJECT_TYPE)); - return VisitableJsonElementImpl.create(node); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImplTest.java deleted file mode 100644 index 60052727074..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImplTest.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.when; - -import java.util.function.Consumer; -import javax.xml.bind.JAXBElement; -import net.opengis.filter.v_2_0.BBOXType; -import net.opengis.filter.v_2_0.BinaryComparisonOpType; -import net.opengis.filter.v_2_0.BinaryLogicOpType; -import net.opengis.filter.v_2_0.BinarySpatialOpType; -import net.opengis.filter.v_2_0.BinaryTemporalOpType; -import net.opengis.filter.v_2_0.DistanceBufferType; -import net.opengis.filter.v_2_0.FilterType; -import net.opengis.filter.v_2_0.FunctionType; -import net.opengis.filter.v_2_0.LiteralType; -import net.opengis.filter.v_2_0.PropertyIsBetweenType; -import net.opengis.filter.v_2_0.PropertyIsLikeType; -import net.opengis.filter.v_2_0.PropertyIsNilType; -import net.opengis.filter.v_2_0.PropertyIsNullType; -import net.opengis.filter.v_2_0.UnaryLogicOpType; -import org.codice.ddf.catalog.ui.forms.api.FilterVisitor2; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -@SuppressWarnings("unchecked") -@RunWith(MockitoJUnitRunner.class) -public class VisitableXmlElementImplTest { - - @Mock private JAXBElement mockElement; - - @Mock private FilterVisitor2 mockVisitor; - - private VisitableXmlElementImpl node; - - @Before - public void setup() { - node = new VisitableXmlElementImplUnderTest(mockElement); - } - - @Test(expected = FilterProcessingException.class) - public void testUnknownType() { - when(mockElement.getDeclaredType()).thenReturn(Object.class); - node.accept(mockVisitor); - } - - @Test - public void testFilterType() { - parameterizedMappingVerification(FilterType.class, (v) -> verify(v).visitFilter(eq(node))); - } - - @Test - public void testValueReference() { - parameterizedMappingVerification(String.class, (v) -> verify(v).visitString(eq(node))); - } - - @Test - public void testLiteralType() { - parameterizedMappingVerification( - LiteralType.class, (v) -> verify(v).visitLiteralType(eq(node))); - } - - @Test - public void testFunctionType() { - parameterizedMappingVerification( - FunctionType.class, (v) -> verify(v).visitFunctionType(eq(node))); - } - - @Test - public void testBinaryLogicOpType() { - parameterizedMappingVerification( - BinaryLogicOpType.class, (v) -> verify(v).visitBinaryLogicType(eq(node))); - } - - @Test - public void testUnaryLogicOpType() { - parameterizedMappingVerification( - UnaryLogicOpType.class, (v) -> verify(v).visitUnaryLogicType(eq(node))); - } - - @Test - public void testBinaryTemporalOpType() { - parameterizedMappingVerification( - BinaryTemporalOpType.class, (v) -> verify(v).visitBinaryTemporalType(eq(node))); - } - - @Test - public void testBinarySpatialOpType() { - parameterizedMappingVerification( - BinarySpatialOpType.class, (v) -> verify(v).visitBinarySpatialType(eq(node))); - } - - @Test - public void testDistanceBufferType() { - parameterizedMappingVerification( - DistanceBufferType.class, (v) -> verify(v).visitDistanceBufferType(eq(node))); - } - - @Test - public void tesetBBoxType() { - parameterizedMappingVerification( - BBOXType.class, (v) -> verify(v).visitBoundingBoxType(eq(node))); - } - - @Test - public void testBinaryComparisonOpType() { - parameterizedMappingVerification( - BinaryComparisonOpType.class, (v) -> verify(v).visitBinaryComparisonType(eq(node))); - } - - @Test - public void testPropertyIsLikeType() { - parameterizedMappingVerification( - PropertyIsLikeType.class, (v) -> verify(v).visitPropertyIsLikeType(eq(node))); - } - - @Test - public void testPropertyIsNullType() { - parameterizedMappingVerification( - PropertyIsNullType.class, (v) -> verify(v).visitPropertyIsNullType(eq(node))); - } - - @Test - public void testPropertyIsNilType() { - parameterizedMappingVerification( - PropertyIsNilType.class, (v) -> verify(v).visitPropertyIsNilType(eq(node))); - } - - @Test - public void testPropertyIsBetweenType() { - parameterizedMappingVerification( - PropertyIsBetweenType.class, (v) -> verify(v).visitPropertyIsBetweenType(eq(node))); - } - - private void parameterizedMappingVerification( - Class type, Consumer assertOnVisitFunction) { - when(mockElement.getDeclaredType()).thenReturn(type); - node.accept(mockVisitor); - - verify(mockElement).getDeclaredType(); - assertOnVisitFunction.accept(mockVisitor); - verifyNoMoreInteractions(mockVisitor, mockElement); - } - - private static class VisitableXmlElementImplUnderTest extends VisitableXmlElementImpl { - VisitableXmlElementImplUnderTest(JAXBElement e) { - super(e); - } - - @Override - public Object getValue() { - return null; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImplTypesTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImplTypesTest.java deleted file mode 100644 index 69cc6b8e4e2..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/forms/filter/VisitableXmlElementImplTypesTest.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.forms.filter; - -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsEmptyCollection.empty; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsNot.not; - -import java.util.List; -import javax.xml.bind.JAXBElement; -import net.opengis.filter.v_2_0.BinaryComparisonOpType; -import net.opengis.filter.v_2_0.BinaryLogicOpType; -import net.opengis.filter.v_2_0.BinarySpatialOpType; -import net.opengis.filter.v_2_0.BinaryTemporalOpType; -import net.opengis.filter.v_2_0.ExtensionOpsType; -import net.opengis.filter.v_2_0.FilterType; -import net.opengis.filter.v_2_0.FunctionType; -import net.opengis.filter.v_2_0.LiteralType; -import net.opengis.filter.v_2_0.ObjectFactory; -import net.opengis.filter.v_2_0.PropertyIsLikeType; -import net.opengis.filter.v_2_0.ResourceIdType; -import org.junit.Test; - -/** - * Still need tests for additional types. - * - * @see net.opengis.filter.v_2_0.UnaryLogicOpType - * @see net.opengis.filter.v_2_0.PropertyIsNullType - * @see net.opengis.filter.v_2_0.PropertyIsNilType - * @see net.opengis.filter.v_2_0.PropertyIsBetweenType - */ -public class VisitableXmlElementImplTypesTest { - private static final ObjectFactory FACTORY = new ObjectFactory(); - - private static final JAXBElement VALUE_REFERENCE_NODE = - FACTORY.createValueReference("key"); - - private static final JAXBElement LITERAL_NODE = - FACTORY.createLiteral(new LiteralType().withContent("value")); - - private static final JAXBElement LIKE_NODE = - FACTORY.createPropertyIsLike( - new PropertyIsLikeType().withExpression(VALUE_REFERENCE_NODE, LITERAL_NODE)); - - private static final JAXBElement BINARY_COMPARISON_NODE = - FACTORY.createPropertyIsEqualTo( - new BinaryComparisonOpType().withExpression(VALUE_REFERENCE_NODE, LITERAL_NODE)); - - private static final JAXBElement BINARY_SPATIAL_NODE = - FACTORY.createIntersects( - new BinarySpatialOpType().withExpressionOrAny(VALUE_REFERENCE_NODE, LITERAL_NODE)); - - private static final JAXBElement BINARY_TEMPORAL_NODE = - FACTORY.createBefore( - new BinaryTemporalOpType().withExpressionOrAny(VALUE_REFERENCE_NODE, LITERAL_NODE)); - - private static final JAXBElement BINARY_LOGIC_NODE = - FACTORY.createAnd(new BinaryLogicOpType().withOps(BINARY_COMPARISON_NODE)); - - private static final JAXBElement FILTER_NODE_WITH_COMPARISON = - FACTORY.createFilter(new FilterType().withComparisonOps(BINARY_COMPARISON_NODE)); - - private static final JAXBElement FILTER_NODE_WITH_SPATIAL = - FACTORY.createFilter(new FilterType().withSpatialOps(BINARY_SPATIAL_NODE)); - - private static final JAXBElement FILTER_NODE_WITH_TEMPORAL = - FACTORY.createFilter(new FilterType().withTemporalOps(BINARY_TEMPORAL_NODE)); - - private static final JAXBElement FILTER_NODE_WITH_LOGIC = - FACTORY.createFilter(new FilterType().withLogicOps(BINARY_LOGIC_NODE)); - - private static final JAXBElement FILTER_NODE_WITH_ID = - FACTORY.createFilter(new FilterType().withId(FACTORY.createId(new ResourceIdType()))); - - private static final JAXBElement FILTER_NODE_WITH_EXT = - FACTORY.createFilter( - new FilterType() - .withExtensionOps( - new ExtensionOpsType() { - @Override - public Object createNewInstance() { - return new Object(); - } - })); - - private static final JAXBElement FILTER_NODE_STARTS_WITH_FUNCTION = - FACTORY.createFilter(new FilterType().withFunction(new FunctionType())); - - @Test - public void testExpressionForBinaryComparison() { - validateResultList(BINARY_COMPARISON_NODE, VisitableXmlElementImpl.class); - } - - @Test - public void testExpressionForBinaryLogic() { - validateResultList(BINARY_LOGIC_NODE, VisitableXmlElementImpl.class); - } - - @Test - public void testExpressionForLike() { - validateResultList(LIKE_NODE, VisitableXmlElementImpl.class); - } - - @Test - public void testSingletonExpressionForFilterWithComparison() { - validateResult(FILTER_NODE_WITH_COMPARISON, VisitableXmlElementImpl.class); - } - - @Test - public void testSingletonExpressionForFilterWithLogic() { - validateResult(FILTER_NODE_WITH_LOGIC, VisitableXmlElementImpl.class); - } - - @Test - public void testSingletonExpressionForFilterWithSpatial() { - validateResult(FILTER_NODE_WITH_SPATIAL, VisitableXmlElementImpl.class); - } - - @Test - public void testSingletonExpressionForFilterWithTemporal() { - validateResult(FILTER_NODE_WITH_TEMPORAL, VisitableXmlElementImpl.class); - } - - @Test(expected = UnsupportedOperationException.class) - public void testSingletonExpressionForFilterWithId() { - VisitableXmlElementImpl.create(FILTER_NODE_WITH_ID); - } - - @Test(expected = UnsupportedOperationException.class) - public void testSingletonExpressionForFilterWithExt() { - VisitableXmlElementImpl.create(FILTER_NODE_WITH_EXT); - } - - @Test(expected = UnsupportedOperationException.class) - public void testSingletonExpressionForFilterWithFunctionFirst() { - VisitableXmlElementImpl.create(FILTER_NODE_STARTS_WITH_FUNCTION); - } - - private static void validateResult(JAXBElement element, Class type) { - VisitableXmlElementImpl visitable = VisitableXmlElementImpl.create(element); - assertThat(visitable.getValue(), instanceOf(type)); - } - - private static void validateResultList(JAXBElement element, Class type) { - VisitableXmlElementImpl visitable = VisitableXmlElementImpl.create(element); - assertThat(visitable.getValue(), instanceOf(List.class)); - List list = (List) visitable.getValue(); - assertThat(list, is(not(empty()))); - list.forEach(obj -> assertThat(obj, instanceOf(type))); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/BuildApplicationTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/BuildApplicationTest.java deleted file mode 100644 index af6d1ff9823..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/BuildApplicationTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableMap; -import java.util.Arrays; -import java.util.Collections; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.metacard.internal.UserCreatableMetacardType; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.junit.Before; -import org.junit.Test; - -public class BuildApplicationTest { - - private EndpointUtil endpointUtil; - - @Before - public void setup() { - endpointUtil = new EndpointUtil(null, null, null, null, null, null, null); - } - - @Test - public void testEmpty() { - Map map = createBuildApplicationAndRun(); - assertThat(map, is(buildAvailableMetacardTypes())); - } - - @Test - public void testOneAvailableMetacardType() { - UserCreatableMetacardType userCreatableMetacardType = - createAvailableMetacardType("x", Collections.emptySet()); - Map map = createBuildApplicationAndRun(userCreatableMetacardType); - assertThat(map, is(buildAvailableMetacardTypes("x"))); - } - - @Test - public void testTwoAvailableMetacardType() { - UserCreatableMetacardType availableMetacardType1 = - createAvailableMetacardType("x", Collections.emptySet()); - UserCreatableMetacardType availableMetacardType2 = - createAvailableMetacardType("y", Collections.emptySet()); - Map map = - createBuildApplicationAndRun(availableMetacardType1, availableMetacardType2); - assertThat(map, is(buildAvailableMetacardTypes("x", "y"))); - } - - private UserCreatableMetacardType createAvailableMetacardType( - String typeName, Set visibleAttributes) { - UserCreatableMetacardType userCreatableMetacardType = mock(UserCreatableMetacardType.class); - when(userCreatableMetacardType.getAvailableType()).thenReturn(typeName); - when(userCreatableMetacardType.getUserVisibleAttributes()).thenReturn(visibleAttributes); - return userCreatableMetacardType; - } - - private Map createBuildApplicationAndRun( - UserCreatableMetacardType... userCreatableMetacardTypes) { - BuildApplication buildApplication = - new BuildApplication(endpointUtil, Arrays.asList(userCreatableMetacardTypes)); - return buildApplication.getAvailableTypes(); - } - - private Map buildAvailableMetacardTypes(String... metacardTypeNames) { - return Collections.singletonMap( - "availabletypes", - Arrays.stream(metacardTypeNames) - .map(this::buildAvailableMetacardType) - .collect(Collectors.toList())); - } - - private Map buildAvailableMetacardType(String metacardTypeName) { - return ImmutableMap.builder() - .put("metacardType", metacardTypeName) - .put("visibleAttributes", Collections.emptySet()) - .build(); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/MetacardApplicationTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/MetacardApplicationTest.java deleted file mode 100644 index 3fc12aa7dae..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/MetacardApplicationTest.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.fail; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.ResultImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.operation.UpdateRequest; -import java.io.Serializable; -import java.time.Instant; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; -import javax.ws.rs.NotFoundException; -import org.codice.ddf.catalog.ui.metacard.edit.AttributeChange; -import org.codice.ddf.catalog.ui.metacard.edit.MetacardChanges; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.ddf.security.Security; -import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.invocation.InvocationOnMock; - -public class MetacardApplicationTest { - private static final String ID = "000000000"; - - private static final String TITLE_A = "Title A"; - - private static final String TITLE_B = "Title B"; - - private static final String DATE_A = "2018-12-10T13:09:40Z"; - - private static final String DATE_B = "2018-12-10T13:08:40Z"; - - private final CatalogFramework mockFramework = mock(CatalogFramework.class); - - private final EndpointUtil mockUtil = mock(EndpointUtil.class); - - private final MetacardApplicationUnderTest app = - new MetacardApplicationUnderTest(mockFramework, mockUtil); - - @Test(expected = NotFoundException.class) - public void testPatchMetacardsWhenIdNotFound() throws Exception { - doReturn(Collections.emptyMap()) - .when(mockUtil) - .getMetacardsWithTagByAttributes(any(), any(), any(String.class), any()); - app.doPatchMetacards(generateTitleChange()); - } - - @Test - public void testPatchMetacardsWhenAttributeIsString() throws Exception { - ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(UpdateRequest.class); - when(mockFramework.update(requestCaptor.capture())).thenReturn(null); - doReturn(generateCatalogStateWithTitle()) - .when(mockUtil) - .getMetacardsWithTagByAttributes(any(), any(), any(String.class), any()); - - app.doPatchMetacards(generateTitleChange()); - - Metacard metacard = requestCaptor.getValue().getUpdates().get(0).getValue(); - assertThat(metacard.getId(), is(ID)); - assertThat(metacard.getTitle(), is(TITLE_B)); - } - - @Test - public void testPatchMetacardsWhenAttributeIsDate() throws Exception { - ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(UpdateRequest.class); - when(mockFramework.update(requestCaptor.capture())).thenReturn(null); - doReturn(generateCatalogStateWithCreatedDate()) - .when(mockUtil) - .getMetacardsWithTagByAttributes(any(), any(), any(String.class), any()); - doAnswer(MetacardApplicationTest::doParseDate).when(mockUtil).parseDate(any()); - - app.doPatchMetacards(generateCreatedDateChange()); - - Metacard metacard = requestCaptor.getValue().getUpdates().get(0).getValue(); - assertThat(metacard.getId(), is(ID)); - assertThat(metacard.getCreatedDate(), is(Date.from(Instant.parse(DATE_B)))); - } - - private static List generateTitleChange() { - return generateChangeTestData( - attributeChange -> { - attributeChange.setAttribute(Core.TITLE); - attributeChange.setValues(Collections.singletonList(TITLE_B)); - }); - } - - private static List generateCreatedDateChange() { - return generateChangeTestData( - attributeChange -> { - attributeChange.setAttribute(Core.CREATED); - attributeChange.setValues(Collections.singletonList(DATE_B)); - }); - } - - private static Map generateCatalogStateWithTitle() { - return generateCatalogState(metacard -> metacard.setTitle(TITLE_A)); - } - - private static Map generateCatalogStateWithCreatedDate() { - return generateCatalogState( - metacard -> metacard.setCreatedDate(Date.from(Instant.parse(DATE_A)))); - } - - private static List generateChangeTestData(Consumer config) { - MetacardChanges metacardChanges = new MetacardChanges(); - AttributeChange attributeChange = new AttributeChange(); - - config.accept(attributeChange); - - metacardChanges.setIds(Collections.singletonList(ID)); - metacardChanges.setAttributes(Collections.singletonList(attributeChange)); - - return Collections.singletonList(metacardChanges); - } - - private static Map generateCatalogState(Consumer config) { - MetacardImpl metacard = new MetacardImpl(); - metacard.setId(ID); - - config.accept(metacard); - - Result result = new ResultImpl(metacard); - return Collections.singletonMap(ID, result); - } - - private static Instant doParseDate(InvocationOnMock in) { - Serializable arg = in.getArgument(0); - if (!(arg instanceof String)) { - fail("Only testing with string inputs but got something else, " + arg); - } - return Instant.parse((String) arg); - } - - /** - * Test class that exposes the protected {@link MetacardApplication#patchMetacards(List, String, - * Set )}. - * - *

Note the original method returns an UpdateResponse but we're not testing the Catalog - * Framework's ability to return a good response; we're testing the app's ability to correctly - * write to the framework, so this return value is meaningless to propagate. - */ - private static class MetacardApplicationUnderTest extends MetacardApplication { - private MetacardApplicationUnderTest( - CatalogFramework catalogFramework, EndpointUtil endpointUtil) { - super( - catalogFramework, - endpointUtil, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - mock(Security.class), - null); - } - - private void doPatchMetacards(List metacardChanges) throws Exception { - patchMetacards(metacardChanges, null, null); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/QueryMetacardApplicationTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/QueryMetacardApplicationTest.java deleted file mode 100644 index 5b85d6686d0..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/QueryMetacardApplicationTest.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard; - -import static java.lang.String.format; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.RETURNS_DEEP_STUBS; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static spark.Spark.stop; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.ResultImpl; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.CreateRequest; -import ddf.catalog.operation.DeleteRequest; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.Update; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.CreateResponseImpl; -import ddf.catalog.operation.impl.UpdateImpl; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.operation.impl.UpdateResponseImpl; -import ddf.security.SubjectIdentity; -import io.restassured.RestAssured; -import java.io.IOException; -import java.io.InputStream; -import java.net.ServerSocket; -import java.nio.charset.StandardCharsets; -import java.util.Collections; -import java.util.List; -import javax.annotation.Nullable; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; -import spark.Request; -import spark.Spark; - -@RunWith(MockitoJUnitRunner.class) -public class QueryMetacardApplicationTest { - - private static final CatalogFramework CATALOG_FRAMEWORK = mock(CatalogFramework.class); - - private static final EndpointUtil ENDPOINT_UTIL = mock(EndpointUtil.class); - - private static final FilterBuilder FILTER_BUILDER = mock(FilterBuilder.class, RETURNS_DEEP_STUBS); - - private static final SubjectIdentity SUBJECT_IDENTITY = mock(SubjectIdentity.class); - - private static final QueryMetacardApplication APPLICATION = - new QueryMetacardApplicationUnderTest( - CATALOG_FRAMEWORK, ENDPOINT_UTIL, FILTER_BUILDER, SUBJECT_IDENTITY); - - private static String localhostUrl; - - @BeforeClass - public static void setUpClass() { - Spark.port(getAvailablePort()); - APPLICATION.init(); - Spark.awaitInitialization(); - localhostUrl = format("http://localhost:%d/queries", Spark.port()); - } - - @AfterClass - public static void tearDownClass() { - stop(); - } - - @Test - public void testCreateQueryMetacard() throws Exception { - String content = getFileContents("/queries/basic.json"); - - doReturn(content).when(ENDPOINT_UTIL).safeGetBody(any(Request.class)); - - doReturn( - new CreateResponseImpl( - new CreateRequestImpl(Collections.emptyList()), - Collections.emptyMap(), - Collections.singletonList(new MetacardImpl()))) - .when(CATALOG_FRAMEWORK) - .create(any(CreateRequest.class)); - - int statusCode = RestAssured.given().body(content).post(localhostUrl).statusCode(); - - assertThat(statusCode, is(201)); - } - - @Test - public void testRetrieveQueryMetacardSpecifiedId() throws Exception { - doReturn(new MetacardImpl()).when(ENDPOINT_UTIL).getMetacardById(any(String.class)); - - int statusCode = RestAssured.given().get(localhostUrl + "/123").statusCode(); - - assertThat(statusCode, is(200)); - } - - @Test - public void testRetrieveAllQueryMetacards() throws Exception { - Result result = new ResultImpl(new MetacardImpl()); - QueryResponse queryResponse = mock(QueryResponse.class); - - doReturn(Collections.singletonList(result)).when(queryResponse).getResults(); - doReturn(queryResponse).when(CATALOG_FRAMEWORK).query(any(QueryRequest.class)); - - int statusCode = RestAssured.given().get(localhostUrl).statusCode(); - - assertThat(statusCode, is(200)); - } - - @Test - public void testRetrieveAllQueryMetacardsFuzzySearch() throws Exception { - Result result = new ResultImpl(new MetacardImpl()); - QueryResponse queryResponse = mock(QueryResponse.class); - - doReturn(Collections.singletonList(result)).when(queryResponse).getResults(); - doReturn(queryResponse).when(CATALOG_FRAMEWORK).query(any(QueryRequest.class)); - - int statusCode = RestAssured.given().get(localhostUrl + "?text=foobar").statusCode(); - - assertThat(statusCode, is(200)); - } - - @Test - public void testUpdateQueryMetacard() throws Exception { - String content = getFileContents("/queries/basic.json"); - - UpdateRequest request = new UpdateRequestImpl("", null); - List updates = Collections.singletonList(new UpdateImpl(new MetacardImpl(), null)); - - doReturn(content).when(ENDPOINT_UTIL).safeGetBody(any(Request.class)); - - doReturn(new UpdateResponseImpl(request, Collections.emptyMap(), updates)) - .when(CATALOG_FRAMEWORK) - .update(any(UpdateRequest.class)); - - int statusCode = RestAssured.given().body(content).put(localhostUrl + "/123").statusCode(); - - assertThat(statusCode, is(200)); - } - - @Test - public void testDeleteQueryMetacard() throws Exception { - doReturn(null).when(CATALOG_FRAMEWORK).delete(any(DeleteRequest.class)); - - int statusCode = RestAssured.given().delete(localhostUrl + "/123").statusCode(); - - assertThat(statusCode, is(204)); - } - - private static String getFileContents(String resource) { - try (InputStream inputStream = - QueryMetacardApplicationTest.class.getResourceAsStream(resource)) { - return IOUtils.toString(inputStream, StandardCharsets.UTF_8); - } catch (IOException e) { - String message = String.format("Unable to find resource [%s]", resource); - throw new AssertionError(message, e); - } - } - - private static int getAvailablePort() { - ServerSocket socket = null; - try { - socket = new ServerSocket(0); - return socket.getLocalPort(); - } catch (IOException e) { - throw new AssertionError("Could not autobind to available port", e); - } finally { - tryCloseSocket(socket); - } - } - - private static void tryCloseSocket(@Nullable ServerSocket socket) { - try { - if (socket != null) { - socket.close(); - } - } catch (IOException e) { - throw new AssertionError( - "Problem while enumerating ports (specifically, port " + socket.getLocalPort() + ")", e); - } - } - - private static class QueryMetacardApplicationUnderTest extends QueryMetacardApplication { - - private QueryMetacardApplicationUnderTest( - CatalogFramework catalogFramework, - EndpointUtil endpointUtil, - FilterBuilder filterBuilder, - SubjectIdentity subjectIdentity) { - super(catalogFramework, endpointUtil, filterBuilder, subjectIdentity); - } - - @Override - String getSubjectIdentifier() { - return "example@domain.com"; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/query/data/model/QueryBasicTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/query/data/model/QueryBasicTest.java deleted file mode 100644 index 1284c680e7f..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/query/data/model/QueryBasicTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.query.data.model; - -import static ddf.catalog.data.Metacard.TITLE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_CQL; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_FEDERATION; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_FILTER_TREE; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_SORTS; -import static org.codice.ddf.catalog.ui.metacard.query.util.QueryAttributes.QUERY_TYPE; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.metacard.QueryMetacardApplicationTest; -import org.junit.Test; - -public class QueryBasicTest { - - private static final Gson GSON = - new GsonBuilder().disableHtmlEscaping().serializeNulls().create(); - - @Test - public void createQueryBasicFromJson() { - String content = getFileContents("/queries/basic.json"); - QueryBasic query = GSON.fromJson(content, QueryBasic.class); - - Metacard metacard = query.getMetacard(); - - assertAttribute(metacard, QUERY_CQL, "(\"anyText\" ILIKE 'foo bar')"); - assertAttribute( - metacard, - QUERY_FILTER_TREE, - "{\"type\":\"AND\",\"filters\":[{\"type\":\"ILIKE\",\"property\":\"anyText\",\"value\":\"foo bar\"}]}"); - assertAttribute(metacard, QUERY_FEDERATION, "enterprise"); - - String sorts = "{\"attribute\":\"modified\",\"direction\":\"descending\"}"; - assertAttribute(metacard, QUERY_SORTS, sorts); - - assertAttribute(metacard, QUERY_TYPE, "advanced"); - assertAttribute(metacard, TITLE, "(\"anyText\" ILIKE 'foo bar')"); - } - - private void assertAttribute(Metacard metacard, String attrName, Object value) { - Attribute attr = metacard.getAttribute(attrName); - assertThat(attr.getValue(), is(value)); - } - - private static String getFileContents(String resource) { - try (InputStream inputStream = - QueryMetacardApplicationTest.class.getResourceAsStream(resource)) { - return IOUtils.toString(inputStream, StandardCharsets.UTF_8); - } catch (IOException e) { - String message = String.format("Unable to find resource [%s]", resource); - throw new AssertionError(message, e); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardImplTest.java deleted file mode 100644 index 1e871a7dcbd..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/WorkspaceMetacardImplTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.core.Is.is; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.types.Core; -import java.io.Serializable; -import java.util.Arrays; -import java.util.List; -import org.codice.ddf.catalog.ui.security.accesscontrol.AccessControlUtil; -import org.junit.Before; -import org.junit.Test; - -public class WorkspaceMetacardImplTest { - - private WorkspaceMetacardImpl workspace; - - @Before - public void setUp() { - workspace = new WorkspaceMetacardImpl(); - } - - @Test - public void testWorkspaceMetacardFrom() { - WorkspaceMetacardImpl wrapped = WorkspaceMetacardImpl.from(new MetacardImpl(workspace)); - wrapped.setId("0"); - assertThat(wrapped.getId(), is("0")); - assertThat(workspace.getId(), is("0")); - } - - @Test - public void testGetWorkspaceQueries() { - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(); - workspaceMetacard.setQueries(Arrays.asList("queryId1", "queryId2")); - - List queries = workspaceMetacard.getQueries(); - - assertThat(queries, hasSize(2)); - assertThat(queries.get(0), is("queryId1")); - assertThat(queries.get(1), is("queryId2")); - } - - @Test - public void testGetEmptyWorkspaceQueries() { - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(); - List queries = workspaceMetacard.getQueries(); - - assertThat(queries, hasSize(0)); - } - - @Test - public void testAddWorkspaceQuery() { - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(); - workspaceMetacard.addQueryAssociation("queryId"); - - List queries = workspaceMetacard.getQueries(); - - assertThat(queries, hasSize(1)); - assertThat(queries, contains("queryId")); - } - - @Test - public void testRemoveWorkspaceQuery() { - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(); - workspaceMetacard.addQueryAssociation("queryId1"); - workspaceMetacard.addQueryAssociation("queryId2"); - - workspaceMetacard.removeQueryAssociation("queryId1"); - - List queries = workspaceMetacard.getQueries(); - - assertThat(queries, hasSize(1)); - assertThat(queries, contains("queryId2")); - } - - @Test - public void testGetWorkspaceMetacardFromMap() { - final ImmutableMap metacardAttributes = - new ImmutableMap.Builder() - .put(Core.ID, "workspaceId") - .put(Core.METACARD_TAGS, "workspace") - .put(WorkspaceConstants.WORKSPACE_QUERIES, "queryId") - .put(Core.TITLE, "title") - .put(Core.METACARD_OWNER, "admin") - .build(); - - WorkspaceMetacardImpl workspaceMetacard = WorkspaceMetacardImpl.from(metacardAttributes); - - assertAttributeValueIs(workspaceMetacard, Core.ID, "workspaceId"); - assertAttributeValueIs(workspaceMetacard, Core.METACARD_TAGS, "workspace"); - assertAttributeValueIs(workspaceMetacard, WorkspaceConstants.WORKSPACE_QUERIES, "queryId"); - assertAttributeValueIs(workspaceMetacard, Core.TITLE, "title"); - assertAttributeValueIs(workspaceMetacard, Core.METACARD_OWNER, "admin"); - } - - @Test - public void testIsWorkspaceMetacard() { - MetacardImpl metacard = new MetacardImpl(); - metacard.setTags(ImmutableSet.of("workspace")); - - boolean isWorkspace = WorkspaceMetacardImpl.isWorkspaceMetacard(metacard); - - assertThat(isWorkspace, is(true)); - } - - @Test - public void testIsNotWorkspaceMetacard() { - MetacardImpl metacard = new MetacardImpl(); - metacard.setTags(ImmutableSet.of("hello", "world")); - - boolean isWorkspace = WorkspaceMetacardImpl.isWorkspaceMetacard(metacard); - - assertThat(isWorkspace, is(false)); - } - - @Test - public void testIsNullWorkspaceMetacard() { - boolean isWorkspace = WorkspaceMetacardImpl.isWorkspaceMetacard(null); - - assertThat(isWorkspace, is(false)); - } - - @Test - public void testOwner() { - String owner = "owner@localhost"; - workspace = (WorkspaceMetacardImpl) AccessControlUtil.setOwner(workspace, owner); - assertThat(AccessControlUtil.getOwner(workspace), is(owner)); - } - - private void assertAttributeValueIs(Metacard metacard, String attrKey, Serializable value) { - Attribute attr = metacard.getAttribute(attrKey); - assertThat(attr.getValue(), is(value)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/AssociatedQueryMetacardsHandlerTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/AssociatedQueryMetacardsHandlerTest.java deleted file mode 100644 index 1db7b25b44e..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/AssociatedQueryMetacardsHandlerTest.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.operation.CreateRequest; -import ddf.catalog.operation.CreateResponse; -import ddf.catalog.operation.DeleteRequest; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.source.IngestException; -import ddf.catalog.source.SourceUnavailableException; -import java.util.Collections; -import java.util.List; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.mockito.junit.MockitoJUnitRunner; - -@RunWith(MockitoJUnitRunner.class) -public class AssociatedQueryMetacardsHandlerTest { - - @Mock private CatalogFramework catalogFramework; - - private AssociatedQueryMetacardsHandler queryMetacardsHandler; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - - this.catalogFramework = mock(CatalogFramework.class); - this.queryMetacardsHandler = new AssociatedQueryMetacardsHandler(catalogFramework); - } - - @Test - public void testCreateQueryMetacards() throws IngestException, SourceUnavailableException { - List updatedQueryMetacards = - Collections.singletonList(new QueryMetacardImpl()); - doReturn(mock(CreateResponse.class)).when(catalogFramework).create(any(CreateRequest.class)); - - queryMetacardsHandler.create(Collections.emptyList(), updatedQueryMetacards); - - verify(catalogFramework, times(1)).create(any(CreateRequest.class)); - } - - @Test - public void testCreateQueryMetacardsNoCreations() - throws IngestException, SourceUnavailableException { - queryMetacardsHandler.create(Collections.emptyList(), Collections.emptyList()); - - verify(catalogFramework, times(0)).create(any(CreateRequest.class)); - } - - @Test - public void testDeleteQueryMetacards() throws IngestException, SourceUnavailableException { - queryMetacardsHandler.delete(Collections.singletonList("queryId"), Collections.emptyList()); - - verify(catalogFramework, times(1)).delete(any(DeleteRequest.class)); - } - - @Test - public void testDeleteQueryMetacardsNoDeletions() - throws IngestException, SourceUnavailableException { - queryMetacardsHandler.delete(Collections.emptyList(), Collections.emptyList()); - - verify(catalogFramework, times(0)).delete(any(DeleteRequest.class)); - } - - @Test - public void testUpdateQueryMetacards() throws IngestException, SourceUnavailableException { - QueryMetacardImpl existingQuery = createQueryMetacard("old title", "queryId"); - QueryMetacardImpl updatedQuery = createQueryMetacard("new title", "queryId"); - - queryMetacardsHandler.update( - Collections.singletonList("queryId"), - Collections.singletonList(existingQuery), - Collections.singletonList(updatedQuery)); - - verify(catalogFramework, times(1)).update(any(UpdateRequest.class)); - } - - @Test - public void testUpdateQueryMetacardsNoUpdates() - throws IngestException, SourceUnavailableException { - QueryMetacardImpl existingQuery = mock(QueryMetacardImpl.class); - doReturn("queryId").when(existingQuery).getId(); - doReturn(new AttributeImpl("title", "title")).when(existingQuery).getAttribute("title"); - QueryMetacardImpl updatedQuery = existingQuery; - - queryMetacardsHandler.update( - Collections.singletonList("queryId"), - Collections.singletonList(existingQuery), - Collections.singletonList(updatedQuery)); - - verify(catalogFramework, times(0)).update(any(UpdateRequest.class)); - } - - @Test - public void testUpdateQueryMetacardsNoUpdatesEmptyQueries() - throws IngestException, SourceUnavailableException { - queryMetacardsHandler.update( - Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); - - verify(catalogFramework, times(0)).update(any(UpdateRequest.class)); - } - - private QueryMetacardImpl createQueryMetacard(String title, String id) { - QueryMetacardImpl query = new QueryMetacardImpl(title); - query.setId(id); - return query; - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/EmbeddedListMetacardsHandlerTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/EmbeddedListMetacardsHandlerTest.java deleted file mode 100644 index 23785750dc5..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/EmbeddedListMetacardsHandlerTest.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import static java.util.Collections.singletonList; -import static org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl.EmbeddedListMetacardsHandler.ACTIONS_KEY; -import static org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl.EmbeddedListMetacardsHandler.LIST_ACTION_PREFIX; -import static org.hamcrest.Matchers.hasEntry; -import static org.hamcrest.Matchers.hasKey; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.isA; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.collection.IsCollectionWithSize.hasSize; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.hamcrest.MockitoHamcrest.argThat; - -import ddf.action.Action; -import ddf.action.ActionRegistry; -import ddf.catalog.data.Metacard; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.hamcrest.Matchers; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; - -@RunWith(MockitoJUnitRunner.class) -public class EmbeddedListMetacardsHandlerTest { - - private EmbeddedListMetacardsHandler embeddedListMetacardsHandler; - - @Mock private WorkspaceTransformer workspaceTransformer; - - @Mock private ActionRegistry actionRegistry; - - @Mock private Metacard workspaceMetacard; - - @Captor private ArgumentCaptor> jsonArgumentCaptor; - - @Before - public void setup() throws MalformedURLException { - embeddedListMetacardsHandler = new EmbeddedListMetacardsHandler(actionRegistry); - final Action action = getMockAction(); - doReturn(singletonList(action)) - .when(actionRegistry) - .list( - argThat( - Matchers.>allOf( - hasEntry("workspace", workspaceMetacard), - hasEntry(is("list"), isA(Metacard.class))))); - } - - @Test - public void removeExternalListAttributes() { - final Map metacardMap = new HashMap<>(); - metacardMap.put("actions", "actionAttributes"); - metacardMap.put("other", "otherAttributes"); - - embeddedListMetacardsHandler.jsonValueToMetacardValue( - workspaceTransformer, singletonList(metacardMap)); - - verify(workspaceTransformer) - .transformIntoMetacard(jsonArgumentCaptor.capture(), any(Metacard.class)); - final List> metacardMaps = jsonArgumentCaptor.getAllValues(); - - assertThat(metacardMaps, hasSize(1)); - - final Map transformedMetacardMap = metacardMaps.get(0); - assertThat(transformedMetacardMap, hasEntry("other", "otherAttributes")); - assertThat(transformedMetacardMap, not(hasKey("actions"))); - } - - @Test - public void addListActions() { - final Map metacardMap = new HashMap<>(); - metacardMap.put("other", "otherAttributes"); - - when(workspaceTransformer.xmlToMetacard(anyString())).thenReturn(mock(Metacard.class)); - when(workspaceTransformer.transform(any(Metacard.class), any(Metacard.class))) - .thenReturn(metacardMap); - - final Optional listMetacardsOptional = - embeddedListMetacardsHandler.metacardValueToJsonValue( - workspaceTransformer, singletonList(""), workspaceMetacard); - - assertTrue( - "The handler did not return any list metacard JSON maps.", - listMetacardsOptional.isPresent()); - - final List listMetacards = listMetacardsOptional.get(); - assertThat(listMetacards, hasSize(1)); - - final Map listMetacardMap = (Map) listMetacards.get(0); - verifyActionList(listMetacardMap); - } - - private void verifyActionList(Map listMetacardMap) { - assertThat(listMetacardMap, hasKey(ACTIONS_KEY)); - List> listMetacardActions = (List) listMetacardMap.get(ACTIONS_KEY); - assertThat(listMetacardActions, hasSize(1)); - final Map actionMap = listMetacardActions.get(0); - assertThat(actionMap, hasEntry("id", LIST_ACTION_PREFIX + ".test")); - assertThat(actionMap, hasEntry("title", "title")); - assertThat(actionMap, hasEntry("description", "description")); - - try { - assertThat(actionMap, hasEntry("url", new URL("http://test.com"))); - } catch (MalformedURLException e) { - fail(e.getMessage()); - } - } - - private Action getMockAction() throws MalformedURLException { - final Action action = mock(Action.class); - doReturn(LIST_ACTION_PREFIX + ".test").when(action).getId(); - doReturn("title").when(action).getTitle(); - doReturn("description").when(action).getDescription(); - - URL url = new URL("http://test.com"); - doReturn(url).when(action).getUrl(); - return action; - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformerImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformerImplTest.java deleted file mode 100644 index c5d8030266a..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/metacard/workspace/transformer/impl/WorkspaceTransformerImplTest.java +++ /dev/null @@ -1,295 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasEntry; -import static org.hamcrest.Matchers.hasKey; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeType; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.impl.AttributeDescriptorImpl; -import ddf.catalog.data.impl.BasicTypes; -import ddf.catalog.data.impl.BinaryContentImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.MetacardTypeImpl; -import ddf.catalog.transform.CatalogTransformerException; -import ddf.catalog.transform.InputTransformer; -import java.io.IOException; -import java.io.InputStream; -import java.io.Serializable; -import java.nio.charset.Charset; -import java.util.Map; -import java.util.Optional; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceKeyTransformation; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceTransformer; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.WorkspaceValueTransformation; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; - -public class WorkspaceTransformerImplTest { - private static final String KEY_TRANSFORMATION_JSON_KEY = "jsonKey"; - - private static final String KEY_TRANSFORMATION_METACARD_KEY = "metacardKey"; - - private static final Serializable KEY_TRANSFORMATION_VALUE = 15.5; - - private static final WorkspaceKeyTransformation KEY_TRANSFORMATION = - new WorkspaceKeyTransformation() { - @Override - public String getMetacardKey() { - return KEY_TRANSFORMATION_METACARD_KEY; - } - - @Override - public String getJsonKey() { - return KEY_TRANSFORMATION_JSON_KEY; - } - }; - - private static final String VALUE_TRANSFORMATION_KEY = "targetKey"; - - private static final int VALUE_TRANSFORMATION_METACARD_VALUE = 10; - - private static final double VALUE_TRANSFORMATION_JSON_VALUE = 10.5; - - private static final WorkspaceValueTransformation VALUE_TRANSFORMATION = - new WorkspaceValueTransformation() { - @Override - public String getKey() { - return VALUE_TRANSFORMATION_KEY; - } - - @Override - public Class getMetacardValueType() { - return Integer.class; - } - - @Override - public Class getJsonValueType() { - return Double.class; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, Integer metacardValue, Metacard workspaceMetacard) { - return Optional.of(VALUE_TRANSFORMATION_JSON_VALUE); - } - - @Override - public Optional jsonValueToMetacardValue( - WorkspaceTransformer transformer, Double jsonValue) { - return Optional.of(VALUE_TRANSFORMATION_METACARD_VALUE); - } - }; - - private static final String UNTRANSFORMED_KEY = "justAKey"; - - private static final String UNTRANSFORMED_VALUE = "justAValue"; - - private static final String METACARD_KEY_TO_REMOVE = "unwantedMetacardKey"; - - private static final WorkspaceValueTransformation METACARD_ATTRIBUTE_REMOVER = - new WorkspaceValueTransformation() { - @Override - public String getKey() { - return METACARD_KEY_TO_REMOVE; - } - - @Override - public Class getMetacardValueType() { - return Object.class; - } - - @Override - public Class getJsonValueType() { - return Object.class; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, Object metacardValue, Metacard workspaceMetacard) { - return Optional.empty(); // remove the metacard attribute - } - - @Override - public Optional jsonValueToMetacardValue( - WorkspaceTransformer transformer, Object jsonValue) { - return Optional.of(jsonValue); - } - }; - - private static final String JSON_KEY_TO_REMOVE = "unwantedJsonKey"; - - private static final WorkspaceValueTransformation JSON_KEY_VALUE_REMOVER = - new WorkspaceValueTransformation() { - @Override - public String getKey() { - return JSON_KEY_TO_REMOVE; - } - - @Override - public Class getMetacardValueType() { - return Object.class; - } - - @Override - public Class getJsonValueType() { - return Object.class; - } - - @Override - public Optional metacardValueToJsonValue( - WorkspaceTransformer transformer, Object metacardValue, Metacard workspaceMetacard) { - return Optional.of(metacardValue); - } - - @Override - public Optional jsonValueToMetacardValue( - WorkspaceTransformer transformer, Object jsonValue) { - return Optional.empty(); // remove the JSON key-value pair - } - }; - - private static final MetacardType DUMMY_METACARD_TYPE = - new MetacardTypeImpl( - "workspace-transformer-test-type", - ImmutableSet.builder() - .add( - dummyAttributeDescriptor(KEY_TRANSFORMATION_METACARD_KEY, BasicTypes.DOUBLE_TYPE)) - .add(dummyAttributeDescriptor(VALUE_TRANSFORMATION_KEY, BasicTypes.INTEGER_TYPE)) - .add(dummyAttributeDescriptor(UNTRANSFORMED_KEY, BasicTypes.STRING_TYPE)) - .add(dummyAttributeDescriptor(METACARD_KEY_TO_REMOVE, BasicTypes.STRING_TYPE)) - .build()); - - private WorkspaceTransformer workspaceTransformer; - - private MetacardImpl metacard; - - private static AttributeDescriptor dummyAttributeDescriptor(String name, AttributeType type) { - return new AttributeDescriptorImpl(name, false, true, false, false, type); - } - - @Before - public void setUp() throws CatalogTransformerException, IOException { - final CatalogFramework mockCatalogFramework = Mockito.mock(CatalogFramework.class); - - doReturn(new BinaryContentImpl(IOUtils.toInputStream("", Charset.defaultCharset()))) - .when(mockCatalogFramework) - .transform(any(Metacard.class), any(String.class), any(Map.class)); - - final InputTransformer mockInputTransformer = Mockito.mock(InputTransformer.class); - - doReturn(new MetacardImpl(DUMMY_METACARD_TYPE)) - .when(mockInputTransformer) - .transform(any(InputStream.class)); - - final EndpointUtil mockEndpointUtils = Mockito.mock(EndpointUtil.class); - when(mockEndpointUtils.convertDateEntries(any(Map.Entry.class))) - .then(invocation -> invocation.getArgument(0)); - - metacard = new MetacardImpl(DUMMY_METACARD_TYPE); - - workspaceTransformer = - new WorkspaceTransformerImpl( - mockCatalogFramework, - mockInputTransformer, - mockEndpointUtils, - ImmutableList.of( - KEY_TRANSFORMATION, - VALUE_TRANSFORMATION, - METACARD_ATTRIBUTE_REMOVER, - JSON_KEY_VALUE_REMOVER)); - } - - @Test - public void testMetacardToMapDirectMapping() { - metacard.setAttribute(UNTRANSFORMED_KEY, UNTRANSFORMED_VALUE); - final Map json = workspaceTransformer.transform(metacard); - assertThat(json, hasEntry(UNTRANSFORMED_KEY, UNTRANSFORMED_VALUE)); - } - - @Test - public void testMetacardToMapRemapKeys() { - metacard.setAttribute(KEY_TRANSFORMATION_METACARD_KEY, KEY_TRANSFORMATION_VALUE); - final Map json = workspaceTransformer.transform(metacard); - assertThat(json, not(hasKey(KEY_TRANSFORMATION_METACARD_KEY))); - assertThat(json, hasEntry(KEY_TRANSFORMATION_JSON_KEY, KEY_TRANSFORMATION_VALUE)); - } - - @Test - public void testMetacardToMapRemapValues() { - metacard.setAttribute(VALUE_TRANSFORMATION_KEY, VALUE_TRANSFORMATION_METACARD_VALUE); - final Map json = workspaceTransformer.transform(metacard); - assertThat(json, hasEntry(VALUE_TRANSFORMATION_KEY, VALUE_TRANSFORMATION_JSON_VALUE)); - } - - @Test - public void testMetacardAttributeRemoval() { - metacard.setAttribute(METACARD_KEY_TO_REMOVE, KEY_TRANSFORMATION_VALUE); - final Map json = workspaceTransformer.transform(metacard); - assertThat(json, not(hasKey(METACARD_KEY_TO_REMOVE))); - } - - @Test - public void testMapToMetacardDirectMapping() { - workspaceTransformer.transformIntoMetacard( - ImmutableMap.of(UNTRANSFORMED_KEY, UNTRANSFORMED_VALUE), metacard); - assertThat(metacard.getAttribute(UNTRANSFORMED_KEY), notNullValue()); - assertThat(metacard.getAttribute(UNTRANSFORMED_KEY).getValue(), is(UNTRANSFORMED_VALUE)); - } - - @Test - public void testMapToMetacardRemapKeys() { - workspaceTransformer.transformIntoMetacard( - ImmutableMap.of(KEY_TRANSFORMATION_JSON_KEY, KEY_TRANSFORMATION_VALUE), metacard); - assertThat(metacard.getAttribute(KEY_TRANSFORMATION_METACARD_KEY), notNullValue()); - assertThat( - metacard.getAttribute(KEY_TRANSFORMATION_METACARD_KEY).getValue(), - is(KEY_TRANSFORMATION_VALUE)); - } - - @Test - public void testMapToMetacardRemapValues() { - workspaceTransformer.transformIntoMetacard( - ImmutableMap.of(VALUE_TRANSFORMATION_KEY, VALUE_TRANSFORMATION_JSON_VALUE), metacard); - assertThat(metacard.getAttribute(VALUE_TRANSFORMATION_KEY), notNullValue()); - assertThat( - metacard.getAttribute(VALUE_TRANSFORMATION_KEY).getValue(), - is(VALUE_TRANSFORMATION_METACARD_VALUE)); - } - - @Test - public void testMapKeyRemoval() { - workspaceTransformer.transformIntoMetacard( - ImmutableMap.of(JSON_KEY_TO_REMOVE, KEY_TRANSFORMATION_VALUE), metacard); - assertThat(metacard.getAttribute(JSON_KEY_TO_REMOVE), nullValue()); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/CqlRequestImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/CqlRequestImplTest.java deleted file mode 100644 index dfc85308df7..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/CqlRequestImplTest.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import static ddf.catalog.Constants.ADDITIONAL_SORT_BYS; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.collection.IsIterableContainingInOrder.contains; -import static org.mockito.Mockito.mock; - -import ddf.catalog.data.Result; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import org.codice.ddf.catalog.ui.CqlParseException; -import org.junit.Before; -import org.junit.Test; -import org.opengis.filter.sort.SortBy; -import org.opengis.filter.sort.SortOrder; - -public class CqlRequestImplTest { - - private CqlRequestImpl cqlRequest; - - private static final String LOCAL_SOURCE = "local"; - - private static final String MODE = "mode"; - - private static final String UPDATE = "update"; - - private static final String CACHE_SOURCE = "cache"; - - private static final String ASC_SORT_ORDER = "asc"; - - private static final String DESC_SORT_ORDER = "desc"; - - private static final String SORT_PROPERTY = "DISTANCE"; - - private static final String CQL = "\"anyText\\\" ILIKE '%'"; - - private static final String BAD_CQL = "unknownFunction(1,2)"; - - private FilterBuilder filterBuilder; - private List sorts; - - @Before - public void setUp() { - cqlRequest = new CqlRequestImpl(); - cqlRequest.setCql(CQL); - cqlRequest.setCount(10); - cqlRequest.setId("anId"); - cqlRequest.setNormalize(true); - sorts = Collections.singletonList(new CqlRequestImpl.Sort(SORT_PROPERTY, ASC_SORT_ORDER)); - cqlRequest.setSorts(sorts); - cqlRequest.setSrc("source"); - cqlRequest.setStart(1); - cqlRequest.setTimeout(1000L); - filterBuilder = mock(FilterBuilder.class); - } - - @Test - public void testGetters() { - assertThat(cqlRequest.getCount(), is(10)); - assertThat(cqlRequest.getCql(), is(CQL)); - assertThat(cqlRequest.getId(), is("anId")); - assertThat(cqlRequest.isNormalize(), is(true)); - assertThat(cqlRequest.getSorts(), is(sorts)); - assertThat(cqlRequest.getSource(), is("source")); - assertThat(cqlRequest.getStart(), is(1)); - assertThat(cqlRequest.getTimeout(), is(1000L)); - } - - @Test - public void testMultipleSorts() throws CqlParseException { - List sorts = new ArrayList<>(); - sorts.add(new CqlRequestImpl.Sort(SORT_PROPERTY, ASC_SORT_ORDER)); - sorts.add(new CqlRequestImpl.Sort("foobar", DESC_SORT_ORDER)); - cqlRequest.setSorts(sorts); - QueryRequest queryRequest = cqlRequest.createQueryRequest("ddf.distribution", filterBuilder); - SortBy firstSort = queryRequest.getQuery().getSortBy(); - assertThat(firstSort.getPropertyName().getPropertyName(), is(SORT_PROPERTY)); - assertThat(firstSort.getSortOrder(), is(SortOrder.ASCENDING)); - SortBy[] sortBys = (SortBy[]) queryRequest.getProperties().get(ADDITIONAL_SORT_BYS); - assertThat(sortBys.length, is(1)); - SortBy secondSort = sortBys[0]; - assertThat(secondSort.getPropertyName().getPropertyName(), is("foobar")); - assertThat(secondSort.getSortOrder(), is(SortOrder.DESCENDING)); - } - - @Test - public void testCreateQueryWithLocalSource() throws CqlParseException { - QueryRequest queryRequest = cqlRequest.createQueryRequest(LOCAL_SOURCE, filterBuilder); - SortBy sortBy = queryRequest.getQuery().getSortBy(); - assertThat(sortBy.getPropertyName().getPropertyName(), is(SORT_PROPERTY)); - assertThat(sortBy.getSortOrder(), is(SortOrder.ASCENDING)); - assertThat(queryRequest.getPropertyValue(MODE), is(UPDATE)); - } - - @Test - public void testCreateQueryWithCacheSource() throws CqlParseException { - cqlRequest.setSorts( - Collections.singletonList(new CqlRequestImpl.Sort(SORT_PROPERTY, DESC_SORT_ORDER))); - cqlRequest.setSrc(CACHE_SOURCE); - QueryRequest queryRequest = cqlRequest.createQueryRequest(CACHE_SOURCE, filterBuilder); - SortBy sortBy = queryRequest.getQuery().getSortBy(); - assertThat(sortBy.getPropertyName().getPropertyName(), is(SORT_PROPERTY)); - assertThat(sortBy.getSortOrder(), is(SortOrder.DESCENDING)); - assertThat(queryRequest.getPropertyValue(MODE), is(CACHE_SOURCE)); - } - - @Test(expected = IllegalArgumentException.class) - public void testBadSortOrder() throws CqlParseException { - cqlRequest.setSorts(Collections.singletonList(new CqlRequestImpl.Sort(SORT_PROPERTY, "bad"))); - cqlRequest.createQueryRequest(CACHE_SOURCE, filterBuilder); - } - - @Test - public void testBadSortOrderString() throws CqlParseException { - cqlRequest.setSorts(Collections.singletonList(new CqlRequestImpl.Sort(SORT_PROPERTY, null))); - QueryRequest queryRequest = cqlRequest.createQueryRequest(LOCAL_SOURCE, filterBuilder); - assertDefaultSortBy(queryRequest); - } - - @Test - public void testBlankSortOrder() throws CqlParseException { - cqlRequest.setSorts(Collections.emptyList()); - QueryRequest queryRequest = cqlRequest.createQueryRequest(LOCAL_SOURCE, filterBuilder); - assertDefaultSortBy(queryRequest); - } - - @Test(expected = CqlParseException.class) - public void testBadCql() throws CqlParseException { - cqlRequest.setCql(BAD_CQL); - cqlRequest.createQueryRequest(LOCAL_SOURCE, filterBuilder); - } - - @Test - public void testBlankLocalSource() throws CqlParseException { - cqlRequest.createQueryRequest("", filterBuilder); - assertThat(cqlRequest.getSource(), is("source")); - } - - @Test - public void testMultipleSources() throws CqlParseException { - ArrayList sources = new ArrayList<>(); - sources.add("local"); - sources.add("source2"); - cqlRequest.setSrcs(sources); - cqlRequest.createQueryRequest("SOURCE1", filterBuilder); - assertThat(cqlRequest.getSrcs(), contains("SOURCE1", "source2")); - assertThat(cqlRequest.getSrcs().size(), is(2)); - } - - @Test - public void testSingleSourceResponseString() throws CqlParseException { - cqlRequest.createQueryRequest("", filterBuilder); - assertThat(cqlRequest.getSourceResponseString(), is("source")); - } - - @Test - public void testMultipleSourceResponseString() throws CqlParseException { - ArrayList sources = new ArrayList<>(); - sources.add("source1"); - sources.add("source2"); - cqlRequest.setSrcs(sources); - cqlRequest.createQueryRequest("source1", filterBuilder); - assertThat(cqlRequest.getSourceResponseString(), is("source1, source2")); - } - - @Test - public void testLocalSource() throws CqlParseException { - cqlRequest.setSrc(LOCAL_SOURCE); - cqlRequest.createQueryRequest(LOCAL_SOURCE, filterBuilder); - assertThat(cqlRequest.getSource(), is(LOCAL_SOURCE)); - } - - private void assertDefaultSortBy(QueryRequest queryRequest) { - SortBy sortBy = queryRequest.getQuery().getSortBy(); - assertThat(sortBy.getPropertyName().getPropertyName(), is(Result.TEMPORAL)); - assertThat(sortBy.getSortOrder(), is(SortOrder.DESCENDING)); - assertThat(queryRequest.getPropertyValue(MODE), is(UPDATE)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/CqlResultImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/CqlResultImplTest.java deleted file mode 100644 index d87c3fbbebe..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/CqlResultImplTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import ddf.action.ActionRegistry; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.ResultImpl; -import ddf.catalog.filter.FilterAdapter; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl; -import ddf.catalog.filter.proxy.builder.GeotoolsFilterBuilder; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import java.util.Collections; -import org.junit.Test; - -public class CqlResultImplTest { - - private FilterBuilder filterBuilder = new GeotoolsFilterBuilder(); - - private FilterAdapter filterAdapter = new GeotoolsFilterAdapterImpl(); - - @Test - public void testInvalidInfiniteDistance() { - distanceCheck(Double.POSITIVE_INFINITY, null); - } - - @Test - public void testInvalidNegativeDistance() { - distanceCheck(-1.0, null); - } - - @Test - public void testValidDistance() { - distanceCheck(123.0, 123.0); - } - - private void distanceCheck(Double input, Double output) { - MetacardImpl metacard = new MetacardImpl(); - ResultImpl result = new ResultImpl(metacard); - result.setDistanceInMeters(input); - ActionRegistry actionRegistry = mock(ActionRegistry.class); - when(actionRegistry.list(any())).thenReturn(Collections.emptyList()); - QueryRequest request = - new QueryRequestImpl( - new QueryImpl(filterBuilder.attribute("test").equalTo().text("value"))); - CqlResultImpl cqlResult = - new CqlResultImpl(result, null, request, false, filterAdapter, actionRegistry); - assertThat(cqlResult.getDistance(), is(output)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/SourceWarningsFilterManagerTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/SourceWarningsFilterManagerTest.java deleted file mode 100644 index 5630f04e081..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/cql/SourceWarningsFilterManagerTest.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.cql; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import ddf.catalog.operation.ProcessingDetails; -import ddf.catalog.security.SourceWarningsFilter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import org.junit.Test; - -public class SourceWarningsFilterManagerTest { - - @Test - public void testNullProcessingDetailsProduceProcessingDetailsWithEmptyWarnings() { - SourceWarningsFilter mockedFilter = mock(SourceWarningsFilter.class); - when(mockedFilter.canFilter(any())).thenReturn(true); - - ProcessingDetails mockedDetailsWithNonEmptyWarnings = mock(ProcessingDetails.class); - when(mockedDetailsWithNonEmptyWarnings.getWarnings()) - .thenReturn(Collections.singletonList("doesn't look empty to me, boss")); - when(mockedFilter.filter(any())).thenReturn(mockedDetailsWithNonEmptyWarnings); - - SourceWarningsFilterManager filterManager = - new SourceWarningsFilterManager(Collections.singletonList(mockedFilter)); - - ProcessingDetails detailsWithFilteredWarnings = filterManager.filterWarningsOf(null); - - assertThat(detailsWithFilteredWarnings, is(notNullValue())); - - assertThat(detailsWithFilteredWarnings.getWarnings(), is(Collections.emptyList())); - } - - @Test - public void testEmptyFiltersProduceProcessingDetailsWithEmptyWarnings() { - SourceWarningsFilterManager filterManager = - new SourceWarningsFilterManager(Collections.emptyList()); - - ProcessingDetails mockedDetailsWithSourceId = mock(ProcessingDetails.class); - when(mockedDetailsWithSourceId.getSourceId()).thenReturn("source id"); - - ProcessingDetails detailsWithFilteredWarnings = - filterManager.filterWarningsOf(mockedDetailsWithSourceId); - - assertThat(detailsWithFilteredWarnings, is(notNullValue())); - - assertThat(detailsWithFilteredWarnings.getWarnings(), is(Collections.emptyList())); - } - - @Test(expected = IllegalArgumentException.class) - public void testNullArgumentToConstructorGeneratesIllegalArgumentException() { - new SourceWarningsFilterManager(null); - } - - @Test - public void testManagerIgnoresNullMemberOfFilters() { - SourceWarningsFilterManager filterManager = - new SourceWarningsFilterManager(Collections.singletonList(null)); - - ProcessingDetails mockedDetailsWithSourceId = mock(ProcessingDetails.class); - when(mockedDetailsWithSourceId.getSourceId()).thenReturn("source id"); - - ProcessingDetails detailsWithFilteredWarnings = - filterManager.filterWarningsOf(mockedDetailsWithSourceId); - - assertThat(detailsWithFilteredWarnings, is(notNullValue())); - - assertThat(detailsWithFilteredWarnings.getWarnings(), is(Collections.emptyList())); - } - - @Test - public void testIncompatibleFilterProducesProcessingDetailsWithEmptyWarnings() { - SourceWarningsFilter mockedFilter = mock(SourceWarningsFilter.class); - when(mockedFilter.canFilter(any(ProcessingDetails.class))).thenReturn(false); - - ProcessingDetails mockedDetailsWithNonEmptyWarnings = mock(ProcessingDetails.class); - when(mockedDetailsWithNonEmptyWarnings.getWarnings()) - .thenReturn( - Collections.singletonList( - "when you gaze into the abyss, the abyss gazes also into you")); - when(mockedFilter.filter(any(ProcessingDetails.class))) - .thenReturn(mockedDetailsWithNonEmptyWarnings); - - SourceWarningsFilterManager filterManager = - new SourceWarningsFilterManager(Collections.singletonList(mockedFilter)); - - ProcessingDetails mockedDetailsWithSourceId = mock(ProcessingDetails.class); - when(mockedDetailsWithSourceId.getSourceId()).thenReturn("source id"); - - ProcessingDetails detailsWithFilteredWarnings = - filterManager.filterWarningsOf(mockedDetailsWithSourceId); - - assertThat(detailsWithFilteredWarnings, is(notNullValue())); - - assertThat(detailsWithFilteredWarnings.getWarnings(), is(Collections.emptyList())); - } - - @Test - public void testCompatibleFilterProducesProcessingDetailsWithFilteredWarnings() { - SourceWarningsFilter mockedFilter = mock(SourceWarningsFilter.class); - when(mockedFilter.canFilter(any(ProcessingDetails.class))).thenReturn(true); - - List filteredWarnings = Collections.singletonList("filtered warnings"); - - ProcessingDetails mockedDetailsWithFilteredWarnings = mock(ProcessingDetails.class); - when(mockedDetailsWithFilteredWarnings.getWarnings()).thenReturn(filteredWarnings); - when(mockedFilter.filter(any(ProcessingDetails.class))) - .thenReturn(mockedDetailsWithFilteredWarnings); - - SourceWarningsFilterManager filterManager = - new SourceWarningsFilterManager(Collections.singletonList(mockedFilter)); - - ProcessingDetails mockedDetailsWithSourceId = mock(ProcessingDetails.class); - when(mockedDetailsWithSourceId.getSourceId()).thenReturn("source id"); - - ProcessingDetails detailsWithFilteredWarnings = - filterManager.filterWarningsOf(mockedDetailsWithSourceId); - - assertThat(detailsWithFilteredWarnings, is(notNullValue())); - - assertThat(detailsWithFilteredWarnings.getWarnings(), is(filteredWarnings)); - } - - @Test - public void testManagerOnlyFiltersWithCompatibleFilterOfHighestPriority() { - List filters = new ArrayList<>(); - - SourceWarningsFilter prioritizedButIncompatibleMockedFilter = mock(SourceWarningsFilter.class); - when(prioritizedButIncompatibleMockedFilter.canFilter(any(ProcessingDetails.class))) - .thenReturn(false); - - ProcessingDetails mockedDetailsWithImproperlyFilteredWarnings = mock(ProcessingDetails.class); - when(mockedDetailsWithImproperlyFilteredWarnings.getWarnings()) - .thenReturn(Collections.singletonList("improperly filtered warnings")); - when(prioritizedButIncompatibleMockedFilter.filter(any(ProcessingDetails.class))) - .thenReturn(mockedDetailsWithImproperlyFilteredWarnings); - filters.add(prioritizedButIncompatibleMockedFilter); - filters.add(null); - - SourceWarningsFilter lessPrioritizedButCompatibleMockedFilter = - mock(SourceWarningsFilter.class); - when(lessPrioritizedButCompatibleMockedFilter.canFilter(any(ProcessingDetails.class))) - .thenReturn(true); - - List properlyFilteredWarnings = Collections.singletonList("properly filtered warnings"); - - ProcessingDetails mockedDetailsWithProperlyFilteredWarnings = mock(ProcessingDetails.class); - when(mockedDetailsWithProperlyFilteredWarnings.getWarnings()) - .thenReturn(properlyFilteredWarnings); - when(lessPrioritizedButCompatibleMockedFilter.filter(any(ProcessingDetails.class))) - .thenReturn(mockedDetailsWithProperlyFilteredWarnings); - filters.add(lessPrioritizedButCompatibleMockedFilter); - - SourceWarningsFilter notPrioritizedButCompatibleMockedFilter = mock(SourceWarningsFilter.class); - when(notPrioritizedButCompatibleMockedFilter.canFilter(any(ProcessingDetails.class))) - .thenReturn(true); - when(notPrioritizedButCompatibleMockedFilter.filter(any(ProcessingDetails.class))) - .thenReturn(mockedDetailsWithImproperlyFilteredWarnings); - filters.add(notPrioritizedButCompatibleMockedFilter); - - SourceWarningsFilterManager filterManager = new SourceWarningsFilterManager(filters); - - ProcessingDetails mockedDetailsWithSourceId = mock(ProcessingDetails.class); - when(mockedDetailsWithSourceId.getSourceId()).thenReturn("source id"); - - ProcessingDetails detailsWithFilteredWarnings = - filterManager.filterWarningsOf(mockedDetailsWithSourceId); - - assertThat(detailsWithFilteredWarnings, is(notNullValue())); - - assertThat(detailsWithFilteredWarnings.getWarnings(), is(properlyFilteredWarnings)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/delegate/SearchTermTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/delegate/SearchTermTest.java deleted file mode 100644 index 9fbba4f107d..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/delegate/SearchTermTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.delegate; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsEqual.equalTo; - -import org.apache.commons.lang.StringUtils; -import org.junit.Test; - -public class SearchTermTest { - @Test - public void exactMatch() { - String inputTerm = "abc"; - SearchTerm searchTerm = new SearchTerm(inputTerm); - assertThat(searchTerm.getTerm(), is(equalTo(inputTerm))); - assertThat(searchTerm.getCqlTerm(), is(equalTo(inputTerm))); - assertThat(searchTerm.match("abc"), is(true)); - assertThat(searchTerm.match("XabcX"), is(false)); - } - - @Test - public void lowCaseMatch() { - String inputTerm = "ABC"; - SearchTerm searchTerm = new SearchTerm(inputTerm); - assertThat(searchTerm.getTerm(), is(equalTo(inputTerm.toLowerCase()))); - assertThat(searchTerm.getCqlTerm(), is(equalTo(inputTerm))); - assertThat(searchTerm.match("abc"), is(true)); - assertThat(searchTerm.match("XabcX"), is(false)); - } - - @Test - public void wildcardSwitch() { - String inputTerm = "a*B"; - SearchTerm searchTerm = new SearchTerm(inputTerm); - assertThat(searchTerm.getTerm(), is(equalTo(inputTerm.toLowerCase()))); - assertThat(searchTerm.getCqlTerm(), is(equalTo("a%B"))); - assertThat(searchTerm.match("aXXXXb"), is(true)); - assertThat(searchTerm.match("xaXXXB"), is(false)); - } - - /** - * While there is no absolute guarantee that this test will fail on any given machine, during - * development and testing, the search against this input value of 1000 'a' with a terminal '!' - * ran for well over a minute before being manually stopped. If performance improves to the point - * where this test fails, we can bump up the search string by another order of magnitude. - * - *

This test will also fail if a future version of Java were to introduce an improved, - * linear-time regex implementation (at which time we could yank this time-limited band-aid); - * however, that's not on the table for J11 so we should expect this to be a necessary workaround - * for the foreseeable future. - */ - @Test - public void questionableMatch() { - String inputTerm = "*(a+)+"; - SearchTerm searchTerm = new SearchTerm(inputTerm); - assertThat(searchTerm.match(StringUtils.repeat("a", 1000) + "!"), is(false)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/geofeature/GazetteerFeatureServiceTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/geofeature/GazetteerFeatureServiceTest.java deleted file mode 100644 index 735b9e46197..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/geofeature/GazetteerFeatureServiceTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.geofeature; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.anyInt; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.codice.ddf.spatial.geocoder.GeoResult; -import org.codice.ddf.spatial.geocoder.GeoResultCreator; -import org.codice.ddf.spatial.geocoding.FeatureQueryException; -import org.codice.ddf.spatial.geocoding.FeatureQueryable; -import org.codice.ddf.spatial.geocoding.GeoEntry; -import org.codice.ddf.spatial.geocoding.GeoEntryQueryException; -import org.codice.ddf.spatial.geocoding.GeoEntryQueryable; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.junit.Before; -import org.junit.Test; -import org.locationtech.jts.geom.Coordinate; -import org.locationtech.jts.geom.Geometry; -import org.locationtech.jts.geom.GeometryFactory; -import org.locationtech.jts.geom.Polygon; -import org.opengis.feature.simple.SimpleFeature; - -public class GazetteerFeatureServiceTest { - private static final GeoEntry GEO_ENTRY_1 = - new GeoEntry.Builder() - .name("Philadelphia") - .latitude(40.0) - .longitude(-71.0) - .featureCode("PPL") - .population(1000000) - .alternateNames("") - .build(); - - private static final GeoEntry GEO_ENTRY_2 = - new GeoEntry.Builder() - .name("Canada") - .latitude(55.0) - .longitude(-100.0) - .featureCode("PCL1") - .countryCode("CA") - .population(10000000) - .alternateNames("") - .build(); - - private static final List SUGGESTED_NAMES = new ArrayList<>(); - - static { - Suggestion suggestion = mock(Suggestion.class); - doReturn("id1").when(suggestion).getId(); - doReturn("name1").when(suggestion).getName(); - SUGGESTED_NAMES.add(suggestion); - } - - private static final String TEST_QUERY = "example"; - - private GazetteerFeatureService gazetteerFeatureService; - - private GeoEntryQueryable geoEntryQueryable; - - private FeatureQueryable featureQueryable; - - @Before - public void setUp() { - geoEntryQueryable = mock(GeoEntryQueryable.class); - featureQueryable = mock(FeatureQueryable.class); - gazetteerFeatureService = new GazetteerFeatureService(); - gazetteerFeatureService.setGeoEntryQueryable(geoEntryQueryable); - gazetteerFeatureService.setFeatureQueryable(featureQueryable); - } - - @Test - public void testGetSuggestedFeatureNames() throws GeoEntryQueryException { - final int maxResults = 2; - doReturn(SUGGESTED_NAMES).when(geoEntryQueryable).getSuggestedNames(anyString(), anyInt()); - - List results = - gazetteerFeatureService.getSuggestedFeatureNames(TEST_QUERY, maxResults); - assertEquals("id1", results.get(0).getId()); - assertEquals("name1", results.get(0).getName()); - } - - @Test - public void testGetCityFeatureById() throws GeoEntryQueryException { - doReturn(GEO_ENTRY_1).when(geoEntryQueryable).queryById(TEST_QUERY); - - SimpleFeature feature = gazetteerFeatureService.getFeatureById(TEST_QUERY); - Geometry geometry = (Geometry) feature.getDefaultGeometry(); - - assertThat(feature.getID(), is(GEO_ENTRY_1.getName())); - assertThat(geometry.getGeometryType(), is("Polygon")); - - GeoResult geoResult = GeoResultCreator.createGeoResult(GEO_ENTRY_1); - double[] p0 = geoResult.getBbox().get(0).getDirectPosition().getCoordinate(); - double[] p1 = geoResult.getBbox().get(1).getDirectPosition().getCoordinate(); - - Coordinate[] expectedCoordinates = - new Coordinate[] { - new Coordinate(p0[0], p1[1]), - new Coordinate(p1[0], p1[1]), - new Coordinate(p1[0], p0[1]), - new Coordinate(p0[0], p0[1]), - new Coordinate(p0[0], p1[1]), - }; - assertThat(geometry.getCoordinates(), is(expectedCoordinates)); - } - - @Test - public void testGetCountryFeatureById() throws GeoEntryQueryException, FeatureQueryException { - doReturn(GEO_ENTRY_2).when(geoEntryQueryable).queryById(TEST_QUERY); - - Coordinate[] countryCoordinates = - new Coordinate[] { - new Coordinate(-104.8, 50.2), - new Coordinate(-95.2, 50.2), - new Coordinate(-95.2, 59.8), - new Coordinate(-104.8, 59.8), - new Coordinate(-104.8, 50.2) - }; - GeometryFactory geometryFactory = new GeometryFactory(); - Polygon countryPolygon = - geometryFactory.createPolygon(geometryFactory.createLinearRing(countryCoordinates), null); - - SimpleFeature expectedFeature = - GazetteerFeatureService.getSimpleFeatureBuilder(countryPolygon) - .buildFeature(GEO_ENTRY_2.getName()); - doReturn(Arrays.asList(expectedFeature)) - .when(featureQueryable) - .query("CAN", GEO_ENTRY_2.getFeatureCode(), 1); - - SimpleFeature feature = gazetteerFeatureService.getFeatureById(TEST_QUERY); - Geometry geometry = (Geometry) feature.getDefaultGeometry(); - - assertThat(feature.getID(), is(GEO_ENTRY_2.getName())); - assertThat(geometry.getGeometryType(), is("Polygon")); - assertThat(geometry.equalsExact((Geometry) expectedFeature.getDefaultGeometry()), is(true)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/handlers/CqlTransformHandlerTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/handlers/CqlTransformHandlerTest.java deleted file mode 100644 index fd428c35426..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/handlers/CqlTransformHandlerTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.handlers; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.Matchers.matchesPattern; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyMap; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import com.google.common.collect.ImmutableList; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import ddf.catalog.data.BinaryContent; -import ddf.catalog.data.impl.BinaryContentImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.transform.QueryResponseTransformer; -import ddf.security.audit.SecurityLogger; -import java.io.ByteArrayInputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.activation.MimeType; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.core.HttpHeaders; -import org.codice.ddf.catalog.ui.query.cql.CqlQueryResponseImpl; -import org.codice.ddf.catalog.ui.query.cql.CqlRequestImpl; -import org.codice.ddf.catalog.ui.util.CqlQueriesImpl; -import org.codice.ddf.catalog.ui.util.EndpointUtil; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.eclipse.jetty.http.HttpStatus; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import spark.Request; -import spark.Response; - -public class CqlTransformHandlerTest { - - private List queryResponseTransformers; - private CqlTransformHandler cqlTransformHandler; - private BinaryContent binaryContent; - - @Mock private ServiceReference mockServiceReference; - @Mock private BundleContext mockBundleContext; - @Mock private EndpointUtil mockEndpointUtil; - @Mock private CqlQueriesImpl mockCqlQueryUtil; - @Mock private Request mockRequest; - @Mock private CqlQueryResponseImpl mockCqlQueryResponse; - @Mock private QueryResponse mockQueryResponse; - @Mock private QueryResponseTransformer mockQueryResponseTransformer; - @Mock private ServletOutputStream mockServletOutputStream; - @Mock private HttpServletResponse mockHttpServletResponse; - @Mock private SecurityLogger securityLogger; - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - private static final String QUERY_PARAM = ":transformerId"; - private static final String RETURN_ID = "kml"; - private static final String OTHER_RETURN_ID = "xml"; - private static final String MIME_TYPE = "application/vnd.google-earth.kml+xml"; - private static final String SAFE_BODY = - "{\"searches\":[{\"srcs\":[\"ddf.distribution\"],\"cql\":\"anyText ILIKE '*'\",\"count\":250}],\"count\":250,\"sorts\":[{\"attribute\":\"modified\",\"direction\":\"descending\"}],\"id\":\"7a491439-948e-431b-815e-a04f32fecec9\"}"; - private static final String CONTENT = "test"; - private static final String SERVICE_NOT_FOUND = "\"Service not found\""; - private static final String SERVICE_SUCCESS = GSON.toJson(""); - private static final String ATTACHMENT_REGEX = - "^attachment;filename=\"export-\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.(\\d{3}){1,2})?Z." - + RETURN_ID - + "\"$"; - - private class MockResponse extends Response { - - private String contentType = ""; - private int statusCode = 0; - private Map headers = new HashMap<>(); - private HttpServletResponse mockHttpServletResponse; - - MockResponse(HttpServletResponse mockHttpServletResponse) { - this.mockHttpServletResponse = mockHttpServletResponse; - } - - @Override - public void type(String contentType) { - this.contentType = contentType; - } - - @Override - public String type() { - return this.contentType; - } - - @Override - public void status(int statusCode) { - this.statusCode = statusCode; - } - - @Override - public int status() { - return this.statusCode; - } - - @Override - public void header(String header, String value) { - headers.put(header, value); - } - - Map getHeaders() { - return this.headers; - } - - @Override - public HttpServletResponse raw() { - return this.mockHttpServletResponse; - } - } - - private MockResponse mockResponse; - - @Before - public void setUp() throws Exception { - - initMocks(this); - - when(mockHttpServletResponse.getOutputStream()).thenReturn(mockServletOutputStream); - - mockResponse = new MockResponse(mockHttpServletResponse); - - queryResponseTransformers = new ArrayList<>(); - - when(mockServiceReference.getProperty(Core.ID)).thenReturn(RETURN_ID); - when(mockServiceReference.getProperty("mime-type")).thenReturn(ImmutableList.of(MIME_TYPE)); - - MimeType mimeType = new MimeType(MIME_TYPE); - binaryContent = new BinaryContentImpl(new ByteArrayInputStream(CONTENT.getBytes()), mimeType); - - queryResponseTransformers.add(mockServiceReference); - - cqlTransformHandler = - new CqlTransformHandler( - queryResponseTransformers, - mockBundleContext, - mockEndpointUtil, - mockCqlQueryUtil, - securityLogger); - - when(mockEndpointUtil.safeGetBody(mockRequest)).thenReturn(SAFE_BODY); - - when(mockCqlQueryUtil.executeCqlQuery(any(CqlRequestImpl.class))) - .thenReturn(mockCqlQueryResponse); - - when(mockCqlQueryResponse.getQueryResponse()).thenReturn(mockQueryResponse); - - when(mockBundleContext.getService(mockServiceReference)) - .thenReturn(mockQueryResponseTransformer); - - when(mockQueryResponseTransformer.transform(any(QueryResponse.class), anyMap())) - .thenReturn(binaryContent); - } - - @Test - public void testNoServiceFound() throws Exception { - when(mockRequest.params(QUERY_PARAM)).thenReturn(OTHER_RETURN_ID); - - String res = GSON.toJson(cqlTransformHandler.handle(mockRequest, mockResponse)); - - assertThat(res, containsString(SERVICE_NOT_FOUND)); - assertThat(mockResponse.status(), is(HttpStatus.NOT_FOUND_404)); - } - - @Test - public void testServiceFoundWithValidResponse() throws Exception { - when(mockRequest.params(QUERY_PARAM)).thenReturn(RETURN_ID); - - String res = GSON.toJson(cqlTransformHandler.handle(mockRequest, mockResponse)); - - assertThat(res, is(SERVICE_SUCCESS)); - assertThat(mockResponse.status(), is(HttpStatus.OK_200)); - assertThat( - mockResponse.getHeaders().get(HttpHeaders.CONTENT_DISPOSITION), - matchesPattern(ATTACHMENT_REGEX)); - assertThat(mockResponse.type(), is(MIME_TYPE)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/AttributeMetacardFormatterTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/AttributeMetacardFormatterTest.java deleted file mode 100644 index 11e31e04d95..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/AttributeMetacardFormatterTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.junit.Test; - -public class AttributeMetacardFormatterTest { - - @Test - public void testFormatNonDefault() { - - String template = "%[attribute=id]"; - - String id = "the-id"; - - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(id); - - AttributeMetacardFormatter attributeMetacardFormatter = new AttributeMetacardFormatter("n/a"); - - String result = attributeMetacardFormatter.format(template, workspaceMetacard, 0L); - - assertThat(result, is(id)); - } - - @Test - public void testFormatDefault() { - - String template = "%[attribute=xyz]"; - - String defaultValue = "n/a"; - - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(); - - AttributeMetacardFormatter attributeMetacardFormatter = - new AttributeMetacardFormatter(defaultValue); - - String result = attributeMetacardFormatter.format(template, workspaceMetacard, 0L); - - assertThat(result, is(defaultValue)); - } - - @Test - public void testComplex() { - String template = - "The workspace '%[attribute=title]' (id: %[attribute=id]) contains up to %[hitCount] query hits."; - - String id = "the-id"; - - WorkspaceMetacardImpl workspaceMetacard = new WorkspaceMetacardImpl(id); - workspaceMetacard.setAttribute("title", "the-title"); - - AttributeMetacardFormatter attributeMetacardFormatter = new AttributeMetacardFormatter("n/a"); - - String result = attributeMetacardFormatter.format(template, workspaceMetacard, 1L); - - assertThat( - result, - is("The workspace 'the-title' (id: the-id) contains up to %[hitCount] query hits.")); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/HitCountFormatterTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/HitCountFormatterTest.java deleted file mode 100644 index fcd53bf3b14..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/HitCountFormatterTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; - -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.junit.Test; - -public class HitCountFormatterTest { - - @Test - public void testFormat() { - HitCountFormatter hitCountFormatter = new HitCountFormatter(); - Long hitCount = 1L; - - String result = - hitCountFormatter.format("%[hitCount]", mock(WorkspaceMetacardImpl.class), hitCount); - - assertThat(result, is(hitCount.toString())); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/ListMetacardFormatterTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/ListMetacardFormatterTest.java deleted file mode 100644 index 7d3b0da8624..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/ListMetacardFormatterTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import java.util.Arrays; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.MetacardFormatter; -import org.junit.Before; -import org.junit.Test; - -public class ListMetacardFormatterTest { - - private MetacardFormatter childFormatter1; - - private MetacardFormatter childFormatter2; - - private String childFormatter1Result; - - private String childFormatter2Result; - - private String template; - - private Long hitCount; - - private WorkspaceMetacardImpl workspaceMetacard; - - private String result; - - @Before - public void setup() { - childFormatter1 = mock(MetacardFormatter.class); - childFormatter2 = mock(MetacardFormatter.class); - - childFormatter1Result = "childFormatter1Result"; - childFormatter2Result = "childFormatter2Result"; - - when(childFormatter1.format(any(), any(), any())).thenReturn(childFormatter1Result); - when(childFormatter2.format(any(), any(), any())).thenReturn(childFormatter2Result); - - ListMetacardFormatter listMetacardFormatter = - new ListMetacardFormatter(Arrays.asList(childFormatter1, childFormatter2)); - - template = "template"; - hitCount = 1L; - workspaceMetacard = mock(WorkspaceMetacardImpl.class); - - result = listMetacardFormatter.format(template, workspaceMetacard, hitCount); - } - - @Test - public void testFormatReturnsSecondChildResult() { - assertThat(result, is(childFormatter2Result)); - } - - @Test - public void testThatFirstChildIsCalled() { - verify(childFormatter1).format(template, workspaceMetacard, hitCount); - } - - @Test - public void testThatSecondChildIsCalledWithFirstChildResult() { - verify(childFormatter2).format(childFormatter1Result, workspaceMetacard, hitCount); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryUpdateSubscriberListTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryUpdateSubscriberListTest.java deleted file mode 100644 index 5a9c9de68b6..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/QueryUpdateSubscriberListTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.hamcrest.Matchers.notNullValue; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - -import java.util.Arrays; -import java.util.Collections; -import java.util.Map; -import org.apache.commons.lang3.tuple.Pair; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.QueryUpdateSubscriber; -import org.junit.Test; -import org.mockito.Mockito; - -public class QueryUpdateSubscriberListTest { - - @Test - public void testNotify() { - QueryUpdateSubscriber childSubscriber = mock(QueryUpdateSubscriber.class); - QueryUpdateSubscriberList queryUpdateSubscriberList = - new QueryUpdateSubscriberList(Collections.singletonList(childSubscriber)); - Map> workspaceMetacardMap = Collections.emptyMap(); - queryUpdateSubscriberList.notify(workspaceMetacardMap); - verify(childSubscriber).notify(workspaceMetacardMap); - } - - /** - * Test that if the first subscriber throws an exception that the second subscriber is still - * called. - */ - @Test - public void testExceptions() { - Map> workspaceMetacardMap = Collections.emptyMap(); - - QueryUpdateSubscriber childSubscriber1 = mock(QueryUpdateSubscriber.class); - QueryUpdateSubscriber childSubscriber2 = mock(QueryUpdateSubscriber.class); - - Mockito.doThrow(RuntimeException.class).when(childSubscriber1).notify(workspaceMetacardMap); - - QueryUpdateSubscriberList queryUpdateSubscriberList = - new QueryUpdateSubscriberList(Arrays.asList(childSubscriber1, childSubscriber2)); - queryUpdateSubscriberList.notify(workspaceMetacardMap); - - verify(childSubscriber2).notify(workspaceMetacardMap); - } - - @Test - public void testToString() { - assertThat(new QueryUpdateSubscriberList(Collections.emptyList()).toString(), notNullValue()); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/SecurityServiceImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/SecurityServiceImplTest.java deleted file mode 100644 index 469ea03a3e1..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/SecurityServiceImplTest.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import org.codice.ddf.security.Security; -import org.junit.Ignore; -import org.junit.Test; -import org.mockito.Mock; - -public class SecurityServiceImplTest { - - @Mock Security security; - /** Just make sure we don't get an exception */ - @Test - @Ignore("We actually do get an exception from Security, an NPE with the keystore.") - public void testGetSystemSubject() { - new SecurityServiceImpl(security).getSystemSubject(); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/SubscriptionsPersistentStoreImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/SubscriptionsPersistentStoreImplTest.java deleted file mode 100644 index a6a64078263..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/SubscriptionsPersistentStoreImplTest.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.codice.ddf.catalog.ui.query.monitor.impl.SubscriptionsPersistentStoreImpl.PAGE_SIZE; -import static org.codice.ddf.catalog.ui.query.monitor.impl.SubscriptionsPersistentStoreImpl.START_INDEX; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.codice.ddf.persistence.PersistenceException; -import org.codice.ddf.persistence.PersistentStore; -import org.junit.Before; -import org.junit.Test; - -public class SubscriptionsPersistentStoreImplTest { - - public static final String EMAIL1 = "test@test.com"; - - public static final String EMAIL2 = "foo@foo.com"; - - public static final String EMAIL3 = "a@a.com"; - - public static final String EMAIL4 = "b@b.com"; - - private static final String IDSTRING = "idstring"; - - private SubscriptionsPersistentStoreImpl store; - - @Before - public void setup() { - - PersistentStore persistentStore = new MemoryPersistentStore(); - - store = new SubscriptionsPersistentStoreImpl(persistentStore); - } - - /** Remove an email from an empty store */ - @Test - public void testRemoveEmailEmpty() { - store.removeEmail(IDSTRING, EMAIL1); - assertThat(store.getEmails(IDSTRING), is(Collections.emptySet())); - } - - @Test - public void testRemoveEmail() { - store.addEmail(IDSTRING, EMAIL1); - store.removeEmail(IDSTRING, EMAIL1); - assertThat(store.getEmails(IDSTRING), is(Collections.emptySet())); - } - - @Test - public void testRemoveAllEmails() { - store.addEmail(IDSTRING, EMAIL1); - store.addEmail(IDSTRING, EMAIL2); - store.removeAllEmails(IDSTRING); - assertThat(store.getEmails(IDSTRING), is(Collections.emptySet())); - } - - @Test - public void testAddEmail() { - - store.addEmail(IDSTRING, EMAIL1); - - Set results = store.getEmails(IDSTRING); - - assertThat(results, is(Collections.singleton(EMAIL1))); - } - - @Test - public void testAddEmails() { - - store.addEmails(IDSTRING, new HashSet<>(Arrays.asList(EMAIL1, EMAIL2))); - - Set results = store.getEmails(IDSTRING); - - assertThat(results, is(new HashSet<>(Arrays.asList(EMAIL1, EMAIL2)))); - } - - @Test - public void testAddEmailsMultiple() { - - store.addEmails(IDSTRING, new HashSet<>(Arrays.asList(EMAIL1, EMAIL2))); - store.addEmails(IDSTRING, new HashSet<>(Arrays.asList(EMAIL3, EMAIL4))); - - Set results = store.getEmails(IDSTRING); - - assertThat(results, is(new HashSet<>(Arrays.asList(EMAIL1, EMAIL2, EMAIL3, EMAIL4)))); - } - - /** Add a single email and then multiple emails */ - @Test - public void testAddEmailsMultiple2() { - - store.addEmail(IDSTRING, EMAIL1); - store.addEmails(IDSTRING, new HashSet<>(Arrays.asList(EMAIL3, EMAIL4))); - - Set results = store.getEmails(IDSTRING); - - assertThat(results, is(new HashSet<>(Arrays.asList(EMAIL1, EMAIL3, EMAIL4)))); - } - - @Test - public void testGetEmailsEmpty() { - assertThat(store.getEmails(IDSTRING), is(Collections.emptySet())); - } - - private static class MemoryPersistentStore implements PersistentStore { - - private Map> map = new HashMap<>(); - - @SuppressWarnings("unchecked") - @Override - public void add(String type, Map properties) throws PersistenceException { - String id = ((String) properties.get("id_txt")).replace("_txt", ""); - Map copy = new HashMap<>(properties); - copy.computeIfPresent( - "email_txt", - (k, v) -> { - if (String.class.isInstance(v)) { - return v; - } - if (Set.class.isInstance(v)) { - Set emails = (Set) v; - if (emails.size() == 1) { - return emails.toArray()[0]; - } else { - return v; - } - } - throw new RuntimeException(); - }); - map.put(id, copy); - } - - @Override - public void add(String type, Collection> items) - throws PersistenceException { - for (Map item : items) { - add(type, item); - } - } - - @Override - public List> get(String type) throws PersistenceException { - throw new RuntimeException("not implemented"); - } - - @Override - public List> get(String type, String ecql) throws PersistenceException { - return get(type, ecql, START_INDEX, PAGE_SIZE); - } - - @Override - public List> get(String type, String ecql, int startIndex, int pageSize) - throws PersistenceException { - String id = ecql.split("=")[1].replaceAll("'", ""); - if (map.containsKey(id)) { - return Collections.singletonList(map.get(id)); - } else { - return Collections.emptyList(); - } - } - - @Override - public int delete(String type, String ecql) throws PersistenceException { - - throw new RuntimeException("not implemented"); - } - - @Override - public int delete(String type, String ecql, int startIndex, int pageSize) - throws PersistenceException { - throw new RuntimeException("not implemented"); - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryBuilderTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryBuilderTest.java deleted file mode 100644 index 8d018df3345..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryBuilderTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.when; - -import ddf.catalog.filter.FilterBuilder; -import java.util.Collections; -import org.codice.ddf.catalog.ui.query.monitor.api.FilterService; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; -import org.opengis.filter.And; -import org.opengis.filter.Filter; -import org.opengis.filter.Or; - -@RunWith(MockitoJUnitRunner.class) -public class WorkspaceQueryBuilderTest { - - @Mock private FilterBuilder filterBuilder; - - @Mock private FilterService filterService; - - @Mock private Filter workspaceTagFilter; - - @Mock private Filter metacardIdFilter; - - @Mock private Or orOfMetacardIdsFilter; - - @Mock private And finalFilter; - - @Test - public void testCreateFilter() { - - String id = "1234"; - - when(filterService.buildWorkspaceTagFilter()).thenReturn(workspaceTagFilter); - - when(filterService.buildMetacardIdFilter(id)).thenReturn(metacardIdFilter); - - when(filterBuilder.anyOf(Collections.singletonList(metacardIdFilter))) - .thenReturn(orOfMetacardIdsFilter); - - when(filterBuilder.allOf(workspaceTagFilter, orOfMetacardIdsFilter)).thenReturn(finalFilter); - - WorkspaceQueryBuilder workspaceQueryBuilder = - new WorkspaceQueryBuilder(filterBuilder, filterService); - - Filter filter = workspaceQueryBuilder.createFilter(Collections.singleton(id)); - - assertThat(filter, is(finalFilter)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryServiceTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryServiceTest.java deleted file mode 100644 index 592504a8795..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceQueryServiceTest.java +++ /dev/null @@ -1,322 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.security.Subject; -import java.io.Serializable; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.Callable; -import java.util.function.Supplier; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.apache.shiro.authc.AuthenticationException; -import org.apache.shiro.authc.AuthenticationToken; -import org.apache.shiro.authz.AuthorizationException; -import org.apache.shiro.authz.Permission; -import org.apache.shiro.session.Session; -import org.apache.shiro.subject.ExecutionException; -import org.apache.shiro.subject.PrincipalCollection; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.FilterService; -import org.codice.ddf.catalog.ui.query.monitor.api.QueryUpdateSubscriber; -import org.codice.ddf.catalog.ui.query.monitor.api.SecurityService; -import org.codice.ddf.catalog.ui.query.monitor.api.WorkspaceService; -import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import org.opengis.filter.And; -import org.opengis.filter.Filter; -import org.opengis.filter.Or; -import org.quartz.Scheduler; -import org.quartz.SchedulerContext; -import org.quartz.SchedulerException; - -public class WorkspaceQueryServiceTest { - - @SuppressWarnings("unchecked") - @Test - public void testRun() - throws SchedulerException, UnsupportedQueryException, SourceUnavailableException, - FederationException { - - String workspaceId = "3"; - - QueryUpdateSubscriber queryUpdateSubscriber = mock(QueryUpdateSubscriber.class); - WorkspaceService workspaceService = mock(WorkspaceService.class); - CatalogFramework catalogFramework = mock(CatalogFramework.class); - FilterBuilder filterBuilder = mock(FilterBuilder.class); - Scheduler scheduler = mock(Scheduler.class); - when(scheduler.getContext()).thenReturn(mock(SchedulerContext.class)); - Supplier> schedulerSupplier = () -> Optional.of(scheduler); - Subject securityServiceSubject = mock(Subject.class); - - SecurityService securityService = - new SecurityService() { - @Override - public Subject getSystemSubject() { - return securityServiceSubject; - } - - @Override - public Map addSystemSubject(Map properties) { - return properties; - } - }; - FilterService filterService = mock(FilterService.class); - when(filterService.getModifiedDateFilter(any())).thenReturn(mock(Filter.class)); - - when(filterBuilder.anyOf(Mockito.any(Filter.class))).thenReturn(mock(Or.class)); - when(filterBuilder.allOf(Mockito.anyVararg())).thenReturn(mock(And.class)); - - WorkspaceQueryServiceImpl workspaceQueryServiceImpl = - new WorkspaceQueryServiceImpl( - queryUpdateSubscriber, - workspaceService, - catalogFramework, - filterBuilder, - schedulerSupplier, - securityService, - filterService); - - workspaceQueryServiceImpl.setQueryTimeInterval(60); - String ecql = "area( Polygon((10 10, 20 10, 20 20, 10 10)) ) BETWEEN 10000 AND 30000"; - - WorkspaceMetacardImpl workspaceMetacard = mock(WorkspaceMetacardImpl.class); - when(workspaceMetacard.getId()).thenReturn(workspaceId); - - QueryMetacardImpl queryMetacardWithSource = mock(QueryMetacardImpl.class); - when(queryMetacardWithSource.getSources()).thenReturn(Collections.singletonList("SomeSource")); - when(queryMetacardWithSource.getCql()).thenReturn(ecql); - - Attribute id1 = mock(Attribute.class); - when(id1.getValue()).thenReturn("1"); - when(queryMetacardWithSource.getAttribute(Metacard.ID)).thenReturn(id1); - - QueryMetacardImpl queryMetacardWithoutSource = mock(QueryMetacardImpl.class); - when(queryMetacardWithoutSource.getSources()).thenReturn(Collections.emptyList()); - when(queryMetacardWithoutSource.getCql()).thenReturn(ecql); - - Attribute id2 = mock(Attribute.class); - when(id2.getValue()).thenReturn("2"); - when(queryMetacardWithoutSource.getAttribute(Metacard.ID)).thenReturn(id2); - - Map>> queryMetacards = - Collections.singletonMap( - id2.getValue().toString(), - new ImmutablePair<>( - workspaceMetacard, - Arrays.asList(queryMetacardWithSource, queryMetacardWithoutSource))); - - when(workspaceService.getQueryMetacards()).thenReturn(queryMetacards); - - long hitCount1 = 10; - long hitCount2 = 20; - - QueryResponse queryResponse = mock(QueryResponse.class); - when(queryResponse.getHits()).thenReturn(hitCount1).thenReturn(hitCount2); - - when(catalogFramework.query(any())).thenReturn(queryResponse); - - workspaceQueryServiceImpl.setSubject( - new Subject() { - @Override - public String getName() { - return ""; - } - - @Override - public Object getPrincipal() { - return null; - } - - @Override - public PrincipalCollection getPrincipals() { - return null; - } - - @Override - public boolean isPermitted(String s) { - return false; - } - - @Override - public boolean isPermitted(Permission permission) { - return false; - } - - @Override - public boolean[] isPermitted(String... strings) { - return new boolean[0]; - } - - @Override - public boolean[] isPermitted(List list) { - return new boolean[0]; - } - - @Override - public boolean isPermittedAll(String... strings) { - return false; - } - - @Override - public boolean isPermittedAll(Collection collection) { - return false; - } - - @Override - public void checkPermission(String s) throws AuthorizationException {} - - @Override - public void checkPermission(Permission permission) throws AuthorizationException {} - - @Override - public void checkPermissions(String... strings) throws AuthorizationException {} - - @Override - public void checkPermissions(Collection collection) - throws AuthorizationException {} - - @Override - public boolean hasRole(String s) { - return false; - } - - @Override - public boolean[] hasRoles(List list) { - return new boolean[0]; - } - - @Override - public boolean hasAllRoles(Collection collection) { - return false; - } - - @Override - public void checkRole(String s) throws AuthorizationException {} - - @Override - public void checkRoles(Collection collection) throws AuthorizationException {} - - @Override - public void checkRoles(String... strings) throws AuthorizationException {} - - @Override - public void login(AuthenticationToken authenticationToken) - throws AuthenticationException {} - - @Override - public boolean isAuthenticated() { - return false; - } - - @Override - public boolean isRemembered() { - return false; - } - - @Override - public Session getSession() { - return null; - } - - @Override - public Session getSession(boolean b) { - return null; - } - - @Override - public void logout() {} - - @Override - public V execute(Callable callable) throws ExecutionException { - try { - return callable.call(); - } catch (Exception e) { - throw new ExecutionException(e); - } - } - - @Override - public void execute(Runnable runnable) {} - - @Override - public Callable associateWith(Callable callable) { - return null; - } - - @Override - public Runnable associateWith(Runnable runnable) { - return null; - } - - @Override - public void runAs(PrincipalCollection principalCollection) - throws NullPointerException, IllegalStateException {} - - @Override - public boolean isRunAs() { - return false; - } - - @Override - public PrincipalCollection getPreviousPrincipals() { - return null; - } - - @Override - public PrincipalCollection releaseRunAs() { - return null; - } - }); - - workspaceQueryServiceImpl.setCronString("0 0 0 * * ?"); - workspaceQueryServiceImpl.setQueryTimeoutMinutes(5L); - workspaceQueryServiceImpl.run(); - ArgumentCaptor securitySubjectCaptor = ArgumentCaptor.forClass(Runnable.class); - verify(securityServiceSubject).execute(securitySubjectCaptor.capture()); - securitySubjectCaptor.getValue().run(); - ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(Map.class); - verify(queryUpdateSubscriber).notify(argumentCaptor.capture()); - - Map queryUpdateSubscriberArgumentRaw = argumentCaptor.getValue(); - - Map> queryUpdateSubscriberArgument = - (Map>) queryUpdateSubscriberArgumentRaw; - - assertThat( - queryUpdateSubscriberArgument.get(workspaceId).getRight(), is(hitCount1 + hitCount2)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceServiceImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceServiceImplTest.java deleted file mode 100644 index 26a491fef59..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/monitor/impl/WorkspaceServiceImplTest.java +++ /dev/null @@ -1,288 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.monitor.impl; - -import static org.codice.ddf.persistence.PersistentStore.PersistenceType.SUBSCRIPTION_TYPE; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.federation.FederationException; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.source.SourceUnavailableException; -import ddf.catalog.source.UnsupportedQueryException; -import ddf.security.SecurityConstants; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import javax.ws.rs.NotFoundException; -import org.codice.ddf.catalog.ui.metacard.query.data.metacard.QueryMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.codice.ddf.catalog.ui.metacard.workspace.transformer.impl.WorkspaceTransformerImpl; -import org.codice.ddf.catalog.ui.query.monitor.api.SecurityService; -import org.codice.ddf.persistence.PersistenceException; -import org.codice.ddf.persistence.PersistentStore; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Answers; -import org.mockito.ArgumentCaptor; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; -import org.opengis.filter.Filter; - -@RunWith(MockitoJUnitRunner.class) -public class WorkspaceServiceImplTest { - - private WorkspaceServiceImpl workspaceServiceImpl; - - private static final String TEST_ID = "123"; - - private static final String TEST_SUBJECT = "subject"; - - @Mock private CatalogFramework catalogFramework; - - @Mock private WorkspaceTransformerImpl workspaceTransformer; - - @Mock private SecurityService securityService; - - @Mock private PersistentStore persistentStore; - - @Mock private WorkspaceQueryBuilder workspaceQueryBuilder; - - @Mock(answer = Answers.RETURNS_DEEP_STUBS) - private FilterBuilder filterBuilder; - - @Mock private QueryResponse queryResponse; - - @Before - public void setup() { - workspaceServiceImpl = - new WorkspaceServiceImpl( - catalogFramework, - workspaceTransformer, - workspaceQueryBuilder, - securityService, - persistentStore, - filterBuilder); - - workspaceServiceImpl.setMaxSubscriptions(100); - } - - private void mockCatalogFrameworkQuery(String id, String subject) - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - PersistenceException { - - when(securityService.addSystemSubject(any())) - .thenReturn(Collections.singletonMap(SecurityConstants.SECURITY_SUBJECT, subject)); - - QueryResponse queryResponse = mock(QueryResponse.class); - Result result = mock(Result.class); - Metacard metacard = mock(Metacard.class); - when(metacard.getMetacardType()).thenReturn(MetacardImpl.BASIC_METACARD); - Attribute attribute = mock(Attribute.class); - when(attribute.getValue()).thenReturn(id); - when(metacard.getAttribute(Metacard.ID)).thenReturn(attribute); - when(metacard.getTags()).thenReturn(Collections.singleton(WorkspaceConstants.WORKSPACE_TAG)); - when(persistentStore.get(eq(SUBSCRIPTION_TYPE.toString()), anyString(), eq(0), eq(100))) - .thenReturn(Collections.singletonList(Collections.singletonMap("id_txt", id))); - - when(result.getMetacard()).thenReturn(metacard); - - List resultList = Collections.singletonList(result); - when(queryResponse.getResults()).thenReturn(resultList); - when(catalogFramework.query(any())).thenReturn(queryResponse); - Filter filter = mock(Filter.class); - when(workspaceQueryBuilder.createFilter(Collections.singleton(id))).thenReturn(filter); - } - - @Test - public void testGetWorkspaceMetacards() - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - PersistenceException { - - mockCatalogFrameworkQuery(TEST_ID, TEST_SUBJECT); - - List workspaceMetacards = workspaceServiceImpl.getWorkspaceMetacards(); - - assertMetacardList(TEST_ID, TEST_SUBJECT, workspaceMetacards); - } - - @Test - public void testGetEmptyWorkspaceMetacards() { - List workspaceMetacards = - workspaceServiceImpl.getWorkspaceMetacards(Collections.emptySet()); - - assertThat(workspaceMetacards, hasSize(0)); - } - - private void assertMetacardList( - String id, String subject, List workspaceMetacards) - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(QueryRequest.class); - verify(catalogFramework).query(argumentCaptor.capture()); - - assertThat( - argumentCaptor.getValue().getProperties().get(SecurityConstants.SECURITY_SUBJECT), - is(subject)); - assertThat(workspaceMetacards, hasSize(1)); - assertThat(workspaceMetacards.get(0).getId(), is(id)); - } - - @Test - public void testGetWorkspaceMetacardsByWorkspaceId() - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - PersistenceException { - - mockCatalogFrameworkQuery(TEST_ID, TEST_SUBJECT); - - List workspaceMetacards = - workspaceServiceImpl.getWorkspaceMetacards(Collections.singleton(TEST_ID)); - - assertMetacardList(TEST_ID, TEST_SUBJECT, workspaceMetacards); - } - - @SuppressWarnings("unchecked") - @Test - public void testGetWorkspaceMetacardsByWorkspaceIdWithException() - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - PersistenceException { - - mockCatalogFrameworkQuery(TEST_ID, TEST_SUBJECT); - when(catalogFramework.query(any())).thenThrow(UnsupportedQueryException.class); - - List workspaceMetacards = - workspaceServiceImpl.getWorkspaceMetacards(Collections.singleton(TEST_ID)); - - assertThat(workspaceMetacards, hasSize(0)); - } - - /** - * If the catalog framework throws an exception, then getWorkspaceMetacards should return an empty - * list. - * - * @throws UnsupportedQueryException - * @throws SourceUnavailableException - * @throws FederationException - * @throws PersistenceException - */ - @SuppressWarnings("unchecked") - @Test - public void testGetWorkspaceMetacardsWithException() - throws UnsupportedQueryException, SourceUnavailableException, FederationException, - PersistenceException { - - mockCatalogFrameworkQuery(TEST_ID, TEST_SUBJECT); - when(catalogFramework.query(any())).thenThrow(UnsupportedQueryException.class); - - List workspaceMetacards = workspaceServiceImpl.getWorkspaceMetacards(); - - assertThat(workspaceMetacards, hasSize(0)); - } - - @Test - public void testToString() { - assertThat(workspaceServiceImpl.toString(), notNullValue()); - } - - @Test - public void testGetEmptyQueryMetacards() { - WorkspaceMetacardImpl workspace = mock(WorkspaceMetacardImpl.class); - doReturn("workspaceId").when(workspace).getId(); - - List queries = workspaceServiceImpl.getQueryMetacards(workspace); - - assertThat(queries, hasSize(0)); - } - - @Test - public void testGetQueryMetacards() - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - WorkspaceMetacardImpl workspace = mock(WorkspaceMetacardImpl.class); - doReturn(Arrays.asList("queryId1", "queryId2")).when(workspace).getQueries(); - - List queryResults = getMockQueryResults(); - - doReturn(queryResponse).when(catalogFramework).query(any(QueryRequest.class)); - - when(queryResponse.getResults()).thenReturn(queryResults); - - List queries = workspaceServiceImpl.getQueryMetacards(workspace); - - assertThat(queries, hasSize(2)); - } - - @Test - public void testGetWorkspaceMetacardFromQueryId() - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - WorkspaceMetacardImpl workspace = new WorkspaceMetacardImpl("workspaceId"); - - doReturn(queryResponse).when(catalogFramework).query(any(QueryRequest.class)); - - List workspaceResults = Collections.singletonList(getMockResult(workspace)); - when(queryResponse.getResults()).thenReturn(workspaceResults); - - WorkspaceMetacardImpl workspaceMetacard = - workspaceServiceImpl.getWorkspaceFromQueryId("queryId"); - - assertThat(workspaceMetacard.getId(), is("workspaceId")); - } - - @Test(expected = NotFoundException.class) - public void testGetNonExistentWorkspaceMetacardFromQueryID() - throws UnsupportedQueryException, SourceUnavailableException, FederationException { - doReturn(queryResponse).when(catalogFramework).query(any(QueryRequest.class)); - - when(queryResponse.getResults()).thenReturn(Collections.emptyList()); - - workspaceServiceImpl.getWorkspaceFromQueryId("queryId"); - } - - private List getMockQueryResults() { - return Arrays.asList(getMockResult("queryId1"), getMockResult("queryId2")); - } - - private Result getMockResult(Metacard metacard) { - Result result = mock(Result.class); - doReturn(metacard).when(result).getMetacard(); - return result; - } - - private Result getMockResult(String id) { - Metacard metacard = mock(Metacard.class); - MetacardType metacardType = mock(MetacardType.class); - - doReturn(id).when(metacard).getId(); - doReturn(metacardType).when(metacard).getMetacardType(); - - return getMockResult(metacard); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/DmsCoordinateProcessorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/DmsCoordinateProcessorTest.java deleted file mode 100644 index e7a8749cc6c..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/DmsCoordinateProcessorTest.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsEqual.equalTo; - -import com.google.common.collect.ImmutableList; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.junit.Test; - -public class DmsCoordinateProcessorTest { - private final DmsCoordinateProcessor processor = new DmsCoordinateProcessor(); - - @Test - public void testDmsStringSingleCoordinate() { - assertSuggestion( - "28°56\'26\"N 117°38\'11\"W", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940555, -117.636388))); - } - - @Test - public void testDmsStringPartialSeconds() { - assertSuggestion( - "28°56\'26.012\"N 117°38\'11.933\"W", - "DMS: [ 28°56'26.012\"N 117°38'11.933\"W ]", - ImmutableList.of(new LatLon(28.940559, -117.636648))); - } - - @Test - public void testDmsStringLongPartialSeconds() { - assertSuggestion( - "28°56\'26.012222222222222222222222222222222222222222222222222222222\"N 117°38\'11.92222222222222222222222222222222222222222222222222222222\"W", - "DMS: [ 28°56'26.012\"N 117°38'11.922\"W ]", - ImmutableList.of(new LatLon(28.940559, -117.636648))); - } - - @Test - public void testDmsStringUnnecessaryDecimalOmitted() { - assertSuggestion( - "28°56\'26.000000000000000000000\"N 117°38\'11.\"W", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940556, -117.6363889))); - } - - @Test - public void testDmsStringExtraneousSymbols() { - assertSuggestion( - "*28^&*56(*&26\\N 117°38s11:OW", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940555, -117.636388))); - } - - @Test - public void testDmsStringNumbersPreceding() { - assertSuggestion( - "44,44.28°56\'26\"N 117°38\'11\"W", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940555, -117.636388))); - } - - @Test - public void testDmsStringNoSymbolBetweenSecondsAndDirection() { - assertSuggestion( - "28°56\'26N 117°38\'11W", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940555, -117.636388))); - } - - @Test - public void testDmsStringNumbersFollowing() { - assertSuggestion( - "28°56\'26\"N 117°38\'11\"W44", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940555, -117.636388))); - } - - @Test - public void testDmsStringIgnoresNumbersAndSymbolsPrecedingLonDegrees() { - assertSuggestion( - "28°56\'26\"N 34.117°38\'11\"W44", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940555, -117.636388))); - } - - @Test - public void testDmsStringOnlyNumbers() { - assertSuggestion( - "28 56 26 N 117 38 11 W", - "DMS: [ 28°56'26\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(28.940555, -117.636388))); - } - - @Test - public void testDmsStringAtLatBoundary() { - assertSuggestion( - "90°00\'00\"N 117°38\'11\"W", - "DMS: [ 90°00'00\"N 117°38'11\"W ]", - ImmutableList.of(new LatLon(90.0, -117.636388))); - } - - @Test - public void testDmsStringAtLonBoundary() { - assertSuggestion( - "28°56\'26\"N 180°00\'00\"W", - "DMS: [ 28°56'26\"N 180°00'00\"W ]", - ImmutableList.of(new LatLon(28.940555, -180.0))); - } - - @Test - public void testDmsStringAllZeros() { - assertSuggestion( - "0°0\'0\"S 0°0\'0\"E", - "DMS: [ 00°00'00\"S 000°00'00\"E ]", - ImmutableList.of(new LatLon(0.0, 0.0))); - } - - @Test - public void testDmsStringNoDirection() { - assertSuggestionDoesNotExist("28°56\'26\" 117°38\'11\""); - } - - @Test - public void testDmsStringDoesNotMatchOnPartOfLatDegrees() { - assertSuggestionDoesNotExist("140°56\'26\"N 117°38\'11\"W"); - } - - @Test - public void testDmsStringDoesNoSeparationBetweenDegreesMinutesSeconds() { - assertSuggestionDoesNotExist("405626\"N 1173811\"W"); - } - - @Test - public void testDmsStringLatDegreesMissing() { - assertSuggestionDoesNotExist("56\'26\"N 117°38\'11\"W"); - } - - @Test - public void testDmsStringLatDegreesTooLarge() { - assertSuggestionDoesNotExist("91°56\'26\"N 117°38\'11\"W"); - } - - @Test - public void testDmsStringLonDegreesTooLarge() { - assertSuggestionDoesNotExist("28°56\'26\"N 181°38\'11\"W"); - } - - @Test - public void testDmsStringLatMinutesTooLarge() { - assertSuggestionDoesNotExist("28°60\'26\"N 117°38\'11\"W"); - } - - @Test - public void testDmsStringLonMinutesTooLarge() { - assertSuggestionDoesNotExist("28°56\'26\"N 117°60\'11\"W"); - } - - @Test - public void testDmsStringLatSecondsTooLarge() { - assertSuggestionDoesNotExist("28°56\'60\"N 117°38\'11\"W"); - } - - @Test - public void testDmsStringLonSecondsTooLarge() { - assertSuggestionDoesNotExist("28°56\'26\"N 117°38\'60\"W"); - } - - @Test - public void testDmsStringConvertedLatTooLarge() { - assertSuggestionDoesNotExist("90°00\'01\"N 117°38\'11\"W"); - } - - @Test - public void testDmsStringConvertedLonTooLarge() { - assertSuggestionDoesNotExist("28°56\'26\"N 180°00\'01\"W"); - } - - @Test - public void testDmsStringMultipleCoordinates() { - assertSuggestion( - "28°56\'26\"S 117°38\'11.64564\"E28;56;26S 117°38\'11\"QQW%WWEQW@!!!!!! 28°56\'26\"N 117°38\'11\"e", - "DMS: [ 28°56'26\"S 117°38'11.646\"E ] [ 28°56'26\"S 117°38'11\"W ] [ 28°56'26\"N 117°38'11\"E ]", - ImmutableList.of( - new LatLon(-28.940555, 117.636568), - new LatLon(-28.940555, -117.636388), - new LatLon(28.940555, 117.636388))); - } - - private void assertSuggestionDoesNotExist(String query) { - List list = new LinkedList<>(); - processor.enhanceResults(list, query); - assertThat(list, is(empty())); - } - - private void assertSuggestion(String query, String expectedName, List expectedGeo) { - List list = new LinkedList<>(); - processor.enhanceResults(list, query); - assertThat(list, hasSize(1)); - - LiteralSuggestion literalSuggestion = (LiteralSuggestion) list.get(0); - assertThat(literalSuggestion.getId(), is("LITERAL-DMS")); - assertThat(literalSuggestion.getName(), is(expectedName)); - assertThat(literalSuggestion.hasGeo(), is(true)); - - List actualGeo = literalSuggestion.getGeo(); - List diff = new ArrayList<>(); - assertThat( - "Actual geo and expected geo are not the same size", - actualGeo.size(), - is(equalTo(expectedGeo.size()))); - for (int i = 0; i < expectedGeo.size(); i++) { - LatLon actual = actualGeo.get(i); - LatLon expected = expectedGeo.get(i); - Double latDiff = actual.getLat() - expected.getLat(); - Double lonDiff = actual.getLon() - expected.getLon(); - - if (Math.abs(latDiff) > 0.00001 || Math.abs(lonDiff) > 0.00001) { - diff.add(actual); - } - } - assertThat("Actual geo is not the same as the expected geo", diff, is(empty())); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/LatLonCoordinateProcessorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/LatLonCoordinateProcessorTest.java deleted file mode 100644 index a94dc39f566..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/LatLonCoordinateProcessorTest.java +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.hasSize; - -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.stream.Collectors; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.hamcrest.Description; -import org.hamcrest.TypeSafeMatcher; -import org.junit.Test; - -public class LatLonCoordinateProcessorTest { - private final LatLonCoordinateProcessor processor = new LatLonCoordinateProcessor(); - - @Test - public void testProcessorIgnoresSingleValue() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "0"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorIgnoresSingleValueWithTrailingPeriod() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "0."); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorDetectsOrigin() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "0 0"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(0.0, 0.0))); - } - - @Test - public void testProcessorDetectsOriginWithLeadingDecimals() { - List suggestions = enhanceAndReturn(new LinkedList<>(), ".0 .0"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(0.0, 0.0))); - } - - @Test - public void testProcessorDetectsWholeNumbers() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 123"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(50.0, 123.0))); - } - - @Test - public void testProcessorIgnoresTooLargeLonWholeNumber() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 1234"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorIgnoresTooSmallLonWholeNumber() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 -1234"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorIgnoresTooLargeLonDecimal() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 1234.1234"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorIgnoresTooSmallLonDecimal() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 -1234.1234"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorDetectsNegativeLonWholeNumber() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 -123"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(50.0, -123.0))); - } - - @Test - public void testProcessorDetectsLonDecimalWithoutWhole() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 .1234"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(50.0, 0.1234))); - } - - @Test - public void testProcessorDetectsNegativeLonDecimalWithoutWhole() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 -.1234"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(50.0, -0.1234))); - } - - @Test - public void testProcessorDetectsLonDecimal() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "50 123.1234"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(50.0, 123.1234))); - } - - @Test - public void testProcessorIgnoresTooLargeLatWholeNumber() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "95, 34"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorIgnoresTooSmallLatWholeNumber() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "-95 34"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorIgnoresTooLargeLatDecimal() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "1234.1234 34"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorIgnoresTooSmallLatDecimal() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "-1234.1234 34"); - assertThat(suggestions, empty()); - } - - @Test - public void testProcessorDetectsNegativeLatWholeNumber() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "-56, 34"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(-56.0, 34.0))); - } - - @Test - public void testProcessorDetectsLatDecimalWithoutWhole() { - List suggestions = enhanceAndReturn(new LinkedList<>(), ".1234 34"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(0.1234, 34.0))); - } - - @Test - public void testProcessorDetectsNegativeLatDecimalWithoutWhole() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "-.1234 34"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(-0.1234, 34.0))); - } - - @Test - public void testProcessorDetectsLatDecimal() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "56.789 34"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(56.789, 34.0))); - } - - @Test - public void testProcessorDetectsAndGracefullyHandlesMassiveDecimals() { - String massiveDecimal = "50.123456789012345678901234567890123456789012345678901234567890"; - List suggestions = - enhanceAndReturn(new LinkedList<>(), massiveDecimal + " " + massiveDecimal); - assertThat(suggestions, hasSize(1)); - } - - @Test - public void testProcessorHandlesOddNumberOfInputs() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "89, 110, -46, 67, -120"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(89.0, 110.0), coord(-46.0, 67.0))); - } - - @Test - public void testProcessorHandlesOddNumberOfInputsInvalidLatitudeInMiddle() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "89 46 99 67 -120"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(89.0, 46.0), coord(67.0, -120.0))); - } - - @Test - public void testProcessorHandlesOddNumberOfInputsInvalidLatitudeAtBeginning() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "99, 89, 46, 67, -120"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(89.0, 46.0), coord(67.0, -120.0))); - } - - @Test - public void testProcessorHandlesOddNumberOfInvalidLongitudeAtEnd() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "-38, 89, 46, 189, -120"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(-38.0, 89.0))); - } - - @Test - public void testProcessorIgnoresInvalidLongitudeInMiddle() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "38, 189, -46, 89"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(-46.0, 89.0))); - } - - @Test - public void testProcessorIgnoresInvalidLongitudeAtEnd() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "89, 46, 67, -220"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(89.0, 46.0))); - } - - @Test - public void testRegexDetectsLatLonCommaSpaced() { - List suggestions = enhanceAndReturn(new LinkedList<>(), "12.153, -39.0352"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(12.153, -39.0352))); - } - - @Test - public void testRegexDetectsLatLonParentheses() { - List suggestions = - enhanceAndReturn(new LinkedList<>(), "(12.153, -39.0352), (21.098, 19.148)"); - assertThat( - cast(suggestions).get(0), hasCoordinates(coord(12.153, -39.0352), coord(21.098, 19.148))); - } - - @Test - public void testRegexDetectsLatLonBrackets() { - List suggestions = - enhanceAndReturn(new LinkedList<>(), "[12.153, -39.0352], [21.098, 19.148]"); - assertThat( - cast(suggestions).get(0), hasCoordinates(coord(12.153, -39.0352), coord(21.098, 19.148))); - } - - @Test - public void testRegexDetectsLatLonCurlyBraces() { - List suggestions = - enhanceAndReturn(new LinkedList<>(), "{12.153, -39.0352}, {21.098, 19.148}"); - assertThat( - cast(suggestions).get(0), hasCoordinates(coord(12.153, -39.0352), coord(21.098, 19.148))); - } - - @Test - public void testRegexDetectsScatteredCoords() { - List suggestions = - enhanceAndReturn(new LinkedList<>(), "blah;;;3g-12j.098 4.1"); - assertThat(cast(suggestions).get(0), hasCoordinates(coord(3.0, -12.0), coord(0.098, 4.1))); - } - - @Test - // TODO DDF-4242: Future improvement ... allow whitespace between relevant symbols: "- 14" & ".12" - public void testRegexIgnoresStandaloneSymbols() { - List suggestions = - enhanceAndReturn(new LinkedList<>(), "blah10.19205123gagne . - -.12 . 12 - 14"); - // The below assertion's latter coord would change from 12.0 & 14.0 --> 0.12 & -14.0 - assertThat( - cast(suggestions).get(0), hasCoordinates(coord(10.19205123, -0.12), coord(12.0, 14.0))); - } - - @Test - public void testRegexIgnoresStandaloneSymbolsChainedTwice() { - List suggestions = - enhanceAndReturn(new LinkedList<>(), "blah10.19205123gagne .. -- -.12 . 12 - 14"); - assertThat( - cast(suggestions).get(0), hasCoordinates(coord(10.19205123, -0.12), coord(12.0, 14.0))); - } - - @Test - public void testRegexIgnoresStandaloneSymbolsChainedThrice() { - List suggestions = - enhanceAndReturn(new LinkedList<>(), "blah10.19205123gagne ... --- -.12 . 12 - 14"); - assertThat( - cast(suggestions).get(0), hasCoordinates(coord(10.19205123, -0.12), coord(12.0, 14.0))); - } - - private List enhanceAndReturn(List input, String query) { - processor.enhanceResults(input, query); - return input; - } - - private static List cast(List suggestions) { - return suggestions.stream().map(LiteralSuggestion.class::cast).collect(Collectors.toList()); - } - - private static LatLon coord(Double lat, Double lon) { - return new LatLon(lat, lon); - } - - private static org.hamcrest.Matcher hasCoordinates(LatLon... coords) { - return new TypeSafeMatcher() { - @Override - public void describeTo(final Description description) { - description - .appendText("coordinates should be on the object ") - .appendValue(Arrays.asList(coords)); - } - - @Override - protected void describeMismatchSafely( - final LiteralSuggestion item, final Description mismatchDescription) { - mismatchDescription.appendText(" was ").appendValue(item.getGeo()); - } - - @Override - protected boolean matchesSafely(final LiteralSuggestion item) { - return item.hasGeo() && item.getGeo().containsAll(Arrays.asList(coords)); - } - }; - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/MgrsCoordinateProcessorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/MgrsCoordinateProcessorTest.java deleted file mode 100644 index 97c66625624..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/MgrsCoordinateProcessorTest.java +++ /dev/null @@ -1,425 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.both; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.hasSize; - -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.stream.Collectors; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.codice.usng4j.impl.CoordinateSystemTranslatorImpl; -import org.hamcrest.Description; -import org.hamcrest.TypeSafeMatcher; -import org.junit.Test; - -public class MgrsCoordinateProcessorTest { - private final MgrsCoordinateProcessor processor = - new MgrsCoordinateProcessor(new CoordinateSystemTranslatorImpl()); - - @Test - public void testProcessorDetectsZone() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4Q"))); - } - - @Test - public void testProcessorDetectsTwoZones() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q 10P"); - assertThat(detectedMgrsStrings, both(hasSize(2)).and(contains("4Q", "10P"))); - } - - @Test - public void testProcessorDetectsTwoZonesNoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q10P"); - assertThat(detectedMgrsStrings, both(hasSize(2)).and(contains("4Q", "10P"))); - } - - @Test - public void testProcessorDetectsHundredKm() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ"))); - } - - @Test - public void testProcessorDetectsHundredKmNoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJ"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ"))); - } - - @Test - public void testProcessorDetectsTwoHundredKm() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 10P EG"); - assertThat(detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ", "10PEG"))); - } - - @Test - public void testProcessorDetectsTwoHundredKmNoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJ10PEG"); - assertThat(detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ", "10PEG"))); - } - - @Test - public void testProcessorIgnoresExtraneousHundredKm() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ EG"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ"))); - } - - @Test - public void testProcessorIgnoresExtraneousHundredKmNoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJEG"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ"))); - } - - @Test - public void testProcessorIgnoresExtraneousHundredKmFollowedByZone() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ EG 10P"); - assertThat(detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ", "10P"))); - } - - @Test - public void testProcessorIgnoresExtraneousHundredKmFollowedByZoneNoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJEG10P"); - assertThat(detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ", "10P"))); - } - - @Test - public void testProcessorDoesNotUseNextZoneDigitsAsPartOfPreviousNumeric() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("14T11 7Q22"); - assertThat( - detectedMgrsStrings, both(hasSize(2)).and(contains("14T0000100001", "7Q0000200002"))); - } - - @Test - public void testProcessorDetectsPrecision1() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1 6"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0000100006"))); - } - - @Test - public void testProcessorDetectsPrecision1NoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 16"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0000100006"))); - } - - @Test - public void testProcessorDetectsPrecision1NoSpaceAtAll() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJ16"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0000100006"))); - } - - @Test - public void testProcessorDetectsPrecision2() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 12 67"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0001200067"))); - } - - @Test - public void testProcessorDetectsPrecision2OffsetLeft() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 126 7"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0012600007"))); - } - - @Test - public void testProcessorDetectsPrecision2OffsetRight() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1 267"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0000100267"))); - } - - @Test - public void testProcessorDetectsPrecision2NoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1267"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0001200067"))); - } - - @Test - public void testProcessorDetectsPrecision2NoSpaceAtAll() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJ1267"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0001200067"))); - } - - @Test - public void testProcessorDetectsPrecision3() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 123 678"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0012300678"))); - } - - @Test - public void testProcessorDetectsPrecision3OffsetLeft() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1236 78"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0123600078"))); - } - - @Test - public void testProcessorDetectsPrecision3OffsetRight() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 12 3678"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0001203678"))); - } - - @Test - public void testProcessorDetectsPrecision3NoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 123678"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0012300678"))); - } - - @Test - public void testProcessorDetectsPrecision3NoSpaceAtAll() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJ123678"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0012300678"))); - } - - @Test - public void testProcessorDetectsPrecision4() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1234 6789"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0123406789"))); - } - - @Test - public void testProcessorDetectsPrecision4OffsetLeft() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 12346 789"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ1234600789"))); - } - - @Test - public void testProcessorDetectsPrecision4OffsetRight() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 123 46789"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0012346789"))); - } - - @Test - public void testProcessorDetectsPrecision4NoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 12346789"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0123406789"))); - } - - @Test - public void testProcessorDetectsPrecision4NoSpaceAtAll() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJ12346789"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0123406789"))); - } - - @Test - public void testProcessorDetectsPrecision5() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 12345 67891"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ1234567891"))); - } - - @Test - public void testProcessorDetectsPrecision5OffsetLeft() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 123456 7891"); - assertThat( - detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ0012300456", "4QFJ0007800091"))); - } - - @Test - public void testProcessorDetectsPrecision5OffsetRight() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1234 567891"); - assertThat( - detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ0001200034", "4QFJ0056700891"))); - } - - @Test - public void testProcessorDetectsPrecision5NoSpace() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1234567891"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ1234567891"))); - } - - @Test - public void testProcessorDetectsPrecision5NoSpaceAtAll() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QFJ1234567891"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ1234567891"))); - } - - @Test - public void testProcessorHandlesAttemptedPrecision6() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 123456 789123"); - assertThat( - detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ0012300456", "4QFJ0078900123"))); - } - - @Test - public void testProcessorHandlesAttemptedPrecision7() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ 1234567 8912345"); - assertThat( - detectedMgrsStrings, both(hasSize(2)).and(contains("4QFJ0012300456", "4QFJ0089100234"))); - } - - @Test - public void testProcessorIsNotCaseSensitive() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4qFj123456"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0012300456"))); - } - - @Test - public void testProcessorIsNotSymbolSensitive() { - List detectedMgrsStrings = - processor.getMgrsCoordinateStrings("39U VR 283 391, 39U VR 283 392"); - assertThat( - detectedMgrsStrings, both(hasSize(2)).and(contains("39UVR0028300391", "39UVR0028300392"))); - } - - @Test - public void testProcessorSymbolsOverrideWhitespace() { - List detectedMgrsStrings = - processor.getMgrsCoordinateStrings("39U VR 283,391, 39U VR 283 392"); - assertThat( - detectedMgrsStrings, - both(hasSize(3)).and(contains("39UVR0000200008", "39UVR0000300009", "39UVR0028300392"))); - } - - @Test - public void testProcessorIgnoresInvalidZoneLetters() { - List zoneWithA = processor.getMgrsCoordinateStrings("14A"); - List zoneWithB = processor.getMgrsCoordinateStrings("14B"); - List zoneWithI = processor.getMgrsCoordinateStrings("14I"); - List zoneWithO = processor.getMgrsCoordinateStrings("14O"); - List zoneWithY = processor.getMgrsCoordinateStrings("14Y"); - List zoneWithZ = processor.getMgrsCoordinateStrings("14Z"); - - assertThat(zoneWithA, hasSize(0)); - assertThat(zoneWithB, hasSize(0)); - assertThat(zoneWithI, hasSize(0)); - assertThat(zoneWithO, hasSize(0)); - assertThat(zoneWithY, hasSize(0)); - assertThat(zoneWithZ, hasSize(0)); - } - - @Test - public void testProcessorIgnoresInvalidZoneNumbers() { - List zoneZero = processor.getMgrsCoordinateStrings("0D"); - List zoneSixtyOne = processor.getMgrsCoordinateStrings("61D"); - List zoneThreeDigits = processor.getMgrsCoordinateStrings("100D"); - assertThat(zoneZero, hasSize(0)); - assertThat(zoneSixtyOne, hasSize(0)); - assertThat(zoneThreeDigits, hasSize(0)); - } - - @Test - public void testProcessorIgnoresInvalid100KmLetters() { - List kmIJ = processor.getMgrsCoordinateStrings("14Q IJ"); - List kmOJ = processor.getMgrsCoordinateStrings("14Q OJ"); - List kmJI = processor.getMgrsCoordinateStrings("14Q JI"); - List kmJO = processor.getMgrsCoordinateStrings("14Q JO"); - List kmJW = processor.getMgrsCoordinateStrings("14Q JW"); - List kmJX = processor.getMgrsCoordinateStrings("14Q JX"); - List kmJY = processor.getMgrsCoordinateStrings("14Q JY"); - List kmJZ = processor.getMgrsCoordinateStrings("14Q JZ"); - - assertThat(kmIJ, both(hasSize(1)).and(contains("14Q"))); - assertThat(kmOJ, both(hasSize(1)).and(contains("14Q"))); - assertThat(kmJI, both(hasSize(1)).and(contains("14Q"))); - assertThat(kmJO, both(hasSize(1)).and(contains("14Q"))); - assertThat(kmJW, both(hasSize(1)).and(contains("14Q"))); - assertThat(kmJX, both(hasSize(1)).and(contains("14Q"))); - assertThat(kmJY, both(hasSize(1)).and(contains("14Q"))); - assertThat(kmJZ, both(hasSize(1)).and(contains("14Q"))); - } - - @Test - public void testProcessorIgnoresDuplicateZone() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("1D 1D"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("1D"))); - } - - @Test - public void testProcessorDetectsDuplicateZoneIfMoreSpecificsFollow() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("1D 1D FJ"); - assertThat(detectedMgrsStrings, both(hasSize(2)).and(contains("1D", "1DFJ"))); - } - - @Test - public void testProcessorDetectsZone100kReuse() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("1D FJ 1 2 3 4 5 6"); - assertThat( - detectedMgrsStrings, - both(hasSize(3)).and(contains("1DFJ0000100002", "1DFJ0000300004", "1DFJ0000500006"))); - } - - @Test - public void testProcessorDetectsOnlyZoneReuse() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("1D 1 2 3 4 5 6"); - assertThat( - detectedMgrsStrings, - both(hasSize(3)).and(contains("1D0000100002", "1D0000300004", "1D0000500006"))); - } - - @Test - public void testProcessorDetectsDuplicateCoordsWithZoneReuse() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("1D FJ 1 2 1 2 1 2"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("1DFJ0000100002"))); - } - - @Test - public void testProcessorCanInferPrecision() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4Q FJ B12345"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4QFJ0001200034"))); - } - - @Test - public void testProcessorFallsBackToZoneWhen100KmGridIsWrong() { - List detectedMgrsStrings = processor.getMgrsCoordinateStrings("4QJ1"); - assertThat(detectedMgrsStrings, both(hasSize(1)).and(contains("4Q"))); - } - - @Test - public void testProcessorDetectsMultipleMgrsCoordinatesWithDelimiter() { - List suggestions = new LinkedList<>(); - processor.enhanceResults(suggestions, "4Q, 1D"); - validateHasCoordinates( - suggestions, - coord(19.828721744493368, -163.77046585527026), - coord(-67.19807978145084, -188.61742944126627)); - } - - private static void validateHasCoordinates(List suggestions, LatLon... lls) { - assertThat(suggestions, hasSize(1)); - List literalSuggestions = cast(suggestions); - assertThat(literalSuggestions.get(0).getGeo(), hasSize(lls.length)); - assertThat(literalSuggestions.get(0), hasCoordinates(lls)); - } - - private static List cast(List suggestions) { - return suggestions.stream().map(LiteralSuggestion.class::cast).collect(Collectors.toList()); - } - - private static LatLon coord(Double lat, Double lon) { - return new LatLon(lat, lon); - } - - private static org.hamcrest.Matcher hasCoordinates(LatLon... coords) { - return new TypeSafeMatcher() { - @Override - public void describeTo(final Description description) { - description - .appendText("coordinates should be on the object ") - .appendValue(Arrays.asList(coords)); - } - - @Override - protected void describeMismatchSafely( - final LiteralSuggestion item, final Description mismatchDescription) { - mismatchDescription.appendText(" was ").appendValue(item.getGeo()); - } - - @Override - protected boolean matchesSafely(final LiteralSuggestion item) { - return item.hasGeo() && item.getGeo().containsAll(Arrays.asList(coords)); - } - }; - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/UtmUpsCoordinateProcessorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/UtmUpsCoordinateProcessorTest.java deleted file mode 100644 index 086a2df2cbf..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/suggestion/UtmUpsCoordinateProcessorTest.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.suggestion; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.closeTo; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.core.Is.is; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import org.codice.ddf.spatial.geocoding.Suggestion; -import org.codice.usng4j.CoordinateSystemTranslator; -import org.codice.usng4j.impl.CoordinateSystemTranslatorImpl; -import org.junit.Test; - -public class UtmUpsCoordinateProcessorTest { - - private CoordinateSystemTranslator translator = new CoordinateSystemTranslatorImpl(); - - private UtmUpsCoordinateProcessor processor = new UtmUpsCoordinateProcessor(translator); - - @Test - public void testUtmStringNorthernHemisphere() { - assertSuggestion( - "17R 522908mE 2853543mN", "UTM: [ 17R 522908mE 2853543mN ]", 25.799891, -80.771484); - } - - @Test - public void testUtmStringNorthernHemisphereWithMultipleSpaces() { - assertSuggestion( - "17R 522908mE 2853543mN", "UTM: [ 17R 522908mE 2853543mN ]", 25.799891, -80.771484); - } - - @Test - public void testUtmStringNorthernHemisphereWithTabs() { - assertSuggestionDoesNotExist(String.format("%s\t%s\t%s", "17R", "522908mE", "2853543mN")); - } - - @Test - public void testUtmStringSouthernHemisphere() { - assertSuggestion( - "13M 604276mE 9805713mN", "UTM: [ 13M 604276mE 9805713mN ]", -1.757537, -104.062500); - } - - @Test - public void testUtmStringZoneTooSmall() { - assertSuggestionDoesNotExist("00N 234789mE 234789mN"); - } - - @Test - public void testUtmStringZoneTooBig() { - assertSuggestion( - "61P 508378mE 967744mN", "UTM: [ 1P 508378mE 967744mN ]", 8.754795, -176.923828); - } - - @Test - public void testUtmStringBadLatBand() { - assertSuggestionDoesNotExist("13I 234789mE 234789mN"); - } - - @Test - public void testUtmStringWithoutLatBand() { - List list = new ArrayList<>(); - processor.enhanceResults(list, "13 234789mE 234789mN"); - assertThat(list, hasSize(2)); - - assertSuggestion( - (LiteralSuggestion) list.get(0), - "UTM: [ 13 234789mE 234789mN ] (Northern)", - 2.122350, - -107.384318); - assertSuggestion( - (LiteralSuggestion) list.get(1), - "UTM: [ 13 234789mE 234789mN ] (Southern)", - -86.716923, - -164.055897); - } - - @Test - public void testUtmStringWithNegativeNorthing() { - assertSuggestionDoesNotExist("13N 234789mE -234789mN"); - } - - @Test - public void testUtmStringWithNLatitudeBand() { - List list = new ArrayList<>(); - processor.enhanceResults(list, "13N 234789mE 234789mN"); - assertThat(list, hasSize(2)); - - assertSuggestion( - (LiteralSuggestion) list.get(0), "UTM: [ 13N 234789mE 234789mN ]", 2.122350, -107.384318); - assertSuggestion( - (LiteralSuggestion) list.get(1), - "UTM: [ 13 234789mE 234789mN ] (Northern)", - 2.122350, - -107.384318); - } - - @Test - public void testUtmStringWithSLatitudeBand() { - List list = new ArrayList<>(); - processor.enhanceResults(list, "19S 634900mE 4004219mN"); - assertThat(list, hasSize(2)); - - assertSuggestion( - (LiteralSuggestion) list.get(0), "UTM: [ 19S 634900mE 4004219mN ]", 36.173357, -67.500000); - assertSuggestion( - (LiteralSuggestion) list.get(1), - "UTM: [ 19 634900mE 4004219mN ] (Southern)", - -54.092504, - -66.937300); - } - - @Test - public void testUtmStringWithNorthernHemisphereIndicator() { - assertSuggestion( - "17R 522908mE 2853543mN N", "UTM: [ 17R 522908mE 2853543mN ]", 25.799891, -80.771484); - } - - @Test - public void testUtmStringWithSouthernHemisphereIndicator() { - assertSuggestion( - "17R 522908mE 2853543mN S", "UTM: [ 17R 522908mE 2853543mN ]", 25.799891, -80.771484); - } - - @Test - public void testUtmStringWithInvalidNSIndicator() { - assertSuggestion( - "17R 522908mE 2853543mN R", "UTM: [ 17R 522908mE 2853543mN ]", 25.799891, -80.771484); - } - - @Test - public void testUtmStringWithLowerCaseLatBand() { - assertSuggestion( - "17r 522908mE 2853543mN", "UTM: [ 17R 522908mE 2853543mN ]", 25.799891, -80.771484); - } - - @Test - public void testUpsStringWithInvalidLatBand() { - assertSuggestionDoesNotExist("C 2347891mE 2347891mN"); - } - - @Test - public void testUpsString() { - assertSuggestion("A 2347891mE 2347891mN", "UPS: [ A 2347891mE 2347891mN ]", -85.570691, 45.0); - } - - @Test - public void testUpsStringWithoutEastingUnits() { - assertSuggestion("A 2347891 2347891mN", "UPS: [ A 2347891mE 2347891mN ]", -85.570691, 45.0); - } - - @Test - public void testUpsStringWithoutNorthingUnits() { - assertSuggestion("A 2347891mE 2347891", "UPS: [ A 2347891mE 2347891mN ]", -85.570691, 45.0); - } - - @Test - public void testUpsStringWithRedundantZoneZero() { - assertSuggestion("0A 2347891mE 2347891mN", "UPS: [ A 2347891mE 2347891mN ]", -85.570691, 45.0); - } - - @Test - public void testUpsStringDisregardsNorthIndicator() { - assertSuggestion("A 2347891mE 2347891mN N", "UPS: [ A 2347891mE 2347891mN ]", -85.570691, 45.0); - } - - @Test - public void testUpsStringDisregardsSouthIndicator() { - assertSuggestion("A 2347891mE 2347891mN S", "UPS: [ A 2347891mE 2347891mN ]", -85.570691, 45.0); - } - - @Test - public void testUtmFollowedByUtm() { - assertSuggestion( - "13N 234789mE 234789mN 22X 234789mE 8592442mN", - "UTM: [ 13N 234789mE 234789mN ] [ 22X 234789mE 8592442mN ]", - 2.122350, - -107.384318, - 77.190666, - -61.773164); - } - - @Test - public void testUtmWithoutUnitLabelFollowedByUtm() { - assertSuggestion( - "13N 234789mE 234789 22X 234789mE 8592442mN", - "UTM: [ 13N 234789mE 234789mN ] [ 22X 234789mE 8592442mN ]", - 2.122350, - -107.384318, - 77.190666, - -61.773164); - } - - @Test - public void testUpsFollowedByUps() { - assertSuggestion( - "A 2347891mE 2347891mN B 1077891mE 1077891mN", - "UPS: [ A 2347891mE 2347891mN ] [ B 1077891mE 1077891mN ]", - -85.570691, - 45.0, - -78.293449, - -135.0); - } - - @Test - public void testUpsWithoutUnitLabelFollowedByUps() { - assertSuggestion( - "A 2347891mE 2347891 B 1077891mE 1077891mN", - "UPS: [ A 2347891mE 2347891mN ] [ B 1077891mE 1077891mN ]", - -85.570691, - 45.0, - -78.293449, - -135.0); - } - - @Test - public void testUtmFollowedByUps() { - assertSuggestion( - "13N 234789mE 234789mN B 1077891mE 1077891mN", - "UTM/UPS: [ 13N 234789mE 234789mN ] [ B 1077891mE 1077891mN ]", - 2.122350, - -107.384318, - -78.293449, - -135.0); - } - - @Test - public void testUtmWithoutUnitLabelFollowedByUps() { - assertSuggestion( - "13N 234789mE 234789 B 1077891mE 1077891mN", - "UTM/UPS: [ 13N 234789mE 234789mN ] [ B 1077891mE 1077891mN ]", - 2.122350, - -107.384318, - -78.293449, - -135.0); - } - - @Test - public void testUpsFollowedByUtm() { - assertSuggestion( - "B 1077891mE 1077891mN 13N 234789mE 234789mN", - "UTM/UPS: [ B 1077891mE 1077891mN ] [ 13N 234789mE 234789mN ]", - -78.293449, - -135.0, - 2.122350, - -107.384318); - } - - @Test - public void testUpsWithoutUnitLabelFollowedByUtm() { - assertSuggestion( - "B 1077891mE 1077891 13N 234789mE 234789mN", - "UTM/UPS: [ B 1077891mE 1077891mN ] [ 13N 234789mE 234789mN ]", - -78.293449, - -135.0, - 2.122350, - -107.384318); - } - - private void assertSuggestionDoesNotExist(String query) { - List list = new LinkedList<>(); - processor.enhanceResults(list, query); - assertThat(list, is(empty())); - } - - private void assertSuggestion(String query, String expectedName, double... expectedLatLons) { - List list = new LinkedList<>(); - processor.enhanceResults(list, query); - assertThat(list, hasSize(1)); - - LiteralSuggestion literalSuggestion = (LiteralSuggestion) list.get(0); - assertSuggestion(literalSuggestion, expectedName, expectedLatLons); - } - - private void assertSuggestion( - LiteralSuggestion actualSuggestion, String expectedName, double... expectedLatLons) { - assertThat(actualSuggestion.getId(), is("LITERAL-UTM-UPS")); - assertThat(actualSuggestion.getName(), is(expectedName)); - assertThat(actualSuggestion.hasGeo(), is(true)); - assertThat(expectedLatLons.length % 2, is(0)); - assertThat(expectedLatLons.length / 2, is(actualSuggestion.getGeo().size())); - int i = 0; - for (LatLon latLon : actualSuggestion.getGeo()) { - assertThat(latLon.getLat(), is(closeTo(expectedLatLons[i], 0.00001))); - assertThat(latLon.getLon(), is(closeTo(expectedLatLons[i + 1], 0.00001))); - i += 2; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/validate/CqlValidationHandlerTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/validate/CqlValidationHandlerTest.java deleted file mode 100644 index 5a55a5340a5..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/query/validate/CqlValidationHandlerTest.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.query.validate; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.proxy.builder.GeotoolsFilterBuilder; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import org.codice.ddf.catalog.ui.validation.QueryValidator; -import org.codice.ddf.catalog.ui.validation.impl.violation.QueryValidationViolationImpl; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation; -import org.junit.Test; -import org.opengis.filter.Filter; -import spark.Request; -import spark.Response; - -public class CqlValidationHandlerTest { - - private CqlValidationHandler cqlValidationHandler; - - private CqlRequestParser parser = mock(CqlRequestParser.class); - - private QueryValidators queryValidators = mock(QueryValidators.class); - - private FilterBuilder filterBuilder = new GeotoolsFilterBuilder(); - - @Test - public void testHandleUnknownValidatorId() throws Exception { - when(queryValidators.get(any())).thenReturn(null); - QueryRequest queryRequest = - createQueryRequest(filterBuilder.attribute("attr").is().text("val"), "src"); - when(parser.parse(any())).thenReturn(queryRequest); - Request request = mock(Request.class); - when(request.params(":validatorId")).thenReturn("invalidId"); - Response response = mock(Response.class); - - cqlValidationHandler = new CqlValidationHandler(queryValidators, parser); - Object objResponse = cqlValidationHandler.handle(request, response); - - verify(response).status(404); - Map jsonResponse = (Map) objResponse; - assertThat(jsonResponse.get("error"), is("No validator matching id invalidId")); - assertThat((List) jsonResponse.get("validationViolations"), hasSize(0)); - } - - @Test - public void testHandleOneValidatorOneViolation() throws Exception { - QueryValidationViolation violation = - new QueryValidationViolationImpl( - QueryValidationViolation.Severity.ERROR, - "there was an error", - ImmutableMap.of("k", "v")); - QueryValidator validator = mock(QueryValidator.class); - when(validator.validate(any())).thenReturn(ImmutableSet.of(violation)); - when(validator.getValidatorId()).thenReturn("id"); - when(queryValidators.get("id")).thenReturn(validator); - QueryRequest queryRequest = mock(QueryRequest.class); - when(parser.parse(any())).thenReturn(queryRequest); - Request request = mock(Request.class); - when(request.params(":validatorId")).thenReturn("id"); - Response response = mock(Response.class); - - cqlValidationHandler = new CqlValidationHandler(queryValidators, parser); - Object objResponse = cqlValidationHandler.handle(request, response); - - Map jsonResponse = (Map) objResponse; - List violations = (List) jsonResponse.get("validationViolations"); - assertThat(violations, hasSize(1)); - assertViolation( - (Map) violations.get(0), - QueryValidationViolation.Severity.ERROR, - "there was an error", - ImmutableMap.of("k", "v"), - "id"); - } - - @Test - public void testHandleOneValidatorTwoViolations() throws Exception { - QueryValidationViolation violation1 = - new QueryValidationViolationImpl( - QueryValidationViolation.Severity.ERROR, "ONE", ImmutableMap.of("k1", "v1")); - QueryValidationViolation violation2 = - new QueryValidationViolationImpl( - QueryValidationViolation.Severity.WARNING, "TWO", ImmutableMap.of("k2", "v2")); - QueryValidator validator = mock(QueryValidator.class); - when(validator.validate(any())).thenReturn(ImmutableSet.of(violation1, violation2)); - when(validator.getValidatorId()).thenReturn("id"); - when(queryValidators.get("id")).thenReturn(validator); - QueryRequest queryRequest = mock(QueryRequest.class); - when(parser.parse(any())).thenReturn(queryRequest); - Request request = mock(Request.class); - when(request.params(":validatorId")).thenReturn("id"); - Response response = mock(Response.class); - - cqlValidationHandler = new CqlValidationHandler(queryValidators, parser); - Object objResponse = cqlValidationHandler.handle(request, response); - - Map jsonResponse = (Map) objResponse; - List violations = (List) jsonResponse.get("validationViolations"); - assertThat(violations, hasSize(2)); - assertViolation( - (Map) violations.get(0), - QueryValidationViolation.Severity.ERROR, - "ONE", - ImmutableMap.of("k1", "v1"), - "id"); - assertViolation( - (Map) violations.get(1), - QueryValidationViolation.Severity.WARNING, - "TWO", - ImmutableMap.of("k2", "v2"), - "id"); - } - - private void assertViolation( - Map actualViolation, - QueryValidationViolation.Severity severity, - String message, - Map extras, - String validatorId) { - assertThat(actualViolation.get("severity"), is(severity)); - assertThat(actualViolation.get("message"), is(message)); - assertThat(actualViolation.get("extraData"), is(extras)); - assertThat(actualViolation.get("type"), is(validatorId)); - } - - private QueryRequest createQueryRequest(Filter filter, String... sourceIds) { - return new QueryRequestImpl(new QueryImpl(filter), Arrays.asList(sourceIds)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlAccessPluginTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlAccessPluginTest.java deleted file mode 100644 index 54c661be160..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlAccessPluginTest.java +++ /dev/null @@ -1,375 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.forms.data.AttributeGroupType.ATTRIBUTE_GROUP_TAG; -import static org.codice.ddf.catalog.ui.forms.data.QueryTemplateType.QUERY_TEMPLATE_TAG; -import static org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants.WORKSPACE_TAG; -import static org.codice.ddf.catalog.ui.security.accesscontrol.AclTestSupport.metacardFromAttributes; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.catalog.plugin.AccessPlugin; -import ddf.catalog.plugin.StopProcessingException; -import ddf.security.SubjectIdentity; -import java.util.Map; -import org.apache.shiro.subject.Subject; -import org.apache.shiro.util.ThreadContext; -import org.junit.Before; -import org.junit.Test; - -/** - * Verify enforcement of the ACL list. Some tests may at first look incorrect, since a few of the - * verifications do not reflect how the system actually behaves, but instead how this plugin should - * decide to allow or deny the request within the context of everything else that happens. - * - *

Note the default subject is {@link #USER_EINSTEIN}, but that can be overridden in a test by - * first calling {@link #setSubject(String)}. - */ -public class AccessControlAccessPluginTest { - - private static final String USER_NEWTON = "newton@localhost.local"; - - private static final String USER_EINSTEIN = "einstein@localhost.local"; - - private static final String USER_DIJKSTRA = "dijkstra@localhost.local"; - - private static final String METACARD_ID = "100"; - - private static final String RESOURCE_TAG = "resource"; - - private AccessPlugin accessPlugin; - - @Before - public void setUp() { - setSubject(USER_EINSTEIN); - } - - private void setSubject(String user) { - ThreadContext.unbindSubject(); - Subject subject = mock(Subject.class); - SubjectIdentity subjectIdentity = mock(SubjectIdentity.class); - when(subjectIdentity.getUniqueIdentifier(subject)).thenReturn(user); - ThreadContext.bind(subject); - - accessPlugin = new AccessControlAccessPlugin(subjectIdentity); - } - - private UpdateRequest getUpdateRequest(String id, Metacard metacard) { - return new UpdateRequestImpl(id, metacard); - } - - @Test - public void testOwnerCanModify() throws StopProcessingException { - verifyUserWithAttributeCanModifyUnprotectedAttribute(Core.METACARD_OWNER); - } - - @Test - public void testAccessIndividualsReadCanModify() throws StopProcessingException { - verifyUserWithAttributeCanModifyUnprotectedAttribute(Security.ACCESS_INDIVIDUALS_READ); - } - - @Test - public void testAccessIndividualsCanModify() throws StopProcessingException { - verifyUserWithAttributeCanModifyUnprotectedAttribute(Security.ACCESS_INDIVIDUALS); - } - - @Test - public void testAccessAdminsCanModify() throws StopProcessingException { - verifyUserWithAttributeCanModifyUnprotectedAttribute(Security.ACCESS_ADMINISTRATORS); - } - - /** - * If an unprotected attribute was modified, then the plugin does not care who modified it and - * allows the request to continue. As of this writing, the {@code FilterPlugin} handles instances - * of a user with {@link Security#ACCESS_INDIVIDUALS_READ} attempting to modify any attributes on - * the metacard. - * - *

The choice of {@link Core#TITLE} for this set of tests was arbitrary. It is not an ACL - * attribute and therefore is sufficient for the needs of the test. - */ - private void verifyUserWithAttributeCanModifyUnprotectedAttribute(String securityAttribute) - throws StopProcessingException { - Metacard before = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - securityAttribute, - ImmutableSet.of(USER_EINSTEIN), - Core.TITLE, - "title1", - Core.METACARD_TAGS, - WORKSPACE_TAG)); - Metacard after = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - securityAttribute, - ImmutableSet.of(USER_EINSTEIN), - Core.TITLE, - "title2", - Core.METACARD_TAGS, - WORKSPACE_TAG)); - - UpdateRequest update = getUpdateRequest(METACARD_ID, after); - accessPlugin.processPreUpdate(update, ImmutableMap.of(METACARD_ID, before)); - } - - @Test - public void testPluginIgnoresNoOpForOwner() throws StopProcessingException { - verifyPluginIgnoresNoOpForAttribute(Core.METACARD_OWNER); - } - - @Test - public void testPluginIgnoresNoOpForIndividualsRead() throws StopProcessingException { - verifyPluginIgnoresNoOpForAttribute(Security.ACCESS_INDIVIDUALS_READ); - } - - @Test - public void testPluginIgnoresNoOpForIndividuals() throws StopProcessingException { - verifyPluginIgnoresNoOpForAttribute(Security.ACCESS_INDIVIDUALS); - } - - @Test - public void testPluginIgnoresNoOpForAdmins() throws StopProcessingException { - verifyPluginIgnoresNoOpForAttribute(Security.ACCESS_ADMINISTRATORS); - } - - /** - * If the metacard didn't change, then it doesn't matter who invoked the operation. The plugin - * will allow the request to continue. - */ - private void verifyPluginIgnoresNoOpForAttribute(String securityAttribute) - throws StopProcessingException { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - securityAttribute, - USER_NEWTON, - Core.METACARD_TAGS, - WORKSPACE_TAG)); - - Map updates = ImmutableMap.of(METACARD_ID, metacard); - UpdateRequest update = getUpdateRequest(METACARD_ID, metacard); - - assertThat(accessPlugin.processPreUpdate(update, updates), is(update)); - } - - @Test(expected = StopProcessingException.class) - public void testUserNotOnAclCannotUpdateIndividualsRead() throws StopProcessingException { - verifyUserNotOnAclCannotUpdateAttribute(Security.ACCESS_INDIVIDUALS_READ); - } - - @Test(expected = StopProcessingException.class) - public void testUserNotOnAclCannotUpdateIndividuals() throws StopProcessingException { - verifyUserNotOnAclCannotUpdateAttribute(Security.ACCESS_INDIVIDUALS); - } - - @Test(expected = StopProcessingException.class) - public void testUserNotOnAclCannotUpdateAdmins() throws StopProcessingException { - verifyUserNotOnAclCannotUpdateAttribute(Security.ACCESS_ADMINISTRATORS); - } - - /** - * Parameterized test for verifying behavior when ACL attributes themselves are changed by a user - * not found on any of the ACL attributes. These operations should never be allowed to - * succeed. - */ - private void verifyUserNotOnAclCannotUpdateAttribute(String securityAttribute) - throws StopProcessingException { - Metacard before = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_NEWTON, - securityAttribute, - ImmutableSet.of(USER_DIJKSTRA), - Core.METACARD_TAGS, - WORKSPACE_TAG)); - Metacard after = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_NEWTON, - securityAttribute, - ImmutableSet.of(), - Core.METACARD_TAGS, - WORKSPACE_TAG)); - - UpdateRequest update = getUpdateRequest(METACARD_ID, after); - accessPlugin.processPreUpdate(update, ImmutableMap.of(METACARD_ID, before)); - } - - @Test - public void testIndividualCanBecomeAdminOnResources() throws StopProcessingException { - verifyIndividualTryingToBecomeAdminForTag(RESOURCE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testIndividualCannotBecomeAdminOnWorkspaces() throws StopProcessingException { - verifyIndividualTryingToBecomeAdminForTag(WORKSPACE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testIndividualCannotBecomeAdminOnSearchForms() throws StopProcessingException { - verifyIndividualTryingToBecomeAdminForTag(QUERY_TEMPLATE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testIndividualCannotBecomeAdminOnResultForms() throws StopProcessingException { - verifyIndividualTryingToBecomeAdminForTag(ATTRIBUTE_GROUP_TAG); - } - - private void verifyIndividualTryingToBecomeAdminForTag(String metacardTag) - throws StopProcessingException { - Metacard before = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_NEWTON, - Security.ACCESS_INDIVIDUALS, - ImmutableSet.of(USER_EINSTEIN), - Core.METACARD_TAGS, - metacardTag)); - Metacard after = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_NEWTON, - Security.ACCESS_ADMINISTRATORS, - ImmutableSet.of(USER_EINSTEIN), - Core.METACARD_TAGS, - metacardTag)); - - UpdateRequest update = getUpdateRequest(METACARD_ID, after); - accessPlugin.processPreUpdate(update, ImmutableMap.of(METACARD_ID, before)); - } - - @Test - public void testIndividualCanBecomeOwnerOnResources() throws StopProcessingException { - verifyIndividualTryingToBecomeOwnerForTag(RESOURCE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testIndividualCannotBecomeOwnerOnWorkspaces() throws StopProcessingException { - verifyIndividualTryingToBecomeOwnerForTag(WORKSPACE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testIndividualCannotBecomeOwnerOnSearchForms() throws StopProcessingException { - verifyIndividualTryingToBecomeOwnerForTag(QUERY_TEMPLATE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testIndividualCannotBecomeOwnerOnResultForms() throws StopProcessingException { - verifyIndividualTryingToBecomeOwnerForTag(ATTRIBUTE_GROUP_TAG); - } - - private void verifyIndividualTryingToBecomeOwnerForTag(String metacardTag) - throws StopProcessingException { - Metacard before = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_NEWTON, - Security.ACCESS_INDIVIDUALS, - ImmutableSet.of(USER_EINSTEIN), - Core.METACARD_TAGS, - metacardTag)); - Metacard after = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_EINSTEIN, - Core.METACARD_TAGS, - metacardTag)); - - UpdateRequest update = getUpdateRequest(METACARD_ID, after); - accessPlugin.processPreUpdate(update, ImmutableMap.of(METACARD_ID, before)); - } - - @Test - public void testAdminCanBecomeOwnerOnResources() throws StopProcessingException { - verifyAdminTryingToBecomeOwnerForTag(RESOURCE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testAdminCannotBecomeOwnerOnWorkspaces() throws StopProcessingException { - verifyAdminTryingToBecomeOwnerForTag(WORKSPACE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testAdminCannotBecomeOwnerOnSearchForms() throws StopProcessingException { - verifyAdminTryingToBecomeOwnerForTag(QUERY_TEMPLATE_TAG); - } - - @Test(expected = StopProcessingException.class) - public void testAdminCannotBecomeOwnerOnResultForms() throws StopProcessingException { - verifyAdminTryingToBecomeOwnerForTag(ATTRIBUTE_GROUP_TAG); - } - - private void verifyAdminTryingToBecomeOwnerForTag(String metacardTag) - throws StopProcessingException { - Metacard before = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_NEWTON, - Security.ACCESS_ADMINISTRATORS, - ImmutableSet.of(USER_EINSTEIN), - Core.METACARD_TAGS, - metacardTag)); - Metacard after = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - METACARD_ID, - Core.METACARD_OWNER, - USER_EINSTEIN, - Security.ACCESS_ADMINISTRATORS, - ImmutableSet.of(USER_EINSTEIN), - Core.METACARD_TAGS, - metacardTag)); - - UpdateRequest update = getUpdateRequest(METACARD_ID, after); - accessPlugin.processPreUpdate(update, ImmutableMap.of(METACARD_ID, before)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyExtensionTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyExtensionTest.java deleted file mode 100644 index d2a3207f9ac..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyExtensionTest.java +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static ddf.security.permission.CollectionPermission.READ_ACTION; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import ddf.security.SubjectIdentity; -import ddf.security.permission.CollectionPermission; -import ddf.security.permission.KeyValueCollectionPermission; -import ddf.security.permission.KeyValuePermission; -import ddf.security.permission.impl.KeyValuePermissionImpl; -import ddf.security.permission.impl.MatchOneCollectionPermission; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import org.apache.shiro.authz.Permission; -import org.codice.ddf.catalog.ui.security.Constants; -import org.junit.Before; -import org.junit.Test; - -public class AccessControlPolicyExtensionTest { - - private static final Permission SYSTEM_ROLE = - makePermission(Constants.ROLES_CLAIM_URI, ImmutableSet.of("system-user")); - - private static final Set VALUES = ImmutableSet.of("owner", "value1", "value2", "value3"); - - private static final Set EMAILS = - ImmutableSet.of("owner@connexta.com", "owner2@connexta.com"); - - private static final Permission RANDOM = makePermission("random", VALUES); - - private static final Permission ROLES = makePermission(SecurityAttributes.ACCESS_GROUPS, VALUES); - - private static final Permission ROLES_READ_ONLY = - makePermission(SecurityAttributes.ACCESS_GROUPS_READ, VALUES); - - private static final Permission ADMINISTRATORS = - makePermission(SecurityAttributes.ACCESS_ADMINISTRATORS, EMAILS); - - private static final Permission INDIVIDUALS = - makePermission(SecurityAttributes.ACCESS_INDIVIDUALS, EMAILS); - - private static final Permission INDIVIDUALS_READ_ONLY = - makePermission(SecurityAttributes.ACCESS_INDIVIDUALS_READ, EMAILS); - - private static final Permission OWNER = - makePermission(Core.METACARD_OWNER, ImmutableSet.of("owner")); - - private AccessControlPolicyExtension extension; - - private AccessControlSecurityConfiguration config; - - private SubjectIdentity subjectIdentity; - - @Before - public void setUp() { - subjectIdentity = mock(SubjectIdentity.class); - when(subjectIdentity.getIdentityAttribute()).thenReturn(Constants.EMAIL_ADDRESS_CLAIM_URI); - config = new AccessControlSecurityConfiguration(); - extension = new AccessControlPolicyExtension(config, subjectIdentity); - } - - private static CollectionPermission subjectFrom(List ps) { - return new MatchOneCollectionPermission(ps); - } - - private static CollectionPermission subjectFrom(Permission p) { - return subjectFrom(ImmutableList.of(p)); - } - - private static KeyValuePermission makePermission(String key, Set values) { - return new KeyValuePermissionImpl(key, values) { - @Override - public boolean equals(Object obj) { - KeyValuePermission permission = (KeyValuePermission) obj; - return permission.getKey().equals(this.getKey()) - && permission.getValues().equals(this.getValues()); - } - - @Override - public int hashCode() { - return 0; - } - }; - } - - private static KeyValueCollectionPermission coll(List permissions) { - KeyValueCollectionPermission match = mock(KeyValueCollectionPermission.class); - doReturn(permissions).when(match).getPermissionList(); - return match; - } - - private static KeyValueCollectionPermission collRead(List permissions) { - KeyValueCollectionPermission match = mock(KeyValueCollectionPermission.class); - doReturn(permissions).when(match).getPermissionList(); - doReturn(READ_ACTION).when(match).getAction(); - return match; - } - - @Test - public void testOwnerOfMetacardImpliesAll() { - List before = ImmutableList.of(OWNER, INDIVIDUALS, ROLES, RANDOM); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.EMAIL_ADDRESS_CLAIM_URI, ImmutableSet.of("owner"))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(Collections.emptyList())); - } - - @Test - public void testAccessAdminOfAclAlwaysImplied() { - List before = ImmutableList.of(ADMINISTRATORS, INDIVIDUALS, ROLES); - - CollectionPermission subject = - subjectFrom( - makePermission( - Constants.EMAIL_ADDRESS_CLAIM_URI, ImmutableSet.of("owner@connexta.com"))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(Collections.emptyList())); - } - - @Test - public void testLackingIndividualReadImpliesNone() { - List before = ImmutableList.of(INDIVIDUALS_READ_ONLY); - - CollectionPermission subject = - subjectFrom( - makePermission( - Constants.EMAIL_ADDRESS_CLAIM_URI, - ImmutableSet.of("non-existent-email@connexta.com"))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of(INDIVIDUALS_READ_ONLY))); - } - - @Test - public void testLackingRoleReadImpliesNone() { - List before = ImmutableList.of(ROLES_READ_ONLY); - CollectionPermission subject = - subjectFrom( - makePermission( - Constants.EMAIL_ADDRESS_CLAIM_URI, - ImmutableSet.of("non-existent-email@connexta.com"))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of(ROLES_READ_ONLY))); - } - - @Test - public void testIndividualReadImplies() { - List before = ImmutableList.of(INDIVIDUALS_READ_ONLY); - - CollectionPermission subject = - subjectFrom( - makePermission( - Constants.EMAIL_ADDRESS_CLAIM_URI, ImmutableSet.of("owner@connexta.com"))); - - List after = - extension - .isPermittedMatchAll(subject, collRead(before), collRead(before)) - .getPermissionList(); - - assertThat(after, is(Collections.emptyList())); - } - - @Test - public void testRoleReadImplies() { - List before = ImmutableList.of(ROLES_READ_ONLY); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.ROLES_CLAIM_URI, ImmutableSet.of("owner"))); - - List after = - extension - .isPermittedMatchAll(subject, collRead(before), collRead(before)) - .getPermissionList(); - - assertThat(after, is(Collections.emptyList())); - } - - @Test - public void testNonAclMetacardsIgnored() { - List before = ImmutableList.of(OWNER, ROLES, INDIVIDUALS, RANDOM); - - CollectionPermission subject = subjectFrom(OWNER); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(before)); - } - - @Test - public void testMissingAccessGroupShouldImplyNone() { - List before = ImmutableList.of(OWNER, ROLES, INDIVIDUALS, RANDOM); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.ROLES_CLAIM_URI, ImmutableSet.of())); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of(OWNER, ROLES, INDIVIDUALS, RANDOM))); - } - - @Test - public void testMissingAccessIndividualShouldImplyNone() { - List before = ImmutableList.of(OWNER, ROLES, INDIVIDUALS, RANDOM); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.EMAIL_ADDRESS_CLAIM_URI, ImmutableSet.of())); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(before)); - } - - @Test - public void testAccessIndividualShouldImplyNone() { - List before = ImmutableList.of(OWNER, ROLES, INDIVIDUALS, RANDOM); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.EMAIL_ADDRESS_CLAIM_URI, ImmutableSet.of())); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of(OWNER, ROLES, INDIVIDUALS, RANDOM))); - } - - @Test - public void testSystemShouldImplyAll() { - List before = ImmutableList.of(OWNER, ROLES, ADMINISTRATORS, INDIVIDUALS, RANDOM); - - CollectionPermission subject = subjectFrom(SYSTEM_ROLE); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of())); - } - - @Test - public void testOverrideSystemUserShouldImplyAll() { - String email = "admin@localhost"; - List before = ImmutableList.of(OWNER, ROLES, ADMINISTRATORS, INDIVIDUALS, RANDOM); - - config.setSystemUserAttribute(Constants.EMAIL_ADDRESS_CLAIM_URI); - config.setSystemUserAttributeValue(email); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.EMAIL_ADDRESS_CLAIM_URI, ImmutableSet.of(email))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of())); - } - - @Test - public void testOverrideSystemRoleShouldImplyAll() { - String role = "system-user"; - List before = ImmutableList.of(OWNER, ROLES, ADMINISTRATORS, INDIVIDUALS, RANDOM); - - config.setSystemUserAttribute(Constants.ROLES_CLAIM_URI); - config.setSystemUserAttributeValue(role); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.ROLES_CLAIM_URI, ImmutableSet.of(role))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of())); - } - - @Test - public void testOverrideOwnerShouldImplyAll() { - when(subjectIdentity.getIdentityAttribute()).thenReturn("another"); - extension = new AccessControlPolicyExtension(config, subjectIdentity); - String attr = "another"; - when(subjectIdentity.getIdentityAttribute()).thenReturn(attr); - - List before = ImmutableList.of(OWNER, ADMINISTRATORS, ROLES, INDIVIDUALS, RANDOM); - - CollectionPermission subject = subjectFrom(makePermission(attr, ImmutableSet.of("owner"))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of())); - } - - @Test - public void testOverrideOwnerShouldImplyNone() { - when(subjectIdentity.getIdentityAttribute()).thenReturn("another"); - extension = new AccessControlPolicyExtension(config, subjectIdentity); - List before = ImmutableList.of(OWNER, ADMINISTRATORS, ROLES, INDIVIDUALS, RANDOM); - - when(subjectIdentity.getIdentityAttribute()).thenReturn("another"); - - CollectionPermission subject = - subjectFrom(makePermission(Constants.EMAIL_ADDRESS_CLAIM_URI, ImmutableSet.of("owner"))); - - List after = - extension.isPermittedMatchAll(subject, coll(before), coll(before)).getPermissionList(); - - assertThat(after, is(ImmutableList.of(OWNER, ADMINISTRATORS, ROLES, INDIVIDUALS, RANDOM))); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyPluginTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyPluginTest.java deleted file mode 100644 index 9ef4f048b39..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPolicyPluginTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.security.accesscontrol.AclTestSupport.metacardFromAttributes; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.mockito.Mockito.mock; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import ddf.catalog.plugin.PolicyPlugin; -import ddf.catalog.plugin.PolicyResponse; -import java.io.Serializable; -import java.util.Collections; -import java.util.Map; -import org.junit.Before; -import org.junit.Test; - -public class AccessControlPolicyPluginTest { - - private Map properties; - - private PolicyPlugin plugin; - - private static final String EMAIL = "a@b.c"; - - private static final Serializable MOCK_ID = "100"; - - @Before - public void setUp() { - properties = mock(Map.class); - plugin = new AccessControlPolicyPlugin(); - } - - @Test - public void testAdminOnCreateWithoutAccessControl() throws Exception { - Metacard metacard = new MetacardImpl(); - AccessControlUtil.setOwner(metacard, EMAIL); - PolicyResponse response = plugin.processPreCreate(metacard, properties); - assertThat(response.itemPolicy(), is(Collections.emptyMap())); - } - - @Test - public void testAdminOnCreateWithAccessControl() throws Exception { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - MOCK_ID, - Core.METACARD_OWNER, - "owner", - SecurityAttributes.ACCESS_ADMINISTRATORS, - ImmutableList.of("owner@owner.com"), - SecurityAttributes.ACCESS_GROUPS, - ImmutableList.of("group"), - SecurityAttributes.ACCESS_INDIVIDUALS, - ImmutableList.of("owner@owner.com"))); - - PolicyResponse response = plugin.processPreUpdate(metacard, properties); - - assertThat( - response.itemPolicy(), - is( - ImmutableMap.of( - SecurityAttributes.ACCESS_GROUPS, - Collections.singleton("group"), - SecurityAttributes.ACCESS_ADMINISTRATORS, - Collections.singleton("owner@owner.com"), - SecurityAttributes.ACCESS_INDIVIDUALS, - Collections.singleton("owner@owner.com"), - Core.METACARD_OWNER, - Collections.singleton("owner")))); - } - - @Test - public void testPolicyMapForReadPerms() throws Exception { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - MOCK_ID, - Core.METACARD_OWNER, - "owner", - SecurityAttributes.ACCESS_ADMINISTRATORS, - ImmutableList.of("owner@owner.com"), - SecurityAttributes.ACCESS_GROUPS_READ, - ImmutableList.of("group"), - SecurityAttributes.ACCESS_INDIVIDUALS_READ, - ImmutableList.of("owner@owner.com"))); - - PolicyResponse response = plugin.processPreUpdate(metacard, properties); - - assertThat( - response.itemPolicy(), - is( - ImmutableMap.of( - SecurityAttributes.ACCESS_GROUPS_READ, - Collections.singleton("group"), - SecurityAttributes.ACCESS_ADMINISTRATORS, - Collections.singleton("owner@owner.com"), - SecurityAttributes.ACCESS_INDIVIDUALS_READ, - Collections.singleton("owner@owner.com"), - Core.METACARD_OWNER, - Collections.singleton("owner")))); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreIngestPluginTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreIngestPluginTest.java deleted file mode 100644 index d5a83faad10..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreIngestPluginTest.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import ddf.catalog.Constants; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.operation.OperationTransaction; -import ddf.catalog.operation.UpdateRequest; -import ddf.catalog.operation.impl.CreateRequestImpl; -import ddf.catalog.operation.impl.OperationTransactionImpl; -import ddf.catalog.operation.impl.UpdateRequestImpl; -import ddf.security.SubjectIdentity; -import ddf.security.assertion.SecurityAssertion; -import ddf.security.service.impl.SubjectUtils; -import java.io.Serializable; -import java.util.Collections; -import java.util.Map; -import org.apache.shiro.subject.PrincipalCollection; -import org.apache.shiro.subject.Subject; -import org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceMetacardImpl; -import org.junit.Before; -import org.junit.Test; - -public class AccessControlPreIngestPluginTest { - - private static final String TEST_ID_ATTR = - "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"; - - private SubjectIdentity subjectIdentity; - - @Before - public void setUp() { - subjectIdentity = mock(SubjectIdentity.class); - when(subjectIdentity.getUniqueIdentifier(any())).thenReturn("owner"); - } - - private AccessControlPreIngestPlugin makePlugin() { - SecurityAssertion securityAssertion = mock(SecurityAssertion.class); - when(securityAssertion.getWeight()).thenReturn(SecurityAssertion.LOCAL_AUTH_WEIGHT); - - PrincipalCollection principalCollection = mock(PrincipalCollection.class); - when(principalCollection.byType(SecurityAssertion.class)) - .thenReturn(Collections.singletonList(securityAssertion)); - - Subject subject = mock(Subject.class); - when(subject.getPrincipals()).thenReturn(principalCollection); - - AccessControlPreIngestPlugin accessControlPreIngestPlugin = - new AccessControlPreIngestPlugin(subjectIdentity) { - @Override - protected Subject getSubject() { - return subject; - } - }; - accessControlPreIngestPlugin.setSubjectOperations(new SubjectUtils()); - - return accessControlPreIngestPlugin; - } - - @Test - public void testCreateShouldIgnoreNonAclMetacards() throws Exception { - AccessControlPreIngestPlugin plugin = makePlugin(); - Metacard metacard = new MetacardImpl(); - - plugin.process(new CreateRequestImpl(metacard)); - assertThat(metacard.getAttribute(Core.METACARD_OWNER), nullValue()); - } - - @Test - public void testCreateAclSuccess() throws Exception { - when(subjectIdentity.getIdentityAttribute()).thenReturn(TEST_ID_ATTR); - AccessControlPreIngestPlugin plugin = makePlugin(); - Metacard metacard = new WorkspaceMetacardImpl(); - - plugin.process(new CreateRequestImpl(metacard)); - assertThat(AccessControlUtil.getOwner(metacard), is("owner")); - } - - private UpdateRequest updateRequest(Metacard prev, Metacard next) { - UpdateRequestImpl request = new UpdateRequestImpl(next.getId(), next); - - OperationTransactionImpl tx = - new OperationTransactionImpl( - OperationTransaction.OperationType.UPDATE, ImmutableList.of(prev)); - - Map properties = ImmutableMap.of(Constants.OPERATION_TRANSACTION_KEY, tx); - - request.setProperties(properties); - - return request; - } - - @Test - public void testUpdateIgnoreNonAclMetacards() { - AccessControlPreIngestPlugin plugin = makePlugin(); - - MetacardImpl prev = new MetacardImpl(); - prev.setId("id"); - prev.setAttribute(Core.METACARD_OWNER, "prev"); - MetacardImpl next = new MetacardImpl(); - next.setId("id"); - - plugin.process(updateRequest(prev, next)); - assertThat(next.getAttribute(Core.METACARD_OWNER), nullValue()); - } - - @Test - public void testUpdateAllowOwnerChange() { - AccessControlPreIngestPlugin plugin = makePlugin(); - - Metacard prev = new MetacardImpl(); - Metacard next = prev; - - AccessControlUtil.setOwner(prev, "prev"); - AccessControlUtil.setOwner(next, "next"); - - plugin.process(updateRequest(prev, next)); - assertThat(AccessControlUtil.getOwner(next), is("next")); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreQueryPluginTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreQueryPluginTest.java deleted file mode 100644 index fb70fe0fe87..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlPreQueryPluginTest.java +++ /dev/null @@ -1,321 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.forms.data.AttributeGroupType.ATTRIBUTE_GROUP_TAG; -import static org.codice.ddf.catalog.ui.forms.data.QueryTemplateType.QUERY_TEMPLATE_TAG; -import static org.codice.ddf.catalog.ui.metacard.workspace.WorkspaceConstants.WORKSPACE_TAG; -import static org.codice.ddf.catalog.ui.security.Constants.SYSTEM_TEMPLATE; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsEqual.equalTo; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.proxy.builder.GeotoolsFilterBuilder; -import ddf.catalog.operation.Query; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.operation.impl.QueryImpl; -import ddf.catalog.operation.impl.QueryRequestImpl; -import ddf.catalog.plugin.PluginExecutionException; -import ddf.catalog.plugin.StopProcessingException; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Set; -import org.geotools.filter.visitor.DuplicatingFilterVisitor; -import org.junit.Before; -import org.junit.Test; -import org.opengis.filter.Filter; - -public class AccessControlPreQueryPluginTest { - private static final Set ACCESS_CONTROLLED_TAGS = - ImmutableSet.of(WORKSPACE_TAG, QUERY_TEMPLATE_TAG, ATTRIBUTE_GROUP_TAG); - - private static final String ROLE_A = "A"; - - private static final String ROLE_B = "B"; - - private static final String EMAIL_BOB = "bob@example.net"; - - private static final String TEXT_CRITERIA = "*criteria*"; - - private static final String TEXT_ID = "123456578901"; - - private static final String TEXT_WILDCARD = "*"; - - private static final Date TEST_DATE = new Date(); - - private static final FilterBuilder FILTER_BUILDER = new GeotoolsFilterBuilder(); - - private static final DuplicatingFilterVisitor COPYING_VISITOR = new DuplicatingFilterVisitor(); - - private AccessControlPreQueryPluginUnderTest plugin; - - @Before - public void setUp() { - plugin = - new AccessControlPreQueryPluginUnderTest( - new GeotoolsFilterBuilder(), // don't assert against things made by the same builder, - ROLE_A, - ROLE_B); - } - - @Test - public void testConfigDisabledMeansFilterLeftAlone() - throws PluginExecutionException, StopProcessingException { - AccessControlSecurityConfiguration config = new AccessControlSecurityConfiguration(); - config.setPolicyToFilterEnabled(false); - plugin = - new AccessControlPreQueryPluginUnderTest( - new GeotoolsFilterBuilder(), ImmutableList.of(ROLE_A, ROLE_B), config); - Filter filter = FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(WORKSPACE_TAG); - verifyPluginDoesNotAlterTheFilter(filter); - } - - @Test - public void testUserWithRoleThatCanSeeEverythingHasFilterLeftAlone() - throws PluginExecutionException, StopProcessingException { - AccessControlSecurityConfiguration config = new AccessControlSecurityConfiguration(); - config.setSystemUserAttributeValue(ROLE_A); - plugin = - new AccessControlPreQueryPluginUnderTest( - new GeotoolsFilterBuilder(), ImmutableList.of(ROLE_A, ROLE_B), config); - Filter filter = FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(WORKSPACE_TAG); - verifyPluginDoesNotAlterTheFilter(filter); - } - - @Test - public void testQueryForAllMetacardsOfSingleTypeUsingLikeIsOptimized() - throws PluginExecutionException, StopProcessingException { - Filter filter = FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(WORKSPACE_TAG); - verifyPluginAddsSecurityBranchToFilter(filter); - } - - @Test - public void testQueryForAllMetacardsOfSingleTypeUsingEqualToIsOptimized() - throws PluginExecutionException, StopProcessingException { - Filter filter = FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(WORKSPACE_TAG); - verifyPluginAddsSecurityBranchToFilter(filter); - } - - @Test - public void testQueryForSpecificCaseOfSingleTypeIsOptimized() - throws PluginExecutionException, StopProcessingException { - Filter typicalQueryForSpecificCaseOfSingleType = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text(TEXT_CRITERIA), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(WORKSPACE_TAG)); - verifyPluginAddsSecurityBranchToFilter(typicalQueryForSpecificCaseOfSingleType); - } - - @Test - public void testQueryForSpecificCaseOfMultipleTypesIsOptimized() - throws PluginExecutionException, StopProcessingException { - Filter typicalQueryForSpecificCaseOfMultipleTypes = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text(TEXT_CRITERIA), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(WORKSPACE_TAG), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(QUERY_TEMPLATE_TAG))); - verifyPluginAddsSecurityBranchToFilter(typicalQueryForSpecificCaseOfMultipleTypes); - } - - @Test - public void testDisjointQueryForSpecificCaseOfManyTypesIsOptimized() - throws PluginExecutionException, StopProcessingException { - Filter disjointQuery = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.CREATED).is().before().date(TEST_DATE), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(WORKSPACE_TAG)), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text(TEXT_CRITERIA), - FILTER_BUILDER - .attribute(Core.METACARD_TAGS) - .is() - .equalTo() - .text(QUERY_TEMPLATE_TAG)), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.ID).is().like().text(TEXT_ID), - FILTER_BUILDER - .attribute(Core.METACARD_TAGS) - .is() - .equalTo() - .text(ATTRIBUTE_GROUP_TAG))); - verifyPluginAddsSecurityBranchToFilter(disjointQuery); - } - - @Test - public void testQueryForAllResourcesByUsingWildcardIsLeftAlone() - throws PluginExecutionException, StopProcessingException { - Filter typicalQueryForAllResourcesWildcard = - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TEXT_WILDCARD); - verifyPluginDoesNotAlterTheFilter(typicalQueryForAllResourcesWildcard); - } - - @Test - public void testQueryForAllResourcesByOmittingTagsAttributeIsLeftAlone() - throws PluginExecutionException, StopProcessingException { - Filter typicalQueryForAllResourcesNoTags = - FILTER_BUILDER.attribute(Metacard.ANY_TEXT).is().like().text(TEXT_WILDCARD); - verifyPluginDoesNotAlterTheFilter(typicalQueryForAllResourcesNoTags); - } - - @Test - public void testQueryForSpecificCaseOfResourcesIsLeftAlone() - throws PluginExecutionException, StopProcessingException { - Filter typicalQueryForSpecificResource = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text(TEXT_CRITERIA), - FILTER_BUILDER.attribute(Core.CREATED).is().before().date(TEST_DATE)), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.DESCRIPTION).is().like().text(TEXT_CRITERIA), - FILTER_BUILDER.attribute(Core.MODIFIED).is().before().date(TEST_DATE))); - verifyPluginDoesNotAlterTheFilter(typicalQueryForSpecificResource); - } - - @Test - public void testAnyOfQueryWithAllOfResourceTagIsLeftAlone() - throws PluginExecutionException, StopProcessingException { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.CREATED).is().before().date(TEST_DATE), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(WORKSPACE_TAG)), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text(TEXT_CRITERIA), - FILTER_BUILDER - .attribute(Core.METACARD_TAGS) - .is() - .equalTo() - .text(QUERY_TEMPLATE_TAG)), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.ID).is().like().text(TEXT_ID), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text("resource"))); - verifyPluginDoesNotAlterTheFilter(filter); - } - - private void verifyPluginAddsSecurityBranchToFilter(Filter inputFilter) - throws PluginExecutionException, StopProcessingException { - QueryRequest request = plugin.process(new QueryRequestImpl(new QueryImpl(inputFilter))); - assertThat( - asGeotoolsComparableFilter(request.getQuery()), - is( - equalTo( - FILTER_BUILDER.allOf( - inputFilter, - FILTER_BUILDER.anyOf( - FILTER_BUILDER - .attribute(Core.METACARD_TAGS) - .is() - .equalTo() - .text(SYSTEM_TEMPLATE), - FILTER_BUILDER - .attribute(Core.METACARD_OWNER) - .is() - .equalTo() - .text(EMAIL_BOB), - FILTER_BUILDER - .attribute(Security.ACCESS_INDIVIDUALS) - .is() - .equalTo() - .text(EMAIL_BOB), - FILTER_BUILDER - .attribute(Security.ACCESS_INDIVIDUALS_READ) - .is() - .equalTo() - .text(EMAIL_BOB), - FILTER_BUILDER - .attribute(Security.ACCESS_ADMINISTRATORS) - .is() - .equalTo() - .text(EMAIL_BOB), - FILTER_BUILDER - .attribute(Security.ACCESS_GROUPS) - .is() - .equalTo() - .text(ROLE_A), - FILTER_BUILDER - .attribute(Security.ACCESS_GROUPS_READ) - .is() - .equalTo() - .text(ROLE_A), - FILTER_BUILDER - .attribute(Security.ACCESS_GROUPS) - .is() - .equalTo() - .text(ROLE_B), - FILTER_BUILDER - .attribute(Security.ACCESS_GROUPS_READ) - .is() - .equalTo() - .text(ROLE_B)))))); - } - - private void verifyPluginDoesNotAlterTheFilter(Filter inputFilter) - throws PluginExecutionException, StopProcessingException { - QueryRequest request = plugin.process(new QueryRequestImpl(new QueryImpl(inputFilter))); - assertThat(asGeotoolsComparableFilter(request.getQuery()), is(equalTo(inputFilter))); - } - - private static Filter asGeotoolsComparableFilter(Query query) { - return (Filter) query.accept(COPYING_VISITOR, null); - } - - private static class AccessControlPreQueryPluginUnderTest extends AccessControlPreQueryPlugin { - private final List subjectRoles; - - private AccessControlPreQueryPluginUnderTest( - FilterBuilder filterBuilder, String... subjectRoles) { - super( - filterBuilder, - null /* Only method interacting with this ref gets overridden */, - tags(), - new AccessControlSecurityConfiguration()); - this.subjectRoles = Arrays.asList(subjectRoles); - } - - private AccessControlPreQueryPluginUnderTest( - FilterBuilder filterBuilder, - List subjectRoles, - AccessControlSecurityConfiguration config) { - super(filterBuilder, null, tags(), config); - this.subjectRoles = subjectRoles; - } - - @Override - String getSubjectIdentifier() { - return EMAIL_BOB; - } - - @Override - List getSubjectGroups() { - return subjectRoles; - } - - private static AccessControlTags tags() { - AccessControlTags tags = mock(AccessControlTags.class); - when(tags.getAccessControlledTags()).thenReturn(ACCESS_CONTROLLED_TAGS); - return tags; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlTagsTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlTagsTest.java deleted file mode 100644 index bbc15185c3c..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlTagsTest.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsCollectionWithSize.hasSize; -import static org.hamcrest.collection.IsEmptyCollection.empty; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsCollectionContaining.hasItems; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableSet; -import java.util.Collections; -import org.junit.Before; -import org.junit.Test; -import org.osgi.framework.ServiceReference; - -public class AccessControlTagsTest { - - private static final String ACCESS_CONTROLLED_TAG = "access-controlled-tag"; - - private static final String EXPECTED_TAG_A = "EXPECTED-TAG-A"; - - private static final String EXPECTED_TAG_B = "EXPECTED-TAG-B"; - - private ServiceReference mockTypeRef; - - private AccessControlTagsUnderTest tagSet; - - @Before - public void setup() { - mockTypeRef = mock(ServiceReference.class); - tagSet = new AccessControlTagsUnderTest(); - // All tests written to assume we start empty, so explicitly assert it here for clarity - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testConstructorInitsItems() { - AccessControlTags localSet = new AccessControlTags(Collections.singleton(EXPECTED_TAG_A)); - assertThat(localSet.getAccessControlledTags(), hasSize(1)); - assertThat(localSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - } - - @Test - public void testBindNullIsIgnored() { - tagSet.bindTag(null); - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testBindWithoutServicePropertyIsIgnored() { - tagSet.bindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testBindWithServicePropertyOfIncorrectTypeIsIgnored() { - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)).thenReturn(new Object()); - tagSet.bindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testBindWithServicePropertyOfInvalidSetIsIgnored() { - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)) - .thenReturn(ImmutableSet.of("string", new Object())); - tagSet.bindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testBindWithExpectedServicePropertySavesTheTag() { - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)).thenReturn(EXPECTED_TAG_A); - tagSet.bindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - } - - @Test - public void testBindWithExpectedServicePropertySetSavesTheTags() { - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)) - .thenReturn(ImmutableSet.of(EXPECTED_TAG_A, EXPECTED_TAG_B)); - tagSet.bindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), hasSize(2)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A, EXPECTED_TAG_B)); - } - - @Test - public void testUnbindNullIsIgnored() { - bindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - - tagSet.unbindTag(null); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - } - - @Test - public void testUnbindWithoutServicePropertyIsIgnored() { - bindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - - tagSet.unbindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - } - - @Test - public void testUnbindWithServicePropertyOfIncorrectTypeIsIgnored() { - bindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)).thenReturn(new Object()); - tagSet.unbindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - } - - @Test - public void testUnbindWithServicePropertyOfInvalidSetIsIgnored() { - bindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)) - .thenReturn(ImmutableSet.of("string", new Object())); - tagSet.unbindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - } - - @Test - public void testUnbindWithExpectedServicePropertyRemovesTheTag() { - bindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)).thenReturn(EXPECTED_TAG_A); - tagSet.unbindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testUnbindWithExpectedServicePropertySetRemovesTheTags() { - bindTagForTest(EXPECTED_TAG_A); - bindTagForTest(EXPECTED_TAG_B); - assertThat(tagSet.getAccessControlledTags(), hasSize(2)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A, EXPECTED_TAG_B)); - - when(mockTypeRef.getProperty(ACCESS_CONTROLLED_TAG)) - .thenReturn(ImmutableSet.of(EXPECTED_TAG_A, EXPECTED_TAG_B)); - tagSet.unbindTag(mockTypeRef); - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testBindAndUnbindMultipleTagsBehavesLikeCollection() { - bindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - - bindTagForTest(EXPECTED_TAG_B); - assertThat(tagSet.getAccessControlledTags(), hasSize(2)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A, EXPECTED_TAG_B)); - - unbindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_B)); - - unbindTagForTest(EXPECTED_TAG_B); - assertThat(tagSet.getAccessControlledTags(), is(empty())); - } - - @Test - public void testUnbindTagThatDoesNotExistIsIgnored() { - bindTagForTest(EXPECTED_TAG_A); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - - unbindTagForTest(EXPECTED_TAG_B); - assertThat(tagSet.getAccessControlledTags(), hasSize(1)); - assertThat(tagSet.getAccessControlledTags(), hasItems(EXPECTED_TAG_A)); - } - - private void bindTagForTest(String tag) { - ServiceReference ref = mock(ServiceReference.class); - when(ref.getProperty(ACCESS_CONTROLLED_TAG)).thenReturn(tag); - tagSet.bindTag(ref); - } - - private void unbindTagForTest(String tag) { - ServiceReference ref = mock(ServiceReference.class); - when(ref.getProperty(ACCESS_CONTROLLED_TAG)).thenReturn(tag); - tagSet.unbindTag(ref); - } - - private static class AccessControlTagsUnderTest extends AccessControlTags { - @Override - String typeName(ServiceReference metacardTypeRef) { - // For logging purposes only, so no point dealing with OSGi within a unit test - return "UNIT_TESTING_TYPE"; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlUtilTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlUtilTest.java deleted file mode 100644 index a6229868b6c..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AccessControlUtilTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.security.accesscontrol.AclTestSupport.metacardFromAttributes; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import org.junit.Test; - -public class AccessControlUtilTest { - - @Test - public void getAccessIndividuals() { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - "123", - Core.METACARD_OWNER, - "owner", - SecurityAttributes.ACCESS_INDIVIDUALS, - ImmutableList.of("person1", "person2"))); - assertThat( - AccessControlUtil.getAccessIndividuals(metacard), - is(ImmutableSet.of("person1", "person2"))); - } - - @Test - public void getAccessGroups() { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - "123", - Core.METACARD_OWNER, - "owner", - SecurityAttributes.ACCESS_GROUPS, - ImmutableList.of("person1", "person2"))); - assertThat( - AccessControlUtil.getAccessGroups(metacard), is(ImmutableSet.of("person1", "person2"))); - } - - @Test - public void getAccessAdministrators() { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - "123", - Core.METACARD_OWNER, - "owner", - SecurityAttributes.ACCESS_ADMINISTRATORS, - ImmutableList.of("person1", "person2"))); - assertThat( - AccessControlUtil.getAccessAdministrators(metacard), - is(ImmutableSet.of("person1", "person2"))); - } - - @Test - public void setOwner() { - String id = "0"; - Metacard before = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - id, - Core.METACARD_OWNER, - "before", - SecurityAttributes.ACCESS_GROUPS, - ImmutableSet.of("admin"))); - - assertThat(before.getAttribute(Core.METACARD_OWNER).getValue(), is("before")); - AccessControlUtil.setOwner(before, "newowner"); - assertThat(before.getAttribute(Core.METACARD_OWNER).getValue(), is("newowner")); - } - - @Test - public void getOwner() { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - "123", - Core.METACARD_OWNER, - "owner", - SecurityAttributes.ACCESS_ADMINISTRATORS, - "owner")); - assertThat(metacard.getAttribute(Core.METACARD_OWNER).getValue(), is("owner")); - } - - @Test - public void isAnyObjectNull() { - assertThat(AccessControlUtil.isAnyObjectNull(null, 1, 4, "test"), is(true)); - assertThat(AccessControlUtil.isAnyObjectNull(3, 1, 4, "test"), is(false)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AclTestSupport.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AclTestSupport.java deleted file mode 100644 index 6c1907ac976..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AclTestSupport.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import com.google.common.collect.ImmutableSet; -import ddf.catalog.data.Attribute; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.MetacardTypeImpl; -import ddf.catalog.data.impl.types.SecurityAttributes; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; - -public class AclTestSupport { - private AclTestSupport() { - // Should not be instantiated - } - - /** Creates a metacard from a map of desired attributes */ - public static Metacard metacardFromAttributes(Map attributes) { - Metacard metacard = - new MetacardImpl( - new MetacardTypeImpl( - "type", - ImmutableSet.builder() - .addAll(new SecurityAttributes().getAttributeDescriptors()) - .build())); - - attributes.forEach((key, value) -> metacard.setAttribute(createAttribute(key, value))); - return metacard; - } - - private static Attribute createAttribute(String key, Serializable value) { - return new AttributeImpl( - key, value instanceof Collection ? new ArrayList<>((Collection) value) : value); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AclTestSupportTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AclTestSupportTest.java deleted file mode 100644 index 20ff6609032..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/AclTestSupportTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.codice.ddf.catalog.ui.security.accesscontrol.AclTestSupport.metacardFromAttributes; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.impl.types.SecurityAttributes; -import ddf.catalog.data.types.Core; -import ddf.catalog.data.types.Security; -import org.junit.Test; - -public class AclTestSupportTest { - - @Test - public void testMetacardFromAttributes() { - Metacard metacard = - metacardFromAttributes( - ImmutableMap.of( - Core.ID, - "123", - Core.METACARD_OWNER, - "owner", - SecurityAttributes.ACCESS_ADMINISTRATORS, - "owner")); - - assertThat(metacard.getAttribute(Core.ID).getValue(), is("123")); - assertThat(metacard.getAttribute(Core.METACARD_OWNER).getValue(), is("owner")); - assertThat( - metacard.getAttribute(Security.ACCESS_ADMINISTRATORS).getValues(), - is(ImmutableList.of("owner"))); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationVisitorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationVisitorTest.java deleted file mode 100644 index f91890556e7..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagAggregationVisitorTest.java +++ /dev/null @@ -1,697 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.hamcrest.Matchers.hasItems; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.collection.IsEmptyCollection.empty; -import static org.junit.Assert.assertThat; - -import ddf.catalog.data.types.Core; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.proxy.builder.GeotoolsFilterBuilder; -import java.util.Date; -import org.geotools.factory.CommonFactoryFinder; -import org.junit.Before; -import org.junit.Test; -import org.opengis.filter.Filter; -import org.opengis.filter.FilterFactory; - -/** - * Validates the guarantee made by the {@link TagAggregationVisitor}'s javadoc. - * - *

The tests are organized into several sections: - * - *

    - *
  • A Singleton Filters section, which represent the most simplistic cases. - *
  • Mirroring sections for single AND predicates and single OR predicates. - *
  • Mirroring sections for composed AND/OR predicates and OR/AND predicates. - *
- * - * Mirroring sections define the same set of tests in the same order, despite some coverage - * redundancy, so it is very clear how the class must behave for any input {@link Filter}. This also - * makes the expected results of said tests easily comparable so it is clear how the logical - * operators, and similar combinations of the operators, impact filter introspection. - */ -public class TagAggregationVisitorTest { - private static final String ANY_TEXT = "anytext"; - - private static final Date NOW = new Date(); - - private static final String TAG_A = "A"; - - private static final String TAG_B = "B"; - - private static final String TAG_C = "C"; - - private static final FilterBuilder FILTER_BUILDER = new GeotoolsFilterBuilder(); - - private TagAggregationVisitor tagAggregationVisitor; - - @Before - public void setup() { - tagAggregationVisitor = new TagAggregationVisitor(); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Singleton Filters (Only one attribute or key-value pair in the predicate) - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testSingletonFilter() { - Filter filter = FILTER_BUILDER.attribute(ANY_TEXT).is().like().text("*"); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSingletonFilterNegated() { - Filter filter = FILTER_BUILDER.not(FILTER_BUILDER.attribute(ANY_TEXT).is().like().text("*")); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSingletonFilterPropertyNonStringForEquals() { - // DDF's filter builder doesn't support complex property expressions; need to use Geotools - FilterFactory ff = CommonFactoryFinder.getFilterFactory(); - Filter filter = ff.equal(ff.add(ff.literal(1), ff.literal(2)), ff.literal(1), false); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSingletonFilterPropertyNonStringForLike() { - // DDF's filter builder doesn't support complex property expressions; need to use Geotools - FilterFactory ff = CommonFactoryFinder.getFilterFactory(); - Filter filter = ff.like(ff.add(ff.literal(1), ff.literal(2)), "pattern*"); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSingletonFilterValueNonString() { - Filter filter = FILTER_BUILDER.attribute(ANY_TEXT).is().equalTo().number(0); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSingletonFilterWithTags() { - Filter filter = FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(1)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A)); - } - - @Test - public void testSingletonFilterWithBlankTags() { - Filter filter = FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(""); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSingletonFilterWithTagsNegated() { - Filter filter = - FILTER_BUILDER.not(FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Simple AND Filters - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testSimpleAndFilter() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.CREATED).is().before().date(NOW)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleAndFilterWithTags() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testSimpleAndFilterWithTagAndNotTag() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().notEqualTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(1)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A)); - } - - @Test - public void testSimpleAndFilterWithTagsNegateOtherCriteria() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.not(FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*")), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testSimpleAndFilterWithTagsNegateTagA() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A)), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(1)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_B)); - } - - @Test - public void testSimpleAndFilterWithTagsNegateTagB() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(1)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A)); - } - - @Test - public void testSimpleAndFilterWithTagsNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleAndFilterWithOnlyTags() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testSimpleAndFilterWithOnlyNotTags() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().notEqualTo().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().notEqualTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleAndFilterWithOnlyTagsNegateTagA() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A)), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(1)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_B)); - } - - @Test - public void testSimpleAndFilterWithOnlyTagsNegateTagB() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(1)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A)); - } - - @Test - public void testSimpleAndFilterWithOnlyTagsNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Simple OR Filters - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testSimpleOrFilter() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.CREATED).is().before().date(NOW)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithTags() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithTagAndNotTag() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().notEqualTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithTagsNegateOtherCriteria() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.not(FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*")), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithTagsNegateTagA() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A)), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithTagsNegateTagB() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithTagsNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithOnlyTags() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testSimpleOrFilterWithOnlyNotTags() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().notEqualTo().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().notEqualTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithOnlyTagsNegateTagA() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A)), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithOnlyTagsNegateTagB() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testSimpleOrFilterWithOnlyTagsNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * OR/AND Cases (An OR predicate with an AND child) - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testNestedOrAndFilterWithTags() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.CREATED).is().before().date(NOW), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedOrAndFilterWithOnlyTags() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedOrAndFilterWithOnlyTagsAndTagsElsewhere() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedOrAndFilterWithOnlyTagsAndTagsElsewhereNegatedPartially() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.not( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedOrAndFilterWithOnlyTagsAndTagsElsewhereNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedOrAndFilterWithNoTagsAndOnlyTagsElsewhere() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_B), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.DATATYPE).is().like().text("media"), - FILTER_BUILDER.attribute(Core.LANGUAGE).is().equalTo().text("eng"))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedOrAndFilterWithNoTagsAndOnlyTagsElsewhereNegatedPartially() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_B), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.not( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.DATATYPE).is().like().text("media"), - FILTER_BUILDER.attribute(Core.LANGUAGE).is().equalTo().text("eng")))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedOrAndFilterWithNoTagsAndOnlyTagsElsewhereNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_B), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.DATATYPE).is().like().text("media"), - FILTER_BUILDER.attribute(Core.LANGUAGE).is().equalTo().text("eng")))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * AND/OR Cases (An AND predicate with an OR child) - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testNestedAndOrFilterWithTags() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.CREATED).is().before().date(NOW), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedAndOrFilterWithOnlyTags() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testNestedAndOrFilterWithOnlyTagsAndTagsElsewhere() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(3)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B, TAG_C)); - } - - @Test - public void testNestedAndOrFilterWithOnlyTagsAndTagsElsewhereNegatedPartially() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.not( - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(1)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_C)); - } - - @Test - public void testNestedAndOrFilterWithOnlyTagsAndTagsElsewhereNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_C), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B)))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - @Test - public void testNestedAndOrFilterWithNoTagsAndOnlyTagsElsewhere() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.DATATYPE).is().like().text("media"), - FILTER_BUILDER.attribute(Core.LANGUAGE).is().equalTo().text("eng"))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testNestedAndOrFilterWithNoTagsAndOnlyTagsElsewhereNegatedPartially() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B), - FILTER_BUILDER.not( - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.DATATYPE).is().like().text("media"), - FILTER_BUILDER.attribute(Core.LANGUAGE).is().equalTo().text("eng")))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testNestedAndOrFilterWithNoTagsAndOnlyTagsElsewhereNegatedEntirely() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.DATATYPE).is().like().text("media"), - FILTER_BUILDER.attribute(Core.LANGUAGE).is().equalTo().text("eng")))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Logical Redundancies - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testTagsPropagateThroughDoubleAndRedundancy() { - Filter filter = - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.TITLE).is().like().text("*term*"), - FILTER_BUILDER.allOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(2)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B)); - } - - @Test - public void testTagsPropagateThroughDoubleOrRedundancy() { - Filter filter = - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A), - FILTER_BUILDER.anyOf( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text(TAG_B), - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().equalTo().text("third"))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), hasSize(3)); - assertThat(tagAggregationVisitor.getTags(), hasItems(TAG_A, TAG_B, "third")); - } - - /** - * Very few queries with double negation will come through the system, let alone ones that also - * are eligible for policy mapping. Not worth optimizing for this case. - */ - @Test - public void testTagsDoNotPropagateThroughUnsupportedDoubleNotRedundancy() { - Filter filter = - FILTER_BUILDER.not( - FILTER_BUILDER.not( - FILTER_BUILDER.attribute(Core.METACARD_TAGS).is().like().text(TAG_A))); - filter.accept(tagAggregationVisitor, null); - assertThat(tagAggregationVisitor.getTags(), is(empty())); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagBaseVisitorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagBaseVisitorTest.java deleted file mode 100644 index e9f3e0b09de..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/security/accesscontrol/TagBaseVisitorTest.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.security.accesscontrol; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; - -import java.util.Collections; -import org.geotools.factory.CommonFactoryFinder; -import org.geotools.geometry.jts.spatialschema.geometry.primitive.PointImpl; -import org.junit.Before; -import org.junit.Test; -import org.opengis.filter.Filter; -import org.opengis.filter.FilterFactory; - -public class TagBaseVisitorTest { - - private static final String TEST = "test"; - - private FilterFactory ff = CommonFactoryFinder.getFilterFactory(); - - private TagBaseVisitorUnderTest baseVisitor; - - @Before - public void setup() { - baseVisitor = new TagBaseVisitorUnderTest(); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Types that support tags or do not apply (method should NOT be called) - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testAndIgnoresMethod() { - verifyMethodIgnored( - ff.and( - ff.equal(ff.property(TEST), ff.literal(10), false), - ff.equal(ff.property(TEST), ff.literal(10), false))); - } - - @Test - public void testNotIgnoresMethod() { - verifyMethodIgnored(ff.not(ff.equal(ff.property(TEST), ff.literal(10), false))); - } - - @Test - public void testOrIgnoresMethod() { - verifyMethodIgnored( - ff.or( - ff.equal(ff.property(TEST), ff.literal(10), false), - ff.equal(ff.property(TEST), ff.literal(10), false))); - } - - @Test - public void testPropertyIsLikeIgnoresMethod() { - verifyMethodIgnored(ff.like(ff.property(TEST), "pattern*")); - } - - @Test - public void testPropertyIsEqualToIgnoresMethod() { - verifyMethodIgnored(ff.equal(ff.property(TEST), ff.literal(10), false)); - } - - @Test - public void testPropertyIsNotEqualToIgnoresMethod() { - verifyMethodIgnored(ff.notEqual(ff.property(TEST), ff.literal(10), false)); - } - - /* - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Types that CANNOT support tags (method should be called) - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - @Test - public void testExcludeCallsMethod() { - verifyMethodCalled(Filter.EXCLUDE); - } - - @Test - public void testIncludeCallsMethod() { - verifyMethodCalled(Filter.INCLUDE); - } - - @Test - public void testIdCallsMethod() { - verifyMethodCalled(ff.id(Collections.emptySet())); - } - - @Test - public void testPropertyIsBetweenCallsMethod() { - verifyMethodCalled(ff.between(ff.property(TEST), ff.literal(5), ff.literal(6))); - } - - @Test - public void testPropertyIsGreaterThanCallsMethod() { - verifyMethodCalled(ff.greater(ff.property(TEST), ff.literal(10))); - } - - @Test - public void testPropertyIsGreaterThanOrEqualToCallsMethod() { - verifyMethodCalled(ff.greaterOrEqual(ff.property(TEST), ff.literal(10))); - } - - @Test - public void testPropertyIsLessThanCallsMethod() { - verifyMethodCalled(ff.less(ff.property(TEST), ff.literal(10))); - } - - @Test - public void testPropertyIsLessThanOrEqualToCallsMethod() { - verifyMethodCalled(ff.lessOrEqual(ff.property(TEST), ff.literal(10))); - } - - @Test - public void testPropertyIsNullCallsMethod() { - verifyMethodCalled(ff.isNull(ff.property(TEST))); - } - - @Test - public void testPropertyIsNilCallsMethod() { - verifyMethodCalled(ff.isNil(ff.property(TEST), new Object())); - } - - @Test - public void testBBOXCallsMethod() { - verifyMethodCalled(ff.bbox(TEST, 0.1, 0.2, 0.3, 0.4, "")); - } - - @Test - public void testBeyondCallsMethod() { - verifyMethodCalled(ff.beyond(TEST, new PointImpl(), 10.0, "")); - } - - @Test - public void testContainsCallsMethod() { - verifyMethodCalled(ff.contains(TEST, new PointImpl())); - } - - @Test - public void testCrossesCallsMethod() { - verifyMethodCalled(ff.crosses(TEST, new PointImpl())); - } - - @Test - public void testDisjointCallsMethod() { - verifyMethodCalled(ff.disjoint(TEST, new PointImpl())); - } - - @Test - public void testDWithinCallsMethod() { - verifyMethodCalled(ff.dwithin(TEST, new PointImpl(), 10.0, "")); - } - - @Test - public void testEqualsCallsMethod() { - verifyMethodCalled(ff.equals(TEST, new PointImpl())); - } - - @Test - public void testIntersectsCallsMethod() { - verifyMethodCalled(ff.intersects(TEST, new PointImpl())); - } - - @Test - public void testOverlapsCallsMethod() { - verifyMethodCalled(ff.overlaps(TEST, new PointImpl())); - } - - @Test - public void testTouchesCallsMethod() { - verifyMethodCalled(ff.touches(TEST, new PointImpl())); - } - - @Test - public void testWithinCallsMethod() { - verifyMethodCalled(ff.within(TEST, new PointImpl())); - } - - @Test - public void testNullFilterCallsMethod() { - baseVisitor.visitNullFilter(new Object()); - assertThat(baseVisitor.isMethodCalled(), is(true)); - } - - @Test - public void testAnyInteractsCallsMethod() { - verifyMethodCalled(ff.anyInteracts(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testAfterCallsMethod() { - verifyMethodCalled(ff.after(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testBeforeCallsMethod() { - verifyMethodCalled(ff.before(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testBeginsCallsMethod() { - verifyMethodCalled(ff.begins(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testBegunByCallsMethod() { - verifyMethodCalled(ff.begunBy(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testDuringCallsMethod() { - verifyMethodCalled(ff.during(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testEndedByCallsMethod() { - verifyMethodCalled(ff.endedBy(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testEndsCallsMethod() { - verifyMethodCalled(ff.ends(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testMeetsCallsMethod() { - verifyMethodCalled(ff.meets(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testMetByCallsMethod() { - verifyMethodCalled(ff.metBy(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testOverlappedByCallsMethod() { - verifyMethodCalled(ff.overlappedBy(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testTContainsCallsMethod() { - verifyMethodCalled(ff.tcontains(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testTEqualsCallsMethod() { - verifyMethodCalled(ff.tequals(ff.property(TEST), ff.literal(TEST))); - } - - @Test - public void testTOverlapsCallsMethod() { - verifyMethodCalled(ff.toverlaps(ff.property(TEST), ff.literal(TEST))); - } - - private void verifyMethodCalled(Filter filter) { - filter.accept(baseVisitor, null); - assertThat( - "Expected the 'preProcessNonTagPredicate' method to be called, but it wasn't", - baseVisitor.isMethodCalled(), - is(true)); - } - - private void verifyMethodIgnored(Filter filter) { - filter.accept(baseVisitor, null); - assertThat( - "Expected the 'preProcessNonTagPredicate' method to NOT be called, but it was", - baseVisitor.isMethodCalled(), - is(false)); - } - - private static class TagBaseVisitorUnderTest extends TagBaseVisitor { - private boolean methodCalled = false; - - private boolean isMethodCalled() { - return methodCalled; - } - - @Override - protected Object preProcessNonTagPredicate(Filter filter, Object data) { - methodCalled = true; - return data; - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptorsTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptorsTest.java deleted file mode 100644 index 6000cfd28de..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/transformer/TransformerDescriptorsTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.transformer; - -import static org.hamcrest.Matchers.allOf; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.hasEntry; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.junit.Test; -import org.osgi.framework.ServiceReference; - -public class TransformerDescriptorsTest { - - private TransformerDescriptors descriptors = - new TransformerDescriptors( - ImmutableList.of( - createMockServiceReference("foo", "bar"), - createMockServiceReference("hello", null), - createMockServiceReference("world", null)), - ImmutableList.of( - createMockServiceReference("bar", "foo"), - createMockServiceReference(null, null), - createMockServiceReference("zipCompression", null))); - - @Test - public void testGetDefaultMetacardTransformerBlacklist() { - Set metacardTransformerBlacklist = descriptors.getBlackListedMetacardTransformerIds(); - - assertThat(metacardTransformerBlacklist, hasSize(0)); - } - - @Test - public void testGetDefaultQueryResponseTransformerBlacklist() { - List> queryResponseTransformerDescriptors = - descriptors.getQueryResponseTransformers(); - Map descriptor = queryResponseTransformerDescriptors.get(0); - - assertThat(queryResponseTransformerDescriptors, hasSize(1)); - assertThat(descriptor, allOf(hasEntry("id", "bar"), hasEntry("displayName", "foo"))); - } - - @Test - public void testGetMetacardTransformerDescriptors() { - descriptors.setBlackListedMetacardTransformerIds(Collections.singleton("world")); - - List> transformerDescriptors = descriptors.getMetacardTransformers(); - Map descriptor = transformerDescriptors.get(0); - - assertThat(transformerDescriptors, hasSize(2)); - assertThat(descriptor, allOf(hasEntry("id", "foo"), hasEntry("displayName", "bar"))); - } - - @Test - public void testGetQueryResponseTransformerDescriptors() { - List> transformerDescriptors = descriptors.getQueryResponseTransformers(); - Map descriptor = transformerDescriptors.get(0); - - assertThat(transformerDescriptors, hasSize(1)); - assertThat(descriptor, allOf(hasEntry("id", "bar"), hasEntry("displayName", "foo"))); - } - - @Test - public void testGetMetacardTransformerDescriptorNotFound() { - Map descriptor = descriptors.getMetacardTransformer("bar"); - - assertThat(descriptor, is(nullValue())); - } - - @Test - public void testGetQueryResponseTransformerDescriptorNotFound() { - Map descriptor = descriptors.getQueryResponseTransformer("foo"); - - assertThat(descriptor, is(nullValue())); - } - - @Test - public void testGetTransformerDescriptorNullDisplayName() { - Map descriptor = descriptors.getMetacardTransformer("hello"); - - assertThat(descriptor, allOf(hasEntry("id", "hello"), hasEntry("displayName", "hello"))); - } - - @Test - public void testGetBlacklistedTransformerDescriptor() { - descriptors.setBlackListedMetacardTransformerIds(Collections.singleton("world")); - - Map descriptor = descriptors.getMetacardTransformer("world"); - - assertThat(descriptor, is(nullValue())); - } - - @Test - public void testGetBlacklistedQueryResponseTransformerDescriptor() { - Map descriptor = descriptors.getQueryResponseTransformer("zipCompression"); - - assertThat(descriptor, is(nullValue())); - } - - @Test - public void testGetBlacklistedQueryResponseTransformer() { - descriptors.setBlackListedQueryResponseTransformerIds(ImmutableSet.of("bar")); - - Map descriptor = descriptors.getQueryResponseTransformer("bar"); - - assertThat(descriptor, is(nullValue())); - } - - @Test - public void testGetBlacklistedMetacardTransformers() { - Set blacklist = ImmutableSet.of("hello", "world"); - - descriptors.setBlackListedMetacardTransformerIds(blacklist); - - assertThat(descriptors.getBlackListedMetacardTransformerIds(), contains("hello", "world")); - } - - private ServiceReference createMockServiceReference(String id, String displayName) { - ServiceReference serviceReference = mock(ServiceReference.class); - - when(serviceReference.getProperty("id")).thenReturn(id); - when(serviceReference.getProperty("displayName")).thenReturn(displayName); - - return serviceReference; - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/util/CqlQueriesImplTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/util/CqlQueriesImplTest.java deleted file mode 100644 index 94bdcc37a5b..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/util/CqlQueriesImplTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.util; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import ddf.action.ActionRegistry; -import ddf.catalog.CatalogFramework; -import ddf.catalog.filter.AttributeBuilder; -import ddf.catalog.filter.ContextualExpressionBuilder; -import ddf.catalog.filter.FilterAdapter; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.ProcessingDetails; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.impl.QueryRequestImpl; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.codice.ddf.catalog.ui.config.ConfigurationApplication; -import org.codice.ddf.catalog.ui.query.cql.CqlRequestImpl; -import org.codice.ddf.catalog.ui.query.utility.CqlQueryResponse; -import org.codice.ddf.catalog.ui.query.utility.CqlResult; -import org.junit.Before; -import org.junit.Test; -import org.opengis.filter.Filter; - -public class CqlQueriesImplTest { - - private CqlQueriesImpl cqlQueryUtil; - - private FilterBuilder filterBuilderMock; - - private FilterAdapter filterAdapterMock; - - private ActionRegistry actionRegistryMock; - - private QueryResponse responseMock; - - private ProcessingDetails detailsMock1; - - private ProcessingDetails detailsMock2; - - CatalogFramework catalogFrameworkMock; - - @Before - public void setUp() throws Exception { - - catalogFrameworkMock = mock(CatalogFramework.class); - - Filter filterMock = mock(Filter.class); - - AttributeBuilder attributeBuilderMock = mock(AttributeBuilder.class); - - ConfigurationApplication configurationApplicationMock = mock(ConfigurationApplication.class); - - ContextualExpressionBuilder contextualExpressionBuilderMock = - mock(ContextualExpressionBuilder.class); - - filterBuilderMock = mock(FilterBuilder.class); - filterAdapterMock = mock(FilterAdapter.class); - actionRegistryMock = mock(ActionRegistry.class); - responseMock = mock(QueryResponse.class); - detailsMock1 = mock(ProcessingDetails.class); - detailsMock2 = mock(ProcessingDetails.class); - - HashSet details = new HashSet<>(); - details.add(detailsMock1); - details.add(detailsMock2); - when(responseMock.getProcessingDetails()).thenReturn(details); - when(filterBuilderMock.attribute(any())).thenReturn(attributeBuilderMock); - when(attributeBuilderMock.is()).thenReturn(attributeBuilderMock); - when(attributeBuilderMock.like()).thenReturn(contextualExpressionBuilderMock); - when(contextualExpressionBuilderMock.text(anyString())).thenReturn(filterMock); - when(catalogFrameworkMock.query(any(QueryRequestImpl.class))).thenReturn(responseMock); - when(configurationApplicationMock.getMaximumUploadSize()).thenReturn(1 << 20); - - cqlQueryUtil = - new CqlQueriesImpl( - catalogFrameworkMock, filterBuilderMock, filterAdapterMock, actionRegistryMock); - } - - private CqlRequestImpl generateCqlRequest(int count) { - CqlRequestImpl cqlRequest = new CqlRequestImpl(); - cqlRequest.setCount(count); - cqlRequest.setCql("anyText ILIKE '*'"); - - return cqlRequest; - } - - @Test - public void testHitCountOnlyQuery() throws Exception { - long hitCount = 12L; - when(responseMock.getResults()).thenReturn(Collections.emptyList()); - when(responseMock.getHits()).thenReturn(hitCount); - when(catalogFrameworkMock.query(any(QueryRequestImpl.class))).thenReturn(responseMock); - - CqlQueryResponse cqlQueryResponse = cqlQueryUtil.executeCqlQuery(generateCqlRequest(0)); - List results = cqlQueryResponse.getResults(); - assertThat(results, hasSize(0)); - assertThat(cqlQueryResponse.getQueryResponse().getHits(), is(hitCount)); - } - - @Test - public void testQueryWithDetails() throws Exception { - long hitCount = 12L; - when(responseMock.getResults()).thenReturn(Collections.emptyList()); - when(responseMock.getHits()).thenReturn(hitCount); - when(catalogFrameworkMock.query(any(QueryRequestImpl.class))).thenReturn(responseMock); - - CqlQueryResponse cqlQueryResponse = cqlQueryUtil.executeCqlQuery(generateCqlRequest(1)); - Set details = cqlQueryResponse.getQueryResponse().getProcessingDetails(); - assertThat(details.size(), is(2)); - assertThat(details, hasItem(detailsMock1)); - assertThat(details, hasItem(detailsMock2)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/util/EndpointUtilTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/util/EndpointUtilTest.java deleted file mode 100644 index 17e1d091ea6..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/util/EndpointUtilTest.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.util; - -import static ddf.catalog.data.AttributeType.AttributeFormat.STRING; -import static ddf.catalog.data.types.Security.ACCESS_ADMINISTRATORS; -import static ddf.catalog.data.types.Security.ACCESS_GROUPS; -import static ddf.catalog.data.types.Security.ACCESS_GROUPS_READ; -import static ddf.catalog.data.types.Security.ACCESS_INDIVIDUALS; -import static ddf.catalog.data.types.Security.ACCESS_INDIVIDUALS_READ; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.anEmptyMap; -import static org.hamcrest.Matchers.hasKey; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.nullValue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyList; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import com.google.common.collect.ImmutableList; -import ddf.catalog.CatalogFramework; -import ddf.catalog.data.AttributeDescriptor; -import ddf.catalog.data.AttributeRegistry; -import ddf.catalog.data.AttributeType; -import ddf.catalog.data.InjectableAttribute; -import ddf.catalog.data.Metacard; -import ddf.catalog.data.MetacardType; -import ddf.catalog.data.RequiredAttributesRegistry; -import ddf.catalog.data.Result; -import ddf.catalog.data.impl.AttributeImpl; -import ddf.catalog.data.impl.MetacardImpl; -import ddf.catalog.data.impl.UiAttributeImpl; -import ddf.catalog.data.types.Core; -import ddf.catalog.filter.AttributeBuilder; -import ddf.catalog.filter.ContextualExpressionBuilder; -import ddf.catalog.filter.EqualityExpressionBuilder; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.operation.QueryResponse; -import ddf.catalog.operation.impl.QueryRequestImpl; -import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.time.Instant; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; -import org.codice.ddf.catalog.ui.config.ConfigurationApplication; -import org.junit.Before; -import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.opengis.filter.And; -import org.opengis.filter.Filter; -import org.opengis.filter.Or; - -public class EndpointUtilTest { - - private EndpointUtil endpointUtil; - - private FilterBuilder filterBuilderMock; - - private QueryResponse responseMock; - - private Metacard metacardMock; - - private Result resultMock; - - private AttributeType attributeTypeMock; - - private MetacardType metacardTypeMock; - - private AttributeRegistry attributeRegistryMock; - - private RequiredAttributesRegistry requiredAttributesRegistryMock; - - CatalogFramework catalogFrameworkMock; - - // represents 2018-09-05T14:03:17.000Z - private static final long DATE_EPOCH = 1536156197000L; - - @Before - public void setUp() throws Exception { - - List metacardTypeList = new ArrayList<>(); - - List injectableAttributeList = new ArrayList<>(); - - // mocks - metacardTypeMock = mock(MetacardType.class); - - catalogFrameworkMock = mock(CatalogFramework.class); - - InjectableAttribute injectableAttributeMock = mock(InjectableAttribute.class); - - attributeRegistryMock = mock(AttributeRegistry.class); - - requiredAttributesRegistryMock = mock(RequiredAttributesRegistry.class); - - Filter filterMock = mock(Filter.class); - - AttributeBuilder attributeBuilderMock = mock(AttributeBuilder.class); - - ConfigurationApplication configurationApplicationMock = mock(ConfigurationApplication.class); - - ContextualExpressionBuilder contextualExpressionBuilderMock = - mock(ContextualExpressionBuilder.class); - - filterBuilderMock = mock(FilterBuilder.class); - responseMock = mock(QueryResponse.class); - metacardMock = mock(Metacard.class); - resultMock = mock(Result.class); - attributeTypeMock = mock(AttributeType.class); - - metacardTypeList.add(metacardTypeMock); - injectableAttributeList.add(injectableAttributeMock); - - // when - when(filterBuilderMock.attribute(any())).thenReturn(attributeBuilderMock); - when(attributeBuilderMock.is()).thenReturn(attributeBuilderMock); - when(attributeBuilderMock.like()).thenReturn(contextualExpressionBuilderMock); - when(contextualExpressionBuilderMock.text(anyString())).thenReturn(filterMock); - when(catalogFrameworkMock.query(any(QueryRequestImpl.class))).thenReturn(responseMock); - when(configurationApplicationMock.getMaximumUploadSize()).thenReturn(1 << 20); - - when(resultMock.getMetacard()).thenReturn(metacardMock); - when(metacardMock.getId()).thenReturn("MOCK METACARD"); - - // constructor - endpointUtil = - new EndpointUtil( - metacardTypeList, - catalogFrameworkMock, - filterBuilderMock, - injectableAttributeList, - attributeRegistryMock, - requiredAttributesRegistryMock, - configurationApplicationMock); - } - - @Test - public void testGetMetacardsByFilterExpectAll() throws Exception { - - String tagFilter = ""; - int expected = 100; - - List resultList = populateResultMockList(expected); - List emptyList = populateResultMockList(0); - - // Internal implementation detail: ResultIterable.fetchNextResults may call resultList - // a varying number times. emptyList is returned to express that all resources have been - // exhausted - when(responseMock.getResults()).thenReturn(resultList, resultList, emptyList); - - Map result = endpointUtil.getMetacardsByTag(tagFilter); - - assertThat(result.keySet(), hasSize(expected)); - } - - @Test - public void testGetMetacardTypeMapFiltered() { - AttributeDescriptor mockAttrDescriptor = mock(AttributeDescriptor.class); - when(mockAttrDescriptor.getName()).thenReturn("first"); - when(mockAttrDescriptor.getType()).thenReturn(attributeTypeMock); - when(mockAttrDescriptor.isMultiValued()).thenReturn(false); - - when(metacardTypeMock.getName()).thenReturn("mockType"); - when(attributeTypeMock.getAttributeFormat()).thenReturn(STRING); - when(attributeRegistryMock.lookup(any())).thenReturn(Optional.ofNullable(mockAttrDescriptor)); - - endpointUtil.setWhiteListedMetacardTypes(ImmutableList.of("otherType")); - Map metacardTypes = endpointUtil.getMetacardTypeMap(); - - assertThat(metacardTypes, anEmptyMap()); - assertThat(metacardTypes.containsKey("mockType"), is(false)); - } - - @Test - public void testGetMetacardTypeMapNonFiltered() { - AttributeDescriptor mockAttrDescriptor = mock(AttributeDescriptor.class); - when(mockAttrDescriptor.getName()).thenReturn("first"); - when(mockAttrDescriptor.getType()).thenReturn(attributeTypeMock); - when(mockAttrDescriptor.isMultiValued()).thenReturn(false); - - when(metacardTypeMock.getName()).thenReturn("mockType"); - when(attributeTypeMock.getAttributeFormat()).thenReturn(STRING); - when(attributeRegistryMock.lookup(any())).thenReturn(Optional.ofNullable(mockAttrDescriptor)); - - Map metacardTypes = endpointUtil.getMetacardTypeMap(); - assertThat(metacardTypes, hasKey("mockType")); - } - - @Test - public void testGetMetacardsByIdListExpectAll() throws Exception { - - String attributeName = "attr"; - int expected = 100; - - Filter tagFilter = mock(Filter.class); - List resultList = populateResultMockList(expected, attributeName); - List emptyList = populateResultMockList(0); - - Collection ids = - resultList.stream().map(result -> result.getMetacard().getId()).collect(Collectors.toSet()); - - when(responseMock.getResults()).thenReturn(resultList, resultList, emptyList); - when(filterBuilderMock.attribute(attributeName).is().equalTo()) - .thenReturn(mock(EqualityExpressionBuilder.class)); - when(filterBuilderMock.anyOf(anyList())).thenReturn(mock(Or.class)); - when(filterBuilderMock.allOf(any(Filter.class), any(Filter.class))).thenReturn(mock(And.class)); - - Map result = - endpointUtil.getMetacardsWithTagByAttributes(attributeName, ids, tagFilter); - - assertThat(result.keySet(), hasSize(expected)); - } - - @Test - public void testGetMetacardsByTagWithLikeAttributes() throws Exception { - - String ownerEmail = "doNoReply@xyz.com"; - ArgumentCaptor capturedFilterList = ArgumentCaptor.forClass(List.class); - - Map> attributeMapMock = new HashMap<>(); - attributeMapMock.put(Core.METACARD_OWNER, Collections.singletonList(ownerEmail)); - attributeMapMock.put(ACCESS_ADMINISTRATORS, Collections.singletonList(ownerEmail)); - attributeMapMock.put(ACCESS_GROUPS_READ, Collections.singletonList("guest")); - attributeMapMock.put(ACCESS_GROUPS, Collections.singletonList("admin")); - attributeMapMock.put(ACCESS_INDIVIDUALS, Collections.singletonList(ownerEmail)); - attributeMapMock.put(ACCESS_INDIVIDUALS_READ, Collections.singletonList(ownerEmail)); - - Filter tagFilter = mock(Filter.class); - List emptyList = populateResultMockList(0); - - when(responseMock.getResults()).thenReturn(emptyList); - for (String attributeName : attributeMapMock.keySet()) { - when(filterBuilderMock.attribute(attributeName).is().equalTo()) - .thenReturn(mock(EqualityExpressionBuilder.class)); - } - when(filterBuilderMock.anyOf(anyList())).thenReturn(mock(Or.class)); - when(filterBuilderMock.allOf(any(Filter.class), any(Filter.class))).thenReturn(mock(And.class)); - - Map> attributeMap = new HashMap<>(); - - // Only match on owner email - attributeMap.put(Core.METACARD_OWNER, Collections.singletonList(ownerEmail)); - endpointUtil.getMetacardsWithTagByLikeAttributes(attributeMap, tagFilter); - verify(filterBuilderMock).anyOf(capturedFilterList.capture()); - assertThat((List) capturedFilterList.getValue(), hasSize(1)); - - // Add individual access email match - attributeMap.put(ACCESS_INDIVIDUALS, Collections.singletonList(ownerEmail)); - endpointUtil.getMetacardsWithTagByLikeAttributes(attributeMap, tagFilter); - verify(filterBuilderMock, times(2)).anyOf(capturedFilterList.capture()); - assertThat((List) capturedFilterList.getValue(), hasSize(2)); - - // Add individual read only email match - attributeMap.put(ACCESS_INDIVIDUALS_READ, Collections.singletonList(ownerEmail)); - endpointUtil.getMetacardsWithTagByLikeAttributes(attributeMap, tagFilter); - verify(filterBuilderMock, times(3)).anyOf(capturedFilterList.capture()); - assertThat((List) capturedFilterList.getValue(), hasSize(3)); - - // Admistrator match - attributeMap.clear(); - attributeMap.put(ACCESS_ADMINISTRATORS, Collections.singletonList(ownerEmail)); - endpointUtil.getMetacardsWithTagByLikeAttributes(attributeMap, tagFilter); - verify(filterBuilderMock, times(4)).anyOf(capturedFilterList.capture()); - assertThat((List) capturedFilterList.getValue(), hasSize(1)); - - // Group read only match - attributeMap.clear(); - attributeMap.put(ACCESS_GROUPS_READ, Collections.singletonList(ownerEmail)); - endpointUtil.getMetacardsWithTagByLikeAttributes(attributeMap, tagFilter); - verify(filterBuilderMock, times(5)).anyOf(capturedFilterList.capture()); - assertThat((List) capturedFilterList.getValue(), hasSize(1)); - - // Group read and write match - attributeMap.put(ACCESS_GROUPS, Collections.singletonList(ownerEmail)); - endpointUtil.getMetacardsWithTagByLikeAttributes(attributeMap, tagFilter); - verify(filterBuilderMock, times(6)).anyOf(capturedFilterList.capture()); - assertThat((List) capturedFilterList.getValue(), hasSize(2)); - - // Multiple Group match - attributeMap.clear(); - attributeMap.put(ACCESS_GROUPS_READ, new ArrayList<>(Arrays.asList("guest", "admin"))); - attributeMap.put(ACCESS_GROUPS, new ArrayList<>(Arrays.asList("guest", "admin"))); - endpointUtil.getMetacardsWithTagByLikeAttributes(attributeMap, tagFilter); - verify(filterBuilderMock, times(9)).anyOf(capturedFilterList.capture()); - assertThat((List) capturedFilterList.getValue(), hasSize(2)); - } - - private List populateResultMockList(int size) { - return populateResultMockList(size, (String) null); - } - - // this method will return Metacards with an attribute if the attribute parameter is specified - private List populateResultMockList(int size, String attribute) { - - List resultMockList = new ArrayList<>(); - - for (int i = 0; i < size; i++) { - resultMock = mock(Result.class); - metacardMock = mock(Metacard.class); - - when(resultMock.getMetacard()).thenReturn(metacardMock); - when(metacardMock.getId()).thenReturn("MOCK METACARD " + (i + 1)); - - if (attribute != null) { - when(metacardMock.getAttribute(attribute)) - .thenReturn(UiAttributeImpl.fromMultipleValues(attribute, new ArrayList<>())); - } - resultMockList.add(resultMock); - } - - return resultMockList; - } - - @Test - public void testParseDateEmptyString() { - Serializable serializable = endpointUtil.parseDate(""); - assertThat(serializable, nullValue()); - } - - @Test - public void testCopyAttributes() { - - AttributeDescriptor firstAttributeDescriptor = mock(AttributeDescriptor.class); - when(firstAttributeDescriptor.getName()).thenReturn("first"); - - AttributeDescriptor secondAttributeDescriptor = mock(AttributeDescriptor.class); - when(secondAttributeDescriptor.getName()).thenReturn("second"); - - MetacardType metacardType = mock(MetacardType.class); - when(metacardType.getAttributeDescriptors()) - .thenReturn( - new HashSet<>(Arrays.asList(firstAttributeDescriptor, secondAttributeDescriptor))); - - String firstValue = "a"; - String secondValue = "b"; - - Metacard sourceMetacard = new MetacardImpl(); - sourceMetacard.setAttribute(new AttributeImpl(firstAttributeDescriptor.getName(), firstValue)); - sourceMetacard.setAttribute( - new AttributeImpl(secondAttributeDescriptor.getName(), secondValue)); - - Metacard destinationMetacard = new MetacardImpl(); - - endpointUtil.copyAttributes(sourceMetacard, metacardType, destinationMetacard); - - assertThat( - Collections.singletonList(firstValue), - is(destinationMetacard.getAttribute(firstAttributeDescriptor.getName()).getValues())); - assertThat( - Collections.singletonList(secondValue), - is(destinationMetacard.getAttribute(secondAttributeDescriptor.getName()).getValues())); - } - - @Test - public void testParseDateEpochIsoZ() { - Instant date = new Date(DATE_EPOCH).toInstant(); - - Instant dateConverted = endpointUtil.parseDate("2018-09-05T14:03:17.000Z"); - assertThat(dateConverted, is(date)); - } - - @Test - public void testParseDateEpochIso0000() { - Instant date = new Date(DATE_EPOCH).toInstant(); - - Instant dateConverted = endpointUtil.parseDate("2018-09-05T14:03:17.000+00:00"); - assertThat(dateConverted, is(date)); - } - - @Test - public void testParseDateEpochIsoNoMilli() { - Instant date = new Date(DATE_EPOCH).toInstant(); - - Instant dateConverted = endpointUtil.parseDate("2018-09-05T14:03:17Z"); - assertThat(dateConverted, is(date)); - } - - @Test - public void testParseDateEpochIsoDifferentTimeZone() { - Instant date = new Date(DATE_EPOCH).toInstant(); - - Instant dateConverted = endpointUtil.parseDate("2018-09-05T10:03:17.000-04:00"); - assertThat(dateConverted, is(date)); - } - - @Test - public void testParseDateEpochLong() { - Instant date = new Date(DATE_EPOCH).toInstant(); - - Instant dateConverted = endpointUtil.parseDate(DATE_EPOCH); - assertThat(dateConverted, is(date)); - } - - @Test - public void testParseDateEpochString() { - Instant date = new Date(DATE_EPOCH).toInstant(); - - Instant dateConverted = endpointUtil.parseDate(Long.toString(DATE_EPOCH)); - assertThat(dateConverted, is(date)); - } - - @Test - public void testParseDateWhiteSpaceString() { - Instant dateConverted = endpointUtil.parseDate(" "); - assertThat(dateConverted, nullValue()); - } - - @Test - public void testGetJsonUsesIsoDateTimeFormat() { - Date date = new Date(DATE_EPOCH); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); - String dateIso = sdf.format(date); - Map map = new HashMap<>(); - map.put("date", date); - String json = endpointUtil.getJson(map); - assertThat(json, is("{\"date\":\"" + dateIso + "\"}")); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/AttributeExtractorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/AttributeExtractorTest.java deleted file mode 100644 index b1ae10bfbf0..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/AttributeExtractorTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validator.query.unsupportedattributes; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; - -import com.google.common.collect.ImmutableSet; -import ddf.catalog.filter.FilterAdapter; -import ddf.catalog.filter.FilterBuilder; -import ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl; -import ddf.catalog.filter.proxy.builder.GeotoolsFilterBuilder; -import ddf.catalog.source.UnsupportedQueryException; -import java.util.Date; -import java.util.Set; -import org.junit.Test; -import org.opengis.filter.Filter; - -public class AttributeExtractorTest { - - private FilterAdapter filterAdapter = new GeotoolsFilterAdapterImpl(); - - private FilterBuilder filterBuilder = new GeotoolsFilterBuilder(); - - private AttributeExtractor attributeExtractor = new AttributeExtractor(filterAdapter); - - @Test - public void testExtractAttributesComparisonFilter() throws UnsupportedQueryException { - Filter filter = filterBuilder.attribute("attr").is().text("text"); - Set attributes = attributeExtractor.extractAttributes(filter); - - assertThat(attributes, is(ImmutableSet.of("attr"))); - } - - @Test - public void testExtractAttributesTemporalFilter() throws UnsupportedQueryException { - Filter filter = filterBuilder.attribute("attr").before().date(new Date(1562112000L)); - Set attributes = attributeExtractor.extractAttributes(filter); - - assertThat(attributes, is(ImmutableSet.of("attr"))); - } - - @Test - public void testExtractAttributesSpatialFilter() throws UnsupportedQueryException { - Filter filter = - filterBuilder.attribute("attr").within().wkt("POLYGON((51 11,42 0,41 10,51 11))"); - Set attributes = attributeExtractor.extractAttributes(filter); - - assertThat(attributes, is(ImmutableSet.of("attr"))); - } - - @Test - public void testExtractAttributesAndFilter() throws UnsupportedQueryException { - Filter filter = - filterBuilder.allOf( - filterBuilder.attribute("attr-1").is().text("text-1"), - filterBuilder.attribute("attr-2").is().text("text-2")); - Set attributes = attributeExtractor.extractAttributes(filter); - - assertThat(attributes, is(ImmutableSet.of("attr-1", "attr-2"))); - } - - @Test - public void testExtractAttributesOrFilter() throws UnsupportedQueryException { - Filter filter = - filterBuilder.anyOf( - filterBuilder.attribute("attr-1").is().text("text-1"), - filterBuilder.attribute("attr-2").is().text("text-2")); - Set attributes = attributeExtractor.extractAttributes(filter); - - assertThat(attributes, is(ImmutableSet.of("attr-1", "attr-2"))); - } - - @Test - public void testExtractAttributesNotFilter() throws UnsupportedQueryException { - Filter filter = filterBuilder.not(filterBuilder.attribute("attr").is().text("text")); - Set attributes = attributeExtractor.extractAttributes(filter); - - assertThat(attributes, is(ImmutableSet.of("attr"))); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/UnsupportedAttributeQueryValidatorTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/UnsupportedAttributeQueryValidatorTest.java deleted file mode 100644 index 22f733d5102..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/validator/query/unsupportedattributes/UnsupportedAttributeQueryValidatorTest.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.validator.query.unsupportedattributes; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hamcrest.Matchers.hasItems; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; -import static org.mockito.ArgumentMatchers.any; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import ddf.catalog.operation.QueryRequest; -import ddf.catalog.source.Source; -import ddf.catalog.source.SourceAttributeRestriction; -import ddf.catalog.source.UnsupportedQueryException; -import java.util.Map; -import java.util.Set; -import java.util.function.Supplier; -import org.codice.ddf.catalog.ui.validation.impl.violation.QueryValidationViolationImpl; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation; -import org.codice.ddf.catalog.ui.validation.violation.QueryValidationViolation.Severity; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; - -public class UnsupportedAttributeQueryValidatorTest { - - private UnsupportedAttributeQueryValidator validator; - - private AttributeExtractor attributeExtractor = Mockito.mock(AttributeExtractor.class); - - private Supplier messageFormatSupplier = (Supplier) Mockito.mock(Supplier.class); - - @Before - public void setup() { - Mockito.when(messageFormatSupplier.get()) - .thenReturn("The field \"{attribute}\" is not supported by the {sources} Source(s)"); - } - - @Test - public void testGetValidatorId() { - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - assertThat(validator.getValidatorId(), is("unsupportedAttribute")); - } - - @Test - public void testValidateNoViolationsIfNoRestrictionsRegistered() - throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())).thenReturn(ImmutableSet.of("attr-1")); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - - QueryRequest request = mockQueryRequest("src-1"); - Set violations = validator.validate(request); - - assertThat(violations, hasSize(0)); - } - - @Test - public void testValidateSingleValidAttribute() throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())).thenReturn(ImmutableSet.of("attr")); - QueryRequest request = mockQueryRequest("src-1"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(mockRestriction("src-1", ImmutableSet.of("attr"))); - - Set violations = validator.validate(request); - - assertThat(violations, hasSize(0)); - } - - @Test - public void testValidateSingleInvalidAttribute() throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())).thenReturn(ImmutableSet.of("attr-2")); - QueryRequest request = mockQueryRequest("src-1"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(mockRestriction("src-1", ImmutableSet.of("attr-1"))); - - Set violations = validator.validate(request); - - QueryValidationViolation violation = - makeViolation( - "The field \"attr-2\" is not supported by the src-1 Source(s)", "attr-2", "src-1"); - assertThat(violations, hasSize(1)); - assertThat(violations, hasItem(violation)); - } - - @Test - public void testValidateNoViolationsIfSourceDoesNotHaveRestriction() - throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())).thenReturn(ImmutableSet.of("attr-2")); - QueryRequest request = mockQueryRequest("src-1"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(mockRestriction("src-2", ImmutableSet.of("attr-2"))); - - Set violations = validator.validate(request); - - assertThat(violations, hasSize(0)); - } - - @Test - public void testValidateNoViolationsIfFailedToGetAttributesFromQuery() - throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())) - .thenThrow(UnsupportedQueryException.class); - QueryRequest request = mockQueryRequest("src-1"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(mockRestriction("src-1", ImmutableSet.of("attr-1"))); - - Set violations = validator.validate(request); - - assertThat(violations, hasSize(0)); - } - - @Test - public void testValidateMultipleInvalidAttributes() throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())) - .thenReturn(ImmutableSet.of("attr-2", "attr-3")); - QueryRequest request = mockQueryRequest("src-1"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(mockRestriction("src-1", ImmutableSet.of("attr-1"))); - - Set violations = validator.validate(request); - - QueryValidationViolation violation1 = - makeViolation( - "The field \"attr-2\" is not supported by the src-1 Source(s)", "attr-2", "src-1"); - QueryValidationViolation violation2 = - makeViolation( - "The field \"attr-3\" is not supported by the src-1 Source(s)", "attr-3", "src-1"); - assertThat(violations, hasSize(2)); - assertThat(violations, hasItems(violation1, violation2)); - } - - @Test - public void testValidateTwoSourcesProduceCorrectMessage() throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())).thenReturn(ImmutableSet.of("attr-2")); - QueryRequest request = mockQueryRequest("src-1", "src-2"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(mockRestriction("src-1", ImmutableSet.of("attr-1"))); - validator.bind(mockRestriction("src-2", ImmutableSet.of("attr-1"))); - - Set violations = validator.validate(request); - - QueryValidationViolation violation = - makeViolation( - "The field \"attr-2\" is not supported by the src-1 and src-2 Source(s)", - "attr-2", - "src-1", - "src-2"); - assertThat(violations, hasSize(1)); - assertThat(violations, hasItem(violation)); - } - - @Test - public void testValidateThreeSourcesProduceCorrectMessage() throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())).thenReturn(ImmutableSet.of("attr-2")); - QueryRequest request = mockQueryRequest("src-1", "src-2", "src-3"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(mockRestriction("src-1", ImmutableSet.of("attr-1"))); - validator.bind(mockRestriction("src-2", ImmutableSet.of("attr-1"))); - validator.bind(mockRestriction("src-3", ImmutableSet.of("attr-1"))); - - Set violations = validator.validate(request); - - QueryValidationViolation violation = - makeViolation( - "The field \"attr-2\" is not supported by the src-1, src-2, and src-3 Source(s)", - "attr-2", - "src-1", - "src-2", - "src-3"); - assertThat(violations, hasSize(1)); - assertThat(violations, hasItem(violation)); - } - - @Test - public void testBindNullSourceAttributeRestrictionDoesNotErrorOut() { - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.bind(null); - } - - @Test - public void testUnbindNullSourceAttributeRestrictionDoesNotErrorOut() { - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - validator.unbind(null); - } - - @Test - public void testUnbind() throws UnsupportedQueryException { - Mockito.when(attributeExtractor.extractAttributes(any())).thenReturn(ImmutableSet.of("attr-2")); - QueryRequest request = mockQueryRequest("src-1"); - validator = new UnsupportedAttributeQueryValidator(attributeExtractor, messageFormatSupplier); - - // There is one violation because a SourceAttributeViolation was bound - validator.bind(mockRestriction("src-1", ImmutableSet.of("attr-1"))); - Set violations = validator.validate(request); - assertThat(violations, hasSize(1)); - - // There are no violations because the SourceAttributeViolation was unbound - validator.unbind(mockRestriction("src-1", ImmutableSet.of("attr-1"))); - Set violationsAfterUnbind = validator.validate(request); - assertThat(violationsAfterUnbind, hasSize(0)); - } - - private QueryRequest mockQueryRequest(String... sourceIds) { - QueryRequest request = Mockito.mock(QueryRequest.class); - Mockito.when(request.getSourceIds()).thenReturn(ImmutableSet.copyOf(sourceIds)); - return request; - } - - private SourceAttributeRestriction mockRestriction( - String sourceId, Set supportedAttributes) { - Source source = Mockito.mock(Source.class); - Mockito.when(source.getId()).thenReturn(sourceId); - SourceAttributeRestriction restriction = Mockito.mock(SourceAttributeRestriction.class); - Mockito.when(restriction.getSource()).thenReturn(source); - Mockito.when(restriction.getSupportedAttributes()).thenReturn(supportedAttributes); - return restriction; - } - - private QueryValidationViolation makeViolation( - String message, String attribute, String... sources) { - Map extraData = - ImmutableMap.of("attribute", attribute, "sources", ImmutableSet.copyOf(sources)); - return new QueryValidationViolationImpl(Severity.ERROR, message, extraData); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/ws/JsonRpcTest.java b/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/ws/JsonRpcTest.java deleted file mode 100644 index 53c7f55b90f..00000000000 --- a/ui-backend/catalog-ui-search/src/test/java/org/codice/ddf/catalog/ui/ws/JsonRpcTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.ws; - -import static org.codice.gsonsupport.GsonTypeAdapters.MAP_STRING_TO_OBJECT_TYPE; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import org.codice.gsonsupport.GsonTypeAdapters.LongDoubleTypeAdapter; -import org.eclipse.jetty.websocket.api.RemoteEndpoint; -import org.eclipse.jetty.websocket.api.Session; -import org.junit.Test; -import org.mockito.ArgumentCaptor; - -public class JsonRpcTest { - - private static final Gson GSON = - new GsonBuilder() - .disableHtmlEscaping() - .serializeNulls() - .registerTypeAdapterFactory(LongDoubleTypeAdapter.FACTORY) - .create(); - - private Map methods = ImmutableMap.of("id", (value) -> value); - - private JsonRpc rpc = new JsonRpc(methods); - - private static void assertError(Map response, long code) { - assertThat(response.containsKey("error"), is(true)); - assertThat(response.get("error"), instanceOf(Map.class)); - Map error = (Map) response.get("error"); - assertThat(error.get("code"), is(code)); - } - - private Map onMessage(JsonRpc rpc, String message) throws IOException { - ArgumentCaptor captor = ArgumentCaptor.forClass(String.class); - Session session = mock(Session.class); - RemoteEndpoint endpoint = mock(RemoteEndpoint.class); - doReturn(endpoint).when(session).getRemote(); - rpc.onMessage(session, message); - verify(endpoint).sendStringByFuture(captor.capture()); - return GSON.fromJson(captor.getValue(), MAP_STRING_TO_OBJECT_TYPE); - } - - @Test - public void testRpcVersionInResponse() throws Exception { - Map response = onMessage(rpc, "{}"); - assertThat(response.get("jsonrpc"), is(JsonRpc.VERSION)); - } - - @Test - public void testInvalidRequest() throws Exception { - assertError(onMessage(rpc, "[}"), JsonRpc.PARSE_ERROR); - } - - @Test - public void testVersionCheck() throws Exception { - assertError(onMessage(rpc, "{}"), JsonRpc.INVALID_REQUEST); - } - - @Test - public void testMethodNotFound() throws Exception { - String message = "{\"method\":\"not-found\",\"id\":0,\"jsonrpc\":\"2.0\",\"params\":null}"; - assertError(onMessage(rpc, message), JsonRpc.METHOD_NOT_FOUND); - } - - @Test - public void testSucessfulCall() throws Exception { - List value = ImmutableList.of(0L); - String message = "{\"method\":\"id\",\"id\":6,\"jsonrpc\":\"2.0\",\"params\":[0]}"; - Map resp = onMessage(rpc, message); - assertThat(resp.get("id"), is(6L)); - assertThat(resp.get("result"), is(value)); - } -} diff --git a/ui-backend/catalog-ui-search/src/test/resources/IntrigueBundle.properties b/ui-backend/catalog-ui-search/src/test/resources/IntrigueBundle.properties deleted file mode 100644 index 8ccaac06121..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/IntrigueBundle.properties +++ /dev/null @@ -1,4 +0,0 @@ -Source=Source -source=source -Sources=Sources -sources=sources \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/config.json b/ui-backend/catalog-ui-search/src/test/resources/config.json deleted file mode 100644 index 0026c00dcdf..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/config.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "branding": "DDF", - "timeout": 30000, - "resultCount": 250, - "gazetteer": false, - "projection": "EPSG:4326", - "imageryProviders": [ - { - "type": "SI", - "url": "/images/natural_earth_50m.png", - "parameters": { - "imageSize": [10800, 5400] - }, - "alpha": 1 - } - ] -} diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-filter-simple.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-filter-simple.xml deleted file mode 100644 index 7ebad21c831..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-filter-simple.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - language - ${value} - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-simple-response.json b/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-simple-response.json deleted file mode 100644 index 5a9d3bde02e..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-simple-response.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "filterTemplate": { - "type": "=", - "property": "language", - "value": "${value}" - }, - "creator": "system", - "querySettings": {}, - "id": "abcdefg", - "title": "MY_TITLE", - "description": "MY_DESCRIPTION", - "created": 1544447380000, - "modified": 1544447380000, - "accessGroups": [], - "accessGroupsRead": [], - "accessIndividuals": [], - "accessIndividualsRead": [], - "accessAdministrators": [] - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-simple.json b/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-simple.json deleted file mode 100644 index 879d416f139..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/app/form-simple.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "filterTemplate": { - "type": "=", - "property": "language", - "value": "${value}" - }, - "title": "MY_TITLE", - "description": "MY_DESCRIPTION" -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/app/inline-xml.xslt b/ui-backend/catalog-ui-search/src/test/resources/forms/app/inline-xml.xslt deleted file mode 100644 index f4742de84d6..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/app/inline-xml.xslt +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/comparison-binary-ops/Equal.json b/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/comparison-binary-ops/Equal.json deleted file mode 100644 index 740b0acf8ca..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/comparison-binary-ops/Equal.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "=", - "property": "depth", - "value": 100 -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/comparison-binary-ops/GreaterThan.json b/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/comparison-binary-ops/GreaterThan.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/hybrid/hybrid-example-1.json b/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/hybrid/hybrid-example-1.json deleted file mode 100644 index 91d7bedf988..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/hybrid/hybrid-example-1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "AND", - "filters" : [ - { - "type": "=", - "property": "depth", - "value": 100 - }, - { - "type": "INTERSECTS", - "property": "anyGeo", - "value": "WKT()" - } - ] -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/hybrid/hybrid-example-2.json b/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/hybrid/hybrid-example-2.json deleted file mode 100644 index 5a5f1c2ee4a..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/hybrid/hybrid-example-2.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "OR", - "filters": [ - { - "type": ">", - "property": "depth", - "value": 100 - }, - { - "type": "AND", - "filters": [ - { - "type": "<", - "property": "depth", - "value": 100 - }, - { - "type": "BEFORE", - "property": "created", - "value": "2018-02-08T23:24:12.709Z" - }, - { - "type": "ILIKE", - "property": "name", - "value" : "Bob" - } - ] - } - ] -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/spatial-distance-ops/DWithin.json b/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/spatial-distance-ops/DWithin.json deleted file mode 100644 index 1325798d2c9..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter-json/spatial-distance-ops/DWithin.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "DWITHIN", - "property": "anyGeo", - "value": "WKT()", - "distance": 123.45 -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsEqualTo.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsEqualTo.xml deleted file mode 100644 index 31b91e152e2..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsEqualTo.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - depth - 100 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsGreaterThan.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsGreaterThan.xml deleted file mode 100644 index 1e89fbc8cf9..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsGreaterThan.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - depth - 100 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsGreaterThanOrEqualTo.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsGreaterThanOrEqualTo.xml deleted file mode 100644 index b0dde6a35ca..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsGreaterThanOrEqualTo.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - depth - 100 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsLessThan.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsLessThan.xml deleted file mode 100644 index 639267c946d..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsLessThan.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - depth - 100 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsLessThanOrEqualTo.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsLessThanOrEqualTo.xml deleted file mode 100644 index 05778cad7f6..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsLessThanOrEqualTo.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - depth - 100 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsNotEqualTo.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsNotEqualTo.xml deleted file mode 100644 index d4b096214df..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-binary-ops/PropertyIsNotEqualTo.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - depth - 100 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsBetween.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsBetween.xml deleted file mode 100644 index 815bdb63000..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsBetween.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - depth - - 100 - - - 200 - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsLike.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsLike.xml deleted file mode 100644 index ba8f1bf9ec9..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsLike.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - title - greetings - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsNil.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsNil.xml deleted file mode 100644 index 8cfcbee1a4a..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsNil.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - title - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsNull.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsNull.xml deleted file mode 100644 index e3e44bf33f8..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/comparison-ops/PropertyIsNull.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - title - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/function-ops/Function.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/function-ops/Function.xml deleted file mode 100644 index fabca569d80..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/function-ops/Function.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - title - - - - - abj38gh3b57g83 - - true - - false - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/function-ops/Intersects.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/function-ops/Intersects.xml deleted file mode 100644 index a43a8825a13..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/function-ops/Intersects.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - location - - - id - true - false - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/hybrid/hybrid-example-1.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/hybrid/hybrid-example-1.xml deleted file mode 100644 index a90afd395f5..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/hybrid/hybrid-example-1.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - address - - - my-id-1 - true - false - - - - - name - - russian-news-story - my-id-2 - true - false - - - - - - attName - 5 - - - - benumber - - 83.5653 - my-id-3 - true - true - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/hybrid/hybrid-example-2.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/hybrid/hybrid-example-2.xml deleted file mode 100644 index 93c992994de..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/hybrid/hybrid-example-2.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - class - U - - - - owner - tstark - - - - name - Bob - - - - watchers - 900 - - - - severity - 0.39 - - - - popularity - - 0.78 - my-id-1 - true - false - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/And.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/And.xml deleted file mode 100644 index 6b876f706e1..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/And.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - title - - - location - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/Not.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/Not.xml deleted file mode 100644 index dd843f2f1b7..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/Not.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - title - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/Or.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/Or.xml deleted file mode 100644 index 40f4e7a433b..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/logic-ops/Or.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - title - - - location - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-binary-ops/Disjoint.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-binary-ops/Disjoint.xml deleted file mode 100644 index 7e1c7414ca1..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-binary-ops/Disjoint.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - location - - 1 1 - - - diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-binary-ops/Intersects.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-binary-ops/Intersects.xml deleted file mode 100644 index d02ea78a68d..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-binary-ops/Intersects.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - location - - - - 10 10 20 20 30 30 40 40 10 10 - - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-distance-ops/Beyond.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-distance-ops/Beyond.xml deleted file mode 100644 index d9bba8972bd..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-distance-ops/Beyond.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - location - - 13.0983 31.5899 - 35.5472 42.8143 - - 100 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-distance-ops/DWithin.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-distance-ops/DWithin.xml deleted file mode 100644 index 7e96987b566..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-distance-ops/DWithin.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - location - POINT(10, 10) - - 150.50 - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-ops/BBox.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-ops/BBox.xml deleted file mode 100644 index 6236353211a..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/spatial-ops/BBox.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - location - - 42.943 -71.032 - 43.039 -69.856 - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/temporal-ops/gml/TEquals.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/temporal-ops/gml/TEquals.xml deleted file mode 100644 index cffc52c6a1e..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/temporal-ops/gml/TEquals.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - created - - 2005-05-19T09:28:40Z - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/temporal-ops/literal/TEquals.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/temporal-ops/literal/TEquals.xml deleted file mode 100644 index 18d62d77754..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/filter2/temporal-ops/literal/TEquals.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - created - 2005-05-19T09:28:40Z - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/forms.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/forms.json deleted file mode 100644 index f36114891f9..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/forms.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "title": "Multiple Null Fields", - "description": null, - "filterTemplateFile": null - }, - { - "title": "Imagery Only", - "description": "Search across all image datatypes.", - "filterTemplateFile": "imagery.xml" - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/imagery.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/imagery.xml deleted file mode 100644 index 26cae9f56ad..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/imagery.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - datatype - Image - - - title - - - my-id-1 - true - false - - - - - media.bit-rate - - - my-id-2 - true - false - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/results.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/results.json deleted file mode 100644 index 42db4af744e..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-entries/results.json +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "title": "Common Fields", - "description": "A set of minimalist fields needed for skimming results", - "descriptors": [ - "title", - "description", - "created", - "resource-download-url", - "thumbnail" - ] - }, - { - "title": "Descriptors Element NOT Actually a List", - "description": "A set of minimalist fields needed for skimming results", - "descriptors": "title" - }, - { - "title": "Invalid Field in List", - "description": "Because the unit tests need something to use", - "descriptors": [ - "title", - 8, - "created", - "resource-download-url", - "thumbnail" - ] - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-structure/forms.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-structure/forms.json deleted file mode 100644 index f785badc9f0..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-structure/forms.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "I am a single map, not a list", - "description": "Search across all image datatypes.", - "filterTemplateFile": "imagery.xml" -} diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-structure/results.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-structure/results.json deleted file mode 100644 index 89dd82ab760..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/invalid-structure/results.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "title": "Common Fields", - "description": "A set of minimalist fields needed for skimming results", - "descriptors": [ - "title", - "description", - "created", - "resource-download-url", - "thumbnail" - ] - }, - [ - "arbitrary inner list that doesn't belong" - ] -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/missing/forms.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/missing/forms.json deleted file mode 100644 index ea146e5f135..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/missing/forms.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "title": "Imagery Only, but the XML file isn't here", - "description": "Search across all image datatypes.", - "filterTemplateFile": "imagery.xml" - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/missing/results.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/missing/results.json deleted file mode 100644 index 1890ac212ae..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/missing/results.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "title": "Common Fields", - "description": "A set of minimalist fields needed for skimming results", - "descriptors": [ - "title", - "description", - "created", - "resource-download-url", - "thumbnail" - ] - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/contact-name.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/contact-name.xml deleted file mode 100644 index e2381dc6563..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/contact-name.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - contact.creator-name - - - my-id-same-source - true - false - - - - contact.publisher-name - - - my-id-same-source - true - false - - - - contact.point-of-contact-name - - - my-id-same-source - true - false - - - - contact.contributor-name - - - my-id-same-source - true - false - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/forms.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/forms.json deleted file mode 100644 index 922fa30d515..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/forms.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "title": "Contact Name", - "description": "A convenient single-field form for searching across all types of contact names.", - "filterTemplateFile": "contact-name.xml" - }, - { - "title": "Imagery Only", - "description": "Search across all image datatypes.", - "filterTemplateFile": "imagery.xml" - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/imagery.xml b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/imagery.xml deleted file mode 100644 index 26cae9f56ad..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/imagery.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - datatype - Image - - - title - - - my-id-1 - true - false - - - - - media.bit-rate - - - my-id-2 - true - false - - - - \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/results.json b/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/results.json deleted file mode 100644 index 1890ac212ae..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/forms/loader/valid/results.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "title": "Common Fields", - "description": "A set of minimalist fields needed for skimming results", - "descriptors": [ - "title", - "description", - "created", - "resource-download-url", - "thumbnail" - ] - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/handshake.json b/ui-backend/catalog-ui-search/src/test/resources/handshake.json deleted file mode 100644 index 1f33e972871..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/handshake.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "2", - "minimumVersion": "1.0", - "supportedConnectionTypes": [ - "callback-polling", - "long-polling" - ], - "successful": true, - "channel": "/meta/handshake", - "clientId": "2733kz8sqszpe1kba6r9zz562p", - "version": "1.0" - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/imagery-providers.json b/ui-backend/catalog-ui-search/src/test/resources/imagery-providers.json deleted file mode 100644 index 1101230cc9c..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/imagery-providers.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "type": "OSM", - "url": "http://otile1.mqcdn.com/tiles/1.0.0/map", - "fileExtension": "jpg", - "alpha": 1 - }, - { - "type": "OSM", - "url": "http://otile1.mqcdn.com/tiles/1.0.0/sat", - "fileExtension": "jpg", - "alpha": 0.5 - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/log4j.properties b/ui-backend/catalog-ui-search/src/test/resources/log4j.properties deleted file mode 100644 index 5750252ecfb..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/log4j.properties +++ /dev/null @@ -1,8 +0,0 @@ -# Root logger option -log4j.rootLogger=ERROR, stdout - -# Direct log messages to stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n diff --git a/ui-backend/catalog-ui-search/src/test/resources/queries/basic.json b/ui-backend/catalog-ui-search/src/test/resources/queries/basic.json deleted file mode 100644 index 5ff21ce9b6a..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/queries/basic.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "cql":"(\"anyText\" ILIKE 'foo bar')", - "filterTree":"{\"type\":\"AND\",\"filters\":[{\"type\":\"ILIKE\",\"property\":\"anyText\",\"value\":\"foo bar\"}]}", - "federation":"enterprise", - "sorts":[ - { - "attribute":"modified", - "direction":"descending" - } - ], - "type":"advanced", - "title":"(\"anyText\" ILIKE 'foo bar')" -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/query.json b/ui-backend/catalog-ui-search/src/test/resources/query.json deleted file mode 100644 index 0fd7bb86979..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/query.json +++ /dev/null @@ -1,314 +0,0 @@ -{ - "id": "e863f023-3b6f-4575-badf-a1f114e7b378", - "hits": 11, - "results": [ - { - "metacard": { - "properties": { - "id": "d34832c4a9444c5681851c63dc468ce3", - "source-id": "ddf.distribution", - "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata-content-type": "foo", - "resource-uri": "http://foo/bar", - "resource-size": "113880", - "thumbnail": "R0lGODdh+gD6AOMAAMzMzJaWlrGxsZycnKOjo76+vsXFxaqqqre3twAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAA+gD6AAAE/hDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AFMJGBAgAIECTAYWPAjMAMGCEAVUgEixoAELCgdIdOGwYoCN/hM8QrxYISNIUQQgHkhZEGFIkQFITngIcYALlgFWQnQpAWbMCjQL2hRVYKcEAQspqDzA9IAAmQAOCD3w8ACLoi2PJn2Zs6lTqFIDDKBa0GqoAgQRTDAgVKnFDGzfxv2pAm0AtRLiDu35FsPci39H8QSANYBbuhcQbAXAEu+KwYUPQ62g2OCExqjC7gWwU4AAxxPCgkSaMwNEAhJwftB8uIBn0BJETyBttlThkyIHDH7IE+vmiSM5Q/Rw+zBF3RR4T/Btau4AqDCfz8wqgTkGAY0rEzgJtyb03DKVV29biuZgxmUNdPzIVeZcDXEJhJ2cwXwFlgfUPwQZPO9wUjhx/peXY5Xt1R8A72kQVlkeBHiBAQSSJxxiCYpCmmUcVHhghX5RRN8FF6KW4X8TukciKIVJ10F/4hEmYQYsibhBih9ewCJ1Loo1in0e3BhAby8+6CEHPK7YV4vWgVIZe35xR6JsWpWmwYVMZrCkgGs5WVBoBY3GYCgPyWhBZUDqGKWMLGG51kIs1ShBmFbimCRpaHYZypJu+kZSWLUFFlgGpCFQmZoA4JmBnrF9iWBwf37C0lheOUXBozr1lahYZEkJ4oJ8VXnfVJGeRClOYE1VlShBeUTBehRxx6pQblJkFqcXpFrRqra6mqqKoNhKUQUGKGTQebMRpNEGFLkUWa0+hhm2qrAMgWgsoQFVa+212Gar7bbcduvtt+CGK+645JZr7rnopqvuuuy26+678MYr77z01mvvvfjmq+++/Pbr778AByzwwAQXbPDBCCes8MIMN+zwwxBHLPHEFFds8cUYZ6zxxhx37PHHIIcs8sgkl2zyySinrPLKLLfs8sswxyzzzDTXbE0EADs=", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "actions": [ - { - "id": "catalog.data.metacard.view", - "title": "Export Metacard XML", - "description": "Provides a URL to the metacard", - "url": "http://localhost:8888/services/catalog/sources/ddf.distribution/d34832c4a9444c5681851c63dc468ce3" - }, - { - "id": "catalog.data.metacard.xml", - "title": "Export as xml", - "description": "Provides a URL to the metacard that transforms the return value via thexml transformer", - "url": "http://localhost:8888/services/catalog/sources/ddf.distribution/d34832c4a9444c5681851c63dc468ce3?transform=xml" - }, - { - "id": "catalog.data.metacard.resource", - "title": "Export as resource", - "description": "Provides a URL to the metacard that transforms the return value via theresource transformer", - "url": "http://localhost:8888/services/catalog/sources/ddf.distribution/d34832c4a9444c5681851c63dc468ce3?transform=resource" - }, - { - "id": "catalog.data.metacard.thumbnail", - "title": "Export as thumbnail", - "description": "Provides a URL to the metacard that transforms the return value via thethumbnail transformer", - "url": "http://localhost:8888/services/catalog/sources/ddf.distribution/d34832c4a9444c5681851c63dc468ce3?transform=thumbnail" - }, - { - "id": "catalog.data.metacard.geojson", - "title": "Export as geojson", - "description": "Provides a URL to the metacard that transforms the return value via thegeojson transformer", - "url": "http://localhost:8888/services/catalog/sources/ddf.distribution/d34832c4a9444c5681851c63dc468ce3?transform=geojson" - }, - { - "id": "catalog.data.metacard.html", - "title": "Export as html", - "description": "Provides a URL to the metacard that transforms the return value via thehtml transformer", - "url": "http://localhost:8888/services/catalog/sources/ddf.distribution/d34832c4a9444c5681851c63dc468ce3?transform=html" - }, - { - "id": "catalog.data.metacard.metadata", - "title": "Export as metadata", - "description": "Provides a URL to the metacard that transforms the return value via themetadata transformer", - "url": "http://localhost:8888/services/catalog/sources/ddf.distribution/d34832c4a9444c5681851c63dc468ce3?transform=metadata" - } - ], - "geometry": { - "type": "Point", - "coordinates": [ - -83.01654, - 42.30008 - ] - } - }, - "relevance": 1.1717760562896729 - }, - { - "metacard": { - "cached": "1692-04-15T23:03:25.878+0000", - "properties": { - "id": "f3172baad40c4deb8132a47cf91c8b0c", - "source-id": "ddf.distribution", - "title": "Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata-content-type": "foo", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -83.01654, - 42.30008 - ] - } - }, - "relevance": 1.0545984506607056 - }, - { - "metacard": { - "properties": { - "id": "d33838b3f30d4cfa95d67a7d23b394b5", - "source-id": "ddf.distribution", - "title": "Donec et mollis dolor.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata-content-type": "bar", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": null - }, - "relevance": 1.0147877931594849 - }, - { - "metacard": { - "properties": { - "id": "35faeae9e1154d2a97e2a9a1de520ad0", - "source-id": "ddf.distribution", - "title": "Praesent et diam eget libero egestas mattis sit amet vitae augue.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata-content-type": "baz", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": null - }, - "relevance": 1.0147877931594849 - }, - { - "metacard": { - "properties": { - "id": "dffc50fc1dc84619a79ffe47d2a15572", - "source-id": "ddf.distribution", - "title": "Nam tincidunt congue enim, ut porta lorem lacinia consectetur.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata-content-type": "baz", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": null - }, - "relevance": 1.0147877931594849 - }, - { - "metacard": { - "properties": { - "id": "9cd00c4d1abd4039bb025d8dc78c8eea", - "source-id": "ddf.distribution", - "title": "Donec ut libero sed arcu vehicula ultricies a non tortor.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata-content-type": "baz", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": null - }, - "relevance": 1.0147877931594849 - }, - { - "metacard": { - "properties": { - "id": "cf58cbbeb1754c538db94c1ae4244095", - "source-id": "ddf.distribution", - "title": "Aenean ut gravida lorem.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata-content-type": "qux", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -79.4163, - 43.70011 - ] - } - }, - "relevance": 1.0045887231826782 - }, - { - "metacard": { - "properties": { - "id": "b02b0f80457c45eb8e258e3d2041fe5b", - "source-id": "ddf.distribution", - "title": "Ut turpis felis, pulvinar a semper sed, adipiscing id dolor.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -75.69812, - 45.41117 - ] - } - }, - "relevance": 0.994284987449646 - }, - { - "metacard": { - "properties": { - "id": "a5238e5f227a439b8ed31dca47f0fb69", - "source-id": "ddf.distribution", - "title": "Pellentesque auctor nisi id magna consequat sagittis.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -79.4163, - 43.70011 - ] - } - }, - "relevance": 0.9374208450317383 - }, - { - "metacard": { - "properties": { - "id": "5637ad2376d1420b9756927a5e275b72", - "source-id": "ddf.distribution", - "title": "Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -114.08529, - 51.05011 - ] - } - }, - "relevance": 0.9300683736801147 - }, - { - "metacard": { - "properties": { - "id": "415a57ba087f4d06b09abd9c3ccdc1ad", - "source-id": "ddf.distribution", - "title": "Ut convallis libero in urna ultrices accumsan.", - "created": "2014-02-22T18:11:27.169+0000", - "metacard-type": "ddf.metacard", - "modified": "2014-02-22T18:11:27.169+0000", - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis urna tristique augue suscipit lacinia. Mauris eget erat ipsum. Mauris mollis mi eget turpis tempor, quis tincidunt quam venenatis. Aliquam sed felis ligula. Cras tempor fermentum leo, at tincidunt libero euismod ac. Nunc facilisis nisl neque. Class aptent taciti sociosqu." - }, - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [ - -73.58781, - 45.50884 - ] - } - }, - "relevance": 0.9300683736801147 - } - ], - "successful": true, - "status": [ - { - "elapsed": 43, - "id": "ddf.distribution", - "hits": 11, - "results": 11, - "state": "SUCCEEDED" - }, - { - "elapsed": 6250, - "id": "federated.source", - "hits": 0, - "results": 0, - "state": "SUCCEEDED" - } - ], - "metacard-types": { - "ddf.metacard": { - "resource-uri": "STRING", - "location": "GEOMETRY", - "expiration": "DATE", - "metadata-target-namespace": "STRING", - "metadata-content-type": "STRING", - "effective": "DATE", - "modified": "DATE", - "id": "STRING", - "title": "STRING", - "thumbnail": "BINARY", - "created": "DATE", - "metadata-content-type-version": "STRING", - "resource-size": "STRING", - "metadata": "XML" - } - } -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/query2.json b/ui-backend/catalog-ui-search/src/test/resources/query2.json deleted file mode 100644 index 359e147d992..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/query2.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "id": "e863f023-3b6f-4575-badf-a1f114e7b378", - "hits": 0, - "results": [], - "successful": true, - "status": [ - { - "elapsed": 43, - "id": "ddf.distribution", - "hits": 0, - "results": 0, - "state": "SUCCEEDED" - }, - { - "elapsed": 6250, - "id": "federated.source", - "hits": 0, - "results": 0, - "state": "SUCCEEDED" - } - ], - "metacard-types": { - "ddf.metacard": { - "resource-uri": "STRING", - "location": "GEOMETRY", - "expiration": "DATE", - "metadata-target-namespace": "STRING", - "metadata-content-type": "STRING", - "effective": "DATE", - "modified": "DATE", - "id": "STRING", - "title": "STRING", - "thumbnail": "BINARY", - "created": "DATE", - "metadata-content-type-version": "STRING", - "resource-size": "STRING", - "metadata": "XML" - } - } -} diff --git a/ui-backend/catalog-ui-search/src/test/resources/sources.json b/ui-backend/catalog-ui-search/src/test/resources/sources.json deleted file mode 100644 index 44380308e70..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/sources.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "id": "ddf.distribution", - "available": true, - "contentTypes": [ - { - "name": "foo", - "version": "2.0" - }, - { - "name": "bar", - "version": "2.0" - } - ], - "version": "2.3.0.ALPHA5-SNAPSHOT" - }, - { - "id": "federated.source", - "available": true, - "contentTypes": [ - { - "name": "baz", - "version": "2.0" - }, - { - "name": "qux", - "version": "2.0" - } - ], - "version": "2.3.0.ALPHA5-SNAPSHOT" - } -] \ No newline at end of file diff --git a/ui-backend/catalog-ui-search/src/test/resources/terrain-provider.json b/ui-backend/catalog-ui-search/src/test/resources/terrain-provider.json deleted file mode 100644 index 349362c4614..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/terrain-provider.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "CT", - "url": "http://cesiumjs.org/stk-terrain/tilesets/world/tiles" -} diff --git a/ui-backend/catalog-ui-search/src/test/resources/ui.json b/ui-backend/catalog-ui-search/src/test/resources/ui.json deleted file mode 100644 index abb80328eaa..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/ui.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "footer": null, - "color": "white", - "background": "black", - "header": null -} diff --git a/ui-backend/catalog-ui-search/src/test/resources/user.json b/ui-backend/catalog-ui-search/src/test/resources/user.json deleted file mode 100644 index f4fa9d24418..00000000000 --- a/ui-backend/catalog-ui-search/src/test/resources/user.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "user": "testuser1" -} \ No newline at end of file diff --git a/ui-backend/catalog-ui-splitter/pom.xml b/ui-backend/catalog-ui-splitter/pom.xml deleted file mode 100644 index 17dceb8a2fd..00000000000 --- a/ui-backend/catalog-ui-splitter/pom.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - 4.0.0 - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - catalog-ui-splitter - DDF :: Catalog :: UI :: Splitter - bundle - - - org.codice.ddf.search - catalog-ui-search-api - ${project.version} - - - ddf.platform.util - platform-util - ${ddf.version} - - - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId} - - !com.google.common.collect, - !com.google.common.io, - * - - - org.codice.ddf.catalog.ui.splitter.impl - - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.96 - - - BRANCH - COVEREDRATIO - 0.96 - - - COMPLEXITY - COVEREDRATIO - 0.96 - - - - - - - - - - - diff --git a/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/AbstractSplitter.java b/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/AbstractSplitter.java deleted file mode 100644 index f4bf5669f8b..00000000000 --- a/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/AbstractSplitter.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter.impl; - -import com.google.common.collect.ImmutableMap; -import ddf.catalog.Constants; -import java.util.ArrayList; -import java.util.Map; -import java.util.Set; -import javax.activation.MimeType; -import org.codice.ddf.catalog.ui.constants.ServicePropertiesConstants; -import org.codice.ddf.catalog.ui.splitter.Splitter; - -public abstract class AbstractSplitter implements Splitter { - - private final String id; - - private final Set mimeTypes; - - protected AbstractSplitter(String id, Set mimeTypes) { - this.id = id; - this.mimeTypes = mimeTypes; - } - - @Override - public final Map getProperties() { - return new ImmutableMap.Builder() - .put(Constants.SERVICE_ID, getId()) - .put(ServicePropertiesConstants.MIME_TYPE, new ArrayList<>(getMimeTypes())) - .putAll(getAdditionalProperties()) - .build(); - } - - /** Do not include the service identifier or the mime-types. */ - protected abstract Map getAdditionalProperties(); - - @Override - public final String getId() { - return id; - } - - @Override - public final Set getMimeTypes() { - return mimeTypes; - } -} diff --git a/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/StorableResourceImpl.java b/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/StorableResourceImpl.java deleted file mode 100644 index eb7e31a7a8f..00000000000 --- a/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/StorableResourceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter.impl; - -import java.io.IOException; -import java.io.InputStream; -import java.util.LinkedList; -import java.util.List; -import java.util.Optional; -import javax.annotation.Nullable; -import javax.annotation.concurrent.NotThreadSafe; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.splitter.StorableResource; -import org.codice.ddf.platform.util.TemporaryFileBackedOutputStream; - -@NotThreadSafe -public class StorableResourceImpl implements StorableResource { - - private TemporaryFileBackedOutputStream temporaryFileBackedOutputStream; - private String mimeType; - private String filename; - private String errorMessage; - private List openInputStreams = new LinkedList<>(); - - private StorableResourceImpl(@Nullable String mimeType, String filename) { - temporaryFileBackedOutputStream = new TemporaryFileBackedOutputStream(); - this.mimeType = mimeType; - this.filename = filename; - } - - /** The caller is responsible for closing the InputStream argument. */ - public StorableResourceImpl(InputStream inputStream, @Nullable String mimeType, String filename) - throws IOException { - this(mimeType, filename); - IOUtils.copy(inputStream, temporaryFileBackedOutputStream); - } - - public StorableResourceImpl(String input, @Nullable String mimeType, String filename) - throws IOException { - this(mimeType, filename); - temporaryFileBackedOutputStream.write(input.getBytes()); - } - - public StorableResourceImpl(String errorMessage) { - this.errorMessage = errorMessage; - } - - public StorableResourceImpl(InputStream inputStream, String filename) throws IOException { - this(inputStream, null, filename); - } - - @Override - public InputStream getInputStream() throws IOException { - InputStream inputStream = temporaryFileBackedOutputStream.asByteSource().openStream(); - openInputStreams.add(inputStream); - return inputStream; - } - - @Override - public Optional getMimeType() { - return Optional.ofNullable(mimeType); - } - - @Override - public String getFilename() { - return filename; - } - - @Override - public boolean isError() { - return errorMessage != null; - } - - @Override - public String getErrorMessage() { - return errorMessage; - } - - @Override - public void close() { - if (temporaryFileBackedOutputStream != null) { - IOUtils.closeQuietly(temporaryFileBackedOutputStream); - temporaryFileBackedOutputStream = null; - } - openInputStreams.forEach(IOUtils::closeQuietly); - openInputStreams.clear(); - } -} diff --git a/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/ZipSplitter.java b/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/ZipSplitter.java deleted file mode 100644 index d0783222a1e..00000000000 --- a/ui-backend/catalog-ui-splitter/src/main/java/org/codice/ddf/catalog/ui/splitter/impl/ZipSplitter.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.ui.splitter.impl; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Serializable; -import java.util.Collections; -import java.util.Iterator; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import java.util.Spliterator; -import java.util.Spliterators; -import java.util.stream.Stream; -import java.util.stream.StreamSupport; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; -import javax.activation.MimeType; -import org.apache.commons.io.IOUtils; -import org.codice.ddf.catalog.ui.splitter.StorableResource; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** Splits a ZIP file into its immediate children. Does not recurse through each child item. */ -public class ZipSplitter extends AbstractSplitter { - - private static final Logger LOGGER = LoggerFactory.getLogger(ZipSplitter.class); - - public ZipSplitter(String id, Set mimeTypes) { - super(id, mimeTypes); - } - - @Override - public Stream split( - StorableResource storableResource, Map arguments) - throws IOException { - ZipIterator zipIterator = new ZipIterator(storableResource.getInputStream()); - return StreamSupport.stream( - Spliterators.spliteratorUnknownSize(zipIterator, Spliterator.NONNULL), false) - .onClose(zipIterator::close); - } - - @Override - protected Map getAdditionalProperties() { - return Collections.emptyMap(); - } - - private static class ZipIterator implements Iterator, AutoCloseable { - - private ZipInputStream zipInputStream; - private ZipEntry zipEntry; - - ZipIterator(InputStream inputStream) throws IOException { - zipInputStream = new ZipInputStream(inputStream); - zipEntry = zipInputStream.getNextEntry(); - } - - @Override - public boolean hasNext() { - return zipEntry != null; - } - - @Override - public StorableResource next() { - if (!hasNext()) { - throw new NoSuchElementException("There are no more items in the ZIP."); - } - try { - String filename = zipEntry.getName(); - StorableResource storableResource = new StorableResourceImpl(zipInputStream, filename); - safeCloseEntry(); - zipEntry = zipInputStream.getNextEntry(); - return storableResource; - } catch (IOException e) { - String message = "Failed to get the next item in the ZIP file."; - LOGGER.debug(message, e); - return new StorableResourceImpl(message); - } - } - - @Override - public void close() { - if (zipInputStream != null) { - safeCloseEntry(); - IOUtils.closeQuietly(zipInputStream); - zipInputStream = null; - zipEntry = null; - } - } - - private void safeCloseEntry() { - try { - zipInputStream.closeEntry(); - } catch (IOException e) { - LOGGER.debug("Unable to close zip entry.", e); - } - } - } -} diff --git a/ui-backend/catalog-ui-splitter/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/ui-backend/catalog-ui-splitter/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 3d9c5edbfb0..00000000000 --- a/ui-backend/catalog-ui-splitter/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - application/zip - application/octet-stream - - - - - - - - - - - diff --git a/ui-backend/deprecatable-enumeration-api/pom.xml b/ui-backend/deprecatable-enumeration-api/pom.xml deleted file mode 100644 index eb6cb709cb1..00000000000 --- a/ui-backend/deprecatable-enumeration-api/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - 4.0.0 - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - deprecatable-enumeration-api - DDF :: Catalog :: UI :: Deprecatable Enumeration API - bundle - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.0.0 - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId} - - org.codice.ddf.catalog.ui.enumeration.api - - - - - - - - - diff --git a/ui-backend/deprecatable-enumeration-api/src/main/java/org/codice/ddf/catalog/ui/enumeration/api/DeprecatableEnumeration.java b/ui-backend/deprecatable-enumeration-api/src/main/java/org/codice/ddf/catalog/ui/enumeration/api/DeprecatableEnumeration.java deleted file mode 100644 index 6fd78e5713d..00000000000 --- a/ui-backend/deprecatable-enumeration-api/src/main/java/org/codice/ddf/catalog/ui/enumeration/api/DeprecatableEnumeration.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -package org.codice.ddf.catalog.ui.enumeration.api; - -import java.util.Set; - -public interface DeprecatableEnumeration { - - /** Get an unmodifable set of deprecated values. */ - Set getDeprecatedValues(); - - /** The name of the attribute. */ - String getAttribute(); -} diff --git a/ui-backend/intrigue-ui-app/pom.xml b/ui-backend/intrigue-ui-app/pom.xml deleted file mode 100644 index 7a624c94ed7..00000000000 --- a/ui-backend/intrigue-ui-app/pom.xml +++ /dev/null @@ -1,206 +0,0 @@ - - - - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - 4.0.0 - DDF :: UI :: Search UI :: App - intrigue-ui-app - pom - - - - org.apache.felix - maven-bundle-plugin - - - - guava, - - - !com.fasterxml.jackson.*, - !io.swagger.annotations*, - !org.glassfish.jersey.*, - * - - ${project.artifactId} - - - - - maven-resources-plugin - - - copy-resources - generate-resources - - copy-resources - - - ${basedir}/target/classes - - - src/main/resources - true - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - attach-artifacts - prepare-package - false - - attach-artifact - - - - - target/classes/features.xml - xml - features - - - src/main/resources/etc/org.codice.ddf.catalog.ui.config - - properties - catalog-ui-config - - - src/main/resources/etc/org.codice.ddf.catalog.ui.theme.config - - properties - catalog-ui-theme-config - - - src/main/resources/etc/org.codice.ddf.catalog.ui.attribute.hidden.config - - properties - catalog-ui-attribute-hidden-config - - - src/main/resources/etc/IntrigueBundle.properties - config - intrigue-bundle-config - - - src/main/resources/etc/definitions/ui-preferences-injector.json - config - ui-preferences-injector - - - - - - - - - - - com.connexta - ddf-rpc-api - ${ddf-jsonrpc.version} - - - com.connexta.jsonrpc - jsonrpc-features - ${ddf-jsonrpc.version} - features - xml - - - org.codice.ddf.search - boolean-search-application - ${project.version} - - - org.codice.ddf.search - catalog-plugin-highlight - ${project.version} - - - org.codice.ddf.search - catalog-ui-search - ${project.version} - - - org.codice.ddf.search - catalog-ui-search-api - ${project.version} - - - org.codice.ddf.search - catalog-ui-oauth - ${project.version} - - - ddf.catalog.transformer - catalog-transformer-propertyjson-metacard - ${ddf.version} - - - org.codice.ddf.search - catalog-ui-enumeration - ${project.version} - - - org.codice.ddf.search - catalog-ui-splitter - ${project.version} - - - org.codice.thirdparty - javalin - ${javalin.thirdparty.bundle.version} - - - org.codice.ddf.search - audit-api - ${project.version} - - - org.codice.ddf.search - audit-application - ${project.version} - - - org.codice.ddf.search - audit-logging - ${project.version} - - - com.google.guava - guava - ${guava.version} - - - org.ops4j.pax.web - pax-web-jsp - ${pax.web.jsp.version} - - - diff --git a/ui-backend/intrigue-ui-app/src/main/resources/etc/IntrigueBundle.properties b/ui-backend/intrigue-ui-app/src/main/resources/etc/IntrigueBundle.properties deleted file mode 100644 index ea15ea2973f..00000000000 --- a/ui-backend/intrigue-ui-app/src/main/resources/etc/IntrigueBundle.properties +++ /dev/null @@ -1,10 +0,0 @@ -sources.available=All sources are currently up -sources.unavailable={amountDown} {amountDown, plural, one {source is} other {sources are}} currently down -sources.title=Sources -sources.options.all=All Sources -sources.polling.error.title=Error Polling Sources -sources.polling.error.message=Unable to query server for list of active sources -search.sources.selected.none.message=No sources are currently selected. Edit the search and select at least one source. -form.title=Form -forms.title=Forms -validation.attribute.unsupported=The field "{attribute}" is not supported by the {sources} Source(s) diff --git a/ui-backend/intrigue-ui-app/src/main/resources/etc/definitions/ui-preferences-injector.json b/ui-backend/intrigue-ui-app/src/main/resources/etc/definitions/ui-preferences-injector.json deleted file mode 100644 index b4f1ecfb004..00000000000 --- a/ui-backend/intrigue-ui-app/src/main/resources/etc/definitions/ui-preferences-injector.json +++ /dev/null @@ -1,479 +0,0 @@ -{ - "attributeTypes": { - "notification-categories": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "layoutId": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "columnWidths": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "inspector-hideEmpty": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "mapLayers": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "resultDisplay": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "resultPreview": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": true - }, - "resultFilter": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "resultSort": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "inspector-summaryShown": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "inspector-summaryOrder": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "inspector-detailsOrder": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": true - }, - "inspector-detailsHidden": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "results-attributesShownTable": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "results-attributesShownList": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "homeFilter": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "homeSort": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "homeDisplay": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "alerts": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "decimalPrecision": { - "type": "INTEGER", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "alertPersistence": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "alertExpiration": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "visualization": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "columnHide": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "columnOrder": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "hasSelectedColumns": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "uploads": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "oauth": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "fontSize": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "resultCount": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "dateTimeFormat": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "timeZone": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "coordinateFormat": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "autoPan": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "goldenLayout": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "goldenLayoutUpload": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "goldenLayoutMetacard": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "goldenLayoutAlert": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "theme": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "animation": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "hoverPreview": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "querySettings": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - }, - "mapHome": { - "type": "STRING", - "stored": true, - "indexed": true, - "tokenized": false, - "multivalued": false - } - }, - "inject": [ - { - "attribute": "notification-categories", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "layoutId", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "columnWidths", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "inspector-hideEmpty", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "mapLayers", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "resultDisplay", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "resultPreview", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "resultFilter", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "resultSort", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "inspector-summaryShown", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "inspector-summaryOrder", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "inspector-detailsOrder", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "inspector-detailsHidden", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "results-attributesShownTable", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "results-attributesShownList", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "homeFilter", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "homeSort", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "homeDisplay", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "alerts", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "alertPersistence", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "alertExpiration", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "visualization", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "columnHide", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "columnOrder", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "hasSelectedColumns", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "uploads", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "oauth", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "fontSize", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "resultCount", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "dateTimeFormat", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "timeZone", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "coordinateFormat", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "autoPan", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "goldenLayout", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "goldenLayoutUpload", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "goldenLayoutMetacard", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "goldenLayoutAlert", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "theme", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "animation", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "hoverPreview", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "querySettings", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "mapHome", - "metacardTypes": ["ddf.preferences"] - }, - { - "attribute": "decimalPrecision", - "metacardTypes": ["ddf.preferences"] - } - ] -} \ No newline at end of file diff --git a/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.attribute.hidden.config b/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.attribute.hidden.config deleted file mode 100644 index eccf354557e..00000000000 --- a/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.attribute.hidden.config +++ /dev/null @@ -1,7 +0,0 @@ -hiddenAttributes=[ \ - "^sorts$", \ - "^cql$", \ - "^polling$", \ - "^cached$", \ - "^filterTree$", \ - ] diff --git a/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.config b/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.config deleted file mode 100644 index 021b874fe31..00000000000 --- a/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.config +++ /dev/null @@ -1,105 +0,0 @@ -resultCount=I"250" -exportResultLimit=I"1000" -imageryProviders="" -terrainProvider="{\ \"type\":\ \"CT\",\ \"url\":\ \"http://assets.agi.com/stk-terrain/tilesets/world/tiles\"\ }" -defaultLayout="[{\"type\":\ \"stack\",\ \"content\":\ [{\"type\":\ \"component\",\ \"component\":\ \"cesium\",\ \"componentName\":\ \"cesium\",\ \"title\":\ \"3D\ Map\"},\ {\"type\":\ \"component\",\ \"component\":\ \"inspector\",\ \"componentName\":\ \"inspector\",\ \"title\":\ \"Inspector\"}]}]" -visualizations="[{\"name\":\"openlayers\",\"title\":\"2D\ Map\",\"icon\":\"map\"},{\"name\":\"cesium\",\"title\":\"3D\ Map\",\"icon\":\"globe\"},{\"name\":\"inspector\",\"title\":\"Inspector\",\"icon\":\"info\"},{\"name\":\"histogram\",\"title\":\"Histogram\",\"icon\":\"bar-chart\"},{\"name\":\"table\",\"title\":\"Table\",\"icon\":\"table\"}]" -projection="EPSG:4326" -bingKey="" -timeout=I"300000" -sourcePollInterval=I"60000" -signInEnabled=B"true" -taskEnabled=B"false" -gazetteerEnabled=B"true" -onlineGazetteerEnabled=B"true" -cacheEnabled=B"true" -webSocketsEnabled=B"false" -localCatalogEnabled=B"true" -experimentalEnabled=B"false" -relevanceScoresEnabled=B"false" -relevancePrecision=I"5" -logoEnabled=B"false" -unknownErrorBoxEnabled=B"true" -metacardPreviewEnabled=B"true" -spellcheckEnabled=B"false" -phoneticsEnabled=B"false" -fuzzyResultsEnabled=B"true" -customTextNotationEnabled=B"false" -customTextNotationAttribute="title" -basicSearchTemporalSelectionDefault=[ \ - "created", \ - "effective", \ - "modified", \ - "metacard.created", \ - "metacard.modified", \ - ] -basicSearchMatchType="datatype" -typeNameMapping=[ \ - ] -readOnly=[ \ - "^checksum$", \ - "^checksum-algorithm$", \ - "^id$", \ - "^resource-download-url$", \ - "^resource-uri$", \ - "^resource.derived-uri$", \ - "^resource.derived-download-url$", \ - "^modified$", \ - "^metacard-tags$", \ - "^metadata$", \ - "^metacard-type$", \ - "^source-id$", \ - "^point-of-contact$", \ - "^metacard.", \ - "^version.", \ - "^validation.", \ - ] -summaryShow=[ \ - "created", \ - "modified", \ - "thumbnail", \ - ] -iconConfig=[ \ - "default\=fa\ fa-file,f15b,FontAwesome,12px", \ - "interactive\=fa\ fa-gamepad,f11b,FontAwesome,12px", \ - "dataset\=fa\ fa-database,f1c0,FontAwesome,12px", \ - "video\=fa\ fa-video-camera,f03d,FontAwesome,12px", \ - "collection\=fa\ fa-folder-open,f1c0,FontAwesome,12px", \ - "event\=fa\ fa-bolt,f0e7,FontAwesome,12px", \ - "service\=fa\ fa-globe,f0ac,FontAwesome,12px", \ - "software\=fa\ fa-terminal,f120,FontAwesome,12px", \ - "sound\=fa\ fa-music,f001,FontAwesome,12px", \ - "text\=fa\ fa-file-text,f15c,FontAwesome,12px", \ - "document\=fa\ fa-file,f15b,FontAwesome,12px", \ - "image\=fa\ fa-camera,f030,FontAwesome,12px", \ - "track\=fa\ fa-thumb-tack,f08d,FontAwesome,12px", \ - ] -resultShow=[ \ - ] -scheduleFrequencyList=L[ \ - "1800", \ - "3600", \ - "7200", \ - "14400", \ - "28800", \ - "57600", \ - "86400", \ - ] -maximumUploadSize=I"1048576" -mapHome="" -attributeEnumMap=[ \ - ] -requiredAttributes=[ \ - ] -defaultSources=[ \ - ] -defaultTableColumns=[ \ - ] -helpUrl="https://codice.org/ddf/docs/documentation.html" -customBranding="DDF" -product="Intrigue" -landingPageBackgroundSrc="" -topLeftLogoSrc="" -bottomLeftLogoSrc="" -bottomLeftBackgroundSrc="" -menuIconSrc="" \ No newline at end of file diff --git a/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.theme.config b/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.theme.config deleted file mode 100644 index 5e88a6f4bd8..00000000000 --- a/ui-backend/intrigue-ui-app/src/main/resources/etc/org.codice.ddf.catalog.ui.theme.config +++ /dev/null @@ -1 +0,0 @@ -theme="dark" diff --git a/ui-backend/intrigue-ui-app/src/main/resources/features.xml b/ui-backend/intrigue-ui-app/src/main/resources/features.xml deleted file mode 100644 index 5d65588d676..00000000000 --- a/ui-backend/intrigue-ui-app/src/main/resources/features.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - mvn:com.connexta.jsonrpc/jsonrpc-features/${ddf-jsonrpc.version}/xml/features - mvn:org.codice.ddf.search/ui-frontend/${project.version}/xml/features - mvn:ddf.features/apps/${ddf.version}/xml/features - - - mvn:org.codice.ddf.search/catalog-ui-search-api/${project.version} - - - - mvn:org.codice.ddf.search/boolean-search-application/${project.version} - - - - spatial-app - offline-gazetteer - camel-http - resource-bundle-locator - platform-usng4j - platform-configuration - persistence-core - - security-core-services - catalog-ui-search-api - javalin - - - jsonrpc-2.25 - mvn:ddf.persistence.core/persistence-core-api/${ddf.version} - mvn:ddf.persistence.core/persistence-core-impl/${ddf.version} - - - mvn:org.codice.ddf.search/intrigue-ui-app/${project.version}/properties/catalog-ui-config - - - - mvn:org.codice.ddf.search/intrigue-ui-app/${project.version}/properties/catalog-ui-theme-config - - - - mvn:org.codice.ddf.search/intrigue-ui-app/${project.version}/properties/catalog-ui-attribute-hidden-config - - - - mvn:org.codice.ddf.search/intrigue-ui-app/${project.version}/config/intrigue-bundle-config - - - - mvn:org.codice.ddf.search/intrigue-ui-app/${project.version}/config/ui-preferences-injector - - - mvn:ddf.catalog.transformer/catalog-transformer-propertyjson-metacard/${ddf.version} - mvn:org.codice.ddf.search/catalog-ui-search/${project.version} - mvn:org.codice.ddf.search/catalog-ui-oauth/${project.version} - mvn:org.codice.ddf.search/catalog-ui-enumeration/${project.version} - mvn:com.google.code.gson/gson/${gson.version} - mvn:org.codice.ddf.search/catalog-ui-splitter/${project.version} - mvn:org.apache.commons/commons-math3/${commons-math3.version} - mvn:org.codice.ddf.search/audit-api/${project.version} - mvn:org.codice.ddf.search/audit-application/${project.version} - mvn:org.codice.ddf.search/audit-logging/${project.version} - mvn:org.codice.ddf.search/catalog-plugin-highlight/${project.version} - mvn:org.codice.ddf.search/deprecatable-enumeration-api/${project.version} - - boolean-search - - - - wrap - wrap:mvn:org.checkerframework/checker-qual/2.0.0$Bundle-Name=checker-qual&Bundle-SymbolicName=checker-qual&Bundle-Version=2.0.0&Export-Package=org.checkerframework.checker.nullness.qual;version="2.0.0" - mvn:org.jetbrains.kotlin/kotlin-osgi-bundle/${kotlin-osgi.version} - mvn:org.codice.thirdparty/javalin/${javalin.thirdparty.bundle.version} - mvn:org.codice.ddf.search/javalin-utils/${project.version} - - - - catalog-app - catalog-versioning-plugin - catalog-core-validator - catalog-ui - - - - - - admin-app - platform-app - catalog-core-definitionparser - catalog-app - spatial-app - search-ui-app - catalog-solr-app - - - jsonrpc-2.25 - catalog-ui-app - ui-frontend - - - - diff --git a/ui-backend/javalin-utils/pom.xml b/ui-backend/javalin-utils/pom.xml deleted file mode 100644 index 6f720ed7c0b..00000000000 --- a/ui-backend/javalin-utils/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - 4.0.0 - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - - javalin-utils - DDF :: Catalog :: UI :: Javalin Util - bundle - - - - org.codice.thirdparty - javalin - ${javalin.thirdparty.bundle.version} - - - com.google.code.gson - gson - ${gson.version} - - - com.google.guava - guava - ${guava.version} - - - com.google.errorprone - error_prone_annotations - ${errorprone.version} - - - ddf.catalog.core - catalog-core-api-impl - ${ddf.version} - - - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId} - - guava, - error_prone_annotations - - - !com.google.appengine.*, - !com.google.apphosting.*, - !com.google.common.util.concurrent.internal, - !com.google.common.io.*, - !com.google.errorprone.*, - !org.checkerframework.*, - * - - - org.codice.ddf.catalog.javalin.utils - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.0.2 - - - - test-jar - - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.09 - - - BRANCH - COVEREDRATIO - 0.90 - - - COMPLEXITY - COVEREDRATIO - 0.27 - - - - - - - - - - - diff --git a/ui-backend/javalin-utils/src/main/java/org/codice/ddf/catalog/javalin/utils/JavalinUtils.java b/ui-backend/javalin-utils/src/main/java/org/codice/ddf/catalog/javalin/utils/JavalinUtils.java deleted file mode 100644 index de89da92929..00000000000 --- a/ui-backend/javalin-utils/src/main/java/org/codice/ddf/catalog/javalin/utils/JavalinUtils.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.javalin.utils; - -import com.google.common.collect.ImmutableMap; -import com.google.gson.Gson; -import io.javalin.Javalin; -import io.javalin.http.BadGatewayResponse; -import io.javalin.http.BadRequestResponse; -import io.javalin.http.Context; -import io.javalin.http.NotFoundResponse; -import io.javalin.plugin.json.JavalinJson; -import java.util.Map; -import java.util.Set; -import org.opengis.filter.sort.SortOrder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public final class JavalinUtils { - - private static final Logger LOGGER = LoggerFactory.getLogger(JavalinUtils.class); - - private static final String MESSAGE = "message"; - - private static final String ASCENDING = "asc"; - - private static final String SORT_BY = "sort_by"; - - private JavalinUtils() { - // implementation not needed - } - - static { - final Gson gson = new Gson(); - JavalinJson.setFromJsonMapper(gson::fromJson); - JavalinJson.setToJsonMapper(gson::toJson); - } - - public static String getSortByParam(Context context) { - return context.queryParam(SORT_BY); - } - - public static SortOrder getSortOrder(String sortByParam) { - if (ASCENDING.equals(sortByParam)) { - return SortOrder.ASCENDING; - } else { - return SortOrder.DESCENDING; - } - } - - public static String getOrDefaultParam( - String queryParam, String defaultValue, Set validValues) { - - if (queryParam != null - && (validValues.isEmpty() || validValues.contains(queryParam.toLowerCase()))) { - return queryParam; - } - - return defaultValue; - } - - public static int getOrDefaultParam(String queryParam, int defaultValue) { - - if (queryParam != null) { - return Integer.parseInt(queryParam); - } - - return defaultValue; - } - - public static Javalin create(String contextPath) { - return Javalin.create( - config -> { - config.showJavalinBanner = false; - config.defaultContentType = "application/json"; - config.autogenerateEtags = true; - config.contextPath = contextPath; - }); - } - - public static Map message(String message) { - return ImmutableMap.of(MESSAGE, message); - } - - public static Map message(String message, Object... args) { - return ImmutableMap.of(MESSAGE, String.format(message, args)); - } - - /** @param app Javalin Application to add exception handlers to. */ - public static void initializeStandardExceptionHandlers(Javalin app) { - - // Kotlin is very strict about @NonNull arguments. When Javalin can't find a route, internally - // it throws a kotlin#TypeCastException. - app.exception( - kotlin.TypeCastException.class, - (e, ctx) -> { - final String path = ctx.path(); - LOGGER.debug( - "TypeCastException while attempting to hit possibly unmapped route [{}]", path, e); - ctx.status(404); - ctx.json(message("Unknown Route [%s]", path)); - }); - - app.exception( - BadRequestResponse.class, - (e, ctx) -> { - LOGGER.debug("Bad request provided to [{}]", ctx.path(), e); - ctx.status(400); - ctx.json(message(e.getMessage())); - }); - - app.exception( - NotFoundResponse.class, - (e, ctx) -> { - LOGGER.debug("Could not find resource while hitting route [{}]", ctx.path(), e); - ctx.status(404); - ctx.json( - message( - "Could not find resource at route [%s] using method [%s]", - ctx.path(), ctx.method())); - }); - - app.exception( - NullPointerException.class, - (e, ctx) -> { - LOGGER.debug("Null Pointer Exception while hitting route [{}]", ctx.path(), e); - ctx.status(500); - ctx.json(message("Unknown Server Error")); - }); - - app.exception( - RuntimeException.class, - (e, ctx) -> { - LOGGER.debug("Runtime Exception while hitting route [{}]", ctx.path(), e); - ctx.status(500); - ctx.json(message("Unknown Server Error")); - }); - - app.exception( - BadGatewayResponse.class, - (e, ctx) -> { - LOGGER.debug("Bad Gateway error while hitting route [{}]", ctx.path(), e); - ctx.status(502); - ctx.json(message(e.getMessage())); - }); - } -} diff --git a/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/ApplicationTestUtil.java b/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/ApplicationTestUtil.java deleted file mode 100644 index dec23955519..00000000000 --- a/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/ApplicationTestUtil.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.javalin.utils; - -import static org.junit.Assert.fail; -import static org.mockito.Mockito.when; - -import com.google.gson.Gson; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Map; -import javax.servlet.http.HttpServletRequest; - -public class ApplicationTestUtil { - - private ApplicationTestUtil() { - // implementation not needed - } - - private static final Gson GSON = new Gson(); - - public static void mockRequestBody(HttpServletRequest req, Map body) { - final String json = GSON.toJson(body); - try { - when(req.getInputStream()) - .thenReturn( - new MockServletInputStream( - new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8)))); - } catch (IOException e) { - fail(); - } - } - - public static void mockRequestBody(HttpServletRequest req, String body) { - try { - when(req.getInputStream()) - .thenReturn( - new MockServletInputStream( - new ByteArrayInputStream(body.getBytes(StandardCharsets.UTF_8)))); - } catch (IOException e) { - fail(); - } - } - - public static T fromJson(String json, Class clazz) { - return GSON.fromJson(json, clazz); - } -} diff --git a/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/JavalinUtilsTest.java b/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/JavalinUtilsTest.java deleted file mode 100644 index eb83899c3d1..00000000000 --- a/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/JavalinUtilsTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.javalin.utils; - -import static org.hamcrest.Matchers.hasEntry; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -import java.util.Collections; -import java.util.Map; -import org.junit.Test; -import org.opengis.filter.sort.SortOrder; - -public class JavalinUtilsTest { - - @Test - public void message() { - final Map message = JavalinUtils.message("test"); - assertThat(message, hasEntry("message", "test")); - } - - @Test - public void messageWithOneArg() { - final Map message = JavalinUtils.message("test - %s", "me"); - assertThat(message, hasEntry("message", "test - me")); - } - - @Test - public void messageWithTwoArgs() { - final Map message = JavalinUtils.message("test - %s - %s", "me", "please"); - assertThat(message, hasEntry("message", "test - me - please")); - } - - @Test - public void testGetSortByAscending() { - SortOrder sortOrder = JavalinUtils.getSortOrder("asc"); - assertThat(sortOrder, is(SortOrder.ASCENDING)); - } - - @Test - public void testGetSortByDescending() { - SortOrder sortOrder = JavalinUtils.getSortOrder("other"); - assertThat(sortOrder, is(SortOrder.DESCENDING)); - } - - @Test - public void testGetOrDefaultParamStringNullQueryParam() { - String result = JavalinUtils.getOrDefaultParam(null, "default", Collections.singleton("a")); - assertThat(result, is("default")); - } - - @Test - public void testGetOrDefaultParamStringEmptyValidValues() { - String result = JavalinUtils.getOrDefaultParam("b", "default", Collections.emptySet()); - assertThat(result, is("b")); - } - - @Test - public void testGetOrDefaultParamStringValidValues() { - String result = JavalinUtils.getOrDefaultParam("B", "default", Collections.singleton("b")); - assertThat(result, is("B")); - } - - @Test - public void testGetOrDefaultParamIntNullQueryParam() { - int result = JavalinUtils.getOrDefaultParam(null, 1); - assertThat(result, is(1)); - } - - @Test - public void testGetOrDefaultParamIntNonNullQueryParam() { - int result = JavalinUtils.getOrDefaultParam("2", 1); - assertThat(result, is(2)); - } -} diff --git a/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/MockServletInputStream.java b/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/MockServletInputStream.java deleted file mode 100644 index a993f69d754..00000000000 --- a/ui-backend/javalin-utils/src/test/java/org/codice/ddf/catalog/javalin/utils/MockServletInputStream.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Codice Foundation - * - *

This is free software: you can redistribute it and/or modify it under the terms of the GNU - * Lesser General Public License as published by the Free Software Foundation, either version 3 of - * the License, or any later version. - * - *

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public - * License is distributed along with this program and can be found at - * . - */ -package org.codice.ddf.catalog.javalin.utils; - -import java.io.IOException; -import java.io.InputStream; -import javax.servlet.ReadListener; -import javax.servlet.ServletInputStream; - -public class MockServletInputStream extends ServletInputStream { - - private InputStream inputStream; - - public MockServletInputStream(InputStream inputStream) { - this.inputStream = inputStream; - } - - @Override - public boolean isFinished() { - return false; - } - - @Override - public boolean isReady() { - return false; - } - - @Override - public void setReadListener(ReadListener readListener) { - // NO-OP - } - - @Override - public int read() throws IOException { - return inputStream.read(); - } -} diff --git a/ui-backend/pom.xml b/ui-backend/pom.xml deleted file mode 100644 index 505b18d4999..00000000000 --- a/ui-backend/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - - org.codice.ddf.search - catalog-ui - 5.1.51-SNAPSHOT - - - org.codice.ddf.search - backend - 5.1.51-SNAPSHOT - - pom - - - boolean-search - catalog-ui-search-api - catalog-ui-enumeration - catalog-ui-search - catalog-ui-oauth - catalog-ui-splitter - catalog-plugin-highlight - intrigue-ui-app - audit - javalin-utils - deprecatable-enumeration-api - - \ No newline at end of file diff --git a/ui-frontend/.eslintignore b/ui-frontend/.eslintignore deleted file mode 100644 index 68dfde374dd..00000000000 --- a/ui-frontend/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -target/ -node_modules/ -node/ -src/main/resources/webapp/ -packages/codice-icons/icons diff --git a/ui-frontend/.eslintrc.js b/ui-frontend/.eslintrc.js deleted file mode 100644 index c982bd2e51b..00000000000 --- a/ui-frontend/.eslintrc.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - extends: ["@connexta/eslint-config-connexta", "eslint:recommended", "plugin:react/recommended"], - rules: { - "no-console": "off", - "no-case-declarations" : "off", - "no-fallthrough" : "off", - - // don't allow unused variables but do allow unused function arguments - // libraries like mocha and express change behaviour based on the - // number of arguments (unused or not) in the function signature - "no-unused-vars" : ["error", { "args": "none" }], - - "react/prop-types" : "off", - "react/display-name" : "off", - "react/no-unescaped-entities" : "off", - "react/jsx-key" : "off", - "react/no-render-return-value" : "off", - "react/no-deprecated" : "off", - "react/no-find-dom-node" : "off" - } -}; diff --git a/ui-frontend/.gitignore b/ui-frontend/.gitignore deleted file mode 100644 index 22b7eb518a4..00000000000 --- a/ui-frontend/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -src/main/resources/webapp -packages/codice-icons/icons diff --git a/ui-frontend/.prettierrc.js b/ui-frontend/.prettierrc.js deleted file mode 100644 index 93d5441dd3f..00000000000 --- a/ui-frontend/.prettierrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("@connexta/ace/prettierrc"); diff --git a/ui-frontend/README.md b/ui-frontend/README.md deleted file mode 100644 index eb976b6cacf..00000000000 --- a/ui-frontend/README.md +++ /dev/null @@ -1,251 +0,0 @@ -# UI - -This is the root maven module that drives all the node based build tooling -for javascript projects in DDF. - -To skip this module in a maven build, specify the `-pl !\ui` build flag. - -To build the `development` bundles in a maven build, specify the -`-DwebBuildEnv=dev` flag. - -**Warning:** If you choose to skip the ui module and the distribution -module is unable to find a previously built artifact, the build will fail. - -## Getting Started - -All of the javascript is structured as npm packages located in the -`packages` directory. They can have their own dependencies specified in -the `package.json` file. Those dependencies can be from an npm registry or -local packages in the `packages` directory. Package specific help may be -provided in the package's `README.md`. - -To add the maven versions of `node` and `yarn` to your $PATH, do: - - source path.sh - -To install all dependencies for all packages, do: - - yarn install - -You can also run this command in any of the sub-packages, however it will -always install dependencies for all packages. This is a consequence of -using yarn workspaces. To find out more about yarn workspaces, please -visit their [documentation](https://yarnpkg.com/lang/en/docs/workspaces/). - -### Building - -To build all packages, do: - - yarn build - -This will run the `"build"` yarn script for all sub-packages. Any package -that does not specify a build script will be skipped. To build a single -module, cd into the package and run the same command. - -Packages have the freedom to specify how they are built. Some use -[ace](./packages/ace) which mostly just wraps webpack and specifies a -default [webpack.config.js](./packages/ace/lib/webpack.config.js), some -use [grunt](https://gruntjs.com/). New packages should favor ace over -grunt. - -### Tests - -To test all packages, do: - - yarn test - -This will run the `"test"` yarn script for all sub-packages. Any package -that does not specify a test script will be skipped. To test a single -module, cd into the package and run the same command. - -Packages have the freedom to specify how tests should be run. Some use -[ace](./packages/ace) which mostly just wraps -[mocha](https://mochajs.org/) and [phantom](http://phantomjs.org/), some -use [tap](https://www.node-tap.org/basics/). New packages should favor -mocha over tap and should prefer to run in node if they do not require a -dom. - -#### Test Server - -Some of the packages have a `start:test` script to start running a test -server which serves local spec files that can be developed / debugged in -many browsers. To invoke the start:test script, do: - - yarn start:test - -The host and port which the test server binds to is project specific, but -is most likely [http://localhost:8080](http://localhost:8080) or -[http://localhost:8282](http://localhost:8282). - -#### End-to-End Testing - -To learn about DDF's E2E testing, go to -[catalog-ui-search-e2e](./packages/catalog-ui-search-e2e). - -### Formatting - -To format the code in all sub-packages, do: - - yarn fmt - -If using [Visual Studio Code](https://code.visualstudio.com/), consider -installing the -[prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) -extension so you can run the formatter in your editor. The extension should -be able to pick up the [`.prettierrc.js`](./.prettierrc.js) config. - -### yarn.lock - -The `yarn.lock` is checked into source control, managed by `yarn` and -provides deterministic builds. To do so, it captures the dependency graph -and the resolved versions based on the state of the yarn registry. It is -very **important** that this file is stable. If it has changes, ensure -those changes are related to your current changes and not a remnant of -another unrelated branch. - -### Dev Server - -Most of the packages have a `start` script to start running a development -server which serves local html/js/css content and proxies all other -requests to a running `DDF` instance. To invoke the start script, do: - - yarn start - -The host and port which the dev server binds to is project specific, but -is most likely [http://localhost:8080](http://localhost:8080) or -[http://localhost:8282](http://localhost:8282). - -### Web Context Policy Manager - -The first issue most encounter when running the dev server is a redirect -to the IDP server. Currently authentication through IDP does not work -behind a proxy. Ideally, the IDP would work transparently behind a proxy, -at which point this solution will no longer be necessary. Until then, to -disable IDP we need to re-configure the web context policy manager. -Luckily, it's as easy as: - - yarn disable-idp - -## Ace - -As mentioned above, dependencies can be resolved locally. An example of a -locally shared dependency is `ace`. It is a node cli for interoperating -with the maven eco-system and is depended upon by any package that wishes -to produce a web app. **Most of the time you won't need to use `ace` -directly, but you may be using it indirectly through scripts specified in -the `package.json`**. This information is mostly for those who need to -know a little bit more about the ui build. - -If you do need to interact with `ace` directly, do: - - yarn ace [options] [command] - -or if you wish for `ace` to be accessible as a global command, do: - - cd packages/ace/ && yarn link - -To get more help on `ace`, do: - - ace --help - -### Web Apps - -Any `package.json` with the `context-path` key is designated as a web app. -Web apps should produce (with the help of `ace package`) an OSGI bundle -that will be attached as an artifact to the root ui maven artifact. To -attach a new artifact, do: - - ace pom - -### OSGI Hot Deploy - -To hot deploy a single web app, instead of building the entire maven -project, you can run `ace package` and `ace install` at the root of the -package. This will package any changes and install the OSGI bundle into -your local m2 using the maven coordinate -`mvn:org.codice.ddf/ui/${project.version}/jar/${package.name}`. - -### Extensibility - -Currently none of the sub-packages are published to a public javascript -registry such as npm. To get access to the packages you must either pull -the code from github, or get them from maven. Along with all the web -application bundles that are built, we also publish a sources zip -specified by [`./packages.xml`](./packages.xml). Currently, we publish -sources for: - -- ace -- linter -- codice-icons -- catalog-ui-search - -To build and deploy the sources artifact into your local `~/.m2`, do: - - yarn m2 - -This will zip up all the packages listed above into a single zip and -install it into your local m2 using the maven coordinate -`mvn:org.codice.ddf/ui/${project.version}/zip/packages`. - -To pull in the sources downstream, and deploy them to the target folder, -add this to your pom.xml: - -```xml - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - generate-resources - - unpack - - - - - org.codice.ddf - ui - ${ddf.version} - zip - packages - - - ${project.build.directory} - true - - - - - - -``` - -Exporting sources is necessary but not always sufficient for -extensibility. Specifically, catalog-ui-seach has a variety of -[plugins](./packages/catalog-ui-search/src/main/webapp/plugins). Currently -they are mostly experimental, so no guarantees are made about future -compatibility. - -#### Trade-offs - -- Tooling is easily shared (through ace) and *mostly* just works. This - reduces a lot of boilerplate and duplication. It also improves - consistency between projects since they all play by the same rules. - -- A lot of breakage can be determined at build time, especially as we - introduce more static analysis through eslint and typescript. - -- As we move to a more component-oriented architecture, downstream - projects can more easily mix-and-match generic components. This would - reduce the need for specialized plugins. - -- If downstream projects depend on a SNAPSHOT version of the sources - artifact and are using a lock file such as `yarn.lock` or - `package-lock.json` they will be unstable. Any dependency changes in - upstream dependencies will cascade downstream without any warning. - -- Package structure changes can cause breakage downstream and is something - we need to be diligent about for the exported packages listed above. diff --git a/ui-frontend/lerna-debug.log b/ui-frontend/lerna-debug.log deleted file mode 100644 index 68e54225372..00000000000 --- a/ui-frontend/lerna-debug.log +++ /dev/null @@ -1,10 +0,0 @@ -0 silly argv { _: [ 'run' ], -0 silly argv lernaVersion: '3.20.2', -0 silly argv '$0': -0 silly argv '/repos/connexta/immediate-forward-port/ddf-ui/ui-frontend/node_modules/.bin/lerna', -0 silly argv script: 'clean' } -1 notice cli v3.20.2 -2 verbose rootPath /repos/connexta/immediate-forward-port/ddf-ui/ui-frontend -3 error JSONError: Unexpected token } in JSON at position 531 while parsing near '...0fc8bcabd00184b", }}' in packages/cesium-assets/package.json -3 error at module.exports (/repos/connexta/immediate-forward-port/ddf-ui/ui-frontend/node_modules/parse-json/index.js:26:19) -3 error at parse (/repos/connexta/immediate-forward-port/ddf-ui/ui-frontend/node_modules/load-json-file/index.js:15:9) diff --git a/ui-frontend/lerna.json b/ui-frontend/lerna.json deleted file mode 100644 index dadfc5402b0..00000000000 --- a/ui-frontend/lerna.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2.12.0", - "lerna": "3.20.2", - "npmClient": "yarn", - "useWorkspaces": false -} diff --git a/ui-frontend/package.json b/ui-frontend/package.json deleted file mode 100644 index dec03ecf134..00000000000 --- a/ui-frontend/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "private": true, - "scripts": { - "test": "lerna run test", - "fmt": "ace format -w", - "format": "ace format", - "posttest": "ace pom", - "prebuild": "lerna run clean", - "build": "yarn format && lerna run build", - "build:transpile": "yarn format && lerna run build -- --tsTranspileOnly true", - "postbuild": "mkdirp target && ace gen-feature", - "postinstall": "lerna bootstrap", - "m2": "yarn install:m2", - "install:m2": "yarn mvn:create-archive && yarn mvn:install-file", - "mvn:create-archive": "mvn org.apache.maven.plugins:maven-assembly-plugin:single@create-archive", - "mvn:install-file": "mvn org.apache.maven.plugins:maven-install-plugin:install-file -Dfile=target/packages-packages.zip -DpomFile=pom.xml -Dclassifier=packages -Dpackaging=zip" - }, - "devDependencies": { - "@connexta/ace": "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe", - "@connexta/eslint-config-connexta": "git+https://github.com/connexta/eslint-config-connexta.git#105393617ec845b009b682882c95313ba50144b1", - "@connexta/eslint-plugin-connexta": "git+https://github.com/connexta/eslint-plugin-connexta.git#9b366b8924c3dbe03aedcfe6d25c8eb3567cc061", - "bootstrap-sass": "3.4.1", - "bootswatch": "3.3.7", - "compass-mixins": "0.12.10", - "cpr": "3.0.1", - "lerna": "3.20.2", - "mkdirp": "0.5.1", - "npm": "6.13.4", - "rimraf": "2.6.2", - "sass-lint": "1.12.1" - }, - "ace": { - "features": [ - "packages/*" - ] - }, - "name": "ui" -} diff --git a/ui-frontend/packages.xml b/ui-frontend/packages.xml deleted file mode 100644 index 371d515c2e4..00000000000 --- a/ui-frontend/packages.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - packages - - zip - - - - ${project.basedir}/packages/codice-icons/ - - **/node_modules/** - - codice-icons - - - ${project.basedir}/packages/catalog-ui-search/ - - **/target/** - **/node_modules/** - - catalog-ui-search - - - ${project.basedir}/packages/imperio/ - - **/target/** - **/node_modules/** - - imperio - - - ${project.basedir}/packages/ace - - **/node_modules/** - - ace - - - ${project.basedir}/packages/linter - - **/node_modules/** - - linter - - - diff --git a/ui-frontend/packages/admin/package.json b/ui-frontend/packages/admin/package.json deleted file mode 100644 index b4889e21c45..00000000000 --- a/ui-frontend/packages/admin/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "kanri", - "author": "Codice", - "description": "An administration UI for DDF", - "version": "0.0.1", - "license": "LGPL-3.0", - "keywords": [], - "repository": { - "type": "git", - "url": "https://github.com/codice/ddf.git" - }, - "engines": { - "node": "16.x.x" - }, - "devDependencies": { - "@types/react": "16.9.34", - "@types/react-dom": "16.9.7", - "@types/styled-components": "5.1.0", - "@connexta/ace": "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe" - }, - "dependencies": { - "@connexta/kanri": "connexta/kanri#3218c8bc07b22d1c583c504acbdbb2fb0b099339", - "@material-ui/core": "4.9.12", - "@material-ui/icons": "4.9.1", - "@material-ui/lab": "4.0.0-alpha.51", - "@material-ui/pickers": "3.2.10", - "notistack": "0.9.11", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-select": "3.1.0", - "react-router-dom": "5.1.2", - "styled-components": "5.1.0" - }, - "scripts": { - "start": "ace start", - "build": "node --max_old_space_size=16384 ./node_modules/@connexta/ace/bin.js bundle --tsTranspileOnly true", - "postbuild": "ace package", - "m2": "yarn install:m2" - }, - "files": [ - "src/main/webapp", - "target/webapp", - "src/main/resources" - ], - "main": "src/components/entry/entry", - "context-path": "/admin/beta" -} diff --git a/ui-frontend/packages/admin/src/components/branding/branding.tsx b/ui-frontend/packages/admin/src/components/branding/branding.tsx deleted file mode 100644 index 268df95413d..00000000000 --- a/ui-frontend/packages/admin/src/components/branding/branding.tsx +++ /dev/null @@ -1,347 +0,0 @@ -import * as React from 'react' -import Typography from '@material-ui/core/Typography' -import Grid from '@material-ui/core/Grid' -import Divider from '@material-ui/core/Divider' -import { ExtractedServicesProvider } from '@connexta/kanri/src/main/webapp/components/services/services.provider' -import { useServicesContext } from '@connexta/kanri/src/main/webapp/components/services/services.pure' -import CircularProgress from '@material-ui/core/CircularProgress' -import LinearProgress from '@material-ui/core/LinearProgress' - -import Button from '@material-ui/core/Button' -import UploadIcon from '@material-ui/icons/CloudUpload' -import { COMMANDS } from '@connexta/kanri/src/main/webapp/components/fetch/fetch' -import { - useSnackbar, - generateDismissSnackbarAction, -} from '@connexta/kanri/src/main/webapp/components/snackbar/snackbar.provider' - -type ImageInputType = { - src: string - updateSrc: (newSrc: string) => void -} - -const ImageInput = ({ src = '', updateSrc }: ImageInputType) => { - const inputRef = React.useRef(null) - if (src.includes('postscript')) { - alert( - 'postscript files are not supported, please convert to svg or png and then upload' - ) - updateSrc('') - } - if (src === '') { - return ( - <> - - { - const img = e.target - const reader = new FileReader() - reader.onload = function (event) { - const result = event.target ? event.target.result : '' - updateSrc(result as string) - img.onload = function () {} - img.onerror = () => {} - } - reader.onerror = () => {} - const file = - e.target && e.target.files ? e.target.files[0] : new Blob() - reader.readAsDataURL(file) - }} - style={{ display: 'none' }} - /> - - ) - } - - return ( - <> - - - - - - - - - - - - - <> - { - const img = e.target - const reader = new FileReader() - reader.onload = function (event) { - const result = event.target ? event.target.result : '' - updateSrc(result as string) - img.onload = function () {} - img.onerror = () => {} - } - reader.onerror = () => {} - const file = - e.target && e.target.files ? e.target.files[0] : new Blob() - reader.readAsDataURL(file) - }} - style={{ display: 'none' }} - /> - - - ) -} - -type BrandingPropertiesType = { - landingPageBackgroundSrc: string - topLeftLogoSrc: string - bottomLeftLogoSrc: string - bottomLeftBackgroundSrc: string - menuIconSrc: string -} - -const brandingConfigurationId = 'org.codice.ddf.catalog.ui' - -const BrandingContents = () => { - const { fetchServices } = useServicesContext() - const { enqueueSnackbar, closeSnackbar } = useSnackbar() - const [loading, setLoading] = React.useState(false) - const [state, setState] = React.useState({ - landingPageBackgroundSrc: '', - topLeftLogoSrc: '', - bottomLeftLogoSrc: '', - bottomLeftBackgroundSrc: '', - menuIconSrc: '', - } as BrandingPropertiesType) - const { services } = useServicesContext() - - const brandingService = services.find( - (service) => service.id === brandingConfigurationId - ) - - const submit = () => { - setLoading(true) - COMMANDS.CONFIGURATION.EDIT({ - body: { - arguments: [ - brandingConfigurationId, - { - 'service.factoryPid': brandingConfigurationId, - 'service.pid': brandingConfigurationId, - ...state, - }, - ], - operation: 'update', - type: 'EXEC', - mbean: - 'org.codice.ddf.ui.admin.api.ConfigurationAdmin:service=ui,version=2.3.0', - }, - }).then((response) => { - if (!response.success) { - enqueueSnackbar(`Branding update failed`, { - variant: 'error', - persist: true, - action: generateDismissSnackbarAction({ closeSnackbar }), - }) - setLoading(false) - } else { - fetchServices().then(() => { - enqueueSnackbar(`Branding updated`, { - variant: 'success', - autoHideDuration: 2000, - action: generateDismissSnackbarAction({ closeSnackbar }), - }) - setLoading(false) - }) - } - }) - } - - React.useEffect(() => { - if (brandingService !== undefined) { - const currentProperties = ( - brandingService.configurations - ? brandingService.configurations[0].properties - : {} - ) as BrandingPropertiesType - setState({ - ...currentProperties, - }) - setLoading(false) - } - }, [services]) - - if (services.length === 0 && brandingService === undefined) { - return - } else if (brandingService === undefined) { - return ( - <> - Branding - - Check to ensure the {brandingConfigurationId} is available. - - - ) - } - - return ( - <> - - - Branding - - - - - - - - Menu Icon - { - setState({ - ...state, - menuIconSrc: newSrc, - }) - }} - /> - - - Top Left Logo - { - setState({ - ...state, - topLeftLogoSrc: newSrc, - }) - }} - /> - - - Bottom Left Logo - { - setState({ - ...state, - bottomLeftLogoSrc: newSrc, - }) - }} - /> - - - Landing Page Background - { - setState({ - ...state, - landingPageBackgroundSrc: newSrc, - }) - }} - /> - - - Bottom Left Background - { - setState({ - ...state, - bottomLeftBackgroundSrc: newSrc, - }) - }} - /> - - - - - - - - - - - - - ) -} - -export const Branding = () => { - return ( - - - - ) -} diff --git a/ui-frontend/packages/admin/src/components/entry/entry.tsx b/ui-frontend/packages/admin/src/components/entry/entry.tsx deleted file mode 100644 index 2f10ac7467b..00000000000 --- a/ui-frontend/packages/admin/src/components/entry/entry.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { entry } from '@connexta/kanri/src/main/webapp/components/entry/entry' -import { hot } from 'react-hot-loader/root' -import * as React from 'react' -import BrandingIcon from '@material-ui/icons/Brush' -import { Branding } from '../branding/branding' - -const links = [ - { - name: 'Branding', - shortName: 'Branding', - url: 'branding', - Icon: BrandingIcon, - content: Branding, - }, -] - -entry({ - extension: { - links, - handleModuleRouting: (moduleId) => { - const Link = links.find((link) => link.url === moduleId) - return Link ? : undefined - }, - }, -}) -export default hot(() => {}) // just to enable hot reloading diff --git a/ui-frontend/packages/admin/src/main/webapp/index.js b/ui-frontend/packages/admin/src/main/webapp/index.js deleted file mode 100644 index 07599475799..00000000000 --- a/ui-frontend/packages/admin/src/main/webapp/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Index from '@connexta/kanri/src/main/webapp/index.html' - -export default Index diff --git a/ui-frontend/packages/admin/src/main/webapp/index.spec.js b/ui-frontend/packages/admin/src/main/webapp/index.spec.js deleted file mode 100644 index 0cdad49687c..00000000000 --- a/ui-frontend/packages/admin/src/main/webapp/index.spec.js +++ /dev/null @@ -1 +0,0 @@ -// need at least one test for lerna diff --git a/ui-frontend/packages/admin/tsconfig.json b/ui-frontend/packages/admin/tsconfig.json deleted file mode 100644 index 4ee11978f11..00000000000 --- a/ui-frontend/packages/admin/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react", - "allowJs": true, - "esModuleInterop": true, - "sourceMap": true, - "forceConsistentCasingInFileNames": true, - "noImplicitReturns": true, - "noImplicitAny": true, - "noImplicitThis": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "strictNullChecks": true, - "module": "commonjs", - "lib": ["es2015", "dom"], - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true - }, - "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] -} diff --git a/ui-frontend/packages/admin/yarn.lock b/ui-frontend/packages/admin/yarn.lock deleted file mode 100644 index f064a783711..00000000000 --- a/ui-frontend/packages/admin/yarn.lock +++ /dev/null @@ -1,10155 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/code-frame@^7.16.0", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298" - integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g== - -"@babel/core@7.21.3", "@babel/core@^7.12.3", "@babel/core@^7.19.6": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" - integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.3" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.3" - "@babel/types" "^7.21.3" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/generator@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.0.tgz#4b90c78d8c12825024568cbe83ee6c9af193585c" - integrity sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ== - dependencies: - "@babel/types" "^7.11.0" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/generator@^7.20.0", "@babel/generator@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" - integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== - dependencies: - "@babel/types" "^7.21.3" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" - -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" - integrity sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-member-expression-to-functions" "^7.21.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-regexp-features-plugin@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" - integrity sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-regex" "^7.10.4" - regexpu-core "^4.7.0" - -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.0.tgz#53ff78472e5ce10a52664272a239787107603ebb" - integrity sha512-N+LaFW/auRSWdx7SHD/HiARwXQju1vXTW4fKr4u5SgBUTm51OKEjKgj+cs00ggW3kEvNqwErnlwuq7Y3xBe4eg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.3.1" - -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" - integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== - dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" - integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== - dependencies: - "@babel/template" "^7.20.7" - "@babel/types" "^7.21.0" - -"@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" - integrity sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q== - dependencies: - "@babel/types" "^7.21.0" - -"@babel/helper-module-imports@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" - integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" - integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.2" - "@babel/types" "^7.21.2" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== - -"@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-regex@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" - integrity sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg== - dependencies: - lodash "^4.17.19" - -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" - integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== - dependencies: - "@babel/types" "^7.20.0" - -"@babel/helper-split-export-declaration@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" - integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== - dependencies: - "@babel/types" "^7.11.0" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" - integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" - integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" - -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.10.4", "@babel/parser@^7.11.0": - version "7.11.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.3.tgz#9e1eae46738bcd08e23e867bab43e7b95299a8f9" - integrity sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA== - -"@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" - integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" - integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.7" - -"@babel/plugin-proposal-async-generator-functions@^7.20.1": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" - integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" - -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - -"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" - integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" - integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d" - integrity sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" - integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== - dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-block-scoping@^7.20.2": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" - integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-classes@^7.20.2": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" - integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" - integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/template" "^7.20.7" - -"@babel/plugin-transform-destructuring@^7.20.2": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" - integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-dotall-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee" - integrity sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-for-of@^7.18.8": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz#964108c9988de1a60b4be2354a7d7e245f36e86e" - integrity sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== - dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-modules-amd@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" - integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== - dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-modules-commonjs@^7.19.6": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" - integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== - dependencies: - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-simple-access" "^7.20.2" - -"@babel/plugin-transform-modules-systemjs@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" - integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== - dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-identifier" "^7.19.1" - -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" - integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - -"@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz#18fc4e797cf6d6d972cb8c411dbe8a809fa157db" - integrity sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-display-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" - integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-jsx-development@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" - integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== - dependencies: - "@babel/plugin-transform-react-jsx" "^7.18.6" - -"@babel/plugin-transform-react-jsx@^7.18.6", "@babel/plugin-transform-react-jsx@^7.19.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz#656b42c2fdea0a6d8762075d58ef9d4e3c4ab8a2" - integrity sha512-6OAWljMvQrZjR2DaNhVfRz6dkCAVV+ymcLUmaf8bccGOHn2v5rHJK3tTpij0BuhdYWP4LLaqj5lwcdlpAAPuvg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.21.0" - -"@babel/plugin-transform-react-pure-annotations@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz#561af267f19f3e5d59291f9950fd7b9663d0d844" - integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-regenerator@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" - integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - regenerator-transform "^0.15.1" - -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-spread@^7.19.0": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" - integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/preset-env@7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.20.2.tgz#9b1642aa47bb9f43a86f9630011780dab7f86506" - integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== - dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.20.1" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.2" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.20.2" - "@babel/plugin-transform-classes" "^7.20.2" - "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.20.2" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.8" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.19.6" - "@babel/plugin-transform-modules-commonjs" "^7.19.6" - "@babel/plugin-transform-modules-systemjs" "^7.19.6" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.20.1" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.19.0" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.20.2" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/preset-react@7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.18.6.tgz#979f76d6277048dc19094c217b507f3ad517dd2d" - integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-react-display-name" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.18.6" - "@babel/plugin-transform-react-jsx-development" "^7.18.6" - "@babel/plugin-transform-react-pure-annotations" "^7.18.6" - -"@babel/regjsgen@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" - integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== - -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" - integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.10.4" - "@babel/types" "^7.10.4" - -"@babel/template@^7.18.10", "@babel/template@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/traverse@^7.20.0", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" - integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.3" - "@babel/types" "^7.21.3" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.4.5": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" - integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.11.0" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.11.0" - "@babel/types" "^7.11.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.4.4": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" - integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3", "@babel/types@^7.7.0": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" - integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@connexta/ace@git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe": - version "1.0.0" - resolved "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe" - dependencies: - "@babel/core" "7.21.3" - "@babel/preset-env" "7.20.2" - "@babel/preset-react" "7.18.6" - ansi-colors "4.1.3" - archiver "5.3.1" - astroturf "1.1.0" - autoprefixer "10.4.13" - babel-core "6.26.3" - babel-eslint "10.1.0" - babel-loader "9.1.2" - babel-plugin-istanbul "6.1.1" - babel-plugin-transform-react-jsx-source "6.22.0" - babel-polyfill "6.26.0" - babel-preset-latest "6.24.1" - babel-preset-react "6.24.1" - babel-preset-stage-0 "6.24.1" - buffer "6.0.3" - chalk "2.3.2" - cheerio "0.22.0" - commander "2.15.1" - console-polyfill "0.3.0" - cross-spawn "7.0.3" - css-loader "6.7.3" - eslint "8.34.0" - eslint-plugin-import "2.27.5" - eslint-plugin-node "11.1.0" - eslint-plugin-react "7.32.2" - exports-loader "4.0.0" - find-up "2.1.0" - glob "7.1.2" - html-loader "4.2.0" - html-webpack-plugin "5.5.0" - imports-loader "4.0.1" - maven-deploy "1.5.0" - memory-fs "^0.5.0" - mini-css-extract-plugin "2.7.2" - minimist "1.2.8" - mkdirp "^0.5.1" - mocha "5.2.0" - mocha-headless-chrome "2.0.1" - mocha-loader "5.1.5" - node-polyfill-webpack-plugin "2.0.1" - ora "6.1.2" - postcss "8.4.21" - postcss-loader "7.0.2" - prettier "2.8.4" - process "0.11.10" - puppeteer "1.5.0" - raw-loader "4.0.2" - react-dev-utils "12.0.1" - react-hot-loader "4.13.1" - require-from-string "^2.0.2" - rimraf "2.6.2" - script-loader "0.7.2" - simple-progress-webpack-plugin "2.0.0" - source-map-support "^0.5.21" - source-map-url "0.4.0" - stream-browserify "3.0.0" - style-loader "3.3.1" - stylelint "15.2.0" - stylelint-config-recommended "10.0.1" - stylelint-config-styled-components "0.1.1" - stylelint-custom-processor-loader "0.6.0" - stylelint-processor-styled-components "1.10.0" - tailwindcss "3.2.7" - ts-loader "9.4.2" - typescript "4.9.5" - username "3.0.0" - vkbeautify "0.99.3" - webpack "5.75.0" - webpack-bundle-analyzer "4.8.0" - webpack-dev-server "4.11.1" - webpack-merge "4.1.2" - whatwg-fetch "3.6.2" - worker-loader "3.0.8" - -"@connexta/kanri@connexta/kanri#3218c8bc07b22d1c583c504acbdbb2fb0b099339": - version "0.0.11" - resolved "https://codeload.github.com/connexta/kanri/tar.gz/3218c8bc07b22d1c583c504acbdbb2fb0b099339" - dependencies: - "@connexta/logviewer" "git+https://github.com/connexta/logviewer.git#81784420e24eb19d7584e5ee9a73789518d3e6aa" - dropzone "5.5.1" - formik "1.5.8" - fuse.js "3.4.5" - iframe-resizer "4.1.1" - lodash.throttle "4.1.1" - prop-types "15.7.2" - scroll-into-view-if-needed "2.2.20" - yup "0.27.0" - -"@connexta/logviewer@git+https://github.com/connexta/logviewer.git#81784420e24eb19d7584e5ee9a73789518d3e6aa": - version "0.1.0" - resolved "git+https://github.com/connexta/logviewer.git#81784420e24eb19d7584e5ee9a73789518d3e6aa" - dependencies: - es6-promise "3.2.1" - isomorphic-fetch "2.2.1" - lodash.includes "4.3.0" - lodash.takewhile "4.6.0" - moment "2.22.0" - object-hash "1.1.2" - random-item "1.0.0" - react-redux "6.0.0" - react-visibility-sensor "5.0.2" - redux "4.0.1" - redux-thunk "2.3.0" - -"@csstools/css-parser-algorithms@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.0.tgz#c0a605b0218790faeb5911f240964891c6031501" - integrity sha512-KP8TicdXpUyeB1NMlbHud/1l39xvLGvqNFWMpG4qC6H1zs9SadGUHe5SO92n/659sDW9aGDvm9AMru0DZkN1Bw== - -"@csstools/css-tokenizer@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.1.0.tgz#fee4de3d444db3ce9007f3af6474af8ba3e4b930" - integrity sha512-dtqFyoJBHUxGi9zPZdpCKP1xk8tq6KPHJ/NY4qWXiYo6IcSGwzk3L8x2XzZbbyOyBs9xQARoGveU2AsgLj6D2A== - -"@csstools/media-query-list-parser@^2.0.1": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.2.tgz#36058f8ff6a28274e7dfe32e48431e1de97c2fbb" - integrity sha512-8V6JD8Av1HttuClYr1ZBu0LRVe5Nnz4qrv8RppO8mobsX/USBHZy5JQOXYIlpOVhl46nzkx3X5cfH6CqUghjrQ== - -"@csstools/selector-specificity@^2.1.1": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz#2cbcf822bf3764c9658c4d2e568bd0c0cb748016" - integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== - -"@date-io/core@1.x": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@date-io/core/-/core-1.3.13.tgz#90c71da493f20204b7a972929cc5c482d078b3fa" - integrity sha512-AlEKV7TxjeK+jxWVKcCFrfYAk8spX9aCyiToFIiLPtfQbsjmRGLIhb5VZgptQcJdHtLXo7+m0DuurwFgUToQuA== - -"@discoveryjs/json-ext@0.5.7": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" - integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - -"@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": - version "10.0.29" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0" - integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ== - dependencies: - "@emotion/sheet" "0.9.4" - "@emotion/stylis" "0.8.5" - "@emotion/utils" "0.11.3" - "@emotion/weak-memoize" "0.2.5" - -"@emotion/core@^10.0.9": - version "10.0.35" - resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.35.tgz#513fcf2e22cd4dfe9d3894ed138c9d7a859af9b3" - integrity sha512-sH++vJCdk025fBlRZSAhkRlSUoqSqgCzYf5fMOmqqi3bM6how+sQpg3hkgJonj8GxXM4WbD7dRO+4tegDB9fUw== - dependencies: - "@babel/runtime" "^7.5.5" - "@emotion/cache" "^10.0.27" - "@emotion/css" "^10.0.27" - "@emotion/serialize" "^0.11.15" - "@emotion/sheet" "0.9.4" - "@emotion/utils" "0.11.3" - -"@emotion/css@^10.0.27", "@emotion/css@^10.0.9": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" - integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== - dependencies: - "@emotion/serialize" "^0.11.15" - "@emotion/utils" "0.11.3" - babel-plugin-emotion "^10.0.27" - -"@emotion/hash@0.8.0", "@emotion/hash@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" - integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== - -"@emotion/is-prop-valid@^0.8.8": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" - integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== - dependencies: - "@emotion/memoize" "0.7.4" - -"@emotion/memoize@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" - integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== - -"@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": - version "0.11.16" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad" - integrity sha512-G3J4o8by0VRrO+PFeSc3js2myYNOXVJ3Ya+RGVxnshRYgsvErfAOglKAiy1Eo1vhzxqtUvjCyS5gtewzkmvSSg== - dependencies: - "@emotion/hash" "0.8.0" - "@emotion/memoize" "0.7.4" - "@emotion/unitless" "0.7.5" - "@emotion/utils" "0.11.3" - csstype "^2.5.7" - -"@emotion/sheet@0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" - integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== - -"@emotion/stylis@0.8.5", "@emotion/stylis@^0.8.4": - version "0.8.5" - resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" - integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== - -"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" - integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== - -"@emotion/utils@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" - integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== - -"@emotion/weak-memoize@0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" - integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== - -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@leichtgewicht/ip-codec@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" - integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== - -"@material-ui/core@4.9.12": - version "4.9.12" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.12.tgz#0156d87c8b5db5a8aad992d6883a081a32684e2e" - integrity sha512-JtRm1iNw3PRg+bzULS1uRKhdIJ2jhKO3/5ptO6kTADARsv5KmhzMbM+PYmVS09qm9Yu3ilwka4dYrtjqea53Lw== - dependencies: - "@babel/runtime" "^7.4.4" - "@material-ui/react-transition-group" "^4.3.0" - "@material-ui/styles" "^4.9.10" - "@material-ui/system" "^4.9.10" - "@material-ui/types" "^5.0.1" - "@material-ui/utils" "^4.9.12" - "@types/react-transition-group" "^4.2.0" - clsx "^1.0.4" - hoist-non-react-statics "^3.3.2" - popper.js "^1.16.1-lts" - prop-types "^15.7.2" - react-is "^16.8.0" - react-transition-group "^4.3.0" - -"@material-ui/icons@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.9.1.tgz#fdeadf8cb3d89208945b33dbc50c7c616d0bd665" - integrity sha512-GBitL3oBWO0hzBhvA9KxqcowRUsA0qzwKkURyC8nppnC3fw54KPKZ+d4V1Eeg/UnDRSzDaI9nGCdel/eh9AQMg== - dependencies: - "@babel/runtime" "^7.4.4" - -"@material-ui/lab@4.0.0-alpha.51": - version "4.0.0-alpha.51" - resolved "https://registry.yarnpkg.com/@material-ui/lab/-/lab-4.0.0-alpha.51.tgz#c50c429a374a1d7e31591677137c000918985b89" - integrity sha512-X/qv/sZQGhXhKDn83L94gNahGDQj2Rd6r7/9tPpQbSn2A1LAt1+jlTiWD1HUgDXZEPqTsJMajOjWSEmTL7/q7w== - dependencies: - "@babel/runtime" "^7.4.4" - "@material-ui/utils" "^4.9.6" - clsx "^1.0.4" - prop-types "^15.7.2" - react-is "^16.8.0" - -"@material-ui/pickers@3.2.10": - version "3.2.10" - resolved "https://registry.yarnpkg.com/@material-ui/pickers/-/pickers-3.2.10.tgz#19df024895876eb0ec7cd239bbaea595f703f0ae" - integrity sha512-B8G6Obn5S3RCl7hwahkQj9sKUapwXWFjiaz/Bsw1fhYFdNMnDUolRiWQSoKPb1/oKe37Dtfszoywi1Ynbo3y8w== - dependencies: - "@babel/runtime" "^7.6.0" - "@date-io/core" "1.x" - "@types/styled-jsx" "^2.2.8" - clsx "^1.0.2" - react-transition-group "^4.0.0" - rifm "^0.7.0" - -"@material-ui/react-transition-group@^4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@material-ui/react-transition-group/-/react-transition-group-4.3.0.tgz#92529142addb5cc179dbf42d246c7e3fe4d6104b" - integrity sha512-CwQ0aXrlUynUTY6sh3UvKuvye1o92en20VGAs6TORnSxUYeRmkX8YeTUN3lAkGiBX1z222FxLFO36WWh6q73rQ== - dependencies: - "@babel/runtime" "^7.5.5" - dom-helpers "^5.0.1" - loose-envify "^1.4.0" - prop-types "^15.6.2" - -"@material-ui/styles@^4.9.10": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.10.0.tgz#2406dc23aa358217aa8cc772e6237bd7f0544071" - integrity sha512-XPwiVTpd3rlnbfrgtEJ1eJJdFCXZkHxy8TrdieaTvwxNYj42VnnCyFzxYeNW9Lhj4V1oD8YtQ6S5Gie7bZDf7Q== - dependencies: - "@babel/runtime" "^7.4.4" - "@emotion/hash" "^0.8.0" - "@material-ui/types" "^5.1.0" - "@material-ui/utils" "^4.9.6" - clsx "^1.0.4" - csstype "^2.5.2" - hoist-non-react-statics "^3.3.2" - jss "^10.0.3" - jss-plugin-camel-case "^10.0.3" - jss-plugin-default-unit "^10.0.3" - jss-plugin-global "^10.0.3" - jss-plugin-nested "^10.0.3" - jss-plugin-props-sort "^10.0.3" - jss-plugin-rule-value-function "^10.0.3" - jss-plugin-vendor-prefixer "^10.0.3" - prop-types "^15.7.2" - -"@material-ui/system@^4.9.10": - version "4.9.14" - resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.9.14.tgz#4b00c48b569340cefb2036d0596b93ac6c587a5f" - integrity sha512-oQbaqfSnNlEkXEziDcJDDIy8pbvwUmZXWNqlmIwDqr/ZdCK8FuV3f4nxikUh7hvClKV2gnQ9djh5CZFTHkZj3w== - dependencies: - "@babel/runtime" "^7.4.4" - "@material-ui/utils" "^4.9.6" - csstype "^2.5.2" - prop-types "^15.7.2" - -"@material-ui/types@^5.0.1", "@material-ui/types@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@material-ui/types/-/types-5.1.0.tgz#efa1c7a0b0eaa4c7c87ac0390445f0f88b0d88f2" - integrity sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A== - -"@material-ui/utils@^4.9.12", "@material-ui/utils@^4.9.6": - version "4.10.2" - resolved "https://registry.yarnpkg.com/@material-ui/utils/-/utils-4.10.2.tgz#3fd5470ca61b7341f1e0468ac8f29a70bf6df321" - integrity sha512-eg29v74P7W5r6a4tWWDAAfZldXIzfyO1am2fIsC39hdUUHm/33k6pGOKPbgDjg/U/4ifmgAePy/1OjkKN6rFRw== - dependencies: - "@babel/runtime" "^7.4.4" - prop-types "^15.7.2" - react-is "^16.8.0" - -"@modular-css/processor@^28.1.4": - version "28.1.5" - resolved "https://registry.yarnpkg.com/@modular-css/processor/-/processor-28.1.5.tgz#28987ddb3654ce287e69224c400297267482c976" - integrity sha512-1gfGjJgiJ5bZtUlLFfyhZwIwrbRG8SPw3N/iJrQw49VMSwpBH9ZsqFHnsbHYkbxGowmpycSWTL++VVKMyrV86A== - dependencies: - dependency-graph "^0.11.0" - escape-string-regexp "^4.0.0" - postcss-selector-parser "^6.0.2" - postcss-url "^10.0.0" - postcss-value-parser "^4.0.0" - resolve-from "^5.0.0" - unique-slug "^2.0.0" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@polka/url@^1.0.0-next.20": - version "1.0.0-next.21" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" - integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== - -"@types/body-parser@*": - version "1.19.2" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/bonjour@^3.5.9": - version "3.5.10" - resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.10.tgz#0f6aadfe00ea414edc86f5d106357cda9701e275" - integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== - dependencies: - "@types/node" "*" - -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - -"@types/connect-history-api-fallback@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" - integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== - dependencies: - "@types/express-serve-static-core" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.37.0" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.37.0.tgz#29cebc6c2a3ac7fea7113207bf5a828fdf4d7ef1" - integrity sha512-Piet7dG2JBuDIfohBngQ3rCt7MgO9xCO4xIMKxBThCq5PNRB91IjlJ10eJVwfoNtvTErmxLzwBZ7rHZtbOMmFQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": - version "4.17.33" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz#de35d30a9d637dc1450ad18dd583d75d5733d543" - integrity sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/express@*", "@types/express@^4.17.13": - version "4.17.17" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.17.tgz#01d5437f6ef9cfa8668e616e13c2f2ac9a491ae4" - integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.33" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/hoist-non-react-statics@*": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" - integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== - dependencies: - "@types/react" "*" - hoist-non-react-statics "^3.3.0" - -"@types/html-minifier-terser@^6.0.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35" - integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== - -"@types/http-proxy@^1.17.8": - version "1.17.10" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.10.tgz#e576c8e4a0cc5c6a138819025a88e167ebb38d6c" - integrity sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g== - dependencies: - "@types/node" "*" - -"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/json-schema@^7.0.4": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" - integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - -"@types/mime@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" - integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== - -"@types/minimist@^1.2.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" - integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== - -"@types/node@*": - version "14.6.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499" - integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA== - -"@types/normalize-package-data@^2.4.0": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" - integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== - -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - -"@types/prop-types@*": - version "15.7.3" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" - integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== - -"@types/react-dom@16.9.7": - version "16.9.7" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.7.tgz#60844d48ce252d7b2dccf0c7bb937130e27c0cd2" - integrity sha512-GHTYhM8/OwUCf254WO5xqR/aqD3gC9kSTLpopWGpQLpnw23jk44RvMHsyUSEplvRJZdHxhJGMMLF0kCPYHPhQA== - dependencies: - "@types/react" "*" - -"@types/react-native@*": - version "0.63.8" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.63.8.tgz#73ec087122c64c309eeaf150b565b8d755f0fb1f" - integrity sha512-QRwGFRTyGafRVTUS+0GYyJrlpmS3boyBaFI0ULSc+mh/lQNxrzbdQvoL2k5X7+t9hxyqA4dTQAlP6l0ir/fNJQ== - dependencies: - "@types/react" "*" - -"@types/react-transition-group@^4.2.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.0.tgz#882839db465df1320e4753e6e9f70ca7e9b4d46d" - integrity sha512-/QfLHGpu+2fQOqQaXh8MG9q03bFENooTb/it4jr5kKaZlDQfWvjqWZg48AwzPVMBHlRuTRAY7hRHCEOXz5kV6w== - dependencies: - "@types/react" "*" - -"@types/react@*": - version "16.9.46" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.46.tgz#f0326cd7adceda74148baa9bff6e918632f5069e" - integrity sha512-dbHzO3aAq1lB3jRQuNpuZ/mnu+CdD3H0WVaaBQA8LTT3S33xhVBUj232T8M3tAhSWJs/D/UqORYUlJNl/8VQZg== - dependencies: - "@types/prop-types" "*" - csstype "^3.0.2" - -"@types/react@16.9.34": - version "16.9.34" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.34.tgz#f7d5e331c468f53affed17a8a4d488cd44ea9349" - integrity sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - -"@types/retry@0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" - integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== - -"@types/serve-index@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" - integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== - dependencies: - "@types/express" "*" - -"@types/serve-static@*", "@types/serve-static@^1.13.10": - version "1.15.1" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.1.tgz#86b1753f0be4f9a1bee68d459fcda5be4ea52b5d" - integrity sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ== - dependencies: - "@types/mime" "*" - "@types/node" "*" - -"@types/sockjs@^0.3.33": - version "0.3.33" - resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.33.tgz#570d3a0b99ac995360e3136fd6045113b1bd236f" - integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== - dependencies: - "@types/node" "*" - -"@types/styled-components@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.0.tgz#24d3412ba5395aa06e14fbc93c52f9454cebd0d6" - integrity sha512-ZFlLCuwF5r+4Vb7JUmd+Yr2S0UBdBGmI7ctFTgJMypIp3xOHI4LCFVn2dKMvpk6xDB2hLRykrEWMBwJEpUAUIQ== - dependencies: - "@types/hoist-non-react-statics" "*" - "@types/react" "*" - "@types/react-native" "*" - csstype "^2.2.0" - -"@types/styled-jsx@^2.2.8": - version "2.2.8" - resolved "https://registry.yarnpkg.com/@types/styled-jsx/-/styled-jsx-2.2.8.tgz#b50d13d8a3c34036282d65194554cf186bab7234" - integrity sha512-Yjye9VwMdYeXfS71ihueWRSxrruuXTwKCbzue4+5b2rjnQ//AtyM7myZ1BEhNhBQ/nL/RE7bdToUoLln2miKvg== - dependencies: - "@types/react" "*" - -"@types/ws@^8.5.1": - version "8.5.4" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5" - integrity sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg== - dependencies: - "@types/node" "*" - -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== - -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== - -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== - -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== - -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== - -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" - -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -accepts@~1.3.4, accepts@~1.3.5: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-node@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" - integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A== - dependencies: - acorn "^7.0.0" - acorn-walk "^7.0.0" - xtend "^4.0.2" - -acorn-walk@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn-walk@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^7.0.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" - integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== - -acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -address@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" - integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== - -address@^1.1.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== - -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - -ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv-keywords@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" - integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== - dependencies: - fast-deep-equal "^3.1.3" - -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.12.2: - version "6.12.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" - integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.8.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-html-community@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" - integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== - dependencies: - "@types/color-name" "^1.1.1" - color-convert "^2.0.1" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -archiver-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" - integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== - dependencies: - glob "^7.1.4" - graceful-fs "^4.2.0" - lazystream "^1.0.0" - lodash.defaults "^4.2.0" - lodash.difference "^4.5.0" - lodash.flatten "^4.4.0" - lodash.isplainobject "^4.0.6" - lodash.union "^4.6.0" - normalize-path "^3.0.0" - readable-stream "^2.0.0" - -archiver@5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6" - integrity sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w== - dependencies: - archiver-utils "^2.1.0" - async "^3.2.3" - buffer-crc32 "^0.2.1" - readable-stream "^3.6.0" - readdir-glob "^1.0.0" - tar-stream "^2.2.0" - zip-stream "^4.1.0" - -arg@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" - integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -args@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/args/-/args-5.0.1.tgz#4bf298df90a4799a09521362c579278cc2fdd761" - integrity sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ== - dependencies: - camelcase "5.0.0" - chalk "2.4.2" - leven "2.1.0" - mri "1.1.4" - -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-flatten@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - -array-includes@^3.1.5, array-includes@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - is-string "^1.0.7" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.tosorted@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz#ccf44738aa2b5ac56578ffda97c03fd3e23dd532" - integrity sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - get-intrinsic "^1.1.3" - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -astroturf@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/astroturf/-/astroturf-1.1.0.tgz#483e5022e7db782543082c2f7497a66655f1ba24" - integrity sha512-mryIuQGu49RmKWjApunKRX76TO3Z74DqdC+eqFyI/rbeXfY8vwefo1SEoQwaHHbUrwMqun9xqbhmcIVqx9aDRA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/core" "^7.19.6" - "@babel/generator" "^7.20.0" - "@babel/helper-module-imports" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.0" - "@babel/types" "^7.20.0" - "@modular-css/processor" "^28.1.4" - common-tags "^1.8.2" - cosmiconfig "^7.0.1" - css-loader "^5.1.3" - fast-levenshtein "^3.0.0" - find-cache-dir "^3.3.2" - globby "^11.0.0" - json5 "^2.2.1" - lodash "^4.17.21" - magic-string "^0.26.7" - picocolors "^1.0.0" - postcss "^8.4.18" - postcss-nested "^5.0.6" - postcss-scss "^4.0.5" - resolve "^1.22.1" - unique-slug "^4.0.0" - webpack-virtual-modules "^0.3.2" - yargs "^17.6.0" - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@*: - version "3.2.0" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" - integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== - -async@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -autoprefixer@10.4.13: - version "10.4.13" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.13.tgz#b5136b59930209a321e9fa3dca2e7c4d223e83a8" - integrity sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg== - dependencies: - browserslist "^4.21.4" - caniuse-lite "^1.0.30001426" - fraction.js "^4.2.0" - normalize-range "^0.1.2" - picocolors "^1.0.0" - postcss-value-parser "^4.2.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -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" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@6.26.3, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - 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-eslint@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" - integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - eslint-visitor-keys "^1.0.0" - resolve "^1.12.0" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - 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" - integrity sha1-FMGeXxQte0fxmlJDHlKxzLxAozA= - 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" - integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-builder-react-jsx@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" - integrity sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA= - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - esutils "^2.0.2" - -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" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= - 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" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= - 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" - integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= - 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" - integrity sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes= - 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" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= - 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" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= - 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" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= - 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" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= - 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" - integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= - 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" - integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= - 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" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= - 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" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-loader@9.1.2: - version "9.1.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.2.tgz#a16a080de52d08854ee14570469905a5fc00d39c" - integrity sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA== - dependencies: - find-cache-dir "^3.3.2" - schema-utils "^4.0.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - 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" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-emotion@^10.0.27: - version "10.0.33" - resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.33.tgz#ce1155dcd1783bbb9286051efee53f4e2be63e03" - integrity sha512-bxZbTTGz0AJQDHm8k6Rf3RQJ8tX2scsfsRyKVgAbiUPUNIRtlK+7JxP+TAd1kRLABFxe0CFm2VdK4ePkoA9FxQ== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@emotion/hash" "0.8.0" - "@emotion/memoize" "0.7.4" - "@emotion/serialize" "^0.11.16" - babel-plugin-macros "^2.0.0" - babel-plugin-syntax-jsx "^6.18.0" - convert-source-map "^1.5.0" - escape-string-regexp "^1.0.5" - find-root "^1.1.0" - source-map "^0.5.7" - -babel-plugin-istanbul@6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-macros@^2.0.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" - integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== - dependencies: - "@babel/runtime" "^7.7.2" - cosmiconfig "^6.0.0" - resolve "^1.12.0" - -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== - dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" - -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" - -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - -"babel-plugin-styled-components@>= 1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.11.1.tgz#5296a9e557d736c3186be079fff27c6665d63d76" - integrity sha512-YwrInHyKUk1PU3avIRdiLyCpM++18Rs1NgyMXEAQC33rIXs/vro0A+stf4sT0Gf22Got+xRWB8Cm0tw+qkRzBA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-module-imports" "^7.0.0" - babel-plugin-syntax-jsx "^6.18.0" - lodash "^4.17.11" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - integrity sha1-a8lj67FuzLrmuStZbrfzXDQqi5o= - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - integrity sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY= - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - integrity sha1-1+sjt5oxf4VDlixQW4J8fWysJ94= - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - integrity sha1-MSVjtNvePMgGzuPkFszurd0RrAs= - -babel-plugin-syntax-do-expressions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" - integrity sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0= - -babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - integrity sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo= - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - integrity sha1-cKFITw+QiaToStRLrDU8lbmxJyE= - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - integrity sha1-TDqyCiryaqIM0lmVw5jE63AxDI0= - -babel-plugin-syntax-function-bind@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" - integrity sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y= - -babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= - -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" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= - -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" - integrity sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds= - 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.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" - integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= - 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-constructor-call@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" - integrity sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk= - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -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" - integrity sha1-anl2PqYdM9NvN7YRqp3vgagbRqw= - 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" - integrity sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0= - 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-do-expressions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" - integrity sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs= - dependencies: - babel-plugin-syntax-do-expressions "^6.8.0" - babel-runtime "^6.22.0" - -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" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= - 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" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= - dependencies: - babel-runtime "^6.22.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" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= - 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.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" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= - 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.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" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.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" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= - dependencies: - babel-runtime "^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" - integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.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" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= - dependencies: - babel-runtime "^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" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= - 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" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= - dependencies: - babel-runtime "^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" - integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= - 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.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" - integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== - 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.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" - integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= - 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.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" - integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= - 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.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" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.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" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= - 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.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" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= - 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" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= - dependencies: - babel-runtime "^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" - integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= - 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" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.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" - integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= - dependencies: - babel-runtime "^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" - integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.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" - integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= - 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-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" - integrity sha1-U3OLR+deghhYnuqUbLvTkQm75lM= - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - integrity sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988= - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-function-bind@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" - integrity sha1-xvuOlqwpajELjPjqQBRiQH3fapc= - dependencies: - babel-plugin-syntax-function-bind "^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" - integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - -babel-plugin-transform-react-display-name@^6.23.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - integrity sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-self@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" - integrity sha1-322AqdomEqEh5t3XVYvL7PBuY24= - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx-source@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" - integrity sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY= - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - integrity sha1-hAoCjn30YN/DotKfDA2R9jduZqM= - dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^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" - integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= - 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" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-polyfill@6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" - integrity sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ== - dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - -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" - integrity sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk= - 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-es2016@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b" - integrity sha1-+QC/k+LrwNJ235uKtZck6/2Vn4s= - dependencies: - babel-plugin-transform-exponentiation-operator "^6.24.1" - -babel-preset-es2017@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1" - integrity sha1-WXvq37n38gi8/YoS6bKym4svFNE= - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.24.1" - -babel-preset-flow@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" - integrity sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0= - dependencies: - babel-plugin-transform-flow-strip-types "^6.22.0" - -babel-preset-latest@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8" - integrity sha1-Z33gaRVKdIXC0lxXfAL2JLhbheg= - dependencies: - babel-preset-es2015 "^6.24.1" - babel-preset-es2016 "^6.24.1" - babel-preset-es2017 "^6.24.1" - -babel-preset-react@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" - integrity sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A= - dependencies: - babel-plugin-syntax-jsx "^6.3.13" - babel-plugin-transform-react-display-name "^6.23.0" - babel-plugin-transform-react-jsx "^6.24.1" - babel-plugin-transform-react-jsx-self "^6.22.0" - babel-plugin-transform-react-jsx-source "^6.22.0" - babel-preset-flow "^6.23.0" - -babel-preset-stage-0@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" - integrity sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo= - dependencies: - babel-plugin-transform-do-expressions "^6.22.0" - babel-plugin-transform-function-bind "^6.22.0" - babel-preset-stage-1 "^6.24.1" - -babel-preset-stage-1@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" - integrity sha1-dpLNfc1oSZB+auSgqFWJz7niv7A= - dependencies: - babel-plugin-transform-class-constructor-call "^6.24.1" - babel-plugin-transform-export-extensions "^6.22.0" - babel-preset-stage-2 "^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" - integrity sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE= - 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" - integrity sha1-g2raCp56f6N8sTj7kyb4eTSkg5U= - 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" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - 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" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - 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" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - 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" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - 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" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - 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" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -balanced-match@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" - integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bl@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" - integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== - dependencies: - buffer "^6.0.3" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - -bn.js@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" - integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -bonjour-service@^1.0.11: - version "1.1.1" - resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.1.1.tgz#960948fa0e0153f5d26743ab15baf8e33752c135" - integrity sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg== - dependencies: - array-flatten "^2.1.2" - dns-equal "^1.0.0" - fast-deep-equal "^3.1.3" - multicast-dns "^7.2.5" - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.3, browserslist@^4.21.4, browserslist@^4.21.5: - version "4.21.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" - integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== - dependencies: - caniuse-lite "^1.0.30001449" - electron-to-chromium "^1.4.284" - node-releases "^2.0.8" - update-browserslist-db "^1.0.10" - -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" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@^0.2.1, buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@6.0.3, buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camel-case@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - -camelcase-css@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" - integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== - -camelcase-keys@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" - integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - dependencies: - camelcase "^5.3.1" - map-obj "^4.0.0" - quick-lru "^4.0.1" - -camelcase@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" - integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelize@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" - integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= - -caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001449: - version "1.0.30001473" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001473.tgz#3859898b3cab65fc8905bb923df36ad35058153c" - integrity sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg== - -chalk@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - integrity sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@4.1.x, chalk@^4.1.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - 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@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" - integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== - -cheerio@0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" - integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" - -chokidar@^3.4.2, chokidar@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -clean-css@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.2.0.tgz#44e4a04e8873ff0041df97acecf23a4a6519844e" - integrity sha512-2639sWGa43EMmG7fn8mdVuBSs6HuWaSor+ZPoFWzenBc6oN+td8YhTfghWXZ25G1NiiSvz8bOFBS7PdSbTiqEA== - dependencies: - source-map "~0.6.0" - -clean-css@^5.2.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.2.tgz#70ecc7d4d4114921f5d298349ff86a31a9975224" - integrity sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww== - dependencies: - source-map "~0.6.0" - -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" - integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== - dependencies: - restore-cursor "^4.0.0" - -cli-spinners@^2.6.1: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - -clsx@^1.0.2, clsx@^1.0.4, clsx@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" - integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@^1.1.4, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colord@^2.9.3: - version "2.9.3" - resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" - integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== - -colorette@^2.0.10: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== - -commander@2.15.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - -common-tags@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" - integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -compress-commons@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" - integrity sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ== - dependencies: - buffer-crc32 "^0.2.13" - crc32-stream "^4.0.2" - normalize-path "^3.0.0" - readable-stream "^3.6.0" - -compressible@~2.0.16: - version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - -compute-scroll-into-view@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.11.tgz#7ff0a57f9aeda6314132d8994cce7aeca794fecf" - integrity sha512-uUnglJowSe0IPmWOdDtrlHXof5CTIJitfJEyITHBW6zDVOGu9Pjk5puaLM73SLcwak0L4hEjO7Td88/a6P5i7A== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -connect-history-api-fallback@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" - integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== - -console-browserify@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -console-polyfill@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/console-polyfill/-/console-polyfill-0.3.0.tgz#84900902a18c47a5eba932be75fa44d23e8af861" - integrity sha512-w+JSDZS7XML43Xnwo2x5O5vxB0ID7T5BdqDtyqT6uiCAX2kZAgcWxNaGqT97tZfSHzfOcvrfsDAodKcJ3UvnXQ== - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -core-js-compat@^3.25.1: - version "3.29.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.29.1.tgz#15c0fb812ea27c973c18d425099afa50b934b41b" - integrity sha512-QmchCua884D8wWskMX8tW5ydINzd8oSJVx38lx/pVkFGqztxt73GYre3pm/hyYq8bPf+MW5In4I/uRShFDsbrA== - dependencies: - browserslist "^4.21.5" - -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== - -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" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" - -cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: - version "7.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" - integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cosmiconfig@^8.0.0: - version "8.1.3" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.3.tgz#0e614a118fcc2d9e5afc2f87d53cd09931015689" - integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== - dependencies: - import-fresh "^3.2.1" - js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -crc32-stream@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007" - integrity sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w== - dependencies: - crc-32 "^1.2.0" - readable-stream "^3.4.0" - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -create-react-context@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.3.tgz#9ec140a6914a22ef04b8b09b7771de89567cb6f3" - integrity sha512-CQBmD0+QGgTaxDL3OX1IDXYqjkp2It4RIbcb99jS6AEg27Ga+a9G3JtK6SIu0HBwPLZlmwt9F7UwWA4Bn92Rag== - dependencies: - fbjs "^0.8.0" - gud "^1.0.0" - -cross-spawn@7.0.3, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -css-color-keywords@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" - integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= - -css-functions-list@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.1.0.tgz#cf5b09f835ad91a00e5959bcfc627cd498e1321b" - integrity sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w== - -css-loader@6.7.3: - version "6.7.3" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.3.tgz#1e8799f3ccc5874fdd55461af51137fcc5befbcd" - integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ== - dependencies: - icss-utils "^5.1.0" - postcss "^8.4.19" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.2.0" - semver "^7.3.8" - -css-loader@^5.0.0, css-loader@^5.1.3: - version "5.2.7" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.7.tgz#9b9f111edf6fb2be5dc62525644cbc9c232064ae" - integrity sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg== - dependencies: - icss-utils "^5.1.0" - loader-utils "^2.0.0" - postcss "^8.2.15" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.1.0" - schema-utils "^3.0.0" - semver "^7.3.5" - -css-select@^4.1.3: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-to-react-native@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" - integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ== - dependencies: - camelize "^1.0.0" - css-color-keywords "^1.0.0" - postcss-value-parser "^4.0.2" - -css-tree@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20" - integrity sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw== - dependencies: - mdn-data "2.0.30" - source-map-js "^1.0.1" - -css-vendor@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/css-vendor/-/css-vendor-2.0.8.tgz#e47f91d3bd3117d49180a3c935e62e3d9f7f449d" - integrity sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ== - dependencies: - "@babel/runtime" "^7.8.3" - is-in-browser "^1.0.2" - -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -csstype@^2.2.0, csstype@^2.5.2, csstype@^2.5.7: - version "2.6.13" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.13.tgz#a6893015b90e84dd6e85d0e3b442a1e84f2dbe0f" - integrity sha512-ul26pfSQTZW8dcOnD2iiJssfXw0gdNVX9IJDH/X3K5DGPfj+fUYe3kB+swUY6BF3oZDxaID3AJt+9/ojSAE05A== - -csstype@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.2.tgz#ee5ff8f208c8cd613b389f7b222c9801ca62b3f7" - integrity sha512-ofovWglpqoqbfLNOTBNZLSbMuGrblAf1efvvArGKOZMBrIoJeu5UsAipQolkijtyQx5MtAzT/J9IHj/CEY1mJw== - -cuint@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" - integrity sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw== - -debug@2.6.9, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@^3.0.0, debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decamelize-keys@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" - integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== - dependencies: - decamelize "^1.1.0" - map-obj "^1.0.0" - -decamelize@^1.1.0, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" - integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -default-gateway@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" - integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== - dependencies: - execa "^5.0.0" - -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - -define-options@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/define-options/-/define-options-0.1.3.tgz#471c907439da590205050e856c8d59373f3a107b" - integrity sha1-RxyQdDnaWQIFBQ6FbI1ZNz86EHs= - -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-properties@^1.1.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -dependency-graph@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" - integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg== - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== - -detect-port-alt@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" - integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== - dependencies: - address "^1.0.1" - debug "^2.6.0" - -detective@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.1.tgz#6af01eeda11015acb0e73f933242b70f24f91034" - integrity sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw== - dependencies: - acorn-node "^1.8.2" - defined "^1.0.0" - minimist "^1.2.6" - -didyoumean@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" - integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== - -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dlv@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" - integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - -dns-packet@^5.2.2: - version "5.5.0" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.5.0.tgz#f59cbf3396c130957c56a6ad5fd3959ccdc30065" - integrity sha512-USawdAUzRkV6xrqTjiAEp6M9YagZEzWcSUaZTcIFAiyQWW1SoI6KyId8y2+/71wbgHKQAKd+iupLv4YvEwYWvA== - dependencies: - "@leichtgewicht/ip-codec" "^2.0.1" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dom-converter@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" - integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== - dependencies: - utila "~0.4" - -dom-helpers@^5.0.1: - version "5.2.0" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.0.tgz#57fd054c5f8f34c52a3eeffdb7e7e93cd357d95b" - integrity sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ== - dependencies: - "@babel/runtime" "^7.8.7" - csstype "^3.0.2" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -domain-browser@^4.22.0: - version "4.22.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.22.0.tgz#6ddd34220ec281f9a65d3386d267ddd35c491f9f" - integrity sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw== - -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" - integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== - -domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^2.5.2, domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - -dot-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" - integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -dropzone@5.5.1: - version "5.5.1" - resolved "https://registry.yarnpkg.com/dropzone/-/dropzone-5.5.1.tgz#06e2f513e61d6aa363d4b556f18574f47cf7ba26" - integrity sha512-3VduRWLxx9hbVr42QieQN25mx/I61/mRdUSuxAmDGdDqZIN8qtP7tcKMa3KfpJjuGjOJGYYUzzeq6eGDnkzesA== - -duplexer@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.4.284: - version "1.4.346" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.346.tgz#1a084516b5d62fb24ca65ba8e2ebe4a348ebb307" - integrity sha512-9ZpKQD8hyWAoYf5bccm2qpaWogAGxb833DVC0arHo9nIbiAMh+aAKHZWABR2P9sK4a3zoCq7eXg8tylqPAnuNw== - -elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -encoding@^0.1.11: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" - integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== - -entities@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" - integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== - -errno@^0.1.3: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== - dependencies: - prr "~1.0.1" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.17.5: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== - dependencies: - array-buffer-byte-length "^1.0.0" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.3" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" - -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== - -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw== - -es6-promise@3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4" - integrity sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q= - -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@1.0.5, 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" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== - dependencies: - debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" - -eslint-module-utils@^2.7.4: - version "2.7.4" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== - dependencies: - debug "^3.2.7" - -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - -eslint-plugin-import@2.27.5: - version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== - dependencies: - array-includes "^3.1.6" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" - has "^1.0.3" - is-core-module "^2.11.0" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" - -eslint-plugin-node@11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-react@7.32.2: - version "7.32.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10" - integrity sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg== - dependencies: - array-includes "^3.1.6" - array.prototype.flatmap "^1.3.1" - array.prototype.tosorted "^1.1.1" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.6" - object.fromentries "^2.0.6" - object.hasown "^1.1.2" - object.values "^1.1.6" - prop-types "^15.8.1" - resolve "^2.0.0-next.4" - semver "^6.3.0" - string.prototype.matchall "^4.0.8" - -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" - integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== - -eslint@8.34.0: - version "8.34.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.34.0.tgz#fe0ab0ef478104c1f9ebc5537e303d25a8fb22d6" - integrity sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg== - dependencies: - "@eslint/eslintrc" "^1.4.1" - "@humanwhocodes/config-array" "^0.11.8" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-sdsl "^4.1.4" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - -espree@^9.4.0: - version "9.5.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4" - integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -estraverse@^5.2.0, estraverse@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -eventemitter3@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -events@^3.2.0, events@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - 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" - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exports-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-4.0.0.tgz#af34fe80a18f12fb0f42f435edd7df0fe9db49bb" - integrity sha512-4iqFFIAnlVAbkAUMHhWceyxK6N6dMDWpQFbSHLmiayGEPMXl2bgWD4D11GYi1VNuEQwJaHGdATcPYTnXpwzSmw== - dependencies: - source-map "^0.6.1" - -express@^4.17.3: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -extract-zip@^1.6.6: - version "1.7.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" - integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== - dependencies: - concat-stream "^1.6.2" - debug "^2.6.9" - mkdirp "^0.5.4" - yauzl "^2.10.0" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.2.12, fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fast-levenshtein@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-3.0.0.tgz#37b899ae47e1090e40e3fd2318e4d5f0142ca912" - integrity sha512-hKKNajm46uNmTlhHSyZkmToAc56uZJwYq7yrciZjqOxnlfQwERDQJmHPUp7m1m9wx8vgOe8IaCKZ5Kv2k1DdCQ== - dependencies: - fastest-levenshtein "^1.0.7" - -fastest-levenshtein@^1.0.16, fastest-levenshtein@^1.0.7: - version "1.0.16" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" - integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -faye-websocket@^0.11.3: - version "0.11.4" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" - integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== - dependencies: - websocket-driver ">=0.5.1" - -fbjs@^0.8.0: - version "0.8.17" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" - integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -figures@3.2.x: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -filesize@^8.0.6: - version "8.0.7" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-8.0.7.tgz#695e70d80f4e47012c132d57a059e80c6b580bd8" - integrity sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ== - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -filter-obj@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-2.0.2.tgz#fff662368e505d69826abb113f0f6a98f56e9d5f" - integrity sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg== - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-cache-dir@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-root@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" - integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== - -find-up@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -fn-name@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fn-name/-/fn-name-2.0.1.tgz#5214d7537a4d06a4a301c0cc262feb84188002e7" - integrity sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc= - -follow-redirects@^1.0.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" - integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -fork-ts-checker-webpack-plugin@^6.5.0: - version "6.5.3" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz#eda2eff6e22476a2688d10661688c47f611b37f3" - integrity sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ== - dependencies: - "@babel/code-frame" "^7.8.3" - "@types/json-schema" "^7.0.5" - chalk "^4.1.0" - chokidar "^3.4.2" - cosmiconfig "^6.0.0" - deepmerge "^4.2.2" - fs-extra "^9.0.0" - glob "^7.1.6" - memfs "^3.1.2" - minimatch "^3.0.4" - schema-utils "2.7.0" - semver "^7.3.2" - tapable "^1.0.0" - -formik@1.5.8: - version "1.5.8" - resolved "https://registry.yarnpkg.com/formik/-/formik-1.5.8.tgz#eee8cd345effe46839bc748c7f920486f12f14b0" - integrity sha512-fNvPe+ddbh+7xiByT25vuso2p2hseG/Yvuj211fV1DbCjljUEG9OpgRpcb7g7O3kxHX/q31cbZDzMxJXPWSNwA== - dependencies: - create-react-context "^0.2.2" - deepmerge "^2.1.1" - hoist-non-react-statics "^3.3.0" - lodash "^4.17.14" - lodash-es "^4.17.14" - prop-types "^15.6.1" - react-fast-compare "^2.0.1" - tiny-warning "^1.0.2" - tslib "^1.9.3" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fraction.js@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" - integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^1.0.0" - -fs-monkey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" - integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== - -fs-walk@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/fs-walk/-/fs-walk-0.0.1.tgz#f7fc91c3ae1eead07c998bc5d0dd41f2dbebd335" - integrity sha1-9/yRw64e6tB8mYvF0N1B8tvr0zU= - dependencies: - async "*" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -fuse.js@3.4.5: - version "3.4.5" - resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-3.4.5.tgz#8954fb43f9729bd5dbcb8c08f251db552595a7a6" - integrity sha512-s9PGTaQIkT69HaeoTVjwGsLfb8V8ScJLx5XGFcKHg0MqLUH/UZ4EKOtqtXX9k7AFqCGxD1aJmYb8Q5VYDibVRQ== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== - 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@^7.0.5, glob@^7.1.3, glob@^7.1.4: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - 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@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -global@^4.3.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - dependencies: - type-fest "^0.20.2" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globby@^11.0.0, globby@^11.0.4, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -globjoin@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" - integrity sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM= - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -gud@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" - integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== - -gzip-size@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" - integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== - dependencies: - duplexer "^0.1.2" - -handle-thing@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" - integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - -hard-rejection@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" - integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= - -he@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -history@^4.9.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" - integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== - dependencies: - "@babel/runtime" "^7.1.2" - loose-envify "^1.2.0" - resolve-pathname "^3.0.0" - tiny-invariant "^1.0.2" - tiny-warning "^1.0.0" - value-equal "^1.0.1" - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.2.1, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.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" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== - -hosted-git-info@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -html-entities@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" - integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== - -html-loader@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-4.2.0.tgz#20f69f9ec69244860c250ae6ee0046c8c5c4d348" - integrity sha512-OxCHD3yt+qwqng2vvcaPApCEvbx+nXWu+v69TYHx1FO8bffHn/JjHtE3TTQZmHjwvnJe4xxzuecetDVBrQR1Zg== - dependencies: - html-minifier-terser "^7.0.0" - parse5 "^7.0.0" - -html-minifier-terser@^6.0.2: - version "6.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab" - integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== - dependencies: - camel-case "^4.1.2" - clean-css "^5.2.2" - commander "^8.3.0" - he "^1.2.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.10.0" - -html-minifier-terser@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.1.0.tgz#cd62d42158be9a6bef0fcd40f94127345743d9b5" - integrity sha512-BvPO2S7Ip0Q5qt+Y8j/27Vclj6uHC6av0TMoDn7/bJPhMWHI2UtR2e/zEgJn3/qYAmxumrGp9q4UHurL6mtW9Q== - dependencies: - camel-case "^4.1.2" - clean-css "5.2.0" - commander "^9.4.1" - entities "^4.4.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.15.1" - -html-tags@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.2.0.tgz#dbb3518d20b726524e4dd43de397eb0a95726961" - integrity sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg== - -html-webpack-plugin@5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz#c3911936f57681c1f9f4d8b68c158cd9dfe52f50" - integrity sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw== - dependencies: - "@types/html-minifier-terser" "^6.0.0" - html-minifier-terser "^6.0.2" - lodash "^4.17.21" - pretty-error "^4.0.0" - tapable "^2.0.0" - -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -htmlparser2@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-parser-js@>=0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" - integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== - -http-proxy-middleware@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" - integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== - dependencies: - "@types/http-proxy" "^1.17.8" - http-proxy "^1.18.1" - is-glob "^4.0.1" - is-plain-obj "^3.0.0" - micromatch "^4.0.2" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - -https-proxy-agent@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -hyphenate-style-name@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d" - integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -icss-utils@^5.0.0, icss-utils@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" - integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -iframe-resizer@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/iframe-resizer/-/iframe-resizer-4.1.1.tgz#607c36edfb4547ecce8247226ef062e269a4eccc" - integrity sha512-+cs/M4ivpLyKYDs9AZWK0eRA1FKXut0yQr0iaEqdMKuk5yZJeF9H691q1qW1Cz5D3wHmiT+cTubWEsaSJBLUJA== - -ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -immer@^9.0.7: - version "9.0.21" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" - integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-fresh@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-lazy@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" - integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== - -imports-loader@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/imports-loader/-/imports-loader-4.0.1.tgz#a3d3067d0c369cd621e2b322b6b6bb2593756be5" - integrity sha512-ZiY+1xH5fqAJ1Qu1CFv+zw54rvPCC92DdYRDe0IIUboOhbJPLfOPbF/paA2iipelvMwjQUKWydcFOJ7f1+ZFcA== - dependencies: - source-map "^0.6.1" - strip-comments "^2.0.1" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -internal-slot@^1.0.3, internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -invariant@^2.2.2, invariant@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -ipaddr.js@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" - integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== - -is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.3, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-callable@^1.1.4, is-callable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" - integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== - -is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-docker@^2.0.0, is-docker@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-in-browser@^1.0.2, is-in-browser@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-in-browser/-/is-in-browser-1.1.3.tgz#56ff4db683a078c6082eb95dad7dc62e1d04f835" - integrity sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU= - -is-interactive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" - integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== - -is-nan@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" - integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== - -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - -is-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-root@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" - integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -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" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== - -is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-unicode-supported@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" - integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isbinaryfile@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" - integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== - dependencies: - buffer-alloc "^1.2.0" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isomorphic-fetch@2.2.1, isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -js-sdsl@^4.1.4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" - integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -json5@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" - integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== - dependencies: - minimist "^1.2.5" - -json5@^2.2.1, json5@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== - dependencies: - universalify "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jss-plugin-camel-case@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.4.0.tgz#46c75ff7fd61c304984c21af5817823f0f501ceb" - integrity sha512-9oDjsQ/AgdBbMyRjc06Kl3P8lDCSEts2vYZiPZfGAxbGCegqE4RnMob3mDaBby5H9vL9gWmyyImhLRWqIkRUCw== - dependencies: - "@babel/runtime" "^7.3.1" - hyphenate-style-name "^1.0.3" - jss "10.4.0" - -jss-plugin-default-unit@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.4.0.tgz#2b10f01269eaea7f36f0f5fd1cfbfcc76ed42854" - integrity sha512-BYJ+Y3RUYiMEgmlcYMLqwbA49DcSWsGgHpVmEEllTC8MK5iJ7++pT9TnKkKBnNZZxTV75ycyFCR5xeLSOzVm4A== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - -jss-plugin-global@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.4.0.tgz#19449425a94e4e74e113139b629fd44d3577f97d" - integrity sha512-b8IHMJUmv29cidt3nI4bUI1+Mo5RZE37kqthaFpmxf5K7r2aAegGliAw4hXvA70ca6ckAoXMUl4SN/zxiRcRag== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - -jss-plugin-nested@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.4.0.tgz#017d0c02c0b6b454fd9d7d3fc33470a15eea9fd1" - integrity sha512-cKgpeHIxAP0ygeWh+drpLbrxFiak6zzJ2toVRi/NmHbpkNaLjTLgePmOz5+67ln3qzJiPdXXJB1tbOyYKAP4Pw== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - tiny-warning "^1.0.2" - -jss-plugin-props-sort@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.4.0.tgz#7110bf0b6049cc2080b220b506532bf0b70c0e07" - integrity sha512-j/t0R40/2fp+Nzt6GgHeUFnHVY2kPGF5drUVlgkcwYoHCgtBDOhTTsOfdaQFW6sHWfoQYgnGV4CXdjlPiRrzwA== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - -jss-plugin-rule-value-function@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.4.0.tgz#7cff4a91e84973536fa49b6ebbdbf7f339b01c82" - integrity sha512-w8504Cdfu66+0SJoLkr6GUQlEb8keHg8ymtJXdVHWh0YvFxDG2l/nS93SI5Gfx0fV29dO6yUugXnKzDFJxrdFQ== - dependencies: - "@babel/runtime" "^7.3.1" - jss "10.4.0" - tiny-warning "^1.0.2" - -jss-plugin-vendor-prefixer@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.4.0.tgz#2a78f3c5d57d1e024fe7ad7c41de34d04e72ecc0" - integrity sha512-DpF+/a+GU8hMh/948sBGnKSNfKkoHg2p9aRFUmyoyxgKjOeH9n74Ht3Yt8lOgdZsuWNJbPrvaa3U4PXKwxVpTQ== - dependencies: - "@babel/runtime" "^7.3.1" - css-vendor "^2.0.8" - jss "10.4.0" - -jss@10.4.0, jss@^10.0.3: - version "10.4.0" - resolved "https://registry.yarnpkg.com/jss/-/jss-10.4.0.tgz#473a6fbe42e85441020a07e9519dac1e8a2e79ca" - integrity sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw== - dependencies: - "@babel/runtime" "^7.3.1" - csstype "^3.0.2" - is-in-browser "^1.1.3" - tiny-warning "^1.0.2" - -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.3.3" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" - integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== - dependencies: - array-includes "^3.1.5" - object.assign "^4.1.3" - -jszip@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-2.6.1.tgz#b88f3a7b2e67a2a048152982c7a3756d9c4828f0" - integrity sha1-uI86ey5noqBIFSmCx6N1bZxIKPA= - dependencies: - pako "~1.0.2" - -kind-of@^6.0.2, kind-of@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -klona@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" - integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== - -known-css-properties@^0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.26.0.tgz#008295115abddc045a9f4ed7e2a84dc8b3a77649" - integrity sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg== - -lazystream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - dependencies: - readable-stream "^2.0.5" - -leven@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -lilconfig@^2.0.5, lilconfig@^2.0.6: - version "2.1.0" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" - integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== - -lines-and-columns@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" - integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -loader-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" - integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -loader-utils@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" - integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -loader-utils@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" - integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== - -loader-utils@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash-es@^4.17.14: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" - integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== - -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - -lodash.defaults@^4.0.1, lodash.defaults@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= - -lodash.difference@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" - integrity sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA== - -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= - -lodash.flatten@^4.2.0, lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= - -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= - -lodash.includes@4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" - integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= - -lodash.merge@^4.4.0, lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= - -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= - -lodash.takewhile@4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.takewhile/-/lodash.takewhile-4.6.0.tgz#8c8c7578dcdd65fd2660c7ec4afe81e303b32735" - integrity sha1-jIx1eNzdZf0mYMfsSv6B4wOzJzU= - -lodash.throttle@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" - integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= - -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash.union@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== - -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.17.5: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -lodash@^4.17.20, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93" - integrity sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA== - dependencies: - chalk "^5.0.0" - is-unicode-supported "^1.1.0" - -log-update@4.0.x: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -magic-string@^0.26.7: - version "0.26.7" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.7.tgz#caf7daf61b34e9982f8228c4527474dac8981d6f" - integrity sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow== - dependencies: - sourcemap-codec "^1.4.8" - -make-dir@^3.0.2, make-dir@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -map-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= - -map-obj@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" - integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== - -mathml-tag-names@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" - integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== - -maven-deploy@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/maven-deploy/-/maven-deploy-1.5.0.tgz#39dff210b774aa216d85874b23ffeef7175b3fe0" - integrity sha1-Od/yELd0qiFthYdLI//u9xdbP+A= - dependencies: - define-options "^0.1.3" - fs-walk "0.0.1" - isbinaryfile "^3.0.0" - jszip "^2.5.0" - semver "^5.1.0" - util-extend "^1.0.3" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -mdn-data@2.0.30: - version "2.0.30" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" - integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -memfs@^3.1.2, memfs@^3.4.3: - version "3.4.13" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.13.tgz#248a8bd239b3c240175cd5ec548de5227fc4f345" - integrity sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg== - dependencies: - fs-monkey "^1.0.3" - -memoize-one@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" - integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -meow@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-9.0.0.tgz#cd9510bc5cac9dee7d03c73ee1f9ad959f4ea364" - integrity sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize "^1.2.0" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^3.0.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.18.0" - yargs-parser "^20.2.3" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime-types@~2.1.17, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@^2.0.3: - version "2.4.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" - integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== - -mime@~2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" - integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -mini-create-react-context@^0.3.0: - version "0.3.2" - resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz#79fc598f283dd623da8e088b05db8cddab250189" - integrity sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw== - dependencies: - "@babel/runtime" "^7.4.0" - gud "^1.0.0" - tiny-warning "^1.0.2" - -mini-css-extract-plugin@2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz#e049d3ea7d3e4e773aad585c6cb329ce0c7b72d7" - integrity sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw== - dependencies: - schema-utils "^4.0.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.1.0: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@~3.0.4: - version "3.0.8" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" - integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== - dependencies: - brace-expansion "^1.1.7" - -minimist-options@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" - integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - kind-of "^6.0.3" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@1.2.8, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -mkdirp@^0.5.1, mkdirp@^0.5.4: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha-headless-chrome@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mocha-headless-chrome/-/mocha-headless-chrome-2.0.1.tgz#8c21c1679f43faebc8b526b2ad26d96ab42e47c1" - integrity sha512-76ieyHSSnNYv01AuSNt+ZmALZdfrM2uWDeLjxA7cYjrI0kLruZSdgje5MawWBVBfbE3U1pLgHJIveY1nv3zv6w== - dependencies: - args "^5.0.0" - mkdirp "^0.5.1" - puppeteer "1.5.0" - -mocha-loader@5.1.5: - version "5.1.5" - resolved "https://registry.yarnpkg.com/mocha-loader/-/mocha-loader-5.1.5.tgz#40e9163a17e4662e5d8851de93dca509fe4b5455" - integrity sha512-NfcFycKc9uAWmkLos/azir6XQknrzebY5qjEEyFhd423bVNkCoAbgaRmiV75j0nufmkZTCDBhm8NJ8WlTNbAQQ== - dependencies: - css-loader "^5.0.0" - loader-utils "^2.0.0" - schema-utils "^3.0.0" - style-loader "^2.0.0" - -mocha@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" - integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== - dependencies: - browser-stdout "1.3.1" - commander "2.15.1" - debug "3.1.0" - diff "3.5.0" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.5" - he "1.1.1" - minimatch "3.0.4" - mkdirp "0.5.1" - supports-color "5.4.0" - -moment@2.22.0: - version "2.22.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.0.tgz#7921ade01017dd45186e7fee5f424f0b8663a730" - integrity sha512-1muXCh8jb1N/gHRbn9VDUBr0GYb8A/aVcHlII9QSB68a50spqEVLIGN6KVmCOnSvJrUhC0edGgKU5ofnGXdYdg== - -mri@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a" - integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w== - -mrmime@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" - integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multicast-dns@^7.2.5: - version "7.2.5" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" - integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== - dependencies: - dns-packet "^5.2.2" - thunky "^1.0.2" - -nanoid@^3.3.4: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -node-forge@^1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - -node-polyfill-webpack-plugin@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-2.0.1.tgz#141d86f177103a8517c71d99b7c6a46edbb1bb58" - integrity sha512-ZUMiCnZkP1LF0Th2caY6J/eKKoA0TefpoVa68m/LQU1I/mE8rGt4fNYGgNuCcK+aG8P8P43nbeJ2RqJMOL/Y1A== - dependencies: - assert "^2.0.0" - browserify-zlib "^0.2.0" - buffer "^6.0.3" - console-browserify "^1.2.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.12.0" - domain-browser "^4.22.0" - events "^3.3.0" - filter-obj "^2.0.2" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "^1.0.1" - process "^0.11.10" - punycode "^2.1.1" - querystring-es3 "^0.2.1" - readable-stream "^4.0.0" - stream-browserify "^3.0.0" - stream-http "^3.2.0" - string_decoder "^1.3.0" - timers-browserify "^2.0.12" - tty-browserify "^0.0.1" - type-fest "^2.14.0" - url "^0.11.0" - util "^0.12.4" - vm-browserify "^1.1.2" - -node-releases@^2.0.8: - version "2.0.10" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" - integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== - -normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-package-data@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= - -notistack@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/notistack/-/notistack-0.9.11.tgz#8ad61e5fc5bf29da3455fe3f2f809c1c421713e7" - integrity sha512-652+nnce7MC7eAgl6B4vPmo1wNOiFM9QBpIkH+b36rz0iMSjN/RTc9OL2xlRW4z/bzduLo5n9tnmXqD7MkAEJw== - dependencies: - clsx "^1.1.0" - hoist-non-react-statics "^3.3.0" - react-is "^16.8.6" - -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" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -nth-check@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-hash@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.1.2.tgz#2b0493d20c80e129305acc86c40a9159d58c4658" - integrity sha1-KwST0gyA4SkwWsyGxAqRWdWMRlg= - -object-hash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" - integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== - -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -object-inspect@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-is@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" - integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.3, object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.entries@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.fromentries@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" - integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.hasown@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.2.tgz#f919e21fad4eb38a57bc6345b3afd496515c3f92" - integrity sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw== - dependencies: - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -obuf@^1.0.0, obuf@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -once@^1.3.0, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -open@^8.0.9, open@^8.4.0: - version "8.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" - integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -opener@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" - integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -ora@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ora/-/ora-6.1.2.tgz#7b3c1356b42fd90fb1dad043d5dbe649388a0bf5" - integrity sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw== - dependencies: - bl "^5.0.0" - chalk "^5.0.0" - cli-cursor "^4.0.0" - cli-spinners "^2.6.1" - is-interactive "^2.0.0" - is-unicode-supported "^1.1.0" - log-symbols "^5.1.0" - strip-ansi "^7.0.1" - wcwidth "^1.0.1" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-retry@^4.5.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" - integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== - dependencies: - "@types/retry" "0.12.0" - retry "^0.13.1" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -pako@~1.0.2, pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -param-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" - integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-json@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.1.tgz#7cfe35c1ccd641bce3981467e6c2ece61b3b3878" - integrity sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - lines-and-columns "^1.1.6" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -path-browserify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" - integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -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" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-up@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" - integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== - dependencies: - find-up "^3.0.0" - -popper.js@^1.16.1-lts: - version "1.16.1" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" - integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== - -postcss-import@^14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-14.1.0.tgz#a7333ffe32f0b8795303ee9e40215dac922781f0" - integrity sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw== - dependencies: - postcss-value-parser "^4.0.0" - read-cache "^1.0.0" - resolve "^1.1.7" - -postcss-js@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" - integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== - dependencies: - camelcase-css "^2.0.1" - -postcss-load-config@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" - integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== - dependencies: - lilconfig "^2.0.5" - yaml "^1.10.2" - -postcss-loader@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.0.2.tgz#b53ff44a26fba3688eee92a048c7f2d4802e23bb" - integrity sha512-fUJzV/QH7NXUAqV8dWJ9Lg4aTkDCezpTS5HgJ2DvqznexTbSTxgi/dTECvTZ15BwKTtk8G/bqI/QTu2HPd3ZCg== - dependencies: - cosmiconfig "^7.0.0" - klona "^2.0.5" - semver "^7.3.8" - -postcss-media-query-parser@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" - integrity sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ= - -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== - -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== - dependencies: - icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== - dependencies: - postcss-selector-parser "^6.0.4" - -postcss-modules-values@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" - integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - dependencies: - icss-utils "^5.0.0" - -postcss-nested@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.0.tgz#1572f1984736578f360cffc7eb7dca69e30d1735" - integrity sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w== - dependencies: - postcss-selector-parser "^6.0.10" - -postcss-nested@^5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc" - integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA== - dependencies: - postcss-selector-parser "^6.0.6" - -postcss-resolve-nested-selector@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz#29ccbc7c37dedfac304e9fff0bf1596b3f6a0e4e" - integrity sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4= - -postcss-safe-parser@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz#bb4c29894171a94bc5c996b9a30317ef402adaa1" - integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ== - -postcss-scss@^4.0.5: - version "4.0.6" - resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.6.tgz#5d62a574b950a6ae12f2aa89b60d63d9e4432bfd" - integrity sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ== - -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.6: - version "6.0.11" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc" - integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-selector-parser@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" - integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== - dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-url@^10.0.0: - version "10.1.3" - resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-10.1.3.tgz#54120cc910309e2475ec05c2cfa8f8a2deafdf1e" - integrity sha512-FUzyxfI5l2tKmXdYc6VTu3TWZsInayEKPbiyW+P6vmmIrrb4I6CGX0BFoewgYHLK+oIL5FECEK02REYRpBvUCw== - dependencies: - make-dir "~3.1.0" - mime "~2.5.2" - minimatch "~3.0.4" - xxhashjs "~0.2.2" - -postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@8.4.21, postcss@^8.0.9, postcss@^8.2.15, postcss@^8.4.18, postcss@^8.4.19, postcss@^8.4.21: - version "8.4.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" - integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^7.0.26: - version "7.0.32" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" - integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prettier@2.8.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" - integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== - -pretty-error@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6" - integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== - dependencies: - lodash "^4.17.20" - renderkid "^3.0.0" - -private@^0.1.6, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@0.11.10, process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - -prompts@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -prop-types@15.7.2, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: - version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" - integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.8.1" - -prop-types@^15.8.1: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - -property-expr@^1.5.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-1.5.1.tgz#22e8706894a0c8e28d58735804f6ba3a3673314f" - integrity sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g== - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -proxy-from-env@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -puppeteer@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.5.0.tgz#e35db3f3ba3d41013feb65be02bdaa727ec7b8ec" - integrity sha512-eELwFtFxL+uhmg4jPZOZXzSrPEYy4CaYQNbcchBbfxY+KjMpnv6XGf/aYWaQG49OTpfi2/DMziXtDM8XuJgoUA== - dependencies: - debug "^3.1.0" - extract-zip "^1.6.6" - https-proxy-agent "^2.2.1" - mime "^2.0.3" - progress "^2.0.0" - proxy-from-env "^1.0.0" - rimraf "^2.6.1" - ws "^5.1.1" - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -querystring-es3@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-lru@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" - integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -random-item@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/random-item/-/random-item-1.0.0.tgz#16ee31626cb050c8a1686a5f0f42a6b99a2aaf11" - integrity sha1-Fu4xYmywUMihaGpfD0KmuZoqrxE= - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.2.1, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-loader@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" - integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -raw-loader@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" - integrity sha1-DD0L6u2KAclm2Xh793goElKpeao= - -react-dev-utils@12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73" - integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ== - dependencies: - "@babel/code-frame" "^7.16.0" - address "^1.1.2" - browserslist "^4.18.1" - chalk "^4.1.2" - cross-spawn "^7.0.3" - detect-port-alt "^1.1.6" - escape-string-regexp "^4.0.0" - filesize "^8.0.6" - find-up "^5.0.0" - fork-ts-checker-webpack-plugin "^6.5.0" - global-modules "^2.0.0" - globby "^11.0.4" - gzip-size "^6.0.0" - immer "^9.0.7" - is-root "^2.1.0" - loader-utils "^3.2.0" - open "^8.4.0" - pkg-up "^3.1.0" - prompts "^2.4.2" - react-error-overlay "^6.0.11" - recursive-readdir "^2.2.2" - shell-quote "^1.7.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -react-dom@16.13.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f" - integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.19.1" - -react-error-overlay@^6.0.11: - version "6.0.11" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" - integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== - -react-fast-compare@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" - integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== - -react-hot-loader@4.13.1: - version "4.13.1" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.13.1.tgz#979fd7598e27338b3faffae6ed01c65374dace5e" - integrity sha512-ZlqCfVRqDJmMXTulUGic4lN7Ic1SXgHAFw7y/Jb7t25GBgTR0fYAJ8uY4mrpxjRyWGWmqw77qJQGnYbzCvBU7g== - dependencies: - fast-levenshtein "^2.0.6" - global "^4.3.0" - hoist-non-react-statics "^3.3.0" - loader-utils "^2.0.3" - prop-types "^15.6.1" - react-lifecycles-compat "^3.0.4" - shallowequal "^1.1.0" - source-map "^0.7.3" - -react-input-autosize@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2" - integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== - dependencies: - prop-types "^15.5.8" - -react-is@^16.13.1, react-is@^16.6.0, react-is@^16.6.3, react-is@^16.7.0, react-is@^16.8.0, react-is@^16.8.1, react-is@^16.8.6: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-lifecycles-compat@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" - integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== - -react-redux@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-6.0.0.tgz#09e86eeed5febb98e9442458ad2970c8f1a173ef" - integrity sha512-EmbC3uLl60pw2VqSSkj6HpZ6jTk12RMrwXMBdYtM6niq0MdEaRq9KYCwpJflkOZj349BLGQm1MI/JO1W96kLWQ== - dependencies: - "@babel/runtime" "^7.2.0" - hoist-non-react-statics "^3.2.1" - invariant "^2.2.4" - loose-envify "^1.4.0" - prop-types "^15.6.2" - react-is "^16.6.3" - -react-router-dom@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.1.2.tgz#06701b834352f44d37fbb6311f870f84c76b9c18" - integrity sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew== - dependencies: - "@babel/runtime" "^7.1.2" - history "^4.9.0" - loose-envify "^1.3.1" - prop-types "^15.6.2" - react-router "5.1.2" - tiny-invariant "^1.0.2" - tiny-warning "^1.0.0" - -react-router@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.2.tgz#6ea51d789cb36a6be1ba5f7c0d48dd9e817d3418" - integrity sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A== - dependencies: - "@babel/runtime" "^7.1.2" - history "^4.9.0" - hoist-non-react-statics "^3.1.0" - loose-envify "^1.3.1" - mini-create-react-context "^0.3.0" - path-to-regexp "^1.7.0" - prop-types "^15.6.2" - react-is "^16.6.0" - tiny-invariant "^1.0.2" - tiny-warning "^1.0.0" - -react-select@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.0.tgz#ab098720b2e9fe275047c993f0d0caf5ded17c27" - integrity sha512-wBFVblBH1iuCBprtpyGtd1dGMadsG36W5/t2Aj8OE6WbByDg5jIFyT7X5gT+l0qmT5TqWhxX+VsKJvCEl2uL9g== - dependencies: - "@babel/runtime" "^7.4.4" - "@emotion/cache" "^10.0.9" - "@emotion/core" "^10.0.9" - "@emotion/css" "^10.0.9" - memoize-one "^5.0.0" - prop-types "^15.6.0" - react-input-autosize "^2.2.2" - react-transition-group "^4.3.0" - -react-transition-group@^4.0.0, react-transition-group@^4.3.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" - integrity sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw== - dependencies: - "@babel/runtime" "^7.5.5" - dom-helpers "^5.0.1" - loose-envify "^1.4.0" - prop-types "^15.6.2" - -react-visibility-sensor@5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/react-visibility-sensor/-/react-visibility-sensor-5.0.2.tgz#e360fff81572cb3a2a9fd680484447a9da09a55d" - integrity sha512-7+1lr7oQOO2vKr5u/uxoDGFWAAy7lsDy2aJU3Zy1/OymI+TRqOBk8m2L8YE1B0UyfCDWxVAWO+aifVGqNOvqeQ== - dependencies: - prop-types "^15.6.2" - -react@16.13.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" - integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - -read-cache@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" - integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== - dependencies: - pify "^2.3.0" - -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.2.2: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - 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" - -readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.4.0, readable-stream@^3.5.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba" - integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - -readdir-glob@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.2.tgz#b185789b8e6a43491635b6953295c5c5e3fd224c" - integrity sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA== - dependencies: - minimatch "^5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -recursive-readdir@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" - integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== - dependencies: - minimatch "^3.0.5" - -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - -redux-thunk@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622" - integrity sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw== - -redux@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.1.tgz#436cae6cc40fbe4727689d7c8fae44808f1bfef5" - integrity sha512-R7bAtSkk7nY6O/OYMVR9RiBI+XghjF9rlbl5806HJbQph0LJVHZrU5oaO4q70eUKiqMRqm4y07KLTlMZ2BlVmg== - dependencies: - loose-envify "^1.4.0" - symbol-observable "^1.2.0" - -regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== - dependencies: - regenerate "^1.4.2" - -regenerate-unicode-properties@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" - integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.2.1, regenerate@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f" - integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A== - -regenerate@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - integrity sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w== - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== - dependencies: - "@babel/runtime" "^7.8.4" - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexpp@^3.0.0, regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regexpu-core@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" - integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^8.2.0" - regjsgen "^0.5.1" - regjsparser "^0.6.4" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.2.0" - -regexpu-core@^5.3.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" - integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== - dependencies: - "@babel/regjsgen" "^0.8.0" - regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsparser "^0.9.1" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= - -regjsgen@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" - integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= - dependencies: - jsesc "~0.5.0" - -regjsparser@^0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" - integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== - dependencies: - jsesc "~0.5.0" - -regjsparser@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" - integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== - dependencies: - jsesc "~0.5.0" - -relateurl@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - -renderkid@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" - integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== - dependencies: - css-select "^4.1.3" - dom-converter "^0.2.0" - htmlparser2 "^6.1.0" - lodash "^4.17.21" - strip-ansi "^6.0.1" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-pathname@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" - integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== - -resolve@^1.1.7, resolve@^1.10.1, resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -resolve@^2.0.0-next.4: - version "2.0.0-next.4" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" - integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -restore-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" - integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -retry@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" - integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rifm@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rifm/-/rifm-0.7.0.tgz#debe951a9c83549ca6b33e5919f716044c2230be" - integrity sha512-DSOJTWHD67860I5ojetXdEQRIBvF6YcpNe53j0vn1vp9EUb9N80EiZTxgP+FkDKorWC8PZw052kTF4C1GOivCQ== - dependencies: - "@babel/runtime" "^7.3.1" - -rimraf@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== - dependencies: - glob "^7.0.5" - -rimraf@^2.6.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -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" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -scheduler@^0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" - integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - -schema-utils@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" - integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== - dependencies: - "@types/json-schema" "^7.0.4" - ajv "^6.12.2" - ajv-keywords "^3.4.1" - -schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.8.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" - -script-loader@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/script-loader/-/script-loader-0.7.2.tgz#2016db6f86f25f5cf56da38915d83378bb166ba7" - integrity sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA== - dependencies: - raw-loader "~0.5.1" - -scroll-into-view-if-needed@2.2.20: - version "2.2.20" - resolved "https://registry.yarnpkg.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.20.tgz#3a46847a72233a3af9770e55df450f2a7f2e2a0e" - integrity sha512-P9kYMrhi9f6dvWwTGpO5I3HgjSU/8Mts7xL3lkoH5xlewK7O9Obdc5WmMCzppln7bCVGNmf3qfoZXrpCeyNJXw== - dependencies: - compute-scroll-into-view "1.0.11" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= - -selfsigned@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.1.1.tgz#18a7613d714c0cd3385c48af0075abf3f266af61" - integrity sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ== - dependencies: - node-forge "^1" - -"semver@2 || 3 || 4 || 5", semver@^5.1.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== - dependencies: - randombytes "^2.1.0" - -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -setimmediate@^1.0.4, setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shallowequal@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" - integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.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" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shell-quote@^1.7.3: - version "1.8.0" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.0.tgz#20d078d0eaf71d54f43bd2ba14a1b5b9bfa5c8ba" - integrity sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-progress-webpack-plugin@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/simple-progress-webpack-plugin/-/simple-progress-webpack-plugin-2.0.0.tgz#2d51a63e266070cdd181215a6665e29ea6e82055" - integrity sha512-Ji8b05YHc9R8iHHbEX8kOqvR2CB8bUqqqP481DbY+j5ImqBhLXk9sXFZZdcSEK3Ld0hZl9i+5CzXWLXzw1NV9g== - dependencies: - chalk "4.1.x" - figures "3.2.x" - log-update "4.0.x" - -sirv@^1.0.7: - version "1.0.19" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" - integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== - dependencies: - "@polka/url" "^1.0.0-next.20" - mrmime "^1.0.0" - totalist "^1.0.0" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -sockjs@^0.3.24: - version "0.3.24" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" - integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== - dependencies: - faye-websocket "^0.11.3" - uuid "^8.3.2" - websocket-driver "^0.7.4" - -source-map-js@^1.0.1, source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -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" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.21, source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -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" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -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" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== - -spdy-transport@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" - integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - dependencies: - debug "^4.1.0" - detect-node "^2.0.4" - hpack.js "^2.1.6" - obuf "^1.1.2" - readable-stream "^3.0.6" - wbuf "^1.7.3" - -spdy@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" - integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - dependencies: - debug "^4.1.0" - handle-thing "^2.0.0" - http-deceiver "^1.2.7" - select-hose "^2.0.0" - spdy-transport "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stream-browserify@3.0.0, stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - -stream-http@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" - integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.4" - readable-stream "^3.6.0" - xtend "^4.0.2" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.matchall@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" - integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.4.3" - side-channel "^1.0.4" - -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string_decoder@^1.1.1, string_decoder@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== - dependencies: - ansi-regex "^6.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-comments@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-comments/-/strip-comments-2.0.1.tgz#4ad11c3fbcac177a67a40ac224ca339ca1c1ba9b" - integrity sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw== - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -style-loader@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" - integrity sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ== - -style-loader@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-2.0.0.tgz#9669602fd4690740eaaec137799a03addbbc393c" - integrity sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -style-search@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" - integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI= - -styled-components@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.1.0.tgz#2e3985b54f461027e1c91af3229e1c2530872a4e" - integrity sha512-0Qs2wEkFBXHFlysz6CV831VG6HedcrFUwChjnWylNivsx14MtmqQsohi21rMHZxzuTba063dEyoe/SR6VGJI7Q== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/traverse" "^7.4.5" - "@emotion/is-prop-valid" "^0.8.8" - "@emotion/stylis" "^0.8.4" - "@emotion/unitless" "^0.7.4" - babel-plugin-styled-components ">= 1" - css-to-react-native "^3.0.0" - hoist-non-react-statics "^3.0.0" - shallowequal "^1.1.0" - supports-color "^5.5.0" - -stylelint-config-recommended@10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-10.0.1.tgz#25a8828acf6cde87dac6db2950c8c4ed82a69ae1" - integrity sha512-TQ4xQ48tW4QSlODcti7pgSRqBZcUaBzuh0jPpfiMhwJKBPkqzTIAU+IrSWL/7BgXlOM90DjB7YaNgFpx8QWhuA== - -stylelint-config-styled-components@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/stylelint-config-styled-components/-/stylelint-config-styled-components-0.1.1.tgz#b408388d7c687833ab4be4c4e6522d97d2827ede" - integrity sha512-z5Xz/9GmvxO6e/DLzBMwkB85zHxEEjN6K7Cj80Bi+o/9vR9eS3GX3E9VuMnX9WLFYulqbqLtTapGGY28JBiy9Q== - -stylelint-custom-processor-loader@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/stylelint-custom-processor-loader/-/stylelint-custom-processor-loader-0.6.0.tgz#57b70095e9999252967ff8aa2ec185cbbfbe3cba" - integrity sha512-vwab7dHm0/GfKumFMrX9lXEjN+Re+MZSdWstA5ORwKI0XjZ3pLKtSdR6jwNLZNcdzQMu4qaFwhC7YLiPVmvA8w== - dependencies: - loader-utils "~1.1.0" - -stylelint-processor-styled-components@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/stylelint-processor-styled-components/-/stylelint-processor-styled-components-1.10.0.tgz#8082fc68779476aac411d3afffac0bc833d77a29" - integrity sha512-g4HpN9rm0JD0LoHuIOcd/FIjTZCJ0ErQ+dC3VTxp+dSvnkV+MklKCCmCQEdz5K5WxF4vPuzfVgdbSDuPYGZhoA== - dependencies: - "@babel/parser" "^7.8.3" - "@babel/traverse" "^7.8.3" - micromatch "^4.0.2" - postcss "^7.0.26" - -stylelint@15.2.0: - version "15.2.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-15.2.0.tgz#e906eb59df83bde075d148623216f298f9ceb03a" - integrity sha512-wjg5OLn8zQwjlj5cYUgyQpMWKzct42AG5dYlqkHRJQJqsystFFn3onqEc263KH4xfEI0W3lZCnlIhFfS64uwSA== - dependencies: - "@csstools/css-parser-algorithms" "^2.0.1" - "@csstools/css-tokenizer" "^2.0.1" - "@csstools/media-query-list-parser" "^2.0.1" - "@csstools/selector-specificity" "^2.1.1" - balanced-match "^2.0.0" - colord "^2.9.3" - cosmiconfig "^8.0.0" - css-functions-list "^3.1.0" - css-tree "^2.3.1" - debug "^4.3.4" - fast-glob "^3.2.12" - fastest-levenshtein "^1.0.16" - file-entry-cache "^6.0.1" - global-modules "^2.0.0" - globby "^11.1.0" - globjoin "^0.1.4" - html-tags "^3.2.0" - ignore "^5.2.4" - import-lazy "^4.0.0" - imurmurhash "^0.1.4" - is-plain-object "^5.0.0" - known-css-properties "^0.26.0" - mathml-tag-names "^2.1.3" - meow "^9.0.0" - micromatch "^4.0.5" - normalize-path "^3.0.0" - picocolors "^1.0.0" - postcss "^8.4.21" - postcss-media-query-parser "^0.2.3" - postcss-resolve-nested-selector "^0.1.1" - postcss-safe-parser "^6.0.0" - postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" - resolve-from "^5.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - style-search "^0.1.0" - supports-hyperlinks "^2.3.0" - svg-tags "^1.0.0" - table "^6.8.1" - v8-compile-cache "^2.3.0" - write-file-atomic "^5.0.0" - -supports-color@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" - integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== - dependencies: - has-flag "^3.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^5.3.0, supports-color@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-hyperlinks@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -svg-tags@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" - integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= - -symbol-observable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - -synchronous-promise@^2.0.6: - version "2.0.13" - resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.13.tgz#9d8c165ddee69c5a6542862b405bc50095926702" - integrity sha512-R9N6uDkVsghHePKh1TEqbnLddO2IY25OcsksyFp/qBe7XYd0PVbKEWxhcdMhpLzE1I6skj5l4aEZ3CRxcbArlA== - -table@^6.8.1: - version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - -tailwindcss@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.2.7.tgz#5936dd08c250b05180f0944500c01dce19188c07" - integrity sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ== - dependencies: - arg "^5.0.2" - chokidar "^3.5.3" - color-name "^1.1.4" - detective "^5.2.1" - didyoumean "^1.2.2" - dlv "^1.1.3" - fast-glob "^3.2.12" - glob-parent "^6.0.2" - is-glob "^4.0.3" - lilconfig "^2.0.6" - micromatch "^4.0.5" - normalize-path "^3.0.0" - object-hash "^3.0.0" - picocolors "^1.0.0" - postcss "^8.0.9" - postcss-import "^14.1.0" - postcss-js "^4.0.0" - postcss-load-config "^3.1.4" - postcss-nested "6.0.0" - postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" - quick-lru "^5.1.1" - resolve "^1.22.1" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar-stream@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -terser-webpack-plugin@^5.1.3: - version "5.3.7" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz#ef760632d24991760f339fe9290deb936ad1ffc7" - integrity sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.17" - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.16.5" - -terser@^5.10.0, terser@^5.15.1, terser@^5.16.5: - version "5.16.8" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.8.tgz#ccde583dabe71df3f4ed02b65eb6532e0fae15d5" - integrity sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - -timers-browserify@^2.0.12: - version "2.0.12" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - dependencies: - setimmediate "^1.0.4" - -tiny-invariant@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" - integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== - -tiny-warning@^1.0.0, tiny-warning@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - -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" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -toposort@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" - integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= - -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== - -trim-newlines@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" - integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -ts-loader@9.4.2: - version "9.4.2" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.4.2.tgz#80a45eee92dd5170b900b3d00abcfa14949aeb78" - integrity sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - -tsconfig-paths@^3.14.1: - version "3.14.2" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^1.9.0, tslib@^1.9.3: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== - -tslib@^2.0.3: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -tty-browserify@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" - integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" - integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-fest@^2.14.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" - integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -typescript@4.9.5: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -ua-parser-js@^0.7.18: - version "0.7.21" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777" - integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - -unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" - integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - dependencies: - unicode-canonical-property-names-ecmascript "^2.0.0" - unicode-property-aliases-ecmascript "^2.0.0" - -unicode-match-property-value-ecmascript@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" - integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== - -unicode-match-property-value-ecmascript@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" - integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" - integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== - -unicode-property-aliases-ecmascript@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" - integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unique-slug@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" - integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== - dependencies: - imurmurhash "^0.1.4" - -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -update-browserslist-db@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -username@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/username/-/username-3.0.0.tgz#b3dba982a72b4ce59d52f159fa1aeba266af5fc8" - integrity sha1-s9upgqcrTOWdUvFZ+hrromavX8g= - dependencies: - execa "^0.7.0" - mem "^1.1.0" - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util-extend@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" - integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= - -util@^0.12.0, util@^0.12.4: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -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" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -value-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" - integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -vkbeautify@0.99.3: - version "0.99.3" - resolved "https://registry.yarnpkg.com/vkbeautify/-/vkbeautify-0.99.3.tgz#4769b3238c5d772c6ea967545dd1df5582f23297" - integrity sha512-2ozZEFfmVvQcHWoHLNuiKlUfDKlhh4KGsy54U0UrlLMR1SO+XKAIDqBxtBwHgNrekurlJwE8A9K6L49T78ZQ9Q== - -vm-browserify@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -wbuf@^1.1.0, wbuf@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - dependencies: - minimalistic-assert "^1.0.0" - -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - dependencies: - defaults "^1.0.3" - -webpack-bundle-analyzer@4.8.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.8.0.tgz#951b8aaf491f665d2ae325d8b84da229157b1d04" - integrity sha512-ZzoSBePshOKhr+hd8u6oCkZVwpVaXgpw23ScGLFpR6SjYI7+7iIWYarjN6OEYOfRt8o7ZyZZQk0DuMizJ+LEIg== - dependencies: - "@discoveryjs/json-ext" "0.5.7" - acorn "^8.0.4" - acorn-walk "^8.0.0" - chalk "^4.1.0" - commander "^7.2.0" - gzip-size "^6.0.0" - lodash "^4.17.20" - opener "^1.5.2" - sirv "^1.0.7" - ws "^7.3.1" - -webpack-dev-middleware@^5.3.1: - version "5.3.3" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f" - integrity sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA== - dependencies: - colorette "^2.0.10" - memfs "^3.4.3" - mime-types "^2.1.31" - range-parser "^1.2.1" - schema-utils "^4.0.0" - -webpack-dev-server@4.11.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz#ae07f0d71ca0438cf88446f09029b92ce81380b5" - integrity sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw== - dependencies: - "@types/bonjour" "^3.5.9" - "@types/connect-history-api-fallback" "^1.3.5" - "@types/express" "^4.17.13" - "@types/serve-index" "^1.9.1" - "@types/serve-static" "^1.13.10" - "@types/sockjs" "^0.3.33" - "@types/ws" "^8.5.1" - ansi-html-community "^0.0.8" - bonjour-service "^1.0.11" - chokidar "^3.5.3" - colorette "^2.0.10" - compression "^1.7.4" - connect-history-api-fallback "^2.0.0" - default-gateway "^6.0.3" - express "^4.17.3" - graceful-fs "^4.2.6" - html-entities "^2.3.2" - http-proxy-middleware "^2.0.3" - ipaddr.js "^2.0.1" - open "^8.0.9" - p-retry "^4.5.0" - rimraf "^3.0.2" - schema-utils "^4.0.0" - selfsigned "^2.1.1" - serve-index "^1.9.1" - sockjs "^0.3.24" - spdy "^4.0.2" - webpack-dev-middleware "^5.3.1" - ws "^8.4.2" - -webpack-merge@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.2.tgz#5d372dddd3e1e5f8874f5bf5a8e929db09feb216" - integrity sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw== - dependencies: - lodash "^4.17.5" - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack-virtual-modules@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.3.2.tgz#b7baa30971a22d99451f897db053af48ec29ad2c" - integrity sha512-RXQXioY6MhzM4CNQwmBwKXYgBs6ulaiQ8bkNQEl2J6Z+V+s7lgl/wGvaI/I0dLnYKB8cKsxQc17QOAVIphPLDw== - dependencies: - debug "^3.0.0" - -webpack@5.75.0: - version "5.75.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.75.0.tgz#1e440468647b2505860e94c9ff3e44d5b582c152" - integrity sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.7.1" - acorn-import-assertions "^1.7.6" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" - es-module-lexer "^0.9.0" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.1.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" - watchpack "^2.4.0" - webpack-sources "^3.2.3" - -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -whatwg-fetch@3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c" - integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== - -whatwg-fetch@>=0.10.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.4.0.tgz#e11de14f4878f773fbebcde8871b2c0699af8b30" - integrity sha512-rsum2ulz2iuZH08mJkT0Yi6JnKhwdw4oeyMjokgxd+mmqYSd9cPpOQf01TIWgjxG/U4+QR+AwKq6lSbXVxkyoQ== - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-typed-array@^1.1.2, which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - -which@^1.2.9, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -worker-loader@3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-3.0.8.tgz#5fc5cda4a3d3163d9c274a4e3a811ce8b60dbb37" - integrity sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.0.tgz#54303f117e109bf3d540261125c8ea5a7320fab0" - integrity sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -ws@^5.1.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -ws@^7.3.1: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -ws@^8.4.2: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== - -xtend@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -xxhashjs@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" - integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== - dependencies: - cuint "^0.2.2" - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml@^1.10.0, yaml@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - -yaml@^1.7.2: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== - -yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.6.0: - version "17.7.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" - integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yauzl@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -yup@0.27.0: - version "0.27.0" - resolved "https://registry.yarnpkg.com/yup/-/yup-0.27.0.tgz#f8cb198c8e7dd2124beddc2457571329096b06e7" - integrity sha512-v1yFnE4+u9za42gG/b/081E7uNW9mUj3qtkmelLbW5YPROZzSH/KUUyJu9Wt8vxFJcT9otL/eZopS0YK1L5yPQ== - dependencies: - "@babel/runtime" "^7.0.0" - fn-name "~2.0.1" - lodash "^4.17.11" - property-expr "^1.5.0" - synchronous-promise "^2.0.6" - toposort "^2.0.2" - -zip-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" - integrity sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A== - dependencies: - archiver-utils "^2.1.0" - compress-commons "^4.1.0" - readable-stream "^3.6.0" diff --git a/ui-frontend/packages/catalog-ui-search/.nsprc b/ui-frontend/packages/catalog-ui-search/.nsprc deleted file mode 100644 index 2766ea484f0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/.nsprc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "exceptions": [ - "https://nodesecurity.io/advisories/165", - "https://nodesecurity.io/advisories/548", - "https://nodesecurity.io/advisories/566" - ] -} diff --git a/ui-frontend/packages/catalog-ui-search/.stylelintrc b/ui-frontend/packages/catalog-ui-search/.stylelintrc deleted file mode 100644 index 599e1d6c8dd..00000000000 --- a/ui-frontend/packages/catalog-ui-search/.stylelintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "processors": ["stylelint-processor-styled-components"], - "extends": [ - "stylelint-config-recommended", - "stylelint-config-styled-components" - ], - "rules": { - "selector-type-no-unknown": [ - true, - { - "ignoreTypes": ["intrigue"] - } - ] - } -} \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/dev/index.tsx b/ui-frontend/packages/catalog-ui-search/dev/index.tsx deleted file mode 100644 index 2cfa6da6aff..00000000000 --- a/ui-frontend/packages/catalog-ui-search/dev/index.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { exec } from 'child_process' -let compiling = false -let followOn = false -const chokidar = require('chokidar') -const debounce = require('lodash.debounce') - -const recompileTypescript = debounce(() => { - if (compiling) { - followOn = true - return - } - console.log('recompiling project') - compiling = true - exec('yarn watch:build', function (_error, _stdout, _stderr) { - compiling = false - if (followOn) { - followOn = false - recompileTypescript() - } else { - console.log('distribution up to date') - } - }) -}, 200) - -recompileTypescript() -chokidar.watch('./src/**/*').on('change', () => { - recompileTypescript() -}) -chokidar.watch('./exports/**/*').on('change', () => { - recompileTypescript() -}) -chokidar.watch('./typings/**/*').on('change', () => { - recompileTypescript() -}) diff --git a/ui-frontend/packages/catalog-ui-search/dev/tsconfig.json b/ui-frontend/packages/catalog-ui-search/dev/tsconfig.json deleted file mode 100644 index f7f66306ec0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/dev/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react", - "allowJs": false, - "esModuleInterop": true, - "sourceMap": true, - "forceConsistentCasingInFileNames": true, - "noImplicitReturns": true, - "noImplicitAny": true, - "noImplicitThis": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noEmitHelpers": false, - "importHelpers": true, - "declaration": true, - "strictNullChecks": true, - "module": "CommonJS", - "outDir": "./dist", - "skipLibCheck": true, - "lib": ["es2019", "dom"], - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "downlevelIteration": true - }, - "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["node_modules", "dist", "dev", "target"] -} diff --git a/ui-frontend/packages/catalog-ui-search/exports/README.md b/ui-frontend/packages/catalog-ui-search/exports/README.md deleted file mode 100644 index 94d968fbeac..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/README.md +++ /dev/null @@ -1,4 +0,0 @@ -This directory is intended to be representative of catalog-ui-search's public facing API. -Like a component library, this directory represents the parts of this application that are intended for re-use and extensibility. -Using this index helps us avoid making breaking changes to downstream projects by treating file locations as an implementation detail. -It also helps communicate which parts of the UI are designed for re-use and extensibility - serving as a location to find existing components. \ No newline at end of file diff --git a/ui-frontend/packages/catalog-ui-search/exports/backbone-container.tsx b/ui-frontend/packages/catalog-ui-search/exports/backbone-container.tsx deleted file mode 100644 index 530b54b0d86..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/backbone-container.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { - default, - WithBackboneProps, -} from '../src/main/webapp/react-component/backbone-container' diff --git a/ui-frontend/packages/catalog-ui-search/exports/fetch.tsx b/ui-frontend/packages/catalog-ui-search/exports/fetch.tsx deleted file mode 100644 index a070cf02b0c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/fetch.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from '../src/main/webapp/react-component/utils/fetch' diff --git a/ui-frontend/packages/catalog-ui-search/exports/menu.tsx b/ui-frontend/packages/catalog-ui-search/exports/menu.tsx deleted file mode 100644 index 58c177a6f0a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/menu.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { Menu, MenuItem } from '../src/main/webapp/react-component/menu' diff --git a/ui-frontend/packages/catalog-ui-search/exports/metacard-interactions.tsx b/ui-frontend/packages/catalog-ui-search/exports/metacard-interactions.tsx deleted file mode 100644 index ca0de22c2f2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/metacard-interactions.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { - default, - Divider, - MetacardInteraction, -} from '../src/main/webapp/react-component/metacard-interactions' diff --git a/ui-frontend/packages/catalog-ui-search/exports/multi-select-actions.tsx b/ui-frontend/packages/catalog-ui-search/exports/multi-select-actions.tsx deleted file mode 100644 index 108ddcfc6d4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/multi-select-actions.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -// @ts-nocheck ts-migrate(2307) FIXME: Cannot find module -export { MultiSelectAction } from '../src/main/webapp/react-component/multi-select-actions/presentation' diff --git a/ui-frontend/packages/catalog-ui-search/exports/query.tsx b/ui-frontend/packages/catalog-ui-search/exports/query.tsx deleted file mode 100644 index 303ff9ed89d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/query.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from '../src/main/webapp/react-component/utils/query' diff --git a/ui-frontend/packages/catalog-ui-search/exports/security.tsx b/ui-frontend/packages/catalog-ui-search/exports/security.tsx deleted file mode 100644 index a09438a0fab..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/security.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { - Access, - Restrictions, - Security, - Entry, -} from '../src/main/webapp/react-component/utils/security' diff --git a/ui-frontend/packages/catalog-ui-search/exports/sharing.tsx b/ui-frontend/packages/catalog-ui-search/exports/sharing.tsx deleted file mode 100644 index 56cb3940bbe..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/sharing.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// @ts-nocheck ts-migrate(2307) FIXME: Cannot find module -export { - Sharing, - Item, - Category, -} from '../src/main/webapp/react-component/sharing' diff --git a/ui-frontend/packages/catalog-ui-search/exports/theme.tsx b/ui-frontend/packages/catalog-ui-search/exports/theme.tsx deleted file mode 100644 index 013086f1d76..00000000000 --- a/ui-frontend/packages/catalog-ui-search/exports/theme.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from '../src/main/webapp/react-component/theme' diff --git a/ui-frontend/packages/catalog-ui-search/package.json b/ui-frontend/packages/catalog-ui-search/package.json deleted file mode 100644 index 3ad89cd49df..00000000000 --- a/ui-frontend/packages/catalog-ui-search/package.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "name": "catalog-ui-search", - "author": "Codice", - "description": "A frontend UI for DDF Catalog", - "version": "5.0.0", - "license": "LGPL-3.0", - "scripts": { - "fmt": "ace format -w", - "format": "ace format", - "prestart": "ace disable-idp", - "start": "node --max_old_space_size=8192 ./node_modules/@connexta/ace/bin.js start", - "start:transpile": "yarn start --tsTranspileOnly true", - "test": "ace bundle --env=test && ace test", - "start:test": "ace start --env=test", - "build": "node --max_old_space_size=16384 ./node_modules/@connexta/ace/bin.js bundle", - "build:transpile": "node --max_old_space_size=16384 ./node_modules/@connexta/ace/bin.js bundle --tsTranspileOnly true", - "postbuild": "yarn publish:build && npm pack ./dist && move-cli catalog-ui-search-5.0.0.tgz dist/catalog-ui-search.tgz && ace package", - "m2": "yarn install:m2", - "install:m2": "ace clean && ace bundle --tsTranspileOnly true && ace package && ace install", - "publish:cpx-package": "cpx package.json dist && json -I -f dist/package.json -e 'this.private=false'", - "publish:cpx-src": "cpx \"src/**/*.!(*tsx|*ts)\" dist/src", - "publish:cpx-current": "cpx \"*\" dist", - "publish:build": "rimraf dist && yarn publish:cpx-src && yarn publish:cpx-current && tsc && yarn publish:cpx-package", - "watch:build": "yarn publish:cpx-src && yarn publish:cpx-current && tsc && yarn publish:cpx-package", - "publish:npm": "yarn publish:build && npm publish dist -timeout=99999", - "watch": "ts-node -P ./dev/tsconfig.json ./dev/index.tsx" - }, - "repository": { - "type": "git", - "url": "https://github.com/codice/ddf.git" - }, - "engines": { - "node": "16.x.x" - }, - "peerDependencies": {}, - "devDependencies": { - "@connexta/ace": "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe", - "@types/chai": "4.2.14", - "@types/d3": "5.0.0", - "@types/enzyme": "3.10.8", - "@types/lodash.clonedeep": "4.5.7", - "@types/lodash.debounce": "4.0.6", - "@types/lodash.get": "4.4.7", - "@types/lodash.isequalwith": "4.4.7", - "@types/mocha": "8.0.3", - "@types/moment-timezone": "0.5.30", - "@types/react": "18.x.x", - "@types/react-beautiful-dnd": "^13.0.0", - "@types/react-dom": "18.x.x", - "@types/react-router-dom": "5.3.3", - "@types/react-text-mask": "5.4.11", - "@types/react-virtualized-auto-sizer": "1.0.0", - "@types/react-window": "^1.8.1", - "@types/styled-components": "5.1.26", - "@types/uuid": "8.3.3", - "@welldone-software/why-did-you-render": "4.2.2", - "chai": "4.1.1", - "chokidar": "3.5.0", - "cpx": "1.5.0", - "enzyme": "3.11.0", - "@wojtekmaj/enzyme-adapter-react-17": "0.8.0", - "jsdom": "11.12.0", - "json": "9.0.6", - "move-cli": "1.2.1", - "react-addons-test-utils": "15.4.2", - "sinon": "5.0.7", - "ts-node": "10.9.1", - "tslib": "2.5.0", - "typescript": "5.0.4", - "utility-types": "3.10.0" - }, - "dependencies": { - "@blueprintjs/core": "3.29.0", - "@blueprintjs/datetime": "3.18.3", - "@emotion/react": "11.11.1", - "@emotion/styled": "11.11.0", - "@mui/icons-material": "5.13.7", - "@mui/lab": "5.0.0-alpha.135", - "@mui/material": "5.13.7", - "@mui/system": "5.13.7", - "@mui/x-data-grid": "6.9.1", - "@turf/circle": "6.5.0", - "@turf/meta": "6.5.0", - "@turf/turf": "6.5.0", - "@types/backbone-associations": "0.6.31", - "@types/backbone.marionette": "3.3.2", - "@types/lodash": "4.14.120", - "@types/openlayers": "4.3.11", - "backbone": "1.1.2", - "backbone-associations": "0.6.2", - "backbone-poller": "1.1.3", - "backbone.wreqr": "1.4.0", - "bootstrap": "3.4.0", - "cesium": "1.44", - "content-disposition": "0.5.3", - "d3": "5.16.0", - "density-clustering": "1.3.0", - "detect-browser": "5.3.0", - "dropzone": "4.3.0", - "focus-visible": "5.1.0", - "font-awesome": "4.7", - "geo-convex-hull": "1.2.0", - "geolib": "^3.2.1", - "geospatialdraw": "0.4.8", - "golden-layout": "1.5.9", - "immer.1.5.0": "https://registry.npmjs.org/immer/-/immer-1.5.0.tgz", - "jquery": "3.4.1", - "lodash": "4.17.15", - "lodash.clonedeep": "4.5.0", - "lodash.debounce": "4.0.8", - "lodash.get": "4.4.2", - "lodash.isequalwith": "4.4.0", - "modern-normalize": "1.1.0", - "moment": "^2.27.0", - "moment-timezone": "0.5.31", - "mt-geo": "1.0.1", - "openlayers": "4.6.5", - "plotly.js": "1.45.0", - "polished": "3.6.5", - "postcss-focus-visible": "8.0.2", - "prop-types": "15.7.2", - "query-string": "6.13.1", - "react": "18.x.x", - "react-beautiful-dnd": "git+https://github.com/andrewkfiedler/react-beautiful-dnd#5703284223ee68ae8543c3f27495824389d2c82a", - "react-dom": "18.x.x", - "react-intl": "6.4.1", - "react-router-dom": "5.3.4", - "react-text-mask": "5.5.0", - "react-use": "15.1.0", - "react-virtualized-auto-sizer": "^1.0.2", - "react-window": "git+https://github.com/andrewkfiedler/react-window#8a68a2508c79044be33f6f743261b069d7fd9cc1", - "react-window-components": "0.0.7", - "re-resizable": "6.1.0", - "rpc-websockets": "7.5.1", - "scroll-into-view-if-needed": "^2.2.25", - "sortablejs": "1.4.2", - "styled-components": "5.3.10", - "tailwindcss": "3.3.1", - "urijs": "1.19.1", - "use-resize-observer": "6.1.0", - "usng.js": "0.4.5", - "uuid": "9.0.0", - "vis": "4.15.0", - "wkx": "0.4.5" - }, - "resolutions": { - "@types/react": "18.2.0", - "backbone": "1.1.2", - "jquery": "3.4.1", - "polished": "4.2.2", - "react": "18.2.0", - "react-dom": "18.2.0", - "styled-components": "5.3.10" - }, - "main": "src/main/webapp/index.tsx", - "ace": { - "files": [ - "src/main/resources", - "target/webapp" - ], - "testPath": "src/", - "testSetupPath": "src/main/webapp/test/setup/index.tsx" - }, - "context-path": "/search/catalog", - "private": true, - "sideEffects": true -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/app.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/app.tsx deleted file mode 100644 index 417e834d013..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/app.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Entry from './js/Entry' - -Entry() diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/check-browser.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/check-browser.tsx deleted file mode 100644 index 6cc8fd5eae3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/check-browser.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import './styles/tailwind.css' -import { detect } from 'detect-browser' - -const browser = detect() - -/** - * If we can't detect browser, assume it's supported - * - * If we can, check if it's supported - */ -export const isSupportedBrowser = () => { - if (sessionStorage.getItem('ignoreBrowserWarning')) { - return true - } - if (browser && browser.version) { - const version = parseInt(browser.version.split('.')[0]) - switch (browser && browser.name) { - case 'chrome': - // https://chromium.cypress.io/mac/ for those devs who wish to test old chromium versions - return version >= 90 - case 'firefox': - // https://ftp.mozilla.org/pub/firefox/releases/ - return version >= 78 - case 'edge': - case 'edge-chromium': - // https://officecdnmac.microsoft.com/pr/03adf619-38c6-4249-95ff-4a01c0ffc962/MacAutoupdate/MicrosoftEdge-90.0.818.39.pkg - // change version on end to get to old versions - return version >= 91 - default: - return false - } - } else { - /** - * Assumption is that this would happen only in a new browser version where the user agent deprecation - * has gone through (thus it should be a relatively new version of chrome or whatever browser), - * so we let it through as supported. - */ - return true - } -} - -export const handleUnsupportedBrowser = () => { - document.querySelector('#loading')?.classList.add('hidden') - document - .querySelector('#incompatible-browser-bg button') - ?.addEventListener('click', () => { - sessionStorage.setItem('ignoreBrowserWarning', 'true') - location.reload() - }) -} - -export const handleSupportedBrowser = () => { - document.querySelector('#incompatible-browser-bg')?.remove() -} - -if (!isSupportedBrowser()) { - handleUnsupportedBrowser() -} else { - handleSupportedBrowser() -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/ajax-error-handling.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/ajax-error-handling.tsx deleted file mode 100644 index 0558f42343b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/ajax-error-handling.tsx +++ /dev/null @@ -1,87 +0,0 @@ -// -import React from 'react' -import useSnack from '../hooks/useSnack' -import $ from 'jquery' -import { StartupDataStore } from '../../js/model/Startup/startup' -let getShortErrorMessage = function (error: any) { - let extraMessage = error instanceof Error ? error.name : String(error) - if (extraMessage.length === 0) { - return extraMessage - } - // limit to 20 characters so we do not worry about overflow - if (extraMessage.length > 20) { - extraMessage = extraMessage.substr(0, 20) + '...' - } - return ' - ' + extraMessage -} -let getErrorResponse = function ( - _event: any, - jqxhr: any, - settings: any, - throwError: any -) { - if ( - jqxhr.getResponseHeader('content-type') === 'application/json' && - jqxhr.responseText.startsWith('<') && - jqxhr.responseText.indexOf('ACSURL') > -1 && - jqxhr.responseText.indexOf('SAMLRequest') > -1 - ) { - return { title: 'Logged out', message: 'Please refresh page to log in' } - } else if ( - settings.url.indexOf('./internal/catalog/sources') > -1 && - settings.type === 'GET' - ) { - return { - title: - StartupDataStore.Configuration.getI18n()['sources.polling.error.title'], - message: - StartupDataStore.Configuration.getI18n()[ - 'sources.polling.error.message' - ], - } - } else if (jqxhr.responseJSON !== undefined) { - return { title: 'Error', message: jqxhr.responseJSON.message } - } else { - switch (jqxhr.status) { - case 403: - return { title: 'Forbidden', message: 'Not Authorized' } - case 405: - return { - title: 'Error', - message: 'Method not allowed. Please try refreshing your browser', - } - default: - return { - title: 'Error', - message: 'Unknown Error' + getShortErrorMessage(throwError), - } - } - } -} -export const AjaxErrorHandling = () => { - const addSnack = useSnack() - React.useEffect(() => { - $(window.document).ajaxError( - (event: any, jqxhr: any, settings: any, throwError: any) => { - if (settings.customErrorHandling) { - // Do nothing if caller is handling their own error - return - } - console.error(event, jqxhr, settings, throwError) - const response = getErrorResponse(event, jqxhr, settings, throwError) - if ( - StartupDataStore.Configuration.getDisableUnknownErrorBox() && - response.message.substring(0, 13) === 'Unknown Error' - ) { - return - } - addSnack(response.title + response.message, { - alertProps: { - severity: 'error', - }, - }) - } - ) - }) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/app.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/app.tsx deleted file mode 100644 index e6bf99859dd..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/app.tsx +++ /dev/null @@ -1,936 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader/root' -import { - Switch, - Route, - useLocation, - useHistory, - RouteProps, - LinkProps, -} from 'react-router-dom' -import CssBaseline from '@mui/material/CssBaseline' -import Grid from '@mui/material/Grid' -import $ from 'jquery' -import Paper from '@mui/material/Paper' -import Typography from '@mui/material/Typography' -import Button from '@mui/material/Button' -import ExpandingButton from '../button/expanding-button' -import Divider from '@mui/material/Divider' -import IconButton from '@mui/material/IconButton' -import ArrowBackIcon from '@mui/icons-material/ArrowBack' -import ArrowForwardIcon from '@mui/icons-material/ArrowForward' -import ChevronLeftIcon from '@mui/icons-material/ChevronLeft' -import MenuIcon from '@mui/icons-material/Menu' -import PersonIcon from '@mui/icons-material/Person' -import SettingsIcon from '@mui/icons-material/Settings' -import Drawer from '@mui/material/Drawer' -import queryString from 'query-string' -import { Link } from '../link/link' -import { Memo } from '../memo/memo' -import HelpIcon from '@mui/icons-material/Help' -import NotificationsIcon from '@mui/icons-material/Notifications' -import userInstance from '../singletons/user-instance' -import notifications from '../singletons/user-notifications' -import SystemUsageModal from '../system-usage/system-usage' - -import UserView, { RoleDisplay } from '../../react-component/user/user' -import UserSettings, { - SettingsComponentType, -} from '../../react-component/user-settings/user-settings' -import { GlobalStyles } from './global-styles' -import { PermissiveComponentType } from '../../typescript' -import scrollIntoView from 'scroll-into-view-if-needed' -import { Elevations } from '../theme/theme' -import { - useBackbone, - useListenTo, -} from '../selection-checkbox/useBackbone.hook' -import { - AsyncTasks, - useRenderOnAsyncTasksAddOrRemove, -} from '../../js/model/AsyncTask/async-task' -import useSnack from '../hooks/useSnack' -import LinearProgress from '@mui/material/LinearProgress' -import { BaseProps } from '../button/expanding-button' -import { useDialogState } from '../hooks/useDialogState' -import SessionTimeout from '../../react-component/session-timeout' -import { AjaxErrorHandling } from './ajax-error-handling' -import { WreqrSnacks } from './wreqr-snacks' -import sessionTimeoutModel from '../singletons/session-timeout' -import Extensions from '../../extension-points' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' - -export const handleBase64EncodedImages = (url: string) => { - if (url && url.startsWith('data:')) { - return url - } - return `data:image/png;base64,${url}` -} -type ForNavButtonType = Omit & - Required> -export type RouteShownInNavType = { - routeProps: RouteProps - linkProps: LinkProps - showInNav: true - navButtonProps: ForNavButtonType -} -export type RouteNotShownInNavType = { - routeProps: RouteProps - showInNav: false -} -export type IndividualRouteType = RouteShownInNavType | RouteNotShownInNavType -const matchesRoute = ({ - routeInfo, - pathname, -}: { - routeInfo: IndividualRouteType - pathname: string -}) => { - if ( - routeInfo.routeProps.path && - typeof routeInfo.routeProps.path === 'string' - ) { - return ( - pathname.startsWith(`${routeInfo.routeProps.path}/`) || - pathname.endsWith(`${routeInfo.routeProps.path}`) - ) - } else if ( - routeInfo.routeProps.path && - routeInfo.routeProps.path.constructor === Array - ) { - return routeInfo.routeProps.path.some( - (possibleRoute) => - pathname.startsWith(`${possibleRoute}/`) || - pathname.endsWith(`${possibleRoute}`) - ) - } - return false -} -type AppPropsType = { - RouteInformation: IndividualRouteType[] - NotificationsComponent: PermissiveComponentType - SettingsComponents: SettingsComponentType -} -function sidebarDataIdTag(name: string) { - return `sidebar-${name}-button` -} -/** - * If you're not using a custom loading screen, - * this handles removing the default one for you on first render - * of the app. - */ -export const useDefaultWelcome = () => { - React.useEffect(() => { - const loadingElement = document.querySelector('#loading') - if (loadingElement) { - loadingElement.classList.remove('is-open') - setTimeout(() => { - loadingElement.remove() - }, 500) - } - }, []) -} -const scrollCurrentRouteIntoView = () => { - setTimeout(() => { - const currentroute = document.querySelector('[data-currentroute]') - if (currentroute) { - scrollIntoView(currentroute, { - behavior: 'smooth', - scrollMode: 'if-needed', - }) - } - }, 0) -} -const AsyncTasksComponent = () => { - const [showBar, setShowBar] = React.useState(false) - useRenderOnAsyncTasksAddOrRemove() - const addSnack = useSnack() - const history = useHistory() - React.useEffect(() => { - let timeoutid = undefined as number | undefined - timeoutid = window.setTimeout(() => { - setShowBar(false) - }, 1000) - return () => { - clearTimeout(timeoutid) - } - }, [showBar]) - React.useEffect(() => { - let timeoutid = undefined as number | undefined - if (AsyncTasks.hasShowableTasks()) { - setShowBar(true) - window.onbeforeunload = () => { - setShowBar(true) - return `Are you sure you want to leave? ${AsyncTasks.list.length} tasks are still running.` - } - } else { - setShowBar(false) - } - timeoutid = window.setTimeout(() => { - setShowBar(false) - }, 1000) - return () => { - clearTimeout(timeoutid) - window.onbeforeunload = null - } - }, [AsyncTasks.list.length]) - React.useEffect(() => { - const unsubs = AsyncTasks.list.map((task) => { - return task.subscribeTo({ - subscribableThing: 'update', - callback: () => { - AsyncTasks.remove(task) - if (AsyncTasks.isRestoreTask(task)) { - addSnack( - `Restore of ${task.lazyResult.plain.metacard.properties.title} complete.`, - { - timeout: 5000, - closeable: true, - alertProps: { - action: ( - - ), - }, - } - ) - } - if (AsyncTasks.isDeleteTask(task)) { - addSnack( - `Delete of ${task.lazyResult.plain.metacard.properties.title} complete.`, - { - undo: () => { - history.push({ - pathname: `/search/${task.lazyResult.plain.id}`, - search: '', - }) - AsyncTasks.restore({ lazyResult: task.lazyResult }) - }, - } - ) - } - if (AsyncTasks.isCreateSearchTask(task)) { - addSnack(`Creation of ${task.data.title} complete.`) - } - }, - }) - }) - return () => { - unsubs.forEach((unsub) => { - unsub() - }) - } - }) - if (AsyncTasks.list.length > 0) { - return ( -

- -
- {AsyncTasks.list.map((asyncTask) => { - if (AsyncTasks.isRestoreTask(asyncTask)) { - return ( -
- Restoring ' - {asyncTask.lazyResult.plain.metacard.properties.title}' -
- ) - } - if (AsyncTasks.isDeleteTask(asyncTask)) { - return ( -
- Deleting ' - {asyncTask.lazyResult.plain.metacard.properties.title}' -
- ) - } - if (AsyncTasks.isCreateSearchTask(asyncTask)) { - return ( -
- Creating '{asyncTask.data.title}' -
- ) - } - if (AsyncTasks.isSaveSearchTask(asyncTask)) { - return ( -
- Saving '{asyncTask.data.title}' -
- ) - } - if (AsyncTasks.isCreateTask(asyncTask)) { - return ( -
- Creating '{asyncTask.data.title}' -
- ) - } - if (AsyncTasks.isSaveTask(asyncTask)) { - return ( -
- Saving '{asyncTask.data.title}' -
- ) - } - return null - })} -
-
- ) - } - return null -} -/** The song and dance around 'a' vs Link has to do with react router not supporting these outside links */ -const HelpButton = () => { - const { getHelpUrl } = useConfiguration() - const location = useLocation() - const queryParams = queryString.parse(location.search) - const { navOpen } = useNavContextProvider() - return ( - - ) -} - -function DrawerWrapperComponent({ children }: { children: React.ReactNode }) { - return ( - <> -
- {Extensions.includeNavigationButtons ? ( -
- - -
- ) : null} -
- {children} -
-
- - ) -} - -const SettingsButton = () => { - const { SettingsComponents } = useTopLevelAppContext() - const location = useLocation() - const history = useHistory() - const queryParams = queryString.parse(location.search) - const open = Boolean(queryParams['global-settings']) - const { navOpen } = useNavContextProvider() - return ( - <> - - { - delete queryParams['global-settings'] - history.push( - `${location.pathname}?${queryString.stringify(queryParams)}` - ) - }} - PaperProps={{ - className: 'min-w-120 max-w-4/5 ', - }} - > - - - - - - ) -} -const NotificationsButton = () => { - const hasUnseenNotifications = useIndicateHasUnseenNotifications() - const { NotificationsComponent } = useTopLevelAppContext() - const location = useLocation() - const history = useHistory() - const queryParams = queryString.parse(location.search) - const open = Boolean(queryParams['global-notifications']) - const { navOpen } = useNavContextProvider() - return ( - <> -
- -
- { - delete queryParams['global-notifications'] - history.push( - `${location.pathname}?${queryString.stringify(queryParams)}` - ) - notifications.setSeen() - userInstance.savePreferences() - }} - PaperProps={{ - className: 'min-w-120 max-w-4/5 ', - }} - > - - - - - - ) -} -const UserButton = () => { - const location = useLocation() - const history = useHistory() - const queryParams = queryString.parse(location.search) - const open = Boolean(queryParams['global-user']) - const { navOpen } = useNavContextProvider() - - const getLabel = () => { - return ( -
-
{userInstance.getUserName()}
-
- -
-
- ) - } - - return ( - <> - - { - delete queryParams['global-user'] - history.push( - `${location.pathname}?${queryString.stringify(queryParams)}` - ) - }} - PaperProps={{ - className: 'min-w-120 max-w-4/5 ', - }} - > - - - - - - ) -} -const RouteButton = ({ routeInfo }: { routeInfo: RouteShownInNavType }) => { - const location = useLocation() - const { navOpen } = useNavContextProvider() - const isSelected = matchesRoute({ - routeInfo, - pathname: location.pathname, - }) - return ( - - ) -} -const SideBarRoutes = () => { - const { RouteInformation } = useTopLevelAppContext() - return ( - - {RouteInformation.filter((routeInfo) => routeInfo.showInNav).map( - (routeInfo: RouteShownInNavType) => { - return ( - - ) - } - )} - {} - - ) -} -const SideBarNavigationButtons = ({ - showText = false, -}: { showText?: boolean } = {}) => { - const { navOpen } = useNavContextProvider() - const showExpandedText = navOpen || showText - return ( - <> - - - - - - - - - - - - ) -} - -const SideBarToggleButton = () => { - const { navOpen, setNavOpen } = useNavContextProvider() - const { getTopLeftLogoSrc, getCustomBranding, getProduct, getMenuIconSrc } = - useConfiguration() - return ( - <> - - {navOpen ? ( - <> - - - {getTopLeftLogoSrc() ? ( - - ) : ( - - - {getCustomBranding()} - - - {getProduct()} - - - )} - - - { - setNavOpen(false) - }} - size="large" - > - - - - - - ) : ( - - )} - - - ) -} -const SideBar = () => { - const { navOpen } = useNavContextProvider() - return ( - { - scrollCurrentRouteIntoView() - }} - > - - - {Extensions.includeNavigationButtons && ( - <> - - - - )} - - - - - - - - {Extensions.extraSidebarButtons && ( - - )} - - - - - - - - - ) -} -const Header = () => { - const { getPlatformBackground, getPlatformColor, getPlatformHeader } = - useConfiguration() - return ( - - {getPlatformHeader() ? ( - - {getPlatformHeader()} - - ) : null} - - ) -} -const Footer = () => { - const { getPlatformBackground, getPlatformColor, getPlatformFooter } = - useConfiguration() - return ( - - {getPlatformFooter() ? ( - - {getPlatformFooter()} - - ) : null} - - ) -} -const SideBarBackground = () => { - const { getBottomLeftBackgroundSrc } = useConfiguration() - return ( - - {getBottomLeftBackgroundSrc() ? ( - - ) : null} - - ) -} -const RouteContents = () => { - const { RouteInformation } = useTopLevelAppContext() - /** - * So this is slightly annoying, but the grid won't properly resize without overflow hidden set. - * - * That makes handling padding / margins / spacing more complicated in our app, because with overflow hidden set - * dropshadows on elements will get cut off. So we have to let the contents instead dictate their padding, that way - * their dropshadows can be seen. - * - * Folks will probably struggle a bit with it at first, but the css utilities actually make it pretty easy. - * Just add pb-2 for the correct bottom spacing, pt-2 for correct top spacing, etc. etc. - */ - return ( - - - - {RouteInformation.map((routeInfo: RouteNotShownInNavType) => { - return ( - - ) - })} - - - - ) -} -const NavContextProvider = React.createContext({ - setNavOpen: (_navOpen: boolean) => {}, - navOpen: false, -}) -export const useNavContextProvider = () => { - const navContext = React.useContext(NavContextProvider) - return navContext -} -/** - * Keep the current route visible to the user since it's useful info. - * This also ensures it's visible upon first load of the page. - */ -const useScrollCurrentRouteIntoViewOnLocationChange = () => { - const location = useLocation() - React.useEffect(() => { - scrollCurrentRouteIntoView() - }, [location]) -} -const useIndicateHasUnseenNotifications = () => { - const { listenTo } = useBackbone() - const [hasUnseenNotifications, setHasUnseenNotifications] = React.useState( - notifications.hasUnseen() as boolean - ) - React.useEffect(() => { - listenTo(notifications, 'change add remove reset update', () => { - setHasUnseenNotifications(notifications.hasUnseen() as boolean) - }) - }, []) - return hasUnseenNotifications -} - -const useFaviconBranding = () => { - // todo favicon branding - // $(window.document).ready(() => { - // window.document.title = properties.branding + ' ' + properties.product - // const favicon = document.querySelector('#favicon') as HTMLAnchorElement - // favicon.href = brandingInformation.topLeftLogoSrc - // favicon.remove() - // document.head.appendChild(favicon) - // }) -} -const useNavOpen = () => { - let defaultOpen = - localStorage.getItem('shell.drawer') === 'true' ? true : false - const [navOpen, setNavOpen] = React.useState(defaultOpen) - React.useEffect(() => { - localStorage.setItem('shell.drawer', navOpen.toString()) - setTimeout(() => { - $(window).resize() // needed for golden layout to resize - }, 250) - }, [navOpen]) - return { - navOpen, - setNavOpen, - } -} -const TopLevelAppContext = React.createContext({ - RouteInformation: [], - NotificationsComponent: () => null, - SettingsComponents: {}, -} as AppPropsType) -const useTopLevelAppContext = () => { - const topLevelAppContext = React.useContext(TopLevelAppContext) - return topLevelAppContext -} -const SessionTimeoutComponent = () => { - const sessionTimeoutDialogState = useDialogState() - useListenTo(sessionTimeoutModel, 'change:showPrompt', () => { - if (sessionTimeoutModel.get('showPrompt')) { - sessionTimeoutDialogState.handleClick() - } else { - sessionTimeoutDialogState.handleClose() - } - }) - return ( - { - if (reason === 'backdropClick') { - return - } - sessionTimeoutDialogState.MuiDialogProps.onClose(event, reason) - }} - > - - - ) -} - -const App = ({ - RouteInformation, - NotificationsComponent, - SettingsComponents, -}: AppPropsType) => { - const { navOpen, setNavOpen } = useNavOpen() - useFaviconBranding() - useScrollCurrentRouteIntoViewOnLocationChange() - return ( - - -
- {/* Don't move CSSBaseline or GlobalStyles to providers, since we have multiple react roots. */} - - - - - - - -
- - - - - - - - - -
- -
-
-
- ) -} -export default hot(App) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/base-app.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/base-app.tsx deleted file mode 100644 index b9e93339b52..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/base-app.tsx +++ /dev/null @@ -1,346 +0,0 @@ -import * as React from 'react' -import App, { IndividualRouteType, useDefaultWelcome } from './app' -import Help from '../help/help.view' - -import { hot } from 'react-hot-loader/root' -import { IngestDetailsViewReact } from '../ingest-details/ingest-details.view' -import { HomePage } from '../pages/search' - -import SourcesPage from '../../react-component/sources/presentation' -import SourcesPageIcon from '@mui/icons-material/Cloud' -import AboutPage from '../../react-component/about' -import AboutPageIcon from '@mui/icons-material/Info' -import FolderIcon from '@mui/icons-material/Folder' -import TrashIcon from '@mui/icons-material/Delete' -import SearchIcon from '@mui/icons-material/Search' -import ImageSearch from '@mui/icons-material/ImageSearch' -import UserNotifications from '../../react-component/user-notifications/user-notifications' -import { BaseSettings } from '../../react-component/user-settings/user-settings' -import ExtensionPoints from '../../extension-points/extension-points' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' -import { Redirect } from 'react-router-dom' -import Grid from '@mui/material/Grid' -import MetacardNavRoute from '../pages/metacard-nav' -import MetacardRoute from '../pages/metacard' -import SavedSearches from '../pages/browse' -import Open from '../pages/open' -import Restore from '../pages/restore' -import Create from '../pages/create' -import AddIcon from '@mui/icons-material/Add' -import ViewListIcon from '@mui/icons-material/ViewList' -import { GoldenLayoutViewReact } from '../golden-layout/golden-layout.view' -import selectionInterfaceModel from '../selection-interface/selection-interface.model' -import { Query } from '../../js/model/TypedQuery' - -/** - * The issue with the original golden layout code for popout is that it will go to the current route and then load gl and all that. - * - * However, usually there are things on the route we don't want to run (for performance sometimes, and for other times because they reset prefs or whatnot to clear things) - * - * As a result, we have this route that is just for the popout, it doesn't show in the nav, and it doesn't run the other things on the route - * - * We have to have an instance of golden layout for the popout to attach to, which this provides, with a query that's blank (just so we can transfer results and what not to it) - */ -export const GoldenLayoutPopoutRoute: IndividualRouteType = { - routeProps: { - path: '/_gl_popout', - children: () => { - const baseQuery = Query() - return ( -
- - {}} - configName="goldenLayout" - /> - -
- ) - }, - }, - showInNav: false, -} - -const RouteInformation: IndividualRouteType[] = [ - { - showInNav: false, - routeProps: { - exact: true, - path: '/', - children: () => { - return - }, - }, - }, - { - showInNav: false, - routeProps: { - exact: true, - path: '/uploads/:uploadId', - children: () => { - return ( - - - - - - ) - }, - }, - }, - { - showInNav: false, - routeProps: { - exact: true, - path: '/metacards/:metacardId', - children: () => { - return ( - - - - - - - - - - - ) - }, - }, - }, - { - navButtonProps: { - expandedLabel: 'Search', - unexpandedLabel: 'Search', - Icon: SearchIcon, - dataId: 'search', - }, - routeProps: { - exact: false, - path: ['/search/:id', '/search'], - children: () => { - return - }, - }, - linkProps: { - to: '/search', - }, - showInNav: true, - }, - { - navButtonProps: { - expandedLabel: 'Create', - unexpandedLabel: 'Create', - Icon: AddIcon, - dataId: 'create', - }, - routeProps: { - exact: true, - path: ['/create'], - children: () => { - return ( -
- - - -
- ) - }, - }, - linkProps: { - to: '/create', - }, - showInNav: true, - }, - { - navButtonProps: { - expandedLabel: 'Open', - unexpandedLabel: 'Open', - Icon: FolderIcon, - dataId: 'open', - }, - routeProps: { - exact: true, - path: ['/open'], - children: () => { - return ( -
- - - -
- ) - }, - }, - linkProps: { - to: '/open', - }, - showInNav: true, - }, - { - navButtonProps: { - expandedLabel: 'Browse', - unexpandedLabel: 'Browse', - Icon: ViewListIcon, - dataId: 'browse', - }, - routeProps: { - exact: true, - path: ['/browse'], - children: () => { - return ( -
- -
- ) - }, - }, - linkProps: { - to: '/browse', - }, - showInNav: true, - }, - { - navButtonProps: { - expandedLabel: 'Upload', - unexpandedLabel: 'Upload', - Icon: ImageSearch, - dataId: 'upload', - }, - routeProps: { - path: '/upload', - children: () => { - return ( -
- - - -
- ) - }, - }, - linkProps: { - to: '/upload', - }, - showInNav: true, - }, - { - navButtonProps: { - expandedLabel: 'Sources', - unexpandedLabel: 'Sources', - Icon: SourcesPageIcon, - dataId: 'sources', - }, - routeProps: { - path: '/sources', - children: () => { - return ( -
- - - -
- ) - }, - }, - linkProps: { - to: '/sources', - }, - showInNav: true, - }, - { - navButtonProps: { - expandedLabel: 'Restore', - unexpandedLabel: 'Restore', - Icon: TrashIcon, - dataId: 'restore', - }, - routeProps: { - exact: true, - path: ['/restore'], - children: () => { - return ( -
- - - -
- ) - }, - }, - linkProps: { - to: '/restore', - }, - showInNav: true, - }, - { - navButtonProps: { - expandedLabel: 'About', - unexpandedLabel: 'About', - Icon: AboutPageIcon, - dataId: 'about', - }, - routeProps: { - path: '/about', - children: () => { - return ( -
- - - -
- ) - }, - }, - linkProps: { - to: '/about', - }, - showInNav: true, - }, - GoldenLayoutPopoutRoute, -] - -/** - * Shows how downstream apps utilize the shell this app provides - */ -const BaseApp = () => { - useDefaultWelcome() - return ( - <> - - - - ) -} - -const WrappedWithProviders = () => { - return ( - - - - ) -} - -export default hot(WrappedWithProviders) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/blueprint.adjust.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/blueprint.adjust.tsx deleted file mode 100644 index 2cf5092813e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/blueprint.adjust.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import React from 'react' - -let removed = false - -type removeStyleProps = { - ruleIdentifyingFunction: ({ rule }: { rule: CSSStyleRule }) => boolean -} - -/** - * Attempts to find and remove a style, returning true if successful - */ -const removeStyle = ({ - ruleIdentifyingFunction, -}: removeStyleProps): boolean => { - return Boolean( - Array.prototype.find.call(document.styleSheets, (sheet: CSSStyleSheet) => { - return Boolean( - Array.prototype.find.call( - sheet.cssRules || sheet.rules, - (rule: CSSStyleRule, index: number) => { - if (ruleIdentifyingFunction({ rule })) { - sheet.deleteRule(index) - return true - } - return false - } - ) - ) - }) - ) -} - -/** - * The use of removed means this will only ever happen when it needs too. - */ -export const useRemoveFocusStyle = () => { - React.useEffect(() => { - if (!removed) { - removed = removeStyle({ - ruleIdentifyingFunction: ({ rule }) => { - return ( - rule.style && - rule.style.outline === 'rgba(19, 124, 189, 0.6) auto 2px' - ) - }, - }) - } - }, []) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/global-styles.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/global-styles.tsx deleted file mode 100644 index 128e00df042..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/global-styles.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { createGlobalStyle } from 'styled-components' - -export const GlobalStyles = createGlobalStyle` - /* Only needed because we import 'bootstrap.less' in catalog-ui-search. */ - legend { - /* Unset all properties */ - all: unset; - - /* Place back material-ui styling */ - padding: 0 !important; - text-align: left !important; - transition: width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms; - line-height: 11px !important; - } - - /* So we match Material */ - .navigation-item + .navigation-item { - margin-left: 10px; - } - .navigation-item:not(:last-of-type) { - border-radius: 25px; - } - - .inspector-content { - transform: none; - } - .MuiPickersModal-dialogRootWider { - min-width: 500px !important; - } - .MuiPickersBasePicker-pickerView { - max-width: none !important; - } - .MuiDialog-paperWidthSm { - max-width: none !important; - } - - .no-resource { - *[data-id='Overwrite'] { - display: none !important; - } - } - .federated { - *[data-id='Notes'] { - display: none !important; - } - } -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/wreqr-snacks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/wreqr-snacks.tsx deleted file mode 100644 index 4bc4f3e7293..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/app/wreqr-snacks.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react' -import useSnack from '../hooks/useSnack' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import { SnackProps } from '../snack/snack.provider' -import wreqr from '../../js/wreqr' -/** - * Would be nice to eventually remove, but for now this is easier than removing announcements from non view areas - */ -export const WreqrSnacks = () => { - const addSnack = useSnack() - useListenTo( - (wreqr as any).vent, - 'snack', - ({ message, snackProps }: { message: string; snackProps: SnackProps }) => { - addSnack(message, snackProps) - } - ) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/better-click-away-listener/better-click-away-listener.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/better-click-away-listener/better-click-away-listener.tsx deleted file mode 100644 index 4254d750702..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/better-click-away-listener/better-click-away-listener.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import * as React from 'react' -import ClickAwayListener, { - ClickAwayListenerProps, -} from '@mui/material/ClickAwayListener' -import { Drawing } from '../singletons/drawing' - -type BetterClickAwayListenerProps = ClickAwayListenerProps & { - onClickAway: (event: React.MouseEvent | KeyboardEvent) => void -} - -/** - * Same as ClickAwayListener, but doesn't trigger onClickAway if the click was in a menu. Also adds using escape to escape. - * @param props - */ -export const BetterClickAwayListener = ( - props: BetterClickAwayListenerProps -) => { - React.useEffect(() => { - const callback = (e: KeyboardEvent) => { - if (e.keyCode === 27) { - props.onClickAway(e) - } - } - document.addEventListener('keyup', callback) - return () => { - document.removeEventListener('keyup', callback) - } - }, []) - return ( - { - /** - * Should we be doing a querySelectorAll and seeing if anything on the page contains the element? I feel like this could fail in certain instances. - */ - if (Drawing.isFuzzyDrawing()) { - return - } - const dialog = document.querySelector('.MuiDialog-root') - const menu = document.querySelector('#menu-') - const probablyDropdown = - document.querySelector( - 'div[style*="transform: translateX(calc((-50%"]' - ) || - document.querySelector( - 'div[style*="transform: translateX(calc(-50%"]' - ) - // needed for regular old selects - if ( - document.activeElement && - document.activeElement.classList.contains('MuiListItem-root') - ) { - return - } - if (dialog && dialog.contains(e.target as HTMLBaseElement)) { - return - } - if (menu && menu.contains(e.target as HTMLBaseElement)) { - return - } - if ( - probablyDropdown && - probablyDropdown.contains(e.target as HTMLBaseElement) - ) { - return - } - if (props.onClickAway) props.onClickAway(e) - }} - /> - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/boolean-search-bar.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/boolean-search-bar.tsx deleted file mode 100644 index 76fc4edf8d6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/boolean-search-bar.tsx +++ /dev/null @@ -1,372 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -import Typography from '@mui/material/Typography' -import CircularProgress from '@mui/material/CircularProgress' -import FormControl, { FormControlProps } from '@mui/material/FormControl' -import TextField, { TextFieldProps } from '@mui/material/TextField' -import Autocomplete, { - AutocompleteProps, - createFilterOptions, -} from '@mui/material/Autocomplete' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useState } from 'react' -import { BooleanTextType } from '../filter-builder/filter.structure' -import useBooleanSearchError from './useBooleanSearchError' -import ValidationIndicator from './validation-indicator' -import { - fetchCql, - fetchSuggestions, - getRandomId, - Option, -} from './boolean-search-utils' -import IconButton from '@mui/material/IconButton' -import { InputProps } from '@mui/material/Input' -import ClearIcon from '@mui/icons-material/Clear' -import SearchIcon from '@mui/icons-material/Search' -import { useUpdateEffect } from 'react-use' -import { dispatchEnterKeySubmitEvent } from '../custom-events/enter-key-submit' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' -const defaultFilterOptions = createFilterOptions() -type Props = { - value: BooleanTextType - onChange: (value: BooleanTextType) => void - property?: string - disableClearable?: boolean - placeholder?: TextFieldProps['placeholder'] - FormControlProps?: FormControlProps - TextFieldProps?: Partial - AutocompleteProps?: AutocompleteProps - InputProps?: InputProps -} -const WILD_CARD = '*' -const defaultValue: BooleanTextType = { - text: '', - cql: '', - error: false, -} -const validateShape = ({ value, onChange }: Props) => { - if ( - value.text === undefined || - value.cql === undefined || - value.error === undefined - ) { - onChange(defaultValue) - } -} -const ShapeValidator = (props: Props) => { - React.useEffect(() => { - validateShape(props) - }) - if (props.value.text !== undefined) { - return - } - return null -} -/** - * We want to take in a value, and onChange update it. That would then flow a new value - * back down. - */ -const BooleanSearchBar = ({ - value, - onChange, - property = 'anyText', - placeholder, - disableClearable, - ...props -}: Props) => { - const { config } = useConfiguration() - if (placeholder === undefined) { - placeholder = `Search ${config?.customBranding} ${config?.product}` - } - const [isOpen, setIsOpen] = React.useState(false) - const { errorMessage } = useBooleanSearchError(value) - const [loading, setLoading] = React.useState(false) - const [suggestion, setSuggestion] = React.useState('') - const [id] = React.useState(getRandomId()) - const [cursorLocation, setCursorLocation] = React.useState(0) - const [tokens, setTokens] = React.useState([]) - const inputRef = React.useRef() - const optionToValue = (option: any) => option.token - const [options, setOptions] = useState([]) - const isValidBeginningToken = (query: string) => { - const trimmedToken = query.trim().toLowerCase() - if ( - trimmedToken === 'not' || - trimmedToken === 'and' || - trimmedToken === 'or' - ) { - return false - } - return true - } - useUpdateEffect(() => { - var controller = new AbortController() - setLoading(true) - // when empty, interpret as wildcard - const searchVal = value.text === '' ? WILD_CARD : value.text - if (searchVal && isValidBeginningToken(value.text)) { - fetchCql({ - searchText: searchVal, - searchProperty: property, - callback: ({ cql = '', error, errorMessage }) => { - onChange({ - ...value, - cql, - error: !!error, - errorMessage, - }) - setLoading(false) - }, - signal: controller.signal, - }) - } else { - setLoading(false) - onChange({ - ...value, - cql: '', - error: true, - }) - } - return () => { - controller.abort() - } - }, [value.text, property]) - React.useEffect(() => { - var controller = new AbortController() - if (value.text !== null && isValidBeginningToken(value.text)) { - fetchSuggestions({ - text: value.text, - callback: ({ options }) => { - setOptions(options) - }, - signal: controller.signal, - }) - } else { - setOptions([]) - } - return () => { - controller.abort() - } - }, [value.text]) - React.useEffect(() => { - const rawTokens = value.text.split(/[ ())]+/) - let joinTokens = [] - for (let i = 0; i < rawTokens.length; i++) { - joinTokens.push(rawTokens.slice(i, rawTokens.length).join(' ').trim()) - } - setTokens(joinTokens) - }, [value.text]) - const getOptionLabel = (option: any) => { - if (!option || !option.token) return '' - if (option.length === 0) return '' - return option.token - } - const handleSubmit = (e: React.SyntheticEvent) => { - if (!value.error && (!isOpen || currentOptions.length === 0)) { - dispatchEnterKeySubmitEvent(e) - } - } - // Used to determine what we can go for next in context the the previous. - const filterOptions = React.useCallback( - (optionsToFilter: any) => { - const lastToken = tokens[tokens.length - 1] - if (lastToken === undefined) { - return [] - } else if (lastToken === '') { - return optionsToFilter - } else { - const strippedOptions = optionsToFilter.map((o: any) => ({ - token: o.token, - })) - const filteredOptions = defaultFilterOptions(strippedOptions, { - inputValue: lastToken, - getOptionLabel, - }) - const flatFilteredOptions = filteredOptions.map((o) => (o as any).token) - const reconstructedOptions = optionsToFilter.filter((o: any) => - flatFilteredOptions.includes(o.token) - ) - return reconstructedOptions - } - }, - [tokens] - ) - React.useEffect(() => { - if (value.text) { - if (suggestion === 'AND' || suggestion === 'OR') { - inputRef?.current?.setSelectionRange(cursorLocation, cursorLocation) - setSuggestion('') - } - } - }, [value.text]) - const handleTextChange = (e: any) => { - onChange({ - ...value, - text: e.target.value, - }) - } - const handleTextClear = () => { - onChange({ ...defaultValue, text: '' }) - } - const getLogicalOperators = (options: any) => { - return options.filter((option: any) => option.type === 'logical') - } - const getTokenToRemove = (suggestion: Option) => { - let tokenToRemove = '' - for (let i = 0; i < tokens.length; i++) { - const match = suggestion.token - .toLowerCase() - .match(tokens[i].toLowerCase()) - if (match && match[0]) { - tokenToRemove = tokens[i] - break - } - } - return tokenToRemove - } - const currentOptions = filterOptions(getLogicalOperators(options)).sort( - (o1: any) => (o1?.type === 'mandatory' ? -1 : 1) - ) - return ( - - optionsToFilter} - onOpen={() => { - setIsOpen(true) - }} - open={isOpen} - onClose={() => { - setIsOpen(false) - }} - options={currentOptions} - includeInputInList={true} - onChange={(_e: any, suggestion: any) => { - if ( - suggestion && - suggestion.token && - suggestion.token !== value.text - ) { - let selectedSuggestion = optionToValue(suggestion).toUpperCase() - if (selectedSuggestion === 'NOT') { - selectedSuggestion = 'NOT ()' - } - setSuggestion(selectedSuggestion) - const cursor = inputRef.current?.selectionStart - const tokenToRemove = getTokenToRemove(suggestion) - let newInputValue = value.text - if (tokenToRemove !== '' && cursor && cursor < value.text.length) { - const postText = value.text.substr(cursor, value.text.length) - const preText = value.text.slice( - 0, - (tokenToRemove.length + postText.length) * -1 - ) - onChange({ - ...value, - text: `${preText}${selectedSuggestion}${postText}`, - }) - const str = `${preText}${selectedSuggestion}` - setCursorLocation(str.length) - } else if (tokenToRemove !== '') { - newInputValue = value.text.slice(0, tokenToRemove.length * -1) - } else if (cursor && cursor < value.text.length) { - const preText = value.text.substr(0, cursor).trim() - const postText = value.text.substr(cursor, value.text.length) - onChange({ - ...value, - text: `${preText} ${selectedSuggestion}${postText}`, - }) - const str = `${preText} ${selectedSuggestion}` - setCursorLocation(str.length) - } - if (cursor && cursor >= value.text.length) { - let newInput = `${newInputValue}${selectedSuggestion} ` - onChange({ - ...value, - text: newInput, - }) - setCursorLocation(newInput.length + 1) - } - } - }} - inputValue={value.text} - getOptionLabel={getOptionLabel} - multiple={false} - disableClearable - disableCloseOnSelect - freeSolo - id={id} - renderOption={(option) => ( - {optionToValue(option)} - )} - renderInput={(params) => { - return ( - { - if (e.key === 'Enter') { - handleSubmit(e) - setIsOpen(false) - } - }} - placeholder={placeholder} - inputRef={inputRef} - size={'small'} - variant="outlined" - onChange={handleTextChange} - value={value.text} - helperText={value.error ? <>{errorMessage} : ''} - InputProps={{ - ...params.InputProps, - startAdornment: ( - <> - {loading ? ( - - ) : ( - - )} - - ), - endAdornment: ( - <> - {!disableClearable && !!value.text && ( - - - - )} - { - setIsOpen(false) - handleSubmit(e) - }} - disabled={value.error} - style={{ padding: '2px' }} - size="large" - > - - - - ), - - ...props.InputProps, - }} - {...props.TextFieldProps} - /> - ) - }} - {...props.AutocompleteProps} - /> - - ) -} -export default hot(module)(ShapeValidator) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/boolean-search-utils.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/boolean-search-utils.ts deleted file mode 100644 index 99c8de67aef..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/boolean-search-utils.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -import fetch from '../../react-component/utils/fetch' - -export const getRandomId = () => { - return `a${Math.round(Math.random() * 10000000000000).toString()}` -} - -export type Option = { - type: string - token: string -} - -type Suggestions = { - [key: string]: string[] -} - -export const suggestionsToOptions = (suggestions: Suggestions): Option[] => { - if (suggestions === undefined || Object.keys(suggestions).length === 0) { - return [] - } else { - return Object.entries(suggestions).flatMap(([category, tokens]) => - tokens.map((token: string) => ({ - type: category, - token, - })) - ) - } -} - -type CallbackType = ({ - options, - error, -}: { - options: Option[] - error: any -}) => void - -export const fetchSuggestions = async ({ - text, - callback, - signal, -}: { - text: string - callback: CallbackType - signal: AbortSignal -}) => { - const res = await fetch( - `./internal/boolean-search/suggest?q=${encodeURIComponent(text)}`, - { - signal, - } - ) - - if (!res.ok) { - throw new Error(res.statusText) - } - - const json = await res.json() - callback({ - options: suggestionsToOptions(json.suggestions), - error: json.error, - }) -} - -type BooleanEndpointReturnType = { - cql?: string - error?: boolean - errorMessage?: string -} - -export const fetchCql = async ({ - searchText, - searchProperty, - callback, - signal, -}: { - callback: (result: BooleanEndpointReturnType) => void - searchText: string | null - searchProperty?: string - signal?: AbortSignal -}) => { - let trimmedInput = searchText!.trim() - - if (trimmedInput) { - const res = await fetch( - `./internal/boolean-search/cql?q=${encodeURIComponent( - trimmedInput! - )}&e=${encodeURIComponent(searchProperty!)}`, - { - signal, - } - ) - - const json = (await res.json()) as BooleanEndpointReturnType - callback(json) - } else { - callback({ cql: '' }) - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.tsx deleted file mode 100644 index b8231645408..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/useBooleanSearchError.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -import * as React from 'react' -import { useState, useEffect } from 'react' -import { BooleanTextType } from '../filter-builder/filter.structure' - -const ERROR_MESSAGES = { - punctuation: ( -
- Invalid Query: -
- If using characters outside the alphabet (a-z), make sure to quote them - like so ("big.doc" or "bill's car"). -
-
- ), - syntax: ( -
- Invalid Query: -
Check that syntax of AND / OR / NOT is used correctly.
-
- ), - both: ( -
- Invalid Query: -
- If using characters outside the alphabet (a-z), make sure to quote them - like so ("big.doc" or "bill's car"). -
-
Check that syntax of AND / OR / NOT is used correctly.
-
- ), - custom: (message: string) =>
Invalid Query: {message}
, -} - -const useBooleanSearchError = (value: BooleanTextType) => { - const [errorMessage, setErrorMessage] = useState(ERROR_MESSAGES.both) - - useEffect(() => { - if (value.error) { - if (value.errorMessage) { - setErrorMessage(ERROR_MESSAGES.custom(value.errorMessage)) - } else { - setErrorMessage(ERROR_MESSAGES.syntax) - } - } - }, [value]) - - return { errorMessage } -} - -export default useBooleanSearchError diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/validation-indicator.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/validation-indicator.tsx deleted file mode 100644 index 017dbc5dbb9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/boolean-search-bar/validation-indicator.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -import { green, red } from '@mui/material/colors' -import InputAdornment from '@mui/material/InputAdornment' -import Tooltip from '@mui/material/Tooltip' -import Check from '@mui/icons-material/Check' -import Close from '@mui/icons-material/Close' -import * as React from 'react' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' - -type ValidationIndicatorProps = { - helperMessage?: string | JSX.Element - error?: boolean -} - -const ValidationIndicator = ({ - helperMessage: helperText, - error, -}: ValidationIndicatorProps) => { - return ( - - - {helperText} - - } - > - {error ? ( - - ) : ( - - )} - - - ) -} - -export default ValidationIndicator diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/button/expanding-button.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/button/expanding-button.tsx deleted file mode 100644 index 9d9796b786e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/button/expanding-button.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import * as React from 'react' -import FakeIcon from '@mui/icons-material/AcUnit' -import Button, { ButtonProps } from '@mui/material/Button' -import { LinkProps, Link } from 'react-router-dom' -import { hot } from 'react-hot-loader' -import Tooltip from '@mui/material/Tooltip' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' -import { useIsTruncated } from '../overflow-tooltip/overflow-tooltip' - -export type BaseProps = { - Icon?: React.FC> - expandedLabel: React.ReactNode - unexpandedLabel: React.ReactNode - dataId?: string - expanded: boolean - orientation?: 'vertical' | 'horizontal' -} - -type ExpandingButtonProps = - | (ButtonProps & { - component?: undefined - } & BaseProps) - | (ButtonProps & - BaseProps & { - component: typeof Link - } & Partial) - | (ButtonProps & - BaseProps & { - component: 'a' - } & Partial>) - | (ButtonProps & - BaseProps & { - component: typeof Button - } & Partial) - -const ExpandingButton = ({ - expanded, - Icon, - expandedLabel, - unexpandedLabel, - dataId = expandedLabel?.toString() || 'default', - orientation = 'horizontal', - ...buttonProps -}: ExpandingButtonProps) => { - const { className, ...otherButtonProps } = buttonProps - const isTruncatedState = useIsTruncated() - const disableTooltip = (() => { - if ( - (orientation === 'vertical' && !expanded) || - (!unexpandedLabel && !expanded) - ) { - return false - } else { - return !isTruncatedState.isTruncated - } - })() - return ( - -
{expandedLabel}
- - ) - } - onOpen={() => { - isTruncatedState.compareSize.current() - }} - placement="right" - > - -
- ) -} - -export default hot(module)(ExpandingButton) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/button/hover.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/button/hover.tsx deleted file mode 100644 index 895bfaa7621..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/button/hover.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import * as React from 'react' -import Button, { ButtonProps } from '@mui/material/Button' - -/** - * Allows a button that displays different components when hovering. - * Otherwise everything else is the same. - */ -export const HoverButton = ( - props: Omit & { - children: ({ hover }: { hover: boolean }) => JSX.Element - } -) => { - const [hover, setHover] = React.useState(false) - const { children: Children, ...buttonProps } = props - return ( - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/custom-events/enter-key-submit.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/custom-events/enter-key-submit.tsx deleted file mode 100644 index cb77105cea1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/custom-events/enter-key-submit.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react' - -export const enterKeySubmitEventName = 'enter key submit' - -export type CustomEventType = CustomEvent - -export const EnterKeySubmitEventHandler = (e: React.KeyboardEvent) => { - if (e.key === 'Enter') { - dispatchEnterKeySubmitEvent(e) - } -} - -export const EnterKeySubmitProps: Required< - Pick< - React.DetailedHTMLProps< - React.HTMLAttributes, - HTMLDivElement - >, - 'onKeyUp' - > -> = { - onKeyUp: EnterKeySubmitEventHandler, -} - -export const dispatchEnterKeySubmitEvent = (e: React.SyntheticEvent) => { - const customEvent = new CustomEvent(enterKeySubmitEventName, { - detail: e, - bubbles: true, - }) - e.target.dispatchEvent(customEvent) -} - -export const useListenToEnterKeySubmitEvent = ({ - callback, -}: { - callback: (e: CustomEventType) => void -}) => { - const [element, setElement] = React.useState(null) - - React.useEffect(() => { - if (element) { - element.addEventListener(enterKeySubmitEventName, callback) - return () => { - element.removeEventListener(enterKeySubmitEventName, callback) - } - } - return () => {} - }, [element, callback]) - return { - setElement, - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dark-divider/dark-divider.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dark-divider/dark-divider.tsx deleted file mode 100644 index 0484289004d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dark-divider/dark-divider.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useTheme } from '@mui/material/styles' -import Divider, { DividerProps } from '@mui/material/Divider' -import { dark, light } from '../theme/theme' - -export const DarkDivider = (props: DividerProps) => { - const theme = useTheme() - const { style, ...otherProps } = props - return ( - - ) -} - -export default hot(module)(DarkDivider) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/datatypes/datatypes.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/datatypes/datatypes.tsx deleted file mode 100644 index 3e7adc85e84..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/datatypes/datatypes.tsx +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export interface FontAwesomeIconConfig { - // FontAwesome classes, e.g., 'fa fa-file-text' - class: string -} - -export interface ValueInformation { - attributes: { - [key: string]: string[] // the values to use when filtering on this attribute - } - // Optional in case some data types might not have an associated icon, eg - iconConfig?: FontAwesomeIconConfig -} - -export interface DataTypesConfiguration { - groups: { - [key: string]: { - values: { - [key: string]: ValueInformation - } - iconConfig?: FontAwesomeIconConfig - } - } -} - -// this is a structure to make it easier to go from value to group, which we'll make by transforming the DataTypesConfiguration -export interface ReverseDataTypesConfiguration { - [key: string]: { - group: { - name: string - iconConfig?: FontAwesomeIconConfig - } - } & ValueInformation -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dialog/dialog.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dialog/dialog.tsx deleted file mode 100644 index 31c8568c27f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dialog/dialog.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import * as React from 'react' -import Dialog, { DialogProps } from '@mui/material/Dialog' -import { createCtx } from './../../typescript/context' -import { setType } from '../../typescript/hooks' - -const [useDialogContext, DialogContextProvider] = createCtx<{ - setProps: setType> -}>() - -type DialogProviderProps = { - children?: React.ReactNode - initialDialogProps?: DialogProps -} - -export const useDialog = useDialogContext - -export const DialogProvider = (props: DialogProviderProps) => { - const [dialogProps, setDialogProps] = React.useState({ - children: <>, - open: false, - onClose: () => { - setDialogProps({ - ...dialogProps, - open: false, - }) - }, - ...props.initialDialogProps, - } as DialogProps) - - const setProps = (newProps: DialogProps) => { - setDialogProps({ - ...dialogProps, - ...newProps, - }) - } - - return ( - - {props.children} - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dialog/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dialog/index.tsx deleted file mode 100644 index 2d553e9b069..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/dialog/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { useDialog, DialogProvider } from './dialog' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/download/download.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/download/download.tsx deleted file mode 100644 index 52c51678d53..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/download/download.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import * as React from 'react' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { useDialog } from '../dialog' -import { Overridable } from '../../js/model/Base/base-classes' -import { useOverridable } from '../../js/model/Base/base-classes.hooks' - -export const normalDownload = ({ result }: { result: LazyQueryResult }) => { - let downloadUrl = result.getDownloadUrl() - // append new query param to prevent downloading cached resource - downloadUrl = - downloadUrl + - (downloadUrl.includes('?') ? '&t=' : '?t=') + - new Date().getTime().toString() - downloadUrl && window.open(downloadUrl) -} - -// in ddf-ui, we just open the download url and immediately close the dialog, so it should act as before -export const BaseDownload = ({ - lazyResults, -}: { - lazyResults: LazyQueryResult[] -}) => { - const { setProps } = useDialog() - - React.useEffect(() => { - lazyResults.forEach((lazyResult) => { - normalDownload({ result: lazyResult }) - }) - setProps({ open: false }) - }, []) - - return <> -} - -export const OverridableDownload = new Overridable(BaseDownload) - -export const useDownloadComponent = () => { - return useOverridable(OverridableDownload) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/elevated-rights/elevated-rights.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/elevated-rights/elevated-rights.tsx deleted file mode 100644 index 76a965860d7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/elevated-rights/elevated-rights.tsx +++ /dev/null @@ -1,16 +0,0 @@ -// since this doesn't have any dependencies, it's better off in it's own file -export const useElevatedRightsCookieName = 'useElevatedRights' - -export function getIsUsingElevatedRights(): boolean { - const cookie = document.cookie - .split('; ') - .find((row) => row.startsWith(`${useElevatedRightsCookieName}=`)) - if (cookie) { - return cookie.split('=')[1] === 'true' - } - return false -} - -export function setIsUsingElevatedRights(value: boolean) { - document.cookie = `${useElevatedRightsCookieName}=${value}; path=/` -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/boolean.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/boolean.tsx deleted file mode 100644 index 7f0606cfdb4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/boolean.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' - -import TextField from '@mui/material/TextField' -import { ValueTypes } from '../filter-builder/filter.structure' -import MenuItem from '@mui/material/MenuItem' - -type Props = { - value: ValueTypes['boolean'] - onChange: (val: ValueTypes['boolean']) => void -} - -const defaultValue = false - -const validateShape = ({ value, onChange }: Props) => { - if (typeof value !== 'boolean') { - onChange(defaultValue) - } -} - -export const BooleanField = ({ value, onChange }: Props) => { - React.useEffect(() => { - validateShape({ value, onChange }) - }, []) - return ( - { - onChange(e.target.value === 'true') - }} - size="small" - > - false - true - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-around.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-around.spec.tsx deleted file mode 100644 index eb518ab69cf..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-around.spec.tsx +++ /dev/null @@ -1,140 +0,0 @@ -import React from 'react' -import Enzyme, { mount } from 'enzyme' -import Adapter from '@wojtekmaj/enzyme-adapter-react-17' -Enzyme.configure({ adapter: new Adapter() }) - -import { DateAroundField } from './date-around' -import { expect } from 'chai' - -import user from '../singletons/user-instance' -import Common from '../../js/Common' -import { TimePrecision } from '@blueprintjs/datetime' - -// rely on static data when possible, but in these we can use the DateHelpers (a must for shifted date timezone testing) -const data = { - date1: { - originalISO: '2021-01-15T06:53:54.316Z', - utcISOMinutes: '2021-01-15T06:53:00.000Z', - userFormatISO: { - millisecond: '2021-01-15T03:23:54.316-03:30', - second: '2021-01-15T03:23:54-03:30', - minute: '2021-01-15T03:23-03:30', - }, - userFormat24: { - millisecond: '15 Jan 2021 03:23:54.316 -03:30', - second: '15 Jan 2021 03:23:54 -03:30', - minute: '15 Jan 2021 03:23 -03:30', - }, - userFormat12: { - millisecond: '15 Jan 2021 03:23:54.316 am -03:30', - second: '15 Jan 2021 03:23:54 am -03:30', - minute: '15 Jan 2021 03:23 am -03:30', - }, - }, -} -let wrapper: Enzyme.ReactWrapper -describe('verify date around field works', () => { - beforeEach(() => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']) - }) - afterEach(() => { - // Must unmount to stop listening to the user prefs model (the useTimePrefs() hook) - // Has to be unmounted before we set any preferences so we don't trigger any onChange - // callbacks again. - wrapper.unmount() - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']) - }) - const verifyDateRender = ( - format: string, - precision: TimePrecision, - expected: string - ) => { - return () => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()[format][precision]) - wrapper = mount( - {}} - /> - ) - expect(wrapper.render().find('input').val()).to.equal(expected) - } - } - it( - 'should render with ISO format and millisecond precision', - verifyDateRender('ISO', 'millisecond', data.date1.userFormatISO.millisecond) - ) - it( - 'should render with ISO format and second precision', - verifyDateRender('ISO', 'second', data.date1.userFormatISO.second) - ) - it( - 'should render with ISO format and minute precision', - verifyDateRender('ISO', 'minute', data.date1.userFormatISO.minute) - ) - it( - 'should render with 24hr format and millisecond precision', - verifyDateRender('24', 'millisecond', data.date1.userFormat24.millisecond) - ) - it( - 'should render with 24hr format and second precision', - verifyDateRender('24', 'second', data.date1.userFormat24.second) - ) - it( - 'should render with 24hr format and minute precision', - verifyDateRender('24', 'minute', data.date1.userFormat24.minute) - ) - it( - 'should render with 12hr format and millisecond precision', - verifyDateRender('12', 'millisecond', data.date1.userFormat12.millisecond) - ) - it( - 'should render with 12hr format and second precision', - verifyDateRender('12', 'second', data.date1.userFormat12.second) - ) - it( - 'should render with 12hr format and minute precision', - verifyDateRender('12', 'minute', data.date1.userFormat12.minute) - ) - it('calls onChange with updated value when precision changes', () => { - let updatedDate = data.date1.userFormatISO.millisecond - wrapper = mount( - { - updatedDate = updatedValue.date - }} - /> - ) - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']) - setTimeout(() => { - expect(updatedDate).to.equal(data.date1.utcISOMinutes) - }, 100) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-around.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-around.tsx deleted file mode 100644 index ac5414fb487..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-around.tsx +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { DateInput } from '@blueprintjs/datetime' -import { DateHelpers, DefaultMaxDate, DefaultMinDate } from './date-helpers' -import { MuiOutlinedInputBorderClasses } from '../theme/theme' -import useTimePrefs from './useTimePrefs' -import { ValueTypes } from '../filter-builder/filter.structure' -import Grid from '@mui/material/Grid/Grid' -import { NumberField } from './number' -import TextField from '@mui/material/TextField/TextField' -import MenuItem from '@mui/material/MenuItem/MenuItem' - -import user from '../singletons/user-instance' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' - -type DateAroundProps = { - value: ValueTypes['around'] - onChange: (val: ValueTypes['around']) => void -} - -const defaultValue = () => { - return { - date: new Date().toISOString(), - buffer: { - amount: '1', - unit: 'd', - }, - direction: 'both', - } as ValueTypes['around'] -} - -const validateDate = ({ value, onChange }: DateAroundProps) => { - if ( - !value.date || - !value.buffer || - !value.direction || - DateHelpers.Blueprint.commonProps.parseDate(value.date) === null - ) { - const newDate = DateHelpers.General.withPrecision(new Date()) - onChange({ ...defaultValue(), date: newDate.toISOString() }) - } -} - -export const DateAroundField = ({ value, onChange }: DateAroundProps) => { - const validValue = { - ...defaultValue(), - ...value, - } - const blueprintDateRef = React.useRef(null) - - useTimePrefs(() => { - const shiftedDate = DateHelpers.Blueprint.DateProps.generateValue( - value.date - ) - const unshiftedDate = - DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(shiftedDate) - onChange({ - ...validValue, - date: unshiftedDate.toISOString(), - }) - }) - - React.useEffect(() => { - validateDate({ onChange, value }) - }, []) - - return ( - - - { - onChange({ - ...validValue, - date, - }) - })} - parseDate={DateHelpers.Blueprint.commonProps.parseDate} - placeholder={DateHelpers.General.getDateFormat()} - shortcuts - timePrecision={DateHelpers.General.getTimePrecision()} - inputProps={{ - ...EnterKeySubmitProps, - }} - popoverProps={{ - boundary: 'viewport', - position: 'bottom', - onClose: () => { - setTimeout(() => { - blueprintDateRef.current?.setState({ isOpen: false }) - }, 0) - }, - }} - value={DateHelpers.Blueprint.DateProps.generateValue(validValue.date)} - /> - - - with buffer of - - - - { - if (onChange) - onChange({ - ...validValue, - buffer: { - ...validValue.buffer, - amount: val.toString(), - }, - }) - }} - validation={(val) => val > 0} - validationText="Must be greater than 0, using previous value of " - value={validValue.buffer.amount} - /> - - - { - if (onChange) - onChange({ - ...validValue, - buffer: { - ...validValue.buffer, - unit: e.target - .value as ValueTypes['around']['buffer']['unit'], - }, - }) - }} - size="small" - value={validValue.buffer.unit} - > - Seconds - Minutes - Hours - Days - Weeks - Months - Years - - - - { - if (onChange) - onChange({ - ...validValue, - direction: e.target.value as ValueTypes['around']['direction'], - }) - }} - size="small" - > - Before and After - Before - After - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-helpers.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-helpers.spec.tsx deleted file mode 100644 index eb32bc060d4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-helpers.spec.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -import { DateHelpers, ISO_8601_FORMAT_ZONED } from './date-helpers' -import user from '../singletons/user-instance' -import Common from '../../js/Common' - -user.get('user').get('preferences').set('timeZone', 'America/St_Johns') -const date = new Date() -describe('verify that transforming to and from timezone is accurate (no loss)', () => { - it(`shifts and unshifts without losing information ${date.toISOString()}`, () => { - const timeShiftedDate = - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - date.toISOString(), - ISO_8601_FORMAT_ZONED - ) - const unshiftedDate = - DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker( - timeShiftedDate - ) - expect(date.toISOString(), 'Unexpected difference').to.equal( - unshiftedDate.toISOString() - ) - }) -}) -describe('untimeshifting respects the time precision', () => { - it('milliseconds are 0 when time precision is seconds', () => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['second']) - const unshiftedDate = - DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker( - new Date('2023-04-23T22:39:46.117Z') - ) - expect(unshiftedDate.getUTCMilliseconds()).to.equal(0) - }) - it('seconds and milliseconds are 0 when time precision is minutes', () => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']) - const unshiftedDate = - DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker( - new Date('2023-04-23T22:39:46.117Z') - ) - expect(unshiftedDate.getUTCMilliseconds()).to.equal(0) - expect(unshiftedDate.getUTCSeconds()).to.equal(0) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-helpers.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-helpers.tsx deleted file mode 100644 index 228e4b10532..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-helpers.tsx +++ /dev/null @@ -1,250 +0,0 @@ -import { ValueTypes } from '../filter-builder/filter.structure' -import { IDateInputProps } from '@blueprintjs/datetime' -import { IDateRangeInputProps } from '@blueprintjs/datetime' -import user from '../singletons/user-instance' -import moment from 'moment-timezone' -import { - isDateValid, - isDayInRange, -} from '@blueprintjs/datetime/lib/esm/common/dateUtils' -import { getDefaultMaxDate } from '@blueprintjs/datetime/lib/esm/datePickerCore' -import Common from '../../js/Common' - -export const ISO_8601_FORMAT_ZONED = 'YYYY-MM-DDTHH:mm:ss.SSSZ' - -export const DefaultMinDate = new Date('Jan 1, 1900') - -export const DefaultMaxDate = moment(getDefaultMaxDate()) - .add(10, 'years') - .toDate() - -export const DateHelpers = { - General: { - getDateFormat: () => { - return user.get('user').get('preferences').get('dateTimeFormat')[ - 'datetimefmt' - ] as string - }, - getTimeZone: () => { - return user.get('user').get('preferences').get('timeZone') as string - }, - getTimePrecision: () => { - return Common.getDateTimeFormatsReverseMap()[ - DateHelpers.General.getDateFormat() - ].precision - }, - withPrecision: (date: Date) => { - switch (DateHelpers.General.getTimePrecision()) { - case 'minute': - date.setUTCSeconds(0) - // Intentional fall-through - case 'second': - date.setUTCMilliseconds(0) - } - return date - }, - }, - Blueprint: { - commonProps: { - /** - * Need some user feedback on how this works. I think it works appropriately at the moment, because it turns user input into the user timezone of choice. - * - * So if user enters time in another timezone by pasting, the input will fix it for them to show it in their chosen timezone. - * - * TLDR: this function is only called when the user manually types in a date - */ - parseDate: (input?: string) => { - try { - return DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - input || '', - DateHelpers.General.getDateFormat() - ) - } catch (err) { - return null - } - }, - /** - * Basically undoes the value shift to make sure the date is displayed in user's chosen timezone - */ - formatDate: (date: Date) => { - try { - const unshiftedDate = - DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(date) - return moment(unshiftedDate) - .tz(DateHelpers.General.getTimeZone()) - .format(DateHelpers.General.getDateFormat()) - } catch (err) { - return '' - } - }, - isValid: ( - date: Date, - minDate: Date = DefaultMinDate, - maxDate: Date = DefaultMaxDate - ) => { - return ( - date && isDateValid(date) && isDayInRange(date, [minDate, maxDate]) - ) - }, - }, - DateProps: { - generateOnChange: (onChange: (value: string) => void) => { - return ((selectedDate, isUserChange) => { - if (selectedDate && isUserChange) { - const unshiftedDate = - DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker( - selectedDate - ) - onChange(unshiftedDate.toISOString()) - } - }) as IDateInputProps['onChange'] - }, - generateValue: (value: string, minDate?: Date, maxDate?: Date) => - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - value, - ISO_8601_FORMAT_ZONED, - minDate, - maxDate - ), - }, - DateRangeProps: { - generateOnChange: (onChange: (value: ValueTypes['during']) => void) => { - return (([start, end]) => { - if (onChange) { - onChange({ - start: start - ? DateHelpers.Blueprint.converters - .UntimeshiftFromDatePicker(start) - .toISOString() - : '', - end: end - ? DateHelpers.Blueprint.converters - .UntimeshiftFromDatePicker(end) - .toISOString() - : '', - }) - } - }) as IDateRangeInputProps['onChange'] - }, - // null is how the blueprint datepicker represents an empty or invalid date - generateValue: ( - value: ValueTypes['during'], - minDate?: Date, - maxDate?: Date - ) => - [ - value.start - ? DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - value.start, - ISO_8601_FORMAT_ZONED, - minDate, - maxDate - ) - : null, - value.end - ? DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - value.end, - ISO_8601_FORMAT_ZONED, - minDate, - maxDate - ) - : null, - ] as IDateRangeInputProps['value'], - }, - converters: { - /** - * The datepicker from blueprint doesn't handle timezones. So if we want to make it feel like the user is in their - * chosen timezone, we have to shift the date ourselves. So what we do is pretend the value is utc, then calculate the offset of the computer's local timezone and the timezone the user wants to create a total offset. This is because the datepicker internally - * uses date, so we have to pretend we're in local time. We then take that utc date and add the totaloffset, then tell the datepicker that is our value. As a result, when the datepicker internally uses Date it will shift back to the correct timezone. - * - * TLDR: Use this on a date string formatted in the manner specified by the provided format going INTO the blueprint datepicker (the value prop). Use the sibling function UntimeshiftFromDatePicker to reverse this. - */ - TimeshiftForDatePicker: ( - value: string, - format: string, - minDate?: Date, - maxDate?: Date - ): Date => { - try { - const unshiftedDate = moment(value, format) - if (!unshiftedDate.isValid()) { - return DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - moment.utc().toISOString(), - ISO_8601_FORMAT_ZONED - ) - } - switch (DateHelpers.General.getTimePrecision()) { - case 'minute': - unshiftedDate.seconds(0) - // Intentional fall-through - case 'second': - unshiftedDate.milliseconds(0) - } - const utcOffsetMinutesLocal = new Date().getTimezoneOffset() - const utcOffsetMinutesTimezone = moment - .tz(value, format, DateHelpers.General.getTimeZone()) // pass in the value, otherwise it won't account for daylight savings time! - .utcOffset() - const totalOffset = utcOffsetMinutesLocal + utcOffsetMinutesTimezone - const shiftedDate = unshiftedDate.add(totalOffset, 'minutes') - if ( - shiftedDate.isValid() && - DateHelpers.Blueprint.commonProps.isValid( - shiftedDate.toDate(), - minDate, - maxDate - ) - ) { - return shiftedDate.toDate() - } else { - return DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - moment.utc().toISOString(), - ISO_8601_FORMAT_ZONED - ) - } - } catch (err) { - console.error(err) - return DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - moment.utc().toISOString(), - ISO_8601_FORMAT_ZONED - ) - } - }, - /** - * The form within the datepicker is Timeshifted, so we have to untimeshift things as they come out of the datepicker. - * See TimeshiftForDatePicker, since we're undoing what we do there - * - * TLDR: Use this on the Date object coming out of the Blueprint datepicker (only if you used the sibling function to format the value going in of course, since it reverses it). That means the use this in the onChange prop and the formatDate prop. - */ - UntimeshiftFromDatePicker: (value: Date) => { - try { - const shiftedDate = moment(value) - switch (DateHelpers.General.getTimePrecision()) { - case 'minute': - shiftedDate.seconds(0) - // Intentional fall-through - case 'second': - shiftedDate.milliseconds(0) - } - const utcOffsetMinutesLocal = new Date().getTimezoneOffset() - const utcOffsetMinutesTimezone = moment - .tz(value, DateHelpers.General.getTimeZone()) // pass in the value, otherwise it won't account for daylight savings time! - .utcOffset() - const totalOffset = utcOffsetMinutesLocal + utcOffsetMinutesTimezone - return shiftedDate.subtract(totalOffset, 'minutes').toDate() - } catch (err) { - console.error(err) - return DateHelpers.General.withPrecision(new Date()) - } - }, - /** - * The output from the onChange is an ISOString. This converts it to a string in the user's timezone and preferred format. - * - * TLDR: Use this on the string from the onChange when you want to display it. - */ - ISOtoFormattedString: (value: string) => { - const date = DateHelpers.Blueprint.DateProps.generateValue(value) - return DateHelpers.Blueprint.commonProps.formatDate(date) - }, - }, - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-range.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-range.spec.tsx deleted file mode 100644 index 477d2f6b180..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-range.spec.tsx +++ /dev/null @@ -1,364 +0,0 @@ -import React from 'react' -import Enzyme, { mount } from 'enzyme' -import Adapter from '@wojtekmaj/enzyme-adapter-react-17' -Enzyme.configure({ adapter: new Adapter() }) -import { expect } from 'chai' - -import { DateRangeField, defaultValue } from './date-range' -import moment from 'moment' - -import user from '../singletons/user-instance' -import { ValueTypes } from '../filter-builder/filter.structure' -import { DateHelpers, ISO_8601_FORMAT_ZONED } from './date-helpers' -import Common from '../../js/Common' -import { TimePrecision } from '@blueprintjs/datetime' - -const UncontrolledDateRangeField = ({ - startingValue, -}: { - startingValue: ValueTypes['during'] -}) => { - const [value, setValue] = React.useState(startingValue) - return ( - { - setValue(update) - }} - /> - ) -} - -// rely on static data when possible, but in these we can use the DateHelpers (a must for shifted date timezone testing) -const data = { - date1: { - timezone: 'America/St_Johns', - originalISO: '2021-01-15T06:53:54.316Z', - originalDate: new Date('2021-01-15T06:53:54.316Z'), - utcISOMinutes: '2021-01-15T06:53:00.000Z', - userFormatISO: { - millisecond: '2021-01-15T03:23:54.316-03:30', - second: '2021-01-15T03:23:54-03:30', - minute: '2021-01-15T03:23-03:30', - }, - userFormat24: { - millisecond: '15 Jan 2021 03:23:54.316 -03:30', - second: '15 Jan 2021 03:23:54 -03:30', - minute: '15 Jan 2021 03:23 -03:30', - }, - userFormat12: { - millisecond: '15 Jan 2021 03:23:54.316 am -03:30', - second: '15 Jan 2021 03:23:54 am -03:30', - minute: '15 Jan 2021 03:23 am -03:30', - }, - }, - date2: { - timezone: 'America/St_Johns', - userSuppliedInput: '15 Jan 2021 03:24:54.316 -02:30', - parsedOutput: '15 Jan 2021 02:24:54.316 -03:30', - }, - date3: { - timezone: 'Etc/UTC', - maxFuture: moment().add(10, 'years').toISOString(), - disallowedFuture: moment().add(11, 'years').toISOString(), - }, - date4: { - timezone: 'America/St_Johns', - originalISO: '2021-01-14T06:53:54.316Z', - originalDate: new Date('2021-01-14T06:53:54.316Z'), - utcISOMinutes: '2021-01-14T06:53:00.000Z', - userFormatISO: { - millisecond: '2021-01-14T03:23:54.316-03:30', - second: '2021-01-14T03:23:54-03:30', - minute: '2021-01-14T03:23-03:30', - }, - userFormat24: { - millisecond: '14 Jan 2021 03:23:54.316 -03:30', - second: '14 Jan 2021 03:23:54 -03:30', - minute: '14 Jan 2021 03:23 -03:30', - }, - userFormat12: { - millisecond: '14 Jan 2021 03:23:54.316 am -03:30', - second: '14 Jan 2021 03:23:54 am -03:30', - minute: '14 Jan 2021 03:23 am -03:30', - }, - }, - // this is useful for testing daylist savings (date 1 is pre, this is post) - date5: { - timezone: 'America/St_Johns', - originalISO: '2021-04-15T05:53:54.316Z', // use the converter to find the appropriate shifted date - }, -} -let wrapper: Enzyme.ReactWrapper -describe('verify date range field works', () => { - before(() => { - user.get('user').get('preferences').set('timeZone', data.date1.timezone) - }) - after(() => { - user.get('user').get('preferences').set('timeZone', 'Etc/UTC') - }) - beforeEach(() => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']) - }) - afterEach(() => { - // Must unmount to stop listening to the user prefs model (the useTimePrefs() hook) - // Has to be unmounted before we set any preferences so we don't trigger any onChange - // callbacks again. - wrapper.unmount() - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']) - }) - it(`should not allow overlapping dates`, () => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']) - wrapper = mount( - { - // verify these are one day apart, as should happen when fed overlapping dates or invalid values - const start = new Date(validValue.start) - const end = new Date(validValue.end) - expect(start.getDate()).to.equal(end.getDate() - 1) - }} - /> - ) - }) - const verifyDateRender = ( - format: string, - precision: TimePrecision, - expectedStart: string, - expectedEnd: string - ) => { - return () => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()[format][precision]) - wrapper = mount( - {}} - /> - ) - expect(wrapper.render().find('input').first().val()).to.equal( - expectedStart - ) - expect(wrapper.render().find('input').last().val()).to.equal(expectedEnd) - } - } - it( - 'should render with ISO format and millisecond precision', - verifyDateRender( - 'ISO', - 'millisecond', - data.date4.userFormatISO.millisecond, - data.date1.userFormatISO.millisecond - ) - ) - it( - 'should render with ISO format and second precision', - verifyDateRender( - 'ISO', - 'second', - data.date4.userFormatISO.second, - data.date1.userFormatISO.second - ) - ) - it( - 'should render with ISO format and minute precision', - verifyDateRender( - 'ISO', - 'minute', - data.date4.userFormatISO.minute, - data.date1.userFormatISO.minute - ) - ) - it( - 'should render with 24hr format and millisecond precision', - verifyDateRender( - '24', - 'millisecond', - data.date4.userFormat24.millisecond, - data.date1.userFormat24.millisecond - ) - ) - it( - 'should render with 24hr format and second precision', - verifyDateRender( - '24', - 'second', - data.date4.userFormat24.second, - data.date1.userFormat24.second - ) - ) - it( - 'should render with 24hr format and minute precision', - verifyDateRender( - '24', - 'minute', - data.date4.userFormat24.minute, - data.date1.userFormat24.minute - ) - ) - it( - 'should render with 12hr format and millisecond precision', - verifyDateRender( - '12', - 'millisecond', - data.date4.userFormat12.millisecond, - data.date1.userFormat12.millisecond - ) - ) - it( - 'should render with 12hr format and second precision', - verifyDateRender( - '12', - 'second', - data.date4.userFormat12.second, - data.date1.userFormat12.second - ) - ) - it( - 'should render with 12hr format and minute precision', - verifyDateRender( - '12', - 'minute', - data.date4.userFormat12.minute, - data.date1.userFormat12.minute - ) - ) - it(`should parse with user's pref timezone`, () => { - // gist is user enters a time in a diff time from their pref, on blur we adjust it to their preference - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['24']['millisecond']) - - wrapper = mount( - - ) - const input = wrapper.find('input') - input.first().simulate('change', { - target: { value: data.date2.userSuppliedInput }, - }) - input.last().simulate('change', { - target: { value: data.date2.userSuppliedInput }, - }) - expect(input.first().render().val()).to.equal(data.date2.parsedOutput) - expect(input.last().render().val()).to.equal(data.date2.parsedOutput) - }) - it(`should generate appropriately shifted ISO strings on change (DST)`, () => { - wrapper = mount( - { - expect(updatedValue.start).to.equal(data.date5.originalISO) - expect(updatedValue.end).to.equal(data.date5.originalISO) - }} - /> - ) - const dateFieldInstance = wrapper.children().children().get(0) - dateFieldInstance.props.onChange( - [ - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - data.date5.originalISO, - ISO_8601_FORMAT_ZONED - ), - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - data.date5.originalISO, - ISO_8601_FORMAT_ZONED - ), - ], - true - ) - }) - it(`should generate appropriately shifted ISO strings on change`, () => { - wrapper = mount( - { - expect(updatedValue.start).to.equal(data.date4.originalISO) - expect(updatedValue.end).to.equal(data.date5.originalISO) - }} - /> - ) - const dateFieldInstance = wrapper.children().children().get(0) - dateFieldInstance.props.onChange( - [ - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - data.date4.originalISO, - ISO_8601_FORMAT_ZONED - ), - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - data.date5.originalISO, - ISO_8601_FORMAT_ZONED - ), - ], - true - ) - }) - it(`should not allow dates beyond max future`, () => { - wrapper = mount( - { - expect(updatedValue.start).to.not.equal(data.date3.maxFuture) - }} - /> - ) - const input = wrapper.find('input').first() - input.simulate('change', { - target: { value: data.date3.disallowedFuture }, - }) - }) - it(`should allow dates up to max future`, () => { - wrapper = mount( - { - expect(updatedValue.start).to.equal(data.date3.maxFuture) - }} - /> - ) - const input = wrapper.find('input').first() - input.simulate('change', { - target: { value: data.date3.maxFuture }, - }) - }) - it('calls onChange with updated value when precision changes', () => { - wrapper = mount( - { - expect(updatedValue.start).to.equal(data.date4.utcISOMinutes) - expect(updatedValue.end).to.equal(data.date1.utcISOMinutes) - }} - /> - ) - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-range.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-range.tsx deleted file mode 100644 index 3196321b2c1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-range.tsx +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { DateRangeInput, IDateRangeInputProps } from '@blueprintjs/datetime' -import { DateHelpers, DefaultMaxDate, DefaultMinDate } from './date-helpers' -import { ValueTypes } from '../filter-builder/filter.structure' -import { MuiOutlinedInputBorderClasses } from '../theme/theme' -import useTimePrefs from './useTimePrefs' - -import user from '../singletons/user-instance' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' -import FormHelperText from '@mui/material/FormHelperText' -import LinearProgress from '@mui/material/LinearProgress' - -type Props = { - value: ValueTypes['during'] - onChange: (value: ValueTypes['during']) => void - /** - * Override if you absolutely must - */ - BPDateRangeProps?: Partial -} - -export function defaultValue() { - const end = DateHelpers.General.withPrecision(new Date()) - const start = DateHelpers.General.withPrecision( - new Date(end.valueOf() - 86_400_000) - ) // start and end can't be equal or the backend will throw a fit - return { - start: start.toISOString(), - end: end.toISOString(), - } -} - -/** - * Used in the below components to test values for validity and to provide a message to the user if they are invalid. - */ -function isValidValue(value: Props['value']): { - valid: boolean - message: string -} { - if (value && value.start && value.end) { - // end has to be after start too, so convert from iso and check - const startDate = new Date(value.start) - const endDate = new Date(value.end) - return { - valid: startDate < endDate, - message: - 'Start date must be before end date, using previous valid values:', - } - } else { - return { - valid: false, - message: 'Start and end date must be set, using previous valid values:', - } - } -} - -/** - * There are two things to check before passing values upwards to parent components through the onChange. - * 1. Start and end date need to be valid dates. - * 2. Start date must be before end date. (cannot be equal either) - * - * Given those possibilities, we can construct a message to try and prod the user as to why a value is invalid. - */ -function useLocalValue({ value, onChange }: Props) { - const [localValue, setLocalValue] = React.useState(value) // since we don't get here with an invalid value, we can just set it to the value - const [hasValidationIssues, setHasValidationIssues] = React.useState(false) - const [constructedValidationText, setConstructedValidationText] = - React.useState(null) - - React.useEffect(() => { - const validity = isValidValue(localValue) - if (onChange && validity.valid) { - setHasValidationIssues(false) - setConstructedValidationText('') - if (value !== localValue) onChange(localValue) - } else { - setConstructedValidationText( - <> -
{validity.message}
-
start: {value.start}
-
end: {value.end}
- - ) - setHasValidationIssues(true) - } - }, [localValue, value]) - - return { - localValue, - setLocalValue, - hasValidationIssues, - constructedValidationText, - } -} - -/** - * If the initial value is invalid, we immediately call the onChange to make sure we start with a valid value. - */ -function useInitialValueValidation({ value, onChange }: Props) { - React.useEffect(() => { - if (!isValidValue(value).valid) { - onChange(defaultValue()) - } - }, []) -} - -/** - * This component will always have a valid value (start and end date set and start < end), and onChange will never get an invalid value - */ -const DateRangeFieldWithoutInitialValidation = ({ - value, - onChange, - BPDateRangeProps, -}: Props) => { - const { - localValue, - setLocalValue, - hasValidationIssues, - constructedValidationText, - } = useLocalValue({ value, onChange }) - useTimePrefs(() => { - const shiftedDates = - DateHelpers.Blueprint.DateRangeProps.generateValue(value) // as said above, this will always be valid, so no need to fret on converting - setLocalValue({ - start: DateHelpers.Blueprint.converters - .UntimeshiftFromDatePicker(shiftedDates![0]!) - .toISOString(), - end: DateHelpers.Blueprint.converters - .UntimeshiftFromDatePicker(shiftedDates![1]!) - .toISOString(), - }) - }) - return ( - <> - { - setLocalValue(value) - } - )} - popoverProps={{ - boundary: 'viewport', - position: 'bottom', - }} - parseDate={DateHelpers.Blueprint.commonProps.parseDate} - shortcuts - timePrecision={DateHelpers.General.getTimePrecision()} - placeholder={DateHelpers.General.getDateFormat()} - value={DateHelpers.Blueprint.DateRangeProps.generateValue(localValue)} - {...BPDateRangeProps} - /> - {hasValidationIssues ? ( - <> - - {constructedValidationText} - - - ) : null} - - ) -} - -/** - * By updating invalid starting values before we go into the above component, we can make sure we always have a valid value to fall back to. - */ -export const DateRangeField = ({ - value, - onChange, - BPDateRangeProps, -}: Props) => { - useInitialValueValidation({ value, onChange, BPDateRangeProps }) - const valueValidity = isValidValue(value) - if (!valueValidity.valid) { - return - } - return ( - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-relative.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-relative.tsx deleted file mode 100644 index f82eb0dbded..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-relative.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import * as React from 'react' -import Grid from '@mui/material/Grid' -import TextField from '@mui/material/TextField' -import MenuItem from '@mui/material/MenuItem' -import { NumberField } from './number' -import { ValueTypes } from '../filter-builder/filter.structure' - -type Props = { - value: ValueTypes['relative'] - onChange: (val: ValueTypes['relative']) => void -} - -const defaultValue = { - last: '1', - unit: 'm', -} as ValueTypes['relative'] - -const validateShape = ({ value, onChange }: Props) => { - if (isInvalid({ value, onChange })) { - onChange(defaultValue) - } -} - -const isInvalid = ({ value }: Props) => { - return value.last === undefined || value.unit === undefined -} - -export const DateRelativeField = ({ value, onChange }: Props) => { - const validValue = { - ...defaultValue, - ...value, - } - React.useEffect(() => { - validateShape({ value, onChange }) - }, []) - if (isInvalid({ value, onChange })) { - // for most cases it doesn't matter if we render with invalid, but the select will immediately cause onChange which has some weird side effects - return null - } - return ( - - - { - if (onChange) - onChange({ - ...validValue, - last: val.toString(), - }) - }} - validation={(val) => val > 0} - validationText="Must be greater than 0, using previous value of " - value={validValue.last} - /> - - - { - if (onChange) - onChange({ - ...validValue, - unit: e.target.value as ValueTypes['relative']['unit'], - }) - }} - size="small" - value={validValue.unit} - > - Seconds - Minutes - Hours - Days - Weeks - Months - Years - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-time-picker.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-time-picker.tsx deleted file mode 100644 index 1fba5ab08e4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date-time-picker.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import * as React from 'react' -import { IDateInputProps } from '@blueprintjs/datetime' -import TextField, { TextFieldProps } from '@mui/material/TextField' -import { DateField } from './date' -import CalendarIcon from '@mui/icons-material/Event' -import ClearIcon from '@mui/icons-material/Clear' -import { hot } from 'react-hot-loader' -import InputAdornment from '@mui/material/InputAdornment' - -type DateFieldProps = { - value: string | null - onChange: (value: string | null) => void - isNullable?: boolean - TextFieldProps?: Partial - /** - * Override if you absolutely must. - * Take extra caution when overriding minDate and maxDate. - * Overriding minDate and maxDate will work as a visual overlay which can only be used - * to restrict which dates a user can input- but can't be used to give the users a lower/higher - * min or max. The true min/max is set in dateHelpers. We should probably update this at some - * point to be passed down by this component. - */ - BPDateProps?: Partial -} - -/** - * DateTimePicker that combines Mui TextField with BlueprintJs DatePicker - * - * For now it's meant to work with an outlined text field, but we can add support for other styles if we want. - * - * By changing the inputComponent, we avoid weird focusing issues, while still allowing use of all the other niceties (helperText) of TextField - */ -const DateTimePicker = ({ - value, - onChange, - isNullable, - TextFieldProps, - BPDateProps, -}: DateFieldProps) => { - const inputRef = React.useRef(null) - /** - * We want to avoid causing the TextField below to percieve a change to inputComponent when possible, because that mucks with focus. - * - * We stringify the BPDateProps to make life easier for devs, since they will likely pass a plain object. If they do and their component rerenders, - * this memo would trigger even though they think they didn't change BPDateProps (the object is different though!). So we stringify to make sure we - * only pick up real changes. - */ - const inputComponent = React.useMemo(() => { - let classes = 'px-[14px] py-[8.5px]' - - return React.forwardRef((props: any, ref: any) => { - return ( - - ) - }) - }, [JSON.stringify(BPDateProps)]) - - return ( - { - if (inputRef.current) { - inputRef.current.querySelector('input')?.focus() - } - }} - > - {isNullable && ( - { - onChange(null) - e.stopPropagation() - }} - /> - )} - - - ), - }} - {...TextFieldProps} - /> - ) -} - -export default hot(module)(DateTimePicker) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date.spec.tsx deleted file mode 100644 index dd7d7fb9881..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date.spec.tsx +++ /dev/null @@ -1,248 +0,0 @@ -import React from 'react' -import Enzyme, { mount } from 'enzyme' -import Adapter from '@wojtekmaj/enzyme-adapter-react-17' -Enzyme.configure({ adapter: new Adapter() }) - -import { DateField } from './date' -import moment from 'moment' -import { expect } from 'chai' - -import user from '../singletons/user-instance' -import { DateHelpers, ISO_8601_FORMAT_ZONED } from './date-helpers' -import Common from '../../js/Common' -import { TimePrecision } from '@blueprintjs/datetime' - -/** - * Useful for seeing if updates are called correctly. - */ -const UncontrolledDateField = ({ - startingValue, -}: { - startingValue: string -}) => { - const [value, setValue] = React.useState(startingValue) - return ( - { - setValue(update) - }} - BPDateProps={{ - inputProps: { - name: 'test', - }, - }} - /> - ) -} - -// rely on static data when possible, but in these we can use the DateHelpers (a must for shifted date timezone testing) -const data = { - date1: { - timezone: 'America/St_Johns', - originalISO: '2021-01-15T06:53:54.316Z', - originalDate: new Date('2021-01-15T06:53:54.316Z'), - utcISOMinutes: '2021-01-15T06:53:00.000Z', - userFormatISO: { - millisecond: '2021-01-15T03:23:54.316-03:30', - second: '2021-01-15T03:23:54-03:30', - minute: '2021-01-15T03:23-03:30', - }, - userFormat24: { - millisecond: '15 Jan 2021 03:23:54.316 -03:30', - second: '15 Jan 2021 03:23:54 -03:30', - minute: '15 Jan 2021 03:23 -03:30', - }, - userFormat12: { - millisecond: '15 Jan 2021 03:23:54.316 am -03:30', - second: '15 Jan 2021 03:23:54 am -03:30', - minute: '15 Jan 2021 03:23 am -03:30', - }, - }, - date2: { - timezone: 'America/St_Johns', - userSuppliedInput: '15 Jan 2021 03:24:54.316 -02:30', - parsedOutput: '15 Jan 2021 02:24:54.316 -03:30', - }, - date3: { - timezone: 'Etc/UTC', - maxFuture: moment().add(10, 'years').toISOString(), - disallowedFuture: moment().add(11, 'years').toISOString(), - }, - // this is useful for testing daylist savings (date 1 is pre, this is post) - date4: { - timezone: 'America/St_Johns', - originalISO: '2021-04-15T05:53:54.316Z', - }, -} -let wrapper: Enzyme.ReactWrapper -describe('verify date field works', () => { - before(() => { - user.get('user').get('preferences').set('timeZone', data.date1.timezone) - }) - after(() => { - user.get('user').get('preferences').set('timeZone', 'Etc/UTC') - }) - beforeEach(() => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']) - }) - afterEach(() => { - // Must unmount to stop listening to the user prefs model (the useTimePrefs() hook) - // Has to be unmounted before we set any preferences so we don't trigger any onChange - // callbacks again. - wrapper.unmount() - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['millisecond']) - }) - const verifyDateRender = ( - format: string, - precision: TimePrecision, - expected: string - ) => { - return () => { - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()[format][precision]) - wrapper = mount( - {}} /> - ) - expect(wrapper.render().find('input').val()).to.equal(expected) - } - } - it( - 'should render with ISO format and millisecond precision', - verifyDateRender('ISO', 'millisecond', data.date1.userFormatISO.millisecond) - ) - it( - 'should render with ISO format and second precision', - verifyDateRender('ISO', 'second', data.date1.userFormatISO.second) - ) - it( - 'should render with ISO format and minute precision', - verifyDateRender('ISO', 'minute', data.date1.userFormatISO.minute) - ) - it( - 'should render with 24hr format and millisecond precision', - verifyDateRender('24', 'millisecond', data.date1.userFormat24.millisecond) - ) - it( - 'should render with 24hr format and second precision', - verifyDateRender('24', 'second', data.date1.userFormat24.second) - ) - it( - 'should render with 24hr format and minute precision', - verifyDateRender('24', 'minute', data.date1.userFormat24.minute) - ) - it( - 'should render with 12hr format and millisecond precision', - verifyDateRender('12', 'millisecond', data.date1.userFormat12.millisecond) - ) - it( - 'should render with 12hr format and second precision', - verifyDateRender('12', 'second', data.date1.userFormat12.second) - ) - it( - 'should render with 12hr format and minute precision', - verifyDateRender('12', 'minute', data.date1.userFormat12.minute) - ) - it(`should parse with user's pref timezone`, () => { - // gist is user enters a time in a diff time from their pref, on blur we adjust it to their preference - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['24']['millisecond']) - - wrapper = mount( - - ) - const input = wrapper.find('input').at(0) - input.simulate('change', { - target: { value: data.date2.userSuppliedInput }, - }) - expect(input.render().val()).to.equal(data.date2.parsedOutput) - }) - it(`should generate appropriately shifted ISO strings on change (DST)`, () => { - wrapper = mount( - { - expect(updatedValue).to.equal(data.date4.originalISO) - }} - /> - ) - const dateFieldInstance = wrapper.children().get(0) - dateFieldInstance.props.onChange( - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - data.date4.originalISO, - ISO_8601_FORMAT_ZONED - ), - true - ) - }) - it(`should generate appropriately shifted ISO strings on change`, () => { - wrapper = mount( - { - expect(updatedValue).to.equal(data.date1.originalISO) - }} - /> - ) - const dateFieldInstance = wrapper.children().get(0) - dateFieldInstance.props.onChange( - DateHelpers.Blueprint.converters.TimeshiftForDatePicker( - data.date1.originalISO, - ISO_8601_FORMAT_ZONED - ), - true - ) - }) - it(`should not allow dates beyond max future`, () => { - wrapper = mount( - { - expect(updatedValue).to.not.equal(data.date3.maxFuture) - }} - /> - ) - const input = wrapper.find('input').at(0) - input.simulate('change', { - target: { value: data.date3.disallowedFuture }, - }) - }) - it(`should allow dates up to max future`, () => { - wrapper = mount( - { - expect(updatedValue).to.equal(data.date3.maxFuture) - }} - /> - ) - const input = wrapper.find('input').at(0) - input.simulate('change', { - target: { value: data.date3.maxFuture }, - }) - }) - it('calls onChange with updated value when precision changes', () => { - wrapper = mount( - { - expect(updatedValue).to.equal(data.date1.utcISOMinutes) - }} - /> - ) - user - .get('user') - .get('preferences') - .set('dateTimeFormat', Common.getDateTimeFormats()['ISO']['minute']) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date.tsx deleted file mode 100644 index 2db66f4c4d2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/date.tsx +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { useRef } from 'react' -import { DateInput, IDateInputProps } from '@blueprintjs/datetime' - -import { - DateHelpers, - DefaultMaxDate, - DefaultMinDate, - ISO_8601_FORMAT_ZONED, -} from './date-helpers' -import { MuiOutlinedInputBorderClasses } from '../theme/theme' -import useTimePrefs from './useTimePrefs' - -import user from '../singletons/user-instance' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' - -import moment from 'moment-timezone' - -type DateFieldProps = { - value: string - onChange: (value: string) => void - /** - * Override if you absolutely must - */ - BPDateProps?: Partial - isNullable?: boolean -} - -const validateDate = ({ value, onChange, isNullable }: DateFieldProps) => { - if (value === null && isNullable) return - - const date = moment(value, ISO_8601_FORMAT_ZONED) - if (!date.isValid()) { - const newDate = DateHelpers.General.withPrecision(new Date()) - onChange(newDate.toISOString()) - } -} - -export const DateField = ({ - value, - onChange, - BPDateProps, - isNullable, -}: DateFieldProps) => { - const blueprintDateRef = useRef(null) - - useTimePrefs(() => { - const shiftedDate = DateHelpers.Blueprint.DateProps.generateValue(value) - const unshiftedDate = - DateHelpers.Blueprint.converters.UntimeshiftFromDatePicker(shiftedDate) - onChange(unshiftedDate.toISOString()) - }) - React.useEffect(() => { - validateDate({ onChange, value, isNullable }) - }, []) - - return ( - <> - { - onChange(value) - })} - parseDate={DateHelpers.Blueprint.commonProps.parseDate} - placeholder={DateHelpers.General.getDateFormat()} - shortcuts - timePrecision={DateHelpers.General.getTimePrecision()} - outOfRangeMessage="Out of range" - timePickerProps={{ - useAmPm: user.getAmPmDisplay(), - }} - inputProps={{ - ...EnterKeySubmitProps, - }} - popoverProps={{ - boundary: 'viewport', - position: 'bottom', - onClose: () => { - setTimeout(() => { - blueprintDateRef.current?.setState({ isOpen: false }) - }, 0) - }, - }} - {...(value - ? { - value: DateHelpers.Blueprint.DateProps.generateValue(value), - } - : {})} - {...BPDateProps} - /> - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/float.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/float.tsx deleted file mode 100644 index 139cb0de713..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/float.tsx +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' - -import { ValueTypes } from '../filter-builder/filter.structure' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' -import { NumberField } from './number' - -type FloatFieldProps = { - value: ValueTypes['float'] - onChange: (val: ValueTypes['float']) => void -} - -const defaultValue = 0 - -const validateShape = ({ value, onChange }: FloatFieldProps) => { - if (typeof value !== 'number') { - onChange(defaultValue) - } -} - -export const FloatField = ({ value, onChange }: FloatFieldProps) => { - React.useEffect(() => { - validateShape({ value, onChange }) - }, []) - return ( - { - onChange(e) - }} - {...EnterKeySubmitProps} - /> - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/integer.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/integer.tsx deleted file mode 100644 index 0f0411bac7a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/integer.tsx +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' - -import { ValueTypes } from '../filter-builder/filter.structure' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' -import { NumberField } from './number' - -type IntegerFieldProps = { - value: ValueTypes['integer'] - onChange: (val: ValueTypes['integer']) => void -} - -const defaultValue = 0 - -const validateShape = ({ value, onChange }: IntegerFieldProps) => { - if (typeof value !== 'number') { - onChange(defaultValue) - } -} - -export const IntegerField = ({ value, onChange }: IntegerFieldProps) => { - React.useEffect(() => { - validateShape({ value, onChange }) - }, []) - return ( - { - onChange(e) - }} - {...EnterKeySubmitProps} - /> - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/near.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/near.tsx deleted file mode 100644 index 1acb68f690a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/near.tsx +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' - -import Grid from '@mui/material/Grid' -import { ValueTypes } from '../filter-builder/filter.structure' -import { CustomInputOrDefault } from '../../react-component/filter/filter-input/customInputOrDefault' -import { NumberField } from './number' - -type NearFieldProps = { - value: Partial - onChange: (val: ValueTypes['proximity']) => void -} - -const defaultValue = { - first: '', - second: '', - distance: 2, -} as ValueTypes['proximity'] - -const validateShape = ({ value, onChange }: NearFieldProps) => { - if ( - value.distance === undefined || - value.first === undefined || - value.second === undefined - ) { - onChange(defaultValue) - } -} - -export const NearField = ({ value, onChange }: NearFieldProps) => { - const validValue = { - ...defaultValue, - ...value, - } - React.useEffect(() => { - validateShape({ value, onChange }) - }, []) - return ( - - - { - onChange({ - ...validValue, - second: val, - }) - }} - props={{ - fullWidth: true, - variant: 'outlined', - type: 'text', - size: 'small', - }} - /> - - - within - - - { - onChange({ - ...validValue, - distance: val, - }) - }} - validation={(val) => val > 0} - validationText="Must be greater than 0, using previous value of " - /> - - - of - - - { - onChange({ - ...validValue, - first: val, - }) - }} - props={{ - fullWidth: true, - variant: 'outlined', - type: 'text', - size: 'small', - }} - /> - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/number-range.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/number-range.tsx deleted file mode 100644 index 9fc791a667e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/number-range.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' - -import Grid from '@mui/material/Grid' -import { ValueTypes } from '../filter-builder/filter.structure' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' -import { NumberField } from './number' - -type NumberRangeFieldProps = { - value: Partial - onChange: (val: ValueTypes['between']) => void - type: 'integer' | 'float' -} - -const defaultValue = { - start: 0, - end: 1, -} as ValueTypes['between'] - -const validateShape = ({ value, onChange }: NumberRangeFieldProps) => { - if (value.start === undefined || value.end === undefined) { - onChange(defaultValue) - } -} - -export const NumberRangeField = ({ - value, - onChange, - type, -}: NumberRangeFieldProps) => { - const validValue = { - ...defaultValue, - ...value, - } - React.useEffect(() => { - validateShape({ value, onChange, type }) - }, []) - return ( - - -
from
-
- - { - onChange({ - ...validValue, - start: val, - }) - }} - {...EnterKeySubmitProps} - /> - - -
to
-
- - { - onChange({ - ...validValue, - end: val, - }) - }} - {...EnterKeySubmitProps} - /> - -
- ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/number.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/number.tsx deleted file mode 100644 index c5924e443a1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/number.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import * as React from 'react' -import TextField, { TextFieldProps } from '@mui/material/TextField' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' - -type LocalValueType = number | '' | '-' - -type Props = { - value?: string - onChange?: (val: number) => void - type: 'integer' | 'float' - TextFieldProps?: TextFieldProps - validation?: (val: number) => boolean - validationText?: string -} - -const defaultValue = 1 - -function parseValue(value: string, type: Props['type']) { - let parsedValue = defaultValue - if (type === 'integer') { - parsedValue = parseInt(value) - } else { - parsedValue = parseFloat(value) - } - if (isNaN(parsedValue)) { - return defaultValue - } else { - return parsedValue - } -} - -function useLocalValue({ - value, - onChange, - type, - validation = () => true, - validationText = 'Must be a valid number, using previous value of ', -}: Props) { - const [localValue, setLocalValue] = React.useState( - parseValue(value || '1', type) - ) - const [hasValidationIssues, setHasValidationIssues] = React.useState(false) - const [constructedValidationText, setConstructedValidationText] = - React.useState('') - - React.useEffect(() => { - if ( - onChange && - typeof localValue === 'number' && - !isNaN(localValue) && - validation(localValue) - ) { - setHasValidationIssues(false) - onChange(localValue) - } else { - setConstructedValidationText(validationText + value) - setHasValidationIssues(true) - } - }, [localValue, value]) - return { - localValue, - setLocalValue, - hasValidationIssues, - constructedValidationText, - } -} - -export const NumberField = ({ - value, - onChange, - type, - validation, - validationText, - TextFieldProps, -}: Props) => { - const { - localValue, - setLocalValue, - hasValidationIssues, - constructedValidationText, - } = useLocalValue({ value, onChange, type, validation, validationText }) - return ( - { - if (onChange) { - const inputValue = e.target.value - if (inputValue === '' || inputValue === '-') { - setLocalValue(inputValue) - } else if (type === 'integer') { - setLocalValue(parseInt(inputValue)) - } else { - setLocalValue(parseFloat(inputValue)) - } - } - }} - helperText={hasValidationIssues ? constructedValidationText : ''} - FormHelperTextProps={{ - error: true, - }} - {...TextFieldProps} - {...EnterKeySubmitProps} - /> - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/resource-size-range.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/resource-size-range.tsx deleted file mode 100644 index cc51840fb48..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/resource-size-range.tsx +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' -import { - ResourceSizeRangeFilterClass, - FilterClass, - sizeUnits, - isResourceSizeRangeFilterClass, -} from '../filter-builder/filter.structure' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' -import { NumberField } from './number' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import LinearProgress from '@mui/material/LinearProgress' - -type GenericFilterType = { - filter: FilterClass - setFilter: (filter: FilterClass) => void -} - -type ResourceSizeRangeFieldProps = { - filter: ResourceSizeRangeFilterClass - setFilter: (filter: ResourceSizeRangeFilterClass) => void -} - -const defaultValue = { - start: 0, - end: 1, - startUnits: 'B', - endUnits: 'B', -} - -function castAndParseFilterValue( - value: unknown -): ResourceSizeRangeFilterClass['value'] { - const castedValue = value as ResourceSizeRangeFilterClass['value'] - try { - return { - start: castAndParseValue(castedValue.start, defaultValue.start), - end: castAndParseValue(castedValue.end, defaultValue.end), - } - } catch (e) { - return { - start: defaultValue.start, - end: defaultValue.end, - } - } -} - -function parseFilterContext( - context: unknown -): ResourceSizeRangeFilterClass['context'] { - const castedContext = context as ResourceSizeRangeFilterClass['context'] - try { - return { - startUnits: castAndParseUnit( - castedContext.startUnits, - defaultValue.startUnits - ), - endUnits: castAndParseUnit(castedContext.endUnits, defaultValue.endUnits), - } - } catch (e) { - return { - startUnits: defaultValue.startUnits, - endUnits: defaultValue.endUnits, - } - } -} - -export function castAndParseValue( - value: unknown, - defaultValue: number -): number { - try { - const castedValue = value as number - if (typeof castedValue === 'number' && !isNaN(castedValue)) { - return castedValue - } - } catch (e) { - // If casting fails, fall through to default - } - return defaultValue -} - -export function castAndParseUnit(unit: unknown, defaultValue: string): string { - try { - const castedUnit = unit as string - if (sizeUnits.includes(castedUnit)) { - return castedUnit - } - } catch (e) { - // If casting fails, fall through to default - } - return defaultValue -} - -function parseFilter(props: GenericFilterType): ResourceSizeRangeFilterClass { - const { filter } = props - let newValue = castAndParseFilterValue(filter.value) - let newContext = parseFilterContext(filter.context) - - return new ResourceSizeRangeFilterClass({ - ...filter, - value: { - start: newValue.start, - end: newValue.end, - }, - context: { - startUnits: newContext.startUnits, - endUnits: newContext.endUnits, - }, - }) -} - -const ResourceSizeRangeFieldWrapper: React.FC = ({ - filter, - setFilter, -}) => { - React.useEffect(() => { - const timeoutId = window.setTimeout(() => { - if (!isResourceSizeRangeFilterClass(filter)) { - setFilter(parseFilter({ filter, setFilter })) - } - }, 250) - return () => { - window.clearTimeout(timeoutId) - } - }, [filter]) - - if (!isResourceSizeRangeFilterClass(filter)) { - return - } - - return -} - -const ResourceSizeRangeField: React.FC = ({ - filter, - setFilter, -}) => { - return ( -
-
- { - setFilter( - new ResourceSizeRangeFilterClass({ - ...filter, - value: { start: val, end: filter.value.end }, - }) - ) - }} - {...EnterKeySubmitProps} - /> - - setFilter( - new ResourceSizeRangeFilterClass({ - ...filter, - context: { - startUnits: newValue || 'B', - endUnits: filter.context.endUnits, - }, - }) - ) - } - className="min-w-24 ml-2" - options={sizeUnits} - renderInput={(params) => } - fullWidth - /> -
-
- { - setFilter( - new ResourceSizeRangeFilterClass({ - ...filter, - value: { start: filter.value.start, end: val }, - }) - ) - }} - {...EnterKeySubmitProps} - /> - { - setFilter( - new ResourceSizeRangeFilterClass({ - ...filter, - context: { - startUnits: filter.context.startUnits, - endUnits: newValue || 'B', - }, - }) - ) - }} - options={sizeUnits} - renderInput={(params) => } - fullWidth - /> -
-
- ) -} - -export { ResourceSizeRangeFieldWrapper as ResourceSizeRangeField } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/resource-size.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/resource-size.tsx deleted file mode 100644 index f6f66fba104..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/resource-size.tsx +++ /dev/null @@ -1,132 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' -import { - FilterClass, - isResourceSizeFilterClass, - ResourceSizeFilterClass, - sizeUnits, -} from '../filter-builder/filter.structure' -import { EnterKeySubmitProps } from '../custom-events/enter-key-submit' -import { NumberField } from './number' -import Autocomplete from '@mui/material/Autocomplete' -import LinearProgress from '@mui/material/LinearProgress' -import TextField from '@mui/material/TextField' -import { castAndParseUnit, castAndParseValue } from './resource-size-range' - -type GenericFilterType = { - filter: FilterClass - setFilter: (filter: FilterClass) => void -} - -type ResourceSizeFieldProps = { - filter: ResourceSizeFilterClass - setFilter: (filter: ResourceSizeFilterClass) => void -} - -const defaultValue = 0 -const defaultUnit = 'B' - -const parseFilter = (props: GenericFilterType): ResourceSizeFilterClass => { - const { filter } = props - let newValue = castAndParseValue(filter.value, defaultValue) - let newUnit = castAndParseUnit(filter.context?.units, defaultUnit) - - return new ResourceSizeFilterClass({ - ...filter, - value: newValue, - context: { ...filter.context, units: newUnit }, - }) -} - -type UnitSelectorProps = { - value: string - onChange: (newValue: string) => void -} - -export const UnitSelector: React.FC = ({ - value, - onChange, -}) => { - return ( - { - onChange(newValue || defaultUnit) - }} - options={sizeUnits} - className="min-w-24 ml-2" - renderInput={(params) => } - disableClearable - /> - ) -} - -const ValidatedResourceSizeField: React.FC = (props) => { - React.useEffect(() => { - const timeoutId = window.setTimeout(() => { - if (!isResourceSizeFilterClass(props.filter)) { - props.setFilter(parseFilter(props)) - } - }, 250) - return () => { - window.clearTimeout(timeoutId) - } - }, [props]) - - if (!isResourceSizeFilterClass(props.filter)) { - return - } - - return -} - -const ResourceSizeField: React.FC = ({ - filter, - setFilter, -}) => { - const handleValueChange = (newValue: number) => { - setFilter( - new ResourceSizeFilterClass({ - ...filter, - value: newValue, - }) - ) - } - - const handleUnitChange = (newUnit: string) => { - setFilter( - new ResourceSizeFilterClass({ - ...filter, - context: { units: newUnit }, - }) - ) - } - - return ( -
- - -
- ) -} - -export { ValidatedResourceSizeField as ResourceSizeField } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/useTimePrefs.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/useTimePrefs.tsx deleted file mode 100644 index 767d9d99843..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/fields/useTimePrefs.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { useState, useEffect } from 'react' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import user from '../singletons/user-instance' - -const useTimePrefs = (action?: () => void) => { - const { listenTo, stopListening } = useBackbone() - const [, setForceRender] = useState(Math.random()) - - useEffect(() => { - const callback = () => { - setForceRender(Math.random()) - action && action() - } - listenTo( - user.getPreferences(), - 'change:dateTimeFormat change:timeZone', - callback - ) - return () => - stopListening( - user.getPreferences(), - 'change:dateTimeFormat change:timeZone', - callback - ) - }, [action]) -} - -export default useTimePrefs diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/examples.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/examples.tsx deleted file mode 100644 index 741cc1f3e61..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/examples.tsx +++ /dev/null @@ -1,355 +0,0 @@ -/** - * Examples pulled from the existing filter tree of filter json - * - * I noticed we don't keep the coordinate system stored anywhere in the location - * json at the moment. Need to add whatever keyword looks like. - */ -//@ts-ignore -const examples = [ - { - type: 'AND', - filters: [ - { - type: 'ILIKE', - property: 'anyText', - value: '123213', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'LIKE', - property: 'anyText', - value: '123213', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '=', - property: 'anyText', - value: '123213', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '=', - value: true, - property: { - type: 'FILTER_FUNCTION', - filterFunctionName: 'proximity', - params: ['anyText', 22, '12'], - }, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'IS NULL', - property: 'checksum', - value: null, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'BEFORE', - property: 'datetime.end', - value: '2020-07-01T07:00:00.000Z', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'AFTER', - property: 'datetime.end', - value: '2020-07-01T07:00:00.000Z', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '=', - property: 'datetime.end', - value: 'RELATIVE(PT11M)', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'DURING', - property: 'datetime.end', - value: '2020-07-01T07:00:00.000Z/2020-07-10T07:00:00.000Z', - from: '2020-07-01T07:00:00.000Z', - to: '2020-07-10T07:00:00.000Z', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'IS NULL', - property: 'datetime.end', - value: null, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '>', - property: 'location.altitude-meters', - value: '1', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '<', - property: 'location.altitude-meters', - value: '1', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '=', - property: 'location.altitude-meters', - value: '1', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '>=', - property: 'location.altitude-meters', - value: '1', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: '<=', - property: 'location.altitude-meters', - value: '1', - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'BETWEEN', - property: 'location.altitude-meters', - value: { - lower: 1, - upper: 2, - }, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'INTERSECTS', - property: 'location', - value: - 'LINESTRING(-99.3052 54.615629,-95.783965 45.236546,-112.445055 47.137541)', - distance: 0, - geojson: { - type: 'Feature', - geometry: { - type: 'LineString', - coordinates: [ - [-99.3052, 54.615629], - [-95.783965, 45.236546], - [-112.445055, 47.137541], - ], - }, - properties: { - type: 'LineString', - buffer: { - width: '', - unit: 'meters', - }, - }, - }, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'DWITHIN', - property: 'location', - value: - 'LINESTRING(-99.3052 54.615629,-95.783965 45.236546,-112.445055 47.137541)', - distance: 1, - geojson: { - type: 'Feature', - geometry: { - type: 'LineString', - coordinates: [ - [-99.3052, 54.615629], - [-95.783965, 45.236546], - [-112.445055, 47.137541], - ], - }, - properties: { - type: 'LineString', - buffer: { - width: '1', - unit: 'meters', - }, - }, - }, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'DWITHIN', - property: 'location', - value: - 'POLYGON((-107.626679 53.160318,-97.142175 40.783651,-112.152477 38.528437,-107.626679 53.160318))', - distance: 3.6576000000000004, - geojson: { - type: 'Feature', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [-107.626679, 53.160318], - [-97.142175, 40.783651], - [-112.152477, 38.528437], - [-107.626679, 53.160318], - ], - ], - }, - properties: { - type: 'Polygon', - buffer: { - width: '12', - unit: 'feet', - }, - }, - }, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'DWITHIN', - property: 'location', - value: 'POINT(-101.741501 49.672811)', - distance: 636765.857025, - geojson: { - type: 'Feature', - geometry: { - type: 'Point', - coordinates: [-101.741501, 49.672811], - }, - properties: { - type: 'Point', - buffer: { - width: 636765.857025, - unit: 'meters', - }, - }, - }, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'DWITHIN', - property: 'location', - value: 'POINT(-101.741501 49.672811)', - distance: 636765.857025, - geojson: { - type: 'Feature', - geometry: { - type: 'Point', - coordinates: [-101.741501, 49.672811], - }, - properties: { - type: 'Point', - buffer: { - width: 636765.857025, - unit: 'meters', - }, - }, - }, - }, - ], - }, - { - type: 'AND', - filters: [ - { - type: 'INTERSECTS', - property: 'location', - value: - 'POLYGON((-106.606125 47.452416,-106.606125 51.974784,-92.669926 51.974784,-92.669926 47.452416,-106.606125 47.452416))', - geojson: { - type: 'Feature', - bbox: [47.452416, 51.974784, -106.606125, -92.669926], - geometry: { - type: 'Polygon', - coordinates: [ - [ - [-106.606125, 51.974784], - [-92.669926, 51.974784], - [-92.669926, 47.452416], - [-106.606125, 47.452416], - [-106.606125, 51.974784], - ], - ], - }, - properties: { - type: 'BoundingBox', - north: 51.974784, - east: -92.669926, - south: 47.452416, - west: -106.606125, - }, - }, - }, - ], - }, -] diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-branch.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-branch.tsx deleted file mode 100644 index 03d8137c436..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-branch.tsx +++ /dev/null @@ -1,345 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import Grid from '@mui/material/Grid' -import FilterLeaf from './filter-leaf' -import { useTheme } from '@mui/material/styles' -import { HoverButton } from '../button/hover' -import { - FilterBuilderClass, - FilterClass, - isFilterBuilderClass, -} from './filter.structure' -import TextField from '@mui/material/TextField' -import MenuItem from '@mui/material/MenuItem' -import AddIcon from '@mui/icons-material/Add' -import _ from 'lodash' -import { Memo } from '../memo/memo' -import { ValidationResult } from '../../react-component/location/validators' -const OperatorData = [ - { - label: 'AND', - value: 'AND', - }, - { - label: 'OR', - value: 'OR', - }, -] - -type ChildFilterProps = { - parentFilter: FilterBuilderClass - filter: FilterBuilderClass | FilterClass - setFilter: (filter: FilterBuilderClass) => void - index: number - isFirst: boolean - isLast: boolean - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void -} - -const ChildFilter = ({ - parentFilter, - filter, - setFilter, - index, - isFirst, - errorListener, -}: ChildFilterProps) => { - return ( - <> - {!isFirst ? ( - - - { - const newOperator = e.target.value as FilterBuilderClass['type'] - setFilter( - new FilterBuilderClass({ - ...parentFilter, - type: newOperator, - }) - ) - }} - select - variant="outlined" - size="small" - > - {OperatorData.map((operatorInfo) => { - return ( - - {operatorInfo.label} - - ) - })} - - - - - - - ) : null} - {isFilterBuilderClass(filter) ? ( - { - const newFilters = parentFilter.filters.slice(0) - newFilters.splice(index, 1, newChildFilter) - setFilter( - new FilterBuilderClass({ - ...parentFilter, - filters: newFilters, - }) - ) - }} - errorListener={errorListener} - /> - ) : ( - { - const newFilters = parentFilter.filters.slice(0) - newFilters.splice(index, 1, newChildFilter) - setFilter( - new FilterBuilderClass({ - ...parentFilter, - filters: newFilters, - }) - ) - }} - errorListener={errorListener} - /> - )} - - ) -} - -type Props = { - filter: FilterBuilderClass - setFilter: (filter: FilterBuilderClass) => void - root?: boolean - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void -} - -const FilterBranch = ({ - filter, - setFilter, - root = false, - errorListener, -}: Props) => { - const [hover, setHover] = React.useState(false) - const theme = useTheme() - - /** - * Any non root branches lacking filters are pruned. - */ - React.useEffect(() => { - filter.filters.forEach((childFilter, index) => { - if ( - isFilterBuilderClass(childFilter) && - childFilter.filters.length === 0 - ) { - const newFilters = filter.filters.slice(0) - newFilters.splice(index, 1) - setFilter( - new FilterBuilderClass({ - ...filter, - filters: newFilters, - }) - ) - } - }) - }, [filter]) - - return ( -
{ - setHover(true) - }} - onMouseOut={() => { - setHover(false) - }} - > -
-
-
- - - - - - - - - {filter.filters.length !== 0 ? ( - - - - ) : null} - - - {filter.negated ? ( - <> - { - setFilter( - new FilterBuilderClass({ - ...filter, - negated: !filter.negated, - }) - ) - }} - > - {({ hover }) => { - if (hover) { - return <>Remove Not - } else { - return <>NOT - } - }} - - - ) : ( - <> - - - )} - - <> - {filter.filters.map((childFilter, index) => { - return ( - - ) - })} - - -
-
-
-
- ) -} -export default hot(module)(FilterBranch) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-builder.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-builder.tsx deleted file mode 100644 index 4656bbf1f5e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-builder.tsx +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' - -import FilterBranch from './filter-branch' - -import { FilterBuilderClass, isFilterBuilderClass } from './filter.structure' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import { ValidationResult } from '../../react-component/location/validators' - -type Props = { - model: any - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void -} - -const convertToFilterIfNecessary = ({ - filter, -}: { - filter: any -}): FilterBuilderClass => { - if (isFilterBuilderClass(filter)) { - return filter - } - if (filter.filters === undefined) { - return new FilterBuilderClass({ - type: 'AND', - filters: [filter], - negated: false, - }) - } - return new FilterBuilderClass({ - ...filter, - }) -} - -const getBaseFilter = ({ model }: { model: any }): FilterBuilderClass => { - const filter = model.get('filterTree') - return convertToFilterIfNecessary({ filter }) -} - -/** - * We use the filterTree of the model as the single source of truth, so it's always up to date. - * As a result, we have to listen to updates to it. - */ -export const FilterBuilderRoot = ({ model, errorListener }: Props) => { - const [filter, setFilter] = React.useState(getBaseFilter({ model })) - const { listenTo, stopListening } = useBackbone() - React.useEffect(() => { - const callback = () => { - setFilter(getBaseFilter({ model })) - } - listenTo(model, 'change:filterTree', callback) - return () => { - stopListening(model, 'change:filterTree', callback) - } - }, [model]) - return ( -
- { - model.set('filterTree', update) // update the filterTree directly so it's always in sync and we're ready to search - }} - root={true} - errorListener={errorListener} - /> -
- ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-leaf.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-leaf.spec.tsx deleted file mode 100644 index 7352866d38d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-leaf.spec.tsx +++ /dev/null @@ -1,419 +0,0 @@ -import * as React from 'react' -import Enzyme, { mount } from 'enzyme' -import Adapter from '@wojtekmaj/enzyme-adapter-react-17' -Enzyme.configure({ adapter: new Adapter() }) -import { expect } from 'chai' -import FilterLeaf from './filter-leaf' -import { - FilterClass, - LineLocation, - PointRadiusLocation, - PolygonLocation, -} from './filter.structure' -import moment from 'moment' -import user from '../singletons/user-instance' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { BasicDataTypePropertyName } from './reserved.properties' -function addTestDefs() { - StartupDataStore.MetacardDefinitions.addDynamicallyFoundMetacardDefinitions({ - testing: { - integerType: { - type: 'INTEGER', - id: 'integerType', - multivalued: false, - isInjected: false, - }, - floatType: { - type: 'FLOAT', - id: 'floatType', - multivalued: false, - isInjected: false, - }, - longType: { - type: 'LONG', - id: 'longType', - multivalued: false, - isInjected: false, - }, - shortType: { - type: 'SHORT', - id: 'shortType', - multivalued: false, - isInjected: false, - }, - doubleType: { - type: 'DOUBLE', - id: 'doubleType', - multivalued: false, - isInjected: false, - }, - booleanType: { - type: 'BOOLEAN', - id: 'booleanType', - multivalued: false, - isInjected: false, - }, - dateType: { - type: 'DATE', - id: 'dateType', - multivalued: false, - isInjected: false, - }, - locationType: { - type: 'LOCATION', - id: 'locationType', - multivalued: false, - isInjected: false, - }, - xmlType: { - type: 'XML', - id: 'xmlType', - multivalued: false, - isInjected: false, - hidden: true, - }, - binaryType: { - type: 'BINARY', - id: 'binaryType', - multivalued: false, - isInjected: false, - hidden: true, - }, - 'location.country-code': { - type: 'STRING', - id: 'location.country-code', - multivalued: false, - isInjected: false, - }, - datatype: { - type: 'STRING', - id: 'datatype', - multivalued: false, - isInjected: false, - }, - anyText: { - type: 'STRING', - id: 'anyText', - multivalued: false, - isInjected: false, - hidden: true, - }, - [BasicDataTypePropertyName]: { - type: 'STRING', - id: BasicDataTypePropertyName, - multivalued: false, - isInjected: false, - hidden: true, - }, - }, - }) -} - -// do not rely on our own transforms for testing, rely on static data! -const data = { - date1: { - timezone: 'America/St_Johns', - originalISO: '2021-01-15T06:53:54.316Z', - originalDate: new Date('2021-01-15T06:53:54.316Z'), - shiftedISO: '2021-01-15T10:23:54.316Z', - shiftedDate: new Date('2021-01-15T10:23:54.316Z'), - userFormatISO: '2021-01-15T03:23:54.316-03:30', - userFormat24: '15 Jan 2021 03:23:54.316 -03:30', - userFormat12: '15 Jan 2021 03:23:54.316 am -03:30', - }, - date2: { - timezone: 'America/St_Johns', - userSuppliedInput: '15 Jan 2021 03:24:54.316 -02:30', - parsedOutput: '15 Jan 2021 02:24:54.316 -03:30', - }, - date3: { - timezone: 'Etc/UTC', - maxFuture: moment().add(10, 'years').toISOString(), - disallowedFuture: moment().add(11, 'years').toISOString(), - }, - location1: { - type: 'LINE', - mode: 'line', - lineWidth: '50', - line: [ - [0, 0], - [1, 1], - ], - } as LineLocation, - location2: { - type: 'POLYGON', - mode: 'poly', - polygonBufferWidth: '50', - polygonBufferUnits: 'meters', - polygon: [ - [0, 0], - [1, 1], - [2, 2], - [0, 0], - ], - } as PolygonLocation, - location3: { - type: 'POINTRADIUS', - mode: 'circle', - radiusUnits: 'meters', - radius: 50, - lat: 0, - lon: 30, - } as PointRadiusLocation, -} - -describe('filter leaf testing', () => { - before(() => { - /** - * Needs to be done here, otherwise these get blown away when the mock fetch happens. - */ - addTestDefs() - }) - it('renders with a blank FilterClass', () => { - mount( {}} />) - }) - it('renders with a non-blank text FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('anyText') - expect(wrapper.find('input').last().render().val()).to.equal('text') - }) - it('renders with a non-blank number FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('integerType') - expect(wrapper.find('input').last().render().val()).to.equal('4') - }) - it('renders with a non-blank integer FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('integerType') - expect(wrapper.find('input').last().render().val()).to.equal('4') - }) - it('renders with a non-blank float FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('floatType') - expect(wrapper.find('input').last().render().val()).to.equal('4') - }) - it('renders with a non-blank long FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('longType') - expect(wrapper.find('input').last().render().val()).to.equal('4') - }) - it('renders with a non-blank short FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('shortType') - expect(wrapper.find('input').last().render().val()).to.equal('4') - }) - it('renders with a non-blank double FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('doubleType') - expect(wrapper.find('input').last().render().val()).to.equal('4') - }) - it('renders with a non-blank boolean FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('booleanType') - expect(wrapper.find('input').last().render().val()).to.equal('true') - }) - it('renders with a non-blank date FilterClass', () => { - user.get('user').get('preferences').set('timeZone', data.date1.timezone) - - const wrapper = mount( - {}} - /> - ) - expect(wrapper.find('input').first().render().val()).to.equal('dateType') - expect(wrapper.find('input').last().render().val()).to.equal( - data.date1.userFormatISO - ) - }) - it('renders with a non-blank location FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - const thingsToFind = Object.values(data.location1) - .map((val) => { - if (typeof val !== 'string') { - return JSON.stringify(val) - } - return val.toLowerCase() - }) - .filter((val) => val !== 'line') - wrapper.find('input').forEach((node) => { - const rendering = node.render() - const val = rendering.val().toLowerCase() - const index = thingsToFind.indexOf(val) - if (index >= 0) { - thingsToFind.splice(index, 1) - } - }) - expect(thingsToFind.length).to.equal(0) - }) - it('renders with a non-blank polygon location FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - const thingsToFind = Object.values(data.location2) - .map((val) => { - if (typeof val !== 'string') { - return JSON.stringify(val) - } - return val.toLowerCase() - }) - .filter((val) => val !== 'poly') - wrapper.find('input').forEach((node) => { - const rendering = node.render() - const val = rendering.val().toLowerCase() - const index = thingsToFind.indexOf(val) - if (index >= 0) { - thingsToFind.splice(index, 1) - } - }) - expect(thingsToFind.length).to.equal(0) - }) - it('renders with a non-blank point radius location FilterClass', () => { - const wrapper = mount( - {}} - /> - ) - const thingsToFind = Object.values(data.location3) - .map((val) => { - if (typeof val !== 'string') { - return JSON.stringify(val) - } - if (val === 'POINTRADIUS') { - return 'point-radius' - } - return val.toLowerCase() - }) - .filter((val) => val !== 'circle') - wrapper.find('input').forEach((node) => { - const rendering = node.render() - const val = rendering.val().toLowerCase() - const index = thingsToFind.indexOf(val) - if (index >= 0) { - thingsToFind.splice(index, 1) - } - }) - expect(thingsToFind.length).to.equal(0) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-leaf.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-leaf.tsx deleted file mode 100644 index 9679dfff26f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter-leaf.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import { useTheme } from '@mui/material/styles' -import { HoverButton } from '../button/hover' -import { FilterClass } from './filter.structure' -import FilterPropertyAutocomplete from '../../react-component/filter/filter' -import { Memo } from '../memo/memo' -import { ValidationResult } from '../../react-component/location/validators' - -type Props = { - filter: FilterClass - setFilter: (filter: FilterClass) => void - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void -} - -export const FilterNegationControls = ({ - filter, - setFilter, - children, -}: Props & { - children: React.ReactNode -}) => { - const [hover, setHover] = React.useState(false) - const theme = useTheme() - return ( -
{ - setHover(true) - }} - onMouseOut={() => { - setHover(false) - }} - > - {filter.negated ? ( - { - setFilter( - new FilterClass({ - ...filter, - negated: !filter.negated, - }) - ) - }} - > - {({ hover }) => { - if (hover) { - return <>Remove Not - } else { - return <>NOT - } - }} - - ) : ( - - )} -
- {children} -
-
- ) -} - -const FilterLeaf = ({ filter, setFilter, errorListener }: Props) => { - return ( - - - - - - ) -} -export default hot(module)(FilterLeaf) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter.structure.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter.structure.tsx deleted file mode 100644 index c0dfa712c53..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter.structure.tsx +++ /dev/null @@ -1,549 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import moment from 'moment-timezone' -import { ValuesType } from 'utility-types' -import CQLUtils from '../../js/CQLUtils' -import { Omit } from '../../typescript' - -import { SpreadOperatorProtectedClass } from '../../typescript/classes' -import ExtensionPoints from '../../extension-points' -import { BasicDataTypePropertyName } from './reserved.properties' - -export const deserialize = { - /** - * example inputs: // ' are part of input - * 'RELATIVE(PT1S)' // last 1 seconds - * 'RELATIVE(PT1M)' // last 1 minutes - * 'RELATIVE(PT1H)' // last 1 hours - * 'RELATIVE(P1D)' // last 1 days - * 'RELATIVE(P7D)' // last 1 weeks (notice we get mod of 7 days) - * 'RELATIVE(P1M)' // last 1 month - * 'RELATIVE(P1Y)' // last 1 year - **/ - dateRelative: (val: string): ValueTypes['relative'] => { - let last = '' - const guts = val.split('(')[1].split(')')[0].substring(1) // get the thing between the parens, notice we don't care about P either - let unit = guts.charAt(guts.length - 1) // notice that we still need to know if it's minutes or months, the unit is the same between them! - if (guts.charAt(0) === 'T') { - last = guts.substring(1, guts.length - 1) - unit = unit.toLowerCase() - } else { - last = guts.substring(0, guts.length - 1) - if (unit !== 'M') { - unit = unit.toLowerCase() // only M differs given the conflict between minutes / months - } - if (unit === 'd') { - if (Number(last) % 7 === 0) { - // manually convert to weeks since it's not "really" a cql supported unit for relative - last = (Number(last) / 7).toString() - unit = 'w' - } - } - } - return { - last, - unit, - } as ValueTypes['relative'] - }, -} - -export const serialize = { - dateRelative: ({ last, unit }: ValueTypes['relative']) => { - if (unit === undefined || !parseFloat(last)) { - return '' - } - //Weeks is not a valid unit, so convert this to days - if (unit === 'w') { - let convertedUnit = 'd' - let convertedLast = (parseFloat(last) * 7).toString() - return `RELATIVE(${'P' + convertedLast + convertedUnit.toUpperCase()})` - } - const prefix = unit === 's' || unit === 'm' || unit === 'h' ? 'PT' : 'P' - return `RELATIVE(${prefix + last + unit.toUpperCase()})` - }, - dateAround: (value: ValueTypes['around']) => { - if ( - value.buffer === undefined || - value.date === undefined || - value.direction === undefined - ) { - return '' - } - let before = ['both', 'before'].includes(value.direction) - ? moment(value.date) - .subtract(value.buffer.amount, value.buffer.unit) - .toISOString() - : value.date - let after = ['both', 'after'].includes(value.direction) - ? moment(value.date) - .add(value.buffer.amount, value.buffer.unit) - .toISOString() - : value.date - return `DURING ${before}/${after}` - }, - dateBetween: (value: ValueTypes['between']) => { - const from = moment(value.start) - const to = moment(value.end) - if (from.isAfter(to)) { - return (to.toISOString() || '') + '/' + (from.toISOString() || '') - } - return (from.toISOString() || '') + '/' + (to.toISOString() || '') - }, - location: (property: string, value: ValueTypes['location']) => { - const transformation = ExtensionPoints.serializeLocation(property, value) - if (transformation !== null) { - return transformation - } - return CQLUtils.generateAnyGeoFilter(property, value) - }, -} - -class BaseFilterBuilderClass extends SpreadOperatorProtectedClass { - readonly type: string - readonly filters: Array - readonly negated: boolean - readonly id: string - constructor({ - type = 'AND', - filters = [new FilterClass()], - negated = false, - id = Math.random().toString(), - }: { - type?: BaseFilterBuilderClass['type'] - filters?: BaseFilterBuilderClass['filters'] - negated?: BaseFilterBuilderClass['negated'] - id?: string - } = {}) { - super() - this.type = type - /** - * If for some reason filters come in that aren't classed, this will handle it. - */ - this.filters = filters.map((childFilter) => { - if ( - isFilterBuilderClass(childFilter) || - shouldBeFilterBuilderClass(childFilter) - ) { - return new FilterBuilderClass({ - ...childFilter, - }) - } else { - return new FilterClass({ - ...childFilter, - }) - } - }) - this.negated = negated - this.id = id - } -} -export class FilterBuilderClass extends BaseFilterBuilderClass { - declare readonly type: 'AND' | 'OR' - declare readonly filters: Array - constructor({ - type = 'AND', - filters = [new FilterClass()], - negated = false, - id = Math.random().toString(), - }: { - type?: FilterBuilderClass['type'] - filters?: FilterBuilderClass['filters'] - negated?: FilterBuilderClass['negated'] - id?: string - } = {}) { - super({ type, filters, negated, id }) - } -} - -/** - * We want to support more complex negation than allowed by the normal filter tree, so we store negated in a property. - * However, since the write function in cql.tsx doesn't know about this, at some point we need to convert it back to this class where negation exists as a type instead of property. - * See the uncollapseNots function in cql.tsx for where this is done. - */ -export class CQLStandardFilterBuilderClass extends BaseFilterBuilderClass { - declare readonly type: 'AND' | 'OR' | 'NOT' - declare readonly filters: Array< - FilterClass | CQLStandardFilterBuilderClass | FilterBuilderClass - > - constructor({ - type = 'AND', - filters = [new FilterClass()], - negated = false, - id = Math.random().toString(), - }: { - type?: CQLStandardFilterBuilderClass['type'] - filters?: CQLStandardFilterBuilderClass['filters'] - negated?: CQLStandardFilterBuilderClass['negated'] - id?: string - } = {}) { - super({ type, filters, negated, id }) - } -} - -export type BooleanTextType = { - text: string - cql: string - error: boolean - errorMessage?: string -} - -export type ValueTypes = { - proximity: { - first: string - second: string - distance: number - } - date: string - boolean: boolean - text: string - float: number - integer: number - relative: { - last: string - //NOTE: Weeks is not a valid unit, but we allow it in our system. - //This is converted to days to become valid cql - unit: 'm' | 'h' | 'd' | 'M' | 'y' | 's' | 'w' - } - around: { - date: string - buffer: { - amount: string - unit: 'm' | 'h' | 'd' | 'M' | 'y' | 's' | 'w' - } - direction: 'both' | 'before' | 'after' - } - during: { - start: string - end: string - } - between: { - start: number - end: number - } - multivalue: string[] - booleanText: BooleanTextType - location: // this is all we technically need to reconstruct (lo fidelity) - LineLocation | PolygonLocation | PointRadiusLocation -} - -export type LineLocation = { - type: 'LINE' - mode: 'line' - lineWidth?: string - line: Array> -} -export type PolygonLocation = { - type: 'POLYGON' - polygonBufferWidth?: number | string - polygonBufferUnits?: 'meters' - polygon: Array> - locationType?: 'dd' - polyType?: 'polygon' - mode: 'poly' -} -export type PointRadiusLocation = { - type: 'POINTRADIUS' - radius: number | string - radiusUnits?: 'meters' - mode: 'circle' - lat: number - lon: number - locationType?: 'dd' -} - -export type ValueType = string | boolean | null | ValuesType - -export type FilterContext = { - [key: string]: any -} - -export class FilterClass extends SpreadOperatorProtectedClass { - type: - | 'BEFORE' - | 'AFTER' - | 'RELATIVE' - | '=' - | 'DURING' - | 'GEOMETRY' - | 'DWITHIN' - | 'ILIKE' - | 'LIKE' - | 'IS NULL' - | '>' - | '<' - | '=' - | '<=' - | '>=' - | 'DURING' - | 'BETWEEN' - | 'FILTER FUNCTION proximity' - | 'AROUND' // This isn't valid cql, but something we support - | 'BOOLEAN_TEXT_SEARCH' // This isn't valid cql, but something we support - readonly property: string - readonly value: ValueType - readonly negated: boolean | undefined - readonly id: string - readonly context?: FilterContext - constructor({ - type = 'ILIKE', - property = 'anyText', - value = '', - negated = false, - id = Math.random().toString(), - context, - }: { - type?: FilterClass['type'] - property?: FilterClass['property'] - value?: FilterClass['value'] - negated?: FilterClass['negated'] - id?: string - context?: FilterContext - } = {}) { - super() - this.type = type - this.property = property - this.value = value - this.negated = negated - this.id = id - this.context = context - } -} - -/** - * determine it is actually an plain object form of the filter builder class - */ -export const shouldBeFilterBuilderClass = ( - filter: any -): filter is FilterBuilderClass => { - return !isFilterBuilderClass(filter) && filter.filters !== undefined -} - -/** - *determine it is actually an instantiation of the filter builder class - */ -export const isFilterBuilderClass = ( - filter: - | FilterBuilderClass - | FilterClass - | CQLStandardFilterBuilderClass - | Partial - | Partial - | Partial -): filter is FilterBuilderClass => { - return filter.constructor === FilterBuilderClass -} - -/** - *determine it is actually an instantiation of the cql standard filter builder class - */ -export const isCQLStandardFilterBuilderClass = ( - filter: - | FilterBuilderClass - | FilterClass - | CQLStandardFilterBuilderClass - | Partial - | Partial - | Partial -): filter is CQLStandardFilterBuilderClass => { - return filter.constructor === CQLStandardFilterBuilderClass -} - -export interface BasicFilterClass extends Omit { - property: string[] -} - -interface BasicDatatypeClass extends Omit { - property: typeof BasicDataTypePropertyName - value: string[] -} - -export class BasicDatatypeFilter - extends FilterClass - implements BasicDatatypeClass -{ - property: typeof BasicDataTypePropertyName - value: string[] - - constructor({ - value = [], - context, - }: { - value?: string[] - context?: FilterContext - } = {}) { - super({ - property: BasicDataTypePropertyName, - value, - context, - }) - this.value = value - } -} - -export const isBasicDatatypeClass = ( - filter: - | FilterBuilderClass - | FilterClass - | CQLStandardFilterBuilderClass - | Partial - | Partial - | Partial -): filter is BasicDatatypeClass => { - try { - return (filter as any)?.property === BasicDataTypePropertyName - } catch (err) { - return false - } -} - -export class ResourceSizeFilterClass extends FilterClass { - declare value: number - declare context: FilterContext & { units: string } - constructor({ - value = 0, - context = { units: 'B' }, - ...otherProps - }: Omit & { - value: number - context: FilterContext & { units: string } - }) { - super({ - ...otherProps, - value, - context: { - ...context, - units: context.units, - }, - }) - } -} - -export class ResourceSizeRangeFilterClass extends FilterClass { - declare value: { start: number; end: number } - declare context: FilterContext & { startUnits: string; endUnits: string } - constructor({ - value = { start: 0, end: 1 }, - context = { startUnits: 'B', endUnits: 'B' }, - ...otherProps - }: Omit & { - value: { start: number; end: number } - context: FilterContext & { startUnits: string; endUnits: string } - }) { - super({ - ...otherProps, - value, - context: { - ...context, - startUnits: context.startUnits, - endUnits: context.endUnits, - }, - }) - } -} - -export const isResourceSizeFilterClass = ( - filter: - | FilterBuilderClass - | FilterClass - | CQLStandardFilterBuilderClass - | Partial - | Partial - | Partial -): filter is ResourceSizeFilterClass => { - try { - return ( - (filter as any)?.value !== undefined && - typeof (filter as any)?.value === 'number' && - !isNaN((filter as any)?.value) && - (filter as any)?.context?.units !== undefined && - sizeUnits.includes((filter as any)?.context?.units) - ) - } catch (err) { - return false - } -} - -export const isResourceSizeRangeFilterClass = ( - filter: - | FilterBuilderClass - | FilterClass - | CQLStandardFilterBuilderClass - | Partial - | Partial - | Partial -): filter is ResourceSizeRangeFilterClass => { - try { - return ( - (filter as any)?.value !== undefined && - typeof (filter as any)?.value === 'object' && - typeof (filter as any)?.value.start === 'number' && - typeof (filter as any)?.value.end === 'number' && - (filter as any)?.context?.startUnits !== undefined && - (filter as any)?.context?.endUnits !== undefined && - sizeUnits.includes((filter as any)?.context?.startUnits) && - sizeUnits.includes((filter as any)?.context?.endUnits) - ) - } catch (err) { - return false - } -} - -export const sizeUnits = [ - 'B', // Bytes - 'KB', // Kilobytes - 'MB', // Megabytes - 'GB', // Gigabytes - 'TB', // Terabytes - 'PB', // Petabytes -] - -const convertToBytesFromUnit = (value: number, unit: string): number => { - const unitIndex = sizeUnits.indexOf(unit) - if (unitIndex === -1) { - return value // If unit is not recognized, return the original value - } - return value * Math.pow(1000, unitIndex) -} - -// This function rounds down to the nearest whole number in bytes -export const convertResourceSizeFilterClassValueToBytes = ( - filter: ResourceSizeFilterClass -): number => { - const { value, context } = filter - const unit = context?.units || 'B' - return Math.floor(convertToBytesFromUnit(value, unit)) -} - -export const convertResourceSizeRangeFilterClassValueToBytes = ( - filter: ResourceSizeRangeFilterClass -): { start: number; end: number } => { - const { value, context } = filter - const startUnit = context?.startUnits || 'B' - const endUnit = context?.endUnits || 'B' - return { - start: Math.floor(convertToBytesFromUnit(value.start, startUnit)), - end: Math.floor(convertToBytesFromUnit(value.end, endUnit)), - } -} - -export function convertBytesToHumanReadable(bytes: number): string { - const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'] - let unitIndex = 0 - while (bytes >= 1000 && unitIndex < units.length - 1) { - bytes /= 1000 - unitIndex++ - } - return `${bytes.toFixed(2)} ${units[unitIndex]}` -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter.structure.util.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter.structure.util.tsx deleted file mode 100644 index 993883f218a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/filter.structure.util.tsx +++ /dev/null @@ -1,221 +0,0 @@ -import { FilterClass, ValueType, ValueTypes } from './filter.structure' - -export const isRelativeValue = ( - value: ValueType -): value is ValueTypes['relative'] => { - return ( - typeof value === 'object' && - value !== null && - 'last' in value && - 'unit' in value && - typeof value.last === 'string' && - ['m', 'h', 'd', 'M', 'y', 's', 'w'].includes(value.unit) - ) -} - -export const isAroundValue = ( - value: ValueType -): value is ValueTypes['around'] => { - return ( - typeof value === 'object' && - value !== null && - 'date' in value && - 'buffer' in value && - 'direction' in value && - typeof value.date === 'string' && - typeof value.buffer === 'object' && - 'amount' in value.buffer && - 'unit' in value.buffer && - typeof value.buffer.amount === 'string' && - ['both', 'before', 'after'].includes(value.direction) - ) -} - -export const isProximityValue = ( - value: ValueType -): value is ValueTypes['proximity'] => { - return ( - typeof value === 'object' && - value !== null && - 'first' in value && - 'second' in value && - 'distance' in value && - typeof value.first === 'string' && - typeof value.second === 'string' && - typeof value.distance === 'number' - ) -} - -export const isDateValue = (value: ValueType): value is ValueTypes['date'] => { - return typeof value === 'string' -} - -export const isBooleanValue = ( - value: ValueType -): value is ValueTypes['boolean'] => { - return typeof value === 'boolean' -} - -export const isTextValue = (value: ValueType): value is ValueTypes['text'] => { - return typeof value === 'string' -} - -export const isFloatValue = ( - value: ValueType -): value is ValueTypes['float'] => { - return typeof value === 'number' -} - -export const isIntegerValue = ( - value: ValueType -): value is ValueTypes['integer'] => { - return Number.isInteger(value) -} - -export const isDuringValue = ( - value: ValueType -): value is ValueTypes['during'] => { - return ( - typeof value === 'object' && - value !== null && - 'start' in value && - 'end' in value && - typeof value.start === 'string' && - typeof value.end === 'string' - ) -} - -export const isBetweenValue = ( - value: ValueType -): value is ValueTypes['between'] => { - return ( - typeof value === 'object' && - value !== null && - 'start' in value && - 'end' in value && - Number.isInteger(value.start) && - Number.isInteger(value.end) - ) -} - -export const isMultivalue = ( - value: ValueType -): value is ValueTypes['multivalue'] => { - return Array.isArray(value) && value.every((v) => typeof v === 'string') -} - -export const isBooleanTextValue = ( - value: ValueType -): value is ValueTypes['booleanText'] => { - return ( - typeof value === 'object' && - value !== null && - 'text' in value && - 'cql' in value && - 'error' in value && - typeof value.text === 'string' && - typeof value.cql === 'string' && - typeof value.error === 'boolean' - ) -} - -export const isLocationValue = ( - value: ValueType -): value is ValueTypes['location'] => { - return ( - typeof value === 'object' && - value !== null && - 'type' in value && - (value.type === 'LINE' || - value.type === 'POLYGON' || - value.type === 'POINTRADIUS') - ) -} - -export const isValueEmpty = (filter: FilterClass): boolean => { - const type = filter.type - if (type === 'IS NULL') { - return false // IS NULL is never empty - } - - const value = filter.value - if (value === null || value === undefined || value === '') { - return true - } - - if (isDateValue(value)) { - return value.trim() === '' - } - - if (isBooleanValue(value)) { - return false // Boolean values can't be "empty" - } - - if (isTextValue(value)) { - return value.trim() === '' - } - - if (isFloatValue(value)) { - return isNaN(value) - } - - if (isIntegerValue(value)) { - return isNaN(value) - } - - if (isDuringValue(value)) { - return value.start.trim() === '' || value.end.trim() === '' - } - - if (isBetweenValue(value)) { - return isNaN(value.start) || isNaN(value.end) - } - - if (isMultivalue(value)) { - return value.length === 0 || value.every((v) => v.trim() === '') - } - - if (isBooleanTextValue(value)) { - return value.text.trim() === '' || value.cql.trim() === '' - } - - if (isLocationValue(value)) { - if (value.type === 'LINE') { - return value.line.length === 0 - } else if (value.type === 'POLYGON') { - return value.polygon.length === 0 - } else if (value.type === 'POINTRADIUS') { - return ( - isNaN(value.lat) || - isNaN(value.lon) || - isNaN(parseFloat(value.radius.toString())) - ) - } - } - - if (isProximityValue(value)) { - return ( - value.first.trim() === '' || - value.second.trim() === '' || - isNaN(value.distance) - ) - } - - if (isAroundValue(value)) { - return ( - value.date.trim() === '' || - isNaN(parseFloat(value.buffer.amount)) || - parseFloat(value.buffer.amount) <= 0 - ) - } - - if (isRelativeValue(value)) { - return ( - value.last.trim() === '' || - isNaN(parseFloat(value.last)) || - parseFloat(value.last) <= 0 - ) - } - - return false -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/reserved.properties.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/reserved.properties.tsx deleted file mode 100644 index 4725a0c624a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/filter-builder/reserved.properties.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// keep this file import free to avoid circular dependencies - -export const BasicDataTypePropertyName = 'reserved.basic-datatype' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/cross-window-communication.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/cross-window-communication.tsx deleted file mode 100644 index 923e8f76cbd..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/cross-window-communication.tsx +++ /dev/null @@ -1,617 +0,0 @@ -import React from 'react' -import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks' -import type { GoldenLayoutViewProps } from './golden-layout.view' -import { LazyQueryResults } from '../../js/model/LazyQueryResult/LazyQueryResults' -import { useHistory } from 'react-router-dom' -import _cloneDeep from 'lodash.clonedeep' -import _isEqualWith from 'lodash.isequalwith' -import { TypedUserInstance } from '../singletons/TypedUser' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import wreqr from '../../js/wreqr' -import GoldenLayout from 'golden-layout' -import { getRootColumnContent, rootIsNotAColumn } from './stack-toolbar' -import { unMaximize } from '../../react-component/visualization-selector/visualization-selector' -import { v4 as uuid } from 'uuid' - -const windowId = uuid() - -/** - * This function is used to extract the 'gl-window' parameter from the URL that was made by the golden layout library - */ -function getGLWindowParam(urlString: string): string | null { - // Parse the URL - const url = new URL(urlString) - - // Check 'gl-window' in the query string - const searchParams = new URLSearchParams(url.search) - if (searchParams.has('gl-window')) { - return searchParams.get('gl-window') - } - - // Check 'gl-window' in the fragment (hash) - if (url.hash) { - const hash = url.hash.substring(1) // Remove the leading '#' - - // If the hash contains a path followed by query parameters - const hashIndex = hash.indexOf('?') - if (hashIndex !== -1) { - const hashQueryString = hash.substring(hashIndex + 1) - const hashParams = new URLSearchParams(hashQueryString) - if (hashParams.has('gl-window')) { - return hashParams.get('gl-window') - } - } else { - // Handle the case where the hash itself is a query string - const hashParams = new URLSearchParams(hash) - if (hashParams.has('gl-window')) { - return hashParams.get('gl-window') - } - } - } - - // Return null if 'gl-window' is not found - return null -} - -/** - * This patches the popout url that golden layout creates so that it goes to the popout specific route, rather than the current route, which can have side effects. - * Notice we have to grab the window param and reattach it. - */ -function patchCreateUrl() { - const oldCreateUrl = (GoldenLayout as any).__lm.controls.BrowserPopout - .prototype._createUrl - ;(GoldenLayout as any).__lm.controls.BrowserPopout.prototype._createUrl = - function () { - const oldCreatedUrl = oldCreateUrl.apply(this, arguments) - const glWindowParam = getGLWindowParam(oldCreatedUrl) - // determine if ?gl-window=' or &gl-window=, then redo the first part and tack that part on - const newCreatedUrl = - document.location.origin + - document.location.pathname + - '#/_gl_popout?gl-window=' + - glWindowParam - return newCreatedUrl - } -} -patchCreateUrl() - -/** - * The popin function in golden layout has issues, particularly when there is a single stack in the main window at root. - * It also, like many other things in golden layout, doesn't play well with maximize. - * - * This patch detects maximize and removes it (since it doesn't make sense when popping in) - * It also detects if the root is not a column, and if so, makes it a column so that popin works in all cases. - */ -function patchPopinFunction() { - const oldPopin = (GoldenLayout as any).__lm.controls.BrowserPopout.prototype - .popIn - ;(GoldenLayout as any).__lm.controls.BrowserPopout.prototype.popIn = - function () { - const goldenLayoutRoot = this._layoutManager.root - unMaximize(goldenLayoutRoot) - if (rootIsNotAColumn(goldenLayoutRoot)) { - const existingRootContent = getRootColumnContent(goldenLayoutRoot) - goldenLayoutRoot.removeChild(existingRootContent as any, true) // for some reason removeChild is overly restrictive on type of "thing" so we have to cast - - // we need a column for minimize to work, so make a new column and add the existing root to it - const newColumnItem = this._layoutManager._$normalizeContentItem({ - type: 'column', - }) - newColumnItem.addChild(existingRootContent) - goldenLayoutRoot.addChild(newColumnItem) - } - oldPopin.apply(this, arguments) - } -} -patchPopinFunction() - -export const GoldenLayoutWindowCommunicationEvents = { - requestInitialState: 'requestInitialState', - consumeInitialState: 'consumeInitialState', - consumeStateChange: 'consumeStateChange', - consumePreferencesChange: 'consumePreferencesChange', - consumeSubwindowLayoutChange: 'consumeSubwindowLayoutChange', - consumeNavigationChange: 'consumeNavigationChange', - consumeWreqrEvent: 'consumeWreqrEvent', -} - -const useProvideStateChange = ({ - goldenLayout, - lazyResults, - isInitialized, -}: { - goldenLayout: any - lazyResults: LazyQueryResults - isInitialized: boolean -}) => { - React.useEffect(() => { - if (isInitialized && goldenLayout && lazyResults) { - const callback = () => { - goldenLayout.eventHub._childEventSource = null - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumeStateChange, - { - lazyResults, - } - ) - } - - const filteredResultsSubscription = lazyResults.subscribeTo({ - subscribableThing: 'filteredResults', - callback, - }) - const selectedResultsSubscription = lazyResults.subscribeTo({ - subscribableThing: 'selectedResults', - callback, - }) - const statusSubscription = lazyResults.subscribeTo({ - subscribableThing: 'status', - callback, - }) - const filterTreeSubscription = lazyResults.subscribeTo({ - subscribableThing: 'filterTree', - callback, - }) - return () => { - filteredResultsSubscription() - selectedResultsSubscription() - statusSubscription() - filterTreeSubscription() - } - } - return () => {} - }, [lazyResults, lazyResults?.results, isInitialized, goldenLayout]) -} - -const useProvideInitialState = ({ - goldenLayout, - isInitialized, - lazyResults, -}: { - goldenLayout: any - isInitialized: boolean - lazyResults: LazyQueryResults -}) => { - React.useEffect(() => { - if ( - isInitialized && - goldenLayout && - lazyResults && - !goldenLayout.isSubWindow - ) { - const handleInitializeState = () => { - // golden layout doesn't properly clear this flag - goldenLayout.eventHub._childEventSource = null - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumeInitialState, - { - lazyResults, - } - ) - } - - goldenLayout.eventHub.on( - GoldenLayoutWindowCommunicationEvents.requestInitialState, - handleInitializeState - ) - return () => { - try { - goldenLayout.eventHub.off( - GoldenLayoutWindowCommunicationEvents.requestInitialState - ) - } catch (err) { - console.log(err) - } - } - } - return () => {} - }, [isInitialized, goldenLayout, lazyResults, lazyResults?.results]) -} - -const useConsumeInitialState = ({ - goldenLayout, - lazyResults, - isInitialized, -}: { - goldenLayout: any - lazyResults: LazyQueryResults - isInitialized: boolean -}) => { - const [hasConsumedInitialState, setHasConsumedInitialState] = - React.useState(false) - - React.useEffect(() => { - if ( - isInitialized && - !hasConsumedInitialState && - goldenLayout && - lazyResults && - goldenLayout.isSubWindow - ) { - const onSyncStateCallback = (eventData: { - lazyResults: LazyQueryResults - }) => { - setHasConsumedInitialState(true) - lazyResults.reset({ - filterTree: eventData.lazyResults.filterTree, - results: Object.values(eventData.lazyResults.results).map((result) => - _cloneDeep(result.plain) - ), - highlights: eventData.lazyResults.highlights, - sorts: eventData.lazyResults.persistantSorts, - sources: eventData.lazyResults.sources, - status: eventData.lazyResults.status, - didYouMeanFields: eventData.lazyResults.didYouMeanFields, - showingResultsForFields: - eventData.lazyResults.showingResultsForFields, - }) - lazyResults._resetSelectedResults() - Object.values(eventData.lazyResults.selectedResults).forEach( - (result) => { - lazyResults.results[result.plain.id].controlSelect() - } - ) - } - - goldenLayout.eventHub.on( - GoldenLayoutWindowCommunicationEvents.consumeInitialState, - onSyncStateCallback - ) - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.requestInitialState, - {} - ) - return () => { - goldenLayout.eventHub.off( - GoldenLayoutWindowCommunicationEvents.consumeInitialState, - onSyncStateCallback - ) - } - } - return () => {} - }, [goldenLayout, lazyResults, isInitialized]) -} - -const useConsumeStateChange = ({ - goldenLayout, - lazyResults, - isInitialized, -}: { - goldenLayout: any - lazyResults: LazyQueryResults - isInitialized: boolean -}) => { - React.useEffect(() => { - if (goldenLayout && lazyResults && isInitialized) { - const onSyncStateCallback = (eventData: { - lazyResults: LazyQueryResults - }) => { - const results = Object.values(lazyResults.results).map((lazyResult) => { - return { - plain: lazyResult.plain, - isSelected: lazyResult.isSelected, - } - }) - const callbackResults = Object.values( - eventData.lazyResults.results - ).map((lazyResult) => { - return { - plain: lazyResult.plain, - isSelected: lazyResult.isSelected, - } - }) - const filterTree = lazyResults.filterTree - const callbackFilterTree = eventData.lazyResults.filterTree - if ( - !_isEqualWith(results, callbackResults) || - !_isEqualWith(filterTree, callbackFilterTree) - ) { - lazyResults.reset({ - filterTree: eventData.lazyResults.filterTree, - results: Object.values(eventData.lazyResults.results).map( - (result) => _cloneDeep(result.plain) - ), - highlights: eventData.lazyResults.highlights, - sorts: eventData.lazyResults.persistantSorts, - sources: eventData.lazyResults.sources, - status: eventData.lazyResults.status, - didYouMeanFields: eventData.lazyResults.didYouMeanFields, - showingResultsForFields: - eventData.lazyResults.showingResultsForFields, - }) - lazyResults._resetSelectedResults() - Object.values(eventData.lazyResults.selectedResults).forEach( - (result) => { - lazyResults.results[result.plain.id].controlSelect() - } - ) - } - } - - goldenLayout.eventHub.on( - GoldenLayoutWindowCommunicationEvents.consumeStateChange, - onSyncStateCallback - ) - return () => { - goldenLayout.eventHub.off( - GoldenLayoutWindowCommunicationEvents.consumeStateChange, - onSyncStateCallback - ) - } - } - return () => {} - }, [goldenLayout, lazyResults, isInitialized]) -} - -const useConsumePreferencesChange = ({ - goldenLayout, - isInitialized, -}: { - goldenLayout: any - isInitialized: boolean -}) => { - useListenTo(TypedUserInstance.getPreferences(), 'sync', () => { - if (goldenLayout && isInitialized) { - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumePreferencesChange, - { - preferences: TypedUserInstance.getPreferences().toJSON(), - fromWindowId: windowId, - } - ) - } - }) - React.useEffect(() => { - if (goldenLayout && isInitialized) { - goldenLayout.eventHub.on( - GoldenLayoutWindowCommunicationEvents.consumePreferencesChange, - ({ - preferences, - fromWindowId, - }: { - preferences: any - fromWindowId: string - }) => { - if (windowId !== fromWindowId) { - TypedUserInstance.sync(preferences) - } - } - ) - return () => {} - } - return () => {} - }, [goldenLayout, isInitialized]) -} - -function useConsumeSubwindowLayoutChange({ - goldenLayout, - isInitialized, -}: { - goldenLayout: any - isInitialized: boolean -}) { - React.useEffect(() => { - if (goldenLayout && isInitialized && !goldenLayout.isSubWindow) { - goldenLayout.eventHub.on( - GoldenLayoutWindowCommunicationEvents.consumeSubwindowLayoutChange, - () => { - goldenLayout.emit('stateChanged', 'subwindow') - } - ) - return () => { - goldenLayout.eventHub.off( - GoldenLayoutWindowCommunicationEvents.consumeSubwindowLayoutChange - ) - } - } - return () => {} - }, [goldenLayout, isInitialized]) -} - -/** - * Notice that we are only forwarding events that start with 'search' for now, as these are drawing events. - */ -const useProvideWreqrEvents = ({ - goldenLayout, - isInitialized, -}: { - goldenLayout: any - isInitialized: boolean -}) => { - useListenTo( - wreqr.vent, - 'all', - (event: string, args: any, { doNotPropagate = false } = {}) => { - if (goldenLayout && isInitialized) { - if (event.startsWith('search') && !doNotPropagate) { - goldenLayout.eventHub._childEventSource = null // golden layout doesn't properly clear this flag - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumeWreqrEvent, - { - event, - args, - } - ) - } - } - } - ) -} - -const useConsumeWreqrEvents = ({ - goldenLayout, - isInitialized, -}: { - goldenLayout: any - isInitialized: boolean -}) => { - React.useEffect(() => { - if (goldenLayout && isInitialized) { - goldenLayout.eventHub.on( - GoldenLayoutWindowCommunicationEvents.consumeWreqrEvent, - ({ event, args }: { event: string; args: any[] }) => { - wreqr.vent.trigger(event, args, { doNotPropagate: true }) - } - ) - return () => { - goldenLayout.eventHub.off( - GoldenLayoutWindowCommunicationEvents.consumeWreqrEvent - ) - } - } - return () => {} - }, [goldenLayout, isInitialized]) -} - -/** - * Overrides navigation functionality within subwindows of golden layout, so that navigation is handled by the main window. - * - * Notice we do this as a component rather than a hook so we can override the same useHistory instance that the visualization is using. - * (we temporarily eject from react to use golden layout, and rewrap each visual in it's own instance of the various providers, like react router) - * - * We could rewrite it as a hook and put it further down in the tree, but this is the same thing so no need. - * - * Also notice we attach this at the visual level for that reason, rather than at the single golden layout instance level. - */ -export const UseSubwindowConsumeNavigationChange = ({ - goldenLayout, -}: { - goldenLayout: any -}) => { - const history = useHistory() - React.useEffect(() => { - if (goldenLayout && history && goldenLayout.isSubWindow) { - const callback = (e: MouseEvent) => { - if ( - e.target?.constructor === HTMLAnchorElement && - !(e.target as HTMLAnchorElement)?.href.startsWith('blob') - ) { - e.preventDefault() - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, - { - href: (e.target as HTMLAnchorElement).href, - } - ) - } - } - document.addEventListener('click', callback) - history.replace = (...args) => { - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, - { - replace: args, - } - ) - } - history.push = (...args) => { - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, - { - push: args, - } - ) - } - return () => { - document.removeEventListener('click', callback) - } - } - return () => {} - }, [history, goldenLayout]) - return null -} - -/** - * Tells the main window of golden layout to listen for navigation changes in the subwindow. These are translated to be handled by the main window instead. - * Notice we attach this in the single instance of gl, not the individual components like the subwindows who send the event. - */ -const useWindowConsumeNavigationChange = ({ - goldenLayout, - isInitialized, -}: { - goldenLayout: any - isInitialized: boolean -}) => { - const history = useHistory() - React.useEffect(() => { - if (isInitialized && goldenLayout && history && !goldenLayout.isSubWindow) { - const callback = (params: any) => { - if (params.href && params.href.startsWith('http')) { - // didn't not see a way to handle full urls with react router dom, but location works just as well I think - location = params.href - } else if (params.href) { - history.location = params.href - } else if (params.replace) { - history.replace.apply(undefined, params.replace) - } else if (params.push) { - history.push.apply(undefined, params.push) - } - } - goldenLayout.eventHub.on( - GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, - callback - ) - - return () => { - goldenLayout.eventHub.off( - GoldenLayoutWindowCommunicationEvents.consumeNavigationChange, - callback - ) - } - } - return () => {} - }, [history, goldenLayout, isInitialized]) - return null -} - -const useListenToGoldenLayoutWindowClosed = ({ - goldenLayout, - isInitialized, -}: { - goldenLayout: any - isInitialized: boolean -}) => { - React.useEffect(() => { - if (goldenLayout && isInitialized && !goldenLayout.isSubWindow) { - goldenLayout.on('windowClosed', (event: any) => { - // order of eventing is a bit off in golden layout, so we need to wait for reconciliation of windows to actually finish - // while gl does emit a stateChanged, it's missing an event, and it's before the popouts reconcile - setTimeout(() => { - goldenLayout.emit('stateChanged', event) - }, 0) - }) - return () => { - goldenLayout.off('windowClosed') - } - } - return () => {} - }, [goldenLayout, isInitialized]) -} - -export const useCrossWindowGoldenLayoutCommunication = ({ - goldenLayout, - isInitialized, - options, -}: { - goldenLayout: any - isInitialized: boolean - options: GoldenLayoutViewProps -}) => { - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface: options.selectionInterface, - }) - useProvideStateChange({ - goldenLayout, - lazyResults, - isInitialized, - }) - useProvideInitialState({ goldenLayout, isInitialized, lazyResults }) - useConsumeInitialState({ goldenLayout, lazyResults, isInitialized }) - useConsumeStateChange({ goldenLayout, lazyResults, isInitialized }) - useConsumePreferencesChange({ goldenLayout, isInitialized }) - useConsumeSubwindowLayoutChange({ goldenLayout, isInitialized }) - useListenToGoldenLayoutWindowClosed({ goldenLayout, isInitialized }) - useWindowConsumeNavigationChange({ goldenLayout, isInitialized }) - useProvideWreqrEvents({ goldenLayout, isInitialized }) - useConsumeWreqrEvents({ goldenLayout, isInitialized }) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.events.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.events.tsx deleted file mode 100644 index 5fad8cb897b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.events.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react' -import { LayoutConfig } from './golden-layout.types' - -export const goldenLayoutChangeEventName = 'golden layout change' - -export type GoldenLayoutChangeEventType = CustomEvent<{ - value: LayoutConfig - goldenLayout: any -}> - -export const dispatchGoldenLayoutChangeEvent = ( - target: HTMLElement, - detail: GoldenLayoutChangeEventType['detail'] -) => { - const customEvent = new CustomEvent(goldenLayoutChangeEventName, { - detail, - bubbles: true, - }) - target.dispatchEvent(customEvent) -} - -export const useListenToGoldenLayoutChangeEvent = ({ - callback, -}: { - callback: (e: GoldenLayoutChangeEventType) => void -}) => { - const [element, setElement] = React.useState(null) - - React.useEffect(() => { - if (element) { - element.addEventListener(goldenLayoutChangeEventName, callback) - return () => { - element.removeEventListener(goldenLayoutChangeEventName, callback) - } - } - return () => {} - }, [element, callback]) - return { - setElement, - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.tsx deleted file mode 100644 index 094a6b0ce19..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.layout-config-handling.tsx +++ /dev/null @@ -1,242 +0,0 @@ -import { GoldenLayoutViewProps } from './golden-layout.view' -import * as React from 'react' -import _merge from 'lodash/merge' -import _ from 'underscore' -import wreqr from '../../js/wreqr' -import user from '../singletons/user-instance' -import { dispatchGoldenLayoutChangeEvent } from './golden-layout.events' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { LayoutConfig, PopoutContent, ContentItem } from './golden-layout.types' -import { HeaderHeight } from './stack-toolbar' -import { getDefaultComponentState } from '../visualization/settings-helpers' -import { ResultType } from '../../js/model/Types' - -function normalizeContent(content: ContentItem) { - if (content.componentState === undefined && content.componentName) { - content.componentState = getDefaultComponentState(content.componentName) - } - if (content.content) { - content.content.forEach((subContent) => { - normalizeContent(subContent) - }) - } -} - -/** - * add in missing component state defaults, as we do not create layouts using golden layout all the time and sometimes they have minimal details, - * this will also add a default state to old layouts so they aren't seen as changed unnecessarily on load (we don't fire a change event) - */ -export function normalizeLayout(layout: LayoutConfig) { - if (layout.content && layout.content.length > 0) { - layout.content.forEach((contentItem) => { - normalizeContent(contentItem) - }) - } - if (layout.openPopouts && layout.openPopouts.length > 0) { - layout.openPopouts.forEach((popout) => { - popout.content.forEach((contentItem) => { - normalizeContent(contentItem) - }) - }) - } - return layout -} -export function getInstanceConfig({ goldenLayout }: { goldenLayout: any }) { - const currentConfig = goldenLayout.toConfig() - // tagAsProcessedByGoldenLayout({ config: currentConfig }) - return removeEphemeralStateAndNormalize(currentConfig) -} - -export function parseResultLayout(layoutResult: ResultType) { - let config = undefined - try { - config = JSON.parse(layoutResult.metacard.properties.layout) - } catch (err) { - console.warn('issue parsing a saved layout, falling back to default') - config = DEFAULT_GOLDEN_LAYOUT_CONTENT - } - _merge(config, getGoldenLayoutSettings()) - return normalizeLayout(config) -} -export function getGoldenLayoutConfig({ - layoutResult, - editLayoutRef, - configName, -}: GoldenLayoutViewProps) { - let currentConfig = undefined - if (layoutResult) { - return parseResultLayout(layoutResult) - } else if (editLayoutRef) { - currentConfig = editLayoutRef.current - } else { - currentConfig = user.get('user').get('preferences').get(configName) - } - if (currentConfig === undefined) { - currentConfig = DEFAULT_GOLDEN_LAYOUT_CONTENT - } - _merge(currentConfig, getGoldenLayoutSettings()) - return normalizeLayout(currentConfig) -} -export function handleGoldenLayoutStateChange({ - options, - goldenLayout, - currentConfig, - lastConfig, -}: { - goldenLayout: any - currentConfig: any - options: GoldenLayoutViewProps - lastConfig: React.MutableRefObject -}) { - const lastConfigValue = removeEphemeralStateAndNormalize(lastConfig.current) - - const currentConfigValue = removeEphemeralStateAndNormalize(currentConfig) - if (_.isEqual(lastConfigValue, currentConfigValue)) { - return - } - dispatchGoldenLayoutChangeEvent(goldenLayout.container[0], { - value: currentConfigValue, - goldenLayout, - }) - lastConfig.current = currentConfig - /** - * If we have this option, then we're editing a layout in the layout editor. - * Otherwise, we're using a layout (or possibly custom) and need to take a change as indication of moving to custom. - */ - if (options.editLayoutRef) { - options.editLayoutRef.current = currentConfig - } else { - // can technically do detections of max or empty here - //https://github.com/deepstreamIO/golden-layout/issues/253 - if (goldenLayout.isInitialised) { - user.get('user').get('preferences').set(options.configName, currentConfig) - ;(wreqr as any).vent.trigger('resize') - //do not add a window resize event, that will cause an endless loop. If you need something like that, listen to the wreqr resize event. - } - user.get('user').get('preferences').set( - { - layoutId: 'custom', - }, - { - internal: true, - } - ) - } -} -function removeMaximisedInformation(config: LayoutConfig) { - delete config.maximisedItemId -} -function isLayoutConfig( - config: LayoutConfig | PopoutContent | ContentItem -): config is LayoutConfig { - return (config as LayoutConfig).openPopouts !== undefined -} -function isPopoutContent( - config: LayoutConfig | PopoutContent | ContentItem -): config is PopoutContent { - return (config as PopoutContent).parentId !== undefined -} -function removeOpenPopoutDimensionInformation( - config: LayoutConfig | PopoutContent -): any { - delete config.dimensions - if ( - isLayoutConfig(config) && - config.openPopouts && - config.openPopouts?.length > 0 - ) { - return _.forEach(config.openPopouts, removeOpenPopoutDimensionInformation) - } -} -function removeSettingsInformation(config: LayoutConfig) { - delete config.settings -} -function removeUnusedTopLevelInformation( - config: LayoutConfig | ContentItem | PopoutContent -) { - delete config.isClosable - delete config.reorderEnabled - if (!isLayoutConfig(config) && !isPopoutContent(config)) { - delete config.activeItemIndex - } - if (config.content !== undefined && config.content.length > 0) { - _.forEach(config.content, removeUnusedTopLevelInformation) - } - if ( - isLayoutConfig(config) && - config.openPopouts && - config.openPopouts.length > 0 - ) { - _.forEach(config.openPopouts, removeUnusedTopLevelInformation) - } -} -function normalizeOpenPopouts(config: LayoutConfig) { - if (config.openPopouts === undefined) { - config.openPopouts = [] - } -} - -export function removeEphemeralStateAndNormalize(config: LayoutConfig) { - delete config.title // only on the top level - removeMaximisedInformation(config) - removeOpenPopoutDimensionInformation(config) - removeSettingsInformation(config) - removeUnusedTopLevelInformation(config) - normalizeOpenPopouts(config) - return config -} -export const FALLBACK_GOLDEN_LAYOUT = [ - { - type: 'stack', - content: [ - { - type: 'component', - componentName: 'cesium', - title: '3D Map', - }, - { - type: 'component', - componentName: 'inspector', - title: 'Inspector', - }, - ], - }, -] -export const DEFAULT_GOLDEN_LAYOUT_CONTENT = { - content: - StartupDataStore.Configuration.getDefaultLayout() || FALLBACK_GOLDEN_LAYOUT, -} - -export const getStringifiedDefaultLayout = () => { - try { - return JSON.stringify(DEFAULT_GOLDEN_LAYOUT_CONTENT) - } catch (err) { - console.warn(err) - return JSON.stringify(FALLBACK_GOLDEN_LAYOUT) - } -} -export function getGoldenLayoutSettings() { - return { - settings: { - showPopoutIcon: false, - popoutWholeStack: true, - responsiveMode: 'none', - }, - dimensions: { - borderWidth: 8, - minItemHeight: HeaderHeight, - minItemWidth: 50, - headerHeight: HeaderHeight, - dragProxyWidth: 300, - dragProxyHeight: 200, - }, - labels: { - close: 'close', - maximise: 'maximize', - minimise: 'minimize', - popout: 'open in new window', - popin: 'pop in', - tabDropdown: 'additional tabs', - }, - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.tsx deleted file mode 100644 index d678b999eec..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import * as React from 'react' -import { useResizableGridContext } from '../resizable-grid/resizable-grid' -import { GoldenLayoutViewReact } from './golden-layout.view' -import Grid from '@mui/material/Grid' -import Paper from '@mui/material/Paper' -import ResultSelector from '../result-selector/result-selector' -import { Elevations } from '../theme/theme' - -type Props = { - selectionInterface: any -} - -const useUpdateGoldenLayoutSize = ({ - goldenLayout, - closed, -}: { - closed: boolean - goldenLayout: any -}) => { - React.useEffect(() => { - setTimeout(() => { - if (goldenLayout && goldenLayout.isInitialised) goldenLayout.updateSize() - }, 100) - }, [closed, goldenLayout]) -} - -export const GoldenLayout = ({ selectionInterface }: Props) => { - const [goldenLayout, setGoldenLayout] = React.useState(null) - const { closed } = useResizableGridContext() - - useUpdateGoldenLayoutSize({ goldenLayout, closed }) - return ( - - - - {goldenLayout ? ( - - ) : null} - - - - - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.types.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.types.tsx deleted file mode 100644 index 57c4c1dd261..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.types.tsx +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Probably some competing locations for where we should put some of these types, like the componentState - */ -import { LayerType } from '../../js/controllers/layers' -import { ModeType } from '../visualization/results-visual/results-visual' - -interface LabelConfig { - close: string - maximise: string - minimise: string - popout: string - popin: string - tabDropdown: string -} - -export interface CesiumStateType { - mapLayers: LayerType[] -} - -export interface OpenlayersStateType { - mapLayers: LayerType[] -} - -interface TimelineState {} - -interface HistogramState {} - -export interface ResultsState { - 'results-mode': ModeType - 'results-attributesShownTable': string[] - 'results-attributesShownList': string[] -} - -interface InspectorState {} - -type ComponentState = - | { componentName: 'cesium'; state: CesiumStateType } - | { componentName: 'openlayers'; state: OpenlayersStateType } - | { componentName: 'timeline'; state: TimelineState } - | { componentName: 'histogram'; state: HistogramState } - | { componentName: 'results'; state: ResultsState } - | { componentName: 'inspector'; state: InspectorState } - -type ExtractComponentNames = T extends { componentName: infer U } ? U : never - -export type ComponentNameType = ExtractComponentNames - -export interface ContentItem { - type: string - isClosable?: boolean - reorderEnabled: boolean - title: string - activeItemIndex?: number - width?: number - height?: number - content?: ContentItem[] - componentName?: ComponentNameType - icon?: string - componentState?: ComponentState['state'] - // one of the componentNames - component?: ComponentNameType - header?: Record -} - -export interface PopoutContent { - content: ContentItem[] - parentId: string - indexInParent: number - dimensions?: PopoutDimensions - reorderEnabled?: boolean - isClosable?: boolean - title?: string -} - -interface LayoutSettings { - hasHeaders: boolean - constrainDragToContainer: boolean - reorderEnabled: boolean - selectionEnabled: boolean - popoutWholeStack: boolean - blockedPopoutsThrowError: boolean - closePopoutsOnUnload: boolean - showPopoutIcon: boolean - showMaximiseIcon: boolean - showCloseIcon: boolean - responsiveMode: string - tabOverlapAllowance: number - reorderOnTabMenuClick: boolean - tabControlOffset: number -} - -interface LayoutDimensions { - borderWidth: number - borderGrabWidth: number - minItemHeight: number - minItemWidth: number - headerHeight: number - dragProxyWidth: number - dragProxyHeight: number -} - -interface PopoutDimensions { - width: number - height: number - left: number - top: number -} - -export interface LayoutConfig { - labels: LabelConfig - content: ContentItem[] - id?: string | string[] - openPopouts?: PopoutContent[] - settings?: LayoutSettings - dimensions?: LayoutDimensions - reorderEnabled?: boolean - isClosable?: boolean - title?: string - maximisedItemId?: string | null -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.view.tsx deleted file mode 100644 index d0abbd38dec..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/golden-layout.view.tsx +++ /dev/null @@ -1,631 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { createRoot } from 'react-dom/client' -import _ from 'underscore' -import _debounce from 'lodash/debounce' -import _cloneDeep from 'lodash.clonedeep' -import _isEqualWith from 'lodash.isequalwith' -import $ from 'jquery' -import wreqr from '../../js/wreqr' -import GoldenLayout from 'golden-layout' -import Button from '@mui/material/Button' -import ExtensionPoints from '../../extension-points/extension-points' -import { Visualizations } from '../visualization/visualizations' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' -import { - Dialog, - DialogActions, - DialogContent, - DialogTitle, -} from '@mui/material' -import { StackToolbar, MinimizedHeight } from './stack-toolbar' -import { GoldenLayoutComponentHeader } from './visual-toolbar' -import { - UseSubwindowConsumeNavigationChange, - useCrossWindowGoldenLayoutCommunication, - GoldenLayoutWindowCommunicationEvents, -} from './cross-window-communication' -import { useVerifyMapExistsWhenDrawing } from './verify-map' -import { VisualSettingsProvider } from './visual-settings.provider' -import { getInstanceConfig } from './golden-layout.layout-config-handling' -import { getGoldenLayoutConfig } from './golden-layout.layout-config-handling' -import { handleGoldenLayoutStateChange } from './golden-layout.layout-config-handling' -import { getGoldenLayoutSettings } from './golden-layout.layout-config-handling' - -/** - * For some reason golden layout removes configs from local storage upon first load of popout window, which means refreshing doesn't work. - * This prevents this line from doing so: https://github.com/golden-layout/golden-layout/blob/v1.5.9/src/js/LayoutManager.js#L797 - */ -import { getDefaultComponentState } from '../visualization/settings-helpers' -import { ComponentNameType } from './golden-layout.types' -;(function preventRemovalFromStorage() { - const normalRemoveItem = window.localStorage.removeItem - window.localStorage.removeItem = (key: string) => { - if (key.includes('gl-window')) { - return - } else { - normalRemoveItem(key) - } - } -})() - -/** - * We attach this at the component level due to how popouts work. - * Essentially golden layout disconnects us from React and our providers in popouts to fullscreen visuals, - * so we can't use Dialog further up the tree. - */ -const UseMissingParentWindow = ({ goldenLayout }: { goldenLayout: any }) => { - const [missingWindow, setMissingWindow] = React.useState(false) - React.useEffect(() => { - if (goldenLayout && goldenLayout.isSubWindow && window.opener === null) { - setMissingWindow(true) - } - }, [goldenLayout]) - - if (missingWindow) { - return ( - - Could not find parent visualization - Please close the window. - - - - - ) - } - return null -} - -const GoldenLayoutComponent = ({ - ComponentView, - options, - container, - goldenLayout, - componentState, -}: { - goldenLayout: any - options: any - ComponentView: any - container: GoldenLayout.Container - componentState: { - componentName: ComponentNameType - } -}) => { - const { height } = useContainerSize(container) - const isMinimized = height && height <= MinimizedHeight - const normalizedComponentState = React.useMemo(() => { - return { - ...getDefaultComponentState(componentState.componentName), - componentState, - } - }, [componentState]) - - return ( - - - - - - - - - - ) -} -// see https://github.com/deepstreamIO/golden-layout/issues/239 for details on why the setTimeout is necessary -// The short answer is it mostly has to do with making sure these ComponentViews are able to function normally (set up events, etc.) -function registerComponent( - marionetteView: { goldenLayout: any; options: any }, - name: any, - ComponentView: any, - componentOptions: any, - viz: any -) { - const options = _.extend({}, marionetteView.options, componentOptions) - marionetteView.goldenLayout.registerComponent( - name, - (container: any, componentState: any) => { - container.on('open', () => { - setTimeout(() => { - const root = createRoot(container.getElement()[0]) - root.render( - - ) - container.on('destroy', () => { - root.unmount() - }) - }, 0) - }) - container.on('tab', (tab: any) => { - tab.closeElement.off('click').on('click', (event: any) => { - if ( - tab.header.parent.isMaximised && - tab.header.parent.contentItems.length === 1 - ) { - tab.header.parent.toggleMaximise() - } - tab._onCloseClickFn(event) - }) - const root = document.createElement('div') - tab.element.append(root) - let intervalId = setInterval(() => { - try { - const renderRoot = createRoot(tab.element[0]) - renderRoot.render( - - ) - tab.header.on('destroy', () => { - renderRoot.unmount() - }) - clearInterval(intervalId) - } catch (err) {} - }, 100) - }) - } - ) -} -export type GoldenLayoutViewProps = { - layoutResult?: LazyQueryResult['plain'] - editLayoutRef?: React.MutableRefObject - configName?: string - selectionInterface: any - setGoldenLayout: (instance: any) => void -} - -function registerGoldenLayoutComponents({ - goldenLayout, - options, -}: { - goldenLayout: any - options: GoldenLayoutViewProps -}) { - Visualizations.forEach((viz) => { - try { - registerComponent( - { goldenLayout, options }, - viz.id, - viz.view, - viz.options, - viz - ) - } catch (err) { - // likely already registered, in dev - } - }) -} - -function handleGoldenLayoutStateChangeInSubwindow({ - goldenLayout, -}: { - goldenLayout: any -}) { - // shouldn't need to send anything, as the main window can determine the config from the subwindow - goldenLayout.eventHub.emit( - GoldenLayoutWindowCommunicationEvents.consumeSubwindowLayoutChange, - null - ) -} - -/** - * Replace the toolbar with our own - */ -function handleGoldenLayoutStackCreated(stack: any) { - let intervalId = setInterval(() => { - try { - const renderRoot = createRoot(stack.header.controlsContainer[0]) - renderRoot.render() - stack.on('activeContentItemChanged', function (contentItem: any) { - wreqr.vent.trigger('activeContentItemChanged', contentItem) - }) - stack.on('destroy', () => { - renderRoot.unmount() - }) - clearInterval(intervalId) - } catch (err) {} - }, 100) -} - -function useContainerSize(container: GoldenLayout.Container) { - const [width, setWidth] = React.useState(container.width) - const [height, setHeight] = React.useState( - container.height - ) - - React.useEffect(() => { - if (container) { - const resizeCallback = () => { - setWidth(container.width) - setHeight(container.height) - } - container.on('resize', resizeCallback) - return () => { - container.off('resize', resizeCallback) - } - } - return () => {} - }, [container]) - return { height, width } -} - -const useUpdateGoldenLayoutSize = ({ - wreqr, - goldenLayout, -}: { - wreqr: any - goldenLayout: any -}) => { - useListenTo((wreqr as any).vent, 'gl-updateSize', () => { - if (goldenLayout && goldenLayout.isInitialised) goldenLayout.updateSize() - }) - React.useEffect(() => { - if (goldenLayout) { - const randomString = Math.random().toString() - $(window).on( - 'resize.' + randomString, - _debounce( - () => { - if (goldenLayout.isInitialised) goldenLayout.updateSize() - }, - 100, - { - leading: false, - trailing: true, - } - ) - ) - return () => { - $(window).off('resize.' + randomString) - } - } - return () => {} - }, [goldenLayout]) -} - -const useSendGoldenLayoutReferenceUpwards = ({ - options, - goldenLayout, -}: { - goldenLayout: any - options: GoldenLayoutViewProps -}) => { - React.useEffect(() => { - if (goldenLayout) { - options.setGoldenLayout(goldenLayout) - } - return () => { - if (goldenLayout) { - goldenLayout.destroy() - } - } - }, [goldenLayout]) -} - -const useAttachGoldenLayout = ({ - goldenLayoutAttachElement, - setGoldenLayout, - options, -}: { - options: GoldenLayoutViewProps - setGoldenLayout: React.Dispatch - goldenLayoutAttachElement: HTMLDivElement | null -}) => { - React.useEffect(() => { - if (goldenLayoutAttachElement) { - setGoldenLayout( - new GoldenLayout( - getGoldenLayoutConfig(options), - goldenLayoutAttachElement - ) - ) - } - }, [goldenLayoutAttachElement]) -} - -const useRegisterGoldenLayoutComponents = ({ - options, - goldenLayout, -}: { - options: GoldenLayoutViewProps - goldenLayout: any -}) => { - const [finished, setFinished] = React.useState(false) - React.useEffect(() => { - if (goldenLayout) { - registerGoldenLayoutComponents({ - goldenLayout, - options, - }) - setFinished(true) - } - }, [goldenLayout]) - return finished -} - -const useListenToGoldenLayoutStateChanges = ({ - options, - goldenLayout, - lastConfig, -}: { - options: GoldenLayoutViewProps - goldenLayout: any - lastConfig: React.MutableRefObject -}) => { - const [finished, setFinished] = React.useState(false) - - React.useEffect(() => { - if (goldenLayout) { - const debouncedHandleGoldenLayoutStateChange = _.debounce( - ({ currentConfig }: { currentConfig: any }) => { - ;(wreqr as any).vent.trigger('resize') // trigger resize of things like map - if (!goldenLayout.isSubWindow) { - // this function applies only to the main window, we have to communicate subwindow updates back to the original window instead - handleGoldenLayoutStateChange({ - options, - currentConfig, - goldenLayout, - lastConfig, - }) - } else { - handleGoldenLayoutStateChangeInSubwindow({ goldenLayout }) - } - }, - 200 - ) - /** - * There is a bug in golden layout as follows: - * If you have a layout with 2 items (inspector above inspector for instance), close an item, then close the other, - * the final state change event is not triggered to show content as [] or empty. Oddly enough it works in other scenarios. - * I haven't determined a workaround for this, but it's not bothering users as far as I know at the moment. - * Basically the bug is that empty layouts aren't guaranteed to be saved, but non empty will always save appropriately. - */ - goldenLayout.on('stateChanged', (event: any) => { - if (!event) { - return - } - const fullyInitialized = - goldenLayout.isInitialised && - !(goldenLayout?.openPopouts as Array)?.some( - (popout: any) => !popout.isInitialised - ) - if (!fullyInitialized) { - setTimeout(() => { - goldenLayout.emit('stateChanged', 'retry') - }, 200) - return - } - const currentConfig = getInstanceConfig({ goldenLayout }) - /** - * Get the config instantly, that way if we navigate away and the component is removed from the document we still get the correct config - * However, delay the actual attempt to save the config, so we don't save too often. - */ - debouncedHandleGoldenLayoutStateChange({ - currentConfig, - }) - }) - setFinished(true) - return () => { - goldenLayout.off('stateChanged') - } - } - return () => {} - }, [goldenLayout]) - return finished -} - -/** - * This will attach our custom toolbar to the golden layout stack header - */ -const useListenToGoldenLayoutStackCreated = ({ - goldenLayout, -}: { - goldenLayout: any -}) => { - const [finished, setFinished] = React.useState(false) - - React.useEffect(() => { - if (goldenLayout) { - goldenLayout.on('stackCreated', handleGoldenLayoutStackCreated) - setFinished(true) - return () => { - goldenLayout.off('stackCreated') - } - } - return () => {} - }, [goldenLayout]) - return finished -} - -type popupHandlingStateType = 'allowed' | 'blocked' | 'proceed' - -const useInitGoldenLayout = ({ - dependencies, - goldenLayout, -}: { - dependencies: Array - goldenLayout: any -}) => { - const [finished, setFinished] = React.useState(false) - const [error, setError] = React.useState(false) - const [popupHandlingState, setPopupHandlingState] = - React.useState('allowed') - - React.useEffect(() => { - if (dependencies.every((dependency) => dependency)) { - if (goldenLayout.isSubWindow && window.opener === null) { - setError(true) - } - const onInit = () => { - setFinished(true) - } - goldenLayout.on('initialised', onInit) - if (goldenLayout.isSubWindow) { - // for some reason subwindow stacks lose dimensions, specifically the header height (see _createConfig in golden layout source code) - goldenLayout.config.dimensions = getGoldenLayoutSettings().dimensions - } - try { - goldenLayout.init() - } catch (e) { - if (e.type === 'popoutBlocked') { - setPopupHandlingState('blocked') - goldenLayout.openPopouts?.forEach((popout: any) => { - popout.close() - }) - } - } - - return () => { - goldenLayout.off('initialised', onInit) - } - } - return () => {} - }, [...dependencies, popupHandlingState]) - return { - finished, - error, - setPopupHandlingState, - popupHandlingState, - } -} - -const HandlePopoutsBlocked = ({ - setPopupHandlingState, - goldenLayout, -}: { - goldenLayout: any - setPopupHandlingState: React.Dispatch -}) => { - return ( - - Visualization popups blocked - - Please allow popups for this site, then click the button below to retry - loading your visualization layout. - - - - - - - ) -} - -export const GoldenLayoutViewReact = (options: GoldenLayoutViewProps) => { - const [goldenLayoutAttachElement, setGoldenLayoutAttachElement] = - React.useState(null) - const [goldenLayout, setGoldenLayout] = React.useState(null) - const lastConfig = React.useRef(getGoldenLayoutConfig(options)) - useUpdateGoldenLayoutSize({ wreqr, goldenLayout }) - useSendGoldenLayoutReferenceUpwards({ options, goldenLayout }) - useAttachGoldenLayout({ goldenLayoutAttachElement, setGoldenLayout, options }) - const goldenLayoutComponentsRegistered = useRegisterGoldenLayoutComponents({ - options, - goldenLayout, - }) - const listeningToGoldenLayoutStateChanges = - useListenToGoldenLayoutStateChanges({ options, goldenLayout, lastConfig }) - const listeningToGoldenLayoutStackCreated = - useListenToGoldenLayoutStackCreated({ goldenLayout }) - - const { finished, error, setPopupHandlingState, popupHandlingState } = - useInitGoldenLayout({ - dependencies: [ - goldenLayoutComponentsRegistered, - listeningToGoldenLayoutStateChanges, - listeningToGoldenLayoutStackCreated, - ], - goldenLayout, - }) - - useCrossWindowGoldenLayoutCommunication({ - goldenLayout, - isInitialized: !error && finished, - options, - }) - - useVerifyMapExistsWhenDrawing({ - goldenLayout, - isInitialized: !error && finished, - }) - - return ( -
- {popupHandlingState === 'blocked' ? ( - - ) : null} -
-
- ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/selection-ripple.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/selection-ripple.tsx deleted file mode 100644 index 64f71e77d59..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/selection-ripple.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useLazyResultsSelectedResultsFromSelectionInterface } from '../selection-interface/hooks' -import { useTheme } from '@mui/material/styles' - -const SelectionRipple = ({ - selectionInterface, -}: { - selectionInterface: any -}) => { - const theme = useTheme() - const selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResultsArray = Object.values(selectedResults) - const [hasSelection, setHasSelection] = React.useState( - selectedResultsArray.length !== 0 - ) - React.useEffect(() => { - setHasSelection(selectedResultsArray.length !== 0) - }) - return ( -
- ) -} - -export default hot(module)(SelectionRipple) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/stack-toolbar.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/stack-toolbar.tsx deleted file mode 100644 index c16bdcd1929..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/stack-toolbar.tsx +++ /dev/null @@ -1,481 +0,0 @@ -import GoldenLayout from 'golden-layout' -import React from 'react' -import MuiTooltip, { TooltipProps } from '@mui/material/Tooltip' -import FullscreenExitIcon from '@mui/icons-material/FullscreenExit' -import FullscreenIcon from '@mui/icons-material/Fullscreen' -import MinimizeIcon from '@mui/icons-material/Minimize' -import CloseIcon from '@mui/icons-material/Close' -import PopoutIcon from '@mui/icons-material/OpenInNew' - -import Button from '@mui/material/Button' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' -import ExtensionPoints from '../../extension-points/extension-points' - -export const HeaderHeight = 32 -export const MinimizedHeight = HeaderHeight + 5 - -/** - * There's a bit of funkiness with normal tooltip behavior when we click the minimize buttons, as the tooltip sticks behind and flickers. - * This ensures that when the user clicks the button, the tooltip will be hidden. - */ -export function CloseOnClickTooltip(props: TooltipProps) { - const [show, setShow] = React.useState(false) - - return ( - setShow(true)} - onMouseLeave={() => setShow(false)} - onMouseDown={() => setShow(false)} - {...props} - /> - ) -} - -/** - * This can change, so do not store it in a variable, instead keep around the Root from getRoot and refind the base item as necessary. - * @param stack - * @returns - */ -export function getRootColumnContent( - stack: GoldenLayout.ContentItem | GoldenLayout.Tab -): GoldenLayout.ContentItem | undefined { - const root = getRoot(stack) - if (root) { - return root.contentItems[0] - } - return undefined -} - -function getStackInMinimizedLocation({ - goldenLayoutRoot, -}: { - goldenLayoutRoot: GoldenLayout.ContentItem -}): GoldenLayout.Container | undefined { - const rootColumnContent = getRootColumnContent(goldenLayoutRoot) - if (rootColumnContent) { - return ( - rootColumnContent.contentItems[ - rootColumnContent.contentItems.length - 1 - ].getActiveContentItem() as any - ).container as GoldenLayout.Container - } - return undefined -} - -export function rootIsNotAColumn(goldenLayoutRoot: GoldenLayout.ContentItem) { - return ( - getRootColumnContent(goldenLayoutRoot) && - !getRootColumnContent(goldenLayoutRoot)?.isColumn - ) -} - -export function rootIsEmpty(goldenLayoutRoot: GoldenLayout.ContentItem) { - return !getRootColumnContent(goldenLayoutRoot) -} - -// to avoid fixing types everywhere, let's make a function -function getStackHeight({ - stack, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - return (stack.element as unknown as GoldenLayout.Header['element']).height() -} - -export function getBottomItem( - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -): GoldenLayout.ContentItem | undefined { - const rootColumnContent = getRootColumnContent(stack) - if (rootColumnContent) { - return rootColumnContent.contentItems[ - rootColumnContent.contentItems.length - 1 - ] - } - return undefined -} - -export function useStackSize( - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -) { - if (stack.titleElement) { - stack = stack.contentItem.parent as any // this is a tab, so find the stack related to the tab - } - const [width, setWidth] = React.useState( - stack.header.element.width() - ) - const [height, setHeight] = React.useState( - getStackHeight({ stack }) - ) - - React.useEffect(() => { - if (stack) { - const resizeCallback = () => { - setWidth(stack.header.element.width()) - setHeight(getStackHeight({ stack })) - } - stack.on('resize', resizeCallback) - return () => { - stack.off('resize', resizeCallback) - } - } - return () => {} - }, [stack]) - return { height, width } -} - -export function useIsMaximized({ - stack, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - const [isMaximized, setIsMaximized] = React.useState(false) - React.useEffect(() => { - const maximizedCallback = () => { - setIsMaximized(true) - } - stack.on('maximised', maximizedCallback) - const minimizedCallback = () => { - setIsMaximized(false) - } - stack.on('minimised', minimizedCallback) - return () => { - stack.off('maximised', maximizedCallback) - stack.off('minimised', minimizedCallback) - } - }, [stack]) - React.useEffect(() => { - setIsMaximized(stack.isMaximised) - }, [stack]) - return isMaximized -} - -/** - * Will return a safe, unchanging reference, feel free to keep in a variable - * @param stack - * @returns - */ -function getRoot( - stack: GoldenLayout.ContentItem | GoldenLayout.Tab -): GoldenLayout.ContentItem | undefined { - if (!stack) { - return undefined - } - const stackAsContentItem = stack as GoldenLayout.ContentItem - if (stackAsContentItem?.isRoot) { - return stackAsContentItem - } - let parent = stackAsContentItem.parent - if (parent?.type === 'root') { - return parent - } else { - return getRoot(parent) - } -} - -export function useRoot(stack: GoldenLayout.Tab & GoldenLayout.ContentItem) { - const [root, setRoot] = React.useState(getRoot(stack)) - React.useEffect(() => { - setRoot(getRoot(stack)) - }, [stack]) - return root -} - -// by ready, we mean the stack to be minimized is already on the bottom of a column layout => aka we can just resize it -function layoutIsAlreadyReady({ - stack, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - const bottomItem = getBottomItem(stack) - const isBottomItem = stack === bottomItem - return ( - (isBottomItem && getRootColumnContent(stack)?.isColumn) || - (!getRootColumnContent(stack)?.isColumn && - !getRootColumnContent(stack)?.isRow) - ) -} - -// check if a minimized stack already exists -export function layoutAlreadyHasMinimizedStack({ - stack, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - const bottomItem = getBottomItem(stack) - - return ( - getRootColumnContent(stack)?.isColumn && - (bottomItem as any).pixelHeight <= MinimizedHeight - ) -} - -// add the stack to the existing minimized stack -function addStackToExistingMinimizedStack({ - stack, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - const bottomItem = getBottomItem(stack) - if (bottomItem) { - stack.contentItems.slice().forEach((thing) => { - stack.removeChild(thing as any, true) // for some reason removeChild is overly restrictive on type of "thing" so we have to cast - bottomItem.addChild(thing, undefined) - }) - } -} - -// we have to move each item individually because golden layout doesn't support moving an entire stack, and addChild does not work as documentation says (it doesn't remove the existing automatically) -function createNewStackFromExistingStack({ - stack, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - const existingItems = stack.contentItems.slice() - const newStackItem = stack.layoutManager._$normalizeContentItem({ - type: 'stack', - }) - existingItems.forEach((thing) => { - stack.removeChild(thing as any, true) // for some reason removeChild is overly restrictive on type of "thing" so we have to cast - newStackItem.addChild(thing, undefined) - }) - return newStackItem -} - -// create a new minimized stack and add the stack to it -function createAndAddNewMinimizedStack({ - stack, - goldenLayoutRoot, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem - goldenLayoutRoot: GoldenLayout.ContentItem -}) { - const newStackItem = createNewStackFromExistingStack({ stack }) - if (rootIsNotAColumn(goldenLayoutRoot)) { - const existingRootContent = getRootColumnContent(goldenLayoutRoot) - goldenLayoutRoot.removeChild(existingRootContent as any, true) // for some reason removeChild is overly restrictive on type of "thing" so we have to cast - - // we need a column for minimize to work, so make a new column and add the existing root to it - const newColumnItem = stack.layoutManager._$normalizeContentItem({ - type: 'column', - }) - newColumnItem.addChild(existingRootContent) - newColumnItem.addChild(newStackItem) - - goldenLayoutRoot.addChild(newColumnItem) - } else if (rootIsEmpty(goldenLayoutRoot)) { - const newColumnItem = stack.layoutManager._$normalizeContentItem({ - type: 'column', - }) - newColumnItem.addChild(newStackItem) - - goldenLayoutRoot.addChild(newColumnItem) - } else { - getRootColumnContent(goldenLayoutRoot)?.addChild(newStackItem) - } -} - -// the true height of the stack - the golden layout implementation at the moment only tracks the height of the visual within the stack, not the stack itself -function getTrueHeight({ - goldenLayoutRoot, -}: { - goldenLayoutRoot: GoldenLayout.ContentItem -}) { - return ( - getStackInMinimizedLocation({ goldenLayoutRoot })?.parent.parent - .element as unknown as GoldenLayout.Header['element'] - ).height() -} - -export function adjustStackInMinimizedPlaceIfNecessary({ - goldenLayoutRoot, -}: { - goldenLayoutRoot: GoldenLayout.ContentItem -}) { - if (getRootColumnContent(goldenLayoutRoot)?.isColumn) { - const trueHeight = getTrueHeight({ goldenLayoutRoot }) - const minimizedStack = getStackInMinimizedLocation({ goldenLayoutRoot }) - if (minimizedStack) { - minimizedStack.height = trueHeight || minimizedStack.height // otherwise setSize will not work correctly! - this allows us to consistently and always set the height to what we want! - minimizedStack.setSize(10, HeaderHeight) - } - } -} - -// keep track of pixel height on each stack, which allows us to detect when a stack is "minimized" later on -function usePixelHeightTracking( - stack: GoldenLayout.Tab & GoldenLayout.ContentItem, - height: number | undefined -) { - React.useEffect(() => { - if (stack) { - ;(stack as any).pixelHeight = height - } - }, [height, stack]) - const goldenLayoutRoot = useRoot(stack) - - const minimizeCallback = React.useCallback(() => { - if (!goldenLayoutRoot) { - return - } - if (layoutIsAlreadyReady({ stack })) { - // do nothing? just resize to be minimized - } else if (layoutAlreadyHasMinimizedStack({ stack })) { - // minimized area exists, add this to it - addStackToExistingMinimizedStack({ stack }) - } else { - // rearrange layout if necessary and move the stack - createAndAddNewMinimizedStack({ stack, goldenLayoutRoot }) - } - adjustStackInMinimizedPlaceIfNecessary({ goldenLayoutRoot }) - }, [stack, goldenLayoutRoot]) - - return { minimizeCallback } -} - -function useCanBeMinimized({ - stack, - height, - width, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem - height?: number - width?: number -}) { - const [canBeMinimized, setCanBeMinimized] = React.useState(true) - React.useEffect(() => { - const rootContent = getRootColumnContent(stack) - if (rootContent?.isStack) { - setCanBeMinimized(false) - } else { - setCanBeMinimized(true) - } - }, [stack, height, width]) - return canBeMinimized -} - -export const StackToolbar = ({ - stack, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) => { - const isMaximized = useIsMaximized({ stack }) - const { height, width } = useStackSize(stack) - const { minimizeCallback } = usePixelHeightTracking(stack, height) - const canBeMinimized = useCanBeMinimized({ stack, width, height }) - const isMinimized = height && height <= MinimizedHeight - return ( - -
- <> - {isMaximized || isMinimized || !canBeMinimized ? ( - <> - ) : ( -
- - Minimize stack of visuals to bottom of layout - - } - > - - -
- )} - {isMaximized ? ( -
- - Restore stack of visuals to original size - - } - > - - -
- ) : ( -
- - Maximize stack of visuals - - } - > - - -
- )} - - {stack.layoutManager.isSubWindow ? null : ( -
- - Open stack of visuals in new window - - } - > - - -
- )} - -
- {(stack.header as any)._isClosable() ? ( - - Close stack of visuals - - } - > - - - ) : null} -
- -
-
- ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/verify-map.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/verify-map.tsx deleted file mode 100644 index e0363313643..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/verify-map.tsx +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import wreqr from '../../js/wreqr' -import { Visualizations } from '../visualization/visualizations' -import { BrowserWindow, ContentItem } from 'golden-layout' - -function findMap(item: any) { - return item.componentName === 'openlayers' || item.componentName === 'cesium' -} - -function searchPopouts(popouts: BrowserWindow[]) { - let popoutItems: ContentItem[] = [] - popouts.forEach((popout) => { - popoutItems.push(...popout.getGlInstance().root.getItemsByFilter(findMap)) - }) - return popoutItems -} - -/** - * Notice that we are only forwarding events that start with 'search' for now, as these are drawing events. - */ -export const useVerifyMapExistsWhenDrawing = ({ - goldenLayout, - isInitialized, -}: { - goldenLayout: any - isInitialized: boolean -}) => { - useListenTo( - (wreqr as any).vent, - 'search:drawline search:drawpoly search:drawbbox search:drawcircle', - () => { - if (goldenLayout && isInitialized) { - // // Launch the 2D Map (openlayers) if it's not already open - const contentItems = goldenLayout.root.getItemsByFilter(findMap) - const popoutItems = searchPopouts(goldenLayout.openPopouts) - if (contentItems.length === 0 && popoutItems.length === 0) { - const configs = Visualizations.reduce((cfg, viz) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosable' does not exist on type 'Visu... Remove this comment to see the full error message - const { id, title, icon, isClosable = true } = viz - cfg[id] = { - title, - type: 'component', - componentName: id, - icon, - componentState: {}, - isClosable, - } - return cfg - }, {} as { [key: string]: any }) - if (goldenLayout.root.contentItems.length === 0) { - goldenLayout.root.addChild({ - type: 'column', - content: [configs['openlayers']], - }) - } else { - if (goldenLayout.root.contentItems[0].isColumn) { - goldenLayout.root.contentItems[0].contentItems[0].addChild( - configs['openlayers'], - 0 - ) - } else { - goldenLayout.root.contentItems[0].addChild( - configs['openlayers'], - 0 - ) - } - } - } - } - } - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/visual-settings.provider.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/visual-settings.provider.tsx deleted file mode 100644 index 32530f435f1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/visual-settings.provider.tsx +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -type LayoutContextType = { - getValue: (key: string, defaultValue?: any) => any - setValue: (key: string, value: any) => void - onStateChanged: (callback: () => void) => void - visualTitle: string - hasLayoutContext: boolean -} - -export const LayoutContext = React.createContext({ - getValue: () => {}, - setValue: () => {}, - onStateChanged: (callback: () => void) => callback(), - visualTitle: '', - hasLayoutContext: false, -}) - -type VisualSettingsProviderProps = { - container: any - goldenLayout: any - children: React.ReactNode -} - -export const VisualSettingsProvider = (props: VisualSettingsProviderProps) => { - const { container, goldenLayout, children } = props - - const getVisualSettingValue = (key: string, defaultValue?: any) => { - let settingsVal = container.getState()?.[key] - - if ((!settingsVal || settingsVal.length === 0) && defaultValue) { - settingsVal = defaultValue - } - return settingsVal - } - - const setVisualSettingValue = (key: string, value: any) => { - container.setState({ ...(container.getState() || {}), [key]: value }) - } - - const onVisualSettingChangedListener = (callback: () => void) => { - goldenLayout.on('stateChanged', () => callback()) - } - - return ( - - {children} - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/visual-toolbar.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/visual-toolbar.tsx deleted file mode 100644 index 2e642271065..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/golden-layout/visual-toolbar.tsx +++ /dev/null @@ -1,276 +0,0 @@ -import GoldenLayout from 'golden-layout' -import React from 'react' -import MinimizeIcon from '@mui/icons-material/Minimize' -import CloseIcon from '@mui/icons-material/Close' -import PopoutIcon from '@mui/icons-material/OpenInNew' - -import Button from '@mui/material/Button' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' -import ExtensionPoints from '../../extension-points/extension-points' -import { - CloseOnClickTooltip, - MinimizedHeight, - adjustStackInMinimizedPlaceIfNecessary, - getBottomItem, - getRootColumnContent, - layoutAlreadyHasMinimizedStack, - rootIsEmpty, - rootIsNotAColumn, - useIsMaximized, - useRoot, - useStackSize, -} from './stack-toolbar' -import { Grid } from '@mui/material' -import _ from 'underscore' - -function useStackRelatedToTab(tab: GoldenLayout.Tab) { - const [stack, setStack] = React.useState(tab.contentItem.parent) - React.useEffect(() => { - setStack(tab.contentItem.parent) - }, [tab]) - return stack as GoldenLayout.Tab & GoldenLayout.ContentItem -} - -// add the tab to the existing minimized stack -function addTabToExistingMinimizedStack({ - tab, - stack, -}: { - tab: GoldenLayout.Tab & GoldenLayout.ContentItem - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - const bottomItem = getBottomItem(stack) - if (bottomItem) { - stack.removeChild(tab.contentItem as any, true) // for some reason removeChild is overly restrictive on type of "thing" so we have to cast - bottomItem.addChild(tab.contentItem, undefined) - } -} - -// we have to move each item individually because golden layout doesn't support moving an entire stack, and addChild does not work as documentation says (it doesn't remove the existing automatically) -function createNewStackFromExistingTab({ - tab, - stack, -}: { - tab: GoldenLayout.Tab & GoldenLayout.ContentItem - stack: GoldenLayout.Tab & GoldenLayout.ContentItem -}) { - const existingItem = tab.contentItem - const newStackItem = stack.layoutManager._$normalizeContentItem({ - type: 'stack', - }) - stack.removeChild(existingItem as any, true) // for some reason removeChild is overly restrictive on type of "thing" so we have to cast - newStackItem.addChild(existingItem, undefined) - return newStackItem -} - -function createAndAddNewMinimizedStackForTab({ - tab, - stack, - goldenLayoutRoot, -}: { - tab: GoldenLayout.Tab & GoldenLayout.ContentItem - stack: GoldenLayout.Tab & GoldenLayout.ContentItem - goldenLayoutRoot: GoldenLayout.ContentItem -}) { - const newStackItem = createNewStackFromExistingTab({ stack, tab }) - if (rootIsNotAColumn(goldenLayoutRoot)) { - const existingRootContent = getRootColumnContent(goldenLayoutRoot) - goldenLayoutRoot.removeChild(existingRootContent as any, true) // for some reason removeChild is overly restrictive on type of "thing" so we have to cast - - // we need a column for minimize to work, so make a new column and add the existing root to it - const newColumnItem = stack.layoutManager._$normalizeContentItem({ - type: 'column', - }) - newColumnItem.addChild(existingRootContent) - newColumnItem.addChild(newStackItem) - - goldenLayoutRoot.addChild(newColumnItem) - } else if (rootIsEmpty(goldenLayoutRoot)) { - const newColumnItem = stack.layoutManager._$normalizeContentItem({ - type: 'column', - }) - newColumnItem.addChild(newStackItem) - - goldenLayoutRoot.addChild(newColumnItem) - } else { - getRootColumnContent(goldenLayoutRoot)?.addChild(newStackItem) - } -} - -// keep track of pixel height on each stack, which allows us to detect when a stack is "minimized" later on -function usePixelHeightTrackingForTab( - tab: GoldenLayout.Tab & GoldenLayout.ContentItem, - stack: GoldenLayout.Tab & GoldenLayout.ContentItem, - height: number | undefined -) { - React.useEffect(() => { - if (stack) { - ;(stack as any).pixelHeight = height - } - }, [height, stack]) - const goldenLayoutRoot = useRoot(stack) - - const minimizeCallback = React.useCallback(() => { - if (!goldenLayoutRoot) { - return - } - if (layoutAlreadyHasMinimizedStack({ stack })) { - // minimized area exists, add this to it - addTabToExistingMinimizedStack({ tab, stack }) - } else { - // rearrange layout if necessary and move the stack - createAndAddNewMinimizedStackForTab({ tab, stack, goldenLayoutRoot }) - } - adjustStackInMinimizedPlaceIfNecessary({ goldenLayoutRoot }) - }, [stack, goldenLayoutRoot]) - - return { minimizeCallback } -} - -function useCanBeMinimizedTab({ - stack, - height, - width, -}: { - stack: GoldenLayout.Tab & GoldenLayout.ContentItem - height?: number - width?: number -}) { - const [itemCount, setItemCount] = React.useState(stack.contentItems.length) - const [canBeMinimized, setCanBeMinimized] = React.useState(true) - React.useEffect(() => { - const rootContent = getRootColumnContent(stack) - if (rootContent?.isStack && rootContent?.contentItems.length === 1) { - setCanBeMinimized(false) - } else { - setCanBeMinimized(true) - } - }, [stack, height, width, itemCount]) - React.useEffect(() => { - if (stack) { - const callback = () => { - setItemCount(stack.contentItems.length) - } - stack.on('itemCreated', callback) - stack.on('itemDestroyed', callback) - return () => { - stack.off('itemCreated', callback) - stack.off('itemDestroyed', callback) - } - } - return () => {} - }, [stack]) - return canBeMinimized -} - -export const GoldenLayoutComponentHeader = ({ - viz, - tab, - options, - componentState, - container, - name, -}: { - viz: any - tab: GoldenLayout.Tab & GoldenLayout.ContentItem - options: any - componentState: any - container: any - name: any -}) => { - const relatedStack = useStackRelatedToTab(tab) - const { height, width } = useStackSize(relatedStack) - const { minimizeCallback } = usePixelHeightTrackingForTab( - tab as any, - relatedStack, - height - ) - const canBeMinimized = useCanBeMinimizedTab({ - stack: relatedStack, - width, - height, - }) - const isMaximized = useIsMaximized({ stack: relatedStack }) - const isMinimized = height && height <= MinimizedHeight - return ( - -
- -
{tab.titleElement.text()}
-
- - {viz.header ? ( - - ) : null} - - {isMinimized || isMaximized || !canBeMinimized ? ( - <> - ) : ( - - - Minimize visual to bottom of layout - - } - > - - - - )} - - - {!tab.contentItem.layoutManager.isSubWindow && - tab.closeElement[0].style.display !== 'none' ? ( - - Open visual in new window - - } - > - - - ) : null} - - - {tab.closeElement[0].style.display !== 'none' ? ( - - Close visual - - } - > - - - ) : null} - -
-
- ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/help/help.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/help/help.view.tsx deleted file mode 100644 index f0c14f9c8e3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/help/help.view.tsx +++ /dev/null @@ -1,420 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import queryString from 'query-string' -import { useHistory, useLocation } from 'react-router-dom' -import { useMenuState, useRerenderingRef } from '../menu-state/menu-state' -import Popover from '@mui/material/Popover' -import Button from '@mui/material/Button' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' -import _ from 'underscore' -import $ from 'jquery' - -const zeroScale = 'matrix(0, 0, 0, 0, 0, 0)' -const zeroOpacity = '0' - -// zeroScale to specifically to account for IE Edge Bug, see http://codepen.io/andrewkfiedler/pen/apBbxq -// zeroOpacity to account for how browsers work -function isEffectivelyHidden(element: any): boolean { - if (element === document) { - return false - } else { - const computedStyle = window.getComputedStyle(element) - if ( - computedStyle.transform === zeroScale || - computedStyle.opacity === zeroOpacity - ) { - return true - } else { - return isEffectivelyHidden(element.parentNode) - } - } -} - -// it'd be nice if we can use offsetParent directly, but that would require devs to be aware of how help.view works -function isOffsetParent(element: any) { - return window.getComputedStyle(element).overflow !== 'visible' -} - -function traverseAncestors(element: any, compareValue: any, extractValue: any) { - let value = extractValue(element) - element = element.parentNode - while (element !== null && element !== document) { - if (isOffsetParent(element)) { - value = compareValue(value, extractValue(element)) - } - element = element.parentNode - } - return value -} - -function findHighestAncestorTop(element: any) { - return traverseAncestors( - element, - (currentTop: any, proposedTop: any) => Math.max(currentTop, proposedTop), - (element: any) => element.getBoundingClientRect().top - ) -} - -function findHighestAncestorLeft(element: any) { - return traverseAncestors( - element, - (currentLeft: any, proposedLeft: any) => - Math.max(currentLeft, proposedLeft), - (element: any) => element.getBoundingClientRect().left - ) -} - -function findLowestAncestorBottom(element: any) { - return traverseAncestors( - element, - (currentBottom: any, proposedBottom: any) => - Math.min(currentBottom, proposedBottom), - (element: any) => element.getBoundingClientRect().bottom - ) -} - -function findLowestAncestorRight(element: any) { - return traverseAncestors( - element, - (currentRight: any, proposedRight: any) => - Math.min(currentRight, proposedRight), - (element: any) => element.getBoundingClientRect().right - ) -} - -function findBlockers() { - const blockingElements = $('.is-blocker') - return _.map(blockingElements, (blockingElement: any) => ({ - boundingRect: blockingElement.getBoundingClientRect(), - element: blockingElement, - })) -} - -function isBlocked(element: any, boundingRect: any) { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '(blocker: any) => true | undefin... Remove this comment to see the full error message - return _.some(findBlockers(), (blocker: any) => { - if ( - blocker.element !== element && - $(blocker.element).find(element).length === 0 - ) { - const top = Math.max(blocker.boundingRect.top, boundingRect.top) - const bottom = Math.min(blocker.boundingRect.bottom, boundingRect.bottom) - const left = Math.max(blocker.boundingRect.left, boundingRect.left) - const right = Math.min(blocker.boundingRect.right, boundingRect.right) - const height = bottom - top - const width = right - left - if (height > 0 && width > 0) { - return true - } - } - }) -} - -let animationFrameId = -1 - -const paintHint = (element: HTMLElement): PaintedHintType | undefined => { - if (isEffectivelyHidden(element)) { - return undefined - } - const boundingRect = element.getBoundingClientRect() - const top = Math.max(findHighestAncestorTop(element), boundingRect.top) - const bottom = Math.min( - findLowestAncestorBottom(element), - boundingRect.bottom - ) - const left = Math.max(findHighestAncestorLeft(element), boundingRect.left) - const right = Math.min(findLowestAncestorRight(element), boundingRect.right) - const height = bottom - top - const width = right - left - if ( - boundingRect.width > 0 && - height > 0 && - width > 0 && - !isBlocked(element, { - top, - bottom, - left, - right, - }) - ) { - return { - height, - width, - top, - left, - text: element.getAttribute('data-help') || '', - id: Math.random().toString(), - } - } - return undefined -} - -const startPaintingHints = ( - $elementsWithHints: any, - attachElement: HTMLDivElement, - setPaintedHints: (hints: PaintedHintType[]) => void -) => { - window.cancelAnimationFrame(animationFrameId) - paintHints($elementsWithHints, attachElement, [], setPaintedHints) -} - -const paintHints = ( - $elementsWithHints: any, - attachElement: HTMLDivElement, - paintedHints: PaintedHintType[], - setPaintedHints: (paintedHints: PaintedHintType[]) => void -) => { - animationFrameId = window.requestAnimationFrame(() => { - const elements = $elementsWithHints.splice(0, 4) as unknown as HTMLElement[] - if (elements.length > 0) { - const newHints = elements - .map((element: HTMLElement) => { - return paintHint(element) - }) - .filter((hint) => hint !== undefined) as PaintedHintType[] - const combinedValue = paintedHints.concat(newHints) - setPaintedHints(combinedValue) - paintHints( - $elementsWithHints, - attachElement, - combinedValue, - setPaintedHints - ) - } - }) -} - -const useCloseOnTyping = ({ - showHints, - setShowHints, -}: { - showHints: boolean - setShowHints: (value: boolean) => void -}) => { - React.useEffect(() => { - const id = Math.random() - $(window).on(`keydown.${id}`, (event: any) => { - let code = event.keyCode - if (event.charCode && code == 0) code = event.charCode - switch (code) { - case 27: - // Escape - setShowHints(false) - break - default: - break - } - }) - return () => { - $(window).off(`keydown.${id}`) - } - }, [showHints]) -} - -const useRerenderOnResize = () => { - const [resizeRerender, setResizeRerender] = React.useState(Math.random()) - React.useEffect(() => { - const id = Math.random() - $(window).on( - `resize.${id}`, - _.debounce(() => { - setResizeRerender(Math.random()) - }, 1000) - ) - return () => { - $(window).off(`resize.${id}`) - } - }, []) - return resizeRerender -} - -const usePaintHints = ({ - showHints, - attachElement, - setPaintedHints, -}: { - showHints: boolean - attachElement?: HTMLDivElement | null - setPaintedHints: (hints: PaintedHintType[]) => void -}) => { - const resizeRerender = useRerenderOnResize() - React.useEffect(() => { - if (showHints && attachElement) { - let $elementsWithHints = $('[data-help]').not('.is-hidden [data-help]') - // @ts-expect-error ts-migrate(2740) FIXME: Type 'HTMLElement[]' is missing the following prop... Remove this comment to see the full error message - $elementsWithHints = _.shuffle($elementsWithHints) - startPaintingHints($elementsWithHints, attachElement, setPaintedHints) - } - }, [showHints, attachElement, resizeRerender]) -} - -type PaintedHintType = { - width: number - height: number - top: number - left: number - text: string - id: string -} - -const HintsComponent = () => { - const location = useLocation() - const history = useHistory() - const [showHints, setShowHints] = React.useState(false) - const [paintedHints, setPaintedHints] = React.useState( - [] as PaintedHintType[] - ) - - const attachRef = useRerenderingRef() - - const queryParams = queryString.parse(location.search) - - React.useEffect(() => { - const openHelp = Boolean(queryParams['global-help']) - if (openHelp) { - setShowHints(true) - } else { - setShowHints(false) - } - }) - React.useEffect(() => { - if (!showHints) { - window.cancelAnimationFrame(animationFrameId) - delete queryParams['global-help'] - history.push({ - pathname: location.pathname, - search: `${queryString.stringify({ - ...queryParams, - })}`, - }) - } - }, [showHints]) - - usePaintHints({ - showHints, - attachElement: attachRef.current, - setPaintedHints, - }) - - useCloseOnTyping({ showHints, setShowHints }) - - if (!showHints) { - return null - } - - return ( -
{ - setShowHints(false) - }} - > -
- {paintedHints.map((paintedHint) => { - return - })} -
- -
- ) -} - -const UntoggleElement = ({ - setShowHints, -}: { - setShowHints: (val: boolean) => void -}) => { - const [state, setState] = React.useState() - const resizeRerender = useRerenderOnResize() - - React.useEffect(() => { - const untoggleElement = document.querySelector( - '[data-id=sidebar-help-button]' - ) - if (untoggleElement) { - setState(untoggleElement.getBoundingClientRect()) - } - }, [resizeRerender]) - if (state === undefined) { - return null - } - const { width, height, top, left } = state - return ( - <> - - - ) -} - -const PaintedHint = ({ width, height, top, left, text }: PaintedHintType) => { - const menuState = useMenuState() - return ( - <> - - { - e.stopPropagation() - menuState.handleClose() - }} - > - { - e.stopPropagation() - }} - className="p-2" - > - {text} - - - - ) -} - -export default hot(module)(HintsComponent) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useDialogState.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useDialogState.tsx deleted file mode 100644 index c6974e35016..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useDialogState.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { ButtonProps } from '@mui/material/Button' -import { DialogProps } from '@mui/material/Dialog' -import Button from '@mui/material/Button' -import Dialog from '@mui/material/Dialog' -import DialogTitle from '@mui/material/DialogTitle' -import DialogActions from '@mui/material/DialogActions' -import DialogContent from '@mui/material/DialogContent' -import DialogContentText from '@mui/material/DialogContentText' -import React from 'react' - -export function useDialogState() { - const [open, setOpen] = React.useState(false) - const handleClick = () => { - setOpen(!open) - } - - const handleClose = () => { - setOpen(false) - } - - return { - open, - handleClick, - handleClose, - /** - * Handy prop bundles for passing to common components - */ - dropdownProps: { - open, - handleClose, - }, - MuiButtonComponents: { - Button, - }, - MuiDialogComponents: { - Dialog, - DialogContent, - DialogTitle, - DialogActions, - DialogContentText, - }, - MuiDialogProps: { - open, - onClose: handleClose, - } as Required>, - MuiButtonProps: { - onClick: handleClick, - } as Required>, - buttonProps: { - onClick: handleClick, - }, - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useRender.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useRender.tsx deleted file mode 100644 index ed0c176e2af..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useRender.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react' - -/** - * Force your component to render - */ -export const useRender = () => { - const [, setRender] = React.useState(Math.random()) - - return () => { - setRender(Math.random()) - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useSnack.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useSnack.tsx deleted file mode 100644 index 025f09651c9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/hooks/useSnack.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { useContext } from 'react' -import { SnackBarContext } from '../snack/snack.provider' - -const useSnack = () => useContext(SnackBarContext) - -export default useSnack diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/ingest-details/ingest-details.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/ingest-details/ingest-details.view.tsx deleted file mode 100644 index 018c8a672e3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/ingest-details/ingest-details.view.tsx +++ /dev/null @@ -1,287 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import _ from 'underscore' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'drop... Remove this comment to see the full error message -import Dropzone from 'dropzone' -import { UploadItemCollection } from '../upload-item/upload-item.collection.view' -import UploadBatchModel from '../../js/model/UploadBatch' -import { UploadSummaryViewReact } from '../upload-summary/upload-summary.view' -import Button from '@mui/material/Button' - -type IngestModeType = 'empty' | 'has-files' | 'is-uploading' | 'is-finished' - -type IngestDetailsViewReactType = { - extraHeaders?: any - overrides?: any - handleUploadSuccess?: any - preIngestValidator?: any -} - -const useDropzone = ({ - dropzoneElement, - extraHeaders, - overrides, - handleUploadSuccess, -}: { dropzoneElement: HTMLElement | null } & IngestDetailsViewReactType) => { - const [dropzone, setDropzone] = React.useState(null) - React.useEffect(() => { - if (dropzone && handleUploadSuccess) { - dropzone.on('success', handleUploadSuccess) - } - }, [dropzone]) - React.useEffect(() => { - if (dropzoneElement) { - if ((dropzoneElement as unknown as any).dropzone) { - setDropzone((dropzoneElement as unknown as any).dropzone) - } else { - setDropzone( - new Dropzone(dropzoneElement, { - previewsContainer: false, - paramName: 'parse.resource', - url: './internal/catalog/', - maxFilesize: 5000000, //MB - method: 'post', - autoProcessQueue: false, - headers: extraHeaders, - sending(_file: any, _xhr: any, formData: any) { - _.each(overrides, (values: any, attribute: any) => { - _.each(values, (value: any) => { - formData.append('parse.' + attribute, value) - }) - }) - }, - }) - ) - } - } - }, [dropzoneElement]) - return dropzone -} - -const useUploadBatchModel = ({ - dropzone, - getNewUploadBatchModel, - setGetNewUploadBatchModel, -}: { - dropzone: any - getNewUploadBatchModel: boolean - setGetNewUploadBatchModel: (val: boolean) => void -}): { model: any; json: any } => { - const [uploadBatchModel, setUploadBatchModel] = React.useState(dropzone) - const [uploadBatchModelJSON, setUploadBatchModelJSON] = - React.useState(null) - const callback = React.useMemo(() => { - return () => { - setUploadBatchModelJSON(uploadBatchModel.toJSON()) - } - }, [uploadBatchModel]) - useListenTo( - uploadBatchModel, - 'add:uploads remove:uploads reset:uploads change:sending change:finished', - callback - ) - - React.useEffect(() => { - if (uploadBatchModel) { - setUploadBatchModelJSON(uploadBatchModel.toJSON()) - } - }, [uploadBatchModel]) - - React.useEffect(() => { - if (dropzone && getNewUploadBatchModel) { - setUploadBatchModel( - new UploadBatchModel( - {}, - { - dropzone, - } - ) - ) - setGetNewUploadBatchModel(false) - } - }, [dropzone, getNewUploadBatchModel]) - - return { - model: uploadBatchModel, - json: uploadBatchModelJSON, - } -} - -function useIngestMode({ - uploadBatchModel, - dropzone, -}: { - uploadBatchModel: { - model: any - json: any - } - dropzone: any -}): [IngestModeType, React.Dispatch>] { - const [mode, setMode] = React.useState('empty') - - React.useEffect(() => { - if (!uploadBatchModel.json) { - setMode('empty') - return - } - if (uploadBatchModel.json.finished) { - setMode('is-finished') - return - } - if (uploadBatchModel.json.sending) { - setMode('is-uploading') - return - } - - if (uploadBatchModel.json.uploads.length > 0) { - setMode('has-files') - } else { - setMode('empty') - } - }, [uploadBatchModel]) - - React.useEffect(() => { - if (mode === 'empty' && dropzone && uploadBatchModel.model) { - // reset dropzone - uploadBatchModel.model.unset('id') - dropzone.options.autoProcessQueue = false - dropzone.removeAllFiles(true) - uploadBatchModel.model.clear() - const defaults = uploadBatchModel.model.defaults() - delete defaults.uploads - uploadBatchModel.model.set(defaults) - uploadBatchModel.model.get('uploads').reset() - uploadBatchModel.model.unlistenToDropzone() - uploadBatchModel.model.initialize(undefined, { - dropzone, - }) - } - }, [mode, dropzone, uploadBatchModel.model]) - return [mode, setMode] -} - -export const IngestDetailsViewReact = (props: IngestDetailsViewReactType) => { - const [dropzoneElement, setDropzoneElement] = - React.useState(null) - const dropzone = useDropzone({ - dropzoneElement, - ...props, - }) - const [getNewUploadBatchModel, setGetNewUploadBatchModel] = - React.useState(true) - const uploadBatchModel = useUploadBatchModel({ - dropzone, - getNewUploadBatchModel, - setGetNewUploadBatchModel, - }) - const [mode] = useIngestMode({ uploadBatchModel, dropzone }) - - return ( -
-
- {uploadBatchModel.model ? ( - - ) : null} -
- {mode === 'empty' || mode === 'has-files' ? ( -
-
{ - if (dropzoneElement) { - dropzoneElement.click() - } - }} - > - Drop files here or click to upload -
-
- ) : null} - {mode === 'is-finished' || mode === 'is-uploading' ? ( -
- {uploadBatchModel.model ? ( - - ) : null} -
- ) : null} -
- {mode === 'has-files' ? ( - <> - - - - ) : null} - {mode === 'is-uploading' ? ( - - ) : null} - {mode === 'is-finished' ? ( - - ) : null} -
-
- ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layer-item/layer-item.collection.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layer-item/layer-item.collection.view.tsx deleted file mode 100644 index 7609df4e667..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layer-item/layer-item.collection.view.tsx +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* global require*/ -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'sort... Remove this comment to see the full error message -import Sortable from 'sortablejs' -import * as React from 'react' -import LayerItem from '../../react-component/layer-item' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' - -function useSortable({ - sortableElement, - updateOrdering, - focusModel, -}: { - sortableElement: HTMLDivElement | null - updateOrdering: any - focusModel: any -}) { - const [sortable, setSortable] = React.useState(null) - - React.useEffect(() => { - if (sortableElement) { - setSortable( - Sortable.create(sortableElement, { - handle: 'button.layer-rearrange', - animation: 250, - draggable: '>*', // TODO: make a PR to sortable so this won't be necessary - onEnd: () => { - focusModel.clear() - updateOrdering() - }, - }) - ) - } - }, [sortableElement]) - - return sortable -} - -export const LayerItemCollectionViewReact = ({ - collection, - updateOrdering, - focusModel, -}: { - collection: Array - updateOrdering: any - focusModel: any -}) => { - const [, setForceRender] = React.useState(Math.random()) - const [sortableElement, setSortableElement] = - React.useState(null) - const sortable = useSortable({ sortableElement, updateOrdering, focusModel }) - useListenTo(collection, 'sort', () => { - setForceRender(Math.random()) - }) - - return ( -
- {collection.map((layer) => { - return ( - - ) - })} -
- ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layers/layers-dropdown.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layers/layers-dropdown.tsx deleted file mode 100644 index 81cc778b406..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layers/layers-dropdown.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import Button from '@mui/material/Button' -import Popover from '@mui/material/Popover' -import { useMenuState } from '../menu-state/menu-state' -import LayersView from './layers.view' -import LayersIcon from '@mui/icons-material/Layers' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' - -type LayersDropdownProps = { - layers: Array -} - -export const LayersDropdown = (props: LayersDropdownProps) => { - const menuState = useMenuState() - - return ( - <> - - - - - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layers/layers.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layers/layers.view.tsx deleted file mode 100644 index 6f87eb9a084..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/layers/layers.view.tsx +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* global require*/ -import React from 'react' -import _ from 'underscore' -import Backbone from 'backbone' -import { LayerItemCollectionViewReact } from '../layer-item/layer-item.collection.view' -import user from '../singletons/user-instance' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' -import { useListenTo } from '../../component/selection-checkbox/useBackbone.hook' -import debounce from 'lodash.debounce' - -// this is to track focus, since on reordering rerenders and loses focus -const FocusModel = Backbone.Model.extend({ - defaults: { - id: undefined, - direction: undefined, - }, - directions: { - up: 'up', - down: 'down', - }, - clear() { - this.set({ - id: undefined, - direction: undefined, - }) - }, - setUp(id: any) { - this.set({ - id, - direction: this.directions.up, - }) - }, - setDown(id: any) { - this.set({ - id, - direction: this.directions.down, - }) - }, - getDirection() { - return this.get('direction') - }, - isUp() { - return this.getDirection() === this.directions.up - }, - isDown() { - return this.getDirection() === this.directions.down - }, -}) - -type LayersViewReactProps = { - layers?: Array -} - -const LayersViewReact = (props: LayersViewReactProps) => { - const { getImageryProviders } = useConfiguration() - const [focusModel] = React.useState(new FocusModel()) - const containerElementRef = React.useRef(null) - - const layers = props.layers ?? user.get('user>preferences>mapLayers') - - const savePreferencesCallback = React.useMemo(() => { - if (props.layers) { - return () => {} - } - return debounce(() => { - user.get('user>preferences').savePreferences() - }, 100) - }, []) - useListenTo(layers, 'change:alpha change:show', () => { - savePreferencesCallback() - }) - - return ( -
-
Layers
-
- { - _.forEach( - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'NodeListOf | undefined'... Remove this comment to see the full error message - containerElementRef.current?.querySelectorAll(`.layer-item`), - (element: any, index: any) => { - layers.get(element.getAttribute('layer-id')).set('order', index) - } - ) - layers.sort() - savePreferencesCallback() - }} - focusModel={focusModel} - /> -
-
- -
-
- ) -} - -export default hot(module)(LayersViewReact) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/link/link.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/link/link.tsx deleted file mode 100644 index 0871600ae20..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/link/link.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react' -import { - Link as RouterLink, - LinkProps as RouterLinkProps, -} from 'react-router-dom' - -export const Link = React.forwardRef((props, ref) => ( - -)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/coordinates.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/coordinates.tsx deleted file mode 100644 index f5208657230..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/coordinates.tsx +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import TextField from '../../../react-component/text-field/index' -import MaskedTextField from '../inputs/masked-text-field' -import { latitudeDMSMask, longitudeDMSMask } from './masks' -import { buildDmsString, parseDmsCoordinate } from '../utils/dms-utils' - -const Coordinate = (props: any) => { - const { placeholder, value, onChange, children, ...otherProps } = props - return ( -
- - {children} -
- ) -} - -const MaskedCoordinate = (props: any) => { - const { placeholder, mask, value, onChange, children, ...otherProps } = props - return ( -
- - {children} -
- ) -} - -const DmsLatitude = (props: any) => { - return ( - { - props.onChange( - buildDmsString(parseDmsCoordinate(props.value)), - event.type - ) - }} - /> - ) -} - -const DmsLongitude = (props: any) => { - return ( - { - props.onChange( - buildDmsString(parseDmsCoordinate(props.value)), - event.type - ) - }} - /> - ) -} - -const DdLatitude = (props: any) => { - return ( - - ) -} - -const DdLongitude = (props: any) => { - return ( - - ) -} - -const UsngCoordinate = (props: any) => { - return ( -
- -
- ) -} - -export { DmsLatitude, DmsLongitude, DdLatitude, DdLongitude, UsngCoordinate } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/direction.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/direction.tsx deleted file mode 100644 index 0ac38df3f7e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/direction.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import TextField from '@mui/material/TextField' -class Direction extends React.Component { - getToggledOption() { - return (this.props as any).value === (this.props as any).options[0] - ? (this.props as any).options[1] - : (this.props as any).options[0] - } - handleMouseDown(e: any) { - e.preventDefault() - ;(this.props as any).onChange(this.getToggledOption()) - } - handleKeyPress(e: any) { - const toggledOption = this.getToggledOption() - if ( - String.fromCharCode(e.which).toUpperCase() === toggledOption.toUpperCase() - ) { - ;(this.props as any).onChange(toggledOption) - } - } - render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'value' does not exist on type 'Readonly<... Remove this comment to see the full error message - const { value } = this.props - return ( -
- e.stopPropagation()} - /> -
- ) - } -} -export default Direction diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/index.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/index.ts deleted file mode 100644 index 1e441fa106a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import WKT from './wkt' - -import LatLongDD from './lat-long-dd' -import LatLongDMS from './lat-long-dms' -import USNG from './usng-mgrs' - -export { WKT, LatLongDD, LatLongDMS, USNG } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/lat-long-dd.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/lat-long-dd.tsx deleted file mode 100644 index c90fa11299e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/lat-long-dd.tsx +++ /dev/null @@ -1,295 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import Group from '../../../react-component/group/index' -import { Radio, RadioItem } from '../../../react-component/radio/radio' -import TextField from '../../../react-component/text-field/index' -import { Units } from '../../../react-component/location/common' -import ListEditor from '../inputs/list-editor' -import { DdLatitude, DdLongitude } from './coordinates' -import { ddPoint } from '../models' -import DistanceUtils from '../../../js/DistanceUtils' - -const Point = (props: any) => { - const { dd, setState } = props - return ( - - { - draft.dd.point.latitude = value - })} - onBlur={setState((draft: any) => { - draft.dd.point.latitude = DistanceUtils.coordinateRound( - draft.dd.point.latitude - ) - })} - /> - (draft.dd.point.longitude = value) - )} - onBlur={setState((draft: any) => { - draft.dd.point.longitude = DistanceUtils.coordinateRound( - draft.dd.point.longitude - ) - })} - /> - - ) -} - -const Circle = (props: any) => { - const { dd, setState } = props - return ( -
- - (draft.dd.circle.point.latitude = value) - )} - onBlur={setState((draft: any) => { - draft.dd.circle.point.latitude = DistanceUtils.coordinateRound( - draft.dd.circle.point.latitude - ) - })} - /> - - (draft.dd.circle.point.longitude = value) - )} - onBlur={setState((draft: any) => { - draft.dd.circle.point.longitude = DistanceUtils.coordinateRound( - draft.dd.circle.point.longitude - ) - })} - /> - - (draft.dd.circle.units = value) - )} - > - - (draft.dd.circle.radius = DistanceUtils.coordinateRound(value)) - )} - /> - -
- ) -} - -const Line = (props: any) => { - const { dd, setState } = props - const points = dd.line.list.map((_entry: any, index: any) => ( - - - (draft.dd.line.list[index].latitude = value) - )} - onBlur={setState((draft: any) => { - draft.dd.line.list[index].latitude = DistanceUtils.coordinateRound( - draft.dd.line.list[index].latitude - ) - })} - /> - - (draft.dd.line.list[index].longitude = value) - )} - onBlur={setState( - (draft: any) => - (draft.dd.line.list[index].longitude = - DistanceUtils.coordinateRound( - draft.dd.line.list[index].longitude - )) - )} - /> - - )) - - return ( - (draft.dd.line.list = value) - )} - > - {points} - - ) -} - -const Polygon = (props: any) => { - const { dd, setState } = props - const points = dd.polygon.list.map((_entry: any, index: any) => ( - - - (draft.dd.polygon.list[index].latitude = value) - )} - onBlur={setState( - (draft: any) => - (draft.dd.polygon.list[index].latitude = - DistanceUtils.coordinateRound( - draft.dd.polygon.list[index].latitude - )) - )} - /> - - (draft.dd.polygon.list[index].longitude = value) - )} - onBlur={setState( - (draft: any) => - (draft.dd.polygon.list[index].longitude = - DistanceUtils.coordinateRound( - draft.dd.polygon.list[index].longitude - )) - )} - /> - - )) - - return ( - (draft.dd.polygon.list = value) - )} - > - {points} - - ) -} - -const BoundingBox = (props: any) => { - const { dd, setState } = props - return ( -
- (draft.dd.boundingbox.south = value) - )} - onBlur={setState( - (draft: any) => - (draft.dd.boundingbox.south = DistanceUtils.coordinateRound( - draft.dd.boundingbox.south - )) - )} - /> - (draft.dd.boundingbox.north = value) - )} - onBlur={setState( - (draft: any) => - (draft.dd.boundingbox.north = DistanceUtils.coordinateRound( - draft.dd.boundingbox.north - )) - )} - /> - (draft.dd.boundingbox.west = value) - )} - onBlur={setState( - (draft: any) => - (draft.dd.boundingbox.west = DistanceUtils.coordinateRound( - draft.dd.boundingbox.west - )) - )} - /> - (draft.dd.boundingbox.east = value) - )} - onBlur={setState( - (draft: any) => - (draft.dd.boundingbox.east = DistanceUtils.coordinateRound( - draft.dd.boundingbox.east - )) - )} - /> -
- ) -} - -const LatLongDD = (props: any) => { - const { dd, setState } = props - - const inputs = { - point: Point, - line: Line, - circle: Circle, - polygon: Polygon, - boundingbox: BoundingBox, - } - - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const Component = inputs[dd.shape] || null - - return ( -
- (draft.dd.shape = value) - )} - > - Point - Circle - Line - Polygon - Bounding Box - -
- {Component !== null ? : null} -
-
- ) -} - -export default LatLongDD diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/lat-long-dms.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/lat-long-dms.tsx deleted file mode 100644 index 6c9192ecbc9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/lat-long-dms.tsx +++ /dev/null @@ -1,355 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import Group from '../../../react-component/group/index' -import { Radio, RadioItem } from '../../../react-component/radio/radio' -import TextField from '../../../react-component/text-field/index' -import { Units } from '../../../react-component/location/common' -import ListEditor from '../inputs/list-editor' -import { DmsLatitude, DmsLongitude } from './coordinates' -import { dmsPoint } from '../models' -import DirectionInput from './direction' -import { Direction } from '../utils/dms-utils' - -const latitudeDirections = [Direction.North, Direction.South] -const longitudeDirections = [Direction.East, Direction.West] - -const Point = (props: any) => { - const { dms, setState } = props - return ( - - - (draft.dms.point.latitude.coordinate = value) - )} - > - - (draft.dms.point.latitude.direction = value) - )} - /> - - - (draft.dms.point.longitude.coordinate = value) - )} - > - - (draft.dms.point.longitude.direction = value) - )} - /> - - - ) -} - -const Circle = (props: any) => { - const { dms, setState } = props - return ( -
- - - (draft.dms.circle.point.latitude.coordinate = value) - )} - > - - (draft.dms.circle.point.latitude.direction = value) - )} - /> - - - (draft.dms.circle.point.longitude.coordinate = value) - )} - > - - (draft.dms.circle.point.longitude.direction = value) - )} - /> - - - (draft.dms.circle.units = value) - )} - > - (draft.dms.circle.radius = value) - )} - /> - -
- ) -} - -const Line = (props: any) => { - const { dms, setState } = props - const points = dms.line.list.map((_entry: any, index: any) => ( - - - (draft.dms.line.list[index].latitude.coordinate = value) - )} - > - - (draft.dms.line.list[index].latitude.direction = value) - )} - /> - - - (draft.dms.line.list[index].longitude.coordinate = value) - )} - > - - (draft.dms.line.list[index].longitude.direction = value) - )} - /> - - - )) - - return ( - (draft.dms.line.list = value) - )} - > - {points} - - ) -} - -const Polygon = (props: any) => { - const { dms, setState } = props - const points = dms.polygon.list.map((_entry: any, index: any) => ( - - - (draft.dms.polygon.list[index].latitude.coordinate = value) - )} - > - - (draft.dms.polygon.list[index].latitude.direction = value) - )} - /> - - - (draft.dms.polygon.list[index].longitude.coordinate = value) - )} - > - - (draft.dms.polygon.list[index].longitude.direction = value) - )} - /> - - - )) - - return ( - (draft.dms.polygon.list = value) - )} - > - {points} - - ) -} - -const BoundingBox = (props: any) => { - const { dms, setState } = props - return ( -
- - (draft.dms.boundingbox.south.coordinate = value) - )} - > - - (draft.dms.boundingbox.south.direction = value) - )} - /> - - - (draft.dms.boundingbox.north.coordinate = value) - )} - > - - (draft.dms.boundingbox.north.direction = value) - )} - /> - - - (draft.dms.boundingbox.west.coordinate = value) - )} - > - - (draft.dms.boundingbox.west.direction = value) - )} - /> - - - (draft.dms.boundingbox.east.coordinate = value) - )} - > - - (draft.dms.boundingbox.east.direction = value) - )} - /> - -
- ) -} - -const LatLongDMS = (props: any) => { - const { dms, setState } = props - - const inputs = { - point: Point, - line: Line, - circle: Circle, - polygon: Polygon, - boundingbox: BoundingBox, - } - - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const Component = inputs[dms.shape] || null - - return ( -
- (draft.dms.shape = value) - )} - > - Point - Circle - Line - Polygon - Bounding Box - -
- {Component !== null ? : null} -
-
- ) -} - -export default LatLongDMS diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/masks.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/masks.ts deleted file mode 100644 index 13f75929645..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/masks.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* This is a collection of masking functions for the various coordinate inputs */ - -const decimalMask = ['.', /\d/, /\d/, /\d/, '"'] - -export const latitudeDMSMask = function (rawValue: any) { - const baseMask = [/\d/, /\d/, '°', /\d/, /\d/, "'", /\d/, /\d/] - - const pattern = new RegExp( - '^[0-9_]{2,3}[°*][0-9_]{2,3}[`\'’]([0-9_]{2,3}(?:[.][0-9]{0,3})?)"?' - ) - const match = rawValue.match(pattern) - if (match) { - const seconds = match[1] - if (seconds.includes('.')) { - return baseMask.concat(decimalMask) - } - } - return baseMask.concat('"') -} - -export const longitudeDMSMask = function (rawValue: any) { - const baseMask = [/\d/, /\d/, /\d/, '°', /\d/, /\d/, "'", /\d/, /\d/] - - const pattern = new RegExp( - '^[0-9_]{3,4}[°*][0-9_]{2,3}[`\'’]([0-9_]{2,3}(?:[.][0-9]{0,3})?)"?' - ) - const match = rawValue.match(pattern) - if (match) { - const seconds = match[1] - if (seconds.includes('.')) { - return baseMask.concat(decimalMask) - } - } - return baseMask.concat('"') -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/usng-mgrs.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/usng-mgrs.tsx deleted file mode 100644 index e87654282c8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/usng-mgrs.tsx +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import { Radio, RadioItem } from '../../../react-component/radio/radio' -import TextField from '../../../react-component/text-field/index' -import { Units } from '../../../react-component/location/common' -import ListEditor from '../inputs/list-editor' -import { UsngCoordinate } from './coordinates' - -const Point = (props: any) => { - const { usng, setState } = props - return ( - (draft.usng.point = value) - )} - /> - ) -} - -const Circle = (props: any) => { - const { usng, setState } = props - return ( -
- (draft.usng.circle.point = value) - )} - /> - (draft.usng.circle.units = value) - )} - > - (draft.usng.circle.radius = value) - )} - /> - -
- ) -} - -const Line = (props: any) => { - const { usng, setState } = props - const grids = usng.line.list.map((_entry: any, index: any) => ( - (draft.usng.line.list[index] = value) - )} - key={index} - /> - )) - - return ( - (draft.usng.line.list = value) - )} - > - {grids} - - ) -} - -const Polygon = (props: any) => { - const { usng, setState } = props - const grids = usng.polygon.list.map((_entry: any, index: any) => ( - (draft.usng.polygon.list[index] = value) - )} - key={index} - /> - )) - - return ( - (draft.usng.polygon.list = value) - )} - > - {grids} - - ) -} - -const BoundingBox = (props: any) => { - const { usng, setState } = props - return ( - (draft.usng.boundingbox = value) - )} - /> - ) -} - -const USNG = (props: any) => { - const { usng, setState } = props - - const inputs = { - point: Point, - circle: Circle, - line: Line, - polygon: Polygon, - boundingbox: BoundingBox, - } - - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const Component = inputs[usng.shape] || null - - return ( -
- (draft.usng.shape = value) - )} - > - Point - Circle - Line - Polygon - Bounding Box - -
- {Component !== null ? : null} -
-
- ) -} - -export default USNG diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/wkt.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/wkt.tsx deleted file mode 100644 index 53f2b02d825..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/geo-components/wkt.tsx +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import TextField from '../../../react-component/text-field/index' -import { roundWktCoords } from '../utils' - -const WKT = (props: any) => { - const { wkt, setState } = props - - return ( -
- - roundWktCoords((draft.wkt = value)) - )} - /> -
- ) -} - -export default WKT diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/inputs/list-editor.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/inputs/list-editor.tsx deleted file mode 100644 index 1d8ce18aa06..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/inputs/list-editor.tsx +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import Group from '../../../react-component/group/index' -import Button from '@mui/material/Button' -class ListEditor extends React.Component<{ - list: any - defaultItem: any - onChange: any - children: React.ReactNode -}> { - handleAdd() { - const { list, defaultItem, onChange } = this.props - const newList = list.slice() - newList.push(defaultItem) - onChange(newList) - } - - handleRemove(index: any) { - const { list, onChange } = this.props - const newList = list.slice() - newList.splice(index, 1) - onChange(newList) - } - - render() { - const listItems = React.Children.map( - this.props.children, - (child, index) => ( -
  • - - {child} - - -
  • - ) - ) - return ( -
    -
      - {listItems} -
    - -
    - ) - } -} - -export default ListEditor diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/inputs/masked-text-field.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/inputs/masked-text-field.tsx deleted file mode 100644 index 1a94bff04a0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/inputs/masked-text-field.tsx +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import Group from '../../../react-component/group/index' -import MaskedInput, { MaskedInputProps } from 'react-text-mask' -import TextField from '@mui/material/TextField' -class MaskedTextField extends React.Component { - ref: any - prevEvent = undefined - padEndWithZeros(value: any) { - // This function is called for each field (east, west, south, north) multiple times. - // Sometimes the event variable is defined, other times it's undefined. - // We must capture the event in a variable when it's defined - // in order to leverage it in checks below even when it's undefined. - if (event) { - // @ts-expect-error ts-migrate(2322) FIXME: Type 'Event' is not assignable to type 'undefined'... Remove this comment to see the full error message - this.prevEvent = event - } - if ( - value === undefined || - !value.includes('.') || - (((event && event.type === 'input') || - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. - (this.prevEvent && this.prevEvent.type === 'input')) && - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. - this.prevEvent.target.id === (this.props as any).label) - ) { - return value - } - const dmsCoordinateParts = value.toString().split("'") - if (dmsCoordinateParts.length < 2) { - return value - } - const decimalParts = dmsCoordinateParts[1].toString().split('.') - if (decimalParts.length < 2) { - return value - } - let decimal = decimalParts[1].replace('"', '') - if (!decimal.endsWith('_')) { - return value - } - const indexOfUnderscore = decimal.indexOf('_') - const decimalLength = decimal.length - decimal = decimal.substring(0, indexOfUnderscore) - return ( - dmsCoordinateParts[0] + - "'" + - decimalParts[0] + - '.' + - decimal.padEnd(decimalLength, '0') + - '"' - ) - } - render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'label' does not exist on type 'Readonly<... Remove this comment to see the full error message - // eslint-disable-next-line no-unused-vars - const { label, addon, onChange, value, ...args } = this.props - return ( -
    - - {label != null ? ( -
    - {label} -   -
    - ) : null} - { - ;(this.props as any).onChange(e.target.value) - }} - pipe={(value: any) => this.padEndWithZeros(value)} - render={(setRef: any, { defaultValue, ...props }: any) => { - return ( - { - setRef(ref) - this.ref = ref - }} - value={defaultValue || ''} - {...props} - /> - ) - }} - {...args} - /> - {addon != null ? ( - - ) : null} -
    -
    - ) - } -} -export default MaskedTextField diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location-new.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location-new.ts deleted file mode 100644 index d1ebbc9c693..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location-new.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import Backbone from 'backbone' - -import { - validateWkt, - validateDd, - validateDms, - validateUsng, - ddToWkt, - dmsToWkt, - usngToWkt, -} from './utils' - -import { ddModel, dmsModel, usngModel } from './models' - -export default Backbone.AssociatedModel.extend({ - defaults: { - showErrors: true, - valid: true, - error: null, - mode: 'wkt', - wkt: '', - dd: ddModel, - dms: dmsModel, - usng: usngModel, - }, - - initialize() { - this.listenTo( - this, - 'change:wkt change:dms change:dd change:usng change:mode', - this.validate.bind(this) - ) - }, - - isValid() { - return this.get('valid') - }, - - /* - * Return the active input converted to WKT. If the input failed validation, return "INVALID". - * If the input is blank, return null. - */ - getValue() { - if (!this.isValid()) { - return 'INVALID' - } - - const mode = this.get('mode') - switch (mode) { - case 'wkt': - return this.get(mode) - case 'dd': - return ddToWkt(this.get(mode)) - case 'dms': - return dmsToWkt(this.get(mode)) - case 'usng': - return usngToWkt(this.get(mode)) - default: - return null - } - }, - - /* Run the appropriate validator for the active mode. Blank input is considered valid */ - validate() { - const mode = this.get('mode') - let validationReport - switch (mode) { - case 'wkt': - validationReport = validateWkt(this.get(mode)) - break - case 'dd': - validationReport = validateDd(this.get(mode)) - break - case 'dms': - validationReport = validateDms(this.get(mode)) - break - case 'usng': - validationReport = validateUsng(this.get(mode)) - break - } - this.set('valid', validationReport ? validationReport.valid : true) - this.set('error', validationReport ? validationReport.error : false) - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location-new.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location-new.view.tsx deleted file mode 100644 index 63ef430f501..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location-new.view.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import LocationComponent, { LocationInputPropsType } from './location' -import { ddToWkt, dmsToWkt, usngToWkt } from './utils' -import { hot } from 'react-hot-loader' - -import LocationNewModel from './location-new' - -type LocationInputReactPropsType = { - value: string - onChange: (val: string) => void - isStateDirty?: boolean - resetIsStateDirty?: () => void -} - -export const LocationInputReact = ({ - value, - onChange, - isStateDirty = false, - resetIsStateDirty = () => {}, -}: LocationInputReactPropsType) => { - const [state, setState] = React.useState( - new LocationNewModel({ wkt: value, mode: 'wkt' }).toJSON() - ) - - React.useEffect(() => { - if (isStateDirty) { - setState(new LocationNewModel({ wkt: value, mode: state.mode }).toJSON()) - resetIsStateDirty() - } - }, [isStateDirty]) - - React.useEffect(() => { - if (state.valid) { - switch (state.mode) { - case 'wkt': - onChange(state.wkt) - break - case 'dd': - onChange(ddToWkt(state.dd) as any) - break - case 'dms': - onChange(dmsToWkt(state.dms) as any) - break - case 'usng': - onChange(usngToWkt(state.usng) as any) - break - case 'keyword': - onChange(state.keyword ? state.keyword.wkt : null) - break - default: - } - } else { - onChange('INVALID') - } - }, [state]) - - return -} - -export default hot(module)(LocationInputReact) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location.tsx deleted file mode 100644 index d251e4d5fb1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/location.tsx +++ /dev/null @@ -1,197 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { validateWkt, validateDd, validateDms, validateUsng } from './utils' -import { Radio, RadioItem } from '../../react-component/radio/radio' -import { WKT, LatLongDD, LatLongDMS, USNG } from './geo-components' -import Gazetteer from '../../react-component/location/gazetteer' -import CQLUtils from '../../js/CQLUtils' -import immer from 'immer.1.5.0' -const produce = immer -import { hot } from 'react-hot-loader' - -const inputs = { - wkt: { - label: 'WKT', - Component: WKT, - }, - dd: { - label: 'Lat/Lon (DD)', - Component: LatLongDD, - }, - dms: { - label: 'Lat/Lon (DMS)', - Component: LatLongDMS, - }, - usng: { - label: 'USNG/MGRS', - Component: USNG, - }, - keyword: { - label: 'Keyword', - Component: (props: LocationInputPropsType) => { - const { keyword } = props - return ( - { - value.type = - value.polyType.toLowerCase() === 'polygon' - ? 'POLYGON' - : 'MULTIPOLYGON' - value.keywordValue = value.value - value.mode = 'keyword' - - value.wkt = CQLUtils.generateFilter( - undefined, - 'location', - value, - undefined - ).value - draft.keyword = value - // onFieldEdit(field.id, location) - } - )} - /> - ) - }, - }, -} as { - [key: string]: { - label: string - Component: any - } -} - -const validate = ({ - state, - setState, -}: { - state: LocationInputPropsType - setState: (state: LocationInputPropsType) => void -}) => { - const mode = state.mode - let validationReport - switch (mode) { - case 'wkt': - validationReport = validateWkt(state[mode]) - break - case 'dd': - validationReport = validateDd(state[mode]) - break - case 'dms': - validationReport = validateDms(state[mode]) - break - case 'usng': - validationReport = validateUsng(state[mode]) - break - } - setState({ - ...state, - valid: validationReport ? validationReport.valid : true, - error: validationReport ? validationReport.error : (false as any), - }) -} - -export type LocationInputPropsType = { - dd: { - boundingBox: { - north: string - south: string - east: string - west: string - } - circle: { - point: { latitude: string; longitude: string } - radius: string - units: 'meters' - } - line: { - list: any[] - } - point: { latitude: string; longitude: string } - polygon: { list: any[] } - shape: 'point' - } - keyword: any - dms: any - error: null | string - mode: 'wkt' | 'dd' | 'dms' | 'usng' | 'keyword' - setState: any - showErrors: boolean - usng: any - valid: boolean - wkt: string -} - -const LocationInput = (props: LocationInputPropsType) => { - const { mode, valid, error, showErrors, setState } = props - const input = inputs[mode] || {} - const { Component = null } = input - - React.useEffect(() => { - validate({ - state: props, - setState: props.setState((draft: any, value: any) => { - draft.valid = value.valid - draft.error = value.error - return draft - }), - }) - }, [props]) - - return ( -
    - (draft.mode = value))} - > - {Object.keys(inputs).map((key) => ( - - {inputs[key].label} - - ))} - -
    - {Component !== null ? : null} -
    - {error} -
    -
    -
    - ) -} - -export default hot(module)(({ state, setState }: any) => ( - (value: any) => { - const nextState = produce(state, (draft: any) => { - producer(draft, value) - }) - setState(nextState) - }} - /> -)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/dd-model.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/dd-model.ts deleted file mode 100644 index a9c1e89a4bc..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/dd-model.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export const ddPoint = { - latitude: '', - longitude: '', -} - -export const ddModel = { - shape: 'point', - point: { ...ddPoint }, - circle: { - point: { ...ddPoint }, - radius: '1', - units: 'meters', - }, - line: { - list: [], - }, - polygon: { - list: [], - }, - boundingbox: { - north: '', - south: '', - east: '', - west: '', - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/dms-model.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/dms-model.ts deleted file mode 100644 index 1a411d08d60..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/dms-model.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { Direction } from '../utils/dms-utils' - -const dmsLatitude = { - coordinate: '', - direction: Direction.North, -} - -const dmsLongitude = { - coordinate: '', - direction: Direction.East, -} - -export const dmsPoint = { - latitude: { ...dmsLatitude }, - longitude: { ...dmsLongitude }, -} - -export const dmsModel = { - shape: 'point', - point: { ...dmsPoint }, - circle: { - point: { ...dmsPoint }, - radius: '1', - units: 'meters', - }, - line: { - list: [], - }, - polygon: { - list: [], - }, - boundingbox: { - north: { ...dmsLatitude }, - south: { ...dmsLatitude }, - east: { ...dmsLongitude }, - west: { ...dmsLongitude }, - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/index.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/index.ts deleted file mode 100644 index 85b2bae706b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { ddPoint, ddModel } from './dd-model' - -import { dmsPoint, dmsModel } from './dms-model' -import usngModel from './usng-model' - -export { ddPoint, dmsPoint, ddModel, dmsModel, usngModel } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/usng-model.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/usng-model.ts deleted file mode 100644 index a2b9f26cd23..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/models/usng-model.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -const usngModel = { - shape: 'point', - point: '', - circle: { - point: '', - radius: '', - units: 'meters', - }, - line: { - list: [], - }, - polygon: { - list: [], - }, - boundingbox: '', -} - -export default usngModel diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/dd-utils.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/dd-utils.ts deleted file mode 100644 index 67b952c762d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/dd-utils.ts +++ /dev/null @@ -1,239 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import wkx from 'wkx' - -import { computeCircle, toKilometers } from './geo-helper' -import errorMessages from './errors' - -const ddRegex = new RegExp('^-?[0-9]*.?[0-9]*$') -const minimumDifference = 0.0001 - -function ddCoordinateIsBlank(coordinate: any) { - return coordinate.length === 0 -} - -function ddPointIsBlank(point: any) { - return ( - ddCoordinateIsBlank(point.latitude) && ddCoordinateIsBlank(point.longitude) - ) -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function inputIsBlank(dd: any) { - switch (dd.shape) { - case 'point': - return ddPointIsBlank(dd.point) - case 'circle': - return ddPointIsBlank(dd.circle.point) - case 'line': - return dd.line.list.length === 0 - case 'polygon': - return dd.polygon.list.length === 0 - case 'boundingbox': - return ( - ddCoordinateIsBlank(dd.boundingbox.north) && - ddCoordinateIsBlank(dd.boundingbox.south) && - ddCoordinateIsBlank(dd.boundingbox.east) && - ddCoordinateIsBlank(dd.boundingbox.west) - ) - } -} - -/* - * Decimal degrees -> WKT conversion utils - */ -function ddPointToWkt(point: any) { - return new wkx.Point(point.longitude, point.latitude) -} - -function ddToWkt(dd: any) { - if (inputIsBlank(dd)) { - return null - } - - let wkt = null - const points: any = [] - switch (dd.shape) { - case 'point': - wkt = ddPointToWkt(dd.point).toWkt() - break - case 'circle': - if ( - !isNaN(dd.circle.point.latitude) && - !isNaN(dd.circle.point.longitude) && - dd.circle.radius > 0 - ) { - const distance = toKilometers(dd.circle.radius, dd.circle.units) - wkt = computeCircle( - ddPointToWkt(dd.circle.point), - distance, - 36 - )?.toWkt() - } - break - case 'line': - if (dd.line.list.length > 0) { - dd.line.list.map((point: any) => points.push(ddPointToWkt(point))) - wkt = new wkx.LineString(points).toWkt() - } - break - case 'polygon': - if (dd.polygon.list.length > 0) { - dd.polygon.list.map((point: any) => points.push(ddPointToWkt(point))) - const p1 = points[0] - const p2 = points[points.length - 1] - if (p1.x !== p2.x || p1.y !== p2.y) { - points.push(new wkx.Point(p1.x, p1.y)) - } - wkt = new wkx.Polygon(points).toWkt() - } - break - case 'boundingbox': - const nw = new wkx.Point(dd.boundingbox.west, dd.boundingbox.north) - const ne = new wkx.Point(dd.boundingbox.east, dd.boundingbox.north) - const se = new wkx.Point(dd.boundingbox.east, dd.boundingbox.south) - const sw = new wkx.Point(dd.boundingbox.west, dd.boundingbox.south) - wkt = new wkx.Polygon([nw, ne, se, sw, nw]).toWkt() - break - } - return wkt -} - -/* - * Decimal degrees validation utils - */ -function parseDdCoordinate(coordinate: any) { - if (ddRegex.exec(coordinate) == null) { - return null - } - const _coordinate = parseFloat(coordinate) - if (isNaN(_coordinate)) { - return null - } - return _coordinate -} - -function inValidRange(coordinate: any, maximum: any) { - return coordinate >= -1 * maximum && coordinate <= maximum -} - -function validateDdPoint(point: any) { - const latitude = parseDdCoordinate(point.latitude) - const longitude = parseDdCoordinate(point.longitude) - if (latitude && longitude) { - return inValidRange(latitude, 90) && inValidRange(longitude, 180) - } - return false -} - -function validateDdBoundingBox(boundingbox: any) { - const north = parseDdCoordinate(boundingbox.north) - const south = parseDdCoordinate(boundingbox.south) - const east = parseDdCoordinate(boundingbox.east) - const west = parseDdCoordinate(boundingbox.west) - - if (north == null || south == null || east == null || west == null) { - return false - } - - if ( - !inValidRange(north, 90) || - !inValidRange(south, 90) || - !inValidRange(east, 180) || - !inValidRange(west, 180) - ) { - return false - } - - if (north < south || east < west) { - return false - } - - if (north - south < minimumDifference || east - west < minimumDifference) { - return false - } - - return true -} - -function validateDd(dd: any) { - if (inputIsBlank(dd)) { - return { valid: true, error: null } - } - - let valid = true - let error = null - switch (dd.shape) { - case 'point': - if (!validateDdPoint(dd.point)) { - valid = false - error = errorMessages.invalidCoordinates - } - break - case 'circle': - const radius = parseFloat(dd.circle.radius) - if ( - isNaN(radius) || - radius <= 0 || - toKilometers(radius, dd.circle.units) > 10000 - ) { - valid = false - error = errorMessages.invalidRadius - } else if (!validateDdPoint(dd.circle.point)) { - valid = false - error = errorMessages.invalidCoordinates - } - break - case 'line': - if (!dd.line.list.every(validateDdPoint)) { - valid = false - error = errorMessages.invalidList - } else if (dd.line.list.length < 2) { - valid = false - error = errorMessages.tooFewPointsLine - } - break - case 'polygon': - if (!dd.polygon.list.every(validateDdPoint)) { - valid = false - error = errorMessages.invalidList - } else if (dd.polygon.list.length < 3) { - valid = false - error = errorMessages.tooFewPointsPolygon - } - break - case 'boundingbox': - if ( - !validateDdPoint({ - latitude: dd.boundingbox.north, - longitude: dd.boundingbox.east, - }) || - !validateDdPoint({ - latitude: dd.boundingbox.south, - longitude: dd.boundingbox.west, - }) - ) { - valid = false - error = errorMessages.invalidCoordinates - } else if (!validateDdBoundingBox(dd.boundingbox)) { - valid = false - error = errorMessages.invalidBoundingBoxDd - } - break - } - return { valid, error } -} - -export { ddToWkt, validateDd, validateDdPoint } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/dms-utils.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/dms-utils.ts deleted file mode 100644 index e7433806aa5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/dms-utils.ts +++ /dev/null @@ -1,448 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import wkx from 'wkx' - -import { computeCircle, toKilometers } from './geo-helper' -import errorMessages from './errors' - -const dmsRegex = new RegExp('^([0-9_]*)°([0-9_]*)\'([0-9_]*\\.?[0-9_]*)"$') -const minimumDifference = 0.0001 - -const LAT_DEGREES_DIGITS = 2 -const LON_DEGREES_DIGITS = 3 -const DEFAULT_SECONDS_PRECISION = 3 - -const Direction = Object.freeze({ - North: 'N', - South: 'S', - East: 'E', - West: 'W', -}) - -function dmsCoordinateIsBlank(coordinate: any) { - return coordinate.coordinate.length === 0 -} - -function dmsPointIsBlank(point: any) { - return ( - dmsCoordinateIsBlank(point.latitude) && - dmsCoordinateIsBlank(point.longitude) - ) -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function inputIsBlank(dms: any) { - switch (dms.shape) { - case 'point': - return dmsPointIsBlank(dms.point) - case 'circle': - return dmsPointIsBlank(dms.circle.point) - case 'line': - return dms.line.list.length === 0 - case 'polygon': - return dms.polygon.list.length === 0 - case 'boundingbox': - return ( - dmsCoordinateIsBlank(dms.boundingbox.north) && - dmsCoordinateIsBlank(dms.boundingbox.south) && - dmsCoordinateIsBlank(dms.boundingbox.east) && - dmsCoordinateIsBlank(dms.boundingbox.west) - ) - } -} - -function parseDmsCoordinate(coordinate: any) { - if (coordinate === undefined) { - return coordinate - } - - const matches = dmsRegex.exec(coordinate) - if (!matches) { - return coordinate - } - const degrees = replacePlaceholderWithZeros(matches[1]) - const minutes = replacePlaceholderWithZeros(matches[2]) - const seconds = replacePlaceholderWithZeros(matches[3]) - return { degrees, minutes, seconds } -} - -function dmsCoordinateToDD(coordinate: any) { - const seconds = parseFloat(coordinate.seconds) - if (isNaN(seconds)) { - return null - } - - const dd = - parseInt(coordinate.degrees) + - parseInt(coordinate.minutes) / 60 + - seconds / 3600 - if ( - coordinate.direction === Direction.North || - coordinate.direction === Direction.East - ) { - return dd - } else { - return -dd - } -} - -/* - * DMS -> WKT conversion utils - */ -function dmsPointToWkt(point: any) { - const latitude = parseDmsCoordinate(point.latitude.coordinate) - const longitude = parseDmsCoordinate(point.longitude.coordinate) - const _latitude = dmsCoordinateToDD({ - ...latitude, - direction: point.latitude.direction, - }) - const _longitude = dmsCoordinateToDD({ - ...longitude, - direction: point.longitude.direction, - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number | null' is not assignable... Remove this comment to see the full error message - return new wkx.Point(_longitude, _latitude) -} - -function dmsToWkt(dms: any) { - if (inputIsBlank(dms)) { - return null - } - - let wkt = null - const points: any = [] - switch (dms.shape) { - case 'point': - wkt = dmsPointToWkt(dms.point).toWkt() - break - case 'circle': - const distance = toKilometers(dms.circle.radius, dms.circle.units) - wkt = computeCircle( - dmsPointToWkt(dms.circle.point), - distance, - 36 - )?.toWkt() - break - case 'line': - if (dms.line.list.length > 0) { - dms.line.list.map((point: any) => points.push(dmsPointToWkt(point))) - wkt = new wkx.LineString(points).toWkt() - } - break - case 'polygon': - if (dms.polygon.list.length > 0) { - dms.polygon.list.map((point: any) => points.push(dmsPointToWkt(point))) - const p1 = points[0] - const p2 = points[points.length - 1] - if (p1.x !== p2.x || p1.y !== p2.y) { - points.push(new wkx.Point(p1.x, p1.y)) - } - wkt = new wkx.Polygon(points).toWkt() - } - break - case 'boundingbox': - const nw = { - latitude: dms.boundingbox.north, - longitude: dms.boundingbox.west, - } - const ne = { - latitude: dms.boundingbox.north, - longitude: dms.boundingbox.east, - } - const se = { - latitude: dms.boundingbox.south, - longitude: dms.boundingbox.east, - } - const sw = { - latitude: dms.boundingbox.south, - longitude: dms.boundingbox.west, - } - const _nw = dmsPointToWkt(nw) - const _ne = dmsPointToWkt(ne) - const _se = dmsPointToWkt(se) - const _sw = dmsPointToWkt(sw) - wkt = new wkx.Polygon([_nw, _ne, _se, _sw, _nw]).toWkt() - break - } - return wkt -} - -/* - * DMS validation utils - */ -function inValidRange(coordinate: any, maximum: any) { - const degrees = parseInt(coordinate.degrees) - const minutes = parseInt(coordinate.minutes) - const seconds = parseFloat(coordinate.seconds) - if (isNaN(seconds)) { - return false - } - if (degrees > maximum || minutes > 60 || seconds > 60) { - return false - } - if (degrees === maximum && (minutes > 0 || seconds > 0)) { - return false - } - return true -} - -function validateDmsPoint(point: any) { - const latitude = parseDmsCoordinate(point.latitude.coordinate) - const longitude = parseDmsCoordinate(point.longitude.coordinate) - if (latitude && longitude) { - return inValidRange(latitude, 90) && inValidRange(longitude, 180) - } - return false -} - -function validateDmsBoundingBox(boundingbox: any) { - const north = parseDmsCoordinate(boundingbox.north.coordinate) - const south = parseDmsCoordinate(boundingbox.south.coordinate) - const east = parseDmsCoordinate(boundingbox.east.coordinate) - const west = parseDmsCoordinate(boundingbox.west.coordinate) - - if (!north || !south || !east || !west) { - return false - } - - if ( - !inValidRange(north, 90) || - !inValidRange(south, 90) || - !inValidRange(east, 180) || - !inValidRange(west, 180) - ) { - return false - } - - const ddNorth = dmsCoordinateToDD({ - ...north, - direction: boundingbox.north.direction, - }) - const ddSouth = dmsCoordinateToDD({ - ...south, - direction: boundingbox.south.direction, - }) - const ddEast = dmsCoordinateToDD({ - ...east, - direction: boundingbox.east.direction, - }) - const ddWest = dmsCoordinateToDD({ - ...west, - direction: boundingbox.west.direction, - }) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - if (ddNorth < ddSouth || ddEast < ddWest) { - return false - } - - if ( - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ddNorth - ddSouth < minimumDifference || - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ddEast - ddWest < minimumDifference - ) { - return false - } - - return true -} - -function validateDms(dms: any) { - if (inputIsBlank(dms)) { - return { valid: true, error: null } - } - - let valid = true - let error = null - switch (dms.shape) { - case 'point': - if (!validateDmsPoint(dms.point)) { - valid = false - error = errorMessages.invalidCoordinates - } - break - case 'circle': - const radius = parseFloat(dms.circle.radius) - if ( - isNaN(radius) || - radius <= 0 || - toKilometers(radius, dms.circle.units) > 10000 - ) { - valid = false - error = errorMessages.invalidRadius - } else if (!validateDmsPoint(dms.circle.point)) { - valid = false - error = errorMessages.invalidCoordinates - } - break - case 'line': - if (!dms.line.list.every(validateDmsPoint)) { - valid = false - error = errorMessages.invalidList - } else if (dms.line.list.length < 2) { - valid = false - error = errorMessages.tooFewPointsLine - } - break - case 'polygon': - if (!dms.polygon.list.every(validateDmsPoint)) { - valid = false - error = errorMessages.invalidList - } else if (dms.polygon.list.length < 3) { - valid = false - error = errorMessages.tooFewPointsPolygon - } - break - case 'boundingbox': - if ( - !validateDmsPoint({ - latitude: dms.boundingbox.north, - longitude: dms.boundingbox.east, - }) || - !validateDmsPoint({ - latitude: dms.boundingbox.south, - longitude: dms.boundingbox.west, - }) - ) { - valid = false - error = errorMessages.invalidCoordinates - } else if (!validateDmsBoundingBox(dms.boundingbox)) { - valid = false - error = errorMessages.invalidBoundingBoxDms - } - break - } - return { valid, error } -} - -/* - * Decimal degrees -> DMS conversion utils - */ -function roundTo(num: any, sigDigits: any) { - const scaler = 10 ** sigDigits - return Math.round(num * scaler) / scaler -} - -function padWithZeros(num: any, width: any) { - return num.toString().padStart(width, '0') -} - -function padDecimalWithZeros(num: any, width: any) { - const decimalParts = num.toString().split('.') - if (decimalParts.length > 1) { - return decimalParts[0].padStart(width, '0') + '.' + decimalParts[1] - } else { - return padWithZeros(num, width) - } -} - -function buildDmsString(components: any) { - if (!components) { - return components - } - return `${components.degrees}°${components.minutes}'${components.seconds}"` -} - -function replacePlaceholderWithZeros(numString = '') { - while (numString.includes('_')) { - if (numString.includes('.')) { - numString = numString.replace('_', '0') - } else { - numString = numString.replace('_', '') - numString = '0' + numString - } - } - return numString -} - -function ddToDmsCoordinate( - dd: any, - direction: any, - degreesPad: any, - secondsPrecision = DEFAULT_SECONDS_PRECISION -) { - const ddAbsoluteValue = Math.abs(dd) - const degrees = Math.trunc(ddAbsoluteValue) - const degreeFraction = ddAbsoluteValue - degrees - const minutes = Math.trunc(60 * degreeFraction) - const seconds = 3600 * degreeFraction - 60 * minutes - const secondsRounded = roundTo(seconds, secondsPrecision) - return { - coordinate: buildDmsString({ - degrees: padWithZeros(degrees, degreesPad), - minutes: padWithZeros(minutes, 2), - seconds: padDecimalWithZeros(secondsRounded, 2), - }), - direction, - } -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function ddToDmsCoordinateLat( - dd: any, - secondsPrecision = DEFAULT_SECONDS_PRECISION -) { - if (!isNaN(dd)) { - const direction = dd >= 0 ? Direction.North : Direction.South - return ddToDmsCoordinate( - dd, - direction, - LAT_DEGREES_DIGITS, - secondsPrecision - ) - } -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function ddToDmsCoordinateLon( - dd: any, - secondsPrecision = DEFAULT_SECONDS_PRECISION -) { - if (!isNaN(dd)) { - const direction = dd >= 0 ? Direction.East : Direction.West - return ddToDmsCoordinate( - dd, - direction, - LON_DEGREES_DIGITS, - secondsPrecision - ) - } -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function getSecondsPrecision(dmsCoordinate: any) { - if (dmsCoordinate === undefined) { - return - } - const decimalIndex = dmsCoordinate.indexOf('.') - // Must subtract 2 instead of 1 because the DMS coordinate ends with " - const lastNumberIndex = dmsCoordinate.length - 2 - if (decimalIndex > -1 && lastNumberIndex > decimalIndex) { - return lastNumberIndex - decimalIndex - } -} - -export { - dmsToWkt, - validateDms, - validateDmsPoint, - dmsCoordinateToDD, - parseDmsCoordinate, - ddToDmsCoordinateLat, - ddToDmsCoordinateLon, - getSecondsPrecision, - buildDmsString, - Direction, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/errors.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/errors.ts deleted file mode 100644 index f104a1d2d29..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/errors.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -const errorMessages = { - malformedWkt: `Malformed WKT. Syntax for supported geometries: - POINT (50 40) - LINESTRING (30 10, 10 30, 40 40) - POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) - MULTIPOINT (10 40, 40 30, 20 20, 30 10) - MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10)) - MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5))) - GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10)) - `, - invalidWktCoordinates: - 'Invalid coordinates. Note that WKT coordinates are ordered longitude then latitude.', - invalidCoordinates: 'Invalid coordinates', - invalidUsngGrid: 'Invalid USNG / MGRS grid', - invalidRadius: 'Radius must be greater than 0 and at most 10,000 kilometers', - invalidList: 'One or more entries are invalid', - invalidBoundingBoxDd: `Invalid bounding box. Coordinates must satisfy the following conditions: - North > South - East > West - North - South >= 0.0001° - East - West >= 0.0001° - `, - invalidBoundingBoxDms: `Invalid bounding box. Coordinates must satisfy the following conditions: - North > South - East > West - North - South >= 0.36" (seconds) - East - West >= 0.36" (seconds) - `, - tooFewPointsLine: 'Lines must contain 2 or more points', - tooFewPointsPolygon: 'Polygons must contain 3 or more points', - firstLastPointMismatch: 'First and last points must be the same', -} - -export default errorMessages diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/geo-helper.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/geo-helper.ts deleted file mode 100644 index e706d0ac314..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/geo-helper.ts +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import wkx from 'wkx' - -function degreesToRadians(degrees: any) { - return (degrees * Math.PI) / 180 -} - -function radiansToDegrees(radians: any) { - return (radians * 180) / Math.PI -} - -/* - * Constants used for the calculations below: - * R is Earth's approximate radius. Assumes a perfect circle, which will produce at most 0.5% error - */ -const R = 6371.01 - -/* - * Given a starting point, initial bearing, and distance travelled, returns the destination point - * reached by travelling the given distance along a great circle arc at that bearing. - * Reference: https://www.movable-type.co.uk/scripts/latlong.html#destPoint - * @param point: wkx Point - * @param bearing: degrees from north - * @param distance: kilometers - */ -function computeDestination(point: any, bearing: any, distance: any) { - if (distance < 0) { - return null - } - - const lat1 = degreesToRadians(point.y) - const lon1 = degreesToRadians(point.x) - const radBearing = degreesToRadians(bearing) - const radDistance = distance / R - - let lat2 = Math.asin( - Math.sin(lat1) * Math.cos(radDistance) + - Math.cos(lat1) * Math.sin(radDistance) * Math.cos(radBearing) - ) - let lon2 = - lon1 + - Math.atan2( - Math.sin(radBearing) * Math.sin(radDistance) * Math.cos(lat1), - Math.cos(radDistance) - Math.sin(lat1) * Math.sin(lat2) - ) - if (isNaN(lat2) || isNaN(lon2)) { - return null - } - - lat2 = radiansToDegrees(lat2) - lon2 = radiansToDegrees(lon2) - if (lon2 > 180 || lon2 < -180) { - lon2 = ((lon2 + 540) % 360) - 180 - } - return new wkx.Point(lon2, lat2) -} - -/* - * TODO: Use Spatial4j buffered point, e.g. BUFFER(POINT(0 0), 10), instead of approximating circle - * Given a point and distance, returns an n-point polygon approximating a circle surrounding the - * point with radius equal to the input distance. - * @param point: wkx Point - * @param distance: kilometers - * @param n: number of points used to approximate the circle - */ -export function computeCircle(point: any, distance: any, n: any) { - if (distance < 0 || n < 0) { - return null - } - - const points = [] - for (let i = 0; i < n; i++) { - points.push(computeDestination(point, (360 * i) / n, distance)) - } - points.push(points[0]) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '(Point | null)[]' is not assigna... Remove this comment to see the full error message - return new wkx.Polygon(points) -} - -/* - * Converts the given distance to kilometers. All conversions are exact. Note that the - * international definition for nautical mile is used (1 nautical mile = 1852 meters). - * Reference: https://www.sfei.org/it/gis/map-interpretation/conversion-constants - */ -export function toKilometers(distance: any, units: any) { - switch (units) { - case 'meters': - return distance / 1000 - case 'kilometers': - return distance - case 'feet': - return distance * 0.0003048 - case 'yards': - return distance * 0.0009144 - case 'miles': - return distance * 1.609344 - case 'nautical miles': - return distance * 1.852 - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/index.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/index.ts deleted file mode 100644 index f2af47f44b8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { validateWkt, roundWktCoords } from './wkt-utils' - -import { ddToWkt, validateDd, validateDdPoint } from './dd-utils' - -import { - dmsToWkt, - validateDms, - validateDmsPoint, - dmsCoordinateToDD, - parseDmsCoordinate, - ddToDmsCoordinateLat, - ddToDmsCoordinateLon, - getSecondsPrecision, - Direction, -} from './dms-utils' - -import { usngToWkt, validateUsng, validateUsngGrid } from './usng-utils' -import errorMessages from './errors' - -export { - validateWkt, - roundWktCoords, - validateDd, - validateDdPoint, - validateDms, - validateDmsPoint, - validateUsng, - validateUsngGrid, - ddToWkt, - ddToDmsCoordinateLat, - ddToDmsCoordinateLon, - parseDmsCoordinate, - dmsCoordinateToDD, - dmsToWkt, - usngToWkt, - errorMessages, - getSecondsPrecision, - Direction, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/usng-utils.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/usng-utils.ts deleted file mode 100644 index 9b981a0998c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/usng-utils.ts +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import wkx from 'wkx' - -import * as usng from 'usng.js' -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. -const converter = new usng.Converter() - -import { computeCircle, toKilometers } from './geo-helper' -import errorMessages from './errors' - -export function validateUsngGrid(grid: any) { - return converter.isUSNG(grid) !== 0 -} - -function gridIsBlank(grid: any) { - return grid.length === 0 -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function inputIsBlank(usng: any) { - switch (usng.shape) { - case 'point': - return gridIsBlank(usng.point) - case 'circle': - return gridIsBlank(usng.circle.point) - case 'line': - return usng.line.list.length === 0 - case 'polygon': - return usng.polygon.list.length === 0 - case 'boundingbox': - return gridIsBlank(usng.boundingbox) - } -} - -/* - * USNG/MGRS -> WKT conversion utils - */ -function usngGridToWktPoint(grid: any) { - const LL = converter.USNGtoLL(grid, true) - return new wkx.Point(LL.lon, LL.lat) -} - -export function usngToWkt(usng: any) { - if (inputIsBlank(usng)) { - return null - } - - let wkt = null - const points: any = [] - switch (usng.shape) { - case 'point': - wkt = usngGridToWktPoint(usng.point).toWkt() - break - case 'circle': - const distance = toKilometers(usng.circle.radius, usng.circle.units) - wkt = computeCircle( - usngGridToWktPoint(usng.circle.point), - distance, - 36 - )?.toWkt() - break - case 'line': - if (usng.line.list.length > 0) { - usng.line.list.map((grid: any) => points.push(usngGridToWktPoint(grid))) - wkt = new wkx.LineString(points).toWkt() - } - break - case 'polygon': - if (usng.polygon.list.length > 0) { - usng.polygon.list.map((grid: any) => - points.push(usngGridToWktPoint(grid)) - ) - const p1 = points[0] - const p2 = points[points.length - 1] - if (p1.x !== p2.x || p1.y !== p2.y) { - points.push(new wkx.Point(p1.x, p1.y)) - } - wkt = new wkx.Polygon(points).toWkt() - } - break - case 'boundingbox': - const grid = converter.isUSNG(usng.boundingbox) - const bbox = converter.USNGtoLL(grid, false) - const minLon = bbox.west - const minLat = bbox.south - const maxLon = bbox.east - const maxLat = bbox.north - const nw = new wkx.Point(minLon, maxLat) - const ne = new wkx.Point(maxLon, maxLat) - const se = new wkx.Point(maxLon, minLat) - const sw = new wkx.Point(minLon, minLat) - wkt = new wkx.Polygon([nw, ne, se, sw, nw]).toWkt() - break - } - return wkt -} - -/* - * USNG/MGRS validation utils - */ -export function validateUsng(usng: any) { - if (inputIsBlank(usng)) { - return { valid: true, error: null } - } - - let valid = true - let error = null - switch (usng.shape) { - case 'point': - if (!validateUsngGrid(usng.point)) { - valid = false - error = errorMessages.invalidUsngGrid - } - break - case 'circle': - const radius = parseFloat(usng.circle.radius) - if ( - isNaN(radius) || - radius <= 0 || - toKilometers(radius, usng.circle.units) > 10000 - ) { - valid = false - error = errorMessages.invalidRadius - } else if (!validateUsngGrid(usng.circle.point)) { - valid = false - error = errorMessages.invalidUsngGrid - } - break - case 'line': - if (!usng.line.list.every(validateUsngGrid)) { - valid = false - error = errorMessages.invalidList - } else if (usng.line.list.length < 2) { - valid = false - error = errorMessages.tooFewPointsLine - } - break - case 'polygon': - if (!usng.polygon.list.every(validateUsngGrid)) { - valid = false - error = errorMessages.invalidList - } else if (usng.line.list.length < 3) { - valid = false - error = errorMessages.tooFewPointsPolygon - } - break - case 'boundingbox': - if (!validateUsngGrid(usng.boundingbox)) { - valid = false - error = errorMessages.invalidUsngGrid - } - break - } - return { valid, error } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/wkt-utils.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/wkt-utils.ts deleted file mode 100644 index 9795cef231a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-new/utils/wkt-utils.ts +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import wkx from 'wkx' - -import errorMessages from './errors' -import DistanceUtils from '../../../js/DistanceUtils' - -function convertUserValueToWKT(val: any) { - val = val.split(' (').join('(').split(', ').join(',') - val = val - .split('MULTIPOINT') - .map((value: any) => { - if (value.indexOf('((') === 0) { - const endOfMultiPoint = value.indexOf('))') + 2 - let multipointStr = value.substring(0, endOfMultiPoint) - multipointStr = multipointStr - .split('((') - .join('(') - .split('),(') - .join(',') - .split('))') - .join(')') - return multipointStr + value.substring(endOfMultiPoint) - } else { - return value - } - }) - .join('MULTIPOINT') - return val -} - -function removeTrailingZeros(wkt: any) { - return wkt.replace(/[-+]?[0-9]*\.?[0-9]+/g, (number: any) => Number(number)) -} - -function checkCoordinateOrder(coordinate: any) { - return ( - coordinate[0] >= -180 && - coordinate[0] <= 180 && - coordinate[1] >= -90 && - coordinate[1] <= 90 - ) -} - -function checkGeometryCoordinateOrdering(geometry: any) { - switch (geometry.type) { - case 'Point': - return checkCoordinateOrder(geometry.coordinates) - case 'LineString': - case 'MultiPoint': - return geometry.coordinates.every((coordinate: any) => - checkCoordinateOrder(coordinate) - ) - case 'Polygon': - case 'MultiLineString': - return geometry.coordinates.every((line: any) => - line.every((coordinate: any) => checkCoordinateOrder(coordinate)) - ) - case 'MultiPolygon': - return geometry.coordinates.every((multipolygon: any) => - multipolygon.every((polygon: any) => - polygon.every((coordinate: any) => checkCoordinateOrder(coordinate)) - ) - ) - case 'GeometryCollection': - return geometry.geometries.every((subgeometry: any) => - checkGeometryCoordinateOrdering(subgeometry) - ) - } -} - -function checkForm(wkt: any) { - try { - const test = wkx.Geometry.parse(wkt) - return test.toWkt() === removeTrailingZeros(convertUserValueToWKT(wkt)) - } catch (err) { - return false - } -} - -function checkLonLatOrdering(wkt: any) { - try { - const test = wkx.Geometry.parse(wkt) - return checkGeometryCoordinateOrdering(test.toGeoJSON()) - } catch (err) { - return false - } -} - -function inputIsBlank(wkt: any) { - return !wkt || wkt.length === 0 -} - -function validateWkt(wkt: any) { - if (inputIsBlank(wkt)) { - return { valid: true, error: null } - } - - let valid = true - let error = null - if (!checkForm(wkt)) { - valid = false - error = errorMessages.malformedWkt - } else if (!checkLonLatOrdering(wkt)) { - valid = false - error = errorMessages.invalidWktCoordinates - } - return { valid, error } -} - -function createCoordPair(coordinate: any) { - return coordinate - .map((val: any) => DistanceUtils.coordinateRound(val)) - .join(' ') -} - -function createLineString(coordinates: any) { - return ( - '(' + - coordinates - .map((coord: any) => { - return createCoordPair(coord) - }) - .join(', ') + - ')' - ) -} - -function createMultiLineString(coordinates: any) { - return ( - '(' + - coordinates - .map((line: any) => { - return createLineString(line) - }) - .join(', ') + - ')' - ) -} - -function createMultiPolygon(coordinates: any) { - return ( - '(' + - coordinates - .map((line: any) => { - return createMultiLineString(line) - }) - .join(', ') + - ')' - ) -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function createRoundedWktGeo(geoJson: any) { - switch (geoJson.type) { - case 'Point': - return ( - geoJson.type.toUpperCase() + - '(' + - createCoordPair(geoJson.coordinates) + - ')' - ) - case 'LineString': - case 'MultiPoint': - return geoJson.type.toUpperCase() + createLineString(geoJson.coordinates) - case 'Polygon': - case 'MultiLineString': - return ( - geoJson.type.toUpperCase() + createMultiLineString(geoJson.coordinates) - ) - case 'MultiPolygon': - return ( - geoJson.type.toUpperCase() + createMultiPolygon(geoJson.coordinates) - ) - case 'GeometryCollection': - return ( - geoJson.type.toUpperCase() + - '(' + - geoJson.geometries - .map((geo: any) => createRoundedWktGeo(geo)) - .join(', ') + - ')' - ) - } -} - -function roundWktCoords(wkt: any) { - if (!inputIsBlank(wkt) && checkForm(wkt) && checkLonLatOrdering(wkt)) { - let parsed = wkx.Geometry.parse(wkt) - let geoJson = parsed.toGeoJSON() - return createRoundedWktGeo(geoJson) - } else { - return wkt - } -} - -export { validateWkt, roundWktCoords } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-old/location-old.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-old/location-old.ts deleted file mode 100644 index f6bd50ff962..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/location-old/location-old.ts +++ /dev/null @@ -1,1173 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* eslint-disable no-var */ -import _ from 'underscore' -import Backbone from 'backbone' -import * as usngs from 'usng.js' -import * as dmsUtils from '../location-new/utils/dms-utils' -import DistanceUtils from '../../js/DistanceUtils' -import wreqr from '../../js/wreqr' -import { Drawing } from '../singletons/drawing' -import { - validateUsngLineOrPoly, - validateDmsLineOrPoly, - validateUtmUpsLineOrPoly, - parseDmsCoordinate, - isUPS, -} from '../../react-component/location/validators' -import { locationColors } from '../../react-component/location/location-color-selector' -import { v4 } from 'uuid' - -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. -const converter = new usngs.Converter() -const utmUpsLocationType = 'utmUps' -// offset used by utmUps for southern hemisphere -const utmUpsBoundaryNorth = 84 -const utmUpsBoundarySouth = -80 -const northingOffset = 10000000 -const usngPrecision = 6 -const Direction = dmsUtils.Direction -export default Backbone.AssociatedModel.extend({ - defaults: () => { - return { - // later on we should probably update areas using locationId to just use id - locationId: v4(), - color: Object.values(locationColors)[0], - drawing: false, - north: undefined, - east: undefined, - south: undefined, - west: undefined, - dmsNorth: undefined, - dmsSouth: undefined, - dmsEast: undefined, - dmsWest: undefined, - dmsNorthDirection: Direction.North, - dmsSouthDirection: Direction.North, - dmsEastDirection: Direction.East, - dmsWestDirection: Direction.East, - dmsPointArray: undefined, - mapNorth: undefined, - mapEast: undefined, - mapWest: undefined, - mapSouth: undefined, - radiusUnits: 'meters', - radius: '', - locationType: 'dd', - prevLocationType: 'dd', - lat: undefined, - lon: undefined, - dmsLat: undefined, - dmsLon: undefined, - dmsLatDirection: Direction.North, - dmsLonDirection: Direction.East, - bbox: undefined, - usng: undefined, - utmUps: undefined, - utmUpsPointArray: undefined, - line: undefined, - multiline: undefined, - lineWidth: '', - lineUnits: 'meters', - polygon: undefined, - polygonBufferWidth: '', - polyType: undefined, - polygonBufferUnits: 'meters', - hasKeyword: false, - keywordValue: undefined, - utmUpsUpperLeftEasting: undefined, - utmUpsUpperLeftNorthing: undefined, - utmUpsUpperLeftHemisphere: 'Northern', - utmUpsUpperLeftZone: 1, - utmUpsLowerRightEasting: undefined, - utmUpsLowerRightNorthing: undefined, - utmUpsLowerRightHemisphere: 'Northern', - utmUpsLowerRightZone: 1, - utmUpsEasting: undefined, - utmUpsNorthing: undefined, - utmUpsZone: 1, - utmUpsHemisphere: 'Northern', - usngbbUpperLeft: undefined, - usngbbLowerRight: undefined, - usngPointArray: undefined, - } - }, - set(key: any, value: any, options: any) { - if (!_.isObject(key)) { - const keyObject = {} - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - keyObject[key] = value - key = keyObject - value = options - } - Backbone.AssociatedModel.prototype.set.call(this, key, value, options) - }, - initialize(props: any) { - this.listenTo( - this, - 'change:line change:polygon', - this.setUsngDmsUtmWithLineOrPoly - ) - this.listenTo(this, 'change:dmsPointArray', this.setLatLonLinePolyFromDms) - this.listenTo(this, 'change:usngPointArray', this.setLatLonLinePolyFromUsng) - this.listenTo( - this, - 'change:utmUpsPointArray', - this.setLatLonLinePolyFromUtmUps - ) - this.listenTo( - this, - 'change:north change:south change:east change:west', - this.setBBox - ) - this.listenTo( - this, - 'change:dmsNorth change:dmsNorthDirection', - this.setBboxDmsNorth - ) - this.listenTo( - this, - 'change:dmsSouth change:dmsSouthDirection', - this.setBboxDmsSouth - ) - this.listenTo( - this, - 'change:dmsEast change:dmsEastDirection', - this.setBboxDmsEast - ) - this.listenTo( - this, - 'change:dmsWest change:dmsWestDirection', - this.setBboxDmsWest - ) - this.listenTo( - this, - 'change:dmsLat change:dmsLatDirection', - this.setRadiusDmsLat - ) - this.listenTo( - this, - 'change:dmsLon change:dmsLonDirection', - this.setRadiusDmsLon - ) - this.listenTo( - this, - 'change:usngbbUpperLeft change:usngbbLowerRight', - this.setBboxUsng - ) - this.listenTo(this, 'change:locationType', this.handleLocationType) - this.listenTo(this, 'change:bbox', _.debounce(this.setBboxLatLon, 5)) - this.listenTo(this, 'change:lat change:lon', this.setRadiusLatLon) - this.listenTo(this, 'change:usng', this.setRadiusUsng) - this.listenTo( - this, - 'change:utmUpsEasting change:utmUpsNorthing change:utmUpsZone change:utmUpsHemisphere', - this.setRadiusUtmUps - ) - this.listenTo( - this, - 'change:utmUpsUpperLeftEasting change:utmUpsUpperLeftNorthing change:utmUpsUpperLeftZone change:utmUpsUpperLeftHemisphere change:utmUpsLowerRightEasting change:utmUpsLowerRightNorthing change:utmUpsLowerRightZone change:utmUpsLowerRightHemisphere', - this.setBboxUtmUps - ) - this.listenTo(this, 'change:mode', () => { - this.set(this.defaults()) - ;(wreqr as any).vent.trigger('search:drawend', [this]) - }) - this.listenTo(this, 'EndExtent', this.drawingOff) - this.listenTo(this, 'BeginExtent', this.drawingOn) - this.initializeValues(props) - }, - initializeValues(props: any) { - if ( - (props.type === 'POINTRADIUS' || props.type === 'POINT') && - props.lat && - props.lon - ) { - if (!props.usng || !props.utmUpsEasting) { - // initializes dms/usng/utmUps using lat/lon - this.updateCoordPointRadiusValues(props.lat, props.lon) - } - } else if (props.mode === 'bbox') { - this.setBBox() - } else { - this.setUsngDmsUtmWithLineOrPoly(this) - } - }, - updateCoordPointRadiusValues(lat: any, lon: any) { - if (!this.isLatLonValid(lat, lon)) return - this.setRadiusDmsFromMap() - const utmUps = this.LLtoUtmUps(lat, lon) - if (utmUps !== undefined) { - const utmUpsParts = this.formatUtmUps(utmUps) - this.setUtmUpsPointRadius(utmUpsParts, true) - } else { - this.clearUtmUpsPointRadius(false) - } - if (this.isInUpsSpace(lat, lon)) { - this.set('usng', undefined) - return - } - const usngsStr = converter.LLtoUSNG(lat, lon, usngPrecision) - this.set('usng', usngsStr, { silent: true }) - }, - drawingOff() { - if (this.get('locationType') === 'dms') { - this.setBboxDmsFromMap() - } - const prevLocationType = this.get('prevLocationType') - if (prevLocationType === 'utmUps') { - this.set('prevLocationType', '') - this.set('locationType', 'utmUps') - } - this.drawing = false - Drawing.turnOffDrawing() - }, - drawingOn() { - const locationType = this.get('locationType') - if (locationType === 'utmUps') { - this.set('prevLocationType', 'utmUps') - this.set('locationType', 'dd') - } - this.drawing = true - Drawing.turnOnDrawing(this) - }, - repositionLatLonUtmUps(isDefined: any, parse: any, assign: any, clear: any) { - if (isDefined(this)) { - const utmUpsParts = parse(this) - if (utmUpsParts !== undefined) { - const result = this.utmUpstoLL(utmUpsParts) - if (result !== undefined) { - const newResult = {} - assign(newResult, result.lat, result.lon) - this.set(newResult) - } else { - clear(this) - } - } - } - }, - repositionLatLon() { - const result = this.usngBbToLatLon() - if (result !== undefined) { - try { - const newResult = {} - ;(newResult as any).mapNorth = result.north - ;(newResult as any).mapSouth = result.south - ;(newResult as any).mapEast = result.east - ;(newResult as any).mapWest = result.west - this.set(newResult) - } catch (err) { - // do nothing - } - } - this.repositionLatLonUtmUps( - (_this: any) => _this.isUtmUpsUpperLeftDefined(), - (_this: any) => _this.parseUtmUpsUpperLeft(), - (newResult: any, lat: any, lon: any) => { - newResult.mapNorth = lat - newResult.mapWest = lon - }, - (_this: any) => _this.clearUtmUpsUpperLeft(true) - ) - this.repositionLatLonUtmUps( - (_this: any) => _this.isUtmUpsLowerRightDefined(), - (_this: any) => _this.parseUtmUpsLowerRight(), - (newResult: any, lat: any, lon: any) => { - newResult.mapSouth = lat - newResult.mapEast = lon - }, - (_this: any) => _this.clearUtmUpsLowerRight(true) - ) - }, - setLatLonUtmUps( - result: any, - isDefined: any, - parse: any, - assign: any, - clear: any - ) { - if ( - !( - result.north !== undefined && - result.south !== undefined && - result.west !== undefined && - result.east !== undefined - ) && - isDefined(this) - ) { - // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '_this'. - // eslint-disable-next-line no-undef - const utmUpsParts = parse(_this) - if (utmUpsParts !== undefined) { - const utmUpsResult = this.utmUpstoLL(utmUpsParts) - if (utmUpsResult !== undefined) { - assign(result, utmUpsResult.lat, utmUpsResult.lon) - } else { - clear(this) - } - } - } - }, - convertLatLonLinePolyToUsng(points: any) { - return Array.isArray(points) - ? points.map((point: any) => { - // A little bit unintuitive, but lat/lon is swapped here - return converter.LLtoMGRSUPS(point[1], point[0], usngPrecision) - }) - : undefined - }, - convertLatLonLinePolyToDms(points: any) { - return Array.isArray(points) - ? points.map((point: any) => { - const lat = dmsUtils.ddToDmsCoordinateLat(point[1]) - const lon = dmsUtils.ddToDmsCoordinateLon(point[0]) - return { - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. - lat: lat.coordinate, - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. - lon: lon.coordinate, - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. - latDirection: lat.direction, - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. - lonDirection: lon.direction, - } - }) - : undefined - }, - convertLatLonLinePolyToUtm(points: any) { - return Array.isArray(points) - ? points.map((point: any) => { - let llPoint = this.LLtoUtmUps(point[1], point[0]) - return { - ...llPoint, - hemisphere: - llPoint.hemisphere.toUpperCase() === 'NORTHERN' - ? 'Northern' - : 'Southern', - } - }) - : undefined - }, - setUsngDmsUtmWithLineOrPoly(model: any) { - let key = this.get('mode') - if (key === 'poly') key = 'polygon' - if (key && (key === 'line' || key === 'polygon')) { - const points = this.get(key) - const usngPoints = this.convertLatLonLinePolyToUsng(points) - const dmsPoints = this.convertLatLonLinePolyToDms(points) - const utmupsPoints = this.convertLatLonLinePolyToUtm(points) - model.set( - { - usngPointArray: usngPoints, - dmsPointArray: dmsPoints, - utmUpsPointArray: utmupsPoints, - }, - { - silent: true, //don't trigger another onChange for line or poly - } - ) - } - }, - setLatLonLinePolyFromDms() { - let key = this.get('mode') - if (key === 'poly') key = 'polygon' - if (key && (key === 'line' || key === 'polygon')) { - let validation = validateDmsLineOrPoly(this.get('dmsPointArray'), key) - if (!validation.error) { - const llPoints = this.get('dmsPointArray').map((point: any) => { - let latCoordinate = dmsUtils.dmsCoordinateToDD({ - ...parseDmsCoordinate(point.lat), - direction: point.latDirection, - }) - let lonCoordinate = dmsUtils.dmsCoordinateToDD({ - ...parseDmsCoordinate(point.lon), - direction: point.lonDirection, - }) - // A little bit unintuitive, but lat/lon is swapped here - return [lonCoordinate, latCoordinate] - }) - const usngPoints = this.convertLatLonLinePolyToUsng(llPoints) - const utmupsPoints = this.convertLatLonLinePolyToUtm(llPoints) - this.set( - { - [key]: llPoints, - usngPointArray: usngPoints, - utmUpsPointArray: utmupsPoints, - }, - { - silent: true, //don't trigger another onChange for line or poly - } - ) - } - } - }, - setLatLonLinePolyFromUsng() { - let key = this.get('mode') - if (key === 'poly') key = 'polygon' - if (key && (key === 'line' || key === 'polygon')) { - let validation = validateUsngLineOrPoly(this.get('usngPointArray'), key) - if (!validation.error) { - const llPoints = this.get('usngPointArray').map((point: any) => { - // A little bit unintuitive, but lat/lon is swapped here - const convertedPoint = isUPS(point) - ? converter.UTMUPStoLL(point) - : converter.USNGtoLL(point, usngPrecision) - return [convertedPoint.lon, convertedPoint.lat] - }) - const dmsPoints = this.convertLatLonLinePolyToDms(llPoints) - const utmupsPoints = this.convertLatLonLinePolyToUtm(llPoints) - this.set( - { - [key]: llPoints, - dmsPointArray: dmsPoints, - utmUpsPointArray: utmupsPoints, - }, - { - silent: true, //don't trigger another onChange for line or poly - } - ) - } - } - }, - setLatLonLinePolyFromUtmUps() { - let key = this.get('mode') - if (key === 'poly') key = 'polygon' - if (key && (key === 'line' || key === 'polygon')) { - let validation = validateUtmUpsLineOrPoly( - this.get('utmUpsPointArray'), - key - ) - if (!validation.error) { - const llPoints = this.get('utmUpsPointArray').map((point: any) => { - const convertedPoint = this.utmUpstoLL(point) - return [convertedPoint.lon, convertedPoint.lat] - }) - const dmsPoints = this.convertLatLonLinePolyToDms(llPoints) - const usngPoints = this.convertLatLonLinePolyToUsng(llPoints) - this.set( - { - [key]: llPoints, - dmsPointArray: dmsPoints, - usngPointArray: usngPoints, - }, - { - silent: true, //don't trigger another onChange for line or poly - } - ) - } - } - }, - setLatLon() { - if (this.get('locationType') === 'dd') { - let result = {} - ;(result as any).north = this.get('mapNorth') - ;(result as any).south = this.get('mapSouth') - ;(result as any).west = this.get('mapWest') - ;(result as any).east = this.get('mapEast') - if ( - !( - (result as any).north !== undefined && - (result as any).south !== undefined && - (result as any).west !== undefined && - (result as any).east !== undefined - ) && - this.get('usngbbUpperLeft') && - this.get('usngbbLowerRight') - ) { - try { - result = this.usngBbToLatLon() - } catch (err) { - // do nothing - } - } - this.setLatLonUtmUps( - result, - (_this: any) => _this.isUtmUpsUpperLeftDefined(), - (_this: any) => _this.parseUtmUpsUpperLeft(), - (result: any, lat: any, lon: any) => { - result.north = lat - result.west = lon - }, - (_this: any) => { - _this.clearUtmUpsUpperLeft(true) - } - ) - this.setLatLonUtmUps( - result, - (_this: any) => _this.isUtmUpsLowerRightDefined(), - (_this: any) => _this.parseUtmUpsLowerRight(), - (result: any, lat: any, lon: any) => { - result.south = lat - result.east = lon - }, - (_this: any) => { - _this.clearUtmUpsLowerRight(true) - } - ) - ;(result as any).north = DistanceUtils.coordinateRound( - (result as any).north - ) - ;(result as any).east = DistanceUtils.coordinateRound( - (result as any).east - ) - ;(result as any).south = DistanceUtils.coordinateRound( - (result as any).south - ) - ;(result as any).west = DistanceUtils.coordinateRound( - (result as any).west - ) - this.set(result) - } else if (this.get('locationType') === 'dms') { - this.setBboxDmsFromMap() - } - }, - setFilterBBox(model: any) { - const north = parseFloat(model.get('north')) - const south = parseFloat(model.get('south')) - const west = parseFloat(model.get('west')) - const east = parseFloat(model.get('east')) - model.set({ - mapNorth: Number.isNaN(north) ? undefined : north, - mapSouth: Number.isNaN(south) ? undefined : north, - mapEast: Number.isNaN(east) ? undefined : east, - mapWest: Number.isNaN(west) ? undefined : west, - }) - }, - setBboxLatLon() { - const north = parseFloat(this.get('north')), - south = parseFloat(this.get('south')), - west = parseFloat(this.get('west')), - east = parseFloat(this.get('east')) - if (!this.isLatLonValid(north, west) || !this.isLatLonValid(south, east)) { - return - } - this.setBboxDmsFromMap() - let utmUps = this.LLtoUtmUps(north, west) - if (utmUps !== undefined) { - var utmUpsParts = this.formatUtmUps(utmUps) - this.setUtmUpsUpperLeft(utmUpsParts, !this.isLocationTypeUtmUps()) - } - utmUps = this.LLtoUtmUps(south, east) - if (utmUps !== undefined) { - // eslint-disable-next-line no-redeclare - var utmUpsParts = this.formatUtmUps(utmUps) - this.setUtmUpsLowerRight(utmUpsParts, !this.isLocationTypeUtmUps()) - } - if (this.isLocationTypeUtmUps() && this.get('drawing')) { - this.repositionLatLon() - } - const lat = (north + south) / 2 - const lon = (east + west) / 2 - if (this.isInUpsSpace(lat, lon)) { - this.set({ - usngbbUpperLeft: undefined, - usngbbLowerRight: undefined, - }) - return - } - const result = this.usngBbFromLatLon({ north, west, south, east }) - this.set(result, { - silent: this.get('locationType') !== 'usng', - }) - if (this.get('locationType') === 'usng' && this.get('drawing')) { - this.repositionLatLon() - } - }, - setRadiusLatLon() { - const lat = this.get('lat'), - lon = this.get('lon') - this.updateCoordPointRadiusValues(lat, lon) - }, - setRadiusDmsLat() { - this.setLatLonFromDms('dmsLat', 'dmsLatDirection', 'lat') - }, - setRadiusDmsLon() { - this.setLatLonFromDms('dmsLon', 'dmsLonDirection', 'lon') - }, - usngBbFromLatLon({ north, west, south, east }: any) { - try { - const usngbbUpperLeft = converter.LLtoUSNG(north, west, usngPrecision) - const usngbbLowerRight = converter.LLtoUSNG(south, east, usngPrecision) - return { - usngbbUpperLeft, - usngbbLowerRight, - } - } catch (err) { - // do nothing - } - return { - usngbbUpperLeft: undefined, - usngbbLowerRight: undefined, - } - }, - usngBbToLatLon() { - if ( - this.get('usngbbUpperLeft') !== undefined && - this.get('usngbbLowerRight') !== undefined - ) { - const { north, west } = converter.USNGtoLL(this.get('usngbbUpperLeft')) - const { south, east } = converter.USNGtoLL(this.get('usngbbLowerRight')) - return { north, south, east, west } - } - return {} - }, - setBboxUsng() { - if (this.get('locationType') !== 'usng') { - return - } - const { north, west, south, east } = this.usngBbToLatLon() - this.set({ - mapNorth: north, - mapSouth: south, - mapEast: east, - mapWest: west, - }) - this.set( - { - north, - west, - south, - east, - }, - { - silent: true, - } - ) - let utmUps = this.LLtoUtmUps(north, west) - if (utmUps !== undefined) { - const utmUpsFormatted = this.formatUtmUps(utmUps) - this.setUtmUpsUpperLeft(utmUpsFormatted, true) - } - utmUps = this.LLtoUtmUps(south, east) - if (utmUps !== undefined) { - const utmUpsFormatted = this.formatUtmUps(utmUps) - this.setUtmUpsLowerRight(utmUpsFormatted, true) - } - }, - setBBox() { - //we need these to always be inferred - //as numeric values and never as strings - const north = parseFloat(this.get('north')) - const south = parseFloat(this.get('south')) - const west = parseFloat(this.get('west')) - const east = parseFloat(this.get('east')) - if ( - !Number.isNaN(north) && - !Number.isNaN(south) && - !Number.isNaN(east) && - !Number.isNaN(west) - ) { - this.set('bbox', [west, south, east, north].join(',')) - } - this.set({ - mapNorth: Number.isNaN(north) ? undefined : north, - mapSouth: Number.isNaN(south) ? undefined : south, - mapEast: Number.isNaN(east) ? undefined : east, - mapWest: Number.isNaN(west) ? undefined : west, - }) - }, - setRadiusUsng() { - const usng = this.get('usng') - if (usng === undefined) { - return - } - let result - try { - result = converter.USNGtoLL(usng, true) - } catch (err) { - // do nothing - } - if (!isNaN(result.lat) && !isNaN(result.lon)) { - this.set(result) - const utmUps = this.LLtoUtmUps(result.lat, result.lon) - if (utmUps !== undefined) { - const utmUpsParts = this.formatUtmUps(utmUps) - this.setUtmUpsPointRadius(utmUpsParts, true) - } - } else { - this.clearUtmUpsPointRadius(true) - this.set({ - lat: undefined, - lon: undefined, - }) - } - }, - isLatLonValid(lat: any, lon: any) { - lat = parseFloat(lat) - lon = parseFloat(lon) - return lat > -90 && lat < 90 && lon > -180 && lon < 180 - }, - isInUpsSpace(lat: any, lon: any) { - lat = parseFloat(lat) - lon = parseFloat(lon) - return ( - this.isLatLonValid(lat, lon) && - (lat < utmUpsBoundarySouth || lat > utmUpsBoundaryNorth) - ) - }, - // This method is called when the UTM/UPS point radius coordinates are changed by the user. - setRadiusUtmUps() { - if (!this.isLocationTypeUtmUps() && !this.isUtmUpsPointRadiusDefined()) { - return - } - const utmUpsParts = this.parseUtmUpsPointRadius() - if (utmUpsParts === undefined) { - return - } - const utmUpsResult = this.utmUpstoLL(utmUpsParts) - if (utmUpsResult === undefined) { - if (utmUpsParts.zoneNumber !== 0) { - this.clearUtmUpsPointRadius(true) - } - this.set({ - lat: undefined, - lon: undefined, - usng: undefined, - radius: '', - }) - return - } - this.set(utmUpsResult) - const { lat, lon } = utmUpsResult - if (!this.isLatLonValid(lat, lon) || this.isInUpsSpace(lat, lon)) { - this.set({ usng: undefined }) - return - } - const usngsStr = converter.LLtoUSNG(lat, lon, usngPrecision) - this.set('usng', usngsStr, { silent: true }) - }, - // This method is called when the UTM/UPS bounding box coordinates are changed by the user. - setBboxUtmUps() { - if (!this.isLocationTypeUtmUps()) { - return - } - let upperLeft = undefined - let lowerRight = undefined - if (this.isUtmUpsUpperLeftDefined()) { - const upperLeftParts = this.parseUtmUpsUpperLeft() - if (upperLeftParts !== undefined) { - upperLeft = this.utmUpstoLL(upperLeftParts) - if (upperLeft !== undefined) { - this.set({ mapNorth: upperLeft.lat, mapWest: upperLeft.lon }) - this.set( - { north: upperLeft.lat, west: upperLeft.lon }, - { silent: true } - ) - } else { - this.set({ - mapNorth: undefined, - mapSouth: undefined, - mapEast: undefined, - mapWest: undefined, - usngbbUpperLeft: undefined, - usngbbLowerRight: undefined, - }) - } - } else { - this.set({ north: undefined, west: undefined }, { silent: true }) - } - } else { - this.set({ north: undefined, west: undefined }, { silent: true }) - } - if (this.isUtmUpsLowerRightDefined()) { - const lowerRightParts = this.parseUtmUpsLowerRight() - if (lowerRightParts !== undefined) { - lowerRight = this.utmUpstoLL(lowerRightParts) - if (lowerRight !== undefined) { - this.set({ mapSouth: lowerRight.lat, mapEast: lowerRight.lon }) - this.set( - { south: lowerRight.lat, east: lowerRight.lon }, - { silent: true } - ) - } else { - this.set({ - mapNorth: undefined, - mapSouth: undefined, - mapEast: undefined, - mapWest: undefined, - usngbbUpperLeft: undefined, - usngbbLowerRight: undefined, - }) - } - } else { - this.set({ south: undefined, east: undefined }, { silent: true }) - } - } else { - this.set({ south: undefined, east: undefined }, { silent: true }) - } - if (upperLeft === undefined || lowerRight == undefined) { - return - } - const lat = (upperLeft.lat + lowerRight.lat) / 2 - const lon = (upperLeft.lon + lowerRight.lon) / 2 - if (!this.isLatLonValid(lat, lon) || this.isInUpsSpace(lat, lon)) { - this.set({ - usngbbUpperLeft: undefined, - usngbbLowerRight: undefined, - }) - return - } - const result = this.usngBbFromLatLon({ - north: upperLeft.lat, - south: lowerRight.lat, - east: lowerRight.lon, - west: upperLeft.lon, - }) - this.set(result, { - silent: this.get('locationType') === 'usng', - }) - }, - setBboxDmsNorth() { - this.setLatLonFromDms('dmsNorth', 'dmsNorthDirection', 'north') - }, - setBboxDmsSouth() { - this.setLatLonFromDms('dmsSouth', 'dmsSouthDirection', 'south') - }, - setBboxDmsEast() { - this.setLatLonFromDms('dmsEast', 'dmsEastDirection', 'east') - }, - setBboxDmsWest() { - this.setLatLonFromDms('dmsWest', 'dmsWestDirection', 'west') - }, - setBboxDmsFromMap() { - const dmsNorth = dmsUtils.ddToDmsCoordinateLat( - this.get('mapNorth'), - dmsUtils.getSecondsPrecision(this.get('dmsNorth')) - ) - const dmsSouth = dmsUtils.ddToDmsCoordinateLat( - this.get('mapSouth'), - dmsUtils.getSecondsPrecision(this.get('dmsSouth')) - ) - const dmsWest = dmsUtils.ddToDmsCoordinateLon( - this.get('mapWest'), - dmsUtils.getSecondsPrecision(this.get('dmsWest')) - ) - const dmsEast = dmsUtils.ddToDmsCoordinateLon( - this.get('mapEast'), - dmsUtils.getSecondsPrecision(this.get('dmsEast')) - ) - this.set( - { - dmsNorth: dmsNorth && dmsNorth.coordinate, - dmsNorthDirection: (dmsNorth && dmsNorth.direction) || Direction.North, - dmsSouth: dmsSouth && dmsSouth.coordinate, - dmsSouthDirection: (dmsSouth && dmsSouth.direction) || Direction.North, - dmsWest: dmsWest && dmsWest.coordinate, - dmsWestDirection: (dmsWest && dmsWest.direction) || Direction.East, - dmsEast: dmsEast && dmsEast.coordinate, - dmsEastDirection: (dmsEast && dmsEast.direction) || Direction.East, - }, - { silent: true } - ) - }, - setRadiusDmsFromMap() { - const dmsLat = dmsUtils.ddToDmsCoordinateLat( - this.get('lat'), - dmsUtils.getSecondsPrecision(this.get('dmsLat')) - ) - const dmsLon = dmsUtils.ddToDmsCoordinateLon( - this.get('lon'), - dmsUtils.getSecondsPrecision(this.get('dmsLon')) - ) - this.set( - { - dmsLat: dmsLat && dmsLat.coordinate, - dmsLatDirection: (dmsLat && dmsLat.direction) || Direction.North, - dmsLon: dmsLon && dmsLon.coordinate, - dmsLonDirection: (dmsLon && dmsLon.direction) || Direction.East, - }, - { silent: true } - ) - }, - setLatLonFromDms( - dmsCoordinateKey: any, - dmsDirectionKey: any, - latLonKey: any - ) { - const dmsCoordinate = dmsUtils.parseDmsCoordinate( - this.get(dmsCoordinateKey) - ) - if (dmsCoordinate) { - this.set( - latLonKey, - dmsUtils.dmsCoordinateToDD({ - ...dmsCoordinate, - direction: this.get(dmsDirectionKey), - }) - ) - } else { - this.set(latLonKey, undefined) - } - }, - handleLocationType() { - if (this.get('locationType') === 'dd') { - this.set({ - north: this.get('mapNorth'), - south: this.get('mapSouth'), - east: this.get('mapEast'), - west: this.get('mapWest'), - }) - } else if (this.get('locationType') === 'dms') { - this.setBboxDmsFromMap() - this.setRadiusDmsFromMap() - } - }, - // Convert Lat-Lon to UTM/UPS coordinates. Returns undefined if lat or lon is undefined or not a number. - // Returns undefined if the underlying call to usng fails. Otherwise, returns an object with: - // - // easting : FLOAT - // northing : FLOAT - // zoneNumber : INTEGER (>=0 and <= 60) - // hemisphere : STRING (NORTHERN or SOUTHERN) - LLtoUtmUps(lat: any, lon: any) { - lat = parseFloat(lat) - lon = parseFloat(lon) - if (!this.isLatLonValid(lat, lon)) { - return undefined - } - let utmUps = converter.LLtoUTMUPSObject(lat, lon) - utmUps.hemisphere = lat >= 0 ? 'NORTHERN' : 'SOUTHERN' - return utmUps - }, - // Convert UTM/UPS coordinates to Lat-Lon. Expects an argument object with: - // - // easting : FLOAT - // northing : FLOAT - // zoneNumber : INTEGER (>=0 and <= 60) - // hemisphere : STRING (NORTHERN or SOUTHERN) - // - // Returns an object with: - // - // lat : FLOAT - // lon : FLOAT - // - // Returns undefined if the latitude is out of range. - // - utmUpstoLL(utmUpsParts: any) { - const { hemisphere, zoneNumber, northing } = utmUpsParts - const northernHemisphere = hemisphere.toUpperCase() === 'NORTHERN' - utmUpsParts = { - ...utmUpsParts, - northPole: northernHemisphere, - } - const isUps = zoneNumber === 0 - utmUpsParts.northing = - isUps || northernHemisphere ? northing : northing - northingOffset - let lat, lon - try { - const result = converter.UTMUPStoLL(utmUpsParts) - lat = result.lat - lon = result.lon % 360 - if (lon < -180) { - lon = lon + 360 - } - if (lon > 180) { - lon = lon - 360 - } - if (!this.isLatLonValid(lat, lon)) { - return { lat: undefined, lon: undefined } - } - } catch (err) { - return { lat: undefined, lon: undefined } - } - return { lat, lon } - }, - // Return true if the current location type is UTM/UPS, otherwise false. - isLocationTypeUtmUps() { - return this.get('locationType') === utmUpsLocationType - }, - // Set the model fields for the Upper-Left bounding box UTM/UPS. The arguments are: - // - // utmUpsFormatted : output from the method 'formatUtmUps' - // silent : BOOLEAN (true if events should be generated) - setUtmUpsUpperLeft(utmUpsFormatted: any, silent: any) { - this.set('utmUpsUpperLeftEasting', utmUpsFormatted.easting, { - silent, - }) - this.set('utmUpsUpperLeftNorthing', utmUpsFormatted.northing, { - silent, - }) - this.set('utmUpsUpperLeftZone', utmUpsFormatted.zoneNumber, { - silent, - }) - this.set('utmUpsUpperLeftHemisphere', utmUpsFormatted.hemisphere, { - silent, - }) - }, - // Set the model fields for the Lower-Right bounding box UTM/UPS. The arguments are: - // - // utmUpsFormatted : output from the method 'formatUtmUps' - // silent : BOOLEAN (true if events should be generated) - setUtmUpsLowerRight(utmUpsFormatted: any, silent: any) { - this.set('utmUpsLowerRightEasting', utmUpsFormatted.easting, { - silent, - }) - this.set('utmUpsLowerRightNorthing', utmUpsFormatted.northing, { - silent, - }) - this.set('utmUpsLowerRightZone', utmUpsFormatted.zoneNumber, { - silent, - }) - this.set('utmUpsLowerRightHemisphere', utmUpsFormatted.hemisphere, { - silent, - }) - }, - // Set the model fields for the Point Radius UTM/UPS. The arguments are: - // - // utmUpsFormatted : output from the method 'formatUtmUps' - // silent : BOOLEAN (true if events should be generated) - setUtmUpsPointRadius(utmUpsFormatted: any, silent: any) { - this.set('utmUpsEasting', utmUpsFormatted.easting, { silent }) - this.set('utmUpsNorthing', utmUpsFormatted.northing, { silent }) - this.set('utmUpsZone', utmUpsFormatted.zoneNumber, { silent }) - this.set('utmUpsHemisphere', utmUpsFormatted.hemisphere, { - silent, - }) - }, - clearUtmUpsPointRadius(silent: any) { - this.set('utmUpsEasting', undefined, { silent }) - this.set('utmUpsNorthing', undefined, { silent }) - this.set('utmUpsZone', 1, { silent }) - this.set('utmUpsHemisphere', 'Northern', { silent }) - }, - clearUtmUpsUpperLeft(silent: any) { - this.set( - { - utmUpsUpperLeftEasting: undefined, - utmUpsUpperLeftNorthing: undefined, - utmUpsUpperLeftZone: 1, - utmUpsUpperLeftHemisphere: 'Northern', - }, - { silent } - ) - }, - clearUtmUpsLowerRight(silent: any) { - this.set('utmUpsLowerRightEasting', undefined, { silent }) - this.set('utmUpsLowerRightNorthing', undefined, { silent }) - this.set('utmUpsLowerRightZone', 1, { silent }) - this.set('utmUpsLowerRightHemisphere', 'Northern', { silent }) - }, - // Parse the UTM/UPS fields that come from the HTML layer. The parameters eastingRaw and northingRaw - // are string representations of floating pointnumbers. The zoneRaw parameter is a string - // representation of an integer in the range [0,60]. The hemisphereRaw parameters is a string - // that should be 'Northern' or 'Southern'. - parseUtmUps( - eastingRaw: any, - northingRaw: any, - zoneRaw: any, - hemisphereRaw: any - ) { - const easting = parseFloat(eastingRaw) - const northing = parseFloat(northingRaw) - const zone = parseInt(zoneRaw) - const hemisphere = - hemisphereRaw === 'Northern' - ? 'NORTHERN' - : hemisphereRaw === 'Southern' - ? 'SOUTHERN' - : undefined - if ( - !isNaN(easting) && - !isNaN(northing) && - !isNaN(zone) && - hemisphere !== undefined && - zone >= 0 && - zone <= 60 - ) { - return { - zoneNumber: zone, - hemisphere, - easting, - northing, - } - } - return undefined - }, - // Format the internal representation of UTM/UPS coordinates into the form expected by the model. - formatUtmUps(utmUps: any) { - return { - easting: utmUps.easting, - northing: utmUps.northing, - zoneNumber: utmUps.zoneNumber, - hemisphere: - utmUps.hemisphere === 'NORTHERN' - ? 'Northern' - : utmUps.hemisphere === 'SOUTHERN' - ? 'Southern' - : undefined, - } - }, - // Return true if all of the UTM/UPS upper-left model fields are defined. Otherwise, false. - isUtmUpsUpperLeftDefined() { - return ( - this.get('utmUpsUpperLeftEasting') !== undefined && - this.get('utmUpsUpperLeftNorthing') !== undefined && - this.get('utmUpsUpperLeftZone') !== undefined && - this.get('utmUpsUpperLeftHemisphere') !== undefined - ) - }, - // Return true if all of the UTM/UPS lower-right model fields are defined. Otherwise, false. - isUtmUpsLowerRightDefined() { - return ( - this.get('utmUpsLowerRightEasting') !== undefined && - this.get('utmUpsLowerRightNorthing') !== undefined && - this.get('utmUpsLowerRightZone') !== undefined && - this.get('utmUpsLowerRightHemisphere') !== undefined - ) - }, - // Return true if all of the UTM/UPS point radius model fields are defined. Otherwise, false. - isUtmUpsPointRadiusDefined() { - return ( - this.get('utmUpsEasting') !== undefined && - this.get('utmUpsNorthing') !== undefined && - this.get('utmUpsZone') !== undefined && - this.get('utmUpsHemisphere') !== undefined - ) - }, - // Get the UTM/UPS Upper-Left bounding box fields in the internal format. See 'parseUtmUps'. - parseUtmUpsUpperLeft() { - return this.parseUtmUps( - this.get('utmUpsUpperLeftEasting'), - this.get('utmUpsUpperLeftNorthing'), - this.get('utmUpsUpperLeftZone'), - this.get('utmUpsUpperLeftHemisphere') - ) - }, - // Get the UTM/UPS Lower-Right bounding box fields in the internal format. See 'parseUtmUps'. - parseUtmUpsLowerRight() { - return this.parseUtmUps( - this.get('utmUpsLowerRightEasting'), - this.get('utmUpsLowerRightNorthing'), - this.get('utmUpsLowerRightZone'), - this.get('utmUpsLowerRightHemisphere') - ) - }, - // Get the UTM/UPS point radius fields in the internal format. See 'parseUtmUps'. - parseUtmUpsPointRadius() { - return this.parseUtmUps( - this.get('utmUpsEasting'), - this.get('utmUpsNorthing'), - this.get('utmUpsZone'), - this.get('utmUpsHemisphere') - ) - }, - // override toJSON so that when we save the location information elsewhere we don't include ephemeral state, like isInteractive - toJSON(options: any) { - const originalJSON = Backbone.Model.prototype.toJSON.apply(this, [options]) - delete originalJSON['isInteractive'] - delete originalJSON['isReadonly'] - return originalJSON - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/map-context-menu/map-context-menu.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/map-context-menu/map-context-menu.view.tsx deleted file mode 100644 index b1a6609281b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/map-context-menu/map-context-menu.view.tsx +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useMenuState } from '../menu-state/menu-state' -import Popover from '@mui/material/Popover' -import Paper from '@mui/material/Paper' -import { Elevations } from '../theme/theme' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import CopyCoordinates from '../../react-component/copy-coordinates' - -const MapContextDropdown = ({ mapModel }: { mapModel: any }) => { - const [coordinates, setCoordinates] = React.useState( - mapModel.toJSON().coordinateValues - ) - const menuState = useMenuState() - const { mouseX, mouseY, mouseLat } = mapModel.toJSON() - - useListenTo(mapModel, 'change:open', () => { - if (mapModel.get('open')) { - menuState.handleClick() - } else { - menuState.handleClose() - } - }) - useListenTo(mapModel, 'change:coordinateValues', () => { - setCoordinates(mapModel.toJSON().coordinateValues) - }) - React.useEffect(() => { - if (menuState.open && mouseLat === undefined) { - menuState.handleClose() - } - if (!menuState.open) { - mapModel.set('open', false) - } - }, [menuState.open]) - return ( - <> -
    - - - { - menuState.handleClose() - }} - /> - - - - ) -} - -export default hot(module)(MapContextDropdown) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/memo/memo.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/memo/memo.tsx deleted file mode 100644 index 079312151bb..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/memo/memo.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from 'react' - -// Convenience wrapper around memo - -type MemoProps = { - children: JSX.Element | JSX.Element[] - dependencies?: any[] -} - -export const Memo = ({ dependencies = [], children }: MemoProps) => { - return React.useMemo(() => { - return <>{children} - }, dependencies) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/menu-state/menu-state.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/menu-state/menu-state.tsx deleted file mode 100644 index 5b969901cfb..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/menu-state/menu-state.tsx +++ /dev/null @@ -1,164 +0,0 @@ -import { ButtonProps } from '@mui/material/Button' -import { PopoverActions, PopoverProps } from '@mui/material/Popover' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import debounce from 'lodash.debounce' - -type Props = { - /** - * Why maxheight? Well, we just want to be able to constrain popovers. It also doesn't preclude the inside components from having am min height if they so desire. - */ - maxHeight?: CSSStyleDeclaration['maxHeight'] -} - -/** - * Normal refs don't cause a rerender, but often times we want that behavior when grabbing dom nodes and otherwise - * https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node - */ -export function useRerenderingRef() { - const [ref, setRef] = React.useState() - const rerenderingRef = React.useCallback(setRef, []) - return { - current: ref, - ref: rerenderingRef, - } -} - -/** - * Firefox and Chrome differ slightly in implementation. If only one entry, firefox returns that instead of an array! - */ -const getBorderBoxSizeFromEntry = (entry: ResizeObserverEntry) => { - const borderBoxSizeArray: ResizeObserverSize[] = [] - return borderBoxSizeArray.concat(entry.borderBoxSize) -} - -const useListenForChildUpdates = ({ - popoverRef, - action, -}: { - popoverRef: HTMLDivElement | undefined - action: React.MutableRefObject -}) => { - React.useEffect(() => { - let lastWidth = 0 - let lastHeight = 0 - /** - * Width is less likely to change in popups, so we can react immediately - */ - const widthCallback = (entries: ResizeObserverEntry[]) => { - for (let entry of entries) { - for (let subentry of getBorderBoxSizeFromEntry(entry)) { - if (subentry.inlineSize !== lastWidth) { - lastWidth = subentry.inlineSize - action.current?.updatePosition() - } - } - } - } - /** - * Height is very likely to change in popups, so we should react less immediately - */ - const heightCallback = debounce((entries: ResizeObserverEntry[]) => { - for (let entry of entries) { - for (let subentry of getBorderBoxSizeFromEntry(entry)) { - if (subentry.blockSize !== lastHeight) { - lastHeight = subentry.blockSize - action.current?.updatePosition() - } - } - } - }, 300) - let resizeObserver = new ResizeObserver((entries) => { - widthCallback(entries) - heightCallback(entries) - }) - if (popoverRef) { - const paperElement = popoverRef.querySelector(':scope > .MuiPaper-root') - if (paperElement) { - resizeObserver.observe(paperElement) - } - } - return () => { - resizeObserver.disconnect() - } - }, [action.current, popoverRef]) -} - -export const useMenuState = ({ maxHeight }: Props = {}) => { - const anchorRef = React.useRef(null) - const popoverRef = useRerenderingRef() - const action = React.useRef() - const [open, setOpen] = React.useState(false) - useListenForChildUpdates({ popoverRef: popoverRef.current, action }) - const handleClick = () => { - setOpen(!open) - } - - const handleClose = () => { - setOpen(false) - } - return { - anchorRef, - open, - handleClick, - handleClose, - /** - * Handy prop bundles for passing to common components - */ - dropdownProps: { - open, - handleClose, - }, - MuiPopoverProps: { - open, - onClose: handleClose, - anchorEl: anchorRef.current, - action, - ref: popoverRef.ref, - ...POPOVER_DEFAULTS({ maxHeight }), - } as Required< - Pick< - PopoverProps, - | 'open' - | 'onClose' - | 'anchorEl' - | 'TransitionProps' - | 'anchorOrigin' - | 'transformOrigin' - | 'action' - | 'ref' - > - >, - MuiButtonProps: { - ref: anchorRef as unknown as ButtonProps['ref'], - onClick: handleClick, - } as Required>, - buttonProps: { - ref: anchorRef, - onClick: handleClick, - }, - } -} - -export const POPOVER_DEFAULTS = ({ maxHeight }: Props = {}) => { - return { - anchorOrigin: { - vertical: 'bottom', - horizontal: 'center', - }, - transformOrigin: { - vertical: 'top', - horizontal: 'center', - }, - TransitionProps: { - onEntered: (element) => { - element.style.maxHeight = - maxHeight || `calc(100% - ${element.style.top} - 10px)` - }, - }, - } as Required< - Pick - > -} - -export default hot(module)(useMenuState) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.tsx deleted file mode 100644 index e4a940d6fcc..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/metacard-overwrite/metacard-overwrite.view.tsx +++ /dev/null @@ -1,317 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'drop... Remove this comment to see the full error message -import Dropzone from 'dropzone' -import OverwritesInstance from '../singletons/overwrites-instance' -import React from 'react' -import styled from 'styled-components' -import { readableColor } from 'polished' -import Button from '@mui/material/Button' -import DialogActions from '@mui/material/DialogActions' -import DialogTitle from '@mui/material/DialogTitle' -import DialogContent from '@mui/material/DialogContent' - -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import { useDialog } from '../dialog' - -const Root = styled.div` - overflow: auto; - white-space: nowrap; - height: 100%; -` - -const OverwriteStatus = styled.div` - display: inline-block; - white-space: normal; - vertical-align: top !important; - width: 100%; - transform: translateX(0%); - transition: transform ${(props) => props.theme.coreTransitionTime} linear; - text-align: center; - position: relative; - padding: 10px; -` - -const OverwriteProgress = styled(OverwriteStatus)` - line-height: ${(props) => props.theme.minimumButtonSize}; -` - -const ProgressText = styled.div` - padding: 10px; - top: 0px; - left: 0px; - position: absolute; - width: 100%; - height: 100%; - z-index: 1; - font-size: ${(props) => props.theme.largeFontSize}; - color: ${(props) => readableColor(props.theme.backgroundContent)}; -` - -const ProgressTextUnder = styled.div` - font-size: ${(props) => props.theme.largeFontSize}; - visibility: hidden; -` - -const ProgressInfo = styled.div` - font-size: ${(props) => props.theme.mediumFontSize}; - color: ${(props) => readableColor(props.theme.backgroundContent)}; -` - -const ProgressBar = styled.div` - z-index: 0; - top: 0px; - left: 0px; - position: absolute; - width: 0%; - height: 100%; - background: ${(props) => props.theme.positiveColor}; - transition: width ${(props) => props.theme.coreTransitionTime} linear; -` - -const OverwriteSuccess = styled(OverwriteStatus)` - color: ${(props) => readableColor(props.theme.positiveColor)}; - background: ${(props) => props.theme.positiveColor}; - font-size: ${(props) => props.theme.mediumFontSize}; - overflow-wrap: break-word; - width: 50em; -` - -const OverwriteError = styled(OverwriteStatus)` - color: ${(props) => readableColor(props.theme.negativeColor)}; - background: ${(props) => props.theme.negativeColor}; - font-size: ${(props) => props.theme.mediumFontSize}; - overflow-wrap: break-word; - width: 50em; -` - -const ResultMessage = styled.div` - font-size: ${(props) => props.theme.largeFontSize}; - margin-left: ${(props) => props.theme.minimumButtonSize}; -` - -const Sending = (props: any) => ( - - - Uploading File -
    {props.percentage}%
    - - If you leave this view, the overwrite will still continue. - -
    - - Uploading File -
    {Math.floor(props.percentage)}%
    - - If you leave this view, the overwrite will still continue. - -
    - -
    -) - -const Success = (props: any) => ( - - {props.message} - -) - -const Error = (props: any) => ( - - {props.message} - -) - -const Stages = { - Sending, - Success, - Error, -} as { - [key: string]: any -} - -const defaultState = { - stage: '', - percentage: 0, - message: '', -} - -const mapOverwriteModelToState = (overwriteModel: any) => { - const currentState = {} as any - if (overwriteModel.get('success')) { - currentState.stage = 'Success' - } else if (overwriteModel.get('error')) { - currentState.stage = 'Error' - } else if (overwriteModel.get('sending')) { - currentState.stage = 'Sending' - } else { - currentState.stage = '' - } - currentState.percentage = overwriteModel.get('percentage') - currentState.message = overwriteModel.escape('message') - - return currentState -} - -const getOverwriteModel = ({ lazyResult }: { lazyResult: LazyQueryResult }) => { - if (!lazyResult) { - return - } - return OverwritesInstance.get(lazyResult.plain.id) -} - -export const MetacardOverwrite = ({ - title, - lazyResult, - overwriteUrl, -}: { - title: string - lazyResult: LazyQueryResult - overwriteUrl?: string -}) => { - const dialogContext = useDialog() - const [overwriteModel, setOverwriteModel] = React.useState(null) - const [dropzone, setDropzone] = React.useState(null) - const [dropzoneElement, setDropdownElement] = - React.useState(null) - const { listenTo, stopListening } = useBackbone() - const [state, setState] = React.useState(defaultState) - - React.useEffect(() => { - return () => { - OverwritesInstance.removeIfUnused(lazyResult?.plain.id) - } - }, []) - - React.useEffect(() => { - if (lazyResult && dropzoneElement) { - const overrides = { - 'security.access-administrators': - lazyResult.plain.metacard.properties[ - 'security.access-administrators' - ] || [], - 'security.access-groups': - lazyResult.plain.metacard.properties['security.access-groups'] || [], - 'security.access-groups-read': - lazyResult.plain.metacard.properties['security.access-groups-read'] || - [], - 'security.access-individuals': - lazyResult.plain.metacard.properties['security.access-individuals'] || - [], - 'security.access-individuals-read': - lazyResult.plain.metacard.properties[ - 'security.access-individuals-read' - ] || [], - } as { - [key: string]: any - } - setDropzone( - new Dropzone(dropzoneElement, { - paramName: 'parse.resource', //required to parse multipart body - url: - (overwriteUrl ? overwriteUrl : './internal/catalog/') + - lazyResult.plain.id, - maxFilesize: 5000000, //MB - method: 'put', - sending(_file: any, _xhr: any, formData: any) { - Object.keys(overrides).forEach((attribute) => { - overrides[attribute].forEach((value: any) => { - formData.append('parse.' + attribute, value) - }) - }) - }, - }) - ) - } - }, [dropzoneElement, lazyResult]) - - React.useEffect(() => { - if (dropzone && lazyResult) { - if (!getOverwriteModel({ lazyResult })) { - OverwritesInstance.add({ - id: lazyResult?.plain.id, - dropzone: dropzone, - result: lazyResult, - }) - } - setOverwriteModel(getOverwriteModel({ lazyResult })) - } - }, [dropzone, lazyResult]) - - React.useEffect(() => { - if (overwriteModel) { - setState(mapOverwriteModelToState(overwriteModel)) - const callback = () => { - setState(mapOverwriteModelToState(overwriteModel)) - } - const eventString = - 'change:percentage change:sending change:error change:success' - listenTo(overwriteModel, eventString, callback) - return () => { - if (overwriteModel) { - stopListening(overwriteModel, eventString, callback) - } - } - } - return () => {} - }, [overwriteModel]) - - const startOver = () => { - OverwritesInstance.remove(lazyResult?.plain.id) - OverwritesInstance.add({ - id: lazyResult?.plain.id, - dropzone: dropzone, - result: lazyResult, - }) - setOverwriteModel(getOverwriteModel({ lazyResult })) - setState(defaultState) - } - const Component = Stages[state.stage] - return ( - -
    - {title} - - Are you sure you want to overwrite the content? -
    - WARNING: This will completely overwrite the current content and - metadata. -
    - - {Component && } - - - - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/metacard-preview/metacard-preview.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/metacard-preview/metacard-preview.view.tsx deleted file mode 100644 index 3bc8385a923..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/metacard-preview/metacard-preview.view.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import Paper from '@mui/material/Paper' -import React from 'react' -import Common from '../../js/Common' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' - -export const MetacardPreviewReact = ({ - result, -}: { - result: LazyQueryResult -}) => { - return ( - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/notification-group/notification-group.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/notification-group/notification-group.view.tsx deleted file mode 100644 index 4081a6fbcca..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/notification-group/notification-group.view.tsx +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { UploadBatchItemViewReact } from '../upload-batch-item/upload-batch-item.view' -import userNotifications from '../singletons/user-notifications' -import user from '../singletons/user-instance' -import Button from '@mui/material/Button' -import CloseIcon from '@mui/icons-material/Close' -import { useDialogState } from '../hooks/useDialogState' - -type NotificationGroupViewReactType = { - date: any - filter: any -} - -export const NotificationGroupViewReact = ({ - date, - filter, -}: NotificationGroupViewReactType) => { - const dialog = useDialogState() - const relevantNotifications = userNotifications.filter(filter) - - if (relevantNotifications.length === 0) { - return null - } - return ( - - - - Remove all notifications for {date}? - - - - - - -
    -
    {date}
    - -
    -
    - {userNotifications.filter(filter).map((notification: any) => { - return ( - - ) - })} -
    -
    - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/overflow-tooltip/overflow-tooltip.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/overflow-tooltip/overflow-tooltip.tsx deleted file mode 100644 index ba31cf6d0c1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/overflow-tooltip/overflow-tooltip.tsx +++ /dev/null @@ -1,124 +0,0 @@ -import React, { useRef, useEffect } from 'react' -import Tooltip, { TooltipProps } from '@mui/material/Tooltip' -import Paper from '@mui/material/Paper' -import { hot } from 'react-hot-loader' -import { Elevations } from '../theme/theme' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import wreqr from '../../js/wreqr' -type OverflowTipType = { - children: React.ReactNode - tooltipProps?: Partial - refOfThingToMeasure?: HTMLDivElement | null - className?: string -} -export type OverflowTooltipHTMLElement = HTMLDivElement & { - overflowTooltip: { - setOpen: (open: boolean) => void - } -} -function areDescendentsTruncated(element?: Element): boolean { - if (!element) { - return false - } - /** - * Why 1 and not 0? Well, in writing mode vertical, there is a discrepancy of 1. - */ - if (Math.abs(element.scrollWidth - element.clientWidth) > 1) { - return true - } - if (element.children) { - for (let i = 0; i < element.children.length; i++) { - let hasTruncatedDescendent = areDescendentsTruncated(element.children[i]) - if (hasTruncatedDescendent) { - return hasTruncatedDescendent - } - } - } - return false -} -export function useIsTruncated( - passedInRef: T | null = null -) { - const [isTruncated, setIsTruncated] = React.useState(false) - const ref = useRef(passedInRef) - const compareSizeRef = useRef<() => void>(() => {}) - const { listenTo, stopListening } = useBackbone() - useEffect(() => { - const compareSize = () => { - if (ref.current) { - setIsTruncated(areDescendentsTruncated(ref.current)) - } - } - compareSizeRef.current = compareSize - if (ref.current) { - compareSize() - listenTo((wreqr as any).vent, 'resize', compareSize) - window.addEventListener('resize', compareSize) - ref.current.addEventListener('mouseenter', compareSize) - } else { - console.warn( - 'WARNING: No element found to compare. You must take in and set a ref (refOfThingToMeasure) on one of your elements so this knows when to display a tooltip.' - ) - } - return () => { - stopListening((wreqr as any).vent, 'resize', compareSize) - window.removeEventListener('resize', compareSize) - ref.current?.removeEventListener('mouseenter', compareSize) - } - }) - return { - isTruncated, - ref, - compareSize: compareSizeRef, - } -} -const OverflowTip = ({ - children, - tooltipProps = {}, - refOfThingToMeasure: refOfThingToMeasurePassedIn, - className, -}: OverflowTipType) => { - const { title, ...otherTooltipProps } = tooltipProps - const [open, setOpen] = React.useState(false) - const isTruncatedState = useIsTruncated(refOfThingToMeasurePassedIn) - React.useEffect(() => { - // expose this ugly thing when no other way will work (autocompletes unfortunately) - ;( - isTruncatedState.ref.current as OverflowTooltipHTMLElement - ).overflowTooltip = { - setOpen: (open: boolean) => { - if (isTruncatedState.isTruncated) setOpen(open) - }, - } - }, [isTruncatedState.ref.current]) - return ( - - {title ? title : children} - - } - open={open} - onOpen={() => { - if (isTruncatedState.isTruncated) { - setOpen(true) - } - }} - onClose={() => { - setOpen(false) - }} - PopperProps={{ - className: '', - }} - {...otherTooltipProps} - > -
    - {children} -
    -
    - ) -} -export default hot(module)(OverflowTip) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/browse.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/browse.tsx deleted file mode 100644 index 19d1b31c579..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/browse.tsx +++ /dev/null @@ -1,284 +0,0 @@ -import TextField from '@mui/material/TextField' -import Paper from '@mui/material/Paper' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { DarkDivider } from '../dark-divider/dark-divider' -import { - FilterBuilderClass, - FilterClass, -} from '../filter-builder/filter.structure' -import { useQuery, useUserQuery } from '../../js/model/TypedQuery' -import { useLazyResultsSelectedResultsFromSelectionInterface } from '../selection-interface/hooks' -import { Elevations } from '../theme/theme' -import SelectionInterface from '../selection-interface/selection-interface.model' -import _debounce from 'lodash.debounce' -import LinearProgress from '@mui/material/LinearProgress' -import Autocomplete from '@mui/material/Autocomplete' -import Button from '@mui/material/Button' -import QueryFeed from '../result-selector/query-feed' -import Paging from '../result-selector/paging' -import { getSortDirectionOptions } from '../../react-component/query-sort-selection/sort-selection-helpers' -import ResultsVisual from '../visualization/results-visual/results-visual' -import { SplitPane } from '../resizable-grid/resizable-grid' -import { GoldenLayout } from '../golden-layout/golden-layout' -import { LazyQueryResults } from '../../js/model/LazyQueryResult/LazyQueryResults' -import { Memo } from '../memo/memo' -import { useUpdateEffect } from 'react-use' -import { getDefaultComponentState } from '../visualization/settings-helpers' - -type ModifySearchParams = { - search: any - filter: string - sortAttribute: SortAttributeType - sortDirection: SortDirectionType -} - -const modifySearch = ({ - search, - filter, - sortAttribute, - sortDirection, -}: ModifySearchParams) => { - const filterBuilder = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: '=', // = - property: 'metacard-tags', - value: 'query', // query - }), - ], - }) - if (filter.length > 0) { - filterBuilder.filters.push( - new FilterClass({ - type: 'ILIKE', - property: 'title', - value: `*${filter}*`, - }) - ) - } - const sorts = [ - { - attribute: sortAttribute === 'title' ? 'title' : 'metacard.modified', - direction: sortDirection.toLowerCase(), - }, - ] - search.set('filterTree', filterBuilder) - search.set('sorts', sorts) - return search -} - -type SortAttributeType = 'title' | 'last modified' -type SortDirectionType = 'ascending' | 'descending' - -const buildSearchFromSelection = ({ - search, - lazyResults, -}: { - search: any - lazyResults: LazyQueryResults['results'] -}) => { - const totalFilterTree = Object.values(lazyResults).reduce( - (filterTree, lazyResult) => { - filterTree.filters.push( - new FilterBuilderClass( - JSON.parse(lazyResult.plain.metacard.properties.filterTree) - ) - ) - return filterTree - }, - new FilterBuilderClass({ type: 'OR', filters: [] }) - ) - search.set('filterTree', totalFilterTree) - return search -} - -const SelectionInfoPane = ({ - searchSelectionInterface, -}: { - searchSelectionInterface: any -}) => { - const [search] = useUserQuery() - const lazyResults = useLazyResultsSelectedResultsFromSelectionInterface({ - selectionInterface: searchSelectionInterface, - }) - const [selectionInterface] = React.useState( - new SelectionInterface({ - currentQuery: buildSearchFromSelection({ lazyResults, search }), - }) - ) - React.useEffect(() => { - if (Object.keys(lazyResults).length > 0) { - buildSearchFromSelection({ - search, - lazyResults, - }) - selectionInterface.getCurrentQuery().startSearchFromFirstPage() - } else { - selectionInterface.getCurrentQuery().cancelCurrentSearches() - } - }, [lazyResults]) - return ( - <> -
    -
    0 - ? 'hidden' - : 'block py-2 pr-2 w-full h-full left-0 top-0 absolute z-10' - } - > -
    -
    -
    - - Select a search(s) from the left to preview. - -
    -
    -
    - -
    - - ) -} - -const SavedSearches = () => { - const [filter, setFilter] = React.useState('') - const [sortAttribute, setSortAttribute] = React.useState( - 'last modified' as SortAttributeType - ) - const [sortDirection, setSortDirection] = React.useState( - 'descending' as SortDirectionType - ) - const [search] = useQuery() - const selectionInterface = React.useMemo(() => { - return new SelectionInterface({ - currentQuery: search, - }) - }, []) - const debouncedUpdate = React.useRef( - _debounce( - ({ - filter, - sortAttribute, - sortDirection, - search, - }: ModifySearchParams) => { - modifySearch({ filter, sortAttribute, sortDirection, search }) - selectionInterface.getCurrentQuery().startSearchFromFirstPage() - setIsUpdating(false) - }, - 500 - ) - ) - const [isUpdating, setIsUpdating] = React.useState(false) - React.useEffect(() => { - setIsUpdating(true) - debouncedUpdate.current({ - filter, - sortAttribute, - sortDirection, - search: selectionInterface.getCurrentQuery(), - }) - }, [filter, sortAttribute, sortDirection]) - useUpdateEffect(() => { - /** - * This makes sense, because we only have title and last modified. - * - * The natural inclination is inverted for sort direction for alphabetical vs time. - */ - setSortDirection(sortAttribute === 'title' ? 'ascending' : 'descending') - }, [sortAttribute]) - return ( -
    -
    - - { - setFilter(e.target.value) - }} - /> - {/*
    Sort by
    */} - { - return <>{option} - }} - value={sortAttribute} - onChange={(_e, newValue) => { - setSortAttribute(newValue || 'title') - }} - renderInput={(params) => { - return ( - - ) - }} - /> - -
    - -
    -
    - -
    -
    -
    - -
    - {isUpdating ? ( - - ) : null} - - -
    - - - -
    - -
    -
    -
    -
    - ) -} - -export default hot(module)(SavedSearches) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/create.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/create.tsx deleted file mode 100644 index 1cd7e6c1934..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/create.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import Button from '@mui/material/Button' -import MenuItem from '@mui/material/MenuItem' -import Paper from '@mui/material/Paper' -import Popover from '@mui/material/Popover' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useHistory } from 'react-router-dom' -import { AsyncTasks } from '../../js/model/AsyncTask/async-task' -import { useQuery, UserQuery } from '../../js/model/TypedQuery' -import { useMenuState } from '../menu-state/menu-state' -import { Elevations } from '../theme/theme' -import { OpenSearch, SaveForm } from './search' - -import SelectionInterfaceModel from '../selection-interface/selection-interface.model' - -const selectionInterface = new SelectionInterfaceModel() - -const Open = () => { - const history = useHistory() - const openMenuState = useMenuState() - const titleMenuState = useMenuState() - const fromExistingMenuState = useMenuState() - const [search] = useQuery() - React.useEffect(() => { - openMenuState.handleClick() - }, []) - React.useEffect(() => { - selectionInterface.setCurrentQuery(search) - }, []) - return ( -
    - - - - { - titleMenuState.handleClose() - }} - onSave={(title) => { - const searchData = UserQuery().toJSON() - searchData.title = title - const task = AsyncTasks.createSearch({ data: searchData }) - history.push({ - pathname: `/search/${task.data.id}`, - search: '', - }) - }} - /> - - - - - { - return `/search/${result.plain.id}` - }} - onFinish={(value) => { - const copy = JSON.parse( - JSON.stringify(value.plain.metacard.properties) - ) - delete copy.id - copy.title = `New from '${copy.title}'` - const task = AsyncTasks.createSearch({ data: copy }) - // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally - history.replace({ - pathname: `/search/${task.data.id}`, - search: '', - }) - }} - autocompleteProps={{ - fullWidth: true, - className: 'w-full', - }} - /> - - - - { - titleMenuState.handleClick() - }} - > - Search - - { - fromExistingMenuState.handleClick() - }} - > - Search from existing - - -
    - ) -} - -export default hot(module)(Open) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/metacard-nav.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/metacard-nav.tsx deleted file mode 100644 index aef1f8b4a08..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/metacard-nav.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useParams } from 'react-router-dom' -import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks' -import { useStatusOfLazyResults } from '../../js/model/LazyQueryResult/hooks' -import CircularProgress from '@mui/material/CircularProgress' -import SelectionInterfaceModel from '../selection-interface/selection-interface.model' -import Grid from '@mui/material/Grid' -import { DEFAULT_QUERY_OPTIONS, useUserQuery } from '../../js/model/TypedQuery' -import { - FilterBuilderClass, - FilterClass, -} from '../filter-builder/filter.structure' -import { TypedUserInstance, useEphemeralFilter } from '../singletons/TypedUser' -import Button from '@mui/material/Button' -import { TitleView } from '../visualization/inspector/inspector' - -export const getFilterTreeForId = ({ id }: { id: string }) => { - return new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: '=', - value: id, - property: '"id"', - }), - new FilterClass({ - type: 'ILIKE', - value: '*', - property: '"metacard-tags"', - }), - ], - }) -} - -const MetacardNavRoute = () => { - const params = useParams<{ id: string; metacardId: string }>() - const [id, setId] = React.useState(params.metacardId || params.id) - React.useEffect(() => { - setId(params.metacardId || params.id) - }, [params.metacardId]) - const [query] = useUserQuery({ - attributes: { - filterTree: getFilterTreeForId({ id }), - }, - options: { - transformDefaults: DEFAULT_QUERY_OPTIONS.transformDefaults, - }, - }) - const ephemeralFilter = useEphemeralFilter() - const [selectionInterface] = React.useState( - new SelectionInterfaceModel({ - currentQuery: query, - }) - ) - - React.useEffect(() => { - query.set('filterTree', getFilterTreeForId({ id })) - query.cancelCurrentSearches() - query.startSearchFromFirstPage() - return () => { - query.cancelCurrentSearches() - } - }, [id]) - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const { isSearching } = useStatusOfLazyResults({ lazyResults }) - - const filteredResults = Object.values(lazyResults.results) - - const notFoundYet = isSearching && filteredResults.length === 0 - if (notFoundYet) { - return ( - <> -
    - -
    - - ) - } else if (filteredResults.length === 0) { - return ( -
    -
    No result could be found.
    - {ephemeralFilter ? ( - - ) : null} -
    - ) - } else { - return ( - - - - - - ) - } -} - -export default hot(module)(MetacardNavRoute) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/metacard.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/metacard.tsx deleted file mode 100644 index 94a72b31c1b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/metacard.tsx +++ /dev/null @@ -1,124 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useParams } from 'react-router-dom' -import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks' -import { GoldenLayout } from '../golden-layout/golden-layout' -import { DEFAULT_QUERY_OPTIONS, useUserQuery } from '../../js/model/TypedQuery' -import { - FilterBuilderClass, - FilterClass, -} from '../filter-builder/filter.structure' -import { getFilterTreeForId } from './metacard-nav' -import SelectionInterfaceModel from '../selection-interface/selection-interface.model' -import user from '../singletons/user-instance' -import _ from 'underscore' - -type UploadType = Backbone.Model<{ - uploads: Backbone.Model<{ id: string; children: string[] }>[] -}> - -export const getFilterTreeForUpload = ({ - upload, -}: { - upload: UploadType -}): FilterBuilderClass => { - return new FilterBuilderClass({ - type: 'OR', - filters: _.flatten( - upload - .get('uploads') - .filter((file) => file.id || file.get('children') !== undefined) - .map((file) => { - if (file.get('children') !== undefined) { - return file.get('children').map( - (child) => - new FilterClass({ - type: '=', - value: child, - property: 'id', - }) - ) - } else { - return new FilterClass({ - type: '=', - value: file.id, - property: 'id', - }) - } - }) - .concat( - new FilterClass({ - type: '=', - value: '-1', - property: 'id', - }) - ) - ), - }) -} - -const MetacardRoute = () => { - const params = useParams<{ - id: string - metacardId: string - uploadId: string - }>() - - const [id, setId] = React.useState(params.metacardId || params.id) - React.useEffect(() => { - setId(params.metacardId || params.id) - }, [params.metacardId]) - const [query] = useUserQuery({ - attributes: getFilterTreeForId({ id }), - options: { - transformDefaults: DEFAULT_QUERY_OPTIONS.transformDefaults, - }, - }) - const [selectionInterface] = React.useState( - new SelectionInterfaceModel({ - currentQuery: query, - }) - ) - - React.useEffect(() => { - if (id === undefined && params.uploadId) { - const upload = user - .get('user') - .get('preferences') - .get('uploads') - .get(params.uploadId) - if (upload) { - query.set('filterTree', getFilterTreeForUpload({ upload })) - query.cancelCurrentSearches() - query.startSearchFromFirstPage() - } - } - }, [id, params.uploadId]) - - React.useEffect( - // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. - () => { - if (id) { - query.set('filterTree', getFilterTreeForId({ id })) - query.cancelCurrentSearches() - query.startSearchFromFirstPage() - return () => { - query.cancelCurrentSearches() - } - } - }, - [id] - ) - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const filteredResults = Object.values(lazyResults.results) - - filteredResults.forEach((result) => { - result.setSelected(true) - }) - - return -} - -export default hot(module)(MetacardRoute) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/open.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/open.tsx deleted file mode 100644 index ccafaf71304..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/open.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useHistory } from 'react-router-dom' -import useSnack from '../hooks/useSnack' -import { OpenSearch } from './search' - -const Open = () => { - const history = useHistory() - const addSnack = useSnack() - return ( -
    -
    Open a search
    - { - return `/search/${result.plain.id}` - }} - onFinish={(value) => { - // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally - history.replace({ - pathname: `/search/${value.plain.id}`, - search: '', - }) - addSnack(`Search '${value.plain.metacard.properties.title}' opened`, { - alertProps: { severity: 'info' }, - }) - }} - autocompleteProps={{ - fullWidth: true, - className: 'w-full', - }} - /> -
    - ) -} - -export default hot(module)(Open) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/restore.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/restore.tsx deleted file mode 100644 index ae63c41f720..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/restore.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useHistory } from 'react-router-dom' -import { AsyncTasks } from '../../js/model/AsyncTask/async-task' -import { OpenSearch } from './search' - -const Open = () => { - const history = useHistory() - return ( -
    -
    Restore a search
    - { - const copy = JSON.parse( - JSON.stringify(result.plain.metacard.properties) - ) - delete copy.id - delete copy.title - delete copy['metacard.deleted.date'] - delete copy['metacard.deleted.id'] - delete copy['metacard.deleted.tags'] - delete copy['metacard.deleted.version'] - delete copy['metacard-tags'] - delete copy['metacard-type'] - - const encodedQueryModel = encodeURIComponent(JSON.stringify(copy)) - return { - pathname: '/search', - search: `?defaultQuery=${encodedQueryModel}`, - } - }} - onFinish={(result) => { - AsyncTasks.restore({ lazyResult: result }) - // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally - history.replace({ - pathname: `/search/${result.plain.metacard.properties['metacard.deleted.id']}`, - search: '', - }) - }} - autocompleteProps={{ - fullWidth: true, - className: 'w-full', - }} - /> -
    - ) -} - -export default hot(module)(Open) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/search.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/search.tsx deleted file mode 100644 index 7d795755207..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/pages/search.tsx +++ /dev/null @@ -1,1491 +0,0 @@ -import * as React from 'react' -import { GoldenLayout } from '../golden-layout/golden-layout' -import { - SplitPane, - useResizableGridContext, -} from '../resizable-grid/resizable-grid' -import SelectionInterfaceModel from '../selection-interface/selection-interface.model' -import { useQuery, useUserQuery } from '../../js/model/TypedQuery' -import Paper from '@mui/material/Paper' -import { QueryAddReact } from '../query-add/query-add' -import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft' -import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight' -import queryString from 'query-string' - -import Button, { ButtonProps } from '@mui/material/Button' -import MoreVert from '@mui/icons-material/MoreVert' -import { Elevations } from '../theme/theme' -import SearchIcon from '@mui/icons-material/SearchTwoTone' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import { - Link, - LinkProps, - useHistory, - useLocation, - useParams, -} from 'react-router-dom' -import _ from 'lodash' -import TextField from '@mui/material/TextField' -import { DarkDivider } from '../dark-divider/dark-divider' -import LinearProgress from '@mui/material/LinearProgress' -import { useUpdateEffect } from 'react-use' -import { - FilterBuilderClass, - FilterClass, -} from '../filter-builder/filter.structure' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import Skeleton from '@mui/material/Skeleton' -import CircularProgress from '@mui/material/CircularProgress' -import { - useRerenderOnBackboneSync, - useStatusOfLazyResults, -} from '../../js/model/LazyQueryResult/hooks' -import CloudDoneIcon from '@mui/icons-material/CloudDone' -import SaveIcon from '@mui/icons-material/Save' -import { useMenuState } from '../menu-state/menu-state' -import MenuItem from '@mui/material/MenuItem' -import Menu from '@mui/material/Menu' -import { TypedUserInstance } from '../singletons/TypedUser' -import useSnack from '../hooks/useSnack' -import Popover from '@mui/material/Popover' -import Autocomplete, { AutocompleteProps } from '@mui/material/Autocomplete' -import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks' -import OverflowTooltip, { - OverflowTooltipHTMLElement, -} from '../overflow-tooltip/overflow-tooltip' -import { - AsyncTasks, - useCreateSearchTask, - useRestoreSearchTask, - useSaveSearchTaskBasedOnParams, -} from '../../js/model/AsyncTask/async-task' -import { Memo } from '../memo/memo' -import { useListenToEnterKeySubmitEvent } from '../custom-events/enter-key-submit' - -type SaveFormType = { - selectionInterface: any - onSave: (title: string) => void - onClose: () => void -} - -export const SaveForm = ({ - onClose, - selectionInterface, - onSave, -}: SaveFormType) => { - const currentQuery = selectionInterface.getCurrentQuery() - - const [title, setTitle] = React.useState(currentQuery.get('title') || '') - const [validation, setValidation] = React.useState( - {} as { [key: string]: string } - ) - useUpdateEffect(() => { - if (!title) { - setValidation({ - title: 'Cannot be blank', - }) - } else { - setValidation({}) - } - }, [title]) - - return ( - <> -
    { - if (!title) { - setValidation({ - title: 'Cannot be blank', - }) - e.preventDefault() - return false - } else { - currentQuery.set('title', title) - onSave(title) - e.preventDefault() - onClose() - return false - } - }} - className="w-full h-full" - > -
    - { - setTitle(e.target.value) - }} - error={Boolean(validation.title)} - autoFocus - onFocus={(e) => { - e.target.select() - }} - helperText={validation.title} - /> -
    - - -
    - - -
    - - - ) -} - -type ButtonWithMultipleStatesType = { - states: { state: string; loading: boolean }[] - state: string - labelClassName?: string -} & Omit -const ButtonWithTwoStates = (props: ButtonWithMultipleStatesType) => { - const { states, state, ...buttonProps } = props - if (states.length === 0) { - return
    You must specify at least one state
    - } - const longestState = states.reduce((longest, current) => { - if (current.state.length > longest.length) { - return current.state - } - return longest - }, states[0].state) - const currentState = states.find((stateInfo) => stateInfo.state === state) - if (currentState === undefined) { - return
    You must specify a valid state
    - } - const isLoading = currentState?.loading - return ( - - ) -} - -const useSearchResults = ({ - searchText, - archived = false, -}: { - searchText: string - archived?: boolean -}) => { - const [state, setState] = React.useState({ - lazyResults: [], - loading: true, - } as { lazyResults: LazyQueryResult[]; loading: boolean }) - const [hasSearched, setHasSearched] = React.useState(false) - const [queryModel] = useQuery({ - attributes: { - sorts: [{ attribute: 'metacard.modified', direction: 'descending' }], - filterTree: new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'title', - value: `*${searchText}*`, - type: 'ILIKE', - }), - new FilterClass({ - property: archived ? 'metacard.deleted.tags' : 'metacard-tags', - value: 'query', - type: 'ILIKE', - }), - ...(archived - ? [ - new FilterClass({ - property: 'metacard-tags', - value: '*', - type: 'ILIKE', - }), - ] - : []), - ], - }), - }, - }) - - const [selectionInterface] = React.useState( - new SelectionInterfaceModel({ - currentQuery: queryModel, - }) - ) - React.useEffect(() => { - selectionInterface.getCurrentQuery().set( - 'filterTree', - new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'title', - value: `*${searchText}*`, - type: 'ILIKE', - }), - new FilterClass({ - property: archived ? 'metacard.deleted.tags' : 'metacard-tags', - value: 'query', - type: 'ILIKE', - }), - ...(archived - ? [ - new FilterClass({ - property: 'metacard-tags', - value: '*', - type: 'ILIKE', - }), - ] - : []), - ], - }) - ) - selectionInterface.getCurrentQuery().cancelCurrentSearches() - setState({ - lazyResults: [], - loading: true, - }) - const timeoutId = window.setTimeout(() => { - if (searchText.length >= 0) { - selectionInterface.getCurrentQuery().startSearchFromFirstPage() - setHasSearched(true) - } - }, 500) - - return () => { - window.clearTimeout(timeoutId) - } - }, [searchText]) - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const { isSearching } = useStatusOfLazyResults({ lazyResults }) - React.useEffect(() => { - setState({ - lazyResults: Object.values(lazyResults.results), - loading: hasSearched ? isSearching : true, - }) - }, [lazyResults, isSearching]) - return state -} - -export const OpenSearch = ({ - onFinish, - constructLink, - label, - archived = false, - autocompleteProps, -}: { - onFinish: (selection: LazyQueryResult) => void - constructLink: (result: LazyQueryResult) => LinkProps['to'] - label: string - archived?: boolean - autocompleteProps?: Partial< - AutocompleteProps - > -}) => { - const [positioningDone, setPositioningDone] = React.useState(false) - const [value, setValue] = React.useState('') - const [open, setOpen] = React.useState(true) - const inputRef = React.useRef(null) - const [currentHighlight, setCurrentHighlight] = - React.useState(null) - const [options, setOptions] = React.useState([]) - const { lazyResults, loading } = useSearchResults({ - searchText: value, - archived, - }) - React.useEffect(() => { - setOptions(lazyResults) - }, [lazyResults]) - - React.useEffect(() => { - if (currentHighlight && currentHighlight.overflowTooltip) { - currentHighlight.overflowTooltip.setOpen(true) - } - return () => { - if (currentHighlight && currentHighlight.overflowTooltip) - currentHighlight.overflowTooltip.setOpen(false) - } - }, [currentHighlight]) - React.useEffect(() => { - const timeoutid = window.setTimeout(() => { - setPositioningDone(true) - }, 500) - return () => { - window.clearTimeout(timeoutid) - } - }, []) - return ( - option.plain.id === option.plain.id} - getOptionLabel={(option) => option.plain.metacard.properties.title} - options={options} - ref={inputRef} - open={open && positioningDone} - onOpen={() => { - setOpen(true) - }} - onClose={() => { - setOpen(false) - }} - loading={loading} - autoHighlight - onHighlightChange={() => { - if (inputRef.current) { - const highlightedElementString = ( - inputRef.current.querySelector('input') as HTMLInputElement - ).getAttribute('aria-activedescendant') - if (highlightedElementString) { - setCurrentHighlight( - ( - document.getElementById( - highlightedElementString - ) as HTMLLIElement - ).querySelector('div') as OverflowTooltipHTMLElement - ) - } else { - setCurrentHighlight(null) - } - } else { - setCurrentHighlight(null) - } - }} - noOptionsText="Nothing found." - renderOption={(props, option) => { - return ( -
  • - - - {option.plain.metacard.properties.title} -
  • - ), - }} - > -
    - {option.plain.metacard.properties.title} -
    - - - - ) - }} - ListboxProps={{ - className: 'children-p-0 MuiAutocomplete-listbox', // we have to add the original class (MuiAutocomplete-listbox) back on unfortunately - }} - onChange={(_e, value) => { - if (value) { - onFinish(value) - } - }} - renderInput={(params) => { - return ( - { - setValue(e.target.value) - }} - label={label} - variant="outlined" - autoFocus - InputProps={{ - ...params.InputProps, - endAdornment: ( - - {loading ? ( - - ) : null} - {params.InputProps.endAdornment} - - ), - }} - /> - ) - }} - {...autocompleteProps} - /> - ) -} - -const OptionsButton = () => { - const { searchPageMode, data, selectionInterface } = React.useContext( - SavedSearchModeContext - ) - const { closed } = useResizableGridContext() - const menuState = useMenuState() - const menuStateOpenSearch = useMenuState() - const menuStateNewFromExisting = useMenuState() - const menuStateCopy = useMenuState() - const menuStateRename = useMenuState() - const menuStateRestore = useMenuState() - const addSnack = useSnack() - const history = useHistory() - const [encodedQueryModelJSON, setEncodedQueryModelJSON] = React.useState('') - - React.useEffect(() => { - setEncodedQueryModelJSON( - encodeURIComponent( - JSON.stringify(selectionInterface.getCurrentQuery().toJSON()) - ) - ) - }, [menuState.open]) - return ( - <> - - - - { - const copy = JSON.parse( - JSON.stringify(result.plain.metacard.properties) - ) - delete copy.id - delete copy.title - delete copy['metacard.deleted.date'] - delete copy['metacard.deleted.id'] - delete copy['metacard.deleted.tags'] - delete copy['metacard.deleted.version'] - delete copy['metacard-tags'] - delete copy['metacard-type'] - - const encodedQueryModel = encodeURIComponent(JSON.stringify(copy)) - return { - pathname: '/search', - search: `?defaultQuery=${encodedQueryModel}`, - } - }} - onFinish={(result) => { - AsyncTasks.restore({ lazyResult: result }) - // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally - history.replace({ - pathname: `/search/${result.plain.metacard.properties['metacard.deleted.id']}`, - search: '', - }) - menuStateRestore.handleClose() - }} - /> - - - - - { - menuStateCopy.handleClose() - }} - onSave={(title) => { - const currentQueryJSON = selectionInterface - .getCurrentQuery() - .toJSON() - currentQueryJSON.title = title - const task = AsyncTasks.createSearch({ data: currentQueryJSON }) - history.push({ - pathname: `/search/${task.data.id}`, - search: '', - }) - - addSnack(`Making a copy of ${title}`, { - alertProps: { severity: 'info' }, - }) - }} - selectionInterface={selectionInterface} - /> - - - - - { - menuStateRename.handleClose() - }} - onSave={(title) => { - if (typeof data !== 'boolean') { - const currentQueryJSON = selectionInterface - .getCurrentQuery() - .toJSON() - currentQueryJSON.title = title - AsyncTasks.saveSearch({ - data: currentQueryJSON, - lazyResult: data, - }) - } - }} - selectionInterface={selectionInterface} - /> - - - - - { - const copy = JSON.parse( - JSON.stringify(result.plain.metacard.properties) - ) - delete copy.id - delete copy.title - const encodedQueryModel = encodeURIComponent(JSON.stringify(copy)) - return { - pathname: '/search', - search: `?defaultQuery=${encodedQueryModel}`, - } - }} - onFinish={(result) => { - const copy = JSON.parse( - JSON.stringify(result.plain.metacard.properties) - ) - delete copy.id - delete copy.title - const encodedQueryModel = encodeURIComponent(JSON.stringify(copy)) - // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally - history.replace({ - pathname: '/search', - search: `?defaultQuery=${encodedQueryModel}`, - }) - selectionInterface.getCurrentQuery().set({ - ...copy, - id: null, - title: '', - }) - addSnack( - `New search based on '${result.plain.metacard.properties.title}'`, - { - alertProps: { severity: 'info' }, - } - ) - menuStateNewFromExisting.handleClose() - }} - /> - - - - -
    - { - return `/search/${result.plain.id}` - }} - onFinish={(value) => { - // replace because technically they get the link in constructLink put into history as well unfortunately, will need to fix this more generally - history.replace({ - pathname: `/search/${value.plain.id}`, - search: '', - }) - addSnack( - `Search '${value.plain.metacard.properties.title}' opened`, - { - alertProps: { severity: 'info' }, - } - ) - menuStateOpenSearch.handleClose() - }} - /> - -
    -
    -
    - - { - menuState.handleClose() - selectionInterface - .getCurrentQuery() - .set('id', null) - .resetToDefaults() - addSnack('Starting a new search', { - alertProps: { severity: 'info' }, - }) - }} - > - New - - { - menuState.handleClose() - menuStateNewFromExisting.handleClick() - }} - > - New from existing - - { - menuState.handleClose() - menuStateOpenSearch.handleClick() - }} - > - Open - - {/* { - menuStateRestore.handleClick() - menuState.handleClose() - }} - > - Restore from trash - */} - { - e.stopPropagation() - e.preventDefault() - menuState.handleClose() - menuStateCopy.handleClick() - return - }} - > - Make a copy - - - {/* Save - Save as */} - { - menuStateRename.handleClick() - menuState.handleClose() - }} - > - Rename - - { - if (typeof data !== 'boolean') { - AsyncTasks.delete({ lazyResult: data }) - history.push({ - pathname: `/search`, - search: '', - }) - } - menuState.handleClose() - }} - > - Move to trash - - - { - selectionInterface.getCurrentQuery().set('type', 'advanced') - if (searchPageMode === 'adhoc') { - // set this as their preference - TypedUserInstance.updateQuerySettings({ - type: 'advanced', - }) - } - menuState.handleClose() - }} - > - Advanced View - - { - selectionInterface.getCurrentQuery().set('type', 'basic') - if (searchPageMode === 'adhoc') { - // set this as their preference - TypedUserInstance.updateQuerySettings({ - type: 'basic', - }) - } - menuState.handleClose() - }} - > - Basic View - - - - ) -} - -const SaveButton = () => { - const { closed } = useResizableGridContext() - const { data, searchPageMode, isSaving } = React.useContext( - SavedSearchModeContext - ) - return ( - <> - {closed ? ( - - ) : ( - { - if (isSaving) { - return 'Saving' - } - return searchPageMode === 'adhoc' ? 'Save' : 'Save as' - })()} - /> - )} - - ) -} - -const LeftBottom = () => { - const { closed, setClosed, lastLength, setLength } = useResizableGridContext() - const { data, searchPageMode, selectionInterface } = React.useContext( - SavedSearchModeContext - ) - - if (closed) { - return ( -
    -
    - - - -
    -
    - ) - } - return ( -
    - - -
    - ) -} - -const SaveIndicator = () => { - const { isSaving } = React.useContext(SavedSearchModeContext) - const { closed } = useResizableGridContext() - const [showTempMessage, setShowTempMessage] = React.useState(false) - const popupState = useMenuState() - useUpdateEffect(() => { - let timeoutid = undefined as number | undefined - if (isSaving === false) { - setShowTempMessage(true) - timeoutid = window.setTimeout(() => { - setShowTempMessage(false) - }, 4000) - } - return () => { - window.clearTimeout(timeoutid) - } - }, [isSaving]) - return ( - <> - { - // otherwise since we're technically in a button this will trigger it - e.stopPropagation() - }} - onClick={(e) => { - // otherwise since we're technically in a button this will trigger it - e.stopPropagation() - }} - anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }} - > - -
    - {isSaving ? ( - <> - - Saving ... - - ) : ( - <> - All changes saved to the - system. - - )} -
    - -
    - Every change you make is automatically saved. -
    -
    -
    - - - ) -} - -const LeftTop = () => { - const { closed } = useResizableGridContext() - const { data, searchPageMode, selectionInterface } = React.useContext( - SavedSearchModeContext - ) - useRerenderOnBackboneSync({ - lazyResult: typeof data !== 'boolean' ? data : undefined, - }) - const history = useHistory() - const adhocMenuState = useMenuState() - const savedMenuState = useMenuState() - return ( -
    -
    - {searchPageMode === 'adhoc' ? ( - <> - - - { - adhocMenuState.handleClose() - }} - selectionInterface={selectionInterface} - onSave={(title) => { - selectionInterface.getCurrentQuery().set('title', title) - const searchData = selectionInterface - .getCurrentQuery() - .toJSON() - if (searchPageMode === 'adhoc') { - const task = AsyncTasks.createSearch({ - data: searchData, - }) - history.push({ - pathname: `/search/${task.data.id}`, - search: '', - }) - } else if (typeof data !== 'boolean') { - AsyncTasks.saveSearch({ - lazyResult: data, - data: searchData, - }) - } - }} - /> - - - - - ) : null} - {data === false && searchPageMode === 'saved' ? ( -
    - Could not find search -
    - ) : null} - {data === true ? ( - <> - - - ) : null} - {typeof data !== 'boolean' ? ( - <> - - - { - selectionInterface.getCurrentQuery().set('title', title) - const searchData = selectionInterface - .getCurrentQuery() - .toJSON() - if (searchPageMode === 'adhoc') { - AsyncTasks.createSearch({ data: searchData }) - } else if (typeof data !== 'boolean') { - AsyncTasks.saveSearch({ - lazyResult: data, - data: searchData, - }) - } - }} - /> - - - - - ) : ( - <> - )} -
    - -
    -
    - {closed ? null : } -
    - ) -} - -const LeftMiddle = () => { - const { closed } = useResizableGridContext() - const { data, searchPageMode, selectionInterface } = React.useContext( - SavedSearchModeContext - ) - - if (data === false && searchPageMode === 'saved') { - // eventually add something? - return
    - } - return ( -
    - {data === true ? ( - - ) : ( -
    - -
    - )} -
    - ) -} - -const useKeepSearchInUrl = ({ - queryModel, - on, -}: { - queryModel: any - on: boolean -}) => { - const history = useHistory() - const { listenTo, stopListening } = useBackbone() - React.useEffect(() => { - // this is fairly expensive, so keep it heavily debounced - const debouncedUpdate = _.debounce(() => { - if (on) { - const encodedQueryModel = encodeURIComponent( - JSON.stringify(queryModel.toJSON()) - ) - history.replace({ - search: `${queryString.stringify({ - defaultQuery: encodedQueryModel, - })}`, - }) - } - }, 2000) - listenTo(queryModel, 'change', debouncedUpdate) - - return () => { - debouncedUpdate.cancel() - stopListening(queryModel, 'change', debouncedUpdate) - } - }, [on, queryModel]) -} - -type SearchPageMode = 'saved' | 'adhoc' - -const useSearchPageMode = ({ id }: { id?: string }): SearchPageMode => { - const [mode, setMode] = React.useState(id ? 'saved' : 'adhoc') - React.useEffect(() => { - if (id) { - return setMode('saved') - } - return setMode('adhoc') - }, [id]) - return mode -} - -type SavedSearchPageMode = boolean | LazyQueryResult -const useSavedSearchPageMode = ({ - id, -}: { - id?: string -}): SavedSearchPageMode => { - // handle all loading / data in here - const [data, setData] = React.useState(false) - const task = useCreateSearchTask({ id }) - const restoreTask = useRestoreSearchTask({ id }) - const [queryModel] = useQuery({ - attributes: { - sources: ['local'], - }, - }) - React.useEffect(() => { - if (task || restoreTask) { - setData(true) - return - } - let subscriptionCancel = () => {} - - if (id) { - setData(true) - queryModel.set( - 'filterTree', - new FilterBuilderClass({ - filters: [ - new FilterClass({ - type: '=', - property: 'id', - value: id, - }), - new FilterClass({ - type: 'ILIKE', - property: 'metacard-tags', - value: '*', - }), - ], - }) - ) - queryModel.initializeResult() - const lazyResults = queryModel.getLazyResults() - subscriptionCancel = lazyResults.subscribeTo({ - subscribableThing: 'filteredResults', - callback: () => { - const results = Object.values(lazyResults.results) - if (results.length > 0) { - setData(results[0]) - } else { - setData(false) - } - }, - }) - queryModel.startSearchFromFirstPage() - } else { - setData(false) - } - return () => { - subscriptionCancel() - queryModel.cancelCurrentSearches() - } - }, [id, task, restoreTask]) - return data -} - -const AutoSave = () => { - const { searchPageMode, selectionInterface, data } = React.useContext( - SavedSearchModeContext - ) - const queryModel = selectionInterface.getCurrentQuery() - const on = searchPageMode === 'saved' - - const { listenTo, stopListening } = useBackbone() - React.useEffect(() => { - const callback = () => { - const changedAttributes = Object.keys(queryModel.changedAttributes()) - const isFromSwappingToSavedSearch = changedAttributes.includes('id') - const isAttributeThatMatters = - changedAttributes.includes('filterTree') || - changedAttributes.includes('sorts') || - changedAttributes.includes('sources') - if ( - on && - queryModel.get('id') && - !isFromSwappingToSavedSearch && - isAttributeThatMatters && - typeof data !== 'boolean' - ) { - AsyncTasks.saveSearch({ - lazyResult: data, - data: queryModel.toJSON(), - }) - } - } - listenTo(queryModel, 'change', callback) - - return () => { - stopListening(queryModel, 'change', callback) - } - }, [on, queryModel, data]) - return null -} - -const SavedSearchModeContext = React.createContext({ - data: false as SavedSearchPageMode, - searchPageMode: 'adhoc' as SearchPageMode, - isSaving: false as boolean, - selectionInterface: {} as any, -}) - -const decodeUrlIfValid = (search: string) => { - if (location) { - try { - const queryParams = queryString.parse(search) - const defaultQueryString = (queryParams['defaultQuery'] || '').toString() - return JSON.parse(decodeURIComponent(defaultQueryString)) - } catch (err) { - return {} - } - } else { - return {} - } -} - -export const HomePage = () => { - const location = useLocation() - const [queryModel] = useUserQuery({ - attributes: decodeUrlIfValid(location.search), - }) - const { id } = useParams<{ id?: string }>() - const searchPageMode = useSearchPageMode({ id }) - const data = useSavedSearchPageMode({ id }) - const saveSearchTask = useSaveSearchTaskBasedOnParams() - const isSaving = saveSearchTask !== null - React.useEffect(() => { - let urlBasedQuery = location.search.split('?defaultQuery=')[1] - if (urlBasedQuery) { - selectionInterface.getCurrentQuery().refetchOrStartSearchFromFirstPage() - } - }, []) - const [selectionInterface] = React.useState( - new SelectionInterfaceModel({ - currentQuery: queryModel, - }) - ) - useKeepSearchInUrl({ - queryModel: selectionInterface.getCurrentQuery(), - on: searchPageMode === 'adhoc', - }) - React.useEffect(() => { - if (typeof data !== 'boolean') { - selectionInterface.getCurrentQuery().set(data.plain.metacard.properties) - } - }, [data]) - useUpdateEffect(() => { - if (searchPageMode === 'adhoc') { - selectionInterface.getCurrentQuery().unset('id') - if (location.search === '') { - selectionInterface.getCurrentQuery().resetToDefaults() - } - } - }, [searchPageMode, location.search]) - const { setElement } = useListenToEnterKeySubmitEvent({ - callback: () => { - ;(selectionInterface.getCurrentQuery() as any).startSearchFromFirstPage() - }, - }) - return ( - - - -
    - -
    - -
    - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-add/query-add.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-add/query-add.tsx deleted file mode 100644 index f26e188fdc2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-add/query-add.tsx +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' -import QueryBasic from '../../component/query-basic/query-basic.view' - -import QueryAdvanced from '../../component/query-advanced/query-advanced' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import { ValidationResult } from '../../react-component/location/validators' -export const queryForms = [ - { id: 'basic', title: 'Basic Search', view: QueryBasic }, - { - id: 'advanced', - title: 'Advanced Search', - view: QueryAdvanced, - }, -] - -type QueryAddReactType = { - model: any - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void - Extensions?: React.FunctionComponent -} - -export const QueryAddReact = ({ - model, - errorListener, - Extensions, -}: QueryAddReactType) => { - const [, setForceRender] = React.useState(Math.random()) - useListenTo(model, 'resetToDefaults change:type', () => { - setForceRender(Math.random()) - }) - const formType = model.get('type') - const form = - (queryForms.find((form) => form.id === formType) as { - id: string - title: string - view: any - }) || queryForms[0] - return ( - -
    - {(() => { - if (form.id === 'basic') { - return ( - - ) - } else { - return ( - - ) - } - })()} - -
    - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-advanced/query-advanced.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-advanced/query-advanced.tsx deleted file mode 100644 index 544799e6b5d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-advanced/query-advanced.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import QuerySettings from '../query-settings/query-settings' -import { FilterBuilderRoot } from '../filter-builder/filter-builder' -import { hot } from 'react-hot-loader' -import Swath from '../swath/swath' -import { ValidationResult } from '../../react-component/location/validators' -type Props = { - model: any - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void - Extensions?: React.FunctionComponent -} - -export const QueryAdvanced = ({ model, errorListener, Extensions }: Props) => { - return ( -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    - ) -} - -export default hot(module)(QueryAdvanced) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-basic/query-basic.view.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-basic/query-basic.view.spec.tsx deleted file mode 100644 index 3dc6eb7250e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-basic/query-basic.view.spec.tsx +++ /dev/null @@ -1,548 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -import { - constructFilterFromBasicFilter, - translateFilterToBasicMap, -} from './query-basic.view' -import { - FilterBuilderClass, - FilterClass, -} from '../filter-builder/filter.structure' -import { StartupDataStore } from '../../js/model/Startup/startup' - -// function to remove any key with id from an arbitrarily nested object -function removeId(obj: any) { - if (obj && typeof obj === 'object') { - Object.keys(obj).forEach((key) => { - if (key === 'id') { - delete obj[key] - } else { - removeId(obj[key]) - } - }) - } - return obj -} - -function removeCustomClasses(obj: any) { - return JSON.parse(JSON.stringify(obj)) -} - -describe('verify going back and forth from filter to state in query basic is not lossy or "wrong"', () => { - it('handles just keyword ', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap = { - anyText: { - type: 'STRING', - id: 'anyText', - multivalued: false, - isInjected: false, - }, - } - } - const startingFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - property: 'anyText', - value: { - text: 't', - cql: "(anyText ILIKE 't')", - error: false, - }, - negated: false, - }), - ], - negated: false, - }) - - expect( - removeCustomClasses( - removeId( - constructFilterFromBasicFilter({ - basicFilter: - translateFilterToBasicMap(startingFilter).propertyValueMap, - }) - ) - ) - ).to.deep.equal(removeCustomClasses(removeId(startingFilter))) - }) - - it('handles just time ', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap = { - anyText: { - type: 'STRING', - id: 'anyText', - multivalued: false, - isInjected: false, - }, - created: { - type: 'DATE', - id: 'created', - multivalued: false, - isInjected: false, - }, - effective: { - type: 'DATE', - id: 'effective', - multivalued: false, - isInjected: false, - }, - modified: { - type: 'DATE', - id: 'modified', - multivalued: false, - isInjected: false, - }, - 'metacard.created': { - type: 'DATE', - id: 'metacard.created', - multivalued: false, - isInjected: false, - }, - 'metacard.modified': { - type: 'DATE', - id: 'metacard.modified', - multivalued: false, - isInjected: false, - }, - } - } - const startingFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - property: 'anyText', - value: { - text: 't', - cql: "(anyText ILIKE 't')", - error: false, - }, - negated: false, - }), - new FilterBuilderClass({ - type: 'OR', - filters: [ - new FilterClass({ - type: 'BEFORE', - property: 'created', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'effective', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'modified', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'metacard.created', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'metacard.modified', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - ], - negated: false, - }), - ], - negated: false, - }) - - expect( - removeCustomClasses( - removeId( - constructFilterFromBasicFilter({ - basicFilter: - translateFilterToBasicMap(startingFilter).propertyValueMap, - }) - ) - ) - ).to.deep.equal(removeCustomClasses(removeId(startingFilter))) - }) - - it('handles just location ', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap = { - anyText: { - type: 'STRING', - id: 'anyText', - multivalued: false, - isInjected: false, - }, - anyGeo: { - type: 'LOCATION', - id: 'anyGeo', - multivalued: false, - isInjected: false, - }, - } - } - const startingFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - property: 'anyText', - value: { - text: 't', - cql: "(anyText ILIKE 't')", - error: false, - }, - negated: false, - id: '0.04416459837101705', - }), - new FilterClass({ - type: 'GEOMETRY', - property: 'anyGeo', - value: { - // @ts-ignore - locationId: 1713480576078, - color: '#8E79DD', - drawing: false, - dmsNorthDirection: 'N', - dmsSouthDirection: 'N', - dmsEastDirection: 'E', - dmsWestDirection: 'E', - radiusUnits: 'meters', - radius: 955.1713897900735, - locationType: 'dd', - prevLocationType: 'dd', - lat: 44.352567, - lon: -108.13405, - dmsLat: '44°21\'09.241"', - dmsLon: '108°08\'02.58"', - dmsLatDirection: 'N', - dmsLonDirection: 'W', - usng: '12T YQ 28412 15028', - lineWidth: '', - lineUnits: 'meters', - polygonBufferWidth: '', - polygonBufferUnits: 'meters', - hasKeyword: false, - utmUpsUpperLeftHemisphere: 'Northern', - utmUpsUpperLeftZone: 1, - utmUpsLowerRightHemisphere: 'Northern', - utmUpsLowerRightZone: 1, - utmUpsEasting: 728412.2560937542, - utmUpsNorthing: 4915028.120213763, - utmUpsZone: 12, - utmUpsHemisphere: 'Northern', - mode: 'circle', - type: 'POINTRADIUS', - }, - negated: false, - }), - ], - negated: false, - }) - - expect( - removeCustomClasses( - removeId( - constructFilterFromBasicFilter({ - basicFilter: - translateFilterToBasicMap(startingFilter).propertyValueMap, - }) - ) - ) - ).to.deep.equal(removeCustomClasses(removeId(startingFilter))) - }) - - it('handles just types but when blank ', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap = { - anyText: { - type: 'STRING', - id: 'anyText', - multivalued: false, - isInjected: false, - }, - 'reserved.basic-datatype': { - type: 'STRING', - id: 'reserved.basic-datatype', - multivalued: false, - isInjected: false, - }, - } - } - - const startingFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - property: 'anyText', - value: { - text: 't', - cql: "(anyText ILIKE 't')", - error: false, - }, - negated: false, - }), - new FilterClass({ - type: 'ILIKE', - property: 'reserved.basic-datatype', - value: [], - negated: false, - }), - ], - negated: false, - }) - - expect( - removeCustomClasses( - removeId( - constructFilterFromBasicFilter({ - basicFilter: - translateFilterToBasicMap(startingFilter).propertyValueMap, - }) - ) - ) - ).to.deep.equal(removeCustomClasses(removeId(startingFilter))) - }) - - it('handles just types when types are filled out ', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap = { - anyText: { - type: 'STRING', - id: 'anyText', - multivalued: false, - isInjected: false, - }, - 'reserved.basic-datatype': { - type: 'STRING', - id: 'reserved.basic-datatype', - multivalued: false, - isInjected: false, - }, - } - } - const startingFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - property: 'anyText', - value: { - text: 't', - cql: "(anyText ILIKE 't')", - error: false, - }, - negated: false, - }), - new FilterClass({ - type: 'ILIKE', - property: 'reserved.basic-datatype', - value: ['Equipment'], - negated: false, - }), - ], - negated: false, - }) - - expect( - removeCustomClasses( - removeId( - constructFilterFromBasicFilter({ - basicFilter: - translateFilterToBasicMap(startingFilter).propertyValueMap, - }) - ) - ) - ).to.deep.equal(removeCustomClasses(removeId(startingFilter))) - }) - - it('handles just types when everything is filled out ', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap = { - anyText: { - type: 'STRING', - id: 'anyText', - multivalued: false, - isInjected: false, - }, - anyGeo: { - type: 'LOCATION', - id: 'anyGeo', - multivalued: false, - isInjected: false, - }, - created: { - type: 'DATE', - id: 'created', - multivalued: false, - isInjected: false, - }, - effective: { - type: 'DATE', - id: 'effective', - multivalued: false, - isInjected: false, - }, - modified: { - type: 'DATE', - id: 'modified', - multivalued: false, - isInjected: false, - }, - 'metacard.created': { - type: 'DATE', - id: 'metacard.created', - multivalued: false, - isInjected: false, - }, - 'metacard.modified': { - type: 'DATE', - id: 'metacard.modified', - multivalued: false, - isInjected: false, - }, - 'reserved.basic-datatype': { - type: 'STRING', - id: 'reserved.basic-datatype', - multivalued: false, - isInjected: false, - }, - } - } - const startingFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - property: 'anyText', - value: { - text: 't', - cql: "(anyText ILIKE 't')", - error: false, - }, - negated: false, - }), - new FilterBuilderClass({ - type: 'OR', - filters: [ - new FilterClass({ - type: 'BEFORE', - property: 'created', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'effective', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'modified', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'metacard.created', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - new FilterClass({ - type: 'BEFORE', - property: 'metacard.modified', - value: '2024-04-18T22:39:05.946Z', - negated: false, - }), - ], - negated: false, - }), - new FilterClass({ - type: 'GEOMETRY', - property: 'anyGeo', - value: { - // @ts-ignore - locationId: 1713480576078, - color: '#8E79DD', - drawing: false, - dmsNorthDirection: 'N', - dmsSouthDirection: 'N', - dmsEastDirection: 'E', - dmsWestDirection: 'E', - radiusUnits: 'meters', - radius: 955.1713897900735, - locationType: 'dd', - prevLocationType: 'dd', - lat: 44.352567, - lon: -108.13405, - dmsLat: '44°21\'09.241"', - dmsLon: '108°08\'02.58"', - dmsLatDirection: 'N', - dmsLonDirection: 'W', - usng: '12T YQ 28412 15028', - lineWidth: '', - lineUnits: 'meters', - polygonBufferWidth: '', - polygonBufferUnits: 'meters', - hasKeyword: false, - utmUpsUpperLeftHemisphere: 'Northern', - utmUpsUpperLeftZone: 1, - utmUpsLowerRightHemisphere: 'Northern', - utmUpsLowerRightZone: 1, - utmUpsEasting: 728412.2560937542, - utmUpsNorthing: 4915028.120213763, - utmUpsZone: 12, - utmUpsHemisphere: 'Northern', - mode: 'circle', - type: 'POINTRADIUS', - }, - negated: false, - }), - new FilterClass({ - type: 'ILIKE', - property: 'reserved.basic-datatype', - value: ['Equipment'], - negated: false, - }), - ], - negated: false, - }) - - const result = removeCustomClasses( - removeId( - constructFilterFromBasicFilter({ - basicFilter: - translateFilterToBasicMap(startingFilter).propertyValueMap, - }) - ) - ) - - expect(result).to.deep.equal(removeCustomClasses(removeId(startingFilter))) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-basic/query-basic.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-basic/query-basic.view.tsx deleted file mode 100644 index bc683774c4a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-basic/query-basic.view.tsx +++ /dev/null @@ -1,477 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import _ from 'underscore' -import cql from '../../js/cql' -import CQLUtils from '../../js/CQLUtils' -import QuerySettings from '../query-settings/query-settings' -import QueryTimeReactView from '../query-time/query-time.view' -import { - BasicDatatypeFilter, - BasicFilterClass, - isBasicDatatypeClass, - isFilterBuilderClass, -} from '../filter-builder/filter.structure' -import FormControlLabel from '@mui/material/FormControlLabel' -import Checkbox from '@mui/material/Checkbox' -import { - BooleanTextType, - FilterBuilderClass, - FilterClass, -} from '../filter-builder/filter.structure' -import Typography from '@mui/material/Typography' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import FilterInput from '../../react-component/filter/filter-input' -import Swath from '../swath/swath' -import Grid from '@mui/material/Grid' -import BooleanSearchBar from '../boolean-search-bar/boolean-search-bar' -import { ValidationResult } from '../../react-component/location/validators' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { useMetacardDefinitions } from '../../js/model/Startup/metacard-definitions.hooks' -import { ReservedBasicDatatype } from '../reserved-basic-datatype/reserved.basic-datatype' -import { BasicDataTypePropertyName } from '../filter-builder/reserved.properties' -function isNested(filter: any) { - let nested = false - filter.filters.forEach((subfilter: any) => { - nested = nested || subfilter.filters - }) - return nested -} - -// strip extra quotes -const stripQuotes = (property = 'anyText') => { - return property?.replace(/^"(.+(?="$))"$/, '$1') -} -function isAnyDate(filter: any) { - if (!filter.filters) { - return ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[ - stripQuotes(filter.property) - ].type === 'DATE' - ) - } - let typesFound = {} as any - let valuesFound = {} as any - filter.filters.forEach((subfilter: any) => { - typesFound[subfilter.type] = true - valuesFound[subfilter.value] = true - }) - typesFound = Object.keys(typesFound) - valuesFound = Object.keys(valuesFound) - if (typesFound.length > 1 || valuesFound.length > 1) { - return false - } else { - const attributes = filter.filters.map( - (subfilter: any) => subfilter.property - ) - return ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[ - stripQuotes(attributes[0]) - ].type === 'DATE' - ) - } -} -function handleAnyDateFilter(propertyValueMap: any, filter: any) { - propertyValueMap['anyDate'] = propertyValueMap['anyDate'] || [] - let existingFilter = propertyValueMap['anyDate'].filter( - (anyDateFilter: any) => - anyDateFilter.type === - (filter.filters ? filter.filters[0].type : filter.type) - )[0] - if (!existingFilter) { - existingFilter = { - property: [], - } - propertyValueMap['anyDate'].push(existingFilter) - } - existingFilter.property = existingFilter.property.concat( - filter.filters - ? filter.filters.map((subfilter: any) => stripQuotes(subfilter.property)) - : [stripQuotes(filter.property)] - ) - existingFilter.type = filter.filters ? filter.filters[0].type : filter.type - existingFilter.value = filter.filters ? filter.filters[0].value : filter.value - if (existingFilter.type === 'DURING') { - existingFilter.from = filter.filters ? filter.filters[0].from : filter.from - existingFilter.to = filter.filters ? filter.filters[0].to : filter.to - } -} -type PropertyValueMapType = { - anyText: Array - anyDate: Array - anyGeo: Array - [BasicDataTypePropertyName]: { - on: boolean - value: BasicDatatypeFilter - } - - [key: string]: any -} -export function downgradeFilterTreeToBasic( - filter: FilterBuilderClass -): FilterBuilderClass { - return constructFilterFromBasicFilter({ - basicFilter: translateFilterToBasicMap(filter).propertyValueMap, - }) -} -export function translateFilterToBasicMap(filter: FilterBuilderClass) { - const propertyValueMap = { - anyDate: [], - anyText: [], - anyGeo: [], - [BasicDataTypePropertyName]: { - on: false, - value: new BasicDatatypeFilter({ - value: [], - }), - }, - } as PropertyValueMapType - let downConversion = false - if (!filter.filters && isAnyDate(filter)) { - handleAnyDateFilter(propertyValueMap, filter) - } - if (isFilterBuilderClass(filter)) { - filter.filters.forEach((subfilter) => { - if (!isFilterBuilderClass(subfilter) && isAnyDate(subfilter)) { - handleAnyDateFilter(propertyValueMap, subfilter) - } else if ( - !isFilterBuilderClass(subfilter) && - isBasicDatatypeClass(subfilter) - ) { - propertyValueMap[BasicDataTypePropertyName].on = true - propertyValueMap[BasicDataTypePropertyName].value = subfilter - } else if (!isFilterBuilderClass(subfilter)) { - if (['anyDate', 'anyText', 'anyGeo'].includes(subfilter.property)) { - propertyValueMap[CQLUtils.getProperty(subfilter)] = - propertyValueMap[CQLUtils.getProperty(subfilter)] || [] - if ( - propertyValueMap[CQLUtils.getProperty(subfilter)].filter( - (existingFilter: any) => existingFilter.type === subfilter.type - ).length === 0 - ) { - propertyValueMap[CQLUtils.getProperty(subfilter)].push(subfilter) - } - } - } else if (!isNested(subfilter) && isAnyDate(subfilter)) { - handleAnyDateFilter(propertyValueMap, subfilter) - } else { - downConversion = true - } - }) - } else { - propertyValueMap[CQLUtils.getProperty(filter)] = - propertyValueMap[CQLUtils.getProperty(filter)] || [] - propertyValueMap[CQLUtils.getProperty(filter)].push(filter) - } - if (propertyValueMap.anyText.length === 0) { - propertyValueMap.anyText.push( - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - property: 'anyText', - value: '', - }) - ) - } - - return { - propertyValueMap, - downConversion, - } as { - propertyValueMap: PropertyValueMapType - downConversion: boolean - } -} -function getFilterTree(model: any): FilterBuilderClass { - if (typeof model.get('filterTree') === 'object') { - return model.get('filterTree') - } - return cql.simplify(cql.read(model.get('cql'))) -} -type QueryBasicProps = { - model: any - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void - Extensions?: React.FunctionComponent -} -export const constructFilterFromBasicFilter = ({ - basicFilter, -}: { - basicFilter: PropertyValueMapType -}): FilterBuilderClass => { - const filters = [] as FilterBuilderClass['filters'] - if (basicFilter.anyText[0].value !== '') { - filters.push(basicFilter.anyText[0]) - } - if (basicFilter.anyDate[0] !== undefined) { - filters.push( - new FilterBuilderClass({ - type: 'OR', - filters: - basicFilter.anyDate[0].property.length !== 0 - ? basicFilter.anyDate[0].property.map((property) => { - return { - ...basicFilter.anyDate[0], - property, - } - }) - : [ - { - ...basicFilter.anyDate[0], - property: 'anyDate', - }, - ], // we need a default since we rely on the filterTree solely - }) - ) - } - if (basicFilter.anyGeo[0] !== undefined) { - filters.push(basicFilter.anyGeo[0]) - } - if ( - basicFilter[BasicDataTypePropertyName].on && - basicFilter[BasicDataTypePropertyName].value.value.length > 0 - ) { - filters.push(basicFilter[BasicDataTypePropertyName].value) - } else if (basicFilter[BasicDataTypePropertyName].on) { - // a bit of an unfortunate hack so we can depend directly on filterTree (this will only happen if properties is blank!) - // see the anyDate part of translateFilterToBasicMap for more details - filters.push( - new BasicDatatypeFilter({ - value: [], - }) - ) - } - return new FilterBuilderClass({ - type: 'AND', - filters, - }) -} -/** - * We want to reset the basic filter whenever the filter tree changes on the model. - * - * We also want to update the filter tree once whenever the component is first - */ -const useBasicFilterFromModel = ({ model }: QueryBasicProps) => { - const [basicFilter, setBasicFilter] = React.useState( - translateFilterToBasicMap(getFilterTree(model)).propertyValueMap - ) - const { listenTo, stopListening } = useBackbone() - React.useEffect(() => { - const callback = () => { - setBasicFilter( - translateFilterToBasicMap(getFilterTree(model)).propertyValueMap - ) - } - listenTo(model, 'change:filterTree', callback) - return () => { - stopListening(model, 'change:filterTree', callback) - } - }, [model]) - return basicFilter -} - -const QueryBasic = ({ model, errorListener, Extensions }: QueryBasicProps) => { - const MetacardDefinitions = useMetacardDefinitions() - const inputRef = React.useRef() - const basicFilter = useBasicFilterFromModel({ model }) - - /** - * Because of how things render, auto focusing to the input is more complicated than I wish. - * This ensures it works every time, whereas autoFocus prop is unreliable - */ - React.useEffect(() => { - const timeoutId = setTimeout(() => { - if (inputRef.current) { - inputRef.current.focus() - } - }, 100) - return () => { - clearTimeout(timeoutId) - } - }, []) - const anyTextValue: BooleanTextType = (() => { - if (basicFilter.anyText) { - if (typeof basicFilter.anyText[0].value === 'string') { - return { - text: basicFilter.anyText[0].value, - cql: '', - error: false, - } - } else { - return basicFilter.anyText[0].value as BooleanTextType - } - } else { - return { - text: '', - cql: '', - error: false, - } - } - })() - return ( - <> -
    -
    - Keyword - { - // we want the string value, the cql value, and if it's correct - basicFilter.anyText[0] = new FilterClass({ - ...basicFilter.anyText[0], - type: 'BOOLEAN_TEXT_SEARCH', - value: { - text, - cql, - error, - }, - }) - model.set( - 'filterTree', - constructFilterFromBasicFilter({ basicFilter }) - ) - }} - /> -
    -
    - { - basicFilter.anyDate[0] = newValue - model.set( - 'filterTree', - constructFilterFromBasicFilter({ basicFilter }) - ) - }} - /> -
    -
    - { - if (!e.target.checked) { - basicFilter.anyGeo.pop() - } else { - basicFilter.anyGeo.push( - new FilterClass({ - type: 'GEOMETRY', - property: 'anyGeo', - value: '', - }) - ) - } - model.set( - 'filterTree', - constructFilterFromBasicFilter({ basicFilter }) - ) - }} - /> - } - label={MetacardDefinitions.getAlias('location')} - /> - {basicFilter.anyGeo[0] ? ( - - - - - - { - basicFilter.anyGeo[0] = val - model.set( - 'filterTree', - constructFilterFromBasicFilter({ basicFilter }) - ) - }} - errorListener={errorListener} - /> - - - ) : null} -
    -
    - { - basicFilter[BasicDataTypePropertyName].on = e.target.checked - model.set( - 'filterTree', - constructFilterFromBasicFilter({ basicFilter }) - ) - }} - /> - } - label={MetacardDefinitions.getAlias(BasicDataTypePropertyName)} - /> - {basicFilter[BasicDataTypePropertyName].on ? ( - - - - - - { - basicFilter[BasicDataTypePropertyName].value.value = - newValue - model.set( - 'filterTree', - constructFilterFromBasicFilter({ basicFilter }) - ) - }} - /> - - - ) : null} -
    -
    - -
    -
    - -
    -
    - - ) -} -export default hot(module)(QueryBasic) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/phonetics.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/phonetics.tsx deleted file mode 100644 index 3ee636c1922..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/phonetics.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import FormControlLabel from '@mui/material/FormControlLabel' -import Checkbox from '@mui/material/Checkbox' -import { QueryType } from '../../js/model/Query' - -type Props = { - model: QueryType -} - -const Phonetics = ({ model }: Props) => { - const [phonetics, setPhonetics] = React.useState( - Boolean(model.get('phonetics')) - ) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(model, 'change:phonetics', () => { - setPhonetics(model.get('phonetics')) - }) - }, []) - return ( - { - model.set('phonetics', e.target.checked) - }} - /> - } - label="Similar word matching" - /> - ) -} - -export default hot(module)(Phonetics) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/query-settings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/query-settings.tsx deleted file mode 100644 index 912ce16b293..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/query-settings.tsx +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import PermanentSearchSort from '../../react-component/query-sort-selection/permanent-search-sort' - -import * as React from 'react' -import SourceSelector from './source-selector' -import SourcesInfo from './sources-info' -import Phonetics from './phonetics' -import Spellcheck from './spellcheck' -import { hot } from 'react-hot-loader' -import { Memo } from '../memo/memo' -import { QueryType } from '../../js/model/Query' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' - -type Props = { - model: QueryType - Extensions?: React.FunctionComponent -} - -/** - * This is expensive to rerender, so we memo. However, if the inner components aren't listening to the query, - * this will not work. - */ -const QuerySettings = ({ model, Extensions }: Props) => { - const { config } = useConfiguration() - return ( - -
    - {Extensions ? : null} - {config?.isSpellcheckEnabled ? ( -
    - -
    - ) : null} - {config?.isPhoneticsEnabled ? ( -
    - -
    - ) : null} -
    - -
    - -
    - -
    -
    - -
    -
    -
    - ) -} - -export default hot(module)(QuerySettings) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/source-selector.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/source-selector.tsx deleted file mode 100644 index 601d6462099..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/source-selector.tsx +++ /dev/null @@ -1,457 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import TextField from '@mui/material/TextField' -import MenuItem from '@mui/material/MenuItem' -import Typography from '@mui/material/Typography' -import Swath from '../swath/swath' -import Grid from '@mui/material/Grid' -import HomeIcon from '@mui/icons-material/Home' -import CloudIcon from '@mui/icons-material/Cloud' -import WarningIcon from '@mui/icons-material/Warning' -import CheckBoxIcon from '@mui/icons-material/CheckBox' -import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank' -import Chip from '@mui/material/Chip' -import _ from 'lodash' -import { useSources } from '../../js/model/Startup/sources.hooks' -type Props = { - search: any -} - -type SourcesType = ('all' | 'fast' | 'slow' | string)[] - -export const getHumanReadableSourceName = (sourceId: string) => { - if (sourceId === 'all') { - return 'All' - } else if (sourceId === 'remote') { - return ( -
    -
    Slow (offsite)
    {' '} -
    - -
    -
    - ) - } else if (sourceId === 'local') { - return ( -
    -
    Fast (onsite)
    {' '} -
    - -
    -
    - ) - } - return sourceId -} - -const getSourcesFromSearch = ({ search }: Props): SourcesType => { - return search.get('sources') || [] -} - -const shouldBeSelected = ({ - srcId, - sources, - isHarvested, -}: { - srcId: string - sources: SourcesType - isHarvested: (source: string) => boolean -}) => { - if (sources.includes('all')) { - return true - } else if (sources.includes('local') && isHarvested(srcId)) { - return true - } else if ( - sources.includes('remote') && - !isHarvested(srcId) && - srcId !== 'all' && - srcId !== 'local' - ) { - return true - } - if (sources.includes(srcId)) { - return true - } - return false -} - -/** - * So we used to use two separate search properties to track sources, federation and sources. - * If federation was enterprise, we searched everything. If not, we looked to sources. I also think local was a thing. - * - * Instead, we're going to swap to storing only one property, sources (an array of strings). - * If sources includes, 'all' then that's enterprise. If it includes 'local', then that means everything local. - * If it includes 'remote', that that means everything remote. All other values are singular selections of a source. - */ -const SourceSelector = ({ search }: Props) => { - const { sources: availableSources } = useSources() - const [sources, setSources] = React.useState(getSourcesFromSearch({ search })) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(search, 'change:sources', () => { - setSources(getSourcesFromSearch({ search })) - }) - }, []) - React.useEffect(() => { - search.set('sources', sources) - }, [sources]) - const availableLocalSources = availableSources.filter((availableSource) => { - return availableSource.harvested - }) - const availableRemoteSources = availableSources.filter((availableSource) => { - return !availableSource.harvested - }) - - const isHarvested = (source: string): boolean => { - return availableLocalSources.some((availableSource) => { - return availableSource.id === source - }) - } - - return ( -
    - Data Sources - { - return ( - - {selected - .sort((a, b) => { - return a.toLowerCase().localeCompare(b.toLowerCase()) // case insensitive sort - }) - .sort((a) => { - if (a === 'local' || a === 'remote') { - return -1 // move these subcategories upwards to front - } - return 0 - }) - .map((src) => { - return ( - - - - ) - })} - - ) - }, - MenuProps: {}, - }} - value={sources} - onChange={(e) => { - // first of all I'm sorry, second of all, order matters in these cases. Should really just make a state machine out of this. - // https://xstate.js.org/docs/ perhaps? - let newSources = e.target.value as unknown as string[] - // these first three if only apply if the value didn't previous exist (user is going from not all to 'all', etc.) - const newLocalSources = newSources - .filter((src) => !['all', 'remote', 'local'].includes(src)) - .filter((src) => isHarvested(src)) - const newRemoteSources = newSources - .filter((src) => !['all', 'remote', 'local'].includes(src)) - .filter((src) => !isHarvested(src)) - - if ( - (newSources.includes('all') && !sources.includes('all')) || - (newSources.includes('local') && - newSources.includes('remote') && - (!sources.includes('remote') || !sources.includes('local')) && - !sources.includes('all')) - ) { - setSources(['all']) - } else if (sources.includes('all') && newSources.includes('local')) { - setSources(['remote']) - } else if (sources.includes('all') && newSources.includes('remote')) { - setSources(['local']) - } else if (sources.includes('all') && newLocalSources.length > 0) { - setSources( - _.difference( - availableLocalSources.map((src) => src.id).concat(['remote']), - newLocalSources - ) - ) - } else if (sources.includes('all') && newRemoteSources.length > 0) { - setSources( - _.difference( - availableRemoteSources.map((src) => src.id).concat(['local']), - newRemoteSources - ) - ) - } else if (sources.includes('local') && newLocalSources.length > 0) { - setSources( - _.difference( - sources - .filter((src) => src !== 'local') - .concat(availableLocalSources.map((src) => src.id)), - newLocalSources - ) - ) - } else if ( - sources.includes('remote') && - newRemoteSources.length > 0 - ) { - setSources( - _.difference( - sources - .filter((src) => src !== 'remote') - .concat(availableRemoteSources.map((src) => src.id)), - newRemoteSources - ) - ) - } else if ( - newSources.includes('local') && - !sources.includes('local') - ) { - setSources( - newSources.filter((val) => !isHarvested(val) && val !== 'all') - ) - } else if ( - newSources.includes('remote') && - !sources.includes('remote') - ) { - setSources( - ['remote'].concat( - newSources.filter((val) => isHarvested(val) && val !== 'all') - ) - ) - } else if ( - newSources.length === - availableLocalSources.length + availableRemoteSources.length || - (newSources.includes('local') && - newSources.length === availableRemoteSources.length + 1) || - (newSources.includes('remote') && - newSources.length === availableLocalSources.length + 1) - ) { - setSources(['all']) - } else if ( - availableLocalSources.length > 0 && - _.difference( - availableLocalSources.map((src) => src.id), - newSources.filter((src) => isHarvested(src)) - ).length === 0 - ) { - setSources( - ['local'].concat(newSources.filter((src) => !isHarvested(src))) - ) - } else if ( - availableRemoteSources.length > 0 && - _.difference( - availableRemoteSources.map((src) => src.id), - newSources.filter((src) => !isHarvested(src)) - ).length === 0 - ) { - setSources( - ['remote'].concat(newSources.filter((src) => isHarvested(src))) - ) - } else { - // in these case, we now have to determine if we should remove all, remote, or local based on what is in newSources - // no matter what all should be removed - newSources = newSources.filter((src) => src !== 'all') - if (newSources.find((src) => isHarvested(src))) { - newSources = newSources.filter((src) => src !== 'local') - } - if ( - newSources.find((src) => src !== 'remote' && !isHarvested(src)) - ) { - newSources = newSources.filter((src) => src !== 'remote') - } - setSources(newSources) - } - }} - size="small" - > - - - - - {shouldBeSelected({ srcId: 'all', sources, isHarvested }) ? ( - - ) : ( - - )} - - All - - - - {availableLocalSources.length > 0 ? ( - - - - - - - - {shouldBeSelected({ - srcId: 'local', - sources, - isHarvested, - }) ? ( - - ) : ( - - )} - - Fast (onsite) - - - - - - - ) : null} - {availableLocalSources.length > 0 - ? availableLocalSources.map((source: any) => { - return ( - - - - - - - - {shouldBeSelected({ - srcId: source.id, - sources, - isHarvested, - }) ? ( - - ) : ( - - )} - - -
    - {source.id} -
    -
    - - {source.available ? null : } - -
    -
    -
    - ) - }) - : null} - {availableRemoteSources.length > -1 ? ( - - - - - - - - {shouldBeSelected({ - srcId: 'remote', - sources, - isHarvested, - }) ? ( - - ) : ( - - )} - - Slow (offsite) - - - - - - - ) : null} - {availableRemoteSources.length > 0 - ? availableRemoteSources.map((source: any) => { - return ( - - - - - - - - {shouldBeSelected({ - srcId: source.id, - sources, - isHarvested, - }) ? ( - - ) : ( - - )} - - -
    - {source.id} -
    -
    - - {source.available ? null : } - -
    -
    -
    - ) - }) - : null} -
    -
    - ) -} - -export default hot(module)(SourceSelector) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/sources-info.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/sources-info.tsx deleted file mode 100644 index e1c69c4bb4d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/sources-info.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import Button from '@mui/material/Button' -import Grid from '@mui/material/Grid' -import Paper from '@mui/material/Paper' -import Popover, { PopoverActions } from '@mui/material/Popover' -import StorageIcon from '@mui/icons-material/Storage' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import ExtensionPoints from '../../extension-points' -import SourcesPage from '../../react-component/sources/presentation' -import { Elevations } from '../theme/theme' -import { useMenuState } from '../menu-state/menu-state' - -const SourcesInfo = () => { - const { anchorRef, handleClick, handleClose, open } = useMenuState() - const popoverActions = React.useRef(null) - - const onChange = () => { - if (popoverActions.current) { - popoverActions.current.updatePosition() - } - } - - return ( - - - - - {ExtensionPoints.customSourcesPage ? ( - - ) : ( - - )} - - - - ) -} - -export default hot(module)(SourcesInfo) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/spellcheck.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/spellcheck.tsx deleted file mode 100644 index 8b00919d97e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-settings/spellcheck.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import FormControlLabel from '@mui/material/FormControlLabel' -import Checkbox from '@mui/material/Checkbox' -import { QueryType } from '../../js/model/Query' - -type Props = { - model: QueryType -} - -const Spellcheck = ({ model }: Props) => { - const [spellcheck, setSpellcheck] = React.useState( - Boolean(model.get('spellcheck')) - ) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(model, 'change:spellcheck', () => { - setSpellcheck(model.get('spellcheck')) - }) - }, []) - return ( - { - model.set('spellcheck', e.target.checked) - }} - /> - } - label="Spellcheck" - /> - ) -} - -export default hot(module)(Spellcheck) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-time/query-time.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-time/query-time.view.tsx deleted file mode 100644 index b3cff53f9ee..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/query-time/query-time.view.tsx +++ /dev/null @@ -1,218 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* eslint-disable no-var */ -import * as React from 'react' -import TextField from '@mui/material/TextField' -import MenuItem from '@mui/material/MenuItem' -import { hot } from 'react-hot-loader' -import Autocomplete from '@mui/material/Autocomplete' -import Chip from '@mui/material/Chip' -import Grid from '@mui/material/Grid' -import Swath from '../swath/swath' -import FilterInput from '../../react-component/filter/filter-input' -import Checkbox from '@mui/material/Checkbox' -import FormControlLabel from '@mui/material/FormControlLabel' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { BasicFilterClass } from '../filter-builder/filter.structure' - -type QueryTimeProps = { - value: undefined | BasicFilterClass - onChange: (e: any) => void -} - -const getPossibleProperties = () => { - return StartupDataStore.MetacardDefinitions.getSortedAttributes() - .filter( - (definition: any) => !definition.hidden && definition.type === 'DATE' - ) - .map((definition: any) => ({ - label: definition.alias || definition.id, - value: definition.id, - })) as [ - { - label: string - value: string - } - ] -} - -const getDefaultPropertiesToApplyTo = (): { - label: string - value: string -}[] => { - return ( - StartupDataStore.Configuration.getBasicSearchTemporalSelectionDefault() || - [] - ).map((property: string) => { - return { - label: StartupDataStore.MetacardDefinitions.getAlias(property), - value: property, - } - }) -} - -const determinePropertiesToApplyTo = ({ - value, -}: { - value: BasicFilterClass -}): Array<{ label: string; value: string }> => { - if (value.property) { - return value.property - .filter((prop) => prop !== 'anyDate') - .map((property) => { - return { - label: StartupDataStore.MetacardDefinitions.getAlias(property), - value: property, - } - }) - } else { - return getDefaultPropertiesToApplyTo() - } -} - -const QueryTime = ({ value, onChange }: QueryTimeProps) => { - React.useEffect(() => { - if (value && value.property === undefined) { - onChange({ - ...value, - property: determinePropertiesToApplyTo({ value }).map( - (val) => val.value - ), - }) - } - }, [value]) - if (value && value.property === undefined) { - return null // the use effect above should fire to take care of setting a default - } - return ( - <> -
    - { - if (e.target.checked) { - onChange({ - ...value, - type: 'AFTER', - property: getDefaultPropertiesToApplyTo().map( - (val) => val.value - ), - }) - } else { - onChange(undefined) - } - }} - /> - } - label="Time" - /> - {value ? ( - - - option.label} - isOptionEqualToValue={(option, value) => - option.value === value.value - } - onChange={(_e, newValue) => { - onChange({ - ...value, - property: newValue.map((val) => val.value), - }) - }} - size="small" - renderTags={(tagValue, getTagProps) => - tagValue.map((option, index) => ( - - )) - } - value={determinePropertiesToApplyTo({ value })} - renderInput={(params) => ( - - )} - /> - - - - - - - - { - onChange({ - ...value, - type: e.target.value, - }) - }} - > - After - Before - Between - Within the last - Around - - - - { - onChange({ - ...value, - value: val.value, - }) - }} - /> - - - - - ) : null} -
    - - ) -} - -export default hot(module)(QueryTime) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.tsx deleted file mode 100644 index c658858a3ef..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.spec.tsx +++ /dev/null @@ -1,554 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -import { DataTypesConfiguration } from '../datatypes/datatypes' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { - generateGroupsToValues, - generateKnownGroups, - generateSortedValues, - getDataTypesConfiguration, -} from './reserved.basic-datatype' - -const DatatypesJSONConfig = { - groups: { - Object: { - iconConfig: { - class: 'fa fa-file-text-o', - }, - values: { - Person: { - attributes: { - description: ['person'], - }, - iconConfig: { - class: 'fa fa-user', - }, - }, - Group: { - attributes: { - description: ['group'], - }, - iconConfig: { - class: 'fa fa-users', - }, - }, - Equipment: { - attributes: { - description: ['equipment'], - }, - iconConfig: { - class: 'fa fa-wrench', - }, - }, - Platform: { - attributes: { - description: ['platform'], - }, - iconConfig: { - class: 'fa fa-industry', - }, - }, - Facility: { - attributes: { - description: ['facility'], - }, - iconConfig: { - class: 'fa fa-building', - }, - }, - }, - }, - Happenings: { - iconConfig: { - class: 'fa fa-bolt', - }, - values: { - Civil: { - attributes: { - description: ['civil'], - }, - iconConfig: { - class: 'fa fa-university', - }, - }, - Military: { - attributes: { - description: ['military'], - }, - iconConfig: { - class: 'fa fa-shield', - }, - }, - Political: { - attributes: { - description: ['political'], - }, - iconConfig: { - class: 'fa fa-balance-scale', - }, - }, - Natural: { - attributes: { - description: ['natural'], - }, - iconConfig: { - class: 'fa fa-leaf', - }, - }, - Other: { - attributes: { - description: ['other'], - }, - }, - }, - }, - 'Visual Media': { - iconConfig: { - class: 'fa fa-camera-retro', - }, - values: { - Image: { - attributes: { - datatype: ['Image'], - }, - iconConfig: { - class: 'fa fa-picture-o', - }, - }, - 'Moving Image': { - attributes: { - datatype: ['Moving Image'], - }, - iconConfig: { - class: 'fa fa-film', - }, - }, - 'Still Image': { - attributes: { - datatype: ['Still Image'], - }, - iconConfig: { - class: 'fa fa-camera-retro', - }, - }, - }, - }, - }, -} as DataTypesConfiguration - -describe('Reserved Basic Datatype', () => { - it('should use defaults when extra json is not defined', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap['datatype'] = { - id: 'datatype', - multivalued: false, - type: 'STRING', - enumerations: ['Image'], - isInjected: true, - } - } - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.extra = {} - } - - const resolvedConfiguration = getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) - expect(resolvedConfiguration.groupMap).to.deep.equal({ - groups: { - Other: { - values: { - Image: { - attributes: { - datatype: ['Image'], - 'metadata-content-type': ['Image'], - }, - iconConfig: { - class: undefined, - }, - }, - }, - }, - }, - }) - }) - it('should use defaults when extra json is not defined p2', () => { - if (StartupDataStore.MetacardDefinitions.attributeMap) { - StartupDataStore.MetacardDefinitions.attributeMap['datatype'] = { - id: 'datatype', - multivalued: false, - type: 'STRING', - enumerations: ['Image', 'Moving Image'], - isInjected: true, - } - } - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.extra = {} - } - const resolvedConfiguration = getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) - expect(resolvedConfiguration.groupMap).to.deep.equal({ - groups: { - Other: { - values: { - Image: { - attributes: { - datatype: ['Image'], - 'metadata-content-type': ['Image'], - }, - iconConfig: { - class: undefined, - }, - }, - 'Moving Image': { - attributes: { - datatype: ['Moving Image'], - 'metadata-content-type': ['Moving Image'], - }, - iconConfig: { - class: undefined, - }, - }, - }, - }, - }, - }) - }) - it('should use extra json when defined', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - } - const resolvedConfiguration = getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) - expect(resolvedConfiguration.groupMap).to.deep.equal(DatatypesJSONConfig) - }) - it('should generate a proper value mapping', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - } - const resolvedConfiguration = getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) - expect(resolvedConfiguration.valueMap).to.deep.equal({ - Person: { - group: { - name: 'Object', - iconConfig: { - class: 'fa fa-file-text-o', - }, - }, - attributes: { - description: ['person'], - }, - iconConfig: { - class: 'fa fa-user', - }, - }, - Group: { - group: { - name: 'Object', - iconConfig: { - class: 'fa fa-file-text-o', - }, - }, - attributes: { - description: ['group'], - }, - iconConfig: { - class: 'fa fa-users', - }, - }, - Equipment: { - group: { - name: 'Object', - iconConfig: { - class: 'fa fa-file-text-o', - }, - }, - attributes: { - description: ['equipment'], - }, - iconConfig: { - class: 'fa fa-wrench', - }, - }, - Platform: { - group: { - name: 'Object', - iconConfig: { - class: 'fa fa-file-text-o', - }, - }, - attributes: { - description: ['platform'], - }, - iconConfig: { - class: 'fa fa-industry', - }, - }, - Facility: { - group: { - name: 'Object', - iconConfig: { - class: 'fa fa-file-text-o', - }, - }, - attributes: { - description: ['facility'], - }, - iconConfig: { - class: 'fa fa-building', - }, - }, - Civil: { - group: { - name: 'Happenings', - iconConfig: { - class: 'fa fa-bolt', - }, - }, - attributes: { - description: ['civil'], - }, - iconConfig: { - class: 'fa fa-university', - }, - }, - Military: { - group: { - name: 'Happenings', - iconConfig: { - class: 'fa fa-bolt', - }, - }, - attributes: { - description: ['military'], - }, - iconConfig: { - class: 'fa fa-shield', - }, - }, - Political: { - group: { - name: 'Happenings', - iconConfig: { - class: 'fa fa-bolt', - }, - }, - attributes: { - description: ['political'], - }, - iconConfig: { - class: 'fa fa-balance-scale', - }, - }, - Natural: { - group: { - name: 'Happenings', - iconConfig: { - class: 'fa fa-bolt', - }, - }, - attributes: { - description: ['natural'], - }, - iconConfig: { - class: 'fa fa-leaf', - }, - }, - Other: { - group: { - name: 'Happenings', - iconConfig: { - class: 'fa fa-bolt', - }, - }, - attributes: { - description: ['other'], - }, - }, - Image: { - group: { - name: 'Visual Media', - iconConfig: { - class: 'fa fa-camera-retro', - }, - }, - attributes: { - datatype: ['Image'], - }, - iconConfig: { - class: 'fa fa-picture-o', - }, - }, - 'Moving Image': { - group: { - name: 'Visual Media', - iconConfig: { - class: 'fa fa-camera-retro', - }, - }, - attributes: { - datatype: ['Moving Image'], - }, - iconConfig: { - class: 'fa fa-film', - }, - }, - 'Still Image': { - group: { - name: 'Visual Media', - iconConfig: { - class: 'fa fa-camera-retro', - }, - }, - attributes: { - datatype: ['Still Image'], - }, - iconConfig: { - class: 'fa fa-camera-retro', - }, - }, - }) - }) - - it('should sort values appropriately, according to the key order in the json config, and alphabetically otherwise', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - } - const resolvedConfiguration = getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) - const sortedValues = generateSortedValues({ - dataTypesConfiguration: resolvedConfiguration, - }) - expect(sortedValues).to.deep.equal([ - { - label: 'Object', - value: 'Object', - }, - { - label: 'Equipment', - value: 'Equipment', - }, - { - label: 'Facility', - value: 'Facility', - }, - { - label: 'Group', - value: 'Group', - }, - { - label: 'Person', - value: 'Person', - }, - { - label: 'Platform', - value: 'Platform', - }, - { - label: 'Happenings', - value: 'Happenings', - }, - { - label: 'Civil', - value: 'Civil', - }, - { - label: 'Military', - value: 'Military', - }, - { - label: 'Natural', - value: 'Natural', - }, - { - label: 'Other', - value: 'Other', - }, - { - label: 'Political', - value: 'Political', - }, - { - label: 'Visual Media', - value: 'Visual Media', - }, - { - label: 'Image', - value: 'Image', - }, - { - label: 'Moving Image', - value: 'Moving Image', - }, - { - label: 'Still Image', - value: 'Still Image', - }, - ]) - }) - - it('should use generate groups to values appropriately', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - } - const resolvedConfiguration = getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) - const groupsToValues = generateGroupsToValues({ - dataTypesConfiguration: resolvedConfiguration, - }) - expect(groupsToValues).to.deep.equal({ - Object: ['Person', 'Group', 'Equipment', 'Platform', 'Facility'], - Happenings: ['Civil', 'Military', 'Political', 'Natural', 'Other'], - 'Visual Media': ['Image', 'Moving Image', 'Still Image'], - }) - }) - - it('should use generate known groups appropriately', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - } - const resolvedConfiguration = getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) - const knownGroups = generateKnownGroups({ - dataTypesConfiguration: resolvedConfiguration, - }) - expect(knownGroups).to.deep.equal(['Object', 'Happenings', 'Visual Media']) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.tsx deleted file mode 100644 index 34aae12ae2f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/reserved-basic-datatype/reserved.basic-datatype.tsx +++ /dev/null @@ -1,423 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' -import IconHelper from '../../js/IconHelper' -import TextField from '@mui/material/TextField' -import CheckBoxIcon from '@mui/icons-material/CheckBox' -import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank' -import IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox' - -import Chip from '@mui/material/Chip' -import Autocomplete from '@mui/material/Autocomplete' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { useMetacardDefinitions } from '../../js/model/Startup/metacard-definitions.hooks' -import { BasicDatatypeFilter } from '../filter-builder/filter.structure' - -import Swath from '../swath/swath' -import { - DataTypesConfiguration, - ReverseDataTypesConfiguration, -} from '../datatypes/datatypes' - -function getMatchTypeAttribute() { - return StartupDataStore.MetacardDefinitions.getAttributeMap()[ - StartupDataStore.Configuration.getBasicSearchMatchType() - ] - ? StartupDataStore.Configuration.getBasicSearchMatchType() - : 'datatype' -} - -/** - * If the configuration is empty, we generate a configuration based off the enum instead - */ -function getTypesMapping({ - Configuration, - MetacardDefinitions, -}: { - Configuration: ReturnType - MetacardDefinitions: ReturnType -}): DataTypesConfiguration { - const customTypesConfig = Configuration.getDataTypes() - if (Object.keys(customTypesConfig.groups).length > 0) { - return customTypesConfig - } - const matchTypeAttr = getMatchTypeAttribute() - const validTypes = MetacardDefinitions.getEnum(matchTypeAttr) - const defaultTypesMapping = validTypes.reduce( - (blob, value: any) => { - const iconClass = IconHelper.getClassByName(value) - blob.groups['Other'] = blob.groups['Other'] || {} - blob.groups['Other'].values = blob.groups['Other'].values || {} - - blob.groups['Other'].values[value] = { - attributes: { - datatype: [value], - 'metadata-content-type': [value], - }, - iconConfig: { - class: iconClass, - }, - } - return blob - }, - { - groups: {}, - } as ReturnType - ) - return defaultTypesMapping -} - -export function getDataTypesConfiguration({ - Configuration, - MetacardDefinitions, -}: { - Configuration: ReturnType - MetacardDefinitions: ReturnType -}): { - groupMap: DataTypesConfiguration - valueMap: ReverseDataTypesConfiguration -} { - const typesMapping = getTypesMapping({ Configuration, MetacardDefinitions }) - const reverseMapping = Object.entries(typesMapping.groups).reduce( - (blob, [groupName, groupInfo]) => { - Object.entries(groupInfo.values).forEach(([valueName, valueInfo]) => { - blob[valueName] = { - group: { - name: groupName, - iconConfig: groupInfo.iconConfig, - }, - ...valueInfo, - } - }) - return blob - }, - {} as ReverseDataTypesConfiguration - ) - - return { - groupMap: typesMapping, - valueMap: reverseMapping, - } -} - -function getGroupFromValue({ - dataTypesConfiguration, - value, - orderedGroups, -}: { - dataTypesConfiguration: ReturnType - value: string - orderedGroups: string[] -}) { - const groupName = dataTypesConfiguration.valueMap[value]?.group.name - return orderedGroups.includes(groupName) - ? groupName - : orderedGroups.includes(value) - ? value - : null -} - -export function generateSortedValues({ - dataTypesConfiguration, -}: { - dataTypesConfiguration: ReturnType -}) { - const orderedGroups = Object.keys(dataTypesConfiguration.groupMap.groups) - return Object.keys(dataTypesConfiguration.valueMap) - .concat(orderedGroups) - .sort((a, b) => { - const groupA = getGroupFromValue({ - dataTypesConfiguration, - value: a, - orderedGroups, - }) - const groupB = getGroupFromValue({ - dataTypesConfiguration, - value: b, - orderedGroups, - }) - - // Handle cases where one value has a group and the other doesn't (grouped comes first) - if (groupA && !groupB) return -1 - if (!groupA && groupB) return 1 - - // Sort by group if both values have different groups (group order matters) - if (groupA && groupB && groupA !== groupB) { - return orderedGroups.indexOf(groupA) - orderedGroups.indexOf(groupB) - } - - // If they are in the same group, sort by whether the value itself is the group (if it's the group, it comes first) - if (groupA === groupB) { - if (a === groupA) return -1 - if (b === groupB) return 1 - return a.localeCompare(b) // Sub-sort alphabetically if not the group itself - } - - // If no groups are involved, sort alphabetically - return a.localeCompare(b) - }) - .map((value) => { - return { - label: value, - value, - } - }) -} - -export function generateGroupsToValues({ - dataTypesConfiguration, -}: { - dataTypesConfiguration: ReturnType -}) { - return Object.keys(dataTypesConfiguration.groupMap.groups).reduce( - (groupsToValuesMapping, groupName) => { - groupsToValuesMapping[groupName] = Object.keys( - dataTypesConfiguration.groupMap.groups[groupName].values - ) - return groupsToValuesMapping - }, - {} as { [key: string]: string[] } - ) -} - -export function generateKnownGroups({ - dataTypesConfiguration, -}: { - dataTypesConfiguration: ReturnType -}) { - return Object.keys(dataTypesConfiguration.groupMap.groups) -} - -function useDataTypesConfiguration(): { - configuration: ReturnType - sortedValues: { label: string; value: string }[] - groupsToValues: { - [key: string]: string[] - } - knownGroups: string[] -} { - const Configuration = useConfiguration() - const MetacardDefinitions = useMetacardDefinitions() - - const dataTypesConfiguration = React.useMemo(() => { - return getDataTypesConfiguration({ Configuration, MetacardDefinitions }) - }, [Configuration.getDataTypes(), MetacardDefinitions]) - - const sortedValues = React.useMemo(() => { - return generateSortedValues({ dataTypesConfiguration }) - }, [dataTypesConfiguration]) - - const groupsToValues = React.useMemo(() => { - return generateGroupsToValues({ dataTypesConfiguration }) - }, [dataTypesConfiguration]) - - const knownGroups = React.useMemo(() => { - return generateKnownGroups({ dataTypesConfiguration }) - }, [dataTypesConfiguration]) - - return { - configuration: dataTypesConfiguration, - sortedValues, - groupsToValues, - knownGroups, - } -} - -function validateShape({ - value, - onChange, -}: { - value: BasicDatatypeFilter['value'] - onChange: (value: BasicDatatypeFilter['value']) => void -}) { - if (!hasValidShape({ value })) { - onChange([]) - } -} - -function hasValidShape({ - value, -}: { - value: BasicDatatypeFilter['value'] -}): boolean { - if (value === undefined || value === null || value.constructor !== Array) { - return false - } else { - return ( - value.find((subvalue) => { - return typeof subvalue !== 'string' - }) === undefined - ) - } -} - -function getIconForValue({ - value, - configuration, -}: { - value: string - configuration: ReturnType -}) { - return ( - configuration.valueMap[value]?.iconConfig?.class || - configuration.groupMap.groups[value]?.iconConfig?.class - ) -} - -export const ReservedBasicDatatype = ({ - value = [], - onChange, -}: { - value: BasicDatatypeFilter['value'] - onChange: (value: BasicDatatypeFilter['value']) => void -}) => { - const datatypesConfiguration = useDataTypesConfiguration() - React.useEffect(() => { - validateShape({ value, onChange }) - }, []) - - if (!hasValidShape({ value })) { - return null - } - return ( - option.label} - isOptionEqualToValue={(option, value) => option.value === value.value} - onChange={(_e, newValue) => { - // should technically only ever be one value, since we filter these out at the end - const includedGroup = newValue.find((val) => { - return datatypesConfiguration.knownGroups.includes(val.value) - })?.value - - // determine if we need to deselect or select all values in a group - if (includedGroup) { - // determine if everything in a group is selected - const groupValues = - datatypesConfiguration.groupsToValues[includedGroup] - const isGroupSelected = groupValues.every((val) => { - return value.includes(val) - }) - if (isGroupSelected) { - newValue = newValue.filter((val) => { - return !groupValues.includes(val.value) - }) - } else { - groupValues.forEach((val) => { - if (!newValue.find((value) => value.value === val)) { - newValue.push({ label: val, value: val }) - } - }) - } - } - - // remove any groups, as we don't actually want these in the value or we can't remove other chips in that category once it gets added - newValue = newValue.filter((val) => { - return !datatypesConfiguration.knownGroups.includes(val.value) - }) - onChange(newValue.map((val) => val.value)) - }} - size="small" - renderOption={(props, option) => { - const isGroup = datatypesConfiguration.knownGroups.includes( - option.value - ) - // determine if everything in a group is selected - const isGroupSelected = isGroup - ? datatypesConfiguration.groupsToValues[option.value].every((val) => { - return value.includes(val) - }) - : false - // determine if anything in a group is selected but not everything - const isGroupPartiallySelected = - isGroup && !isGroupSelected - ? datatypesConfiguration.groupsToValues[option.value].some( - (val) => { - return value.includes(val) - } - ) - : false - - const isSelected = props['aria-selected'] || isGroupSelected - - return ( -
  • - {isGroup ? <> : } -
    - {isGroup ? ( - isGroupSelected ? ( - - ) : isGroupPartiallySelected ? ( - - ) : ( - - ) - ) : isSelected ? ( - - ) : ( - - )} -
    -
    -
    {option.label}
    -
  • - ) - }} - renderTags={(tagValue, getTagProps) => - tagValue.map((option, index) => ( - -
    - {option.label} - - } - {...getTagProps({ index })} - /> - )) - } - value={value.map((val) => { - return { - label: val, - value: val, - } - })} - renderInput={(params) => } - /> - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/resizable-grid/resizable-grid.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/resizable-grid/resizable-grid.tsx deleted file mode 100644 index 92fac7acd99..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/resizable-grid/resizable-grid.tsx +++ /dev/null @@ -1,260 +0,0 @@ -import * as React from 'react' -import Grid from '@mui/material/Grid' -import { Resizable, ResizableProps } from 're-resizable' -import styled from 'styled-components' -import { createCtx } from '../../typescript/context' -import wreqr from '../../js/wreqr' -export const DEFAULT_AUTO_COLLAPSE_LENGTH = 300 -export const DEFAULT_STARTING_LENGTH = 550 -export const DEFAULT_COLLAPSED_LENGTH = 75 -type ResizableGridType = React.ComponentType< - React.PropsWithChildren< - ResizableProps & { - component: any - item: any - } - > -> -const ResizableGrid = Grid as ResizableGridType -export const [useResizableGridContext, UseResizableGridContextProvider] = - createCtx({ - closed: false, - }) -type useResizableGridType = { - length: number - closed: boolean - setClosed: React.Dispatch - setLength: React.Dispatch> - lastLength: number - setLastLength: React.Dispatch> - dragging: boolean - setDragging: React.Dispatch> -} -export const useResizableGrid = ({ - startingLength = DEFAULT_STARTING_LENGTH, - collapsedLength = DEFAULT_COLLAPSED_LENGTH, - autoCollapseLength = DEFAULT_AUTO_COLLAPSE_LENGTH, -}: { - startingLength?: number - collapsedLength?: number - autoCollapseLength?: number -} = {}): useResizableGridType => { - const [closed, setClosed] = React.useState(false) - const [length, setLength] = React.useState(startingLength) - const [lastLength, setLastLength] = React.useState(startingLength) - const [dragging, setDragging] = React.useState(false) - React.useEffect(() => { - if (!dragging) { - if (length < autoCollapseLength) { - setClosed(true) - setLength(collapsedLength) - } else { - setLastLength(length) - setClosed(false) - } - } - setTimeout(() => { - ;(wreqr as any).vent.trigger('gl-updateSize') - ;(wreqr as any).vent.trigger('resize') - }, 500) - }, [length, dragging]) - React.useEffect(() => { - if (closed && length !== collapsedLength) { - setLastLength(length) - setLength(collapsedLength) - } - }, [closed]) - return { - length, - closed, - setClosed, - setLength, - lastLength, - setLastLength, - dragging, - setDragging, - } -} -export const CustomResizableGrid = styled(ResizableGrid)` - .actions { - opacity: 0; - transform: translateX(-100%); - transition: opacity 0.2s ease-in-out 0.5s, transform 0.2s ease-in-out 0.5s; - } - > span > div:hover { - background: rgba(0, 0, 0, 0.1); - } - - :focus-within .actions, - :hover .actions { - opacity: 1; - transform: translateX(-50%); - transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out; - } - .actions > div + div { - margin-top: 10px; - } -` -type SplitPaneProps = { - firstStyle?: React.CSSProperties | undefined - secondStyle?: React.CSSProperties | undefined - variant: 'horizontal' | 'vertical' - children: [React.ReactNode, React.ReactNode] - collapsedLength?: number - autoCollapseLength?: number - startingLength?: number - controlled?: useResizableGridType // useful to have immediate access to closed without needing to split out components -} - -export const SplitPane = ({ - secondStyle, - variant, - children, - collapsedLength = DEFAULT_COLLAPSED_LENGTH, - autoCollapseLength = DEFAULT_AUTO_COLLAPSE_LENGTH, - startingLength = DEFAULT_STARTING_LENGTH, - controlled, -}: SplitPaneProps) => { - const { - length, - closed, - setClosed, - setLength, - lastLength, - setLastLength, - dragging, - setDragging, - } = - controlled || - useResizableGrid({ - startingLength, - collapsedLength, - autoCollapseLength, - }) - const [First, Second] = children - return ( - - { - switch (variant) { - case 'horizontal': - return 'row' - case 'vertical': - return 'column' - } - })()} - className="w-full h-full" - > - { - switch (variant) { - case 'horizontal': - return { - width: length, - height: '100%', - } - case 'vertical': - return { - width: '100%', - height: length, - } - } - })()} - minWidth={collapsedLength} - enable={(() => { - switch (variant) { - case 'horizontal': - return { - top: false, - right: true, - bottom: false, - left: false, - topRight: false, - bottomRight: false, - bottomLeft: false, - topLeft: false, - } - case 'vertical': - return { - top: false, - right: false, - bottom: true, - left: false, - topRight: false, - bottomRight: false, - bottomLeft: false, - topLeft: false, - } - } - })()} - style={{ - flexShrink: 0, - }} - onResizeStop={() => { - setDragging(false) - }} - onResizeStart={() => { - setDragging(true) - }} - onResize={(e) => { - switch (variant) { - case 'horizontal': - setLength( - (e as any).clientX - - (e.target as any).parentElement.getBoundingClientRect().x - ) - break - case 'vertical': - setLength( - (e as any).clientY - - (e.target as any).parentElement.getBoundingClientRect().y - ) - break - } - }} - className="z-10 pr-2" - > - {First} - - { - switch (variant) { - case 'horizontal': - return { - height: '100%', - width: `calc(100% - ${length}px)`, - flexShrink: 1, - ...secondStyle, - } - case 'vertical': - return { - height: `calc(100% - ${length}px)`, - width: '100%', - flexShrink: 1, - ...secondStyle, - } - } - })()} - > - {Second} - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-filter/result-filter.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-filter/result-filter.tsx deleted file mode 100644 index a1b9c6c7a27..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-filter/result-filter.tsx +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import FilterBranch from '../filter-builder/filter-branch' -import { - FilterBuilderClass, - FilterClass, -} from '../filter-builder/filter.structure' -import Button from '@mui/material/Button' -import Grid from '@mui/material/Grid' -import user from '../singletons/user-instance' -import { useListenToEnterKeySubmitEvent } from '../custom-events/enter-key-submit' - -const getResultFilter = () => { - return user.get('user').get('preferences').get('resultFilter') -} - -const getBaseFilter = () => { - const filter = getResultFilter() - if (filter === undefined) { - return new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'anyText', - value: '', - type: 'ILIKE', - }), - ], - negated: false, - }) - } else if (filter.filters === undefined) { - return new FilterBuilderClass({ - type: 'AND', - filters: [filter], - negated: false, - }) - } - return new FilterBuilderClass({ - ...filter, - }) -} - -const removeFilter = () => { - user.get('user').get('preferences').set('resultFilter', '') - user.get('user').get('preferences').savePreferences() -} - -const saveFilter = ({ filter }: any) => { - user.get('user').get('preferences').set('resultFilter', filter) - user.get('user').get('preferences').savePreferences() -} - -const ResultFilter = ({ closeDropdown }: { closeDropdown: () => void }) => { - const [filter, setFilter] = React.useState(getBaseFilter()) - const { setElement } = useListenToEnterKeySubmitEvent({ - callback: () => { - saveFilter({ filter }) - closeDropdown() - }, - }) - return ( - <> -
    - -
    - - - - - - - - - - ) -} - -export default hot(module)(ResultFilter) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/fuzzy-results.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/fuzzy-results.tsx deleted file mode 100644 index a91d494fb02..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/fuzzy-results.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { StartupDataStore } from '../../js/model/Startup/startup' - -export const fuzzyResultCount = (resultCount: number) => { - if (!StartupDataStore.Configuration.getIsFuzzyResultsEnabled()) { - return resultCount - } - - if (resultCount < 10) return '< 10' - else if (resultCount < 100) return '< 100' - else if (resultCount < 1000) return '< 1000' - else if (resultCount < 10000) return '< 10,000' - else if (resultCount < 100000) return '< 100,000' - else if (resultCount < 1000000) return '< 1,000,000' - else if (resultCount < 10000000) return '< 10,000,000' - else return '>= 10,000,000' -} - -export const fuzzyHits = (resultCount: number) => { - return `${fuzzyResultCount(resultCount)} hits` -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/paging.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/paging.tsx deleted file mode 100644 index 0af61039a0a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/paging.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import { useLazyResultsStatusFromSelectionInterface } from '../selection-interface/hooks' -import TableExport from '../table-export/table-export' -import { useDialogState } from '../../component/hooks/useDialogState' -import Divider from '@mui/material/Divider' -import { Dialog, DialogActions, DialogTitle } from '@mui/material' - -type Props = { - selectionInterface: any - onClose?: any - exportSuccessful?: boolean - setExportSuccessful?: () => void -} - -const determineIsOutdated = ({ selectionInterface }: Props) => { - const search = selectionInterface.get('currentQuery') - if (search) { - return search.get('isOutdated') as boolean - } - return false -} - -const Paging = ({ selectionInterface }: Props) => { - const { isSearching } = useLazyResultsStatusFromSelectionInterface({ - selectionInterface, - }) - const exportDialogState = useDialogState() - - const [exportSuccessful, setExportSuccessful] = React.useState(false) - - const [isOutdated, setIsOutdated] = React.useState( - determineIsOutdated({ selectionInterface }) - ) - const { listenTo, stopListening } = useBackbone() - React.useEffect(() => { - const search = selectionInterface.get('currentQuery') - if (search) { - listenTo(search, 'change:isOutdated', () => { - setIsOutdated(determineIsOutdated({ selectionInterface })) - }) - } - return () => { - if (search) { - stopListening(search) - } - } - }) - if ( - !selectionInterface.get('currentQuery') || - !selectionInterface.get('currentQuery').get('result') - ) { - return null - } - - const isPreviousDisabled = - isOutdated || - selectionInterface.get('currentQuery').hasPreviousServerPage() === false - const isNextDisabled = - isOutdated || - selectionInterface.get('currentQuery').hasNextServerPage() === false - return ( - <> - - - { - if (reason === 'backdropClick') { - return - } - exportDialogState.MuiDialogProps.onClose(event, reason) - }} - > - -
    - Export Results -
    -
    - - { - exportDialogState.handleClose() - }} - /> -
    - - {exportSuccessful && ( - - -
    - Export Successful! -
    -
    - - -
    - -
    -
    -
    - )} - - ) -} - -export default hot(module)(Paging) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/query-feed.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/query-feed.tsx deleted file mode 100644 index d148b8b094a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/query-feed.tsx +++ /dev/null @@ -1,320 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Paper from '@mui/material/Paper' -import moment from 'moment' -import styled from 'styled-components' -import Button from '@mui/material/Button' -import { Status } from '../../js/model/LazyQueryResult/status' -import { useLazyResultsStatusFromSelectionInterface } from '../selection-interface/hooks' -import Tooltip from '@mui/material/Tooltip' -import { Elevations } from '../theme/theme' -import FilterListIcon from '@mui/icons-material/FilterList' -import { fuzzyHits, fuzzyResultCount } from './fuzzy-results' -import WarningIcon from '@mui/icons-material/Warning' -import ErrorIcon from '@mui/icons-material/Error' -import { useMenuState } from '../menu-state/menu-state' -import Popover from '@mui/material/Popover' - -type Props = { - selectionInterface: any -} - -const Cell = styled.td` - padding: 20px; - border: solid 1px rgba(120, 120, 120, 0.2); -` - -const HeaderCell = styled.th` - padding: 20px; -` - -type CellValueProps = { - value: string | number - hasReturned: boolean - successful: boolean - message: string - warnings: string[] - errors: string[] - alwaysShowValue?: boolean -} - -const CellValue = (props: CellValueProps) => { - const { - value, - warnings = [], - errors = [], - message, - alwaysShowValue, - hasReturned, - successful, - } = props - return ( - - {(errors.length > 0 || !successful) && ( - - {(() => { - if (errors.length > 0) { - return errors.map((error) =>
    {error}
    ) - } else if (message) { - return message - } else { - return 'Something went wrong searching this source.' - } - })()} - - } - > - -
    - )} - {warnings.length > 0 && ( - - {warnings.map((warning) => ( -
    {warning}
    - ))} - - } - > - -
    - )} - {alwaysShowValue || (!message && hasReturned) ? value : null} - {!hasReturned && !alwaysShowValue && ( - - )} -
    - ) -} - -const QueryStatusRow = ({ status, query }: { status: Status; query: any }) => { - let hasReturned = status.hasReturned - let successful = status.successful - let message = status.message - - let warnings = status.warnings - let errors = status.errors - let id = status.id - - return ( - - - - - - - - - - - - - - - - - - - - ) -} - -const QueryStatus = ({ - statusBySource, - query, -}: { - statusBySource: Status[] - query: any -}) => { - return ( - - - Source - - Available - - - Possible - - - Time (s) - - - Filter - - - - {statusBySource.map((status) => { - return ( - - ) - })} - -
    - ) -} - -const LastRan = ({ currentAsOf }: { currentAsOf: number }) => { - const [howLongAgo, setHowLongAgo] = React.useState( - moment(currentAsOf).fromNow() - ) - React.useEffect(() => { - setHowLongAgo(moment(currentAsOf).fromNow()) - const intervalId = setInterval(() => { - setHowLongAgo(moment(currentAsOf).fromNow()) - }, 60000) - return () => { - clearInterval(intervalId) - } - }, [currentAsOf]) - return
    Current as of {howLongAgo}
    -} - -const QueryFeed = ({ selectionInterface }: Props) => { - const { MuiButtonProps, MuiPopoverProps } = useMenuState() - const { status, currentAsOf, isSearching } = - useLazyResultsStatusFromSelectionInterface({ - selectionInterface, - }) - - const statusBySource = Object.values(status) - let resultMessage = '', - pending = false, - failed = false, - warnings = false, - errors = false - if (statusBySource.length === 0) { - resultMessage = 'Has not been run' - } else { - const sourcesThatHaveReturned = statusBySource.filter( - (status) => status.hasReturned - ) - - if (sourcesThatHaveReturned.length > 0) { - const results = statusBySource.filter((status) => status.hasReturned) - - let available = 0 - let possible = 0 - - results.forEach((result) => { - available += result?.count ?? 0 - possible += result?.hits ?? 0 - }) - - resultMessage = `${available} hit${ - available === 1 ? '' : 's' - } out of ${fuzzyResultCount(possible)} possible` - } else { - resultMessage = 'Searching...' - } - - failed = sourcesThatHaveReturned.some((status) => !status.successful) - warnings = sourcesThatHaveReturned.some( - (status) => status.warnings && status.warnings.length > 0 - ) - errors = sourcesThatHaveReturned.some((status) => { - return status.errors && status.errors.length > 0 - }) - pending = isSearching - } - - return ( - <> -
    -
    -
    - {resultMessage} -
    - -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    - - ) -} - -export default hot(module)(QueryFeed) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/result-selector.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/result-selector.tsx deleted file mode 100644 index 443a4f09a85..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/result-selector/result-selector.tsx +++ /dev/null @@ -1,244 +0,0 @@ -import * as React from 'react' -import Spellcheck from '../spellcheck/spellcheck' -import Grid from '@mui/material/Grid' -import { hot } from 'react-hot-loader' -import QueryFeed from './query-feed' -import LinearProgress from '@mui/material/LinearProgress' -import Paging from './paging' -import Paper from '@mui/material/Paper' -import Button from '@mui/material/Button' -import FilterListIcon from '@mui/icons-material/FilterList' -import ResultFilter from '../result-filter/result-filter' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import EphemeralSearchSort from '../../react-component/query-sort-selection/ephemeral-search-sort' -import { - useLazyResultsStatusFromSelectionInterface, - useLazyResultsSelectedResultsFromSelectionInterface, -} from '../selection-interface/hooks' - -import VisualizationSelector from '../../react-component/visualization-selector/visualization-selector' -import LayoutDropdownIcon from '@mui/icons-material/ViewComfy' -import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward' -import user from '../singletons/user-instance' -import MoreIcon from '@mui/icons-material/MoreVert' - -import LazyMetacardInteractions from '../visualization/results-visual/lazy-metacard-interactions' -import { Elevations } from '../theme/theme' -import SelectionRipple from '../golden-layout/selection-ripple' -import { ResultType } from '../../js/model/Types' -import Extensions from '../../extension-points' -import { useMenuState } from '../menu-state/menu-state' -import Popover from '@mui/material/Popover' -import Badge from '@mui/material/Badge' - -const SelectedResults = ({ selectionInterface }: any) => { - const selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResultsArray = Object.values(selectedResults) - const { MuiButtonProps, MuiPopoverProps, handleClose } = useMenuState() - - return ( - <> - - - - - - - - ) -} - -const determineResultFilterSize = () => { - const resultFilters = user.get('user').get('preferences').get('resultFilter') - if (!resultFilters || !resultFilters.filters) { - return 0 - } - return resultFilters.filters.length -} - -const determineResultSortSize = () => { - const resultSorts = user.get('user').get('preferences').get('resultSort') - if (!resultSorts) { - return 0 - } - return resultSorts.length -} - -type Props = { - selectionInterface: any - model: any - goldenLayout: any - layoutResult?: ResultType - editLayoutRef?: any -} - -const ResultSelector = ({ - selectionInterface, - model, - goldenLayout, - layoutResult, - editLayoutRef, -}: Props) => { - const { isSearching } = useLazyResultsStatusFromSelectionInterface({ - selectionInterface, - }) - const [resultFilterSize, setResultFilterSize] = React.useState( - determineResultFilterSize() - ) - const [resultSortSize, setResultSortSize] = React.useState( - determineResultSortSize() - ) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(user.get('user').get('preferences'), 'change:resultFilter', () => { - setResultFilterSize(determineResultFilterSize()) - }) - listenTo(user.get('user').get('preferences'), 'change:resultSort', () => { - setResultSortSize(determineResultSortSize()) - }) - }, []) - const LayoutDropdown = Extensions.layoutDropdown({ - goldenLayout, - layoutResult, - editLayoutRef, - }) - const resultFilterMenuState = useMenuState() - const resultSortMenuState = useMenuState() - const layoutMenuState = useMenuState() - return ( - - - {isSearching ? ( - - ) : null} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {LayoutDropdown || ( - - )} - - - - - - ) -} - -export default hot(module)(ResultSelector) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-checkbox/useBackbone.hook.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-checkbox/useBackbone.hook.tsx deleted file mode 100644 index 2d278e9ac0d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-checkbox/useBackbone.hook.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import Backbone from 'backbone' -import * as React from 'react' - -export type WithBackboneProps = { - listenTo: (object: any, events: string, callback: Function) => any - stopListening: ( - object?: any, - events?: string | undefined, - callback?: Function | undefined - ) => any - listenToOnce: (object: any, events: string, callback: Function) => any -} - -export function useBackbone(): WithBackboneProps { - const backboneModel = new Backbone.Model({}) - React.useEffect(() => { - return () => { - backboneModel.stopListening() - backboneModel.destroy() - } - }, []) - return { - listenTo: backboneModel.listenTo.bind(backboneModel), - stopListening: backboneModel.stopListening.bind(backboneModel), - listenToOnce: backboneModel.listenToOnce.bind(backboneModel), - } -} - -/** - * This is the most common use case. You start listening at the first lifecycle (render), and stop listening at the last lifecycle (destruction). - * If the paremeters ever change, we unlisten to the old case and relisten with the new parameters (object, events, callback). - * - * For more complex uses, it's better to use useBackbone which gives you more control. - * @param parameters - */ -export function useListenTo( - ...parameters: Parameters -) { - const { listenTo, stopListening } = useBackbone() - React.useEffect(() => { - if (parameters[0]) { - listenTo.apply(undefined, parameters) - } - return () => { - if (parameters[0]) { - stopListening.apply(undefined, parameters) - } - } - }, [parameters]) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-interface/hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-interface/hooks.tsx deleted file mode 100644 index 614388bc0a0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-interface/hooks.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import * as React from 'react' -import { useBackbone } from '../selection-checkbox/useBackbone.hook' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { LazyQueryResults } from '../../js/model/LazyQueryResult/LazyQueryResults' -import { - useStatusOfLazyResults, - useSelectedResults, - useFilterTreeOfLazyResults, -} from '../../js/model/LazyQueryResult/hooks' - -type useLazyResultsProps = { - selectionInterface: any -} - -export type LazyResultsType = { - [key: string]: LazyQueryResult -} - -const getLazyResultsFromSelectionInterface = ({ - selectionInterface, -}: useLazyResultsProps) => { - const currentSearch = selectionInterface.get('currentQuery') - if (!currentSearch) { - return new LazyQueryResults() - } - const result = currentSearch.get('result') - if (!result) { - return new LazyQueryResults() - } - return result.get('lazyResults') as LazyQueryResults -} - -export const useLazyResultsSelectedResultsFromSelectionInterface = ({ - selectionInterface, -}: useLazyResultsProps) => { - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResults = useSelectedResults({ lazyResults }) - - return selectedResults -} - -export const useLazyResultsStatusFromSelectionInterface = ({ - selectionInterface, -}: useLazyResultsProps) => { - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const status = useStatusOfLazyResults({ lazyResults }) - - return status -} - -export const useLazyResultsFilterTreeFromSelectionInterface = ({ - selectionInterface, -}: useLazyResultsProps) => { - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const filterTree = useFilterTreeOfLazyResults({ lazyResults }) - - return filterTree -} - -export const useLazyResultsFromSelectionInterface = ({ - selectionInterface, -}: useLazyResultsProps) => { - const { listenToOnce, stopListening } = useBackbone() - - // @ts-expect-error ts-migrate(6133) FIXME: 'forceRender' is declared but its value is never r... Remove this comment to see the full error message - const [forceRender, setForceRender] = React.useState(Math.random()) - const [lazyResults, setLazyResults] = React.useState( - getLazyResultsFromSelectionInterface({ - selectionInterface, - }) - ) - - React.useEffect(() => { - const unsubscribe = lazyResults.subscribeTo({ - subscribableThing: 'filteredResults', - callback: () => { - setForceRender(Math.random()) - }, - }) - return () => { - unsubscribe() - } - }, [lazyResults]) - React.useEffect(() => { - setLazyResults(getLazyResultsFromSelectionInterface({ selectionInterface })) - listenToOnce(selectionInterface, 'change:currentQuery>result', () => { - const currentQuery = selectionInterface.get('currentQuery') - const result = currentQuery.get('result') - if (result) { - setLazyResults( - getLazyResultsFromSelectionInterface({ selectionInterface }) - ) - } - }) - return () => { - stopListening(selectionInterface) - } - }, [selectionInterface]) - return lazyResults -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-interface/selection-interface.model.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-interface/selection-interface.model.ts deleted file mode 100644 index 632e40df575..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/selection-interface/selection-interface.model.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import _ from 'underscore' - -import Backbone from 'backbone' -import Metacard from '../../js/model/Metacard' -import QueryModel from '../../js/model/Query' -import QueryResponse from '../../js/model/QueryResponse' -import QueryResult from '../../js/model/QueryResult' - -export default Backbone.AssociatedModel.extend({ - relations: [ - { - type: Backbone.One, - key: 'currentQuery', - relatedModel: QueryModel, - }, - { - type: Backbone.One, - key: 'currentMetacard', - relatedModel: QueryResponse, - }, - { - type: Backbone.Many, - key: 'selectedResults', - relatedModel: Metacard, - }, - { - type: Backbone.Many, - key: 'activeSearchResults', - relatedModel: QueryResult, - }, - { - type: Backbone.Many, - key: 'completeActiveSearchResults', - relatedModel: QueryResult, - }, - ], - defaults: { - currentQuery: undefined, - currentMetacard: undefined, - selectedResults: [], - activeSearchResults: [], - activeSearchResultsAttributes: [], - }, - initialize() { - this.set('currentResult', new QueryResponse()) - this.listenTo(this, 'change:currentMetacard', this.handleUpdate) - this.listenTo(this, 'change:currentMetacard', this.handleCurrentMetacard) - this.listenTo(this, 'change:currentResult', this.handleResultChange) - this.listenTo( - this.get('activeSearchResults'), - 'update add remove reset', - this.updateActiveSearchResultsAttributes - ) - }, - handleResultChange() { - this.listenTo( - this.get('currentResult'), - 'sync reset:results', - this.handleResults - ) - }, - handleResults() { - this.set( - 'currentMetacard', - this.get('currentResult').get('results').first() - ) - }, - updateActiveSearchResultsAttributes() { - const availableAttributes = this.get('activeSearchResults') - .reduce((currentAvailable: any, result: any) => { - currentAvailable = _.union( - currentAvailable, - Object.keys(result.get('metacard').get('properties').toJSON()) - ) - return currentAvailable - }, []) - .sort() - this.set('activeSearchResultsAttributes', availableAttributes) - }, - getActiveSearchResultsAttributes() { - return this.get('activeSearchResultsAttributes') - }, - handleUpdate() { - this.clearSelectedResults() - this.setActiveSearchResults(this.get('currentResult').get('results')) - this.addSelectedResult(this.get('currentMetacard')) - }, - handleCurrentMetacard() { - if (this.get('currentMetacard') !== undefined) { - this.get('currentQuery').cancelCurrentSearches() - } - }, - getActiveSearchResults() { - return this.get('activeSearchResults') - }, - setActiveSearchResults(results: any) { - this.get('activeSearchResults').reset(results.models || results) - }, - addToActiveSearchResults(results: any) { - this.get('activeSearchResults').add(results.models || results) - }, - setSelectedResults(results: any) { - this.get('selectedResults').reset(results.models || results) - }, - getSelectedResults() { - return this.get('selectedResults') - }, - clearSelectedResults() { - this.getSelectedResults().reset() - }, - addSelectedResult(metacard: any) { - this.getSelectedResults().add(metacard) - }, - removeSelectedResult(metacard: any) { - this.getSelectedResults().remove(metacard) - }, - setCurrentQuery(query: any) { - this.set('currentQuery', query) - }, - getCurrentQuery() { - return this.get('currentQuery') - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/TypedUser.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/TypedUser.tsx deleted file mode 100644 index c4062367d03..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/TypedUser.tsx +++ /dev/null @@ -1,225 +0,0 @@ -import React from 'react' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { SortType } from '../../js/model/Query.shared-types' -import { FilterBuilderClass } from '../filter-builder/filter.structure' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import moment from 'moment' - -import userInstance from './user-instance' -import { StartupDataStore } from '../../js/model/Startup/startup' - -export const TypedUserInstance = { - getUserInstance: () => { - return userInstance - }, - getResultsAttributesSummaryShown: (): string[] => { - const config = StartupDataStore.Configuration - const required = config.getRequiredExportAttributes() - - const userchoices = userInstance - .get('user') - .get('preferences') - .get('inspector-summaryShown') - if (userchoices.length > 0) { - return [...new Set([...userchoices, ...required])] - } - - const summary = config.getSummaryShow() - if (summary.length > 0 || required.length > 0) { - return [...new Set([...summary, ...required])] - } - - return ['title', 'created', 'thumbnail'] - }, - getResultsAttributesShownList: (): string[] => { - const userchoices = userInstance - .get('user') - .get('preferences') - .get('results-attributesShownList') - if (userchoices.length > 0) { - return userchoices - } - if (StartupDataStore.Configuration.getResultShow().length > 0) { - return StartupDataStore.Configuration.getResultShow() - } - return ['title', 'thumbnail'] - }, - getResultsAttributesShownTable: (): string[] => { - const userchoices = userInstance - .get('user') - .get('preferences') - .get('results-attributesShownTable') - if (userchoices.length > 0) { - return userchoices - } - if (StartupDataStore.Configuration.getDefaultTableColumns().length > 0) { - return StartupDataStore.Configuration.getDefaultTableColumns() - } - return ['title', 'thumbnail'] - }, - // basically, what could be shown that currently isn't - getResultsAttributesPossibleSummaryShown: (): string[] => { - const currentAttributesShown = - TypedUserInstance.getResultsAttributesSummaryShown() - const allKnownAttributes = - StartupDataStore.MetacardDefinitions.getSortedAttributes() - const searchOnlyAttributes = - StartupDataStore.MetacardDefinitions.getSearchOnlyAttributes() - const attributesPossible = allKnownAttributes.filter((attr) => { - return ( - !currentAttributesShown.includes(attr.id) && - !searchOnlyAttributes.includes(attr.id) && - !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attr.id) - ) - }) - return attributesPossible.map((attr) => attr.id) - }, - getResultsAttributesPossibleTable: ( - currentAttributes?: string[] - ): string[] => { - const currentAttributesShown = - currentAttributes ?? TypedUserInstance.getResultsAttributesShownTable() - const allKnownAttributes = - StartupDataStore.MetacardDefinitions.getSortedAttributes() - const searchOnlyAttributes = - StartupDataStore.MetacardDefinitions.getSearchOnlyAttributes() - const attributesPossible = allKnownAttributes.filter((attr) => { - return ( - !currentAttributesShown.includes(attr.id) && - !searchOnlyAttributes.includes(attr.id) && - !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attr.id) - ) - }) - return attributesPossible.map((attr) => attr.id) - }, - // basically, what could be shown that currently isn't - getResultsAttributesPossibleList: ( - currentAttributes?: string[] - ): string[] => { - const currentAttributesShown = - currentAttributes ?? TypedUserInstance.getResultsAttributesShownList() - const allKnownAttributes = - StartupDataStore.MetacardDefinitions.getSortedAttributes() - const searchOnlyAttributes = - StartupDataStore.MetacardDefinitions.getSearchOnlyAttributes() - const attributesPossible = allKnownAttributes.filter((attr) => { - return ( - !currentAttributesShown.includes(attr.id) && - !searchOnlyAttributes.includes(attr.id) && - !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attr.id) - ) - }) - return attributesPossible.map((attr) => attr.id) - }, - getQuerySettingsJSON: (): QuerySettingsType => { - return TypedUserInstance.getQuerySettingsModel().toJSON() - }, - getQuerySettingsModel: (): QuerySettingsModelType => { - return userInstance.getQuerySettings() - }, - updateQuerySettings: (newSettings: Partial): void => { - const currentSettings = TypedUserInstance.getQuerySettingsModel() - currentSettings.set(newSettings) - userInstance.savePreferences() - }, - getCoordinateFormat: (): string => { - let coordFormat = userInstance - .get('user') - ?.get('preferences') - ?.get('coordinateFormat') - - if (!coordFormat) { - const defaultCoordFormat = userInstance - .get('user') - ?.defaults() - ?.preferences?.get('coordinateFormat') - coordFormat = defaultCoordFormat ?? 'degrees' - } - - return coordFormat - }, - getEphemeralSorts(): undefined | SortType[] { - return userInstance.get('user').get('preferences').get('resultSort') - }, - getEphemeralFilter(): undefined | FilterBuilderClass { - return userInstance.get('user').get('preferences').get('resultFilter') - }, - removeEphemeralFilter() { - userInstance.get('user').get('preferences').set('resultFilter', undefined) - TypedUserInstance.savePreferences() - }, - removeEphemeralSorts() { - userInstance.get('user').get('preferences').set('resultSort', undefined) - TypedUserInstance.savePreferences() - }, - getPreferences(): Backbone.Model & { - needsUpdate: (update: any) => boolean - } { - return userInstance.get('user').get('preferences') - }, - savePreferences() { - userInstance.get('user').get('preferences').savePreferences() - }, - canWrite: (result: LazyQueryResult): boolean => { - return userInstance.canWrite(result.plain.metacard.properties) - }, - isAdmin: (result: LazyQueryResult): boolean => { - return userInstance.canShare(result.plain.metacard.properties) - }, - getResultCount: (): number => { - return userInstance.get('user').get('preferences').get('resultCount') - }, - getUserReadableDateTime: (val: any): string => { - return userInstance.getUserReadableDateTime(val) - }, - getMapHome: () => { - return TypedUserInstance.getPreferences().get('mapHome') - }, - getDecimalPrecision: () => { - return TypedUserInstance.getPreferences().get('decimalPrecision') - }, - getMomentDate(date: string) { - return `${moment(date).fromNow()} : ${userInstance.getUserReadableDateTime( - date - )}` - }, - getMapLayers: (): Backbone.Collection => { - const mapLayers = TypedUserInstance.getPreferences().get('mapLayers') - return mapLayers - }, - needsUpdate(upToDatePrefs: any) { - return this.getPreferences().needsUpdate(upToDatePrefs) - }, - sync(upToDatePrefs: any) { - if (this.needsUpdate(upToDatePrefs)) { - this.getPreferences().set(upToDatePrefs) - } - }, -} - -export const useEphemeralFilter = () => { - const [ephemeralFilter, setEphemeralFilter] = React.useState( - TypedUserInstance.getEphemeralFilter() - ) - useListenTo(TypedUserInstance.getPreferences(), 'change:resultFilter', () => { - setEphemeralFilter(TypedUserInstance.getEphemeralFilter()) - }) - return ephemeralFilter -} - -type QuerySettingsType = { - type: string - sources: string[] - federation: 'selected' | 'enterprise' - sorts: { attribute: string; direction: 'descending' | 'ascending' }[] - template: string - spellcheck: boolean - phonetics: boolean - additionalOptions?: string -} - -type QuerySettingsModelType = { - get: (attr: string) => any - set: (attr: any, value?: any) => void - toJSON: () => QuerySettingsType -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/drawing.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/drawing.tsx deleted file mode 100644 index b74098135f5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/drawing.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { useRender } from '../hooks/useRender' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import Backbone from 'backbone' -import wreqr from '../../js/wreqr' -import $ from 'jquery' -type DrawingType = Backbone.Model & { - turnOnDrawing: (model: Backbone.Model) => void - turnOffDrawing: () => void - isFuzzyDrawing: () => boolean - isDrawing: () => boolean - getDrawModel: () => Backbone.Model -} -let lastDrawing = 0 -const DEBOUNCE = 250 -export const Drawing = new (Backbone.Model.extend({ - defaults: { - drawing: false, - drawingModel: undefined, - }, - initialize() { - this.listenTo((wreqr as any).vent, 'search:drawline', this.turnOnDrawing) - this.listenTo((wreqr as any).vent, 'search:drawcircle', this.turnOnDrawing) - this.listenTo((wreqr as any).vent, 'search:drawpoly', this.turnOnDrawing) - this.listenTo((wreqr as any).vent, 'search:drawbbox', this.turnOnDrawing) - this.listenTo((wreqr as any).vent, 'search:drawcancel', this.turnOffDrawing) - this.listenTo((wreqr as any).vent, 'search:drawend', this.turnOffDrawing) - }, - turnOnDrawing(model: Backbone.Model) { - this.set('drawing', true) - this.set('drawingModel', model) - $('html').toggleClass('is-drawing', true) - }, - turnOffDrawing() { - lastDrawing = Date.now() - this.set('drawing', false) - $('html').toggleClass('is-drawing', false) - }, - timeSinceLastDrawing() { - return Date.now() - lastDrawing - }, - getDrawModel() { - return this.get('drawingModel') - }, - isFuzzyDrawing() { - return this.isDrawing() || this.timeSinceLastDrawing() < DEBOUNCE - }, - isDrawing() { - return this.get('drawing') - }, -}))() as DrawingType -export const useIsDrawing = () => { - const render = useRender() - useListenTo(Drawing, 'change:drawing', render) - return Drawing.isDrawing() -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/feature-detection.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/feature-detection.ts deleted file mode 100644 index 38a0ef899b9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/feature-detection.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -//meant to be used for just in time feature detection - -import Backbone from 'backbone' - -export default new (Backbone.Model.extend({ - defaults: { - cesium: true, - localStorage: true, - }, - supportsFeature(feature: any) { - return this.get(feature) - }, - addFailure(feature: any) { - this.set(feature, false) - }, -}))() diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/overwrites-instance.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/overwrites-instance.ts deleted file mode 100644 index 9c00ecac554..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/overwrites-instance.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import OverwriteModel from '../../js/model/Overwrite' -import Backbone from 'backbone' - -export default new (Backbone.Collection.extend({ - model: OverwriteModel, - removeIfUnused(id: any) { - if (!this.get(id).get('sending')) { - this.remove(id) - } - }, -}))() diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/session-auto-renew.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/session-auto-renew.ts deleted file mode 100644 index 8cdc8a84c11..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/session-auto-renew.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -//meant to be used for just in time feature detection - -import Backbone from 'backbone' -import fetch from '../../react-component/utils/fetch' - -const sessionExpiryUrl = './internal/session/expiry' - -const sessionAutoRenewModel = new (Backbone.Model.extend({ - defaults: { - sessionRenewDate: undefined, - }, - initialize() { - this.initializeSessionRenewDate() - this.listenTo(this, 'change:sessionRenewDate', this.handleSessionRenewDate) - }, - initializeSessionRenewDate() { - fetch(sessionExpiryUrl) - .then((response) => response.json()) - .then(this.handleExpiryTimeResponse.bind(this)) - .catch(() => { - console.warn('what do we do on failure') - }) - }, - handleExpiryTimeResponse(response: any) { - const msUntilTimeout = parseInt(response) - const msUntilAutoRenew = Math.max( - msUntilTimeout * 0.7, - msUntilTimeout - 60000 - ) // 70% or at least one minute before - this.set('sessionRenewDate', Date.now() + msUntilAutoRenew) - }, - handleSessionRenewDate() { - this.clearSessionRenewTimer() - this.setSessionRenewTimer() - }, - setSessionRenewTimer() { - this.sessionRenewTimer = setTimeout( - this.renewSession.bind(this), - this.get('sessionRenewDate') - Date.now() - ) - }, - clearSessionRenewTimer() { - clearTimeout(this.sessionRenewTimer) - }, - renewSession() { - fetch(sessionExpiryUrl) - .then((response) => response.json()) - .then(this.handleExpiryTimeResponse.bind(this)) - .catch(() => { - console.warn('what do we do on a failure') - }) - }, -}))() - -export default sessionAutoRenewModel diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/session-timeout.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/session-timeout.ts deleted file mode 100644 index 1fcc3abb980..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/session-timeout.ts +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -//meant to be used for just in time feature detection -import Backbone from 'backbone' -import $ from 'jquery' -import _ from 'underscore' -import fetch from '../../react-component/utils/fetch' -import featureDetection from './feature-detection' -import { StartupDataStore } from '../../js/model/Startup/startup' -const invalidateUrl = './internal/session/invalidate?service=' -const idleNoticeDuration = 60000 -// Length of inactivity that will trigger user timeout (15 minutes in ms by default) -// See STIG V-69243 -const idleTimeoutThreshold = - StartupDataStore.Configuration.getPlatformUITimeout() > 0 - ? StartupDataStore.Configuration.getPlatformUITimeout() * 60000 - : 900000 -function getIdleTimeoutDate() { - return idleTimeoutThreshold + Date.now() -} -const sessionTimeoutModel = new (Backbone.Model.extend({ - defaults: { - showPrompt: false, - idleTimeoutDate: 0, - }, - initialize() { - $(window).on('storage', this.handleLocalStorageChange.bind(this)) - this.listenTo(this, 'change:idleTimeoutDate', this.handleIdleTimeoutDate) - this.listenTo(this, 'change:showPrompt', this.handleShowPrompt) - this.resetIdleTimeoutDate() - this.handleShowPrompt() - }, - handleLocalStorageChange() { - this.set( - 'idleTimeoutDate', - parseInt(localStorage.getItem('idleTimeoutDate') as any) - ) - this.hidePrompt() - }, - handleIdleTimeoutDate() { - this.clearPromptTimer() - this.setPromptTimer() - this.clearLogoutTimer() - this.setLogoutTimer() - }, - handleShowPrompt() { - if (this.get('showPrompt')) { - this.stopListeningForUserActivity() - } else { - this.startListeningForUserActivity() - } - }, - setPromptTimer() { - let timeout = this.get('idleTimeoutDate') - idleNoticeDuration - Date.now() - timeout = Math.max(0, timeout) - this.promptTimer = setTimeout(this.showPrompt.bind(this), timeout) - }, - showPrompt() { - this.set('showPrompt', true) - }, - hidePrompt() { - this.set('showPrompt', false) - }, - clearPromptTimer() { - clearTimeout(this.promptTimer) - }, - setLogoutTimer() { - let timeout = this.get('idleTimeoutDate') - Date.now() - timeout = Math.max(0, timeout) - this.logoutTimer = setTimeout(this.logout.bind(this), timeout) - }, - clearLogoutTimer() { - clearTimeout(this.logoutTimer) - }, - resetIdleTimeoutDate() { - const idleTimeoutDate = getIdleTimeoutDate() - if (featureDetection.supportsFeature('localStorage')) { - try { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number' is not assignable to par... Remove this comment to see the full error message - localStorage.setItem('idleTimeoutDate', idleTimeoutDate) - } catch (e) { - featureDetection.addFailure('localStorage') - } - } - this.set('idleTimeoutDate', idleTimeoutDate) - }, - startListeningForUserActivity() { - $(document).on( - 'keydown.sessionTimeout mousedown.sessionTimeout', - _.throttle(this.resetIdleTimeoutDate.bind(this), 5000) - ) - }, - stopListeningForUserActivity() { - $(document).off('keydown.sessionTimeout mousedown.sessionTimeout') - }, - logout() { - if (window.onbeforeunload != null) { - window.onbeforeunload = null - } - fetch(invalidateUrl + window.location.href, { - redirect: 'manual', - }).finally(() => { - window.location.reload() - }) - }, - renew() { - this.hidePrompt() - this.resetIdleTimeoutDate() - }, - getIdleSeconds() { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number' is not assignable to par... Remove this comment to see the full error message - return parseInt((this.get('idleTimeoutDate') - Date.now()) / 1000) - }, -}))() -export default sessionTimeoutModel diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/user-instance.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/user-instance.ts deleted file mode 100644 index d0045858213..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/user-instance.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import User from '../../js/model/User' -import { StartupDataStore } from '../../js/model/Startup/startup' -export default new (User as any).Response({ user: StartupDataStore.data?.user }) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/user-notifications.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/user-notifications.ts deleted file mode 100644 index 008d0be24d6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/singletons/user-notifications.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import fetch from '../../react-component/utils/fetch' - -import user from './user-instance' -import Backbone from 'backbone' - -export default new (Backbone.Collection.extend({ - initialize() { - const uploads = user.get('user').get('preferences').get('uploads') - const alerts = user.get('user').get('preferences').get('alerts') - this.add(uploads.models) - this.add(alerts.models) - this.listenTo(uploads, 'add', this.add) - this.listenTo(uploads, 'remove', this.remove) - this.listenTo(alerts, 'add', this.add) - this.listenTo(alerts, 'remove', this.remove) - }, - comparator(model: any) { - return -model.getTimeComparator() - }, - hasUnseen() { - return this.some((notification: any) => notification.get('unseen')) - }, - setSeen() { - const setSeen: any = [] - this.forEach((notification: any) => { - notification.set('unseen', false) - if (notification.get('queryId')) { - setSeen.push(notification) - } - }) - if (setSeen.length === 0) { - return - } - fetch('./internal/user/notifications', { - method: 'put', - body: JSON.stringify({ alerts: setSeen }), - headers: { - 'Content-Type': 'application/json', - }, - }) - }, -}))() diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/snack/commonProps.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/snack/commonProps.tsx deleted file mode 100644 index e9e68181d92..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/snack/commonProps.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { SnackProps } from './snack.provider' - -export const CLOSEABLE_ERROR = { - status: 'error', - closeable: true, - timeout: 10000, -} as SnackProps - -export const CLOSEABLE_WARNING = { - status: 'warning', - closeable: true, - timeout: 10000, -} as SnackProps diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/snack/snack.provider.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/snack/snack.provider.tsx deleted file mode 100644 index ea6e72dbf88..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/snack/snack.provider.tsx +++ /dev/null @@ -1,153 +0,0 @@ -import React, { createContext, useState, useEffect, useMemo } from 'react' -import Button from '@mui/material/Button' -import SnackBar, { SnackbarProps } from '@mui/material/Snackbar' -import Alert, { AlertProps } from '@mui/material/Alert' -import IconButton from '@mui/material/IconButton' -import CloseIcon from '@mui/icons-material/Close' -import Portal from '@mui/material/Portal' - -export type AddSnack = (message: string, props?: SnackProps) => () => void - -type Snack = { - message?: string -} & SnackProps - -export type SnackProps = { - id?: string - status?: AlertProps['severity'] - closeable?: boolean - clickawayCloseable?: boolean - timeout?: number - undo?: () => void - snackBarProps?: SnackbarProps - alertProps?: AlertProps -} - -const AUTO_DISMISS = 5000 - -// Gives the addSnack function the correct type signature -export const SnackBarContext = createContext({} as AddSnack) - -export function SnackProvider({ children }: any) { - const [snacks, setSnacks] = useState([] as Snack[]) - const [currentSnack, setCurrentSnack] = useState({} as Snack) - - const addSnack: AddSnack = (message, props = {}) => { - const newSnack = { message, ...props } - setSnacks((snacks) => { - if (props.id) { - const snackIndex = snacks.findIndex((s) => s.id === props.id) - if (snackIndex >= 0) { - snacks.splice(snackIndex, 1) - } - } - return [newSnack, ...snacks] - }) - - const closeSnack = () => { - setSnacks((snacks) => snacks.filter((snack) => snack !== newSnack)) - } - - return closeSnack - } - - // Set current snack to be displayed - useEffect(() => { - if (snacks.length > 0) { - setCurrentSnack(snacks[snacks.length - 1]) - } - }, [snacks]) - - // Remove snack after timeout - useEffect(() => { - if (currentSnack.message) { - const timeout = currentSnack.timeout || AUTO_DISMISS - - const timer = setTimeout(() => { - removeCurrentSnack() - }, timeout) - - return () => clearTimeout(timer) - } - - return - }, [currentSnack]) - - const handleClose = (_e: any, reason: string) => { - if (reason === 'clickaway' && currentSnack.clickawayCloseable) { - removeCurrentSnack() - } else if (reason !== 'clickaway' && currentSnack.closeable) { - removeCurrentSnack() - } - } - - const handleUndo = () => { - currentSnack.undo && currentSnack.undo() - removeCurrentSnack() - } - - const removeCurrentSnack = () => { - setCurrentSnack({}) - setSnacks((snacks) => snacks.slice(0, snacks.length - 1)) - } - - const value = useMemo(() => addSnack, []) - const { message, status, closeable, undo, snackBarProps, alertProps } = - currentSnack - return ( - - {children} - {message && ( - - - - {undo && ( - - )} - {closeable && ( - // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. - - - - )} - - } - severity={status} - {...alertProps} - > - {message} - - - - )} - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/spellcheck/spellcheck.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/spellcheck/spellcheck.tsx deleted file mode 100644 index 891520abcaf..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/spellcheck/spellcheck.tsx +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import styled from 'styled-components' -import { useLazyResultsFromSelectionInterface } from '../selection-interface/hooks' - -const SHOW_MORE_LENGTH = 2 - -type Props = { - selectionInterface: any - model: any -} - -const ShowingResultsForContainer = styled.div` - padding: 0.15rem; - text-align: center; - font-size: 0.75rem; - border: none !important; -` - -const ShowMore = styled.a` - padding: 0.15rem; - font-size: 0.75rem; -` - -const DidYouMeanContainer = styled.div` - text-align: center; - border: none !important; -` - -const ResendQuery = styled.a` - padding: 0.15rem; - text-align: center; - font-size: 0.75rem; - text-decoration: none; - width: 100%; -` - -const Spellcheck = (props: Props) => { - const [expandShowingResultForText, setExpandShowingResultForText] = - React.useState(false) - const [expandDidYouMeanFieldText, setExpandDidYouMeanFieldText] = - React.useState(false) - - const createShowResultText = (showingResultsForFields: any[]) => { - let showingResultsFor = 'Showing Results for ' - if ( - showingResultsForFields !== undefined && - showingResultsForFields !== null && - showingResultsForFields.length > 0 - ) { - if (!expandShowingResultForText && showingResultsForFields.length > 2) { - showingResultsFor += createCondensedResultsForText( - showingResultsForFields - ) - return showingResultsFor - } - - showingResultsFor += createExpandedResultsForText(showingResultsForFields) - return showingResultsFor - } - return null - } - - const createDidYouMeanText = (didYouMeanFields: any[]) => { - let didYouMean = 'Did you mean ' - if ( - didYouMeanFields !== undefined && - didYouMeanFields !== null && - didYouMeanFields.length > 0 - ) { - if (!expandDidYouMeanFieldText && didYouMeanFields.length > 2) { - didYouMean += createCondensedResultsForText(didYouMeanFields) - return didYouMean - } - didYouMean += createExpandedResultsForText(didYouMeanFields) - return didYouMean - } - return null - } - - const createCondensedResultsForText = (showingResultsForFields: any[]) => { - const copyQuery = [...showingResultsForFields] - copyQuery.splice(0, copyQuery.length - SHOW_MORE_LENGTH) - return copyQuery.join(', ') - } - - const createExpandedResultsForText = (showingResultsForFields: any[]) => { - return showingResultsForFields.join(', ') - } - - const rerunQuery = (model: any) => { - model.set('spellcheck', false) - model.startSearchFromFirstPage() - model.set('spellcheck', true) - } - - const { selectionInterface, model } = props - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const results = Object.values(lazyResults.results) - if (results.length === 0) { - return null - } else if (model.get('spellcheck')) { - const { showingResultsForFields, didYouMeanFields } = lazyResults - const showingResultsFor = createShowResultText(showingResultsForFields) - const didYouMean = createDidYouMeanText(didYouMeanFields) - - return ( - <> - {showingResultsFor !== null && ( - - {showingResultsFor} - {showingResultsForFields !== null && - showingResultsForFields !== undefined && - showingResultsForFields.length > 2 && ( - { - setExpandShowingResultForText(!expandShowingResultForText) - }} - > - {expandShowingResultForText ? 'less' : 'more'} - - )} - - )} - {didYouMean !== null && ( - - { - rerunQuery(model) - }} - > - {didYouMean} - - {didYouMeanFields !== null && - didYouMeanFields !== undefined && - didYouMeanFields.length > 2 && ( - { - setExpandDidYouMeanFieldText(!expandDidYouMeanFieldText) - }} - > - {expandDidYouMeanFieldText ? 'less' : 'more'} - - )} - - )} - - ) - } - return null -} - -export default hot(module)(Spellcheck) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/swath/swath.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/swath/swath.tsx deleted file mode 100644 index 32f611288e9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/swath/swath.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' - -const Swath = ( - props: React.DetailedHTMLProps< - React.HTMLAttributes, - HTMLDivElement - > -) => { - const { className, ...otherProps } = props - return ( -
    - ) -} - -export default hot(module)(Swath) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/system-usage/system-usage.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/system-usage/system-usage.tsx deleted file mode 100644 index f91acca31dc..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/system-usage/system-usage.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import DialogActions from '@mui/material/DialogActions' -import DialogTitle from '@mui/material/DialogTitle' -import DialogContent from '@mui/material/DialogContent' -import Divider from '@mui/material/Divider' -import user from '../singletons/user-instance' -import { useDialog } from '../dialog' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' -function hasMessage() { - return StartupDataStore.Configuration.platformUiConfiguration - ?.systemUsageTitle -} -function hasNotSeenMessage() { - const systemUsage = window.sessionStorage.getItem('systemUsage') - if (systemUsage === null) { - window.sessionStorage.setItem('systemUsage', '{}') - return true - } else { - return ( - JSON.parse(systemUsage)[user.get('user').get('username')] === undefined - ) - } -} -function shownOncePerSession() { - return StartupDataStore.Configuration.platformUiConfiguration - ?.systemUsageOncePerSession -} -function shouldDisplayMessage() { - if (hasMessage()) { - if (!shownOncePerSession()) { - return true - } else { - return hasNotSeenMessage() - } - } else { - return false - } -} -const SystemUsageModal = () => { - const Configuration = useConfiguration() - const dialogContext = useDialog() - React.useEffect(() => { - if (shouldDisplayMessage()) { - openModal() - } else { - user.once('sync', () => { - openModal() - }) - } - }, []) - const openModal = () => { - dialogContext.setProps({ - onClose: (_event, reason) => { - if (reason === 'backdropClick') { - return - } - dialogContext.setProps({ - open: false, - }) - }, - open: true, - children: ( - <> - - {Configuration.platformUiConfiguration?.systemUsageTitle} - - - -
    - - - - - - - ), - }) - } - return <> -} -export default hot(module)(SystemUsageModal) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/table-export/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/table-export/index.tsx deleted file mode 100644 index bfef02eab41..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/table-export/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { - default as tableExport, - Props, - getWarning, - getExportBody, -} from './table-export' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/table-export/table-export.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/table-export/table-export.tsx deleted file mode 100644 index 838cb14cb15..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/table-export/table-export.tsx +++ /dev/null @@ -1,432 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import _ from 'underscore' -import { useEffect, useState } from 'react' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cont... Remove this comment to see the full error message -import contentDisposition from 'content-disposition' -import LinearProgress from '@mui/material/LinearProgress' -import Button from '@mui/material/Button' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import useSnack from '../hooks/useSnack' -import { AddSnack } from '../snack/snack.provider' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { - getExportOptions, - Transformer, - OverridableGetColumnOrder, - exportResultSet, - ExportCountInfo, - ExportInfo, - ExportFormat, -} from '../../react-component/utils/export' -import user from '../../component/singletons/user-instance' -import { DEFAULT_USER_QUERY_OPTIONS } from '../../js/model/TypedQuery' - -import { getResultSetCql } from '../../react-component/utils/cql' -import SummaryManageAttributes from '../../react-component/summary-manage-attributes/summary-manage-attributes' -import { OverridableSaveFile } from '../../react-component/utils/save-file/save-file' -import ProgressButton from '../../react-component/progress-button/progress-button' -import DialogContent from '@mui/material/DialogContent/DialogContent' -import DialogActions from '@mui/material/DialogActions/DialogActions' -import DialogContentText from '@mui/material/DialogContentText' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { limitToDeleted, limitToHistoric } from '../../js/model/Query' - -export type Props = { - selectionInterface: any - onClose?: any - exportSuccessful?: boolean - setExportSuccessful?: any -} - -type Source = { - id: string - hits: number -} - -type Option = { - label: string - value: string -} - -function getSrcs(selectionInterface: any) { - return selectionInterface.getCurrentQuery().getSelectedSources() -} - -function getHiddenFields(): string[] { - return user.get('user').get('preferences').get('columnHide') -} - -function getSorts(selectionInterface: any) { - return ( - user.get('user').get('preferences').get('resultSort') || - selectionInterface.getCurrentQuery().get('sorts') - ) -} - -function getHits(sources: Source[]): number { - return sources - .filter((source) => source.id !== 'cache') - .reduce((hits, source) => (source.hits ? hits + source.hits : hits), 0) -} -function getExportCount({ - exportSize, - selectionInterface, - customExportCount, -}: ExportCountInfo): number { - if (exportSize === 'custom') { - return customExportCount - } - const result = selectionInterface.getCurrentQuery().get('result') - return exportSize === 'all' - ? getHits(Object.values(result.get('lazyResults').status)) - : Object.keys(result.get('lazyResults').results).length -} - -export const getWarning = (exportCountInfo: ExportCountInfo): string => { - const exportResultLimit = StartupDataStore.Configuration.getExportLimit() - const exportCount = getExportCount(exportCountInfo) - const result = exportCountInfo.selectionInterface - .getCurrentQuery() - .get('result') - const totalHits = getHits(Object.values(result.get('lazyResults').status)) - const limitWarning = `You cannot export more than the administrator configured limit of ${exportResultLimit}.` - let warningMessage = '' - if (exportCount > exportResultLimit) { - if (exportCountInfo.exportSize === 'custom') { - return limitWarning - } - warningMessage = - limitWarning + - ` Only ${exportResultLimit} ${ - exportResultLimit === 1 ? `result` : `results` - } will be exported.` - } - if (exportCountInfo.exportSize === 'custom') { - if (exportCount > totalHits) { - warningMessage = `You are trying to export ${exportCount} results but there ${ - totalHits === 1 ? `is` : `are` - } only ${totalHits}. Only ${totalHits} ${ - totalHits === 1 ? `result` : `results` - } will be exported.` - } - } - if (totalHits > 100 && exportCount > 100 && exportResultLimit > 100) { - warningMessage += ` This may take a long time.` - } - return warningMessage -} - -type SourceIdPair = { - id: string - sourceId: string -} - -export const getExportBody = async (ExportInfo: ExportInfo) => { - const { exportSize, customExportCount, selectionInterface } = ExportInfo - const exportResultLimit = StartupDataStore.Configuration.getExportLimit() - const hiddenFields = getHiddenFields() - const columnOrder = OverridableGetColumnOrder.get()() - const srcs = getSrcs(selectionInterface) - const sorts = getSorts(selectionInterface) - const query = selectionInterface.getCurrentQuery() - const cacheId = query.get('cacheId') - const phonetics = query.get('phonetics') - const spellcheck = query.get('spellcheck') - let additionalOptions = JSON.parse(query.get('additionalOptions') || '{}') - - let cqlFilterTree = query.get('filterTree') - if (query.options.limitToDeleted) { - cqlFilterTree = limitToDeleted(cqlFilterTree) - } else if (query.options.limitToHistoric) { - cqlFilterTree = limitToHistoric(cqlFilterTree) - } - - if (query.options.additionalOptions) { - additionalOptions = _.extend( - additionalOptions, - query.options.additionalOptions - ) - } - - const exportCount = Math.min( - getExportCount({ exportSize, selectionInterface, customExportCount }), - exportResultLimit - ) - const args = { - hiddenFields: hiddenFields.length > 0 ? hiddenFields : [], - columnOrder: columnOrder.length > 0 ? columnOrder : [], - columnAliasMap: StartupDataStore.Configuration.config?.attributeAliases, - } - const searches = [] - let queryCount = exportCount - let cql = DEFAULT_USER_QUERY_OPTIONS.transformFilterTree({ - originalFilterTree: cqlFilterTree, - queryRef: query, - }) - if (ExportInfo.exportSize === 'currentPage') { - const resultIdSourcePairs: SourceIdPair[] = Object.values( - query.get('result').get('lazyResults').results - ).map((result: LazyQueryResult) => ({ - id: result.plain.metacard.properties['id'], - sourceId: result.plain.metacard.properties['source-id'], - })) - - const srcMap: Record = resultIdSourcePairs.reduce( - (srcMap: Record, curPair: SourceIdPair) => { - if (!srcMap[curPair.sourceId]) { - srcMap[curPair.sourceId] = [] - } - srcMap[curPair.sourceId].push(curPair.id) - return srcMap - }, - {} as Record - ) - Object.keys(srcMap).forEach((src) => { - searches.push({ - srcs: [src], - cql: getResultSetCql(srcMap[src]), - count: srcMap[src].length, - cacheId, - }) - }) - } else { - searches.push({ - srcs, - cql, - count: queryCount, - cacheId, - }) - } - - return { - phonetics, - spellcheck, - additionalOptions: JSON.stringify(additionalOptions), - searches, - count: exportCount, - sorts, - args, - } -} - -const TableExports = ({ - selectionInterface, - onClose, - setExportSuccessful, - exportSuccessful, -}: Props) => { - const exportLimit = StartupDataStore.Configuration.getExportLimit() - const [formats, setFormats] = useState([]) - const [exportFormat, setExportFormat] = useState('') - const [exportSize, setExportSize] = useState('all') - const [warning, setWarning] = useState('') - const [customExportCount, setCustomExportCount] = useState(exportLimit) - const [loading, setLoading] = useState(false) - - const onExportClick = async (addSnack: AddSnack, ExportInfo: ExportInfo) => { - const exportFormat = encodeURIComponent(ExportInfo.exportFormat) - try { - setLoading(true) - const body = await getExportBody(ExportInfo) - const response = await exportResultSet(exportFormat, body) - if (response.status === 200) { - const data = await response.blob() - const contentType = response.headers.get('content-type') - const filename = contentDisposition.parse( - response.headers.get('content-disposition') - ).parameters.filename - OverridableSaveFile.get()(filename, 'data:' + contentType, data) - setExportSuccessful(true) - } else { - setExportSuccessful(false) - addSnack('Error: Could not export results.', { - alertProps: { severity: 'error' }, - }) - } - } catch (error) { - console.error(error) - setExportSuccessful(false) - } finally { - setLoading(false) - } - } - - if (exportSuccessful) { - onClose() - } - - const exportSizes: Option[] = [ - { - label: 'Current Page', - value: 'currentPage', - }, - { - label: 'All Results', - value: 'all', - }, - { - label: 'Specific Number of Results', - value: 'custom', - }, - ] - - const addSnack = useSnack() - useEffect(() => { - const fetchFormats = async () => { - const formats = await getExportOptions(Transformer.Query) - - setFormats( - formats.map((exportFormat: ExportFormat) => ({ - label: exportFormat.displayName, - value: exportFormat.id, - })) - ) - - formats.length && setExportFormat(formats[0].id) - } - fetchFormats() - }, []) - - useEffect(() => { - setWarning( - getWarning({ - exportSize, - selectionInterface, - customExportCount, - }) - ) - }, [exportSize, customExportCount]) - - return formats.length === 0 ? ( - - ) : ( - <> - - -
    -
    - { - setExportSize(newValue.value) - }} - isOptionEqualToValue={(option) => option.value === exportSize} - getOptionLabel={(option) => { - return option.label - }} - disableClearable - value={exportSizes.find( - (choice) => choice.value === exportSize - )} - renderInput={(params) => ( - - )} - /> -
    - {exportSize === 'custom' ? ( -
    - { - setCustomExportCount(Number(e.target.value)) - }} - variant="outlined" - /> -
    - ) : ( -
    - )} -
    - { - setExportFormat(newValue.value) - }} - isOptionEqualToValue={(option) => option.value === exportFormat} - getOptionLabel={(option) => { - return option.label - }} - disableClearable - value={formats.find((choice) => choice.value === exportFormat)} - renderInput={(params) => ( - - )} - /> -
    - {['csv', 'rtf', 'xlsx'].includes(exportFormat) ? ( - - ) : null} - {warning && ( -
    - - {warning} -
    - )} -
    - - - -
    - - exportLimit - } - onClick={() => { - onExportClick(addSnack, { - exportFormat, - exportSize, - customExportCount, - selectionInterface, - }) - }} - > - Export - -
    -
    - - ) -} - -export default TableExports diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/coordinateConverter.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/coordinateConverter.tsx deleted file mode 100644 index 72c1861f709..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/coordinateConverter.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { TypedUserInstance } from '../../singletons/TypedUser' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message -import mtgeo from 'mt-geo' -import * as usngs from 'usng.js' -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. -const converter = new usngs.Converter() - -const usngPrecision = 6 - -/** - * Converts wkt to the user's preferred coordinate format. - * Falls back to the wkt if the conversion fails. - */ -export const convertWktToPreferredCoordFormat = (wkt: string) => { - const coords = wkt.split(/\s/g) - - if (coords.length !== 2) { - return wkt - } - - // must be in number format for LLtoUTMUPS converter - const lon = parseFloat(coords[0]) - const lat = parseFloat(coords[1]) - - if (isNaN(lon) || isNaN(lat)) { - return wkt - } else { - return convertCoordsToPreferred(lat, lon) - } -} - -/** - * Converts coordinates from lat lon to a single string in - * the user's preferred format - */ -export const convertCoordsToPreferred = (lat: number, lon: number): string => { - const coordFormat = TypedUserInstance.getCoordinateFormat() - - try { - switch (coordFormat) { - case 'degrees': - return `${mtgeo.toLat(lat)} ${mtgeo.toLon(lon)}` - case 'decimal': - return `${lat} ${lon}` - case 'mgrs': - return converter.LLtoMGRSUPS(lat, lon, usngPrecision) - case 'utm': - return converter.LLtoUTMUPS(lat, lon) - case 'wkt': - default: - return `${lon} ${lat}` - } - } catch (e) { - return `${lon} ${lat}` - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/highlightUtil.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/highlightUtil.tsx deleted file mode 100644 index ef60f700da9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/highlightUtil.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from 'react' -import Typography from '@mui/material/Typography' -import { AttributeHighlight } from '../../../js/model/LazyQueryResult/LazyQueryResults' - -const comparator = (a: AttributeHighlight, b: AttributeHighlight) => { - const aIndex = parseInt(a.startIndex) - const bIndex = parseInt(b.startIndex) - if (aIndex < bIndex) { - return -1 - } else if (aIndex === bIndex) { - return 0 - } else if (aIndex > bIndex) { - return 1 - } - return 0 -} - -export const displayHighlightedAttrInFull = ( - highlights: Array, - text: string, - index: number -) => { - //sort these in the order in which they appear - highlights.sort(comparator) - // only use the highlights from this value if multivalued - const filteredHighlights = highlights.filter( - (highlight) => parseInt(highlight.valueIndex) === index - ) - let textArray = [] - let currentIndex = 0 - filteredHighlights.forEach((highlight, index) => { - const highlightStart = parseInt(highlight.startIndex) - const highlightEnd = parseInt(highlight.endIndex) - const beforeText = ( - - ) - const highlightText = ( - - {text.substring(highlightStart, highlightEnd)} - - ) - currentIndex = highlightEnd - textArray.push(beforeText) - textArray.push(highlightText) - }) - const afterText = ( - - ) - textArray.push(afterText) - return {textArray} -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/summary.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/summary.tsx deleted file mode 100644 index 4676ac57ec2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/summary.tsx +++ /dev/null @@ -1,951 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Grid from '@mui/material/Grid' -import Typography from '@mui/material/Typography' -import Button from '@mui/material/Button' -import user from '../../singletons/user-instance' -import Autocomplete from '@mui/material/Autocomplete' -import Checkbox from '@mui/material/Checkbox' -import Divider from '@mui/material/Divider' -import DeleteIcon from '@mui/icons-material/Delete' -import TextField from '@mui/material/TextField' -import { useDialog } from '../../dialog' -import DialogActions from '@mui/material/DialogActions' -import DialogContent from '@mui/material/DialogContent' -import useSnack from '../../hooks/useSnack' -import LinearProgress from '@mui/material/LinearProgress' -import $ from 'jquery' -import PublishIcon from '@mui/icons-material/Publish' -import Paper from '@mui/material/Paper' -import { useTheme } from '@mui/material/styles' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { useBackbone } from '../../selection-checkbox/useBackbone.hook' -import { useCustomReadOnlyCheck } from './transfer-list' -import KeyboardBackspaceIcon from '@mui/icons-material/KeyboardBackspace' -import AddIcon from '@mui/icons-material/Add' -import EditIcon from '@mui/icons-material/Edit' -import Box from '@mui/material/Box' -import { Elevations } from '../../theme/theme' -import { DarkDivider } from '../../dark-divider/dark-divider' -import { displayHighlightedAttrInFull } from './highlightUtil' -import DateTimePicker from '../../fields/date-time-picker' -import { useRerenderOnBackboneSync } from '../../../js/model/LazyQueryResult/hooks' -import useCoordinateFormat from './useCoordinateFormat' -import { MetacardAttribute } from '../../../js/model/Types' -import ExtensionPoints from '../../../extension-points' -import LocationInputReact from '../../location-new/location-new.view' -import { TypedUserInstance } from '../../singletons/TypedUser' -import { StartupDataStore } from '../../../js/model/Startup/startup' -import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks' -import Common from '../../../js/Common' -import SummaryManageAttributes from '../../../react-component/summary-manage-attributes/summary-manage-attributes' -import moment from 'moment-timezone' - -type Props = { - result: LazyQueryResult -} -const ThumbnailInput = ({ - value, - onChange = () => {}, - disabled = false, -}: { - value: string - disabled: boolean - onChange?: (val: string) => void -}) => { - const fileRef = React.useRef(null) - const imgRef = React.useRef(null) - return ( - - - { - if (imgRef.current === null) { - return - } - const reader = new FileReader() - reader.onload = function (event) { - try { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - onChange(event.target.result) - } catch (err) { - console.error('there is something wrong with file type') - } - } - reader.onerror = () => { - console.error('error') - } - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - reader.readAsDataURL(e.target.files[0]) - }} - /> - - - - - - - ) -} -enum Mode { - Normal = 'normal', - Saving = 'saving', - BadInput = 'bad-input', -} -const handleMetacardUpdate = ({ - lazyResult, - attributes, - onSuccess, - onFailure, -}: { - lazyResult: LazyQueryResult - attributes: MetacardAttribute[] - onSuccess: () => void - onFailure: () => void -}) => { - const payload = [ - { - ids: [lazyResult.plain.metacard.properties.id], - attributes, - }, - ] - setTimeout(() => { - $.ajax({ - url: `./internal/metacards?storeId=${lazyResult.plain.metacard.properties['source-id']}`, - type: 'PATCH', - data: JSON.stringify(payload), - contentType: 'application/json', - }).then( - (response: any) => { - lazyResult.refreshFromEditResponse(response) - onSuccess() - }, - () => onFailure() - ) - }, 1000) -} -export const Editor = ({ - attr, - lazyResult, - onCancel = () => {}, - onSave = () => {}, - goBack, -}: { - attr: string - lazyResult: LazyQueryResult - onCancel?: () => void - onSave?: () => void - goBack?: () => void -}) => { - const [mode, setMode] = React.useState(Mode.Normal) - const [values, setValues] = React.useState( - Array.isArray(lazyResult.plain.metacard.properties[attr]) - ? lazyResult.plain.metacard.properties[attr].slice(0) - : [lazyResult.plain.metacard.properties[attr]] - ) - const [dirtyIndex, setDirtyIndex] = React.useState(-1) - const { getAlias, isMulti, getType, getEnum, getRequired } = - useMetacardDefinitions() - const label = getAlias(attr) - const isMultiValued = isMulti(attr) - const attrType = getType(attr) - const enumForAttr = getEnum(attr) - const addSnack = useSnack() - const isRequired = getRequired(lazyResult.plain.metacardType, attr) - - function getErrorMessage() { - if (isRequired || attr === 'title') { - const invalidField = !values || values.length < 1 || !values[0] - return invalidField ? label + ' is required.' : '' - } - return '' - } - - const errmsg = getErrorMessage() - - return ( - <> - {goBack && ( - - )} -
    - Editing {label} of "{lazyResult.plain.metacard.properties.title}" -
    - - -
    - {values.map((val: any, index: number) => { - return ( - - {index !== 0 ? : null} - - {(() => { - if (enumForAttr.length > 0) { - return ( - { - values[index] = newValue - setValues([...values]) - }} - fullWidth - disableClearable - size="small" - options={enumForAttr} - renderInput={(params) => ( - - )} - /> - ) - } - switch (attrType) { - case 'DATE': - return ( - { - values[index] = value - setValues([...values]) - }} - TextFieldProps={{ - disabled: mode !== Mode.Normal, - label: label, - variant: 'outlined', - }} - BPDateProps={{ - disabled: mode !== Mode.Normal, - }} - /> - ) - case 'BINARY': - return ( - { - values[index] = update - setValues([...values]) - }} - /> - ) - case 'BOOLEAN': - return ( - { - values[index] = e.target.checked - setValues([...values]) - }} - color="primary" - /> - ) - case 'LONG': - case 'DOUBLE': - case 'FLOAT': - case 'INTEGER': - case 'SHORT': - return ( - { - values[index] = e.target.value - setValues([...values]) - }} - type="number" - fullWidth - /> - ) - case 'GEOMETRY': - return ( - { - if (location === null || location === 'INVALID') { - setMode(Mode.BadInput) - } else { - setMode(Mode.Normal) - } - values[index] = location - setValues([...values]) - }} - isStateDirty={dirtyIndex === index} - resetIsStateDirty={() => setDirtyIndex(-1)} - value={val} - /> - ) - default: - return ( - { - values[index] = e.target.value - setValues([...values]) - }} - style={{ whiteSpace: 'pre-line', flexGrow: 50 }} - fullWidth - multiline={true} - maxRows={1000} - error={errmsg.length != 0} - helperText={errmsg} - /> - ) - } - })()} - - {isMultiValued ? ( - - - - ) : null} - - ) - })} - {isMultiValued && ( - - )} -
    -
    - - - - - - {mode === Mode.Saving ? ( - - ) : null} - - ) -} -const AttributeComponent = ({ - lazyResult, - attr, - hideEmpty, - summaryShown = [], - decimalPrecision = undefined, - filter = '', - forceRender, -}: { - attr: string - lazyResult: LazyQueryResult - hideEmpty: boolean - summaryShown?: string[] - decimalPrecision: number | undefined - filter?: string - forceRender: boolean -}) => { - let value = lazyResult.plain.metacard.properties[attr] - if (hideEmpty) { - if (value === undefined || value === null) { - return null - } else if (typeof value === 'string' && !value.trim()) { - return null - } else if (Array.isArray(value) && value.length === 0) { - return null - } - } - if (value === undefined || value === null) { - value = [] - } - if (value.constructor !== Array) { - value = [value] - } - const { getAlias, getType } = useMetacardDefinitions() - let label = getAlias(attr) - const { isNotWritable } = useCustomReadOnlyCheck() - const dialogContext = useDialog() - const convertToFormat = useCoordinateFormat() - const convertToPrecision = (value: any) => { - return value && decimalPrecision - ? Number(value).toFixed(decimalPrecision) - : value - } - const isUrl = (value: any) => { - if (value && typeof value === 'string') { - const protocol = value.toLowerCase().split('/')[0] - return protocol && (protocol === 'http:' || protocol === 'https:') - } - return false - } - const isFiltered = - filter !== '' ? !label.toLowerCase().includes(filter.toLowerCase()) : false - const onCancel = () => { - dialogContext.setProps({ - open: false, - children: null, - }) - } - const onSave = () => { - dialogContext.setProps({ - open: false, - children: null, - }) - } - const CustomAttributeEditor = ExtensionPoints.attributeEditor( - lazyResult, - attr - ) - const MemoItem = React.useMemo(() => { - return ( - - {isNotWritable({ attribute: attr, lazyResult }) ? null : ( -
    - -
    - )} - - - {label} - - - - - - {value.map((val: any, index: number) => { - return ( - - {index !== 0 ? ( - - ) : null} -
    - {(() => { - if (attr === 'ext.audio-snippet') { - const mimetype = - lazyResult.plain.metacard.properties[ - 'ext.audio-snippet-mimetype' - ] - const src = `data:${mimetype};base64,${val}` - return
    -
    - ) - })} -
    -
    -
    -
    - ) - }, [summaryShown, forceRender, isNotWritable]) - return ( -
    {MemoItem}
    - ) -} -let persistantFilter = '' -/* Hidden attributes are simply the opposite of active */ -/* They do not currently exist on the metacard OR are not shown in the summary */ -const getHiddenAttributes = ( - selection: LazyQueryResult, - activeAttributes: string[] -) => { - return Object.values( - StartupDataStore.MetacardDefinitions.getMetacardDefinition( - selection.plain.metacardType - ) - ) - .filter((val) => { - if (activeAttributes.includes(val.id)) { - return false - } - return true - }) - .filter((val) => { - return !StartupDataStore.MetacardDefinitions.isHiddenAttribute(val.id) - }) -} -let globalExpanded = false // globally track if users want this since they may be clicking between results -const Summary = ({ result: selection }: Props) => { - const theme = useTheme() - const [forceRender, setForceRender] = React.useState(false) - const [expanded, setExpanded] = React.useState(globalExpanded) - /* Special case for when all the attributes are displayed */ - const [fullyExpanded, setFullyExpanded] = React.useState(false) - const [filter, setFilter] = React.useState(persistantFilter) - const [decimalPrecision, setDecimalPrecision] = React.useState( - TypedUserInstance.getDecimalPrecision() - ) - const [summaryShown, setSummaryShown] = React.useState( - TypedUserInstance.getResultsAttributesSummaryShown() - ) - useRerenderOnBackboneSync({ lazyResult: selection }) - const { listenTo } = useBackbone() - const { isHiddenAttribute, getMetacardDefinition } = useMetacardDefinitions() - React.useEffect(() => { - listenTo( - user.get('user').get('preferences'), - 'change:inspector-summaryShown change:dateTimeFormat change:timeZone change:inspector-hideEmpty', - () => { - setSummaryShown([ - ...TypedUserInstance.getResultsAttributesSummaryShown(), - ]) - setForceRender(true) - } - ) - listenTo( - user.get('user').get('preferences'), - 'change:decimalPrecision', - () => { - setDecimalPrecision(TypedUserInstance.getDecimalPrecision()) - } - ) - }, []) - React.useEffect(() => { - if (selection) { - if (getHiddenAttributes(selection, summaryShown).length === 0) { - setFullyExpanded(true) - } else { - setFullyExpanded(false) - } - } - }, [summaryShown]) - const everythingElse = React.useMemo(() => { - return selection && expanded - ? Object.keys(selection.plain.metacard.properties) - .filter((attr) => { - return !isHiddenAttribute(attr) - }) - .filter((attr) => { - return !summaryShown.includes(attr) - }) - : [] - }, [expanded, summaryShown, isHiddenAttribute]) - const blankEverythingElse = React.useMemo(() => { - return selection - ? Object.values(getMetacardDefinition(selection.plain.metacardType)) - .filter((val) => { - if (summaryShown.includes(val.id)) { - return false - } - if (everythingElse.includes(val.id)) { - return false - } - return true - }) - .filter((val) => { - return !isHiddenAttribute(val.id) - }) - : [] - }, [expanded, summaryShown, isHiddenAttribute]) - React.useEffect(() => { - globalExpanded = expanded - }, [expanded]) - if (!selection) { - return
    No result selected
    - } - const hideEmpty: boolean = user - .get('user') - .get('preferences') - .get('inspector-hideEmpty') - return ( - - - - - - - - - { - persistantFilter = e.target.value - setFilter(e.target.value) - }} - /> - - - - - - - {summaryShown.map((attr, index) => { - return ( -
    - - {index !== 0 ? ( - - ) : null} -
    - ) - })} - - {expanded ? ( - <> - {everythingElse.map((attr) => { - return ( -
    - - -
    - ) - })} - {blankEverythingElse.map((attr) => { - return ( -
    - - -
    - ) - })} - - ) : ( - <> - )} -
    -
    - {/* If hidden attributes === 0, don't show this button */} - {!fullyExpanded && ( - <> - - - - - - )} -
    - ) -} -export default hot(module)(Summary) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/tabs-metacard.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/tabs-metacard.tsx deleted file mode 100644 index 3f40c578561..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/tabs-metacard.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import MetacardActions from '../../../react-component/metacard-actions' -import MetacardQuality from '../../../react-component/metacard-quality' -import MetacardHistory from '../../../react-component/metacard-history' -import Summary from './summary' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { MetacardPreviewReact } from '../../metacard-preview/metacard-preview.view' - -export type TabContentProps = { - result: LazyQueryResult - selectionInterface?: any -} - -type TabDefinition = { - content: - | (({ result }: TabContentProps) => React.ReactNode | any) - | React.ComponentClass - header?: ({ result }: TabContentProps) => React.ReactNode -} - -export const TabNames = { - Details: 'Details', - Preview: 'Preview', - History: 'History', - Quality: 'Quality', - Actions: 'Actions', -} - -const Tabs = { - Details: { content: Summary }, - Preview: { - content: ({ result }) => { - return - }, - }, - History: { content: MetacardHistory }, - Quality: { content: MetacardQuality }, - Actions: { content: MetacardActions }, -} as { - [key: string]: TabDefinition -} - -export default Tabs diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/transfer-list.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/transfer-list.tsx deleted file mode 100644 index fe874fc6225..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/transfer-list.tsx +++ /dev/null @@ -1,939 +0,0 @@ -/* https://material-ui.com/components/transfer-list/ */ -import { hot } from 'react-hot-loader' -import React from 'react' -import Grid from '@mui/material/Grid' -import List from '@mui/material/List' -import Button from '@mui/material/Button' -import DialogContent from '@mui/material/DialogContent' -import DialogActions from '@mui/material/DialogActions' -import TextField from '@mui/material/TextField' -import Tooltip from '@mui/material/Tooltip' -import LinearProgress from '@mui/material/LinearProgress' -import CircularProgress from '@mui/material/CircularProgress' -import Paper from '@mui/material/Paper' -import { useDialog } from '../../dialog' -import EditIcon from '@mui/icons-material/Edit' -import { Editor } from './summary' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { - DropResult, - DragDropContext, - Droppable, - Draggable, -} from 'react-beautiful-dnd' -import extension from '../../../extension-points' -import { Elevations } from '../../theme/theme' -import { DarkDivider } from '../../dark-divider/dark-divider' -import LeftArrowIcon from '@mui/icons-material/ChevronLeft' -import RightArrowIcon from '@mui/icons-material/ChevronRight' -import CloseIcon from '@mui/icons-material/Close' -import CheckBoxIcon from '@mui/icons-material/CheckBox' -import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank' -import IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox' -import FormControlLabel from '@mui/material/FormControlLabel' -import Switch from '@mui/material/Switch' -import { AutoVariableSizeList } from 'react-window-components' -import debounce from 'lodash.debounce' -import { Memo } from '../../memo/memo' -import { TypedUserInstance } from '../../singletons/TypedUser' -import user from '../../singletons/user-instance' -import ExtensionPoints from '../../../extension-points/extension-points' -import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks' -import { StartupDataStore } from '../../../js/model/Startup/startup' -import { useConfiguration } from '../../../js/model/Startup/configuration.hooks' -const getAmountChecked = (items: CheckedType) => { - return Object.values(items).filter((a) => a).length -} -const handleShiftClick = ({ - items, - filteredItemArray, - setItems, - item, -}: { - items: CheckedType - item: string - filteredItemArray: string[] - setItems: SetCheckedType -}) => { - const defaultMin = filteredItemArray.length - const defaultMax = -1 - const firstIndex = filteredItemArray.reduce((min, filteredItem, index) => { - if (items[filteredItem]) { - return Math.min(min, index) - } - return min - }, defaultMin) - const lastIndex = filteredItemArray.reduce((max, filteredItem, index) => { - if (items[filteredItem]) { - return Math.max(max, index) - } - return max - }, defaultMax) - const indexClicked = filteredItemArray.indexOf(item) - if (firstIndex === defaultMin && lastIndex === defaultMax) { - setItems({ - ...items, - [item]: true, - }) - } else if (indexClicked <= firstIndex) { - // traverse from target to next until firstIndex - const updates = filteredItemArray.slice(indexClicked, firstIndex + 1) - setItems({ - ...items, - ...updates.reduce((blob, filteredItem) => { - blob[filteredItem] = true - return blob - }, {} as CheckedType), - }) - } else if (indexClicked >= lastIndex) { - // traverse from target to prev until lastIndex - const updates = filteredItemArray.slice(lastIndex, indexClicked + 1) - setItems({ - ...items, - ...updates.reduce((blob, filteredItem) => { - blob[filteredItem] = true - return blob - }, {} as CheckedType), - }) - } else { - // traverse from target to prev until something doesn't change - const closestPreviousIndex = filteredItemArray - .slice(0, indexClicked - 1) - .reduce((max, filteredItem, index) => { - if (items[filteredItem]) { - return Math.max(max, index) - } - return max - }, defaultMax) - const updates = filteredItemArray.slice( - closestPreviousIndex, - indexClicked + 1 - ) - setItems({ - ...items, - ...updates.reduce((blob, filteredItem) => { - blob[filteredItem] = true - return blob - }, {} as CheckedType), - }) - } -} -const ItemRow = ({ - value, - required, - lazyResult, - startOver, - measure, - filter, -}: { - value: string - required?: boolean - lazyResult?: LazyQueryResult - startOver: () => void - measure?: () => void - filter?: string -}) => { - const [show, setShow] = React.useState(false) - const MetacardDefinitions = useMetacardDefinitions() - const dialogContext = useDialog() - const { setItems, items, filteredItemArray } = - React.useContext(CustomListContext) - const { isNotWritable } = useCustomReadOnlyCheck() - React.useEffect(() => { - if (measure) measure() - }, []) - const alias = MetacardDefinitions.getAlias(value) - const isReadonly = lazyResult - ? isNotWritable({ - attribute: value, - lazyResult, - }) - : true - if (filter && !alias.toLowerCase().includes(filter.toLowerCase())) { - return null - } - const CustomAttributeEditor = lazyResult - ? ExtensionPoints.attributeEditor(lazyResult, value) - : null - return ( -
    - -
    required && setShow(true)} - onMouseLeave={() => setShow(false)} - > - -
    -
    - - {!isReadonly && lazyResult && ( - - )} -
    - ) -} -const CustomListContext = React.createContext({ - items: {} as CheckedType, - setItems: (() => {}) as SetCheckedType, - filteredItemArray: [] as string[], -}) -const filterUpdate = ({ - filter, - setItemArray, - items, -}: { - items: { - [key: string]: boolean - } - filter: string - setItemArray: (val: string[]) => void -}) => { - setItemArray( - Object.keys(items).filter((attr) => { - const alias = StartupDataStore.MetacardDefinitions.getAlias(attr) - const isFiltered = - filter !== '' - ? !alias.toLowerCase().includes(filter.toLowerCase()) - : false - return !isFiltered - }) - ) -} -const generateDebouncedFilterUpdate = () => { - return debounce(filterUpdate, 500) -} -/** - * At the moment, we only virtualize the right side since that's likely to be huge whereas the left isn't (it also has DND on left, which makes things diff to virtualize) - */ -const CustomList = ({ - title, - items, - requiredAttributes, - lazyResult, - updateItems, - isDnD, - handleToggleAll, - mode, - startOver, - totalPossible, -}: { - title: React.ReactNode - items: CheckedType - requiredAttributes?: string[] - lazyResult?: LazyQueryResult - updateItems: SetCheckedType - isDnD: boolean // drag and drop allowed? - handleToggleAll: (props: any) => () => void - mode: 'loading' | string - startOver: () => void - totalPossible: number -}) => { - const itemsRef = React.useRef(items) - itemsRef.current = items // don't see a performant way besides this to allow us to avoid rerendering DnD but allow it to update the item orders correctly - const [filter, setFilter] = React.useState('') - const [unfilteredItemArray, setUnfilteredItemArray] = React.useState( - Object.keys(items) - ) - const [filteredItemArray, setFilteredItemArray] = React.useState( - Object.keys(items) - ) - const [isFiltering, setIsFiltering] = React.useState(false) - const debouncedFilterUpdate = React.useRef(generateDebouncedFilterUpdate()) - const numberChecked = getAmountChecked(items) - const total = Object.keys(items).length - const totalCheckable = requiredAttributes - ? total - requiredAttributes.length - : total - const isIndeterminate = - numberChecked !== totalCheckable && numberChecked !== 0 - const isCompletelySelected = - numberChecked === totalCheckable && totalCheckable !== 0 - React.useEffect(() => { - setUnfilteredItemArray(Object.keys(items)) - }, [Object.keys(items).toString()]) - React.useEffect(() => { - setIsFiltering(true) - debouncedFilterUpdate.current({ - items, - filter, - setItemArray: setFilteredItemArray, - }) - }, [Object.keys(items).toString(), filter]) - React.useEffect(() => { - setIsFiltering(false) - }, [filteredItemArray]) - // memo this, other wise the creation of the new object each time is seen as a "change" - const memoProviderValue = React.useMemo(() => { - return { items, setItems: updateItems, filteredItemArray } - }, [items, updateItems]) - return ( - - - - - - - - {title} ({total}/{totalPossible}) - - - -
    - { - setFilter(e.target.value) - }} - /> -
    - - {mode === 'loading' ? ( - - ) : ( - - {isFiltering ? ( - - ) : null} - {isDnD ? ( - -
    -
    - Click and drag attributes to reorder. -
    -
    - { - //Put these NO-OPs up front for performance reasons: - //1. If the item is dropped outside the list, do nothing - //2. If the item is moved into the same place, do nothing - if (!result.destination) { - return - } - if (result.source.index === result.destination.index) { - return - } - // complicated by the fact that we filter, so we need to find the original and dest index ourselves :( - if (result.reason === 'DROP' && result.destination) { - const shiftedOriginalIndex = - unfilteredItemArray.indexOf(result.draggableId) - const shiftedDestIndex = unfilteredItemArray.indexOf( - filteredItemArray[result.destination.index] - ) - const clonedList = unfilteredItemArray.slice(0) - clonedList.splice(shiftedOriginalIndex, 1) - clonedList.splice( - shiftedDestIndex, - 0, // insert WITHOUT removing anything - result.draggableId - ) - const newList = clonedList.reduce((blob, attr) => { - blob[attr] = itemsRef.current[attr] - return blob - }, {} as CheckedType) - updateItems(newList) - filterUpdate({ - filter, - setItemArray: setFilteredItemArray, - items: newList, - }) // in this case, we eagerly set in order to avoid flickering - } - }} - > -
    - { - return ( -
    - -
    - ) - }} - > - {(provided) => { - return ( - - items={filteredItemArray} - defaultSize={39.42} - controlledMeasuring={true} - overscanCount={10} - outerRef={provided.innerRef} - Item={({ itemRef, item, measure, index }) => { - return ( -
    - - {(provided) => { - return ( -
    - -
    - ) - }} -
    -
    - ) - }} - Empty={() => { - return
    - }} - /> - ) - }} -
    -
    -
    -
    -
    -
    - ) : ( - <> - - items={filteredItemArray} - defaultSize={39.42} - controlledMeasuring={true} - overscanCount={10} - Item={({ itemRef, item, measure }) => { - return ( -
    - -
    - ) - }} - Empty={() => { - return
    - }} - /> - - )} -
    - )} -
    -
    - ) -} -export const useCustomReadOnlyCheck = () => { - const Configuration = useConfiguration() - const [customEditableAttributes, setCustomEditableAttributes] = - React.useState([] as string[]) - const isMounted = React.useRef(true) - const [loading, setLoading] = React.useState(true) - const initializeCustomEditableAttributes = async () => { - const attrs = await extension.customEditableAttributes() - if (isMounted.current) { - if (attrs !== undefined) { - setCustomEditableAttributes(attrs) - } - setLoading(false) - } - } - React.useEffect(() => { - initializeCustomEditableAttributes() - return () => { - isMounted.current = false - } - }, []) - return { - loading, - isNotWritable: ({ - attribute, - lazyResult, - }: { - attribute: string - lazyResult: LazyQueryResult - }) => { - const perm = extension.customCanWritePermission({ - attribute, - lazyResult, - user, - editableAttributes: customEditableAttributes, - }) - if (perm !== undefined) { - return !perm - } - const determination = - lazyResult.isRemote() || - !TypedUserInstance.canWrite(lazyResult) || - Configuration.isReadOnly(attribute) - return determination - }, - } -} -const convertAttrListToMap = (attrs: string[]) => { - return attrs.reduce( - (blob, attr) => { - blob[attr] = false - return blob - }, - {} as { - [key: string]: boolean - } - ) -} -type CheckedType = { - [key: string]: boolean -} -type SetCheckedType = React.Dispatch> -const TransferList = ({ - startingLeft, - requiredAttributes, - startingRight, - startingHideEmpty, - lazyResult, - onSave, -}: { - startingLeft: string[] - requiredAttributes?: string[] - startingRight: string[] - startingHideEmpty?: boolean - lazyResult?: LazyQueryResult - onSave: (arg: string[], hideEmpty: boolean | undefined) => void -}) => { - const dialogContext = useDialog() - const [mode, setMode] = React.useState( - 'loading' as 'normal' | 'saving' | 'loading' - ) - const [left, setLeft] = React.useState(convertAttrListToMap(startingLeft)) - const [right, setRight] = React.useState(convertAttrListToMap(startingRight)) - const [hideEmpty, setHideEmpty] = React.useState(startingHideEmpty) - const { loading } = useCustomReadOnlyCheck() - React.useEffect(() => { - if (!loading) { - setMode('normal') - } - }, [loading]) - const generateHandleToggleAll = ({ - setState, - state, - disabledAttributes = [], - }: { - setState: SetCheckedType - state: CheckedType - disabledAttributes?: string[] - }) => { - return () => () => { - const allValues = Object.values(state) - const totalCheckable = allValues.length - disabledAttributes.length - const numberChecked = allValues.filter((checked) => checked).length - const allSelected = - numberChecked === totalCheckable && totalCheckable !== 0 - - if (!allSelected) { - setState( - Object.keys(state).reduce((blob, attr) => { - if (disabledAttributes.includes(attr)) blob[attr] = false - else blob[attr] = true - return blob - }, {} as CheckedType) - ) - } else { - setState( - Object.keys(state).reduce((blob, attr) => { - blob[attr] = false - return blob - }, {} as CheckedType) - ) - } - } - } - const moveRight = () => { - const checkedLeft = Object.entries(left) - .filter((a) => a[1]) - .reduce((blob, a) => { - blob[a[0]] = false - return blob - }, {} as CheckedType) - const nonCheckedLeft = Object.entries(left) - .filter((a) => !a[1]) - .reduce((blob, a) => { - blob[a[0]] = a[1] - return blob - }, {} as CheckedType) - setRight({ - ...right, - ...checkedLeft, - }) - setLeft(nonCheckedLeft) - } - const moveLeft = () => { - const checkedRight = Object.entries(right) - .filter((a) => a[1]) - .reduce((blob, a) => { - blob[a[0]] = false - return blob - }, {} as CheckedType) - const nonCheckedRight = Object.entries(right) - .filter((a) => !a[1]) - .reduce((blob, a) => { - blob[a[0]] = a[1] - return blob - }, {} as CheckedType) - setLeft({ - ...left, - ...checkedRight, - }) - setRight(nonCheckedRight) - } - const hasLeftChecked = Object.entries(left).find((a) => a[1]) !== undefined - const hasRightChecked = Object.entries(right).find((a) => a[1]) !== undefined - const startOver = () => { - dialogContext.setProps({ - open: true, - children: ( - - ), - }) - } - const totalPossible = startingLeft.length + startingRight.length - return ( - <> -
    - Manage Attributes - -
    - - - - - - - - - - - - - - - - - - - - {hideEmpty !== undefined && ( - <> - setHideEmpty(e.target.checked)} - /> - } - label="Hide empty attributes in inspector" - style={{ paddingLeft: '10px' }} - /> -
    - - )} - - - - {mode === 'saving' ? ( - - ) : null} - - ) -} -export default hot(module)(TransferList) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/useCoordinateFormat.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/useCoordinateFormat.tsx deleted file mode 100644 index 3ab9fae3f1b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/tabs/metacard/useCoordinateFormat.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { useState, useEffect } from 'react' -import { convertWktToPreferredCoordFormat } from './coordinateConverter' -import { useBackbone } from '../../selection-checkbox/useBackbone.hook' -import user from '../../singletons/user-instance' - -const FLOATING_POINT_PAIR_REGEX = /[-+]?\d*\.?\d+\s[-+]?\d*\.?\d+/g - -/** - * Returns a function responsible for converting wkts to the user's preferred - * coordinate format - */ -const conversionHigherOrderFunction = () => (value: string) => - value.replace(FLOATING_POINT_PAIR_REGEX, convertWktToPreferredCoordFormat) - -/** - * Provides a hook for converting wkts to the user's preferred - * coordinate format - */ -const useCoordinateFormat = () => { - const [convert, setConverter] = useState(conversionHigherOrderFunction) - const { listenTo } = useBackbone() - - useEffect(() => { - const callback = () => setConverter(conversionHigherOrderFunction) - - listenTo( - user.get('user').get('preferences'), - 'change:coordinateFormat', - callback - ) - }, []) - - return convert -} - -export default useCoordinateFormat diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/theme/background-inheriting-div.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/theme/background-inheriting-div.tsx deleted file mode 100644 index f324ab0ebe8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/theme/background-inheriting-div.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' - -/** - * CSS is a bit lacking when it comes to inheriting backgrounds, so this let's the dev do so a bit easier - */ -const BackgroundInheritingDiv = (props: React.ComponentProps<'div'>) => { - const { style, ...otherProps } = props - const divRef = React.useRef(null) - const [background, setBackground] = React.useState(null as null | string) - React.useEffect(() => { - if (divRef.current) { - let parentColor = divRef.current as string | HTMLElement - while ( - typeof parentColor !== 'string' && - !parentColor.classList.contains('MuiPaper-root') - ) { - if (parentColor.parentElement) parentColor = parentColor.parentElement - } - if (typeof parentColor !== 'string') { - setBackground(getComputedStyle(parentColor).backgroundColor) - } - } - }, []) - return ( -
    - ) -} - -export default hot(module)(BackgroundInheritingDiv) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/theme/theme.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/theme/theme.tsx deleted file mode 100644 index dbb7a027aa3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/theme/theme.tsx +++ /dev/null @@ -1,649 +0,0 @@ -import * as React from 'react' -import { - createTheme, - ThemeProvider, - StyledEngineProvider, - darken, - // @ts-expect-error ts-migrate(6133) FIXME: 'getContrastRatio' is declared but its value is ne... Remove this comment to see the full error message - getContrastRatio, - Theme as ThemeInterface, - lighten, - alpha, - ThemeOptions, -} from '@mui/material/styles' -import { ThemeContext } from 'styled-components' -import { createGlobalStyle } from 'styled-components' -import { meetsContrastGuidelines } from 'polished' -import { useRemoveFocusStyle } from '../app/blueprint.adjust' - -type Theme = { - primary: string - secondary: string - background: string - navbar: string - panels: string - overlays: string - paper: string - tabs: string -} - -// // octo colors -// export const dark: Theme = { -// background: '#F38832', -// navbar: '#2B3A49', -// panels: '#3A4A54', -// overlays: '#475A66', -// paper: '#213137', -// primary: '#589dd5', -// secondary: '#589dd5', -// } - -export const dark: Theme = { - background: '#0B1821', - navbar: darken('#365160', 0.2), - panels: '#243540', // 243540 - overlays: darken('#365160', 0.1), - paper: darken('#365160', 0.2), - tabs: darken('#243540', 0.3), - primary: '#69E1E8', - secondary: '#2196f3', -} - -export const light: Theme = { - primary: '#3c6dd5', - secondary: '#2196f3', - background: '#E5E5E5', // elevation 0 - navbar: '#fafbfc', // elevation 8 - panels: '#FCFCFC', // elevation 6 - tabs: darken('#FCFCFC', 0.05), - overlays: '#FCFCFC', // elevation 16 - paper: '#FCFCFC', -} - -export const Elevations = { - navbar: 8, - background: 0, - paper: 2, - panels: 6, - overlays: 16, -} - -export const MuiOutlinedInputBorderClasses = - 'px-[14px] py-[8.5px] border rounded dark:border-white/20 border-black/20 dark:hover:border-white hover:border-black' - -const GlobalStyles = createGlobalStyle` - .ol-overlaycontainer-stopevent { - display: none; - } - a { - color: inherit !important; - } - *.outline-none, a.outline-none, a, button{ - outline: none !important; - } - span.highlight { - background-color: rgba(66, 110, 203, 0.40); - } - .MuiToolbar-root a, - .MuiToolbar-root .MuiBreadcrumbs-separator { - color: ${(props) => - props.palette.getContrastText(props.palette.primary.main)}; - } - .MuiDrawer-root a { - color: ${(props) => - props.palette.getContrastText(props.palette.background.paper)}; - } - .MuiTooltip-tooltip { - max-width: 50vw; - padding: 0px; - background-color: none; - } - .MuiFormControlLabel-labelPlacementStart { - margin-left: 0px; - } - @media (min-width: 600px) { - .MuiListItemIcon-root { - margin-left: 8px; - } - } - .lm_goldenlayout, .lm_content { - background: inherit; - } - .lm_splitter { - background: ${(props) => props.palette.background.default}; - opacity: 1; - } - .lm_splitter:hover { - background: ${(props) => props.palette.primary.main} !important; - } - .lm_stack{ - box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12); - background: ${(props) => - props.palette.mode === 'dark' - ? dark.panels - : light.panels} !important; - border-radius: 4px; - transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; - } - .lm_header { - z-index: 0 !important; - background: ${(props) => - props.palette.mode === 'dark' - ? dark.background - : light.background} !important; - } - .lm_tab.lm_active { - background: ${(props) => - props.palette.mode === 'dark' - ? dark.panels - : light.panels} !important; - box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12) !important; - } - .lm_tab, lm_tabs { - border-radius: 4px !important; - border-bottom-left-radius: 0px !important; - border-bottom-right-radius: 0px !important; - } - .lm_tab:not(.lm_active) { - color: ${(props) => - props.palette.mode === 'dark' - ? props.palette.text.secondary - : props.palette.text.secondary} !important; - background: ${(props) => - props.palette.mode === 'dark' ? dark.tabs : light.tabs} !important; - button { - visibility: hidden; - } - } - .lm_tabs .lm_tab { - border: 1px solid fade(@contrastColor, 10%); - margin-right: 8px !important; - box-shadow: none !important; - padding: 0px !important; - height: 44px !important; - minWidth: 44px !important; - } - .lm_tabs .lm_tab:hover { - color: ${(props) => props.palette.text.primary} !important; - } - .lm_header, - .lm_tabs .lm_tab, - .lm_tabdropdown:before { - color: ${(props) => props.palette.text.primary} !important; - } - .is-drawing [role="tooltip"], .is-drawing .MuiPopover-root { - display: none!important; - } - [role="tooltip"] { - z-index: 101 !important; - pointer-events: all !important; - } - .bp3-portal { - z-index: 101 !important; - } - .bp3-popover-wrapper,.bp3-popover-target, .bp3-control-group { - width: 100%; - } - .bp3-control-group { - flex-wrap: wrap; - } - .bp3-control-group > div:first-of-type::after { - content: 'and'; - display:block; - position: absolute; - left: 14px; - bottom: -25px; - } - .bp3-control-group > div:nth-of-type(2) { - margin-top: 30px; - } - .bp3-input-group input { - background: transparent !important; - box-shadow: none !important; - font-size: 1.1428571428571428rem !important; - padding: 0px !important; - height: 1.3125rem !important; - line-height: 1.15 !important; - } - .bp3-popover .bp3-popover-content, .bp3-popover .bp3-popover-content, .bp3-datepicker, .bp3-menu{ - background: ${(props) => props.palette.background.paper} !important; - } - .bp3-popover-arrow { - display: none !important; - } - .bp3-datepicker .DayPicker-Day.DayPicker-Day--selected, .bp3-active { - background-color: ${(props) => props.palette.primary.dark} !important; - } - .bp3-table-quadrant, .bp3-table-cell-client, .bp3-table-row-headers { - background: inherit !important; - } - // for whatever reason they have a height of 0 sometimes, maybe MUI will fix this in v5 - textarea.MuiInputBase-input { - min-height: 21px; - } - .MuiPaper-box-shadow { - box-shadow: 0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12); - } - .MuiPaper-elevation0 { - background-color: ${(props) => - props.palette.mode === 'dark' ? dark.background : light.background}; - } - .MuiPaper-elevation8 { - background-color: ${(props) => - props.palette.mode === 'dark' ? dark.navbar : light.navbar}; - } - .MuiPaper-elevation6 { - background-color: ${(props) => - props.palette.mode === 'dark' ? dark.panels : light.panels}; - } - .MuiPaper-elevation16 { - background-color: ${(props) => - props.palette.mode === 'dark' ? dark.overlays : light.overlays}; - } - .MuiPaper-elevation2 { - border-width: 1px; - border-style: solid; - border-color: ${(props) => - props.palette.mode === 'dark' - ? props.palette.divider - : props.palette.divider}; - background-color: ${(props) => - props.palette.mode === 'dark' ? dark.paper : light.paper}; - } - [data-behavior-dropdown] { - background-color: ${(props) => - props.palette.mode === 'dark' ? dark.overlays : light.overlays}; - } - .font-awesome-span { - && { - font-size: 1.4rem; - font-family: 'Open Sans', arial, sans-serif; - } - /* stylelint-disable */ - &::before { - font-family: 'FontAwesome'; - margin-left: 2px; - margin-right: 5px; - } - } - ::-webkit-scrollbar { - width: 8px; - height: 8px; - } - ::-webkit-scrollbar-track { - background: ${(props) => - props.palette.mode === 'dark' - ? 'rgb(30, 44, 53)' - : 'rgb(229, 229, 229)'}; - } - ::-webkit-scrollbar-thumb { - background: ${(props) => - props.palette.mode === 'dark' - ? 'linear-gradient(-180deg, rgb(229, 229, 229) 0%, rgb(206, 206, 206) 100%)' - : 'linear-gradient(-180deg, rgb(153, 153, 153) 0%, rgb(187, 187, 187) 100%)'}; - border-radius: 4px; - } - // fix an issue where focus is applied because of blueprint to popover papers - .MuiPaper-root:focus { - outline: none; - } - // Fix Mui styles - .MuiButton-endIcon { - margin-left: 0px; - margin-right: 0px; - } - .MuiButton-iconSizeSmall > svg { - font-size: 18px; - margin-top: 1px; - } - // Mui tailwind style - .Mui-icon-size-small { - font-size: 18px; - } - [disabled] .Mui-text-text-primary, - [disabled] .Mui-text-primary, - [disabled] .Mui-text-secondary { - color: ${(props) => - props.palette.mode === 'dark' - ? 'rgba(255, 255, 255, 0.3)' - : 'rgba(0, 0, 0, 0.26)'}; - } - .Mui-text-text-primary { - color: ${(props) => props.palette.text.primary}; - } - .Mui-text-primary { - color: ${(props) => props.palette.primary.main}; - } - .Mui-text-secondary { - color: ${(props) => props.palette.secondary.main}; - } - .Mui-text-warning { - color: ${(props) => props.palette.warning.main}; - } - .Mui-text-error { - color: ${(props) => props.palette.error.main}; - } - .Mui-bg-default { - background-color: ${(props) => props.palette.background.default}; - } - .Mui-bg-primary { - background-color: ${(props) => props.palette.primary.main}; - } - .Mui-bg-secondary { - background-color: ${(props) => props.palette.secondary.main}; - } - .Mui-bg-divider { - background-color: ${(props) => props.palette.divider}; - } - .Mui-border-divider { - border-color: ${(props) => props.palette.divider}; - } - .Mui-bg-button:hover, - .Mui-bg-button:focus-within { - background: ${(props) => - props.palette.mode === 'dark' - ? 'rgba(255, 255, 255, 0.08)' - : 'rgba(0, 0, 0, 0.04)'}; - } - .theme-bg-overlays { - background: ${(props) => - props.palette.mode === 'dark' ? dark.overlays : light.overlays}; - } - .children-max-h-full { - > * { - max-height: 100%; - } - } - .children-h-full { - > * { - height: 100%; - } - } - .children-block { - > * { - display: block; - } - } - .children-p-0 { - > * { - padding: 0px; - } - } - // idea is to have this track with subtracting margin / padding - .max-w-full-1 { - max-width: calc(100% - 2*0.25rem); - } - .max-w-full-2 { - max-width: calc(100% - 2*0.5rem); - } - .max-w-full-3 { - max-width: calc(100% - 2*0.75rem); - } - .max-w-full-4 { - max-width: calc(100% - 2*1rem); - } - .min-w-32 { - min-width: 8rem; - } - .min-w-16 { - min-width: 4rem; - } - ` - -const lightenUntilContrasting = (color: string, background: string): string => { - const passes = meetsContrastGuidelines(color, background) - if (passes.AA) { - return color - } - return lightenUntilContrasting(lighten(color, 0.1), background) -} - -const darkenUntilContrasting = (color: string, background: string): string => { - const passes = meetsContrastGuidelines(color, background) - if (passes.AA) { - return color - } - return darkenUntilContrasting(darken(color, 0.1), background) -} - -// https://stackoverflow.com/questions/72720524/typescript-react-mui-use-custom-color-on-button-component -declare module '@mui/material' { - interface ButtonPropsColorOverrides { - grey: true - } -} - -export const Provider = ({ children }: { children: any }) => { - const styledTheme = React.useContext(ThemeContext) - const darkMode = styledTheme.theme === 'dark' - const paperColor = darkMode ? dark.paper : light.paper - const backgroundColor = darkMode ? dark.background : light.background - const customPalette = - styledTheme.palette === 'custom' && - styledTheme.primary && - styledTheme.secondary - const primaryMain = customPalette - ? styledTheme.primary - : darkMode - ? dark.primary - : light.primary - const secondaryMain = customPalette - ? styledTheme.secondary - : darkMode - ? dark.secondary - : light.secondary - const primaryContrastScores = meetsContrastGuidelines( - paperColor, - primaryMain! - ) - const secondaryContrastScores = meetsContrastGuidelines( - paperColor, - secondaryMain - ) - const failedContrastPrimaryReplacement = darkMode - ? lightenUntilContrasting(primaryMain, paperColor) - : darkenUntilContrasting(primaryMain, paperColor) - const failedContrastSecondaryReplacement = darkMode - ? lightenUntilContrasting(secondaryMain, paperColor) - : darkenUntilContrasting(secondaryMain, paperColor) - - /** - * Specify theme settings that don't need variables from theme - * - * We do things like the typography here because otherwise the defaults get applied to each individual typography component, - * meaning we'd have to specify overrides for each one. - */ - const initialTheme = createTheme({ - palette: { - mode: darkMode ? 'dark' : 'light', - primary: { - main: primaryMain, - }, - secondary: { - main: secondaryMain, - }, - background: { - default: backgroundColor, - paper: paperColor, - }, - grey: { - // We do this to emulate v4 MUI behavior for default button color - // @ts-ignore - main: '#fff', - }, - }, - // Typography must be set here to ensure all components use the same font - typography: { - fontFamily: `'Open Sans', arial, sans-serif`, - button: { - textTransform: 'none', - }, - }, - zIndex: { - mobileStepper: 101, - appBar: 101, - drawer: 101, - modal: 101, - snackbar: 101, - tooltip: 101, - fab: 101, - speedDial: 101, - }, - }) - - /** - * We split these out to so that we can access theme variables within our custom theme - */ - const themeBasedTheme: ThemeOptions = { - components: { - MuiChip: { - styleOverrides: { - root: { - fontSize: '1rem', - }, - }, - }, - MuiButton: { - defaultProps: { - size: 'small', - color: 'grey', - }, - variants: [ - { - props: { variant: 'contained', color: 'grey' }, - style: { - color: initialTheme.palette.getContrastText( - initialTheme.palette.grey[300] - ), - }, - }, - { - props: { variant: 'outlined', color: 'grey' }, - style: { - color: initialTheme.palette.text.primary, - borderColor: - initialTheme.palette.mode === 'light' - ? 'rgba(0, 0, 0, 0.23)' - : 'rgba(255, 255, 255, 0.23)', - '&.Mui-disabled': { - border: `1px solid ${initialTheme.palette.action.disabledBackground}`, - }, - '&:hover': { - borderColor: - initialTheme.palette.mode === 'light' - ? 'rgba(0, 0, 0, 0.23)' - : 'rgba(255, 255, 255, 0.23)', - backgroundColor: alpha( - initialTheme.palette.text.primary, - initialTheme.palette.action.hoverOpacity - ), - }, - }, - }, - { - props: { color: 'grey', variant: 'text' }, - style: { - color: initialTheme.palette.text.primary, - '&:hover': { - backgroundColor: alpha( - initialTheme.palette.text.primary, - initialTheme.palette.action.hoverOpacity - ), - }, - }, - }, - ], - styleOverrides: { - root: { - lineHeight: 'inherit', // maybe open a ticket on MUI, seems like the default they use doesn't center text quite right with icons - minWidth: '0px', // usually more annoying than not - }, - ...(primaryContrastScores.AA - ? { textPrimary: {} } // weird requirement due to types, need textPrimary here but empty - : { - textPrimary: { - color: failedContrastPrimaryReplacement, - '&:hover': { - backgroundColor: alpha( - failedContrastPrimaryReplacement, - 0.1 - ), - // Reset on touch devices, it doesn't add specificity - '@media (hover: none)': { - backgroundColor: 'transparent', - }, - }, - }, - }), - ...(secondaryContrastScores.AA - ? { textSecondary: {} } // weird requirement due to types, need textPrimary here but empty - : { - textSecondary: { - color: failedContrastSecondaryReplacement, - '&:hover': { - backgroundColor: alpha( - failedContrastSecondaryReplacement, - 0.1 - ), - // Reset on touch devices, it doesn't add specificity - '@media (hover: none)': { - backgroundColor: 'transparent', - }, - }, - }, - }), - }, - }, - MuiCardActionArea: { - styleOverrides: { - root: { - height: 'auto', - }, - }, - }, - MuiCardHeader: { - styleOverrides: { - content: { - minWidth: '0px', - }, - }, - }, - MuiPaper: { - styleOverrides: { - root: { backgroundImage: 'unset' }, - }, - }, - MuiTooltip: { - styleOverrides: { - tooltip: { - fontSize: '1rem', - }, - }, - }, - }, - } - - const theme = createTheme(initialTheme, themeBasedTheme) - - React.useEffect(() => { - const htmlElement = document.querySelector('html') as HTMLElement - if (styledTheme.theme === 'dark') { - htmlElement.classList.add('bp3-dark') - htmlElement.classList.add('theme-dark') - htmlElement.classList.add('dark') - } else { - htmlElement.classList.remove('bp3-dark') - htmlElement.classList.remove('theme-dark') - htmlElement.classList.remove('dark') - } - }, [styledTheme.theme]) - useRemoveFocusStyle() - return ( - <> - - - {children} - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/hooks.tsx deleted file mode 100644 index 1f120169f6c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/hooks.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import moment, { Moment } from 'moment-timezone' -import { useState } from 'react' -import { Timescale } from './types' - -const withinTimeScale = (newValues: Moment[], timescale: Timescale) => { - const domain = timescale.domain().map((value) => moment(value)) - - if (newValues.length === 0) { - return true - } else if (newValues.length === 1) { - return domain[0] < newValues[0] && newValues[0] < domain[1] - } else if (newValues.length === 2) { - return domain[0] < newValues[0] && newValues[1] < domain[1] - } else { - console.debug('selectionRange can have a maximum of two elements.') - return false - } -} - -export const useSelectionRange = ( - defaultValues: Moment[], - timescale: Timescale -): [Moment[], (newValue: Moment[]) => void] => { - const [values, setValues] = useState(defaultValues) - const setSelectionRange = (newValues: Moment[]) => { - if (withinTimeScale(newValues, timescale)) { - setValues(newValues) - } - } - - return [values, setSelectionRange] -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/index.tsx deleted file mode 100644 index bcb4bb3d339..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from './timeline' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/timeline.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/timeline.tsx deleted file mode 100644 index f219b90d614..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/timeline.tsx +++ /dev/null @@ -1,909 +0,0 @@ -import * as d3 from 'd3' -import * as React from 'react' -import { useEffect, useRef, useState } from 'react' -import { Tooltip, TooltipProps } from './tooltip' -import { - range, - formatDate, - dateWithinRange, - convertToDisplayable, - multiFormat, -} from './util' -import { useSelectionRange } from './hooks' -import _ from 'lodash' -import { Timescale } from './types' -import styled from 'styled-components' -import Select from '@mui/material/Select' -import MenuItem from '@mui/material/MenuItem' -import Button from '@mui/material/Button' -import { lighten } from 'polished' -import { readableColor } from 'polished' -import moment, { Moment } from 'moment-timezone' -// Constants -const AXIS_MARGIN = 20 -const AXIS_HEIGHT = 15 -// Color Theme -const ContextRow = styled.div` - display: flex; - justify-content: space-between; - margin-top: 10px; -` -const HoverLineText = styled.text` - fill: ${({ theme }) => readableColor(theme.backgroundContent)}; - font-family: 'Open Sans', sans-serif; - pointer-events: none; -` -const HoverLine = styled.line` - stroke: ${({ theme }) => theme.primaryColor}; - stroke-width: 3; - pointer-events: none; -` -const MarkerHover = styled.g` - :hover { - cursor: ew-resize; - } -` -const MarkerLine = styled.line<{ - hidden?: boolean -}>` - stroke: ${(props: any) => - !props.hidden - ? lighten(0.1, props.theme.primaryColor) - : 'rgba(0, 0, 0, 0)'}; - stroke-width: ${(props: any) => (!props.hidden ? 2 : 18)}; -` -const TimelineButton = styled(Button)<{ - icon?: boolean - color?: string -}>` - display: flex; - justify-content: center; - font-family: 'Open Sans', sans-serif; - min-width: 3rem; - height: 3rem; - - ${({ icon }) => - !icon && - ` - font-size: 1rem; - padding: 0px 20px; - margin-left: 15px !important; - `} :hover { - } - - :focus { - outline: none; - } -` -const DateAttributeSelect = styled(Select)<{ - visible?: boolean -}>` - margin: 10px; - visibility: ${(props: any) => (props.visible ? 'visible' : 'hidden')}; -` -const ButtonArea = styled.div` - margin: 10px; - display: flex; - justify-content: flex-end; - margin-right: 20px; - - button { - margin-left: 5px; - } -` -const Root = styled.div` - display: flex; - flex-direction: column; - - .brushBar { - /* This will let you select/hover records behind area, but can't brush-drag area if it's set. */ - pointer-events: none; - opacity: 0.5; - - /* If it's discovered that brush dragging is wanted more than hovering behind the highlighted brush area, - simply comment the above lines and uncomment this opacity */ - /* opacity: 0.1; */ - fill: ${({ theme }) => theme.primaryColor}; - display: none; - - :hover { - cursor: move; - fill: ${({ theme }) => theme.primaryColor}; - opacity: 0.5; - } - } - - .axis { - color: ${({ theme }) => readableColor(theme.backgroundContent)}; - font-size: 0.9rem; - :hover { - cursor: ew-resize; - } - } - - .selected { - fill: ${({ theme }) => theme.primaryColor} !important; - } - - .data { - fill: ${({ theme: { theme } }) => - theme === 'dark' ? lighten(0.7, 'black') : lighten(0.3, 'black')}; - fill-opacity: 0.7; - :hover { - stroke-width: 2px; - stroke: ${({ theme }) => theme.primaryColor}; - } - } -` -const TimeText = styled.div` - margin: 10px; - font-family: 'Open Sans', sans-serif; - text-align: center; - - br { - line-height: 150%; - } -` -const Message = styled.span` - font-family: 'Open Sans', sans-serif; - margin: 10px; - color: ${({ theme }) => readableColor(theme.backgroundContent)}; -` -// Helper Methods -const generateTooltipMessage = (data: string[]) => { - const titles = data.slice(0, 5).map((d) => { - return ( - - {d} -
    -
    - ) - }) - const otherResults = ( - -
    - {`+${data.length - 5} other results`} -
    - ) - return ( - - {titles} - {data.length > 5 && otherResults} - - ) -} -/** - * Given a d3 selection, set the display to none. - */ -const hideElement = (element: d3.Selection) => - element.attr('style', 'display: none') -/** - * Given a d3 selection, set the display to block. - */ -const showElement = (element: d3.Selection) => - element.attr('style', 'display: block') -/** - * Domain is the minimum and maximum values that the scale contains. - */ -const getTimescaleFromWidth = ( - width: number, - min: Moment = moment('1980-01-01:00:00.000z'), - max: Moment = moment() -): Timescale => { - const timeScale = d3.scaleUtc().domain([min, max]).nice() - timeScale.range([AXIS_MARGIN, width - AXIS_MARGIN]) - return timeScale -} -const getPossibleDateAttributes = (timelineItems: TimelineItem[]): string[] => { - return _(timelineItems) - .map((d) => d.attributes) //{created: {display: "Created", value: new Date()}} - .flatMap((o) => Object.keys(o)) //[created] - .uniq() - .value() -} -// Types -export type TimelineItem = { - id: string - selected: boolean - data?: any - attributes: { - [key: string]: Moment[] - } -} -type Bucket = { - x1: number - x2: number - selected: boolean - items: TimelineItem[] -} -export interface TimelineProps { - /** - * Height in pixels. - */ - height: number - /** - * Mode that the timeline should be in. - */ - mode?: 'single' | 'range' - /** - * Timezone to use when displaying times. - */ - timezone: string - /** - * Date format to use when displaying times. - */ - format: string - /** - * TimelineItem points - */ - data?: TimelineItem[] - /** - * Alias Map for date attributes - */ - dateAttributeAliases?: { - [key: string]: string - } - /** - * Called when the done button is clicked, providing the current selection range. - */ - onDone?: (selectionRange: Moment[]) => void - /** - * Called when the a selection is made. - */ - onSelect?: (data: TimelineItem[]) => void - /** - * Render function for tooltips - */ - renderTooltip?: (data: TimelineItem[]) => any - /** - * Height offset to combat issues with dynamic heights when rendering the timeline. - */ - heightOffset?: number - /** - * Called when a date is copied to the clipboard. - */ - onCopy?: (copiedValue: string) => void - /** - * Minimum date bounds to render items between. - */ - min?: Moment - /** - * Maximum date bounds to render items between. - */ - max?: Moment -} -/* - * TODOS - * -------------------- - * - * 1. On hover should work when the on hover is behind the area marker while still letting you brush drag (if possible) - */ -// Please see https://alignedleft.com/tutorials/d3/scales for more information about d3 scales. -export const Timeline = (props: TimelineProps) => { - /** - * The useRef Hook creates a variable that "holds on" to a value across rendering - * passes. In this case it will hold our component's SVG DOM element. It's - * initialized null and React will assign it later (see the return statement) - */ - const rootRef = useRef(null) - const d3ContainerRef = useRef(null) - const hoverLineRef = useRef(null) - const hoverLineTextRef = useRef(null) - const leftMarkerRef = useRef(null) - const rightMarkerRef = useRef(null) - const brushBarRef = useRef(null) - const { min, max } = props - const [width, setWidth] = useState(0) - const height = props.height - const heightOffset = props.heightOffset ? props.heightOffset : 0 - const possibleDateAttributes = getPossibleDateAttributes(props.data || []) - const timescale = getTimescaleFromWidth(width, min, max) - const [xScale, setXScale] = useState(() => timescale) - const [xAxis, setXAxis] = useState(() => - d3.axisBottom(xScale).tickSize(AXIS_HEIGHT).tickFormat(multiFormat) - ) - const [dataBuckets, setDataBuckets] = useState([]) - const [tooltip, setTooltip] = useState() - const [selectedDateAttribute, setSelectedDateAttribute] = useState('') - useEffect(() => { - if (selectedDateAttribute === '' && possibleDateAttributes.length > 0) { - setSelectedDateAttribute(possibleDateAttributes[0]) - } - }, [possibleDateAttributes]) - const [isDragging, setIsDragging] = useState(false) - const [selectionRange, setSelectionRange] = useSelectionRange([], timescale) - useEffect(() => { - if (width != 0) { - console.debug(`Width updated to ${width}`) - setXScale(() => timescale) - } - }, [width]) - useEffect(() => { - console.debug(`xScale updated to ${xScale.range()}`) - const [left, right] = xScale.range() - if (left < right) { - const newXAxis = xAxis.scale(xScale) - setXAxis(() => newXAxis) - d3.select('.axis--x').call(newXAxis) - } - }, [xScale, props.timezone, props.format]) - useEffect(() => { - if (rootRef.current) { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - const rect = rootRef.current.getBoundingClientRect() - setWidth(rect.width) - } - }, [rootRef]) - /** - * Every 100 ms, poll to see the new parent rect width. - * If the new parent rect width is different than current width, update the width. - */ - useEffect(() => { - const interval = setInterval(() => { - if (rootRef.current) { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - const rect = rootRef.current.getBoundingClientRect() - if (rect.width !== width) { - setWidth(rect.width) - clearInterval(interval) - } - } - }, 100) - }, [rootRef, width]) - useEffect(() => { - zoomBehavior.scaleTo( - d3.select(d3ContainerRef.current).transition().duration(0) as any, - 1 - ) - }, [width]) - const markerHeight = height - 70 - AXIS_HEIGHT - heightOffset - /** - * When a zoom event is triggered, use the transform event to create a new xScale, - * then create a new xAxis using the scale and update existing xAxis - */ - const handleZoom = () => { - // Tooltip sticks around without this. - setTooltip(null) - const transform = d3.event.transform - if (width != 0) { - const newXScale = transform.rescaleX(timescale) - setXScale(() => newXScale) - const newXAxis = xAxis.scale(newXScale) - setXAxis(() => newXAxis) - // Apply the new xAxis - d3.select('.axis--x').call(xAxis) - } - } - const zoomBehavior = d3 - .zoom() - .scaleExtent([1, 24 * 60 * 60]) // Allows selections down to the minute at full zoom - .translateExtent([ - [0, 0], - [width, height], - ]) - .extent([ - [0, 0], - [width, height], - ]) - .filter(() => { - // If event triggered below xAxis, let default zoom behavior handle it (allows panning by dragging on axis) - console.debug('Click/Drag Event: ', d3.event) - const axisOffset = heightOffset ? heightOffset - 50 : -10 - if (d3.event.layerY > height + AXIS_MARGIN - AXIS_HEIGHT - axisOffset) { - console.debug('Drag below xAxis, ignore') - return true - } else { - console.debug("Drag above xAxis, don't ignore") - } - const shouldFilterEvent = d3.event.type !== 'mousedown' - if (!shouldFilterEvent) { - console.debug('Ignoring event type: ', d3.event.type) - } - return shouldFilterEvent - }) - .on('zoom', handleZoom) - const zoomIn = () => { - zoomBehavior.scaleBy( - d3.select(d3ContainerRef.current).transition().duration(750) as any, - 2 - ) - } - const zoomOut = () => { - zoomBehavior.scaleBy( - d3.select(d3ContainerRef.current).transition().duration(750) as any, - 0.5 - ) - } - useEffect(() => { - /** - * Range is the range of possible output values used in display. - * Domain maps to Range - * i.e. Dates map to Pixels - */ - const renderInitialXAxis = () => { - const svg = d3 - .select(d3ContainerRef.current) - .attr('width', width) - .attr('height', height) - svg - .select('.axis--x') - .attr( - 'transform', - `translate(0 ${height - (AXIS_MARGIN + AXIS_HEIGHT + heightOffset)})` - ) - .call(xAxis) - } - if (d3ContainerRef.current) { - renderInitialXAxis() - const container = d3.select(d3ContainerRef.current) - container.call(zoomBehavior as any) - } - }, [height, width]) - // Add mouse handlers to listen to d3 mouse events - useEffect(() => { - // When the d3Container mousemove event triggers, show the hover line - d3.select(d3ContainerRef.current).on('mousemove', function () { - const coord = d3.mouse(this as any) - d3.select(hoverLineRef.current) - .attr('transform', `translate(${coord[0]}, ${markerHeight})`) - .attr('style', 'display: block') - const hoverDate = moment.tz(xScale.invert(coord[0]), props.timezone) - const formattedDate = formatDate(hoverDate, props.format) - const widthBuffer = 150 - const maxX = width - widthBuffer - let xPos = coord[0] - if (xPos < widthBuffer) xPos = widthBuffer - if (xPos > maxX) xPos = maxX - const yPos = 20 - d3.select(hoverLineTextRef.current) - .attr('transform', `translate(${xPos}, ${yPos})`) - .attr('style', 'display: block') - .attr('text-anchor', 'middle') - .text(formattedDate) - }) - // When the d3Container mouseleave event triggers, set the hoverValue to null and hide the hoverLine line - d3.select(d3ContainerRef.current).on('mouseleave', function () { - hideElement(d3.select(hoverLineRef.current)) - hideElement(d3.select(hoverLineTextRef.current)) - }) - }, [xScale, props.timezone, props.format, props.height]) - // Render rectangles - useEffect(() => { - const min = xScale.range()[0] - const max = xScale.range()[1] - const NUM_BUCKETS = Math.round(width / 30) // 30 is just a constant that I found to look good. - const bucketWidth = (max - min) / NUM_BUCKETS - const buckets: Bucket[] = range(NUM_BUCKETS).map((i) => ({ - x1: min + bucketWidth * i, - x2: min + bucketWidth * (i + 1), - items: [], - selected: false, - })) - if (props.data && selectedDateAttribute !== undefined) { - d3.selectAll('.data').remove() - props.data.forEach((d) => { - const date = d.attributes[selectedDateAttribute!] - if (date == null) { - return - } - const scaledDates = date.map((d) => xScale(d)) - scaledDates.forEach((scaledDate) => { - for (let i = 0; i < buckets.length; i++) { - const b = buckets[i] - if (b.x1 < scaledDate && scaledDate < b.x2) { - b.items.push(d) - if (d.selected) { - b.selected = true - } - break - } - } - }) - }) - const mostItemsInABucket = Math.max(...buckets.map((b) => b.items.length)) - const heightPerItem = (height - (heightOffset + 75)) / mostItemsInABucket - setDataBuckets(buckets) - buckets.forEach((b, i) => { - const rectangleHeight = b.items.length * heightPerItem - const x = (b.x1 + b.x2) / 2 - 15 - const y = - height - rectangleHeight - (AXIS_MARGIN + AXIS_HEIGHT + heightOffset) - d3.select('.data-holder') - .append('rect') - .attr('class', `data ${b.selected ? 'selected' : ''}`) - .attr('width', bucketWidth - 5) - .attr('height', rectangleHeight) - .attr('id', i) - .attr('transform', `translate(${x}, ${y})`) - .append('rect') - }) - } - }, [props.data, xScale, selectedDateAttribute, width, height]) - useEffect(() => { - d3.select('.data-holder') - .selectAll('.data') - .on('mouseleave', function () { - setTooltip(null) - }) - .on('mousemove', function () { - const id = (d3.select(this).node() as any).id - const x = d3.event.layerX - const y = d3.event.layerY - const tooltipInBounds = x <= width * 0.75 - setTooltip({ - // If the tooltip will overflow off the timeline, set x to left of the cursor instead of right. - x: tooltipInBounds ? x + 25 : x - width * 0.25, - y: y - 20, - message: props.renderTooltip - ? props.renderTooltip(dataBuckets[id].items) - : generateTooltipMessage(dataBuckets[id].items.map((d) => d.id)), - }) - }) - }, [dataBuckets]) - // If dragging is finished, update selected results. - useEffect(() => { - if ( - !isDragging && - props.data && - selectedDateAttribute !== undefined && - !props.mode - ) { - if (selectionRange.length == 2) { - const x1 = xScale(selectionRange[0]) - const x2 = xScale(selectionRange[1]) - // Prefilter to only buckets we care about - const bucketsContainingRelevantData = dataBuckets.filter( - (b) => - (x1 < b.x1 && b.x2 < x2) || - (b.x1 < x1 && x1 < b.x2) || - (b.x1 < x2 && x2 < b.x2) - ) - // Get the data inside those buckets that falls within the selection - const dataToSelect = _.flatMap( - bucketsContainingRelevantData, - (b) => b.items - ).filter((d) => - d.attributes[selectedDateAttribute!].some((moment) => - dateWithinRange(moment, selectionRange) - ) - ) - props.onSelect && props.onSelect(dataToSelect) - } - } - }, [isDragging]) - useEffect(() => { - /** - * - * Selection Drag does two things: - * 1. When the user drags across the timeline, a range selection will be created. - * 2. If the drag event is only 5 pixels or less from start to finish AND ends on a rect object, - * assume that the user meant to click instead of drag, and properly trigger a click action on the rect. - */ - const getSelectionDrag = () => { - let clickStart: number - return ( - d3 - .drag() - .on('start', () => { - clickStart = d3.event.x - const newLeftDate = moment.tz( - xScale.invert(clickStart), - props.timezone - ) - if (props.mode === 'single') { - setSelectionRange([newLeftDate]) - } else { - setIsDragging(true) - hideElement(d3.select(hoverLineRef.current)) - hideElement(d3.select(hoverLineTextRef.current)) - setSelectionRange([newLeftDate]) - } - }) - // Set isDragging to false to trigger a selection update, additionally check if user meant to click. - .on('end', () => { - if (!props.mode) { - showElement(d3.select(hoverLineRef.current)) - setIsDragging(false) - const clickDistance = clickStart - d3.event.x - const sourceEvent = d3.event.sourceEvent - if (Math.abs(clickDistance) < 5) { - const nodeName = sourceEvent.srcElement.nodeName - setSelectionRange([]) - if (nodeName === 'rect' || nodeName === 'line') { - const x = d3.event.x - const bucket = dataBuckets.find((b) => b.x1 < x && x <= b.x2) - bucket && props.onSelect && props.onSelect(bucket.items) - } - } - } - }) - .on('drag', () => { - if (props.mode !== 'single') { - const diff = d3.event.x - d3.event.subject.x - const initialDate = moment.tz( - xScale.invert(clickStart), - props.timezone - ) - let dragCurrent = clickStart + diff - const dragDate = moment.tz( - xScale.invert(dragCurrent), - props.timezone - ) - if (diff > 0) { - setSelectionRange([initialDate, dragDate]) - } else { - setSelectionRange([dragDate, initialDate]) - } - } - }) as any - ) - } - d3.select(d3ContainerRef.current).call(getSelectionDrag()) - }, [dataBuckets, selectionRange, xScale, props.timezone, props.format]) - useEffect(() => { - /** - * Creates the drag behavior used when selecting the left or right slider. - * - * Validation for sliders: - * - Left slider cannot be within 10 pixels of the right slider. - * - Right slider cannot be within 10 pixels of the left slider. - * - * @param slider - Which slider the drag behavior should affect. - */ - const getEdgeDrag = (slider: 'LEFT' | 'RIGHT') => - d3 - .drag() - .on('start', () => { - hideElement(d3.select(hoverLineRef.current)) - hideElement(d3.select(hoverLineTextRef.current)) - setIsDragging(true) - }) - .on('end', () => setIsDragging(false)) - .on('drag', () => { - const dragValue = xScale.invert(d3.event.x) - const dateWithTimezone = moment.tz(dragValue, props.timezone) - const BUFFER = 10 // Buffer in pixels to keep sliders from overlapping/crossing - if (slider === 'LEFT') { - const maximumX = xScale(selectionRange[1]) - BUFFER - if (d3.event.x <= maximumX) { - setSelectionRange([dateWithTimezone, selectionRange[1]]) - } - } else if (slider === 'RIGHT') { - const minimumX = xScale(selectionRange[0]) + BUFFER - if (d3.event.x >= minimumX) { - setSelectionRange([selectionRange[0], dateWithTimezone]) - } - } - }) as any - d3.select(leftMarkerRef.current).call(getEdgeDrag('LEFT')) - d3.select(rightMarkerRef.current).call(getEdgeDrag('RIGHT')) - }, [xScale, selectionRange, props.timezone]) - useEffect(() => { - /** - * Create the drag behavior used when selecting the middle area between a range. - * - * NOTE: This will not be used if .brushBar class has 'pointer-events: none' set, as the events will never be hit. - */ - const getBrushDrag = () => - d3 - .drag() - .on('start', () => { - setIsDragging(true) - hideElement(d3.select(hoverLineRef.current)) - hideElement(d3.select(hoverLineTextRef.current)) - }) - .on('end', () => setIsDragging(false)) - .on('drag', () => { - const value = d3.event.x - d3.event.subject.x - const currentLeft = xScale(selectionRange[0]) - const currentRight = xScale(selectionRange[1]) - const newLeft = currentLeft + value - const newRight = currentRight + value - const newLeftDate = moment.tz(xScale.invert(newLeft), props.timezone) - const newRightDate = moment.tz( - xScale.invert(newRight), - props.timezone - ) - setSelectionRange([newLeftDate, newRightDate]) - }) as any - d3.select(brushBarRef.current).call(getBrushDrag()) - }, [xScale, selectionRange, props.timezone]) - // When the selection range is changed or the scale changes update the left, right, and brush markers - useEffect(() => { - if ( - leftMarkerRef.current && - rightMarkerRef.current && - brushBarRef.current - ) { - const leftMarker = d3.select(leftMarkerRef.current) - const rightMarker = d3.select(rightMarkerRef.current) - const brushBar = d3.select(brushBarRef.current) - if (props.mode === 'single' && selectionRange.length === 1) { - const leftMarker = d3.select(leftMarkerRef.current) - const leftValue = selectionRange[0] - leftMarker - .attr('transform', `translate(${xScale(leftValue)}, ${markerHeight})`) - .attr('style', 'display: block') - } else if (props.mode !== 'single' && selectionRange.length == 2) { - const [leftValue, rightValue] = selectionRange - leftMarker - .attr('transform', `translate(${xScale(leftValue)}, ${markerHeight})`) - .attr('style', 'display: block') - rightMarker - .attr( - 'transform', - `translate(${xScale(rightValue)}, ${markerHeight})` - ) - .attr('style', 'display: block') - brushBar - .attr('transform', `translate(${xScale(leftValue)},${markerHeight})`) - .attr('width', xScale(rightValue) - xScale(leftValue)) - .attr('height', '50') - .attr('style', 'display: block') - } else { - hideElement(leftMarker as any) - hideElement(rightMarker as any) - hideElement(brushBar as any) - } - } - }, [xScale, selectionRange, props.mode, props.height, props.timezone]) - const renderCopyableDate = (date: Moment) => { - const formattedDate = convertToDisplayable( - date, - props.timezone, - props.format - ) - return ( - <> -
    - - - ) - } - const renderContext = () => { - const renderStartAndEnd = () => ( - - - Start - {selectionRange[0] && renderCopyableDate(selectionRange[0])} - - - End - {selectionRange[1] && renderCopyableDate(selectionRange[1])} - - - ) - // Single States - Empty, Single Time - if (props.mode === 'single') { - if (!selectionRange[0]) { - return ( - Click to select a time. Zoom with the scroll wheel. - ) - } - return ( - - Time - {selectionRange[0] && renderCopyableDate(selectionRange[0])} - - ) - // Range States - Empty, Range of Times - } else if (props.mode === 'range') { - if (!selectionRange[0]) { - return ( - Drag to select a range. Zoom with the scroll wheel. - ) - } - return renderStartAndEnd() - // Selection States - Empty, Start Time, Start + End Times - } else { - if (!selectionRange[0]) { - return ( - - Click to select a cluster of results. Zoom with the scroll wheel. - - ) - } - return renderStartAndEnd() - } - } - const lookupAlias = (attribute: string) => { - const { dateAttributeAliases } = props - if (dateAttributeAliases && dateAttributeAliases[attribute]) { - return dateAttributeAliases[attribute] - } else { - return attribute - } - } - return ( - -
    - 0} - variant="outlined" - onChange={(e: any) => setSelectedDateAttribute(e.target.value)} - value={selectedDateAttribute} - > - {possibleDateAttributes.map((dateAttribute: string) => ( - - {lookupAlias(dateAttribute)} - - ))} - -
    - {tooltip && ( - - )} - - - - - - - - - - - - - - - - - - - - - - - - - - {renderContext()} - - zoomOut()} icon> - - - - zoomIn()} icon> - + - - {props.onDone && props.mode && ( - { - props.onDone && props.onDone(selectionRange) - setSelectionRange([]) - }} - > - Done - - )} - - -
    - ) -} -export default Timeline diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/tooltip.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/tooltip.tsx deleted file mode 100644 index 7d7a3e92411..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/tooltip.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import * as React from 'react' -import styled from 'styled-components' - -const Root = styled.div<{ pos: { x: number; y: number } }>` - position: absolute; - top: ${(props: any) => props.pos.y}px; - left: ${(props: any) => props.pos.x}px; - color: white; - background-color: rgba(0, 0, 0, 0.7); - max-width: 30%; - border-radius: 8px; - padding: 10px; - z-index: 1; - pointer-events: none; -` - -export type TooltipProps = { - x: number - y: number - message: string | any -} - -export const Tooltip = (props: TooltipProps) => { - const { x, y, message } = props - return ( - - {message} - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/types.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/types.tsx deleted file mode 100644 index 1dfe5bb35cf..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/types.tsx +++ /dev/null @@ -1 +0,0 @@ -export type Timescale = d3.ScaleTime diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/util.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/util.tsx deleted file mode 100644 index f7583011eec..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/timeline/util.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import * as d3 from 'd3' -import moment, { Moment } from 'moment-timezone' -import { TimelineItem } from './timeline' -import user from '../singletons/user-instance' - -/** Python's "range" function */ -export const range = (n: number) => Array.from(Array(n).keys()) - -const getDataPoint = ( - num: number, - createdYear: number, - modifiedYear: number, - publishedYear: number -) => { - const month = Math.floor(Math.random() * 12) - const year = Math.floor(Math.random() * 40) - const day = Math.floor(Math.random() * 28) - - return { - id: `Result ${(num + 1).toString()}`, - selected: false, - attributes: { - created: [ - moment(new Date(createdYear + year, 0, 1)) - .add(month, 'months') - .add(day, 'days'), - ], - - modified: [moment(new Date(modifiedYear + year, 0, 1))], - - published_date: [ - moment(new Date(publishedYear + year, 0, 1)).add(day, 'days'), - ], - }, - } -} - -export const createTestData = (n: number): TimelineItem[] => { - if (typeof n !== 'number' || n < 1) { - return [] - } - - return range(n).map((num) => getDataPoint(num, 1980, 1983, 1987)) -} - -export const formatDate = (value: Moment, format: string) => - value.format(format) - -export const convertToDisplayable = ( - value: Moment, - timezone: string, - format: string -) => moment(value).tz(timezone).format(format) - -export const dateWithinRange = (date: Moment, range: Moment[]) => - range[0] < date && date < range[1] - -const is12HourFormat = (format: string) => format.includes('h') - -const timeFormat = (format: string) => { - return (date: Date) => moment(date).tz(user.getTimeZone()).format(format) -} - -const formatMillisecond = timeFormat(':SSS') -const formatSecond = timeFormat(':ss') -const formatDay = timeFormat('ddd DD') -const formatWeek = timeFormat('MMM DD') -const formatMonth = timeFormat('MMMM') -const formatYear = timeFormat('YYYY') - -export const multiFormat = (date: Date) => { - if (d3.utcSecond(date) < date) { - return formatMillisecond(date) // milliseconds :259 - } else if (d3.utcMinute(date) < date) { - return formatSecond(date) // seconds :59 - } else if (d3.utcHour(date) < date) { - const formatMinute = is12HourFormat(user.getDateTimeFormat()) - ? timeFormat('hh:mm') - : timeFormat('HH:mm') - return formatMinute(date) // 12:00 - } else if (d3.utcDay(date) < date) { - const formatHour = is12HourFormat(user.getDateTimeFormat()) - ? timeFormat('hh A') - : timeFormat('HH:mm') - return formatHour(date) // 12 AM or 12:00 - } else if (d3.utcMonth(date) < date) { - if (d3.utcWeek(date) < date) { - return formatDay(date) // Wed 08 - } else { - return formatWeek(date) // Feb 08 - } - } else if (d3.utcYear(date) < date) { - return formatMonth(date) // February - } else { - return formatYear(date) // 2003 - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-batch-item/upload-batch-item.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-batch-item/upload-batch-item.view.tsx deleted file mode 100644 index 51867d78d9f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-batch-item/upload-batch-item.view.tsx +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import user from '../singletons/user-instance' -import { UploadSummaryViewReact } from '../upload-summary/upload-summary.view' -import { Link } from 'react-router-dom' -import * as React from 'react' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import Button from '@mui/material/Button' -import Paper from '@mui/material/Paper' -import CloseIcon from '@mui/icons-material/Close' -import Common from '../../js/Common' -import { TypedUserInstance } from '../singletons/TypedUser' - -export const UploadBatchItemViewReact = ({ model }: { model: any }) => { - const [modelJson, setModelJson] = React.useState(model.toJSON()) - useListenTo(model, 'change:finished', () => { - setModelJson(model.toJSON()) - }) - const { id, finished, sentAt, interrupted } = modelJson - const when = Common.getRelativeDate(sentAt) - const specificWhen = TypedUserInstance.getMomentDate(sentAt) - - return ( - - -
    -
    - - {when} -
    -
    - -
    -
    - -
    - {finished || interrupted ? ( - <> - - - ) : ( - <> - - - )} -
    -
    - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-item/upload-item.collection.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-item/upload-item.collection.view.tsx deleted file mode 100644 index 8240ec8257a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-item/upload-item.collection.view.tsx +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import UploadItemViewReact from './upload-item.view' - -type UploadItemCollectionType = { - collection: any -} - -export const UploadItemCollection = ({ - collection, -}: UploadItemCollectionType) => { - const [, setForceRender] = React.useState(Math.random()) - useListenTo(collection, 'add remove reset', () => { - setForceRender(Math.random()) - }) - return ( -
    - {collection.models.map((model: any) => { - return - })} -
    - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-item/upload-item.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-item/upload-item.view.tsx deleted file mode 100644 index 99197cff320..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-item/upload-item.view.tsx +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import LinearProgress from '@mui/material/LinearProgress' -import { useHistory } from 'react-router-dom' -type UploadItemViewReactType = { - model: any -} -const modelToJSON = (model: any) => { - const modelJSON = model.toJSON() - modelJSON.file = { - name: modelJSON.file.name, - size: (modelJSON.file.size / 1000000).toFixed(2) + 'MB, ', - type: modelJSON.file.type, - } - return modelJSON -} -export const UploadItemViewReact = ({ model }: UploadItemViewReactType) => { - const history = useHistory() - const [modelJson, setModelJson] = React.useState(modelToJSON(model)) - const [cancel, setCancel] = React.useState(false) - useListenTo( - model, - 'change:percentage change:sending change:success change:error change:validating change:issues', - () => { - setModelJson(modelToJSON(model)) - } - ) - React.useEffect(() => { - if (cancel && model) { - model.cancel() - } - }, [cancel, model]) - const isSending = modelJson.sending - const hasError = modelJson.error - const hasSuccess = modelJson.success - const hasIssues = modelJson.issues - const isValidating = modelJson.validating - return ( -
    { - if (model.get('success') && !model.hasChildren()) { - history.push({ - pathname: `/metacards/${model.get('id')}`, - }) - } - }} - > -
    -
    -
    - {modelJson.file.name} -
    -
    -
    - {modelJson.file.size} - {modelJson.file.type} -
    -
    {Math.floor(modelJson.percentage) + '%'}
    -
    -
    - {!hasSuccess && !hasError && isSending ? ( - - ) : null} - - {hasSuccess ? ( -
    -
    - {hasIssues ? ( - Uploaded, but quality issues were found - ) : ( - <> - )} - {isValidating ? ( - - ) : ( - <> - )} - {hasIssues ? : <>} -
    -
    - ) : null} - {hasError ? ( -
    -
    {modelJson.message}
    -
    - ) : null} -
    - -
    - {!isSending ? ( - - ) : null} - - {hasSuccess ? ( - - ) : ( - <> - )} - - {hasError ? ( - <> -
    Failures
    - - ) : ( - <> - )} -
    -
    - ) -} -export default hot(module)(UploadItemViewReact) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-summary/upload-summary.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-summary/upload-summary.view.tsx deleted file mode 100644 index ead74f98b68..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/upload-summary/upload-summary.view.tsx +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { useListenTo } from '../selection-checkbox/useBackbone.hook' -import LinearProgress from '@mui/material/LinearProgress' -import Button from '@mui/material/Button' -import { useHistory } from 'react-router-dom' -type UploadSummaryViewReactType = { - model: any -} -export const UploadSummaryViewReact = ({ - model, -}: UploadSummaryViewReactType) => { - const history = useHistory() - const [modelJson, setModelJson] = React.useState(model.toJSON()) - useListenTo( - model, - 'change:amount change:errors change:complete change:percentage change:sending change:issues', - () => { - setModelJson(model.toJSON()) - } - ) - const { - amount, - complete, - percentage, - success, - sending, - error, - issues, - interrupted, - finished, - } = modelJson - const isSending = sending - const hasError = error - const hasSuccess = success - const hasIssues = issues > 0 - const wasInterrupted = interrupted - return ( - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/user/utils.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/user/utils.tsx deleted file mode 100644 index 697fba9de29..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/user/utils.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import userInstance from '../singletons/user-instance' - -export const DEFAULT_DATE_TIME_FORMAT = 'DD MMMM YYYY h:mm a Z' - -export const getDateTimeFormat = () => { - try { - const dateTimeFormat = userInstance - .get('user') - .get('preferences') - .get('dateTimeFormat').datetimefmt - - return dateTimeFormat || DEFAULT_DATE_TIME_FORMAT - } catch (err) { - console.error( - "Unable to retrieve user's prefered datetime format. Retrieving default datetime format.", - err - ) - return DEFAULT_DATE_TIME_FORMAT - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/histogram/add-on-helpers.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/histogram/add-on-helpers.tsx deleted file mode 100644 index 0402c403e93..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/histogram/add-on-helpers.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import extension from '../../../extension-points' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' - -export type CustomHover = { - text: string - bgColor: string - fontColor: string -} - -export const getCustomHover = ( - results: LazyQueryResult[], - defaultHoverlabel: { bgcolor: string; font: { color: string } } -) => { - const defaultHover = { - text: '', - bgColor: defaultHoverlabel.bgcolor, - fontColor: defaultHoverlabel.font.color, - } - - if (!extension.customHistogramHover) return defaultHover - - return ( - extension.customHistogramHover({ - results, - }) || defaultHover - ) -} - -export const getCustomHoverTemplates = ( - name: string, - customHoverArray: CustomHover[] -) => { - return customHoverArray.map( - (customHover: CustomHover) => - `%{y} ${name}${customHover.text}` - ) -} - -export const getCustomHoverLabels = (customHoverArray: CustomHover[]) => { - return { - bgcolor: customHoverArray.map((customHover) => customHover.bgColor), - font: { - color: customHoverArray.map((customHover) => customHover.fontColor), - }, - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/histogram/histogram.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/histogram/histogram.tsx deleted file mode 100644 index 3693c63fb9a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/histogram/histogram.tsx +++ /dev/null @@ -1,677 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks' -import { LazyQueryResults } from '../../../js/model/LazyQueryResult/LazyQueryResults' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { useBackbone } from '../../selection-checkbox/useBackbone.hook' -import { useSelectedResults } from '../../../js/model/LazyQueryResult/hooks' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import _cloneDeep from 'lodash.clonedeep' -import wreqr from '../../../js/wreqr' -import $ from 'jquery' -import _ from 'underscore' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'plot... Remove this comment to see the full error message -import Plotly from 'plotly.js/dist/plotly' -import moment from 'moment' -import extension from '../../../extension-points' -import { useTheme } from '@mui/material/styles' -import { - CustomHover, - getCustomHoverLabels, - getCustomHoverTemplates, - getCustomHover, -} from './add-on-helpers' -import { StartupDataStore } from '../../../js/model/Startup/startup' -const zeroWidthSpace = '\u200B' -const plotlyDateFormat = 'YYYY-MM-DD HH:mm:ss.SS' -function getPlotlyDate(date: string) { - return moment(date).format(plotlyDateFormat) -} -function calculateAvailableAttributes(results: LazyQueryResult[]) { - let availableAttributes = [] as string[] - results.forEach((result) => { - availableAttributes = _.union( - availableAttributes, - Object.keys(result.plain.metacard.properties) - ) - }) - return availableAttributes - .filter( - (attribute) => - !StartupDataStore.MetacardDefinitions.isHiddenAttribute(attribute) - ) - .map((attribute) => ({ - label: StartupDataStore.MetacardDefinitions.getAlias(attribute), - value: attribute, - })) -} -function calculateAttributeArray({ - results, - attribute, -}: { - results: LazyQueryResult[] - attribute: string -}) { - const values = [] as string[] - results.forEach((result) => { - if ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] - .multivalued - ) { - const resultValues = result.plain.metacard.properties[attribute] - if (resultValues && resultValues.forEach) { - resultValues.forEach((value: any) => { - addValueForAttributeToArray({ valueArray: values, attribute, value }) - }) - } else { - addValueForAttributeToArray({ - valueArray: values, - attribute, - value: resultValues, - }) - } - } else { - addValueForAttributeToArray({ - valueArray: values, - attribute, - value: result.plain.metacard.properties[attribute], - }) - } - }) - return values -} -function findMatchesForAttributeValues( - results: LazyQueryResult[], - attribute: string, - values: any[] -) { - return results.filter((result) => { - if ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] - .multivalued - ) { - const resultValues = result.plain.metacard.properties[attribute] - if (resultValues && resultValues.forEach) { - for (let i = 0; i < resultValues.length; i++) { - if (checkIfValueIsValid(values, attribute, resultValues[i])) { - return true - } - } - return false - } else { - return checkIfValueIsValid(values, attribute, resultValues) - } - } else { - return checkIfValueIsValid( - values, - attribute, - result.plain.metacard.properties[attribute] - ) - } - }) -} -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -function checkIfValueIsValid(values: any[], attribute: string, value: any) { - if (value !== undefined) { - switch ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute].type - ) { - case 'DATE': - const plotlyDate = getPlotlyDate(value) - return plotlyDate >= values[0] && plotlyDate <= values[1] - case 'BOOLEAN': - case 'STRING': - case 'GEOMETRY': - return values.indexOf(value.toString() + zeroWidthSpace) >= 0 - default: - return value >= values[0] && value <= values[1] - } - } -} -function addValueForAttributeToArray({ - valueArray, - attribute, - value, -}: { - valueArray: any[] - attribute: string - value: any -}) { - if (value !== undefined) { - switch ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute].type - ) { - case 'DATE': - valueArray.push(getPlotlyDate(value)) - break - case 'BOOLEAN': - case 'STRING': - case 'GEOMETRY': - valueArray.push(value.toString() + zeroWidthSpace) - break - default: - valueArray.push(parseFloat(value)) - break - } - } -} -function getIndexClicked(data: any) { - return Math.max.apply( - undefined, - data.points.map((point: any) => point.pointNumber) - ) as number -} -function getValueFromClick(data: any, categories: any) { - switch (data.points[0].xaxis.type) { - case 'category': - return [data.points[0].x] - case 'date': - const currentDate = moment(data.points[0].x).format(plotlyDateFormat) - return _.find(categories, (category: any) => { - return currentDate >= category[0] && currentDate <= category[1] - }) - default: - return _.find(categories, (category: any) => { - return ( - data.points[0].x >= category[0] && data.points[0].x <= category[1] - ) - }) - } -} -function getLayout(fontColor: string, plot?: any) { - const baseLayout = { - autosize: true, - paper_bgcolor: 'rgba(0,0,0,0)', - plot_bgcolor: 'rgba(0,0,0,0)', - font: { - family: '"Open Sans Light","Helvetica Neue",Helvetica,Arial,sans-serif', - size: 16, - color: 'inherit', - fill: 'inherit', - }, - margin: { - t: 10, - l: 50, - r: 115, - b: 140, - pad: 0, - autoexpand: true, - }, - barmode: 'overlay', - xaxis: { - fixedrange: true, - color: fontColor, - }, - yaxis: { - fixedrange: true, - color: fontColor, - }, - showlegend: true, - legend: { - font: { color: fontColor }, - }, - } as any - if (plot) { - baseLayout.xaxis.autorange = false - baseLayout.xaxis.range = plot._fullLayout.xaxis.range - baseLayout.yaxis.range = plot._fullLayout.yaxis.range - baseLayout.yaxis.autorange = false - } - return baseLayout -} -type Props = { - selectionInterface: any -} -const getAutocompleteState = ({ - lazyResults, - attributeToBin, -}: { - lazyResults: LazyQueryResults - attributeToBin: any -}) => { - return { - choices: calculateAvailableAttributes(Object.values(lazyResults.results)), - value: attributeToBin, - } -} -export const Histogram = ({ selectionInterface }: Props) => { - const { listenTo } = useBackbone() - const theme = useTheme() - const isDarkTheme = theme.palette.mode === 'dark' - const [noMatchingData, setNoMatchingData] = React.useState(false) - const plotlyRef = React.useRef() - const plotlyReadyForUpdatesRef = React.useRef(false) - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResults = useSelectedResults({ lazyResults }) - const [attributeToBin, setAttributeToBin] = React.useState('' as string) - const [autocompleteState, setAutocompleteState] = React.useState( - getAutocompleteState({ lazyResults, attributeToBin }) - ) - const results = Object.values(lazyResults.results) - React.useEffect(() => { - setNoMatchingData(false) - }, [lazyResults.results, attributeToBin]) - React.useEffect(() => { - setAutocompleteState(getAutocompleteState({ lazyResults, attributeToBin })) - }, [lazyResults.results]) - React.useEffect(() => { - showHistogram() - }, [lazyResults.results, attributeToBin, theme]) - React.useEffect(() => { - if (plotlyReadyForUpdatesRef.current) { - // avoid updating the histogram if it's not ready yet - updateHistogram() - } - }, [selectedResults]) - - const defaultFontColor = isDarkTheme ? 'white' : 'black' - const defaultHoverLabel = { - bgcolor: isDarkTheme ? 'black' : 'white', - font: { - color: defaultFontColor, - }, - } - - const getCustomHoverArray = ( - categories: any[], - results: LazyQueryResult[] - ) => { - const customArray: CustomHover[] = [] - categories.forEach((category) => { - const matchedResults = findMatchesForAttributeValues( - results, - attributeToBin, - category.constructor === Array ? category : [category] - ) - - if ( - (matchedResults && matchedResults.length > 0) || - customArray.length > 0 - ) { - customArray.push(getCustomHover(matchedResults, defaultHoverLabel)) - } - }) - return customArray.length > 0 ? customArray : undefined - } - - const determineInitialData = () => { - return [ - { - x: calculateAttributeArray({ - results, - attribute: attributeToBin, - }), - opacity: 1, - type: 'histogram', - name: 'Hits', - marker: { - color: 'rgba(120, 120, 120, .05)', - line: { - color: 'rgba(120,120,120,.2)', - width: '2', - }, - }, - hovertemplate: '%{y} Hits', - hoverlabel: defaultHoverLabel, - }, - ] - } - const determineData = (plot: any) => { - const activeResults = results - const xbins = _cloneDeep(plot._fullData[0].xbins) - - const categories: any[] = retrieveCategoriesFromPlotly() - - let customHoverArray: any = undefined - let selectedCustomHoverArray: any = undefined - - if (extension.customHistogramHover) { - customHoverArray = getCustomHoverArray(categories, results) - - selectedCustomHoverArray = getCustomHoverArray( - categories, - Object.values(selectedResults) - ) - } - - return [ - { - x: calculateAttributeArray({ - results: activeResults, - attribute: attributeToBin, - }), - opacity: 1, - type: 'histogram', - name: 'Hits', - marker: { - color: 'rgba(120, 120, 120, .05)', - line: { - color: 'rgba(120,120,120,.2)', - width: '2', - }, - }, - hoverlabel: customHoverArray - ? getCustomHoverLabels(customHoverArray) - : defaultHoverLabel, - hovertemplate: customHoverArray - ? getCustomHoverTemplates('Hits', customHoverArray) - : '%{y} Hits', - autobinx: false, - xbins, - }, - { - x: calculateAttributeArray({ - results: Object.values(selectedResults), - attribute: attributeToBin, - }), - opacity: 1, - type: 'histogram', - name: 'Selected', - marker: { - color: 'rgba(120, 120, 120, .2)', - line: { - color: 'rgba(120,120,120,.5)', - width: '2', - }, - }, - hoverlabel: selectedCustomHoverArray - ? getCustomHoverLabels(selectedCustomHoverArray) - : defaultHoverLabel, - hovertemplate: selectedCustomHoverArray - ? getCustomHoverTemplates('Selected', selectedCustomHoverArray) - : '%{y} Selected', - autobinx: false, - xbins, - }, - ] - } - const handleResize = () => { - if (plotlyRef.current) { - const histogramElement = plotlyRef.current - $(histogramElement).find('rect.drag').off('mousedown') - if ((histogramElement as any)._context) { - Plotly.Plots.resize(histogramElement) - } - $(histogramElement) - .find('rect.drag') - .on('mousedown', (event: any) => { - shiftKey.current = event.shiftKey - metaKey.current = event.metaKey - ctrlKey.current = event.ctrlKey - }) - } - } - React.useEffect(() => { - const id = (Math.random() * 100).toFixed(0).toString() - listenTo((wreqr as any).vent, 'resize', handleResize) - $(window).on(`resize.${id}`, handleResize) - return () => { - $(window).off(`resize.${id}`) - } - }, []) - const showHistogram = () => { - plotlyReadyForUpdatesRef.current = false - if (plotlyRef.current) { - if (results.length > 0 && attributeToBin) { - const histogramElement = plotlyRef.current - const initialData = determineInitialData() - if (initialData[0].x.length === 0) { - setNoMatchingData(true) - } else { - Plotly.newPlot( - histogramElement, - initialData, - getLayout(defaultFontColor), - { - displayModeBar: false, - } - ).then((plot: any) => { - Plotly.newPlot( - histogramElement, - determineData(plot), - getLayout(defaultFontColor, plot), - { - displayModeBar: false, - } - ) - handleResize() - listenToHistogram() - plotlyReadyForUpdatesRef.current = true - }) - } - } else { - plotlyRef.current.innerHTML = '' - } - } - } - const updateHistogram = () => { - if (plotlyRef.current) { - const histogramElement = plotlyRef.current - if ( - histogramElement !== null && - histogramElement.children.length !== 0 && - attributeToBin && - results.length > 0 - ) { - try { - Plotly.deleteTraces(histogramElement, 1) - } catch (err) { - console.error('Unable to delete trace', err) - } - Plotly.addTraces(histogramElement, determineData(histogramElement)[1]) - handleResize() - } else { - histogramElement.innerHTML = '' - } - } - } - const selectBetween = (firstIndex: number, lastIndex: number) => { - for (let i = firstIndex; i <= lastIndex; i++) { - if (pointsSelected.current.indexOf(i) === -1) { - pointsSelected.current.push(i) - } - } - const attributeToCheck = attributeToBin - const categories = retrieveCategoriesFromPlotly() - const validCategories = categories.slice(firstIndex, lastIndex) - const activeSearchResults = results - const validResults = validCategories.reduce( - (results: any, category: any) => { - results = results.concat( - findMatchesForAttributeValues( - activeSearchResults, - attributeToCheck, - category.constructor === Array ? category : [category] - ) - ) - return results - }, - [] as LazyQueryResult[] - ) as LazyQueryResult[] - validResults.forEach((result) => { - result.setSelected(true) - }) - } - // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. - const retrieveCategoriesFromPlotlyForDates = () => { - if (plotlyRef.current) { - const histogramElement = plotlyRef.current - const categories = [] - const xbins = (histogramElement as any)._fullData[0].xbins - const min = xbins.start - const max = parseInt(moment(xbins.end).format('x')) - let start = parseInt(moment(min).format('x')) - const inMonths = xbins.size.constructor === String - const binSize = inMonths ? parseInt(xbins.size.substring(1)) : xbins.size - while (start < max) { - const startDate = moment(start).format(plotlyDateFormat) - const endDate = inMonths - ? moment(start).add(binSize, 'months').format(plotlyDateFormat) - : moment(start).add(binSize, 'ms').format(plotlyDateFormat) - categories.push([startDate, endDate]) - start = parseInt( - inMonths - ? moment(start).add(binSize, 'months').format('x') - : moment(start).add(binSize, 'ms').format('x') - ) - } - return categories - } - } - // This is an internal variable for Plotly, so it might break if we update Plotly in the future. - // Regardless, there was no other way to reliably get the categories. - const retrieveCategoriesFromPlotly = () => { - if (plotlyRef.current) { - const histogramElement = plotlyRef.current - const xaxis = (histogramElement as any)._fullLayout.xaxis - switch (xaxis.type) { - case 'category': - return xaxis._categories - case 'date': - return retrieveCategoriesFromPlotlyForDates() - default: - const xbins = (histogramElement as any)._fullData[0].xbins - const min = xbins.start - const max = xbins.end - const binSize = xbins.size - const categories = [] - var start = min - while (start < max) { - categories.push([start, start + binSize]) - start += binSize - } - return categories - } - } - } - const handleControlClick = (data: any, alreadySelected: boolean) => { - const attributeToCheck = attributeToBin - const categories = retrieveCategoriesFromPlotly() - const matchedResults = findMatchesForAttributeValues( - results, - attributeToCheck, - getValueFromClick(data, categories) - ) - if (alreadySelected) { - matchedResults.forEach((result) => { - result.setSelected(false) - }) - pointsSelected.current.splice( - pointsSelected.current.indexOf(getIndexClicked(data)), - 1 - ) - } else { - matchedResults.forEach((result) => { - result.setSelected(true) - }) - pointsSelected.current.push(getIndexClicked(data)) - } - } - const handleShiftClick = (data: any) => { - const indexClicked = getIndexClicked(data) - const firstIndex = - pointsSelected.current.length === 0 - ? -1 - : pointsSelected.current.reduce( - (currentMin, point) => Math.min(currentMin, point), - pointsSelected.current[0] - ) - const lastIndex = - pointsSelected.current.length === 0 - ? -1 - : pointsSelected.current.reduce( - (currentMin, point) => Math.max(currentMin, point), - pointsSelected.current[0] - ) - if (firstIndex === -1 && lastIndex === -1) { - lazyResults.deselect() - handleControlClick(data, false) - } else if (indexClicked <= firstIndex) { - selectBetween(indexClicked, firstIndex) - } else if (indexClicked >= lastIndex) { - selectBetween(lastIndex, indexClicked + 1) - } else { - selectBetween(firstIndex, indexClicked + 1) - } - } - const plotlyClickHandler = (data: any) => { - const indexClicked = getIndexClicked(data) - const alreadySelected = pointsSelected.current.indexOf(indexClicked) >= 0 - if (shiftKey.current) { - handleShiftClick(data) - } else if (ctrlKey.current || metaKey.current) { - handleControlClick(data, alreadySelected) - } else { - lazyResults.deselect() - resetPointSelection() - handleControlClick(data, alreadySelected) - } - resetKeyTracking() - } - const listenToHistogram = () => { - if (plotlyRef.current) { - const histogramElement = plotlyRef.current - ;(histogramElement as any)._ev.addListener( - 'plotly_click', - plotlyClickHandler - ) - } - } - const shiftKey = React.useRef(false) - const metaKey = React.useRef(false) - const ctrlKey = React.useRef(false) - const pointsSelected = React.useRef([] as number[]) - const resetKeyTracking = () => { - shiftKey.current = false - metaKey.current = false - ctrlKey.current = false - } - const resetPointSelection = () => { - pointsSelected.current = [] - } - if (Object.keys(lazyResults.results).length === 0) { - return
    No results found
    - } - return ( - <> -
    - { - setAttributeToBin(newValue.value) - }} - isOptionEqualToValue={(option) => option.value === attributeToBin} - getOptionLabel={(option) => { - return option.label - }} - disableClearable - value={autocompleteState.choices.find( - (choice) => choice.value === attributeToBin - )} - renderInput={(params) => ( - - )} - /> -
    -
    - {noMatchingData ? ( -
    - No data in this result set has that attribute -
    - ) : null} - - ) -} -export default hot(module)(Histogram) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/audited-inspector.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/audited-inspector.tsx deleted file mode 100644 index d98b2d1f542..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/audited-inspector.tsx +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' - -import { AuditComponent } from './inspector.audit' -import Inspector from './inspector' - -export const AuditedInspector = ({ - selectionInterface, -}: { - selectionInterface: any -}) => { - return ( - - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/inspector.audit.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/inspector.audit.tsx deleted file mode 100644 index cb02c746ee7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/inspector.audit.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import React from 'react' -import { useEffect } from 'react' -import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks' -import { useSelectedResults } from '../../../js/model/LazyQueryResult/hooks' -import { - AuditItem, - postAuditLog, -} from '../../../react-component/utils/audit/audit-endpoint' - -export const useSelectionAuditing = ({ - selectionInterface, -}: { - selectionInterface: any -}) => { - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResults = useSelectedResults({ - lazyResults, - }) - const [selectedIds, setSelectedIds] = React.useState(new Set()) - const getAuditItems = (ids: Set) => { - let items: AuditItem[] = [] - - ids.forEach((id) => { - const properties = lazyResults?.results[id]?.plain?.metacard?.properties - - if (properties) { - items.push({ id: properties.id, 'source-id': properties['source-id'] }) - } - }) - - return items - } - - useEffect(() => { - let newSelectedIds = new Set(Object.keys(selectedResults)) - let unselectedIds = new Set() - - selectedIds.forEach((id: string) => { - if (!newSelectedIds.has(id)) { - unselectedIds.add(id) - } - }) - - let newSelectedItems = getAuditItems(newSelectedIds) - let unselectedItems = getAuditItems(unselectedIds) - - if (unselectedItems.length > 0) { - postAuditLog({ - action: 'unselected', - component: 'resource', - items: unselectedItems, - }) - } - - if (newSelectedItems.length > 0) { - postAuditLog({ - action: 'selected', - component: 'resource', - items: newSelectedItems, - }) - setSelectedIds(newSelectedIds) - } - }, [selectedResults]) -} - -export const AuditComponent = ({ - selectionInterface, -}: { - selectionInterface: any -}) => { - useSelectionAuditing({ selectionInterface }) - return null -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/inspector.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/inspector.tsx deleted file mode 100644 index 96baebdcc4e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/inspector/inspector.tsx +++ /dev/null @@ -1,256 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import Button from '@mui/material/Button' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { useLazyResultsSelectedResultsFromSelectionInterface } from '../../selection-interface/hooks' -import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft' -import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight' -import { getIconClassName } from '../results-visual/result-item' -import LazyMetacardInteractions from '../results-visual/lazy-metacard-interactions' -import MoreVertIcon from '@mui/icons-material/MoreVert' -import { useMenuState } from '../../menu-state/menu-state' -import Popover from '@mui/material/Popover' -import Paper from '@mui/material/Paper' -import { Elevations } from '../../theme/theme' -import OverflowTooltip from '../../overflow-tooltip/overflow-tooltip' -import Tabs from '@mui/material/Tabs' -import MaterialTab from '@mui/material/Tab' -import MetacardTabs, { TabNames } from '../../tabs/metacard/tabs-metacard' -import { useRerenderOnBackboneSync } from '../../../js/model/LazyQueryResult/hooks' -import Extensions from '../../../extension-points' - -type InspectorType = { - selectionInterface: any -} - -const useSelectedResultsArrayFromSelectionInterface = ({ - selectionInterface, -}: InspectorType) => { - const [selectedResultsArray, setSelectedResultsArray] = React.useState( - [] as LazyQueryResult[] - ) - const selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ - selectionInterface, - }) - React.useEffect(() => { - setSelectedResultsArray(Object.values(selectedResults)) - }, [selectedResults]) - return selectedResultsArray -} - -type TitleViewType = { - lazyResult: LazyQueryResult -} - -export const TitleView = ({ lazyResult }: TitleViewType) => { - const menuState = useMenuState() - useRerenderOnBackboneSync({ lazyResult }) - return ( -
    - - - - {lazyResult.plain.metacard.properties.title} - - - - - - - -
    - ) -} - -let defaultActiveTab = 'Details' - -const useLastAsDefaultActiveTab = (tabIndex: string) => { - React.useEffect(() => { - defaultActiveTab = tabIndex - }, [tabIndex]) -} - -const useIndexForSelectedResults = ( - selectedResults: LazyQueryResult[] -): [number, (index: number) => void] => { - const [index, setIndex] = React.useState(0) - - React.useEffect(() => { - setIndex(0) - }, [selectedResults]) - return [index, setIndex] -} - -const usePossibleMetacardTabs = ({ result }: { result: LazyQueryResult }) => { - const [possibleMetacardTabs, setPossibleMetacardTabs] = - React.useState(MetacardTabs) - - React.useEffect(() => { - if (result) { - let copyOfMetacardTabs = { ...MetacardTabs } - if (result.isRevision()) { - delete copyOfMetacardTabs[TabNames.History] - delete copyOfMetacardTabs[TabNames.Actions] - } - if (result.isDeleted()) { - delete copyOfMetacardTabs[TabNames.History] - delete copyOfMetacardTabs[TabNames.Actions] - } - if (result.isRemote()) { - delete copyOfMetacardTabs[TabNames.History] - delete copyOfMetacardTabs[TabNames.Quality] - } - if (!result.hasPreview()) { - delete copyOfMetacardTabs[TabNames.Preview] - } - setPossibleMetacardTabs(copyOfMetacardTabs) - } else { - setPossibleMetacardTabs({}) - } - }, [result]) - - return possibleMetacardTabs -} - -const useMetacardTabs = ({ result }: { result: LazyQueryResult }) => { - const possibleMetacardTabs = usePossibleMetacardTabs({ result }) - const [activeTab, setActiveTab] = React.useState(defaultActiveTab) - useLastAsDefaultActiveTab(activeTab) - - React.useEffect(() => { - if ( - Object.keys(possibleMetacardTabs).length > 0 && - !possibleMetacardTabs[activeTab] - ) { - setActiveTab(TabNames.Details) - } - }, [possibleMetacardTabs]) - return { - possibleMetacardTabs, - activeTab, - setActiveTab, - TabContent: possibleMetacardTabs[activeTab]?.content || (() => null), - } -} - -const Inspector = ({ selectionInterface }: InspectorType) => { - const selectedResults = useSelectedResultsArrayFromSelectionInterface({ - selectionInterface, - }) - const [index, setIndex] = useIndexForSelectedResults(selectedResults) - - const amountSelected = selectedResults.length - - const currentResult = selectedResults[index] - const { possibleMetacardTabs, activeTab, setActiveTab, TabContent } = - useMetacardTabs({ result: currentResult }) - - return ( - <> -
    - {amountSelected > 1 ? ( -
    - - Item {index + 1} / {amountSelected} - -
    - ) : null} - {currentResult ? ( - <> - -
    - { - setActiveTab(newValue) - }} - className="shrink-0 w-full" - scrollButtons="auto" - variant="scrollable" - > - {Object.entries(possibleMetacardTabs).map( - ([tabName, tabDefinition]) => { - return ( - - ) - } - )} - - -
    - -
    -
    - - ) : ( -
    - Please select result(s) to display in the inspector. -
    - )} -
    - - ) -} - -export default hot(module)(Inspector) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/Clustering.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/Clustering.ts deleted file mode 100644 index fc2b299736e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/Clustering.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'dens... Remove this comment to see the full error message -import clustering from 'density-clustering' - -const dbscan = new clustering.DBSCAN() - -function removeInvalidCenters(results: any, centers: any) { - for (let i = centers.length - 1; i >= 0; i--) { - if (!centers[i]) { - results.splice(i, 1) - centers.splice(i, 1) - } - } -} - -function convertIndicesToResults(results: any, cluster: any) { - return cluster.map((index: any) => results[index]) -} - -export default { - /* - Takes in a list of geometries and a view height and returns a list of clusters - */ - calculateClusters(results: any, map: any) { - const centers = map.getWindowLocationsOfResults(results) - removeInvalidCenters(results, centers) - return dbscan - .run(centers, 44, 2) - .map((cluster: any) => convertIndicesToResults(results, cluster)) - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/DrawingUtility.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/DrawingUtility.ts deleted file mode 100644 index b73b7e2bbb0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/DrawingUtility.ts +++ /dev/null @@ -1,287 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -//allows us to get around svg security restrictions in IE11 (see using svg in opengl) -//make our own image and manually set dimensions because of IE: https://github.com/openlayers/openlayers/issues/3939 -import _ from 'underscore' - -const defaultColor = '#3c6dd5' - -export default { - getCircle(options: any) { - _.defaults(options, { - diameter: 22, - fillColor: defaultColor, - strokeWidth: 2, - strokeColor: 'white', - badgeOptions: undefined, - }) - const badgeOffset = options.badgeOptions ? 8 : 0 - const radius = options.diameter / 2 - const canvas = document.createElement('canvas') - canvas.width = options.diameter + badgeOffset - canvas.height = options.diameter + badgeOffset - const ctx = canvas.getContext('2d') - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.beginPath() - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.strokeStyle = options.strokeColor - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.lineWidth = options.strokeWidth - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = options.fillColor - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.arc( - radius, - radius + badgeOffset, - radius - options.strokeWidth / 2, - 0, - 2 * Math.PI, - false - ) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fill() - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.stroke() - - if (options.badgeOptions) { - return this.addBadge(canvas, { - width: options.diameter + badgeOffset, - color: options.badgeOptions.color, - text: options.badgeOptions.text, - }) - } - - return canvas - }, - getCircleWithText(options: any) { - _.defaults(options, { - diameter: 44, - fillColor: defaultColor, - strokeWidth: 2, - strokeColor: 'white', - text: '', - textColor: 'white', - badgeOptions: undefined, - }) - - const badgeOffset = options.badgeOptions ? 8 : 0 - - const canvas = this.getCircle(options) - const ctx = canvas.getContext('2d') - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.font = '16pt Helvetica' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = options.textColor - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textAlign = 'center' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textBaseline = 'middle' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillText( - options.text, - options.diameter / 2, - options.diameter / 2 + badgeOffset - ) - - return canvas - }, - getCircleWithIcon(options: any) { - _.defaults(options, { - diameter: 24, - fillColor: defaultColor, - strokeWidth: 2, - strokeColor: 'white', - text: '', - textColor: 'white', - }) - const canvas = this.getCircle(options) - const ctx = canvas.getContext('2d') - const style = options.icon.style - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.font = style.size + ' ' + style.font - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = options.textColor - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textAlign = 'center' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textBaseline = 'middle' - - if (style.code) { - let icon = String.fromCharCode(parseInt(style.code, 16)) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillText(icon, options.diameter / 2, options.diameter / 2) - } - return canvas - }, - getPin(options: any) { - _.defaults(options, { - width: 39, - height: 40, - fillColor: defaultColor, - strokeWidth: 2, - strokeColor: 'white', - textColor: 'white', - badgeOptions: undefined, - }) - - const badgeOffset = options.badgeOptions ? 8 : 0 - - const getValWithOffset = (val: number) => { - return val + badgeOffset - } - - const canvas = document.createElement('canvas') - canvas.width = options.width + badgeOffset - canvas.height = options.height + badgeOffset - const ctx = canvas.getContext('2d') - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.strokeStyle = options.strokeColor - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.lineWidth = options.strokeWidth - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = options.fillColor - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.beginPath() - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.moveTo(19.36, getValWithOffset(2)) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.bezierCurveTo( - 11.52, - getValWithOffset(2), - 4.96, - getValWithOffset(6.64), - 4.96, - getValWithOffset(14.64) - ) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.bezierCurveTo( - 4.96, - getValWithOffset(17.92), - 6.08, - getValWithOffset(20.96), - 7.84, - getValWithOffset(23.44) - ) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.lineTo(19.52, getValWithOffset(38.96)) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.lineTo(31.2, getValWithOffset(23.44)) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.bezierCurveTo( - 33.04, - getValWithOffset(20.96), - 34.08, - getValWithOffset(17.92), - 34.08, - getValWithOffset(14.64) - ) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.bezierCurveTo( - 34.08, - getValWithOffset(6.64), - 27.6, - getValWithOffset(2), - 19.52, - getValWithOffset(2) - ) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = options.fillColor - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fill() - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.stroke() - - const style = options.icon.style - if (style.code) { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.font = style.size + ' ' + style.font - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = options.textColor - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textAlign = 'center' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textBaseline = 'middle' - - let icon = String.fromCharCode(parseInt(style.code, 16)) - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillText( - icon, - options.width / 2, - options.height / 2 - 5 + badgeOffset - ) - } - - if (options.badgeOptions) { - return this.addBadge(canvas, { - width: options.width + badgeOffset, - color: options.badgeOptions.color, - text: options.badgeOptions.text, - }) - } - - return canvas - }, - addBadge(canvas: HTMLCanvasElement, options: any) { - _.defaults(options, { - width: 48, - color: '#fff59d', - }) - - const ctx = canvas.getContext('2d') - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.beginPath() - - const radius = 10 - const badgeX = options.width - (radius + 2) - const badgeY = radius + 2 - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.arc(badgeX, badgeY, radius, 0, 2 * Math.PI, false) - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = options.color - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.strokeStyle = '#000000' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.lineWidth = 1 - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fill() - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.stroke() - - if (options.text) { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.font = '10pt Helvetica' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillStyle = '#000000' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textAlign = 'center' - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.textBaseline = 'middle' - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - ctx.fillText(options.text, badgeX, badgeY) - } - - return canvas - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/bbox-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/bbox-display.tsx deleted file mode 100644 index 28b754343b0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/bbox-display.tsx +++ /dev/null @@ -1,349 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import _ from 'underscore' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { useRender } from '../../../hooks/useRender' -import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper' -import DistanceUtils from '../../../../js/DistanceUtils' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' -import { Translation } from '../interactions.provider' -const toDeg = Cesium.Math.toDegrees - -const CAMERA_MAGNITUDE_THRESHOLD = 8000000 - -const getCurrentMagnitudeFromMap = ({ map }: { map: any }) => { - return map.getMap().camera.getMagnitude() -} - -const needsRedraw = ({ - map, - drawnMagnitude, -}: { - map: any - drawnMagnitude: any -}) => { - const currentMagnitude = getCurrentMagnitudeFromMap({ map }) - - if ( - currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - if ( - currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - - return false -} - -const modelToRectangle = ({ model }: { model: any }) => { - const toRad = Cesium.Math.toRadians - const obj = model.toJSON() - _.each(obj, (val: any, key: any) => { - obj[key] = toRad(val) - }) - const rectangle = new Cesium.Rectangle() - if ( - obj.north === undefined || - isNaN(obj.north) || - obj.south === undefined || - isNaN(obj.south) || - obj.east === undefined || - isNaN(obj.east) || - obj.west === undefined || - isNaN(obj.west) - ) { - return null - } - - rectangle.north = obj.mapNorth - rectangle.south = obj.mapSouth - rectangle.east = obj.mapEast - rectangle.west = obj.mapWest - return rectangle -} - -type BBox = { - north: number - south: number - east: number - west: number -} - -const rectangleToBbox = (rectangle: Cesium.Rectangle): BBox => { - const north = toDeg(rectangle.north) - const south = toDeg(rectangle.south) - const east = toDeg(rectangle.east) - const west = toDeg(rectangle.west) - return { - north: DistanceUtils.coordinateRound(north), - south: DistanceUtils.coordinateRound(south), - east: DistanceUtils.coordinateRound(east), - west: DistanceUtils.coordinateRound(west), - } -} - -const drawGeometry = ({ - model, - map, - id, - onDraw, - translation, - isInteractive, -}: { - model: any - map: any - id: any - setDrawnMagnitude: (number: any) => void - onDraw?: (drawingLocation: BBox) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const rectangle = modelToRectangle({ model }) - if ( - !rectangle || - [rectangle.north, rectangle.south, rectangle.west, rectangle.east].some( - (coordinate) => isNaN(coordinate) - ) || - rectangle.north <= rectangle.south || - rectangle.east === rectangle.west - ) { - return - } - - const coordinates = [ - [rectangle.east, rectangle.north], - [rectangle.west, rectangle.north], - [rectangle.west, rectangle.south], - [rectangle.east, rectangle.south], - [rectangle.east, rectangle.north], - ] - - if (translation) { - const longitudeRadians = Cesium.Math.toRadians(translation.longitude) - const latitudeRadians = Cesium.Math.toRadians(translation.latitude) - - for (const coord of coordinates) { - coord[0] += longitudeRadians - coord[1] += latitudeRadians - } - } - - removeOrLockOldDrawing(Boolean(isInteractive), id, map, model) - - let primitive - - if (onDraw) { - primitive = new (DrawHelper.ExtentPrimitive as any)({ - extent: rectangle, - height: 0, - id, - material: Cesium.Material.fromType('Color', { - color: Cesium.Color.fromAlpha(contrastingColor, 0.2), - }), - }) - primitive.setEditable() - primitive.addListener('onEdited', function (event: any) { - const rectangle = event.extent - const bbox = rectangleToBbox(rectangle) - onDraw(bbox) - }) - } else { - const color = model.get('color') - primitive = new Cesium.PolylineCollection() - primitive.add({ - width: isInteractive ? 12 : 8, - material: Cesium.Material.fromType('PolylineOutline', { - color: isInteractive - ? Cesium.Color.fromCssColorString(contrastingColor) - : color - ? Cesium.Color.fromCssColorString(color) - : Cesium.Color.KHAKI, - outlineColor: Cesium.Color.WHITE, - outlineWidth: isInteractive ? 6 : 4, - }), - id: 'userDrawing', - positions: Cesium.Cartesian3.fromRadiansArray(_.flatten(coordinates)), - }) - } - - primitive.id = id - primitive.locationId = model.attributes.locationId - map.getMap().scene.primitives.add(primitive) - map.getMap().scene.requestRender() -} - -const useCameraMagnitude = ({ - map, -}: { - map: any -}): [number, React.Dispatch>] => { - const [cameraMagnitude, setCameraMagnitude] = React.useState(0) - const [isMoving, setIsMoving] = React.useState(false) - const render = useRender() - React.useEffect(() => { - const startListener = () => setIsMoving(true) - const endListener = () => setIsMoving(false) - map?.getMap().scene.camera.moveStart.addEventListener(startListener) - map?.getMap().scene.camera.moveEnd.addEventListener(endListener) - return () => { - map?.getMap().scene.camera.moveStart.removeEventListener(startListener) - map?.getMap().scene.camera.moveEnd.removeEventListener(endListener) - } - }, [map]) - React.useEffect(() => { - if (isMoving) { - const animationId = window.requestAnimationFrame(() => { - setCameraMagnitude(getCurrentMagnitudeFromMap({ map })) - }) - return () => { - window.cancelAnimationFrame(animationId) - } - } - return () => {} - }, [isMoving, render]) - return [cameraMagnitude, setCameraMagnitude] -} - -const useListenToModel = ({ - model, - map, - onDraw, - newBbox, - translation, - isInteractive, -}: { - model: any - map: any - onDraw?: (drawingLocation: BBox) => void - newBbox: BBox | null - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const [cameraMagnitude] = useCameraMagnitude({ map }) - const [drawnMagnitude, setDrawnMagnitude] = React.useState(0) - const callback = React.useMemo(() => { - return () => { - if (map) { - if (newBbox) { - // Clone the model to display the new bbox drawn because we don't - // want to update the existing model unless the user clicks Apply. - const newModel = model.clone() - newModel.set(newBbox) - drawGeometry({ - map, - model: newModel, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - }) - } else if (model) { - drawGeometry({ - map, - model, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - translation, - isInteractive, - }) - } - } - } - }, [model, map, newBbox, translation, isInteractive]) - useListenTo( - model, - 'change:mapNorth change:mapSouth change:mapEast change:mapWest', - callback - ) - React.useEffect(() => { - if (map && needsRedraw({ map, drawnMagnitude })) { - callback() - } - }, [cameraMagnitude, drawnMagnitude, callback, map]) - React.useEffect(() => { - callback() - }, [callback]) -} - -const useStartMapDrawing = ({ - map, - model, - setNewBbox, - onDraw, -}: { - map: any - model: any - setNewBbox: (newBbox: BBox) => void - onDraw: (newBbox: BBox) => void -}) => { - React.useEffect(() => { - if (map && model) { - map.getMap().drawHelper[`startDrawingExtent`]({ - callback: (extent: Cesium.Rectangle) => { - const bbox = rectangleToBbox(extent) - setNewBbox(bbox) - onDraw(bbox) - }, - material: Cesium.Material.fromType('Color', { - color: Cesium.Color.fromAlpha(contrastingColor, 0.2), - }), - }) - } - }, [map, model]) -} - -export const CesiumBboxDisplay = ({ - map, - model, - onDraw, - translation, - isInteractive, -}: { - map: any - model: any - onDraw?: (newBbox: BBox) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - // Use state to store the bbox drawn by the user before they click Apply or Cancel. - // When the user clicks Draw, they are allowed to edit the existing bbox (if it - // exists), or draw a new bbox. If they draw a new bbox, save it to state then show - // it instead of the draw model because we don't want to update the draw model - // unless the user clicks Apply. - const [newBbox, setNewBbox] = React.useState(null) - if (onDraw) { - useStartMapDrawing({ map, model, onDraw, setNewBbox }) - } - useListenToModel({ map, model, onDraw, newBbox, translation, isInteractive }) - React.useEffect(() => { - return () => { - if (model && map) { - removeOldDrawing({ map, id: getIdFromModelForDisplay({ model }) }) - map.getMap().drawHelper.stopDrawing() - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/cesium.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/cesium.view.tsx deleted file mode 100644 index d1c30454610..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/cesium.view.tsx +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Button from '@mui/material/Button' -import React from 'react' -import { Memo } from '../../../memo/memo' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { MapViewReact } from '../map.view' -import { OpenlayersMapViewReact } from '../openlayers/openlayers.view' -import { CesiumDrawings } from './drawing-and-display' - -//You typically don't want to use this view directly. Instead, use the combined-map component which will handle falling back to openlayers. - -import $ from 'jquery' -import featureDetection from '../../../singletons/feature-detection' -import { InteractionsProvider } from '../interactions.provider' -import { LayoutContext } from '../../../golden-layout/visual-settings.provider' -import User from '../../../../js/model/User' -import { useBackbone } from '../../../selection-checkbox/useBackbone.hook' -import { MAP_LAYERS } from '../../settings-helpers' -import { CesiumStateType } from '../../../golden-layout/golden-layout.types' - -const useSupportsCesium = () => { - const [, setForceRender] = React.useState(Math.random()) - - useListenTo(featureDetection, 'change:cesium', () => { - setForceRender(Math.random()) - }) - - return featureDetection.supportsFeature('cesium') -} - -const useCountdown = ({ - start, - length, -}: { - start: boolean - length: number -}) => { - const [finished, setFinished] = React.useState(false) - - React.useEffect(() => { - if (start && length) { - const timeoutId = window.setTimeout(() => { - setFinished(true) - }, length) - return () => { - window.clearTimeout(timeoutId) - } - } - return () => {} - }, [start, length]) - return finished -} - -export const CesiumMapViewReact = ({ - selectionInterface, - setMap: outerSetMap, - componentState, -}: { - setMap?: (map: any) => void // sometimes outer components want to know when the map is loaded - selectionInterface: any - componentState: CesiumStateType -}) => { - const supportsCesium = useSupportsCesium() - const countdownFinished = useCountdown({ - start: !supportsCesium, - length: 10000, - }) - const [swap, setSwap] = React.useState(false) - const [map, setMap] = React.useState(null) - const [mapLayers, setMapLayers] = React.useState(null) - const { listenTo } = useBackbone() - - const { getValue, setValue } = React.useContext(LayoutContext) - - React.useEffect(() => { - const layerSettings = getValue(MAP_LAYERS, componentState.mapLayers) - - const layerModels = layerSettings.map((layer: any) => { - return new (User as any).MapLayer(layer, { parse: true }) - }) - const layerCollection = new (User as any).MapLayers(layerModels) - listenTo(layerCollection, 'add remove', () => - setValue(MAP_LAYERS, layerCollection.toJSON()) - ) - layerCollection.validate() - setMapLayers(layerCollection) - }, []) - - React.useEffect(() => { - const callback = () => { - setValue(MAP_LAYERS, mapLayers.toJSON()) - } - if (mapLayers) { - listenTo(mapLayers, 'change', callback) - } - }, [mapLayers]) - - React.useEffect(() => { - if (outerSetMap) { - outerSetMap(map) - } - }, [map]) - - if (!mapLayers) { - return null - } - - if (supportsCesium) { - return ( - - - { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const deferred = new $.Deferred() - import('./map.cesium').then((CesiumMap) => { - deferred.resolve(CesiumMap.default) - }) - return deferred - }} - setMap={setMap} - selectionInterface={selectionInterface} - mapLayers={mapLayers} - /> - - - - ) - } - - if (countdownFinished || swap) { - return ( - - ) - } - - return ( - <> -
    -

    - The 3D Map is not supported by your browser. -

    - -

    - 2D Map will automatically load after 10 seconds. -

    -
    - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/circle-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/circle-display.tsx deleted file mode 100644 index f35f93fb976..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/circle-display.tsx +++ /dev/null @@ -1,360 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import DistanceUtils from '../../../../js/DistanceUtils' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import _ from 'underscore' -import * as Turf from '@turf/turf' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { useRender } from '../../../hooks/useRender' -import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import TurfCircle from '@turf/circle' -import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' -import { Translation } from '../interactions.provider' -const toDeg = Cesium.Math.toDegrees - -const CAMERA_MAGNITUDE_THRESHOLD = 8000000 - -type Circle = { - lon: number - lat: number - radius: number - radiusUnits: string -} - -const getCurrentMagnitudeFromMap = ({ map }: { map: any }) => { - return map.getMap().camera.getMagnitude() -} - -const needsRedraw = ({ - map, - drawnMagnitude, -}: { - map: any - drawnMagnitude: any -}) => { - const currentMagnitude = getCurrentMagnitudeFromMap({ map }) - - if ( - currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - if ( - currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - - return false -} - -const defaultAttrs = ['lat', 'lon', 'radius'] - -const isModelReset = ({ modelProp }: { modelProp: any }) => { - if ( - _.every(defaultAttrs, (val: any) => _.isUndefined(modelProp[val])) || - _.isEmpty(modelProp) - ) { - return true - } - return false -} - -const cartesian3ToCircle = ( - center: Cesium.Cartesian3, - radius: number, - ellipsoid: Cesium.Ellipsoid -): Circle => { - const latLon = ellipsoid.cartesianToCartographic(center) - const lon = toDeg(latLon.longitude) - const lat = toDeg(latLon.latitude) - let radiusUnits = 'meters' - if (radius >= 1000) { - radius /= 1000 - radiusUnits = 'kilometers' - } - return { - lon: DistanceUtils.coordinateRound(lon), - lat: DistanceUtils.coordinateRound(lat), - radius, - radiusUnits, - } -} - -const drawGeometry = ({ - model, - map, - id, - onDraw, - translation, - isInteractive, -}: { - model: any - map: any - id: any - setDrawnMagnitude: (number: any) => void - onDraw?: (drawingLocation: Circle) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - // if model has been reset - - const modelProp = model.toJSON() - if (isModelReset({ modelProp })) { - map.getMap().scene.requestRender() - return - } - modelProp.lat = parseFloat(modelProp.lat) - modelProp.lon = parseFloat(modelProp.lon) - if (Number.isNaN(modelProp.lat) || Number.isNaN(modelProp.lon)) { - map.getMap().scene.requestRender() - return - } - - if (translation) { - modelProp.lon += translation.longitude - modelProp.lat += translation.latitude - } - - removeOrLockOldDrawing(Boolean(isInteractive), id, map, model) - - let primitive - - if (onDraw) { - primitive = new (DrawHelper.CirclePrimitive as any)({ - center: Cesium.Cartesian3.fromDegrees(modelProp.lon, modelProp.lat), - radius: DistanceUtils.getDistanceInMeters( - modelProp.radius, - modelProp.radiusUnits - ), - height: 0, - id, - material: Cesium.Material.fromType('Color', { - color: Cesium.Color.fromAlpha(contrastingColor, 0.2), - }), - }) - primitive.setEditable() - primitive.addListener('onEdited', function (event: any) { - const circle = cartesian3ToCircle( - event.center, - event.radius, - map.getMap().scene.globe.ellipsoid - ) - onDraw(circle) - }) - } else { - const color = model.get('color') - - const centerPt = Turf.point([modelProp.lon, modelProp.lat]) - const circleToCheck = TurfCircle( - centerPt, - DistanceUtils.getDistanceInMeters( - modelProp.radius, - modelProp.radiusUnits - ), - { units: 'meters', steps: 64 } - ) - - primitive = new Cesium.PolylineCollection() - primitive.add({ - width: isInteractive ? 12 : 8, - material: Cesium.Material.fromType('PolylineOutline', { - color: isInteractive - ? Cesium.Color.fromCssColorString(contrastingColor) - : color - ? Cesium.Color.fromCssColorString(color) - : Cesium.Color.KHAKI, - outlineColor: Cesium.Color.WHITE, - outlineWidth: isInteractive ? 6 : 4, - }), - id: 'userDrawing', - positions: Cesium.Cartesian3.fromDegreesArray( - _.flatten(circleToCheck.geometry.coordinates) - ), - }) - } - - primitive.id = id - primitive.locationId = modelProp.locationId - map.getMap().scene.primitives.add(primitive) - map.getMap().scene.requestRender() -} - -const useCameraMagnitude = ({ - map, -}: { - map: any -}): [number, React.Dispatch>] => { - const [cameraMagnitude, setCameraMagnitude] = React.useState(0) - const [isMoving, setIsMoving] = React.useState(false) - const render = useRender() - React.useEffect(() => { - const startListener = () => setIsMoving(true) - const endListener = () => setIsMoving(false) - map?.getMap().scene.camera.moveStart.addEventListener(startListener) - map?.getMap().scene.camera.moveEnd.addEventListener(endListener) - return () => { - map?.getMap().scene.camera.moveStart.removeEventListener(startListener) - map?.getMap().scene.camera.moveEnd.removeEventListener(endListener) - } - }, [map]) - React.useEffect(() => { - if (isMoving) { - const animationId = window.requestAnimationFrame(() => { - setCameraMagnitude(getCurrentMagnitudeFromMap({ map })) - }) - return () => { - window.cancelAnimationFrame(animationId) - } - } - return () => {} - }, [isMoving, render]) - return [cameraMagnitude, setCameraMagnitude] -} - -const useListenToModel = ({ - model, - map, - newCircle, - onDraw, - translation, - isInteractive, -}: { - model: any - map: any - newCircle: Circle | null - onDraw?: (drawingLocation: Circle) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const [cameraMagnitude] = useCameraMagnitude({ map }) - const [drawnMagnitude, setDrawnMagnitude] = React.useState(0) - const callback = React.useMemo(() => { - return () => { - if (map) { - if (newCircle) { - // Clone the model to display the new circle drawn because we don't - // want to update the existing model unless the user clicks Apply. - const newModel = model.clone() - newModel.set(newCircle) - drawGeometry({ - map, - model: newModel, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - }) - } else if (model) { - drawGeometry({ - map, - model, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - translation, - isInteractive, - }) - } - } - } - }, [model, map, newCircle, translation, isInteractive]) - useListenTo(model, 'change:lat change:lon change:radius', callback) - React.useEffect(() => { - if (map && needsRedraw({ map, drawnMagnitude })) { - callback() - } - }, [cameraMagnitude, drawnMagnitude, callback, map]) - React.useEffect(() => { - callback() - }, [callback]) -} - -const useStartMapDrawing = ({ - map, - model, - setNewCircle, - onDraw, -}: { - map: any - model: any - setNewCircle: (newCircle: Circle) => void - onDraw: (newCircle: Circle) => void -}) => { - React.useEffect(() => { - if (map && model) { - map.getMap().drawHelper[`startDrawingCircle`]({ - callback: (center: Cesium.Cartesian3, radius: number) => { - const circle = cartesian3ToCircle( - center, - radius, - map.getMap().scene.globe.ellipsoid - ) - setNewCircle(circle) - onDraw(circle) - }, - material: Cesium.Material.fromType('Color', { - color: Cesium.Color.fromAlpha(contrastingColor, 0.2), - }), - }) - } - }, [map, model]) -} - -export const CesiumCircleDisplay = ({ - map, - model, - onDraw, - translation, - isInteractive, -}: { - map: any - model: any - onDraw?: (newCircle: Circle) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - // Use state to store the circle drawn by the user before they click Apply or Cancel. - // When the user clicks Draw, they are allowed to edit the existing circle (if it - // exists), or draw a new circle. If they draw a new circle, save it to state then show - // it instead of the draw model because we don't want to update the draw model - // unless the user clicks Apply. - const [newCircle, setNewCircle] = React.useState(null) - if (onDraw) { - useStartMapDrawing({ map, model, setNewCircle, onDraw }) - } - useListenToModel({ - map, - model, - newCircle, - onDraw, - translation, - isInteractive, - }) - React.useEffect(() => { - return () => { - if (model && map) { - removeOldDrawing({ map, id: getIdFromModelForDisplay({ model }) }) - map.getMap().drawHelper.stopDrawing() - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.tsx deleted file mode 100644 index b44a06f2631..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/drawing-and-display.tsx +++ /dev/null @@ -1,436 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { useState, useEffect } from 'react' -import { - getDrawModeFromModel, - getShapeFromDrawMode, - getDrawModeFromShape, - useDrawingAndDisplayModels, -} from '../drawing-and-display' -import { CesiumBboxDisplay } from './bbox-display' -import { CesiumCircleDisplay } from './circle-display' -import { CesiumLineDisplay } from './line-display' -import { CesiumPolygonDisplay } from './polygon-display' -import { Editor } from '../draw-menu' -import { menu } from 'geospatialdraw' -import { Shape } from 'geospatialdraw/target/webapp/shape-utils' -import { DRAWING_STYLE } from '../openlayers/draw-styles' -import wreqr from '../../../../js/wreqr' -import _ from 'lodash' -import { InteractionsContext } from '../interactions.provider' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' - -const DrawingMenu = menu.DrawingMenu - -const SHAPES: Shape[] = [ - 'Bounding Box', - 'Line', - 'Point', - 'Point Radius', - 'Polygon', -] -const DEFAULT_SHAPE = 'Polygon' - -export const removeOldDrawing = ({ map, id }: { map: any; id: string }) => { - const relevantPrimitives = map - .getMap() - .scene.primitives._primitives.filter((prim: any) => { - return prim.id === id - }) - relevantPrimitives.forEach((relevantPrimitive: any) => { - if (typeof relevantPrimitive.setEditMode === 'function') { - // Need to call this to remove the editing billboards and click handlers - relevantPrimitive.setEditMode(false) - } - map.getMap().scene.primitives.remove(relevantPrimitive) - }) - relevantPrimitives.length > 0 && map.getMap().scene.requestRender() -} - -const makeOldDrawingNonEditable = ({ map, id }: { map: any; id: string }) => { - const relevantPrimitives = map - .getMap() - .scene.primitives._primitives.filter((prim: any) => { - return prim.id === id - }) - relevantPrimitives.forEach((relevantPrimitive: any) => { - if (typeof relevantPrimitive.setEditMode === 'function') { - relevantPrimitive.setEditMode(false) - } - if (typeof relevantPrimitive.setEditable === 'function') { - relevantPrimitive.setEditable(false) - } - }) - relevantPrimitives.length > 0 && map.getMap().scene.requestRender() -} - -const nestedArraysOverlap = (arrayA: any[], arrayB: any[]) => { - return arrayA.some((elemA) => - arrayB.some((elemB) => JSON.stringify(elemA) === JSON.stringify(elemB)) - ) -} - -const isNewShape = (model: any) => { - const mode = model.get('mode') - switch (mode) { - case 'bbox': - const box = { - north: model.get('north'), - east: model.get('east'), - west: model.get('west'), - south: model.get('south'), - } - let prevModel = model.previousAttributes() - if (box.north && prevModel) { - const prevBox = { - north: prevModel['north'], - east: prevModel['east'], - west: prevModel['west'], - south: prevModel['south'], - } - if (prevBox.north) { - return !( - box.north === prevBox.north || - box.east === prevBox.east || - box.west === prevBox.west || - box.south === prevBox.south - ) - } - } - case 'circle': - const circle = { lon: model.get('lon'), lat: model.get('lat') } - prevModel = model.previousAttributes() - if (circle && prevModel) { - const prevCircle = { lon: prevModel['lon'], lat: prevModel['lat'] } - if (prevCircle.lat && prevCircle.lon) { - return !( - circle.lat === prevCircle.lat || circle.lon === prevCircle.lon - ) - } - } - case 'line': - const line = model.get('line') - prevModel = model.previousAttributes() - if (line && prevModel) { - const prevLine = prevModel['line'] - if (prevLine) { - return !nestedArraysOverlap(line, prevLine) - } - } - case 'poly': - const poly = model.get('polygon') - prevModel = model.previousAttributes() - if (prevModel) { - const prevPoly = prevModel['polygon'] - if (prevPoly) { - return !nestedArraysOverlap(poly, prevPoly) - } - } - default: - return false - } -} - -export const removeOrLockOldDrawing = ( - isInteractive: boolean, - id: any, - map: any, - model: any -) => { - const canChange = [ - 'isInteractive', - 'polygonBufferWidth', - 'lineWidth', - 'line', - 'polygon', - 'usng', - 'bbox', - ] - - // remove previous shape from map after updating attributes, dragging shape, or exiting interactive mode - if ( - isInteractive || - (!isInteractive && - Object.keys(model.changed).some((change) => canChange.includes(change)) && - !isNewShape(model)) - ) { - removeOldDrawing({ map, id }) - } else { - makeOldDrawingNonEditable({ map, id }) - } -} - -let drawingLocation: any - -const updateDrawingLocation = (newDrawingLocation: any) => { - drawingLocation = newDrawingLocation -} - -const ensurePolygonIsClosed = (polygon: any) => { - const points = polygon?.polygon - if (Array.isArray(points) && points.length > 0) { - const first = points[0] - const last = points[points.length - 1] - if (!_.isEqual(first, last)) { - points.push(first) - } - } -} - -const pickLocation = (model?: any) => { - const mode = getDrawModeFromModel({ model }) - switch (mode) { - case 'bbox': - return _.pick(model.attributes, 'north', 'south', 'east', 'west') - case 'circle': - return _.pick(model.attributes, 'lat', 'lon') - case 'line': - return _.pick(model.attributes, 'line') - case 'poly': - return _.pick(model.attributes, 'polygon') - default: - return {} - } -} - -export const CesiumDrawings = ({ - map, - selectionInterface, -}: { - map: any - selectionInterface: any -}) => { - const { models, filterModels, drawingModels } = useDrawingAndDisplayModels({ - selectionInterface, - map, - }) - - const [drawingModel] = - drawingModels.length > 0 ? drawingModels.slice(-1) : [undefined] - - const [isDrawing, setIsDrawing] = useState(false) - const [drawingShape, setDrawingShape] = useState(DEFAULT_SHAPE) - - const { interactiveGeo, translation, setInteractiveModels } = - React.useContext(InteractionsContext) - - const nonDrawingModels = models.concat(filterModels) - - useEffect(() => { - const models = nonDrawingModels.filter( - (m) => m.get('locationId') === interactiveGeo - ) - setInteractiveModels(models) - }, [interactiveGeo, models, filterModels]) - - const handleKeydown = React.useCallback( - (e: any) => { - if (e.key === 'Enter') { - e.preventDefault() - if (drawingLocation) finishDrawing() - } - if (e.key === 'Escape') { - cancelDrawing() - } - }, - [drawingModel, drawingShape, drawingLocation] - ) - - useEffect(() => { - setIsDrawing(!!drawingModel) - if (drawingModel) { - window.addEventListener('keydown', handleKeydown) - setDrawingShape( - getShapeFromDrawMode(getDrawModeFromModel({ model: drawingModel })) - ) - } else { - window.removeEventListener('keydown', handleKeydown) - } - return () => window.removeEventListener('keydown', handleKeydown) - }, [drawingModel]) - - const cancelDrawing = () => { - drawingModel.set('drawing', false) - // the listener for this calls Drawing.turnOffDrawing() - wreqr.vent.trigger('search:drawcancel', drawingModel) - setIsDrawing(false) - drawingLocation = null - } - - const finishDrawing = () => { - if (!drawingLocation) { - cancelDrawing() - return - } - - wreqr.vent.trigger( - `search:${getDrawModeFromShape(drawingShape)}-end`, - drawingModel - ) - wreqr.vent.trigger(`search:drawend`, drawingModel) - if (drawingShape === 'Polygon') { - ensurePolygonIsClosed(drawingLocation) - } - drawingModel.set({ ...drawingLocation, drawing: false }) - setIsDrawing(false) - drawingLocation = null - } - - const isNotBeingEdited = (model: any) => - !drawingModel || !_.isEqual(pickLocation(model), pickLocation(drawingModel)) - - /* - When editing a shape, don't display the other models that correspond to that shape. Because - we don't display shapes on the surface of the globe, we can't use Cesium's APIs to force the - shape being edited to the top. If the corresponding models were shown, then multiple overlapping - shapes would be drawn on the map, and the sole editable shape is not guaranteed to be visible - or able to be interacted with. - Note that we cannot compare the filterModel IDs to that of the drawingModel, because while a - filterModel and a drawingModel may represent the same shape, they are different model object - instances and have different IDs. Instead, we check for equivalent location attributes on the - models. - The models array is a different story, since it can contain the same model object instances - as drawingModels, but we use the non-ID-based comparison method described above for it, too, - to ensure consistent behavior. - */ - return ( - <> - {nonDrawingModels.filter(isNotBeingEdited).map((model) => { - const drawMode = getDrawModeFromModel({ model }) - const isInteractive = model.get('locationId') === interactiveGeo - const shapeTranslation = - translation && isInteractive ? translation : undefined - switch (drawMode) { - case 'bbox': - return ( - - ) - case 'circle': - return ( - - ) - case 'line': - return ( - - ) - case 'poly': - return ( - - ) - default: - return <> - } - })} - {drawingModels.map((model) => { - const drawMode = getDrawModeFromModel({ model }) - switch (drawMode) { - case 'bbox': - return ( - - ) - case 'circle': - return ( - - ) - case 'line': - return ( - - ) - case 'poly': - return ( - - ) - default: - return <> - } - })} - - {/* - Use geospatialdraw's toolbar even though geospatialdraw does not support Cesium. - We don't actually use the library for drawing, but we want the drawing experience - on the 3D map to look like it does on the 2D map. This is why we only care about - the shape icon displayed on the toolbar and the apply/cancel handlers; everything - else is just no-ops. - */} - {drawingModel && ( - - {}, - removeInteraction: () => {}, - addInteraction: () => {}, - }} - isActive={isDrawing} - geometry={null} - onCancel={cancelDrawing} - onOk={finishDrawing} - onSetShape={() => {}} - disabledShapes={SHAPES.filter((shape) => shape !== drawingShape)} - onUpdate={() => {}} - saveAndContinue={false} - mapStyle={DRAWING_STYLE} - /> - - )} - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/line-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/line-display.tsx deleted file mode 100644 index 0ce15a40875..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/line-display.tsx +++ /dev/null @@ -1,464 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import DistanceUtils from '../../../../js/DistanceUtils' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import _ from 'underscore' -import _cloneDeep from 'lodash/cloneDeep' -import * as Turf from '@turf/turf' -import { validateGeo } from '../../../../react-component/utils/validation' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { useRender } from '../../../hooks/useRender' -import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper' -import utility from './utility' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' -import { Translation } from '../interactions.provider' -const toDeg = Cesium.Math.toDegrees - -const CAMERA_MAGNITUDE_THRESHOLD = 8000000 - -type Line = { - line: [number, number][] -} - -const getCurrentMagnitudeFromMap = ({ map }: { map: any }) => { - return map.getMap().camera.getMagnitude() -} - -const needsRedraw = ({ - map, - drawnMagnitude, -}: { - map: any - drawnMagnitude: any -}) => { - const currentMagnitude = getCurrentMagnitudeFromMap({ map }) - - if ( - currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - if ( - currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - - return false -} - -export const constructSolidLinePrimitive = ({ - coordinates, - model, - id, - color, - buffer, - isInteractive, -}: { - coordinates: any - model: any - id: string - color?: string - buffer?: number - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const _color = color || model.get('color') - - return { - width: isInteractive ? 6 : 4, - material: Cesium.Material.fromType('Color', { - color: isInteractive - ? Cesium.Color.fromCssColorString(contrastingColor) - : _color - ? Cesium.Color.fromCssColorString(_color) - : Cesium.Color.KHAKI, - }), - id, - positions: Cesium.Cartesian3.fromDegreesArray(_.flatten(coordinates)), - buffer, - } -} - -export const constructOutlinedLinePrimitive = ({ - coordinates, - model, - id, - color, - buffer, - isInteractive, -}: { - coordinates: any - model: any - id: string - color?: string - buffer?: number - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const _color = color || model.get('color') - return { - ...constructSolidLinePrimitive({ - coordinates, - model, - id, - color, - buffer, - isInteractive, - }), - width: isInteractive ? 12 : 8, - material: Cesium.Material.fromType('PolylineOutline', { - color: isInteractive - ? Cesium.Color.fromCssColorString(contrastingColor) - : _color - ? Cesium.Color.fromCssColorString(_color) - : Cesium.Color.KHAKI, - outlineColor: Cesium.Color.WHITE, - outlineWidth: isInteractive ? 6 : 4, - }), - } -} - -export const constructDottedLinePrimitive = ({ - coordinates, - model, - isInteractive, -}: { - coordinates: any - model: any - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const color = model.get('color') - - return { - width: isInteractive ? 3 : 2, - material: Cesium.Material.fromType('PolylineDash', { - color: isInteractive - ? Cesium.Color.fromCssColorString(contrastingColor) - : color - ? Cesium.Color.fromCssColorString(color) - : Cesium.Color.KHAKI, - dashLength: 20, - dashPattern: 255, - }), - id: 'userDrawing', - positions: Cesium.Cartesian3.fromDegreesArray(_.flatten(coordinates)), - } -} - -const positionsToLine = ( - positions: Cesium.Cartesian3[], - ellipsoid: Cesium.Ellipsoid -): Line => { - return { - line: positions.map((cartPos) => { - const latLon = ellipsoid.cartesianToCartographic(cartPos) - const lon = toDeg(latLon.longitude) - const lat = toDeg(latLon.latitude) - return [ - DistanceUtils.coordinateRound(lon), - DistanceUtils.coordinateRound(lat), - ] - }), - } -} - -const drawGeometry = ({ - model, - map, - id, - setDrawnMagnitude, - onDraw, - translation, - isInteractive, -}: { - model: any - map: any - id: any - setDrawnMagnitude: (number: any) => void - onDraw?: (drawingLocation: Line) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const json = model.toJSON() - let linePoints = json.line - if ( - linePoints === undefined || - validateGeo('line', JSON.stringify(linePoints))?.error - ) { - map.getMap().scene.requestRender() - return - } - - // Create a deep copy since we may modify some of these positions for display purposes - linePoints = _cloneDeep(json.line) - - linePoints.forEach((point: any) => { - if (translation) { - point[0] += translation.longitude - point[1] += translation.latitude - } - point[0] = DistanceUtils.coordinateRound(point[0]) - point[1] = DistanceUtils.coordinateRound(point[1]) - }) - - const setArr = _.uniq(linePoints) - if (setArr.length < 2) { - return - } - - const turfLine = Turf.lineString(setArr) as - | Turf.Feature - | Turf.Feature - const lineWidth = DistanceUtils.getDistanceInMeters( - json.lineWidth, - model.get('lineUnits') - ) - const cameraMagnitude = map.getMap().camera.getMagnitude() - setDrawnMagnitude(cameraMagnitude) - - removeOrLockOldDrawing(Boolean(isInteractive), id, map, model) - - let primitive - - if (onDraw) { - primitive = new (DrawHelper.PolylinePrimitive as any)( - constructSolidLinePrimitive({ - coordinates: turfLine.geometry.coordinates, - model, - id, - color: contrastingColor, - buffer: lineWidth, - }) - ) - primitive.setEditable() - primitive.addListener('onEdited', function (event: any) { - const line = positionsToLine( - event.positions, - map.getMap().scene.globe.ellipsoid - ) - onDraw(line) - }) - } else { - let bufferedLine = turfLine - const isBuffered = lineWidth > 0 - if (isBuffered) { - utility.adjustGeoCoords(turfLine) - bufferedLine = Turf.buffer(turfLine, Math.max(lineWidth, 1), { - units: 'meters', - }) - if (!bufferedLine) { - return - } - // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments - utility.adjustGeoCoords(bufferedLine) - } - - primitive = new Cesium.PolylineCollection() - primitive.id = id - primitive.locationId = json.locationId - primitive.add( - constructOutlinedLinePrimitive({ - coordinates: bufferedLine.geometry.coordinates, - model, - id, - isInteractive, - }) - ) - primitive.add( - constructDottedLinePrimitive({ - coordinates: turfLine.geometry.coordinates, - model, - isInteractive, - }) - ) - } - - map.getMap().scene.primitives.add(primitive) - map.getMap().scene.requestRender() -} - -const useCameraMagnitude = ({ - map, -}: { - map: any -}): [number, React.Dispatch>] => { - const [cameraMagnitude, setCameraMagnitude] = React.useState(0) - const [isMoving, setIsMoving] = React.useState(false) - const render = useRender() - React.useEffect(() => { - const startListener = () => setIsMoving(true) - const endListener = () => setIsMoving(false) - map?.getMap().scene.camera.moveStart.addEventListener(startListener) - map?.getMap().scene.camera.moveEnd.addEventListener(endListener) - return () => { - map?.getMap().scene.camera.moveStart.removeEventListener(startListener) - map?.getMap().scene.camera.moveEnd.removeEventListener(endListener) - } - }, [map]) - React.useEffect(() => { - if (isMoving) { - const animationId = window.requestAnimationFrame(() => { - setCameraMagnitude(getCurrentMagnitudeFromMap({ map })) - }) - return () => { - window.cancelAnimationFrame(animationId) - } - } - return () => {} - }, [isMoving, render]) - return [cameraMagnitude, setCameraMagnitude] -} - -const useListenToLineModel = ({ - model, - map, - onDraw, - newLine, - translation, - isInteractive, -}: { - model: any - map: any - onDraw?: (drawingLocation: Line) => void - newLine: Line | null - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const [cameraMagnitude] = useCameraMagnitude({ map }) - const [drawnMagnitude, setDrawnMagnitude] = React.useState(0) - const callback = React.useMemo(() => { - return () => { - if (map) { - if (newLine) { - // Clone the model to display the new line drawn because we don't - // want to update the existing model unless the user clicks Apply. - const newModel = model.clone() - newModel.set(newLine) - drawGeometry({ - map, - model: newModel, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - }) - } else if (model) { - drawGeometry({ - map, - model, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - translation, - isInteractive, - }) - } - } - } - }, [model, map, newLine, translation, isInteractive]) - useListenTo(model, 'change:line change:lineWidth change:lineUnits', callback) - React.useEffect(() => { - if (map && needsRedraw({ map, drawnMagnitude })) { - callback() - } - }, [cameraMagnitude, drawnMagnitude, callback, map]) - React.useEffect(() => { - callback() - }, [callback]) -} - -const useStartMapDrawing = ({ - map, - model, - setNewLine, - onDraw, -}: { - map: any - model: any - setNewLine: (newLine: Line) => void - onDraw: (newLine: Line) => void -}) => { - React.useEffect(() => { - if (map && model) { - map.getMap().drawHelper[`startDrawingPolyline`]({ - callback: (positions: Cesium.Cartesian3[]) => { - const drawnLine = positionsToLine( - positions, - map.getMap().scene.globe.ellipsoid - ) - const line = drawnLine.line - //this shouldn't ever get hit because the draw library should protect against it, but just in case it does, remove the point - if ( - line.length > 3 && - line[line.length - 1][0] === line[line.length - 2][0] && - line[line.length - 1][1] === line[line.length - 2][1] - ) { - line.pop() - } - setNewLine(drawnLine) - onDraw(drawnLine) - }, - material: Cesium.Material.fromType('Color', { - color: Cesium.Color.fromCssColorString(contrastingColor), - }), - }) - } - }, [map, model]) -} - -export const CesiumLineDisplay = ({ - map, - model, - onDraw, - translation, - isInteractive, -}: { - map: any - model: any - onDraw?: (newLine: Line) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - // Use state to store the line drawn by the user before they click Apply or Cancel. - // When the user clicks Draw, they are allowed to edit the existing line (if it - // exists), or draw a new line. If they draw a new line, save it to state then show - // it instead of the draw model because we don't want to update the draw model - // unless the user clicks Apply. - const [newLine, setNewLine] = React.useState(null) - if (onDraw) { - useStartMapDrawing({ map, model, onDraw, setNewLine }) - } - useListenToLineModel({ - map, - model, - onDraw, - newLine, - translation, - isInteractive, - }) - React.useEffect(() => { - return () => { - if (model && map) { - removeOldDrawing({ map, id: getIdFromModelForDisplay({ model }) }) - map.getMap().drawHelper.stopDrawing() - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/map.cesium.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/map.cesium.ts deleted file mode 100644 index 83da08b7ffc..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/map.cesium.ts +++ /dev/null @@ -1,1257 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import $ from 'jquery' -import _ from 'underscore' -import utility from './utility' -import DrawingUtility from '../DrawingUtility' -import wreqr from '../../../../js/wreqr' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper' -import { - CesiumImageryProviderTypes, - CesiumLayers, -} from '../../../../js/controllers/cesium.layers' -import { Drawing } from '../../../singletons/drawing' -import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult' -import { ClusterType } from '../react/geometries' -import { StartupDataStore } from '../../../../js/model/Startup/startup' -const defaultColor = '#3c6dd5' -const eyeOffset = new Cesium.Cartesian3(0, 0, 0) -const pixelOffset = new Cesium.Cartesian2(0.0, 0) -const rulerColor = new Cesium.Color(0.31, 0.43, 0.52) -const rulerPointColor = '#506f85' -const rulerLineHeight = 0 -Cesium.BingMapsApi.defaultKey = StartupDataStore.Configuration.getBingKey() || 0 -const imageryProviderTypes = CesiumImageryProviderTypes -function setupTerrainProvider(viewer: any, terrainProvider: any) { - if (terrainProvider == null || terrainProvider === undefined) { - console.info(`Unknown terrain provider configuration. - Default Cesium terrain provider will be used.`) - return - } - const { type, ...terrainConfig } = terrainProvider - const TerrainProvider = imageryProviderTypes[type] - if (TerrainProvider === undefined) { - console.warn(` - Unknown terrain provider type: ${type}. - Default Cesium terrain provider will be used. - `) - return - } - const defaultCesiumTerrainProvider = viewer.scene.terrainProvider - const customTerrainProvider = new TerrainProvider(terrainConfig) - customTerrainProvider.errorEvent.addEventListener(() => { - console.warn(` - Issue using terrain provider: ${JSON.stringify({ - type, - ...terrainConfig, - })} - Falling back to default Cesium terrain provider. - `) - viewer.scene.terrainProvider = defaultCesiumTerrainProvider - }) - viewer.scene.terrainProvider = customTerrainProvider -} -function createMap(insertionElement: any, mapLayers: any) { - const layerCollectionController = new CesiumLayers({ - collection: mapLayers, - }) - const viewer = layerCollectionController.makeMap({ - element: insertionElement, - cesiumOptions: { - sceneMode: Cesium.SceneMode.SCENE3D, - creditContainer: document.createElement('div'), - animation: false, - fullscreenButton: false, - timeline: false, - geocoder: false, - homeButton: false, - navigationHelpButton: false, - sceneModePicker: false, - selectionIndicator: false, - infoBox: false, - //skyBox: false, - //skyAtmosphere: false, - baseLayerPicker: false, - imageryProvider: false, - mapMode2D: 0, - }, - }) - const requestRender = () => { - viewer.scene.requestRender() - } - ;(wreqr as any).vent.on('map:requestRender', requestRender) - // disable right click drag to zoom (context menu instead); - viewer.scene.screenSpaceCameraController.zoomEventTypes = [ - Cesium.CameraEventType.WHEEL, - Cesium.CameraEventType.PINCH, - ] - viewer.screenSpaceEventHandler.setInputAction(() => { - if (!Drawing.isDrawing()) { - $('body').mousedown() - } - }, Cesium.ScreenSpaceEventType.LEFT_DOWN) - viewer.screenSpaceEventHandler.setInputAction(() => { - if (!Drawing.isDrawing()) { - $('body').mousedown() - } - }, Cesium.ScreenSpaceEventType.RIGHT_DOWN) - setupTerrainProvider( - viewer, - StartupDataStore.Configuration.getTerrainProvider() - ) - return { - map: viewer, - requestRenderHandler: requestRender, - } -} -function determineIdsFromPosition(position: any, map: any) { - let id, locationId - const pickedObject = map.scene.pick(position) - if (pickedObject) { - id = pickedObject.id - if (id && id.constructor === Cesium.Entity) { - id = id.resultId - } - locationId = pickedObject.collection?.locationId - } - return { id, locationId } -} -function expandRectangle(rectangle: any) { - const scalingFactor = 0.05 - let widthGap = Math.abs(rectangle.east) - Math.abs(rectangle.west) - let heightGap = Math.abs(rectangle.north) - Math.abs(rectangle.south) - //ensure rectangle has some size - if (widthGap === 0) { - widthGap = 1 - } - if (heightGap === 0) { - heightGap = 1 - } - rectangle.east = rectangle.east + Math.abs(scalingFactor * widthGap) - rectangle.north = rectangle.north + Math.abs(scalingFactor * heightGap) - rectangle.south = rectangle.south - Math.abs(scalingFactor * heightGap) - rectangle.west = rectangle.west - Math.abs(scalingFactor * widthGap) - return rectangle -} -function getDestinationForVisiblePan(rectangle: any, map: any) { - let destinationForZoom = expandRectangle(rectangle) - if (map.scene.mode === Cesium.SceneMode.SCENE3D) { - destinationForZoom = - map.camera.getRectangleCameraCoordinates(destinationForZoom) - } - return destinationForZoom -} -function determineCesiumColor(color: any) { - return !_.isUndefined(color) - ? Cesium.Color.fromCssColorString(color) - : Cesium.Color.fromCssColorString(defaultColor) -} -function convertPointCoordinate(coordinate: any) { - return { - latitude: coordinate[1], - longitude: coordinate[0], - altitude: coordinate[2], - } -} -function isNotVisible(cartesian3CenterOfGeometry: any, occluder: any) { - return !occluder.isPointVisible(cartesian3CenterOfGeometry) -} - -// https://cesium.com/learn/cesiumjs/ref-doc/Camera.html -export const LookingStraightDownOrientation = { - heading: 0, // North is up - like compass direction - pitch: -Cesium.Math.PI_OVER_TWO, // Looking straight down - like a level from up to down - roll: 0, // No roll - like a level from left to right -} - -export default function CesiumMap( - insertionElement: any, - selectionInterface: any, - _notificationEl: any, - componentElement: any, - mapModel: any, - mapLayers: any -) { - let overlays = {} - let shapes: any = [] - const { map, requestRenderHandler } = createMap(insertionElement, mapLayers) - const drawHelper = new (DrawHelper as any)(map) - map.drawHelper = drawHelper - const billboardCollection = setupBillboardCollection() - const labelCollection = setupLabelCollection() - setupTooltip(map, selectionInterface) - function updateCoordinatesTooltip(position: any) { - const cartesian = map.camera.pickEllipsoid( - position, - map.scene.globe.ellipsoid - ) - if (Cesium.defined(cartesian)) { - let cartographic = Cesium.Cartographic.fromCartesian(cartesian) - mapModel.updateMouseCoordinates({ - lat: cartographic.latitude * Cesium.Math.DEGREES_PER_RADIAN, - lon: cartographic.longitude * Cesium.Math.DEGREES_PER_RADIAN, - }) - } else { - mapModel.clearMouseCoordinates() - } - } - // @ts-expect-error ts-migrate(6133) FIXME: 'selectionInterface' is declared but its value is ... Remove this comment to see the full error message - function setupTooltip(map: any, selectionInterface: any) { - const handler = new Cesium.ScreenSpaceEventHandler(map.scene.canvas) - handler.setInputAction((movement: any) => { - $(componentElement).removeClass('has-feature') - if (map.scene.mode === Cesium.SceneMode.MORPHING) { - return - } - updateCoordinatesTooltip(movement.endPosition) - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - } - function setupBillboardCollection() { - const billboardCollection = new Cesium.BillboardCollection() - map.scene.primitives.add(billboardCollection) - return billboardCollection - } - function setupLabelCollection() { - const labelCollection = new Cesium.LabelCollection() - map.scene.primitives.add(labelCollection) - return labelCollection - } - /* - * Returns a visible label that is in the same location as the provided label (geometryInstance) if one exists. - * If findSelected is true, the function will also check for hidden labels in the same location but are selected. - */ - function findOverlappingLabel(findSelected: any, geometry: any) { - return _.find( - mapModel.get('labels'), - (label) => - label.position.x === geometry.position.x && - label.position.y === geometry.position.y && - ((findSelected && label.isSelected) || label.show) - ) - } - /* - Only shows one label if there are multiple labels in the same location. - - Show the label in the following importance: - - it is selected and the existing label is not - - there is no other label displayed at the same location - - it is the label that was found by findOverlappingLabel - - Arguments are: - - the label to show/hide - - if the label is selected - - if the search for overlapping label should include hidden selected labels - */ - function showHideLabel({ geometry, findSelected = false }: any) { - const isSelected = geometry.isSelected - const labelWithSamePosition = findOverlappingLabel(findSelected, geometry) - if ( - isSelected && - labelWithSamePosition && - !labelWithSamePosition.isSelected - ) { - labelWithSamePosition.show = false - } - const otherLabelNotSelected = labelWithSamePosition - ? !labelWithSamePosition.isSelected - : true - geometry.show = - (isSelected && otherLabelNotSelected) || - !labelWithSamePosition || - geometry.id === labelWithSamePosition.id - } - /* - Shows a hidden label. Used when deleting a label that is shown. - */ - function showHiddenLabel(geometry: any) { - if (!geometry.show) { - return - } - const hiddenLabel = _.find( - mapModel.get('labels'), - (label) => - label.position.x === geometry.position.x && - label.position.y === geometry.position.y && - label.id !== geometry.id && - !label.show - ) - if (hiddenLabel) { - hiddenLabel.show = true - } - } - - const minimumHeightAboveTerrain = 2 - const exposedMethods = { - onLeftClick(callback: any) { - $(map.scene.canvas).on('click', (e) => { - const boundingRect = map.scene.canvas.getBoundingClientRect() - const { id } = determineIdsFromPosition( - { - x: e.clientX - boundingRect.left, - y: e.clientY - boundingRect.top, - }, - map - ) - callback(e, { mapTarget: id }) - }) - }, - onLeftClickMapAPI(callback: any) { - let lastClickTime = 0 - let clickTimeout = 0 - map.clickEventHandler = new Cesium.ScreenSpaceEventHandler(map.canvas) - map.clickEventHandler.setInputAction((e: any) => { - // On a double-click, Cesium will fire 2 left-click events, too. We will only handle a - // click if 1) another click did not happen in the last 250 ms, and 2) another click - // does not happen in the next 250 ms. - if (clickTimeout > 0) { - clearTimeout(clickTimeout) - } - const currentClickTime = Date.now() - if (currentClickTime - lastClickTime > 250) { - clickTimeout = window.setTimeout(() => { - const { locationId } = determineIdsFromPosition(e.position, map) - callback(locationId) - }, 250) - } - lastClickTime = currentClickTime - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) - }, - clearLeftClickMapAPI() { - map.clickEventHandler?.destroy() - }, - onRightClick(callback: any) { - $(map.scene.canvas).on('contextmenu', (e) => { - callback(e) - }) - }, - clearRightClick() { - $(map.scene.canvas).off('contextmenu') - }, - onDoubleClick() { - map.doubleClickEventHandler = new Cesium.ScreenSpaceEventHandler( - map.canvas - ) - map.doubleClickEventHandler.setInputAction((e: any) => { - const { locationId } = determineIdsFromPosition(e.position, map) - if (locationId) { - ;(wreqr as any).vent.trigger('location:doubleClick', locationId) - } - }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK) - }, - clearDoubleClick() { - map.doubleClickEventHandler?.destroy() - }, - onMouseTrackingForGeoDrag({ - moveFrom, - down, - move, - up, - }: { - moveFrom?: Cesium.Cartographic - down: any - move: any - up: any - }) { - map.scene.screenSpaceCameraController.enableRotate = false - map.dragAndDropEventHandler = new Cesium.ScreenSpaceEventHandler( - map.canvas - ) - map.dragAndDropEventHandler.setInputAction((e: any) => { - const { locationId } = determineIdsFromPosition(e.position, map) - const cartesian = map.scene.camera.pickEllipsoid( - e.position, - map.scene.globe.ellipsoid - ) - const cartographic = Cesium.Cartographic.fromCartesian( - cartesian, - map.scene.globe.ellipsoid - ) - down({ position: cartographic, mapLocationId: locationId }) - }, Cesium.ScreenSpaceEventType.LEFT_DOWN) - map.dragAndDropEventHandler.setInputAction((e: any) => { - const { locationId } = determineIdsFromPosition(e.endPosition, map) - const cartesian = map.scene.camera.pickEllipsoid( - e.endPosition, - map.scene.globe.ellipsoid - ) - const cartographic = Cesium.Cartographic.fromCartesian( - cartesian, - map.scene.globe.ellipsoid - ) - const translation = moveFrom - ? { - longitude: Cesium.Math.toDegrees( - cartographic.longitude - moveFrom.longitude - ), - latitude: Cesium.Math.toDegrees( - cartographic.latitude - moveFrom.latitude - ), - } - : null - move({ translation, mapLocationId: locationId }) - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - map.dragAndDropEventHandler.setInputAction( - up, - Cesium.ScreenSpaceEventType.LEFT_UP - ) - }, - clearMouseTrackingForGeoDrag() { - map.scene.screenSpaceCameraController.enableRotate = true - map.dragAndDropEventHandler?.destroy() - }, - onMouseTrackingForPopup( - downCallback: any, - moveCallback: any, - upCallback: any - ) { - map.screenSpaceEventHandlerForPopupPreview = - new Cesium.ScreenSpaceEventHandler(map.canvas) - map.screenSpaceEventHandlerForPopupPreview.setInputAction(() => { - downCallback() - }, Cesium.ScreenSpaceEventType.LEFT_DOWN) - map.screenSpaceEventHandlerForPopupPreview.setInputAction(() => { - moveCallback() - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - this.onLeftClick(upCallback) - }, - onMouseMove(callback: any) { - $(map.scene.canvas).on('mousemove', (e) => { - const boundingRect = map.scene.canvas.getBoundingClientRect() - const position = { - x: e.clientX - boundingRect.left, - y: e.clientY - boundingRect.top, - } - const { id, locationId } = determineIdsFromPosition(position, map) - callback(e, { - mapTarget: id, - mapLocationId: locationId, - }) - }) - }, - clearMouseMove() { - $(map.scene.canvas).off('mousemove') - }, - timeoutIds: [] as number[], - onCameraMoveStart(callback: any) { - this.timeoutIds.forEach((timeoutId: any) => { - window.clearTimeout(timeoutId) - }) - this.timeoutIds = [] - map.scene.camera.moveStart.addEventListener(callback) - }, - offCameraMoveStart(callback: any) { - map.scene.camera.moveStart.removeEventListener(callback) - }, - onCameraMoveEnd(callback: any) { - const timeoutCallback = () => { - this.timeoutIds.push( - window.setTimeout(() => { - callback() - }, 300) - ) - } - map.scene.camera.moveEnd.addEventListener(timeoutCallback) - }, - offCameraMoveEnd(callback: any) { - map.scene.camera.moveEnd.removeEventListener(callback) - }, - doPanZoom(coords: any) { - if (coords.length === 0) { - return - } - const cartArray = coords.map((coord: any) => - Cesium.Cartographic.fromDegrees( - coord[0], - coord[1], - map.camera._positionCartographic.height - ) - ) - if (cartArray.length === 1) { - const point = Cesium.Ellipsoid.WGS84.cartographicToCartesian( - cartArray[0] - ) - this.panToCoordinate(point, 2.0) - } else { - const rectangle = Cesium.Rectangle.fromCartographicArray(cartArray) - this.panToRectangle(rectangle, { - duration: 2.0, - correction: 1.0, - }) - } - }, - panToResults(results: any) { - let rectangle, cartArray, point - cartArray = _.flatten( - results - .filter((result: any) => result.hasGeometry()) - .map( - (result: any) => - _.map(result.getPoints('location'), (coordinate) => - Cesium.Cartographic.fromDegrees( - coordinate[0], - coordinate[1], - map.camera._positionCartographic.height - ) - ), - true - ) - ) - if (cartArray.length > 0) { - if (cartArray.length === 1) { - point = Cesium.Ellipsoid.WGS84.cartographicToCartesian(cartArray[0]) - this.panToCoordinate(point) - } else { - rectangle = Cesium.Rectangle.fromCartographicArray(cartArray) - this.panToRectangle(rectangle) - } - } - }, - panToCoordinate(coords: any, duration = 0.5) { - map.scene.camera.flyTo({ - duration, - destination: coords, - }) - }, - panToExtent() {}, - panToShapesExtent({ - duration = 500, - }: { - duration?: number // take in milliseconds for normalization with openlayers duration being milliseconds - } = {}) { - const currentPrimitives = map.scene.primitives._primitives.filter( - (prim: any) => prim.id - ) - const actualPositions = currentPrimitives.reduce( - (blob: any, prim: any) => { - return blob.concat( - prim._polylines.reduce((subblob: any, polyline: any) => { - return subblob.concat(polyline._actualPositions) - }, []) - ) - }, - [] - ) - if (actualPositions.length > 0) { - map.scene.camera.flyTo({ - duration: duration / 1000, // change to seconds - destination: Cesium.Rectangle.fromCartesianArray(actualPositions), - orientation: LookingStraightDownOrientation, - }) - return true - } - return false - }, - getCenterPositionOfPrimitiveIds(primitiveIds: string[]) { - const primitives = map.scene.primitives - let positions = [] as any[] - - // Iterate over primitives and compute bounding spheres - for (let i = 0; i < primitives.length; i++) { - let primitive = primitives.get(i) - if (primitiveIds.includes(primitive.id)) { - for (let j = 0; j < primitive.length; j++) { - let point = primitive.get(j) - positions = positions.concat(point.positions) - } - } - } - - let boundingSphere = Cesium.BoundingSphere.fromPoints(positions) - - if ( - Cesium.BoundingSphere.equals( - boundingSphere, - Cesium.BoundingSphere.fromPoints([]) // empty - ) - ) { - throw new Error('No positions to zoom to') - } - - // here, notice we use flyTo instead of flyToBoundingSphere, as with the latter the orientation can't be controlled in this version and ends up tilted - // Calculate the position above the center of the bounding sphere - let radius = boundingSphere.radius - let center = boundingSphere.center - let up = Cesium.Cartesian3.clone(center) // Get the up direction from the center of the Earth to the position - Cesium.Cartesian3.normalize(up, up) - - let position = Cesium.Cartesian3.multiplyByScalar( - up, - radius * 2, - new Cesium.Cartesian3() - ) // Adjust multiplier for desired altitude - Cesium.Cartesian3.add(center, position, position) // Move position above the center - - return position - }, - zoomToIds({ - ids, - duration = 500, - }: { - ids: string[] - duration?: number // take in milliseconds for normalization with openlayers duration being milliseconds - }) { - // use flyTo instead of flyToBoundingSphere, as with the latter the orientation can't be controlled in this version and it ends up tilted - map.camera.flyTo({ - destination: this.getCenterPositionOfPrimitiveIds(ids), - orientation: LookingStraightDownOrientation, - duration: duration / 1000, // change to seconds - }) - }, - panToRectangle( - rectangle: any, - opts = { - duration: 0.5, - correction: 0.25, - } - ) { - map.scene.camera.flyTo({ - duration: opts.duration, - destination: getDestinationForVisiblePan(rectangle, map), - complete() { - map.scene.camera.flyTo({ - duration: opts.correction, - destination: getDestinationForVisiblePan(rectangle, map), - }) - }, - }) - }, - getShapes() { - return shapes - }, - zoomToExtent() {}, - zoomToBoundingBox({ north, south, east, west }: any) { - map.scene.camera.flyTo({ - duration: 0.5, - destination: Cesium.Rectangle.fromDegrees(west, south, east, north), - }) - }, - getBoundingBox() { - const viewRectangle = map.scene.camera.computeViewRectangle() - return _.mapObject(viewRectangle, (val) => Cesium.Math.toDegrees(val)) - }, - overlayImage(model: LazyQueryResult) { - const metacardId = model.plain.id - this.removeOverlay(metacardId) - const coords = model.getPoints('location') - const cartographics = _.map(coords, (coord) => { - coord = convertPointCoordinate(coord) - return Cesium.Cartographic.fromDegrees( - coord.longitude, - coord.latitude, - coord.altitude - ) - }) - const rectangle = Cesium.Rectangle.fromCartographicArray(cartographics) - const overlayLayer = map.scene.imageryLayers.addImageryProvider( - new Cesium.SingleTileImageryProvider({ - url: model.currentOverlayUrl, - rectangle, - }) - ) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - overlays[metacardId] = overlayLayer - }, - removeOverlay(metacardId: any) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - if (overlays[metacardId]) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - map.scene.imageryLayers.remove(overlays[metacardId]) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - delete overlays[metacardId] - } - }, - removeAllOverlays() { - for (const overlay in overlays) { - if (overlays.hasOwnProperty(overlay)) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - map.scene.imageryLayers.remove(overlays[overlay]) - } - } - overlays = {} - }, - getCartographicCenterOfClusterInDegrees(cluster: ClusterType) { - return utility.calculateCartographicCenterOfGeometriesInDegrees( - cluster.results - ) - }, - getWindowLocationsOfResults(results: LazyQueryResult[]) { - let occluder: any - if (map.scene.mode === Cesium.SceneMode.SCENE3D) { - occluder = new Cesium.EllipsoidalOccluder( - Cesium.Ellipsoid.WGS84, - map.scene.camera.position - ) - } - return results.map((result) => { - const cartesian3CenterOfGeometry = - utility.calculateCartesian3CenterOfGeometry(result) - if (occluder && isNotVisible(cartesian3CenterOfGeometry, occluder)) { - return undefined - } - const center = utility.calculateWindowCenterOfGeometry( - cartesian3CenterOfGeometry, - map - ) - if (center) { - return [center.x, center.y] - } else { - return undefined - } - }) - }, - /* - * Draws a marker on the map designating a start/end point for the ruler measurement. The given - * coordinates should be an object with 'lat' and 'lon' keys with degrees values. The given - * marker label should be a single character or digit that is displayed on the map marker. - */ - addRulerPoint(coordinates: any) { - const { lat, lon } = coordinates - // a point requires an altitude value so just use 0 - const point = [lon, lat, 0] - const options = { - id: ' ', - title: `Selected ruler coordinate`, - image: DrawingUtility.getCircle({ - fillColor: rulerPointColor, - icon: null, - }), - view: this, - } - return this.addPoint(point, options) - }, - /* - * Removes the given Billboard from the map. - */ - removeRulerPoint(billboardRef: any) { - billboardCollection.remove(billboardRef) - map.scene.requestRender() - }, - /* - * Draws a line on the map between the points in the given array of points. - */ - addRulerLine(point: any) { - let startingCoordinates = mapModel.get('startingCoordinates') - // creates an array of Cartesian3 points - // a PolylineGeometry allows the line to follow the curvature of the surface - map.coordArray = [ - startingCoordinates['lon'], - startingCoordinates['lat'], - rulerLineHeight, - point['lon'], - point['lat'], - rulerLineHeight, - ] - return map.entities.add({ - polyline: { - positions: new Cesium.CallbackProperty(function () { - return Cesium.Cartesian3.fromDegreesArrayHeights(map.coordArray) - }, false), - width: 5, - show: true, - material: rulerColor, - }, - }) - }, - /* - * Update the position of the ruler line - */ - setRulerLine(point: any) { - let startingCoordinates = mapModel.get('startingCoordinates') - map.coordArray = [ - startingCoordinates['lon'], - startingCoordinates['lat'], - rulerLineHeight, - point['lon'], - point['lat'], - rulerLineHeight, - ] - map.scene.requestRender() - }, - /* - * Removes the given polyline entity from the map. - */ - removeRulerLine(polyline: any) { - map.entities.remove(polyline) - map.scene.requestRender() - }, - /* - Adds a billboard point utilizing the passed in point and options. - Options are a view to relate to, and an id, and a color. - */ - addPointWithText(point: any, options: any) { - const pointObject = convertPointCoordinate(point) - const cartographicPosition = Cesium.Cartographic.fromDegrees( - pointObject.longitude, - pointObject.latitude, - pointObject.altitude - ) - let cartesianPosition = - map.scene.globe.ellipsoid.cartographicToCartesian(cartographicPosition) - const billboardRef = billboardCollection.add({ - image: undefined, - position: cartesianPosition, - id: options.id, - eyeOffset, - }) - billboardRef.unselectedImage = DrawingUtility.getCircleWithText({ - fillColor: options.color, - text: options.id.length, - strokeColor: 'white', - textColor: 'white', - badgeOptions: options.badgeOptions, - }) - billboardRef.partiallySelectedImage = DrawingUtility.getCircleWithText({ - fillColor: options.color, - text: options.id.length, - strokeColor: 'black', - textColor: 'white', - badgeOptions: options.badgeOptions, - }) - billboardRef.selectedImage = DrawingUtility.getCircleWithText({ - fillColor: 'orange', - text: options.id.length, - strokeColor: 'white', - textColor: 'white', - badgeOptions: options.badgeOptions, - }) - switch (options.isSelected) { - case 'selected': - billboardRef.image = billboardRef.selectedImage - break - case 'partially': - billboardRef.image = billboardRef.partiallySelectedImage - break - case 'unselected': - billboardRef.image = billboardRef.unselectedImage - break - } - //if there is a terrain provider and no altitude has been specified, sample it from the configured terrain provider - if (!pointObject.altitude && map.scene.terrainProvider) { - const promise = Cesium.sampleTerrain(map.scene.terrainProvider, 5, [ - cartographicPosition, - ]) - Cesium.when(promise, (updatedCartographic: any) => { - if (updatedCartographic[0].height && !options.view.isDestroyed) { - cartesianPosition = - map.scene.globe.ellipsoid.cartographicToCartesian( - updatedCartographic[0] - ) - billboardRef.position = cartesianPosition - } - }) - } - map.scene.requestRender() - return billboardRef - }, - /* - Adds a billboard point utilizing the passed in point and options. - Options are a view to relate to, and an id, and a color. - */ - addPoint(point: any, options: any) { - const pointObject = convertPointCoordinate(point) - const cartographicPosition = Cesium.Cartographic.fromDegrees( - pointObject.longitude, - pointObject.latitude, - pointObject.altitude - ) - const cartesianPosition = - map.scene.globe.ellipsoid.cartographicToCartesian(cartographicPosition) - const billboardRef = billboardCollection.add({ - image: undefined, - position: cartesianPosition, - id: options.id, - eyeOffset, - pixelOffset, - verticalOrigin: options.useVerticalOrigin - ? Cesium.VerticalOrigin.BOTTOM - : undefined, - horizontalOrigin: options.useHorizontalOrigin - ? Cesium.HorizontalOrigin.CENTER - : undefined, - view: options.view, - }) - billboardRef.unselectedImage = DrawingUtility.getPin({ - fillColor: options.color, - icon: options.icon, - badgeOptions: options.badgeOptions, - }) - billboardRef.selectedImage = DrawingUtility.getPin({ - fillColor: 'orange', - icon: options.icon, - badgeOptions: options.badgeOptions, - }) - billboardRef.image = options.isSelected - ? billboardRef.selectedImage - : billboardRef.unselectedImage - //if there is a terrain provider and no altitude has been specified, sample it from the configured terrain provider - if (!pointObject.altitude && map.scene.terrainProvider) { - const promise = Cesium.sampleTerrain(map.scene.terrainProvider, 5, [ - cartographicPosition, - ]) - Cesium.when(promise, (updatedCartographic: any) => { - if (updatedCartographic[0].height && !options.view.isDestroyed) { - billboardRef.position = - map.scene.globe.ellipsoid.cartographicToCartesian( - updatedCartographic[0] - ) - } - }) - } - map.scene.requestRender() - return billboardRef - }, - /* - Adds a label utilizing the passed in point and options. - Options are a view to an id and text. - */ - addLabel(point: any, options: any) { - const pointObject = convertPointCoordinate(point) - const cartographicPosition = Cesium.Cartographic.fromDegrees( - pointObject.longitude, - pointObject.latitude, - pointObject.altitude - ) - const cartesianPosition = - map.scene.globe.ellipsoid.cartographicToCartesian(cartographicPosition) - // X, Y offset values for the label - const offset = new Cesium.Cartesian2(20, -15) - // Cesium measurement for determining how to render the size of the label based on zoom - const scaleZoom = new Cesium.NearFarScalar(1.5e4, 1.0, 8.0e6, 0.0) - // Cesium measurement for determining how to render the translucency of the label based on zoom - const translucencyZoom = new Cesium.NearFarScalar(1.5e6, 1.0, 8.0e6, 0.0) - const labelRef = labelCollection.add({ - text: options.text, - position: cartesianPosition, - id: options.id, - pixelOffset: offset, - scale: 1.0, - scaleByDistance: scaleZoom, - translucencyByDistance: translucencyZoom, - fillColor: Cesium.Color.BLACK, - outlineColor: Cesium.Color.WHITE, - outlineWidth: 10, - style: Cesium.LabelStyle.FILL_AND_OUTLINE, - }) - mapModel.addLabel(labelRef) - return labelRef - }, - /* - Adds a polyline utilizing the passed in line and options. - Options are a view to relate to, and an id, and a color. - */ - addLine(line: any, options: any) { - const lineObject = line.map((coordinate: any) => - convertPointCoordinate(coordinate) - ) - const cartPoints = _.map(lineObject, (point) => - Cesium.Cartographic.fromDegrees( - point.longitude, - point.latitude, - point.altitude - ) - ) - const cartesian = - map.scene.globe.ellipsoid.cartographicArrayToCartesianArray(cartPoints) - const polylineCollection = new Cesium.PolylineCollection() - polylineCollection.unselectedMaterial = Cesium.Material.fromType( - 'PolylineOutline', - { - color: determineCesiumColor(options.color), - outlineColor: Cesium.Color.WHITE, - outlineWidth: 4, - } - ) - polylineCollection.selectedMaterial = Cesium.Material.fromType( - 'PolylineOutline', - { - color: determineCesiumColor(options.color), - outlineColor: Cesium.Color.BLACK, - outlineWidth: 4, - } - ) - const polyline = polylineCollection.add({ - width: 8, - material: options.isSelected - ? polylineCollection.selectedMaterial - : polylineCollection.unselectedMaterial, - id: options.id, - positions: cartesian, - }) - if (map.scene.terrainProvider) { - const promise = Cesium.sampleTerrain( - map.scene.terrainProvider, - 5, - cartPoints - ) - Cesium.when(promise, (updatedCartographic: any) => { - const positions = - map.scene.globe.ellipsoid.cartographicArrayToCartesianArray( - updatedCartographic - ) - if (updatedCartographic[0].height && !options.view.isDestroyed) { - polyline.positions = positions - } - }) - } - map.scene.primitives.add(polylineCollection) - return polylineCollection - }, - /* - Adds a polygon fill utilizing the passed in polygon and options. - Options are a view to relate to, and an id. - */ - addPolygon(polygon: any, options: any) { - const polygonObject = polygon.map((coordinate: any) => - convertPointCoordinate(coordinate) - ) - const cartPoints = _.map(polygonObject, (point) => - Cesium.Cartographic.fromDegrees( - point.longitude, - point.latitude, - point.altitude - ) - ) - let cartesian = - map.scene.globe.ellipsoid.cartographicArrayToCartesianArray(cartPoints) - const unselectedPolygonRef = map.entities.add({ - polygon: { - hierarchy: cartesian, - material: new Cesium.GridMaterialProperty({ - color: Cesium.Color.WHITE, - cellAlpha: 0.0, - lineCount: new Cesium.Cartesian2(2, 2), - lineThickness: new Cesium.Cartesian2(2.0, 2.0), - lineOffset: new Cesium.Cartesian2(0.0, 0.0), - }), - perPositionHeight: true, - }, - show: true, - resultId: options.id, - showWhenSelected: false, - }) - const selectedPolygonRef = map.entities.add({ - polygon: { - hierarchy: cartesian, - material: new Cesium.GridMaterialProperty({ - color: Cesium.Color.BLACK, - cellAlpha: 0.0, - lineCount: new Cesium.Cartesian2(2, 2), - lineThickness: new Cesium.Cartesian2(2.0, 2.0), - lineOffset: new Cesium.Cartesian2(0.0, 0.0), - }), - perPositionHeight: true, - }, - show: false, - resultId: options.id, - showWhenSelected: true, - }) - if (map.scene.terrainProvider) { - const promise = Cesium.sampleTerrain( - map.scene.terrainProvider, - 5, - cartPoints - ) - Cesium.when(promise, (updatedCartographic: any) => { - cartesian = - map.scene.globe.ellipsoid.cartographicArrayToCartesianArray( - updatedCartographic - ) - if (updatedCartographic[0].height && !options.view.isDestroyed) { - unselectedPolygonRef.polygon.hierarchy.setValue(cartesian) - selectedPolygonRef.polygon.hierarchy.setValue(cartesian) - } - }) - } - return [unselectedPolygonRef, selectedPolygonRef] - }, - /* - Updates a passed in geometry to reflect whether or not it is selected. - Options passed in are color and isSelected. - */ - updateCluster(geometry: any, options: any) { - if (geometry.constructor === Array) { - geometry.forEach((innerGeometry) => { - this.updateCluster(innerGeometry, options) - }) - } - if (geometry.constructor === Cesium.Billboard) { - switch (options.isSelected) { - case 'selected': - geometry.image = geometry.selectedImage - break - case 'partially': - geometry.image = geometry.partiallySelectedImage - break - case 'unselected': - geometry.image = geometry.unselectedImage - break - } - const isSelected = options.isSelected !== 'unselected' - geometry.eyeOffset = new Cesium.Cartesian3(0, 0, isSelected ? -1 : 0) - } else if (geometry.constructor === Cesium.PolylineCollection) { - geometry._polylines.forEach((polyline: any) => { - polyline.material = Cesium.Material.fromType('PolylineOutline', { - color: determineCesiumColor('rgba(0,0,0, .1)'), - outlineColor: determineCesiumColor('rgba(255,255,255, .1)'), - outlineWidth: 4, - }) - }) - } else if (geometry.showWhenSelected) { - geometry.show = options.isSelected - } else { - geometry.show = !options.isSelected - } - map.scene.requestRender() - }, - /* - Updates a passed in geometry to reflect whether or not it is selected. - Options passed in are color and isSelected. - */ - updateGeometry(geometry: any, options: any) { - if (geometry.constructor === Array) { - geometry.forEach((innerGeometry) => { - this.updateGeometry(innerGeometry, options) - }) - } - if (geometry.constructor === Cesium.Billboard) { - geometry.image = options.isSelected - ? geometry.selectedImage - : geometry.unselectedImage - geometry.eyeOffset = new Cesium.Cartesian3( - 0, - 0, - options.isSelected ? -1 : 0 - ) - } else if (geometry.constructor === Cesium.Label) { - geometry.isSelected = options.isSelected - showHideLabel({ - geometry, - }) - } else if (geometry.constructor === Cesium.PolylineCollection) { - geometry._polylines.forEach((polyline: any) => { - polyline.material = options.isSelected - ? geometry.selectedMaterial - : geometry.unselectedMaterial - }) - } else if (geometry.showWhenSelected) { - geometry.show = options.isSelected - } else { - geometry.show = !options.isSelected - } - map.scene.requestRender() - }, - /* - Updates a passed in geometry to be hidden - */ - hideGeometry(geometry: any) { - if ( - geometry.constructor === Cesium.Billboard || - geometry.constructor === Cesium.Label - ) { - geometry.show = false - } else if (geometry.constructor === Cesium.PolylineCollection) { - geometry._polylines.forEach((polyline: any) => { - polyline.show = false - }) - } - }, - /* - Updates a passed in geometry to be shown - */ - showGeometry(geometry: any) { - if (geometry.constructor === Cesium.Billboard) { - geometry.show = true - } else if (geometry.constructor === Cesium.Label) { - showHideLabel({ - geometry, - findSelected: true, - }) - } else if (geometry.constructor === Cesium.PolylineCollection) { - geometry._polylines.forEach((polyline: any) => { - polyline.show = true - }) - } - map.scene.requestRender() - }, - removeGeometry(geometry: any) { - billboardCollection.remove(geometry) - labelCollection.remove(geometry) - map.scene.primitives.remove(geometry) - //unminified cesium chokes if you feed a geometry with id as an Array - if (geometry.constructor === Cesium.Entity) { - map.entities.remove(geometry) - } - if (geometry.constructor === Cesium.Label) { - mapModel.removeLabel(geometry) - showHiddenLabel(geometry) - } - map.scene.requestRender() - }, - destroyShapes() { - // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'shape' implicitly has an 'any' type. - shapes.forEach((shape) => { - shape.destroy() - }) - shapes = [] - if (map && map.scene) { - map.scene.requestRender() - } - }, - getMap() { - return map - }, - zoomIn() { - const cameraPositionCartographic = - map.scene.globe.ellipsoid.cartesianToCartographic( - map.scene.camera.position - ) - - const terrainHeight = map.scene.globe.getHeight( - cameraPositionCartographic - ) - - const heightAboveGround = - cameraPositionCartographic.height - terrainHeight - - const zoomAmount = heightAboveGround / 2 // basically double the current zoom - - const maxZoomAmount = heightAboveGround - minimumHeightAboveTerrain - - // if the zoom amount is greater than the max zoom amount, zoom to the max zoom amount - map.scene.camera.zoomIn(Math.min(maxZoomAmount, zoomAmount)) - }, - zoomOut() { - const cameraPositionCartographic = - map.scene.globe.ellipsoid.cartesianToCartographic( - map.scene.camera.position - ) - - const terrainHeight = map.scene.globe.getHeight( - cameraPositionCartographic - ) - - const heightAboveGround = - cameraPositionCartographic.height - terrainHeight - map.scene.camera.zoomOut(heightAboveGround) - }, - destroy() { - ;(wreqr as any).vent.off('map:requestRender', requestRenderHandler) - map.destroy() - }, - } - return exposedMethods -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/polygon-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/polygon-display.tsx deleted file mode 100644 index 0b390281f42..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/polygon-display.tsx +++ /dev/null @@ -1,429 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import DistanceUtils from '../../../../js/DistanceUtils' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import { validateGeo } from '../../../../react-component/utils/validation' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { useRender } from '../../../hooks/useRender' -import { removeOldDrawing, removeOrLockOldDrawing } from './drawing-and-display' -import ShapeUtils from '../../../../js/ShapeUtils' -import { - constructSolidLinePrimitive, - constructOutlinedLinePrimitive, - constructDottedLinePrimitive, -} from './line-display' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import * as Turf from '@turf/turf' -import { Position } from '@turf/turf' -import _ from 'underscore' -import DrawHelper from '../../../../lib/cesium-drawhelper/DrawHelper' -import utility from './utility' -import { Translation } from '../interactions.provider' -const toDeg = Cesium.Math.toDegrees - -const polygonFillColor = 'rgba(153,102,0,0.2)' - -const CAMERA_MAGNITUDE_THRESHOLD = 8000000 - -const getCurrentMagnitudeFromMap = ({ map }: { map: any }) => { - return map.getMap().camera.getMagnitude() -} - -const needsRedraw = ({ - map, - drawnMagnitude, -}: { - map: any - drawnMagnitude: any -}) => { - const currentMagnitude = getCurrentMagnitudeFromMap({ map }) - - if ( - currentMagnitude < CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude > CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - if ( - currentMagnitude > CAMERA_MAGNITUDE_THRESHOLD && - drawnMagnitude < CAMERA_MAGNITUDE_THRESHOLD - ) { - return true - } - - return false -} - -type Polygon = { - polygon: [number, number][] -} - -const positionsToPolygon = ( - positions: Cesium.Cartesian3[], - ellipsoid: Cesium.Ellipsoid -): Polygon => { - return { - polygon: positions.map((cartPos) => { - const latLon = ellipsoid.cartesianToCartographic(cartPos) - const lon = toDeg(latLon.longitude) - const lat = toDeg(latLon.latitude) - return [ - DistanceUtils.coordinateRound(lon), - DistanceUtils.coordinateRound(lat), - ] - }), - } -} - -const validateAndFixPolygon = (polygonPoints: Position[]): boolean => { - if (!polygonPoints || polygonPoints.length < 3) { - return false - } - if ( - polygonPoints[0].toString() !== - polygonPoints[polygonPoints.length - 1].toString() - ) { - polygonPoints.push(polygonPoints[0]) - } - if (validateGeo('polygon', JSON.stringify(polygonPoints))?.error) { - return false - } - polygonPoints.forEach((point: any) => { - point[0] = DistanceUtils.coordinateRound(point[0]) - point[1] = DistanceUtils.coordinateRound(point[1]) - }) - return true -} - -const drawGeometry = ({ - model, - map, - id, - setDrawnMagnitude, - onDraw, - translation, - isInteractive, -}: { - model: any - map: any - id: any - setDrawnMagnitude: (number: any) => void - onDraw?: (drawingLocation: Polygon) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const json = model.toJSON() - if (!Array.isArray(json.polygon)) { - map.getMap().scene.requestRender() - return - } - const isMultiPolygon = ShapeUtils.isArray3D(json.polygon) - // Create a deep copy since we may modify some of these positions for display purposes - const polygons: Position[][] = JSON.parse( - JSON.stringify(isMultiPolygon ? json.polygon : [json.polygon]) - ) - - const cameraMagnitude = map.getMap().camera.getMagnitude() - setDrawnMagnitude(cameraMagnitude) - - removeOrLockOldDrawing(Boolean(isInteractive), id, map, model) - - const buffer = DistanceUtils.getDistanceInMeters( - json.polygonBufferWidth, - model.get('polygonBufferUnits') - ) - - if (onDraw) { - polygons.forEach((polygonPoints) => { - if (!validateAndFixPolygon(polygonPoints)) { - return - } - - const drawPrimitive = new (DrawHelper.PolygonPrimitive as any)( - constructSolidLinePrimitive({ - coordinates: polygonPoints, - model, - id, - color: polygonFillColor, - buffer, - }) - ) - drawPrimitive.setEditable() - drawPrimitive.addListener('onEdited', function (event: any) { - const polygon = positionsToPolygon( - event.positions, - map.getMap().scene.globe.ellipsoid - ) - onDraw(polygon) - }) - map.getMap().scene.primitives.add(drawPrimitive) - }) - } else { - const pc = new Cesium.PolylineCollection() - pc.id = id - pc.locationId = json.locationId - polygons.forEach((polygonPoints) => { - if (!validateAndFixPolygon(polygonPoints)) { - return - } - - if (translation) { - for (const point of polygonPoints) { - point[0] += translation.longitude - point[1] += translation.latitude - } - } - - if (buffer > 0) { - const adjustedPolygon = Turf.polygon([polygonPoints]) - utility.adjustGeoCoords(adjustedPolygon) - - const bufferedPolygonPoints = Turf.buffer( - adjustedPolygon, - Math.max(buffer, 1), - { - units: 'meters', - } - ) - - if (!bufferedPolygonPoints) { - return - } - - // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments - utility.adjustGeoCoords(bufferedPolygonPoints) - - const bufferedPolygons = bufferedPolygonPoints.geometry.coordinates.map( - (set) => Turf.polygon([set]) - ) - - const bufferedPolygon = bufferedPolygons.reduce( - (a, b) => Turf.union(a, b), - bufferedPolygons[0] - ) - - bufferedPolygon?.geometry.coordinates.forEach((coords: any) => - pc.add( - constructOutlinedLinePrimitive({ - coordinates: coords, - model, - id, - isInteractive, - }) - ) - ) - pc.add( - constructDottedLinePrimitive({ - coordinates: polygonPoints, - model, - isInteractive, - }) - ) - } else { - pc.add( - constructOutlinedLinePrimitive({ - coordinates: polygonPoints, - model, - id, - isInteractive, - }) - ) - } - }) - - map.getMap().scene.primitives.add(pc) - } - - map.getMap().scene.requestRender() -} - -const useCameraMagnitude = ({ - map, -}: { - map: any -}): [number, React.Dispatch>] => { - const [cameraMagnitude, setCameraMagnitude] = React.useState(0) - const [isMoving, setIsMoving] = React.useState(false) - const render = useRender() - React.useEffect(() => { - const startListener = () => setIsMoving(true) - const endListener = () => setIsMoving(false) - map?.getMap().scene.camera.moveStart.addEventListener(startListener) - map?.getMap().scene.camera.moveEnd.addEventListener(endListener) - return () => { - map?.getMap().scene.camera.moveStart.removeEventListener(startListener) - map?.getMap().scene.camera.moveEnd.removeEventListener(endListener) - } - }, [map]) - React.useEffect(() => { - if (isMoving) { - const animationId = window.requestAnimationFrame(() => { - setCameraMagnitude(getCurrentMagnitudeFromMap({ map })) - }) - return () => { - window.cancelAnimationFrame(animationId) - } - } - return () => {} - }, [isMoving, render]) - return [cameraMagnitude, setCameraMagnitude] -} - -const useListenToLineModel = ({ - model, - map, - onDraw, - newPoly, - translation, - isInteractive, -}: { - model: any - map: any - onDraw?: (drawingLocation: Polygon) => void - newPoly: Polygon | null - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - const [cameraMagnitude] = useCameraMagnitude({ map }) - const [drawnMagnitude, setDrawnMagnitude] = React.useState(0) - const callback = React.useMemo(() => { - return () => { - if (map) { - if (newPoly) { - // Clone the model to display the new polygon drawn because we don't - // want to update the existing model unless the user clicks Apply. - const newModel = model.clone() - newModel.set(newPoly) - drawGeometry({ - map, - model: newModel, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - }) - } else if (model) { - drawGeometry({ - map, - model, - id: getIdFromModelForDisplay({ model }), - setDrawnMagnitude, - onDraw, - translation, - isInteractive, - }) - } - } - } - }, [model, map, newPoly, translation, isInteractive]) - useListenTo( - model, - 'change:polygon change:polygonBufferWidth change:polygonBufferUnits', - callback - ) - React.useEffect(() => { - if (map && needsRedraw({ map, drawnMagnitude })) { - callback() - } - }, [cameraMagnitude, drawnMagnitude, callback, map]) - React.useEffect(() => { - callback() - }, [callback]) -} - -const useStartMapDrawing = ({ - map, - model, - setNewPoly, - onDraw, -}: { - map: any - model: any - setNewPoly: (newPoly: Polygon) => void - onDraw: (newPoly: Polygon) => void -}) => { - React.useEffect(() => { - if (map && model) { - const material = Cesium.Material.fromType('Color', { - color: Cesium.Color.fromCssColorString(polygonFillColor), - }) - map.getMap().drawHelper[`startDrawingPolygon`]({ - callback: (positions: Cesium.Cartesian3[]) => { - const drawnPolygon = positionsToPolygon( - positions, - map.getMap().scene.globe.ellipsoid - ) - const polygon = drawnPolygon.polygon - //this shouldn't ever get hit because the draw library should protect against it, but just in case it does, remove the point - if ( - polygon.length > 3 && - polygon[polygon.length - 1][0] === polygon[polygon.length - 2][0] && - polygon[polygon.length - 1][1] === polygon[polygon.length - 2][1] - ) { - polygon.pop() - } - setNewPoly(drawnPolygon) - onDraw(drawnPolygon) - }, - appearance: new Cesium.MaterialAppearance({ - material, - }), - material, - }) - } - }, [map, model]) -} - -export const CesiumPolygonDisplay = ({ - map, - model, - onDraw, - translation, - isInteractive, -}: { - map: any - model: any - onDraw?: (newPoly: Polygon) => void - translation?: Translation - isInteractive?: boolean // note: 'interactive' is different from drawing -}) => { - // Use state to store the polygon drawn by the user before they click Apply or Cancel. - // When the user clicks Draw, they are allowed to edit the existing polygon (if it - // exists), or draw a new polygon. If they draw a new polygon, save it to state then show - // it instead of the draw model because we don't want to update the draw model - // unless the user clicks Apply. - const [newPoly, setNewPoly] = React.useState(null) - if (onDraw) { - useStartMapDrawing({ map, model, setNewPoly, onDraw }) - } - useListenToLineModel({ - map, - model, - newPoly, - onDraw, - translation, - isInteractive, - }) - React.useEffect(() => { - return () => { - if (model && map) { - removeOldDrawing({ map, id: getIdFromModelForDisplay({ model }) }) - map.getMap().drawHelper.stopDrawing() - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/utility.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/utility.ts deleted file mode 100644 index abc02c5e096..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/cesium/utility.ts +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import _ from 'underscore' -import DistanceUtils from '../../../../js/DistanceUtils' -import ShapeUtils from '../../../../js/ShapeUtils' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import * as Turf from '@turf/turf' -import { Feature, Geometry } from '@turf/turf' - -const METERS = 'meters' - -interface FeatureWithCoords extends GeoJSON.Feature { - geometry: Exclude -} - -/* - A variety of helpful functions for dealing with Cesium -*/ -export default { - /* - Calculates the center of given a geometry (WKT) - */ - calculateCartesian3CenterOfGeometry(propertyModel: any) { - return Cesium.BoundingSphere.fromPoints( - Cesium.Cartesian3.fromDegreesArray(_.flatten(propertyModel.getPoints())) - ).center - }, - /* - Calculates the center of given a geometry (WKT) - */ - calculateCartographicCenterOfGeometryInRadians(propertyModel: any) { - return Cesium.Cartographic.fromCartesian( - this.calculateCartesian3CenterOfGeometry(propertyModel) - ) - }, - /* - Calculates the center of given a geometry (WKT) - */ - calculateCartographicCenterOfGeometryInDegrees(propertyModel: any) { - const cartographicCenterInRadians = - this.calculateCartographicCenterOfGeometryInRadians(propertyModel) - return [ - Cesium.Math.toDegrees(cartographicCenterInRadians.longitude), - Cesium.Math.toDegrees(cartographicCenterInRadians.latitude), - ] - }, - calculateWindowCenterOfGeometry(geometry: any, map: any) { - let cartesian3position = geometry - if (cartesian3position.constructor !== Cesium.Cartesian3) { - cartesian3position = - this.calculateCartesian3CenterOfGeometry(cartesian3position) - } - return Cesium.SceneTransforms.wgs84ToWindowCoordinates( - map.scene, - cartesian3position - ) - }, - /* - Calculates the center of given geometries (WKT) - */ - calculateCartesian3CenterOfGeometries(propertyModels: any) { - const allPoints = propertyModels.map((propertyModel: any) => - propertyModel.getPoints() - ) - return Cesium.BoundingSphere.fromPoints( - Cesium.Cartesian3.fromDegreesArray(_.flatten(allPoints)) - ).center - }, - /* - Calculates the center of given geometries (WKT) - */ - calculateCartographicCenterOfGeometriesInRadians(propertyModels: any) { - return Cesium.Cartographic.fromCartesian( - this.calculateCartesian3CenterOfGeometries(propertyModels) - ) - }, - /* - Calculates the center of given geometries (WKT) - */ - calculateCartographicCenterOfGeometriesInDegrees(propertyModels: any) { - const cartographicCenterInRadians = - this.calculateCartographicCenterOfGeometriesInRadians(propertyModels) - return [ - Cesium.Math.toDegrees(cartographicCenterInRadians.longitude), - Cesium.Math.toDegrees(cartographicCenterInRadians.latitude), - ] - }, - featureFromShape(shape: any) { - const attrs = shape.model.attributes - - switch (attrs.type) { - case 'LINE': - const line = Turf.lineString(attrs.line) - const lineMeters = DistanceUtils.getDistanceInMeters( - attrs.lineWidth, - attrs.lineUnits - ) - return lineMeters - ? Turf.buffer(line, lineMeters, { units: METERS }) - : line - case 'POLYGON': - const polygon = Turf.polygon([attrs.polygon]) - const polygonMeters = DistanceUtils.getDistanceInMeters( - attrs.polygonBufferWidth, - attrs.polygonBufferUnits - ) - return polygonMeters - ? Turf.buffer(polygon, polygonMeters, { units: METERS }) - : polygon - case 'MULTIPOLYGON': - const isMultiPolygon = ShapeUtils.isArray3D(attrs.polygon) - const multiPolygon = isMultiPolygon - ? Turf.polygon(attrs.polygon) - : Turf.polygon([attrs.polygon]) - const multiPolygonMeters = DistanceUtils.getDistanceInMeters( - attrs.polygonBufferWidth, - attrs.polygonBufferUnits - ) - return multiPolygonMeters - ? Turf.buffer(multiPolygon, multiPolygonMeters, { units: METERS }) - : multiPolygon - case 'BBOX': - return Turf.bboxPolygon([ - attrs.west, - attrs.south, - attrs.east, - attrs.north, - ]) - case 'POINTRADIUS': - const point = Turf.point([attrs.lon, attrs.lat]) - const pointRadiusMeters = DistanceUtils.getDistanceInMeters( - attrs.radius, - attrs.radiusUnits - ) - return pointRadiusMeters - ? Turf.buffer(point, pointRadiusMeters, { units: METERS }) - : point - default: - return null - } - }, - featureIsValid(feature: FeatureWithCoords) { - return feature?.geometry?.coordinates?.length - }, - adjustGeoCoords(geo: Feature) { - const geometry = geo.geometry - const bbox = geo.bbox || Turf.bbox(geometry) - const width = Math.abs(bbox[0] - bbox[2]) - const crossesAntimeridian = width > 180 - if ( - crossesAntimeridian && - ['LineString', 'MultiLineString', 'Polygon', 'MultiPolygon'].includes( - geometry.type - ) - ) { - Turf.coordEach(geo, (coord) => { - if (coord[0] < 0) { - coord[0] += 360 - } - }) - } - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/draw-menu.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/draw-menu.tsx deleted file mode 100644 index 1f1e05f178d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/draw-menu.tsx +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import styled from 'styled-components' - -export const Editor = styled.div` - position: absolute; - top: 0px; - left: 0px; - right: 0px; - height: 38px; - z-index: 1; - > div:first-of-type { - flex-wrap: wrap; - > div:nth-of-type(2) { - flex-wrap: wrap; - width: 100%; - background: inherit; - } - } -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/drawing-and-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/drawing-and-display.tsx deleted file mode 100644 index 5f64e1c925f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/drawing-and-display.tsx +++ /dev/null @@ -1,334 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import wreqr from '../../../js/wreqr' -import { - useBackbone, - useListenTo, -} from '../../selection-checkbox/useBackbone.hook' -import { useIsDrawing } from '../../singletons/drawing' -import { TypedUserInstance } from '../../singletons/TypedUser' -import { zoomToHome } from './home' -import LocationModel from '../../location-old/location-old' -import { Shape } from 'geospatialdraw/target/webapp/shape-utils' -import { useLazyResultsFilterTreeFromSelectionInterface } from '../../selection-interface/hooks' -import { EventHandler } from 'backbone' -export const SHAPE_ID_PREFIX = 'shape' -export const getIdFromModelForDisplay = ({ model }: { model: any }) => { - return `${SHAPE_ID_PREFIX}-${model.cid}-display` -} -export const getIdFromModelForDrawing = ({ model }: { model: any }) => { - return `${SHAPE_ID_PREFIX}-${model.cid}-drawing` -} -export type DrawModeType = 'line' | 'poly' | 'circle' | 'bbox' | 'keyword' -// from these all other drawings are constructed -const BasicDrawModeTypes: Array = [ - 'bbox', - 'circle', - 'line', - 'poly', -] -type LocationTypeType = - | 'LINE' - | 'POLYGON' - | 'MULTIPOLYGON' - | 'BBOX' - | 'POINTRADIUS' - | 'POINT' -export const getLocationTypeFromModel = ({ model }: { model: any }) => { - const type = model.get('type') as LocationTypeType - return type -} -export const getDrawModeFromModel = ({ - model, -}: { - model: any -}): DrawModeType => { - const mode = model.get('mode') - if (BasicDrawModeTypes.includes(mode)) { - return mode - } - const fallbackType = getLocationTypeFromModel({ model }) - switch (fallbackType) { - case 'BBOX': - return 'bbox' - case 'LINE': - return 'line' - case 'MULTIPOLYGON': - return 'poly' - case 'POINTRADIUS': - return 'circle' - case 'POINT': - return 'circle' - case 'POLYGON': - return 'poly' - default: - return 'poly' - } -} -export const getShapeFromDrawMode = (drawMode: DrawModeType): Shape => { - switch (drawMode) { - case 'bbox': - return 'Bounding Box' - case 'circle': - return 'Point Radius' - case 'line': - return 'Line' - case 'poly': - default: - return 'Polygon' - } -} -export const getDrawModeFromShape = (shape: Shape): DrawModeType => { - switch (shape) { - case 'Bounding Box': - return 'bbox' - case 'Point': - case 'Point Radius': - return 'circle' - case 'Line': - return 'line' - case 'Polygon': - default: - return 'poly' - } -} -const extractModelsFromFilter = ({ - filter, - extractedModels, - listenTo, - onChange, -}: { - filter: any - extractedModels: any[] - listenTo?: (object: any, events: string, callback: EventHandler) => void - onChange?: () => void -}) => { - if (filter.filters) { - filter.filters.forEach((subfilter: any) => { - extractModelsFromFilter({ - filter: subfilter, - extractedModels, - listenTo, - onChange, - }) - }) - } else { - if (filter.type === 'GEOMETRY') { - if (filter.value?.areaDetails?.locations) { - filter.value.areaDetails.locations.map((location: any) => { - const newLocationModel = new LocationModel(location) - newLocationModel.set('locationId', undefined) - extractedModels.push(newLocationModel) - }) - } else { - const newLocationModel = new LocationModel(filter.value) - if (newLocationModel.get('hasKeyword')) { - newLocationModel.set('locationId', undefined) - } else { - listenTo?.( - newLocationModel, - 'change:mapNorth change:mapSouth change:mapEast change:mapWest change:lat change:lon change:line change:polygon', - (model) => { - filter.value = model.toJSON() - onChange?.() - } - ) - } - - extractedModels.push(newLocationModel) - } - } - } -} -function useOnceIsNearFirstRender({ - howNear = 1000, - callback, -}: { - howNear?: number - callback: () => void -}) { - const [firstRender, setFirstRender] = React.useState(true) - const [hasFired, setHasFired] = React.useState(false) - React.useEffect(() => { - setFirstRender(false) - }, []) - React.useEffect(() => { - if (!firstRender && !hasFired) { - const timeoutId = window.setTimeout(() => { - callback() - setHasFired(true) - }, howNear) - return () => { - window.clearTimeout(timeoutId) - } - } - return () => {} - }, [firstRender, howNear, hasFired, callback]) -} -export const useDrawingAndDisplayModels = ({ - selectionInterface, - map, -}: { - selectionInterface: any - map: any -}) => { - // All of these arrays hold different sets of the same models, but where they come from differs - // models are from geometry inputs that are in the dom aka textfields etc. (aka, someone is editing a geo input) - const [models, setModels] = React.useState>([]) - // filter models are grabbed from the filter tree on a search - const [filterModels, setFilterModels] = React.useState>([]) - // drawing models are when the user is actively drawing / editing a shape on the maps themselves (aka the draw tools) - const [drawingModels, setDrawingModels] = React.useState>([]) - const isDrawing = useIsDrawing() - const filterTree = useLazyResultsFilterTreeFromSelectionInterface({ - selectionInterface, - }) - const { listenTo, stopListening } = useBackbone() - useListenTo( - (wreqr as any).vent, - 'search:linedisplay search:polydisplay search:bboxdisplay search:circledisplay search:keyworddisplay search:areadisplay', - (model: any) => { - setModels((currentModels) => { - let newModels = currentModels - if (Array.isArray(model)) { - newModels = currentModels.concat( - model.filter((newModel) => !currentModels.includes(newModel)) - ) - } else if (!currentModels.includes(model)) { - newModels = [...currentModels, model] - } - return newModels - }) - } - ) - useListenTo((wreqr as any).vent, 'search:removedisplay', (model: any) => { - setModels((currentModels) => { - let newModels - if (Array.isArray(model)) { - newModels = currentModels.filter((m) => !model.includes(m)) - } else { - newModels = currentModels.filter((m) => m !== model) - } - return newModels - }) - }) - React.useEffect(() => { - ;(wreqr as any).vent.trigger('search:requestlocationmodels') - }, []) - const updateFilterModels = React.useCallback(() => { - for (const model of filterModels) { - stopListening(model) - } - const resultFilter = TypedUserInstance.getEphemeralFilter() - const extractedModels = [] as any[] - if (filterTree) { - extractModelsFromFilter({ - filter: filterTree, - extractedModels, - }) - } - if (resultFilter) { - // We have to use this alternate method of updating the filter when dealing with - // the resultFilter. When the location input is unmounted, it resets its location - // model and removes it from here via the search:removedisplay event, so we can't - // use it to update the filter. The location input is unmounted when the result - // filter menu is closed, which it usually is. So, we update the filter in the - // prefs model ourselves, which causes this function to be run again with the new - // filter, and we can display it correctly. - extractModelsFromFilter({ - filter: resultFilter, - extractedModels, - listenTo, - onChange: () => { - TypedUserInstance.getPreferences().set( - 'resultFilter', - JSON.parse(JSON.stringify(resultFilter)) - ) - TypedUserInstance.savePreferences() - }, - }) - } - // If we have a model for a particular locationId in both models and filterModels, - // then keep only the one in models, since that is the source of truth. Removing - // the one in filterModels prevents some flickering when releasing the mouse on a - // move operation. - const locationIds = new Set(models.map((m) => m.get('locationId'))) - const dedupedModels = extractedModels.filter( - (m) => !locationIds.has(m.get('locationId')) - ) - setFilterModels(dedupedModels) - }, [filterTree, models]) - React.useEffect(() => { - updateFilterModels() - }, [updateFilterModels]) - useListenTo(selectionInterface, 'change:currentQuery', updateFilterModels) - useListenTo( - TypedUserInstance.getPreferences(), - 'change:resultFilter', - updateFilterModels - ) - useListenTo( - (wreqr as any).vent, - 'search:drawline search:drawpoly search:drawbbox search:drawcircle', - (model: any) => { - if (!drawingModels.includes(model)) { - setDrawingModels([...drawingModels, model]) - } - } - ) - useListenTo( - (wreqr as any).vent, - 'search:line-end search:poly-end search:bbox-end search:circle-end search:drawcancel search:drawend', - (model: any) => { - if (!Array.isArray(model)) { - model = [model] - } - model.forEach((submodel: any) => { - if (drawingModels.includes(submodel)) { - setDrawingModels( - drawingModels.filter((drawingModel) => drawingModel !== submodel) - ) - } - }) - } - ) - React.useEffect(() => { - if (map && isDrawing) { - ;(wreqr as any).vent.trigger('search:requestdrawingmodels') - } - }, [map]) - React.useEffect(() => { - if (!isDrawing) { - setDrawingModels([]) - } - }, [isDrawing]) - const callback = React.useMemo(() => { - return () => { - if (map) { - const shapesExist = map.panToShapesExtent() - if (!shapesExist) { - zoomToHome({ map }) - } - } - } - }, [filterModels, models, map]) - useOnceIsNearFirstRender({ callback }) - return { - models, - drawingModels, - filterModels, - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/home.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/home.tsx deleted file mode 100644 index af90363f09d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/home.tsx +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { StartupDataStore } from '../../../js/model/Startup/startup' -import wrapNum from '../../../react-component/utils/wrap-num/wrap-num' -import { TypedUserInstance } from '../../singletons/TypedUser' -const homeBoundingBox = getBoundingBox(getHomeCoordinates()) -const defaultHomeBoundingBox = { - west: -128, - south: 24, - east: -63, - north: 52, -} -export const getHome = () => { - return [ - TypedUserInstance.getMapHome(), - homeBoundingBox, - defaultHomeBoundingBox, - ].find((element) => element !== undefined) -} -export const zoomToHome = ({ map }: { map: any }) => { - const home = getHome() - map.zoomToBoundingBox(home) -} -function findExtreme({ objArray, property, comparator }: any) { - if (objArray.length === 0) { - return undefined - } - return objArray.reduce( - (extreme: any, coordinateObj: any) => - (extreme = comparator(extreme, coordinateObj[property])), - objArray[0][property] - ) -} -function getBoundingBox(coordinates: any) { - const north = findExtreme({ - objArray: coordinates, - property: 'lat', - comparator: Math.max, - }) - const south = findExtreme({ - objArray: coordinates, - property: 'lat', - comparator: Math.min, - }) - const east = findExtreme({ - objArray: coordinates, - property: 'lon', - comparator: Math.max, - }) - const west = findExtreme({ - objArray: coordinates, - property: 'lon', - comparator: Math.min, - }) - if ( - north === undefined || - south === undefined || - east === undefined || - west === undefined - ) { - return undefined - } - return { - north, - east, - south, - west, - } -} -function getHomeCoordinates() { - if ( - StartupDataStore.Configuration.getMapHome() !== '' && - StartupDataStore.Configuration.getMapHome() !== undefined - ) { - const separateCoordinates = StartupDataStore.Configuration.getMapHome() - .replace(/\s/g, '') - .split(',') - if (separateCoordinates.length % 2 === 0) { - return separateCoordinates - .reduce((coordinates: any, coordinate: any, index: any) => { - if (index % 2 === 0) { - coordinates.push({ - lon: coordinate, - lat: separateCoordinates[index + 1], - }) - } - return coordinates - }, []) - .map((coordinateObj: any) => { - let lon = parseFloat(coordinateObj.lon) - let lat = parseFloat(coordinateObj.lat) - if (isNaN(lon) || isNaN(lat)) { - return undefined - } - lon = wrapNum(lon, -180, 180) - lat = wrapNum(lat, -90, 90) - return { - lon, - lat, - } - }) - .filter((coordinateObj: any) => { - return coordinateObj !== undefined - }) - } - } else { - return [] - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/interactions.provider.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/interactions.provider.tsx deleted file mode 100644 index f867136d8bb..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/interactions.provider.tsx +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -import React, { useState } from 'react' -import Backbone from 'backbone' - -export type Translation = { - longitude: number - latitude: number -} - -export type InteractionsContextType = { - interactiveGeo: number | null - setInteractiveGeo: (interactiveGeo: number | null) => void - interactiveModels: Backbone.Model[] - setInteractiveModels: (models: Backbone.Model[]) => void - moveFrom: any - setMoveFrom: (moveFrom: any) => void - translation: Translation | null - setTranslation: (translation: Translation | null) => void -} - -export const InteractionsContext = React.createContext( - { - interactiveGeo: null, - setInteractiveGeo: () => {}, - interactiveModels: [], - setInteractiveModels: () => {}, - moveFrom: null, - setMoveFrom: () => {}, - translation: null, - setTranslation: () => {}, - } -) - -/** - * Doing this to save time for now. In the future we should remove the interactions provider and the logic around it, solely using the models themselves and - * this isInteractive being set to do drag / drop. - */ -function useUpdateModelsSoTheyAreInteractive({ - interactiveModels, -}: { - interactiveModels: Backbone.Model[] -}) { - React.useEffect(() => { - interactiveModels.forEach((model) => { - model.set('isInteractive', true) - }) - return () => { - interactiveModels.forEach((model) => { - model.set('isInteractive', false) - }) - } - }, [interactiveModels]) -} - -export function InteractionsProvider({ children }: any) { - const [interactiveGeo, setInteractiveGeo] = useState(null) - const [interactiveModels, setInteractiveModels] = useState( - [] - ) - const [moveFrom, setMoveFrom] = useState(null) - const [translation, setTranslation] = useState(null) - - useUpdateModelsSoTheyAreInteractive({ interactiveModels }) - - return ( - - {children} - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map-toolbar.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map-toolbar.tsx deleted file mode 100644 index ae82c34b4f6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map-toolbar.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import Button from '@mui/material/Button' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import MapSettings from '../../../react-component/map-settings' -import ZoomToHomeButton from '../../../react-component/button/split-button/zoomToHome' -import Gazetteer from '../../../react-component/location/gazetteer' -import { LayersDropdown } from '../../layers/layers-dropdown' -import CheckBoxIcon from '@mui/icons-material/CheckBox' -import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank' -import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft' -import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight' -import Paper from '@mui/material/Paper' -import { Elevations } from '../../theme/theme' - -type Props = { - toggleClustering: () => void - isClustering: boolean - zoomToHome: () => void - saveAsHome: () => void - map: { - doPanZoom: (polygon: any) => void - } - mapLayers: Array -} - -const ClusteringButton = ({ toggleClustering, isClustering }: Props) => { - return ( - - ) -} - -export const MapToolbar = (props: Props) => { - const [expanded, setExpanded] = React.useState(false) - - return ( - -
    -
    - {expanded ? ( - - ) : ( - - )} -
    - {expanded ? ( - <> -
    - props.map.doPanZoom(polygon)} - /> -
    -
    - -
    -
    -
    - -
    -
    -
    - props.zoomToHome()} - saveHome={() => props.saveAsHome()} - /> -
    -
    -
    - -
    - - ) : null} -
    -
    - ) -} - -export default hot(module)(MapToolbar) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map.model.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map.model.ts deleted file mode 100644 index 4bc818cf62e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map.model.ts +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import wrapNum from '../../../react-component/utils/wrap-num/wrap-num' - -import _ from 'lodash' -import Backbone from 'backbone' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message -import mtgeo from 'mt-geo' -import * as usngs from 'usng.js' -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. -const converter = new usngs.Converter() -const usngPrecision = 6 - -export default Backbone.AssociatedModel.extend({ - defaults: { - mouseLat: undefined, - mouseLon: undefined, - coordinateValues: { - dms: '', - lat: '', - lon: '', - mgrs: '', - utmUps: '', - }, - target: undefined, - targetMetacard: undefined, - measurementState: 'NONE', - currentDistance: 0, - points: [], - labels: [], - line: undefined, - distanceInfo: { - left: 0, - top: 0, - }, - startingCoordinates: undefined, - }, - /* - * Sets the measurement state to the given new state. - * Valid measurement states are: - * - NONE - * - START - * - END - */ - changeMeasurementState(state: any) { - // the current distance should be 0 when in the NONE or START state - if (state === 'NONE' || state === 'START') { - this.set({ - measurementState: state, - currentDistance: 0, - }) - } else { - this.set({ measurementState: state }) - } - }, - /* - * Appends the given point to the array of points being tracked. - */ - addPoint(point: any) { - this.set({ - points: [...this.get('points'), point], - }) - }, - addLabel(label: any) { - this.set({ - labels: [...this.get('labels'), label], - }) - }, - removeLabel(label: any) { - _.remove(this.get('labels'), (e) => e === label) - }, - /* - * Sets the line to the given new line. This represents the line on the map - * being used for the ruler measurement. - */ - setLine(line: any) { - this.set({ line }) - }, - /* - * Resets the model's line and returns the old one. - */ - removeLine() { - const line = this.get('line') - this.set({ line: undefined }) - - return line - }, - /* - * Resets the model's array of points. - */ - clearPoints() { - this.set({ points: [] }) - }, - /* - * Set coordinates of the ruler measurements starting point - */ - setStartingCoordinates(coordinates: any) { - this.set({ startingCoordinates: coordinates }) - }, - /* - * Sets the current distance to the new given distance (in meters). - */ - setCurrentDistance(distance: any) { - this.set({ currentDistance: distance }) - }, - addDistanceInfo(distanceInfo: any) { - this.set({ distanceInfo }) - }, - /* - * set the position of DistanceInfo in px relative to the top left of the Cesium component - */ - setDistanceInfoPosition(left: any, top: any) { - this.set({ distanceInfo: { left, top } }) - }, - isOffMap() { - return this.get('mouseLat') === undefined - }, - clearMouseCoordinates() { - this.set({ - mouseLat: undefined, - mouseLon: undefined, - }) - }, - updateMouseCoordinates(coordinates: any) { - this.set({ - mouseLat: Number(coordinates.lat.toFixed(6)), // wrap in Number to chop off trailing zero - mouseLon: Number(wrapNum(coordinates.lon, -180, 180).toFixed(6)), - }) - }, - updateClickCoordinates() { - const lat = this.get('mouseLat') - const lon = this.get('mouseLon') - const dms = `${mtgeo.toLat(lat)} ${mtgeo.toLon(lon)}` - const mgrs = converter.isInUPSSpace(lat) - ? undefined - : converter.LLtoUSNG(lat, lon, usngPrecision) - const utmUps = converter.LLtoUTMUPS(lat, lon) - this.set({ - coordinateValues: { - lat, - lon, - dms, - mgrs, - utmUps, - }, - }) - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map.view.tsx deleted file mode 100644 index d65aa72da4e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/map.view.tsx +++ /dev/null @@ -1,950 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import wreqr from '../../../js/wreqr' -import user from '../../singletons/user-instance' -import MapModel from './map.model' -import MapInfo from '../../../react-component/map-info' -import DistanceInfo from '../../../react-component/distance-info' -import getDistance from 'geolib/es/getDistance' -import { Drawing } from '../../singletons/drawing' -import MapToolbar from './map-toolbar' -import MapContextDropdown from '../../map-context-menu/map-context-menu.view' -import { useListenTo } from '../../selection-checkbox/useBackbone.hook' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import Geometries from './react/geometries' -import LinearProgress from '@mui/material/LinearProgress' -import PopupPreview from '../../../react-component/popup-preview' -import { SHAPE_ID_PREFIX, getDrawModeFromModel } from './drawing-and-display' -import useSnack from '../../hooks/useSnack' -import { zoomToHome } from './home' -import featureDetection from '../../singletons/feature-detection' -import Paper from '@mui/material/Paper' -import { Elevations } from '../../theme/theme' -import Button from '@mui/material/Button' -import PlusIcon from '@mui/icons-material/Add' -import MinusIcon from '@mui/icons-material/Remove' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import { InteractionsContext, Translation } from './interactions.provider' -import Backbone from 'backbone' -import _ from 'lodash' -import ShapeUtils from '../../../js/ShapeUtils' - -type HoverGeo = { - interactive?: boolean - id?: number -} - -const useMapCode = (props: MapViewReactType) => { - const [mapCode, setMapCode] = React.useState(null) - React.useEffect(() => { - props.loadMap().then((Map: any) => { - setMapCode({ createMap: Map }) - }) - }, [props.loadMap]) - return mapCode -} -const useMap = ( - props: MapViewReactType & { - mapElement: HTMLDivElement | null - mapModel: any - containerElement: HTMLDivElement | null - mapDrawingPopupElement: HTMLDivElement | null - mapLayers: any - } -) => { - const [map, setMap] = React.useState(null) - const mapCode = useMapCode(props) - React.useEffect(() => { - if (props.mapElement && mapCode) { - try { - setMap( - mapCode.createMap( - props.mapElement, - props.selectionInterface, - props.mapDrawingPopupElement, - props.containerElement, - props.mapModel, - props.mapLayers - ) - ) - } catch (err) { - featureDetection.addFailure('cesium') - } - } - return () => { - if (props.mapElement && mapCode && map) { - map.destroy() - } - } - }, [props.mapElement, mapCode]) - return map -} -const useMapModel = () => { - const [mapModel] = React.useState(new MapModel()) - return mapModel -} -/* - Handles drawing or clearing the ruler as needed by the measurement state. - - START indicates that a starting point should be drawn, - so the map clears any previous points drawn and draws a new start point. - - END indicates that an ending point should be drawn, - so the map draws an end point and a line, and calculates the distance. - - NONE indicates that the ruler should be cleared. - */ -const handleMeasurementStateChange = ({ - map, - mapModel, -}: { - map: any - mapModel: any -}) => { - const state = mapModel.get('measurementState') - let point = null - switch (state) { - case 'START': - clearRuler({ map, mapModel }) - point = map.addRulerPoint(mapModel.get('coordinateValues')) - mapModel.addPoint(point) - mapModel.setStartingCoordinates({ - lat: mapModel.get('coordinateValues')['lat'], - lon: mapModel.get('coordinateValues')['lon'], - }) - const polyline = map.addRulerLine(mapModel.get('coordinateValues')) - mapModel.setLine(polyline) - break - case 'END': - point = map.addRulerPoint(mapModel.get('coordinateValues')) - mapModel.addPoint(point) - map.setRulerLine({ - lat: mapModel.get('coordinateValues')['lat'], - lon: mapModel.get('coordinateValues')['lon'], - }) - break - case 'NONE': - clearRuler({ map, mapModel }) - break - default: - break - } -} -/* - Handles tasks for clearing the ruler, which include removing all points - (endpoints of the line) and the line. - */ -const clearRuler = ({ map, mapModel }: { map: any; mapModel: any }) => { - const points = mapModel.get('points') - points.forEach((point: any) => { - map.removeRulerPoint(point) - }) - mapModel.clearPoints() - const line = mapModel.removeLine() - map.removeRulerLine(line) -} -/* - * Redraw and recalculate the ruler line and distanceInfo tooltip. Will not redraw while the menu is currently - * displayed updateOnMenu allows updating while the menu is up - */ -const updateDistance = ({ - map, - mapModel, - updateOnMenu = false, -}: { - map: any - mapModel: any - updateOnMenu?: boolean -}) => { - if (mapModel.get('measurementState') === 'START') { - const openMenu = true // TODO: investigate this - const lat = mapModel.get('mouseLat') - const lon = mapModel.get('mouseLon') - if ((updateOnMenu === true || !openMenu) && lat && lon) { - // redraw ruler line - const mousePoint = { lat, lon } - map.setRulerLine(mousePoint) - // update distance info - const startingCoordinates = mapModel.get('startingCoordinates') - const dist = getDistance( - { latitude: lat, longitude: lon }, - { - latitude: startingCoordinates['lat'], - longitude: startingCoordinates['lon'], - } - ) - mapModel.setDistanceInfoPosition( - (event as any).clientX, - (event as any).clientY - ) - mapModel.setCurrentDistance(dist) - } - } -} -const useWreqrMapListeners = ({ map }: { map: any }) => { - useListenTo(map ? (wreqr as any).vent : undefined, 'metacard:overlay', () => { - map.overlayImage.bind(map)() - }) - useListenTo( - map ? (wreqr as any).vent : undefined, - 'metacard:overlay:remove', - () => { - map.removeOverlay.bind(map)() - } - ) - useListenTo( - map ? (wreqr as any).vent : undefined, - 'search:maprectanglefly', - () => { - map.zoomToExtent.bind(map)() - } - ) - React.useEffect(() => { - if (map) { - } - }, [map]) -} -const useSelectionInterfaceMapListeners = ({ - map, - selectionInterface, -}: { - map: any - selectionInterface: any -}) => { - useListenTo( - map ? selectionInterface : undefined, - 'reset:activeSearchResults', - () => { - map.removeAllOverlays.bind(map)() - } - ) -} -const useListenToMapModel = ({ - map, - mapModel, -}: { - map: any - mapModel: any -}) => { - useListenTo( - map && mapModel ? mapModel : undefined, - 'change:measurementState', - () => { - handleMeasurementStateChange({ map, mapModel }) - } - ) - useListenTo( - map && mapModel ? mapModel : undefined, - 'change:mouseLat change:mouseLon', - () => { - updateDistance({ map, mapModel }) - } - ) -} -const updateTarget = ({ - mapModel, - metacard, -}: { - mapModel: any - metacard: LazyQueryResult -}) => { - let target - let targetMetacard - if (metacard) { - target = metacard.plain.metacard.properties.title - targetMetacard = metacard - } - mapModel.set({ - target, - targetMetacard, - }) -} -const handleMapHover = ({ - mapModel, - selectionInterface, - mapEvent, - setIsHoveringResult, - setHoverGeo, -}: { - map: any - mapModel: any - selectionInterface: any - mapEvent: any - setIsHoveringResult: (val: boolean) => void - setHoverGeo: (val: HoverGeo) => void -}) => { - const isHoveringOverGeo = Boolean( - mapEvent.mapTarget && - mapEvent.mapTarget.constructor === String && - ((mapEvent.mapTarget as string).startsWith(SHAPE_ID_PREFIX) || - mapEvent.mapTarget === 'userDrawing') - ) - - if (isHoveringOverGeo) { - setHoverGeo({ - id: mapEvent.mapLocationId, - interactive: Boolean(mapEvent.mapLocationId), - }) - } else { - setHoverGeo({}) - } - - if (!selectionInterface) { - return - } - const currentQuery = selectionInterface.get('currentQuery') - if (!currentQuery) { - return - } - const result = currentQuery.get('result') - if (!result) { - return - } - const metacard = result.get('lazyResults').results[mapEvent.mapTarget] - updateTarget({ metacard, mapModel }) - - setIsHoveringResult( - Boolean( - mapEvent.mapTarget && - mapEvent.mapTarget !== 'userDrawing' && - (mapEvent.mapTarget.constructor === Array || - (mapEvent.mapTarget.constructor === String && - !(mapEvent.mapTarget as string).startsWith(SHAPE_ID_PREFIX))) - ) - ) -} - -const getLocation = (model: Backbone.Model, translation?: Translation) => { - const locationType = getDrawModeFromModel({ model }) - switch (locationType) { - case 'bbox': - const bbox = _.pick( - model.attributes, - 'mapNorth', - 'mapSouth', - 'mapEast', - 'mapWest', - 'north', - 'south', - 'east', - 'west' - ) - if (translation) { - const translatedBbox = translateBbox(bbox, translation) - return translatedBbox - } - return bbox - case 'circle': - const point = _.pick(model.attributes, 'lat', 'lon') - if (translation) { - const translatedPoint = translatePoint( - point.lon, - point.lat, - translation - ) - return translatedPoint - } - return point - case 'line': - const line = JSON.parse(JSON.stringify(model.get('line'))) - if (translation) { - translateLine(line, translation) - } - return { line } - case 'poly': - const polygon = JSON.parse(JSON.stringify(model.get('polygon'))) - if (translation) { - const multiPolygon = ShapeUtils.isArray3D(polygon) ? polygon : [polygon] - translatePolygon(multiPolygon, translation) - } - return { polygon } - default: - return {} - } -} - -type LonLat = [longitude: number, latitude: number] - -const translatePolygon = (polygon: LonLat[][], translation: Translation) => { - // odd things happen when latitude is exactly or very close to either 90 or -90 - const northPole = 89.99 - const southPole = -89.99 - let maxLat = 0 - let minLat = 0 - let diff = 0 - - for (const ring of polygon) { - for (const coord of ring) { - const [lon, lat] = translateCoordinates(coord[0], coord[1], translation) - coord[0] = lon - coord[1] = lat - maxLat = Math.max(lat, maxLat) - minLat = Math.min(lat, minLat) - } - } - - if (maxLat > northPole) { - diff = Math.abs(maxLat - northPole) - } else if (minLat < southPole) { - diff = -Math.abs(minLat - southPole) - } - - if (diff !== 0) { - for (const ring of polygon) { - for (const coord of ring) { - coord[1] -= diff - } - } - } -} - -const translateLine = (line: LonLat[], translation: Translation) => { - // odd things happen when latitude is exactly or very close to either 90 or -90 - const northPole = 89.99 - const southPole = -89.99 - let maxLat = 0 - let minLat = 0 - let diff = 0 - for (const coord of line) { - const [lon, lat] = translateCoordinates(coord[0], coord[1], translation) - maxLat = Math.max(lat, maxLat) - minLat = Math.min(lat, minLat) - coord[0] = lon - coord[1] = lat - } - - // prevent polar crossing - if (maxLat > northPole) { - diff = Math.abs(maxLat - northPole) - } else if (minLat < southPole) { - diff = -Math.abs(minLat - southPole) - } - - if (diff !== 0) { - for (const coord of line) { - coord[1] -= diff - } - } -} - -type bboxCoords = { - mapNorth: number - mapSouth: number - mapEast: number - mapWest: number - north?: number - south?: number - east?: number - west?: number -} - -const translateBbox = ( - bbox: bboxCoords, - translation: Translation -): bboxCoords => { - const translated = { ...bbox } - let [east, north] = translateCoordinates( - bbox.mapEast, - bbox.mapNorth, - translation - ) - let [west, south] = translateCoordinates( - bbox.mapWest, - bbox.mapSouth, - translation - ) - - const northPole = 90 - const southPole = -90 - - // prevent polar crossing - let diff - if (north > northPole) { - diff = Math.abs(north - northPole) - north = northPole - south = south - diff - } - - if (south < southPole) { - diff = Math.abs(southPole - south) - south = southPole - north = north + diff - } - - translated.mapNorth = north - translated.mapEast = east - translated.mapSouth = south - translated.mapWest = west - - translated.north = north - translated.east = east - translated.south = south - translated.west = west - - return translated -} - -const translatePoint = ( - lon: number, - lat: number, - translation: Translation -): { lon: number; lat: number } => { - let [updatedLon, updatedLat] = translateCoordinates(lon, lat, translation) - const northPole = 89.99 - const southPole = -89.99 - - if (updatedLat > northPole) { - updatedLat = northPole - } else if (updatedLat < southPole) { - updatedLat = southPole - } - return { lon: updatedLon, lat: updatedLat } -} - -const translateCoordinates = ( - longitude: number, - latitude: number, - translation: Translation -): LonLat => { - let translatedLon = longitude + translation.longitude - let translatedLat = latitude + translation.latitude - - // normalize longitude - if (translatedLon > 180) { - translatedLon -= 360 - } - if (translatedLon < -180) { - translatedLon += 360 - } - - return [translatedLon, translatedLat] -} - -const useMapListeners = ({ - map, - mapModel, - selectionInterface, -}: { - map: any - mapModel: any - selectionInterface: any -}) => { - const [isHoveringResult, setIsHoveringResult] = React.useState(false) - const [hoverGeo, setHoverGeo] = React.useState({}) - const { - moveFrom, - setMoveFrom, - interactiveGeo, - setInteractiveGeo, - interactiveModels, - setInteractiveModels, - translation, - setTranslation, - } = React.useContext(InteractionsContext) - - const addSnack = useSnack() - - const upCallbackRef = React.useRef<() => void>() - - React.useEffect(() => { - upCallbackRef.current = () => { - if (interactiveModels.length > 0 && translation) { - const undoFns: (() => {})[] = [] - for (const model of interactiveModels) { - const originalLocation = getLocation(model) - const newLocation = getLocation(model, translation) - model.set(newLocation) - undoFns.push(() => model.set(originalLocation)) - } - addSnack( - 'Location updated. You may still need to save the item that uses it.', - { - id: `${interactiveGeo}.move`, - undo: () => { - for (const undoFn of undoFns) { - undoFn() - } - }, - } - ) - } - setMoveFrom(null) - setTranslation(null) - } - }, [interactiveModels, translation]) - - React.useEffect(() => { - if (interactiveGeo) { - // This handler might disable dragging to move the map, so only set it up - // when the user has started interacting with a geo. - map.onMouseTrackingForGeoDrag({ - moveFrom, - down: ({ - position, - mapLocationId, - }: { - position: any - mapLocationId: number - }) => { - if (mapLocationId === interactiveGeo && !Drawing.isDrawing()) { - setMoveFrom(position) - } - }, - move: ({ - translation, - mapLocationId, - }: { - translation?: Translation - mapLocationId: number - }) => { - if (mapLocationId === interactiveGeo) { - setHoverGeo({ - id: mapLocationId, - }) - } else { - setHoverGeo({}) - } - setTranslation(translation ?? null) - }, - up: () => upCallbackRef.current?.(), - }) - } - return () => map?.clearMouseTrackingForGeoDrag() - }, [map, interactiveGeo, moveFrom]) - - const handleKeydown = React.useCallback((e: any) => { - if (e.key === 'Escape') { - setInteractiveGeo(null) - setInteractiveModels([]) - setMoveFrom(null) - setTranslation(null) - } - }, []) - - React.useEffect(() => { - if (interactiveGeo) { - window.addEventListener('keydown', handleKeydown) - } else { - window.removeEventListener('keydown', handleKeydown) - } - return () => window.removeEventListener('keydown', handleKeydown) - }, [interactiveGeo]) - - React.useEffect(() => { - if (map && !moveFrom) { - const handleLeftClick = (mapLocationId?: number) => { - if (mapLocationId && !interactiveGeo && !Drawing.isDrawing()) { - setInteractiveGeo(mapLocationId) - } else { - setInteractiveGeo(null) - setInteractiveModels([]) - setMoveFrom(null) - setTranslation(null) - } - } - map.onLeftClickMapAPI(handleLeftClick) - } - if (map && !interactiveGeo) { - if (!Drawing.isDrawing()) { - // Clicks used in drawing on the 3D map, so let's ignore them here - // while drawing. - map.onDoubleClick() - map.onRightClick((event: any, _mapEvent: any) => { - event.preventDefault() - mapModel.set({ - mouseX: event.offsetX, - mouseY: event.offsetY, - open: true, - }) - mapModel.updateClickCoordinates() - updateDistance({ map, mapModel, updateOnMenu: true }) - }) - } - - if (mapModel) { - map.onMouseMove((_event: any, mapEvent: any) => { - handleMapHover({ - map, - mapEvent, - mapModel, - selectionInterface, - setIsHoveringResult, - setHoverGeo, - }) - }) - } - } - return () => { - map?.clearMouseMove() - map?.clearDoubleClick() - map?.clearRightClick() - map?.clearLeftClickMapAPI() - } - }, [map, mapModel, selectionInterface, interactiveGeo, moveFrom]) - return { - isHoveringResult, - hoverGeo, - interactiveGeo, - setInteractiveGeo, - moveFrom, - } -} -const useOnMouseLeave = ({ - mapElement, - mapModel, -}: { - mapElement: any - mapModel: any -}) => { - React.useEffect(() => { - if (mapElement && mapModel) { - mapElement.addEventListener('mouseleave', () => { - mapModel.clearMouseCoordinates() - }) - } - }, [mapElement, mapModel]) -} -const useListenToDrawing = () => { - const [isDrawing, setIsDrawing] = React.useState(false) - useListenTo(Drawing, 'change:drawing', () => { - setIsDrawing(Drawing.isDrawing()) - }) - return isDrawing -} -type MapViewReactType = { - setMap: (map: any) => void - /* - Map creation is deferred to this method, so that all resources pertaining to the map can be loaded lazily and - not be included in the initial page payload. - Because of this, make sure to return a deferred that will resolve when your respective map implementation - is finished loading / starting up. - Also, make sure you resolve that deferred by passing the reference to the map implementation. - */ - loadMap: () => any - selectionInterface: any - mapLayers: any -} -const useChangeCursorOnHover = ({ - mapElement, - isHoveringResult, - hoverGeo, - interactiveGeo, - moveFrom, - isDrawing, -}: { - mapElement: HTMLDivElement | null - isHoveringResult: boolean - hoverGeo: HoverGeo - interactiveGeo: number | null - moveFrom: Cesium.Cartesian3 | null - isDrawing: boolean -}) => { - React.useEffect(() => { - if (mapElement) { - const canvas = mapElement.querySelector('canvas') - - if (canvas && !isDrawing) { - if (interactiveGeo) { - // If the user is in 'interactive mode' with a geo, only show a special cursor - // when hovering over that geo. - if (hoverGeo.id === interactiveGeo) { - canvas.style.cursor = moveFrom ? 'grabbing' : 'grab' - } else { - canvas.style.cursor = '' - } - } else if (hoverGeo.interactive || isHoveringResult) { - canvas.style.cursor = 'pointer' - } else if (hoverGeo.interactive === false) { - canvas.style.cursor = 'not-allowed' - } else { - canvas.style.cursor = '' - } - } - } - }, [mapElement, isHoveringResult, hoverGeo, interactiveGeo, moveFrom]) -} -const useChangeCursorOnDrawing = ({ - mapElement, - isDrawing, -}: { - mapElement: HTMLDivElement | null - isDrawing: boolean -}) => { - React.useEffect(() => { - if (mapElement) { - const canvas = mapElement.querySelector('canvas') - if (canvas) { - if (isDrawing) { - canvas.style.cursor = 'crosshair' - } else { - canvas.style.cursor = '' - } - } - } - }, [mapElement, isDrawing]) -} -export const MapViewReact = (props: MapViewReactType) => { - const [isClustering, setIsClustering] = React.useState(false) - const mapModel = useMapModel() - const [mapDrawingPopupElement, setMapDrawingPopupElement] = - React.useState(null) - const [containerElement, setContainerElement] = - React.useState(null) - const [mapElement, setMapElement] = React.useState( - null - ) - const map = useMap({ - ...props, - mapElement, - mapModel, - containerElement, - mapDrawingPopupElement, - }) - React.useEffect(() => { - props.setMap(map) // allow outside access to map - }, [map]) - useWreqrMapListeners({ map }) - useSelectionInterfaceMapListeners({ - map, - selectionInterface: props.selectionInterface, - }) - useListenToMapModel({ map, mapModel }) - const { isHoveringResult, hoverGeo, interactiveGeo, moveFrom } = - useMapListeners({ - map, - mapModel, - selectionInterface: props.selectionInterface, - }) - useOnMouseLeave({ mapElement, mapModel }) - const isDrawing = useListenToDrawing() - useChangeCursorOnDrawing({ mapElement, isDrawing }) - useChangeCursorOnHover({ - isHoveringResult, - hoverGeo, - interactiveGeo, - moveFrom, - isDrawing, - mapElement, - }) - const addSnack = useSnack() - return ( -
    - {!map ? ( - <> - - - ) : ( - <> - )} -
    -
    -
    - {map ? ( - - ) : null} - {map ? ( - { - zoomToHome({ map }) - }} - saveAsHome={() => { - const boundingBox = map.getBoundingBox() - const userPreferences = user.get('user').get('preferences') - userPreferences.set('mapHome', boundingBox) - addSnack('Success! New map home location set.', { - alertProps: { - severity: 'success', - }, - }) - }} - isClustering={isClustering} - toggleClustering={() => { - setIsClustering(!isClustering) - }} - /> - ) : null} - {map ? ( - <> - -
    - -
    -
    - -
    -
    - - ) : null} -
    -
    -
    - {mapModel ? : null} -
    -
    - {mapModel ? : null} -
    -
    - {map && mapModel && props.selectionInterface ? ( - <> - - - ) : null} -
    - {mapModel ? : null} -
    - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/bbox-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/bbox-display.tsx deleted file mode 100644 index 2e682246629..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/bbox-display.tsx +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import ol from 'openlayers' -import _ from 'underscore' -import { validateGeo } from '../../../../react-component/utils/validation' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { removeOldDrawing } from './drawing-and-display' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import { StartupDataStore } from '../../../../js/model/Startup/startup' -import { Translation } from '../interactions.provider' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' -const modelToRectangle = (model: any) => { - //ensure that the values are numeric - //so that the openlayer projections - //do not fail - const north = parseFloat(model.get('mapNorth')) - const south = parseFloat(model.get('mapSouth')) - let east = parseFloat(model.get('mapEast')) - let west = parseFloat(model.get('mapWest')) - if (isNaN(north) || isNaN(south) || isNaN(east) || isNaN(west)) { - // this.destroyPrimitive() - return - } - // If south is greater than north, - // remove shape from map - if (south > north) { - // this.destroyPrimitive() - return - } - if ( - validateGeo( - 'polygon', - JSON.stringify([ - [west, north], - [east, north], - [west, south], - [east, south], - [west, north], - ]) - )?.error - ) { - return - } - // If we are crossing the date line, we must go outside [-180, 180] - // for openlayers to draw correctly. This means we can't draw boxes - // that encompass more than half the world. This actually matches - // how the backend searches anyway. - if (east - west < -180) { - east += 360 - } else if (east - west > 180) { - west += 360 - } - const northWest = ol.proj.transform( - [west, north], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) - const northEast = ol.proj.transform( - [east, north], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) - const southWest = ol.proj.transform( - [west, south], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) - const southEast = ol.proj.transform( - [east, south], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) - const coords = [] - coords.push(northWest) - coords.push(northEast) - coords.push(southEast) - coords.push(southWest) - coords.push(northWest) - const rectangle = new ol.geom.LineString(coords) - return rectangle -} -export const drawBbox = ({ - map, - model, - rectangle, - id, - isInteractive, - translation, -}: { - map: any - model: any - rectangle: any - id: string - isInteractive?: boolean - translation?: Translation -}) => { - if (!rectangle) { - // handles case where model changes to empty vars and we don't want to draw anymore - return - } - if (translation) { - rectangle.translate(translation.longitude, translation.latitude) - } - const billboard = new ol.Feature({ - geometry: rectangle, - }) - billboard.setId(id) - billboard.set('locationId', model.get('locationId')) - const color = model.get('color') - const iconStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: isInteractive ? contrastingColor : color ? color : '#914500', - width: isInteractive ? 6 : 4, - }), - }) - billboard.setStyle(iconStyle) - const vectorSource = new ol.source.Vector({ - features: [billboard], - }) - let vectorLayer = new ol.layer.Vector({ - source: vectorSource, - }) - vectorLayer.set('id', id) - const mapRef = map.getMap() as ol.Map - removeOldDrawing({ map: mapRef, id }) - mapRef.addLayer(vectorLayer) -} -const updatePrimitive = ({ - map, - model, - id, - isInteractive, - translation, -}: { - map: any - model: any - id: string - isInteractive?: boolean - translation?: Translation -}) => { - const rectangle = modelToRectangle(model) - // make sure the current model has width and height before drawing - if ( - rectangle && - !_.isUndefined(rectangle) && - model.get('north') !== model.get('south') && - model.get('east') !== model.get('west') - ) { - drawBbox({ rectangle, map, model, id, isInteractive, translation }) - //only call this if the mouse button isn't pressed, if we try to draw the border while someone is dragging - //the filled in shape won't show up - // if (!this.buttonPressed) { - // drawBorderedRectangle(rectangle) - // } - } -} -const useListenToBboxModel = ({ - model, - map, - isInteractive, - translation, -}: { - model: any - map: any - isInteractive?: boolean - translation?: Translation -}) => { - const callback = React.useMemo(() => { - return () => { - if (model && map) { - updatePrimitive({ - map, - model, - id: getIdFromModelForDisplay({ model }), - isInteractive, - translation, - }) - } - } - }, [model, map, isInteractive, translation]) - useListenTo( - model, - 'change:mapNorth change:mapSouth change:mapEast change:mapWest', - callback - ) - callback() -} -export const OpenlayersBboxDisplay = ({ - map, - model, - isInteractive, - translation, -}: { - map: any - model: any - isInteractive?: boolean - translation?: Translation -}) => { - useListenToBboxModel({ map, model, isInteractive, translation }) - React.useEffect(() => { - return () => { - if (map && model) { - removeOldDrawing({ - map: map.getMap(), - id: getIdFromModelForDisplay({ model }), - }) - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/circle-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/circle-display.tsx deleted file mode 100644 index 95fce89a510..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/circle-display.tsx +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import ol from 'openlayers' -import _ from 'underscore' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { removeOldDrawing } from './drawing-and-display' -import DistanceUtils from '../../../../js/DistanceUtils' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import * as Turf from '@turf/turf' -import TurfCircle from '@turf/circle' -import { StartupDataStore } from '../../../../js/model/Startup/startup' -import { Translation } from '../interactions.provider' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' -export function translateFromOpenlayersCoordinate(coord: any) { - return ol.proj.transform( - [Number(coord[0]), Number(coord[1])], - StartupDataStore.Configuration.getProjection(), - 'EPSG:4326' - ) -} -function translateToOpenlayersCoordinate(coord: any) { - return ol.proj.transform( - [Number(coord[0]), Number(coord[1])], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) -} -function translateToOpenlayersCoordinates(coords: any) { - const coordinates = [] as any[] - coords.forEach((item: any) => { - coordinates.push(translateToOpenlayersCoordinate(item)) - }) - return coordinates -} -const modelToCircle = ({ model, map }: { model: any; map: any }) => { - if (model.get('lon') === undefined || model.get('lat') === undefined) { - return undefined - } - const rectangle = new ol.geom.Circle( - translateToOpenlayersCoordinate([model.get('lon'), model.get('lat')]), - DistanceUtils.getDistanceInMeters( - model.get('radius'), - model.get('radiusUnits') - ) / map.getMap().getView().getProjection().getMetersPerUnit() - ) - return rectangle -} -export const drawCircle = ({ - map, - model, - rectangle, - id, - isInteractive, - translation, -}: { - map: any - model: any - rectangle: any - id: string - isInteractive?: boolean - translation?: Translation -}) => { - if (!rectangle) { - // handles case where model changes to empty vars and we don't want to draw anymore - return - } - if (translation) { - rectangle.translate(translation.longitude, translation.latitude) - } - const point = Turf.point( - translateFromOpenlayersCoordinate(rectangle.getCenter()) - ) - const turfCircle = TurfCircle( - point, - rectangle.getRadius() * - map.getMap().getView().getProjection().getMetersPerUnit(), - { steps: 64, units: 'meters' } - ) - const geometryRepresentation = new ol.geom.LineString( - translateToOpenlayersCoordinates(turfCircle.geometry.coordinates[0]) - ) - const billboard = new ol.Feature({ - geometry: geometryRepresentation, - }) - billboard.setId(id) - billboard.set('locationId', model.get('locationId')) - const color = model.get('color') - const iconStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: isInteractive ? contrastingColor : color ? color : '#914500', - width: isInteractive ? 6 : 4, - }), - }) - billboard.setStyle(iconStyle) - const vectorSource = new ol.source.Vector({ - features: [billboard], - }) - let vectorLayer = new ol.layer.Vector({ - source: vectorSource, - }) - vectorLayer.set('id', id) - const mapRef = map.getMap() as ol.Map - removeOldDrawing({ map: mapRef, id }) - mapRef.addLayer(vectorLayer) -} -const updatePrimitive = ({ - map, - model, - id, - isInteractive, - translation, -}: { - map: any - model: any - id: string - isInteractive?: boolean - translation?: Translation -}) => { - const circle = modelToCircle({ model, map }) - // make sure the current model has width and height before drawing - if (circle && !_.isUndefined(circle)) { - drawCircle({ - model, - rectangle: circle, - map, - id, - isInteractive, - translation, - }) - } -} -const useListenToBboxModel = ({ - model, - map, - isInteractive, - translation, -}: { - model: any - map: any - isInteractive?: boolean - translation?: Translation -}) => { - const callback = React.useMemo(() => { - return () => { - if (model && map) { - updatePrimitive({ - map, - model, - id: getIdFromModelForDisplay({ model }), - isInteractive, - translation, - }) - } - } - }, [model, map, isInteractive, translation]) - useListenTo(model, 'change:lat change:lon change:radius', callback) - callback() -} -export const OpenlayersCircleDisplay = ({ - map, - model, - isInteractive, - translation, -}: { - map: any - model: any - isInteractive?: boolean - translation?: Translation -}) => { - useListenToBboxModel({ map, model, isInteractive, translation }) - React.useEffect(() => { - return () => { - if (map && model) { - removeOldDrawing({ - map: map.getMap(), - id: getIdFromModelForDisplay({ model }), - }) - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/draw-styles.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/draw-styles.tsx deleted file mode 100644 index 374d2cd75c3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/draw-styles.tsx +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as ol from 'openlayers' -import { transparentize } from 'polished' -import { geometry } from 'geospatialdraw' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' - -const { - CIRCLE_BUFFER_PROPERTY_VALUE, - POLYGON_LINE_BUFFER_PROPERTY_VALUE, - BUFFER_SHAPE_PROPERTY, -} = geometry - -const LINE_WIDTH = 2.5 -const POINT_SIZE = 4.5 -const SCALE_FACTOR = 1.5 - -const RENDERER_STYLE = (feature: ol.Feature): ol.style.Style => - new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: feature.get('color'), - width: LINE_WIDTH, - }), - fill: new ol.style.Fill({ - color: 'rgba(0, 0, 0, 0)', - }), - ...(feature.get(BUFFER_SHAPE_PROPERTY) === CIRCLE_BUFFER_PROPERTY_VALUE - ? {} - : { - image: new ol.style.Circle({ - radius: POINT_SIZE, - fill: new ol.style.Fill({ - color: feature.get('color'), - }), - }), - }), - }) - -const CIRCLE_DRAWING_STYLE = (feature: ol.Feature): ol.style.Style => - new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: 'rgba(0, 0, 0, 0)', - }), - fill: new ol.style.Fill({ - color: 'rgba(0, 0, 0, 0)', - }), - image: new ol.style.Circle({ - radius: POINT_SIZE, - fill: new ol.style.Fill({ - color: feature.get('color'), - }), - }), - }) - -const CIRCLE_BUFFER_PROPERTY_VALUE_DRAWING_STYLE = ( - feature: ol.Feature -): ol.style.Style => - new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: feature.get('color'), - width: LINE_WIDTH * SCALE_FACTOR, - }), - fill: new ol.style.Fill({ - color: transparentize(0.95, feature.get('color') || contrastingColor), - }), - }) - -const GENERIC_DRAWING_STYLE = (feature: ol.Feature): ol.style.Style[] => [ - new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: feature.get('color'), - width: LINE_WIDTH * SCALE_FACTOR, - }), - fill: new ol.style.Fill({ - color: transparentize(0.95, feature.get('color') || contrastingColor), - }), - ...(feature.getGeometry().getType() === 'Point' && feature.get('buffer') > 0 - ? {} - : { - image: new ol.style.Circle({ - radius: POINT_SIZE * SCALE_FACTOR, - fill: new ol.style.Fill({ - color: feature.get('color'), - }), - }), - }), - }), - new ol.style.Style({ - image: new ol.style.Circle({ - radius: POINT_SIZE, - fill: new ol.style.Fill({ - color: feature.get('color'), - }), - }), - geometry: (feature: ol.Feature): ol.geom.Geometry => { - const geometry = feature.getGeometry() - let coordinates: [number, number][] = [] - if (geometry.getType() === 'Polygon') { - coordinates = (geometry as ol.geom.Polygon).getCoordinates()[0] - } else if (geometry.getType() === 'LineString') { - coordinates = (geometry as ol.geom.LineString).getCoordinates() - } - return new ol.geom.MultiPoint(coordinates) - }, - }), -] - -const DRAWING_STYLE = ( - feature: ol.Feature -): ol.style.Style[] | ol.style.Style => { - if (feature.getGeometry().getType() === 'Circle') { - return CIRCLE_DRAWING_STYLE(feature) - } else { - const bufferShape = feature.get(BUFFER_SHAPE_PROPERTY) - switch (bufferShape) { - case POLYGON_LINE_BUFFER_PROPERTY_VALUE: - return RENDERER_STYLE(feature) - case CIRCLE_BUFFER_PROPERTY_VALUE: - return CIRCLE_BUFFER_PROPERTY_VALUE_DRAWING_STYLE(feature) - default: - return GENERIC_DRAWING_STYLE(feature) - } - } -} - -export { RENDERER_STYLE, DRAWING_STYLE } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.tsx deleted file mode 100644 index 93049566303..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/drawing-and-display.tsx +++ /dev/null @@ -1,578 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { useState, useEffect } from 'react' -import { v4 } from 'uuid' -import { - getDrawModeFromModel, - getShapeFromDrawMode, - getDrawModeFromShape, - useDrawingAndDisplayModels, -} from '../drawing-and-display' -import { OpenlayersBboxDisplay } from './bbox-display' -import { OpenlayersCircleDisplay } from './circle-display' -import { OpenlayersLineDisplay } from './line-display' -import { OpenlayersPolygonDisplay } from './polygon-display' -import { Editor } from '../draw-menu' -import { DRAWING_STYLE } from './draw-styles' -import { menu, geometry } from 'geospatialdraw' -import { Shape } from 'geospatialdraw/target/webapp/shape-utils' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { - GeometryJSON, - makeGeometry, - makePointRadiusGeo, - makeLineGeo, - makeBBoxGeo, -} from 'geospatialdraw/target/webapp/geometry' -import * as ol from 'openlayers' -import Common from '../../../../js/Common' -import wreqr from '../../../../js/wreqr' -import * as Turf from '@turf/turf' -import { Point, Polygon, LineString } from '@turf/turf' -import { validateGeo } from '../../../../react-component/utils/validation' -import ShapeUtils from '../../../../js/ShapeUtils' -import _ from 'lodash' -import utility from './utility' -import { - locationColors, - contrastingColor, -} from '../../../../react-component/location/location-color-selector' -import { InteractionsContext } from '../interactions.provider' -import { Model } from 'backbone' - -const DrawingMenu = menu.DrawingMenu -const makeEmptyGeometry = geometry.makeEmptyGeometry - -const SHAPES: Shape[] = [ - 'Bounding Box', - 'Line', - 'Point', - 'Point Radius', - 'Polygon', -] - -const DEFAULT_SHAPE = 'Polygon' -const DRAWING_COLOR = 'blue' - -export const removeOldDrawing = ({ map, id }: { map: ol.Map; id: string }) => { - const oldLayers = map - .getLayers() - .getArray() - .filter((layer) => { - return layer.get('id') === id - }) - oldLayers.forEach((layer) => { - map.removeLayer(layer) - }) -} - -// see generateAnyGeoFilter in CQLUtils.ts for types -const getGeoType = (geo: GeometryJSON) => { - switch (geo.properties.shape) { - case 'Line': - return 'LINE' - case 'Point': - return 'POINT' - case 'Point Radius': - return 'POINTRADIUS' - default: - return 'POLYGON' - } -} - -const createPolygonModel = (geo: GeometryJSON) => { - // Ignore Z coordinate if exists - const polygon = (geo.geometry as Polygon).coordinates[0].map((position) => - position.length > 2 ? position.slice(0, 2) : position - ) - return { - polygon: Common.wrapMapCoordinatesArray(polygon as any).map((coords) => - coords.map((coord) => Number(coord.toFixed(6))) - ), - polygonBufferWidth: geo.properties.buffer?.toString() || '0', - polygonBufferUnits: geo.properties.bufferUnit, - } -} - -const createLineStringModel = (geo: GeometryJSON) => { - // Ignore Z coordinate if exists - const line = (geo.geometry as LineString).coordinates.map((position) => - position.length > 2 ? position.slice(0, 2) : position - ) - return { - line: Common.wrapMapCoordinatesArray(line as any).map((coords) => - coords.map((coord) => Number(coord.toFixed(6))) - ), - lineWidth: geo.properties.buffer?.toString() || '0', - lineUnits: geo.properties.bufferUnit, - } -} - -const createPointRadiusModel = (geo: GeometryJSON) => { - const wrapped = Common.wrapMapCoordinatesArray([ - (geo.geometry as Point).coordinates, - ] as any) - return { - lon: Number(wrapped[0][0].toFixed(6)), - lat: Number(wrapped[0][1].toFixed(6)), - radius: geo.properties.buffer?.toString() || '1', - radiusUnits: geo.properties.bufferUnit, - } -} - -const createBoundingBoxModel = (geo: GeometryJSON) => { - // bbox order: west, south, east, north - const wrapped = Common.wrapMapCoordinatesArray([ - [geo.bbox[0], geo.bbox[1]], - [geo.bbox[2], geo.bbox[3]], - ]) - const west = Number(wrapped[0][0].toFixed(6)) - const south = Number(wrapped[0][1].toFixed(6)) - const east = Number(wrapped[1][0].toFixed(6)) - const north = Number(wrapped[1][1].toFixed(6)) - return { - west, - mapWest: west, - south, - mapSouth: south, - east, - mapEast: east, - north, - mapNorth: north, - } -} - -const createGeoModel = (geo: GeometryJSON) => { - switch (geo.properties.shape) { - case 'Polygon': - return createPolygonModel(geo) - case 'Line': - return createLineStringModel(geo) - case 'Point': - case 'Point Radius': - return createPointRadiusModel(geo) - case 'Bounding Box': - return createBoundingBoxModel(geo) - default: - return {} - } -} -const createDefaultPolygon = ( - buffer: number, - bufferUnit: string, - color: string -): any => { - return { - type: 'Feature', - properties: { - id: '', - color: color, - shape: 'Polygon', - buffer: buffer, - bufferUnit: bufferUnit, - }, - geometry: { - type: 'Polygon', - coordinates: [[]], - }, - bbox: [0, 0, 0, 0], - } -} - -const modelToPolygon = (model: any): GeometryJSON | null => { - const coords = model.get('polygon') - const polygonBufferWidth = Number(model.get('polygonBufferWidth')) - const buffer = Number.isNaN(polygonBufferWidth) ? 0 : polygonBufferWidth - const bufferUnit = model.get('polygonBufferUnits') || undefined - - if ( - coords === undefined || - validateGeo('polygon', JSON.stringify(coords))?.error - ) { - return createDefaultPolygon(buffer, bufferUnit, DRAWING_COLOR) - } - - const isMultiPolygon = ShapeUtils.isArray3D(coords) - const polygon = isMultiPolygon ? coords : [coords] - return makeGeometry( - v4(), - Turf.polygon(polygon).geometry, - DRAWING_COLOR, - 'Polygon', - Number.isNaN(buffer) ? 0 : buffer, - bufferUnit - ) -} - -const modelToLine = (model: any): GeometryJSON | null => { - const lineWidth = Number(model.get('lineWidth')) - const buffer = Number.isNaN(lineWidth) ? 0 : lineWidth - const bufferUnit = model.get('lineUnits') || 'meters' - let coords = model.get('line') - if ( - coords === undefined || - validateGeo('line', JSON.stringify(coords))?.error - ) { - coords = [] - } - return makeLineGeo(v4(), coords, buffer, bufferUnit) -} - -const modelToPointRadius = (model: any): GeometryJSON | null => { - const lon = model.get('lon') - const lat = model.get('lat') - if (lon === undefined || lat === undefined) { - return null - } - const radius = Number(model.get('radius')) - const radiusUnits = model.get('radiusUnits') - return makePointRadiusGeo( - v4(), - lat, - lon, - Number.isNaN(radius) ? 1 : radius, - radiusUnits || 'meters' - ) -} - -const isAnyNaN = (numbers: number[]) => { - return numbers.some((n) => n === undefined || n === null || Number.isNaN(n)) -} - -const modelToBoundingBox = (model: any): GeometryJSON | null => { - const west = model.get('west') - const south = model.get('south') - const east = model.get('east') - const north = model.get('north') - if (isAnyNaN([west, south, east, north])) { - return null - } - return makeBBoxGeo(v4(), [west, south, east, north]) -} - -export const getDrawingGeometryFromModel = ( - model: any -): GeometryJSON | null => { - const mode = model.get('mode') - let geo - switch (mode) { - case 'bbox': - geo = modelToBoundingBox(model) - break - case 'circle': - geo = modelToPointRadius(model) - break - case 'line': - geo = modelToLine(model) - break - case 'poly': - geo = modelToPolygon(model) - break - default: - return null - } - if (geo) { - utility.adjustGeoCoords(geo) - if (geo.properties?.color) { - geo.properties.color = contrastingColor - } - } - return geo -} - -export const convertToModel = ({ - geo, - shape, - existingModel, -}: { - geo: GeometryJSON - shape: Shape - existingModel?: Backbone.Model -}) => { - const properties: { [key: string]: any } = { - ...createGeoModel(geo), - type: getGeoType(geo), - mode: getDrawModeFromShape(shape), - } - - // if the model is being updated, we want to keep the id, otherwise use the geo properties id to recreate the model - if (!existingModel) { - properties.id = geo.properties.id - } - - // geo.properties?.color will have a value when in drawing mode, - // but we dont want to render the drawing's contrastingColor after saving. - // So, we only want to set the default if no color is already set - if (geo.properties?.color !== contrastingColor) { - properties.color = geo.properties?.color || Object.values(locationColors)[0] - } - - return properties -} - -// This is not a piece of state because the geospatialdraw -// library rerenders bounding boxes unnecessarily -// If this was state, the resulting rerenders would -// break bounding boxes in the updateGeo method -let drawingLocation: GeometryJSON | null = makeEmptyGeometry( - v4(), - DEFAULT_SHAPE -) - -const preserveBuffer = ( - drawingModel: any, - drawingLocation: geometry.GeometryJSON, - drawingShape: string -): geometry.GeometryJSON => { - const updatedDrawingLocation = drawingLocation - if (drawingShape === 'Line') { - const lineWidth = drawingModel.get('lineWidth') - const lineUnits = drawingModel.get('lineUnits') - if (lineWidth) { - updatedDrawingLocation.properties.buffer = lineWidth - } - if (lineUnits) { - updatedDrawingLocation.properties.bufferUnit = lineUnits - } - } - if (drawingShape === 'Polygon') { - const polygonWidth = drawingModel.get('polygonBufferWidth') - const polygonUnits = drawingModel.get('polygonBufferUnits') - if (polygonWidth) { - updatedDrawingLocation.properties.buffer = polygonWidth - } - if (polygonUnits) { - updatedDrawingLocation.properties.bufferUnit = polygonUnits - } - } - return updatedDrawingLocation -} - -export const OpenlayersDrawings = ({ - map, - selectionInterface, -}: { - map: any - selectionInterface: any -}) => { - const { models, filterModels, drawingModels } = useDrawingAndDisplayModels({ - selectionInterface, - map, - }) - - const [drawingModel] = - drawingModels.length > 0 ? drawingModels.slice(-1) : [undefined] - - const [isDrawing, setIsDrawing] = useState(false) - const [drawingShape, setDrawingShape] = useState(DEFAULT_SHAPE) - const [drawingGeometry, setDrawingGeometry] = useState( - null - ) - - const [updatedBuffer, setUpdatedBuffer] = useState() - const [updatedBufferUnit, setUpdatedBufferUnit] = useState() - - const { interactiveGeo, translation, setInteractiveModels } = - React.useContext(InteractionsContext) - - const nonDrawingModels = models.concat(filterModels) - - useEffect(() => { - const models = nonDrawingModels.filter( - (model: Model) => model.get('locationId') === interactiveGeo - ) - setInteractiveModels(models) - }, [interactiveGeo, models, filterModels]) - - const handleKeydown = React.useCallback( - (e: any) => { - if (e.key === 'Enter') { - e.preventDefault() - if (drawingLocation) finishDrawing() - } - if (e.key === 'Escape') { - cancelDrawing() - } - }, - [drawingModel, drawingShape, drawingLocation] - ) - - useEffect(() => { - setIsDrawing(!!drawingModel) - if (drawingModel) { - window.addEventListener('keydown', handleKeydown) - setDrawingShape( - getShapeFromDrawMode(getDrawModeFromModel({ model: drawingModel })) - ) - setDrawingGeometry(getDrawingGeometryFromModel(drawingModel)) - } else { - window.removeEventListener('keydown', handleKeydown) - } - return () => window.removeEventListener('keydown', handleKeydown) - }, [drawingModel]) - - const lineBufferChangedCallback = React.useCallback(() => { - setUpdatedBuffer(drawingModel.attributes.lineWidth) - setUpdatedBufferUnit(drawingModel.attributes.lineUnits) - }, [drawingModel]) - - useListenTo( - drawingModel, - 'change:lineWidth change:lineUnits', - lineBufferChangedCallback - ) - - const polygonBufferChangedCallback = React.useCallback(() => { - setUpdatedBuffer(drawingModel.attributes.polygonBufferWidth) - setUpdatedBufferUnit(drawingModel.attributes.polygonBufferUnits) - }, [drawingModel]) - - useListenTo( - drawingModel, - 'change:polygonBufferWidth change:polygonBufferUnits', - polygonBufferChangedCallback - ) - - const cancelDrawing = () => { - drawingModel.set('drawing', false) - // the listener for this calls Drawing.turnOffDrawing() - wreqr.vent.trigger('search:drawcancel', drawingModel) - setIsDrawing(false) - setDrawingShape(DEFAULT_SHAPE) - setDrawingGeometry(null) - setUpdatedBuffer(undefined) - drawingLocation = null - } - - // called when the user clicks apply during geo drawing - const finishDrawing = () => { - if (drawingLocation === null) { - cancelDrawing() - return - } - wreqr.vent.trigger( - `search:${getDrawModeFromShape(drawingShape)}-end`, - drawingModel - ) - wreqr.vent.trigger(`search:drawend`, drawingModel) - drawingModel.set('drawing', false) - - // preserve buffer set by user - const updatedDrawingLocation = preserveBuffer( - drawingModel, - drawingLocation, - drawingShape - ) - - drawingModel.set( - convertToModel({ - geo: updatedDrawingLocation, - shape: drawingShape, - existingModel: drawingModel, - }) - ) - setIsDrawing(false) - setDrawingGeometry(updatedDrawingLocation) - drawingLocation = null - } - - // called during drawing at random intervals - const updateGeo = (geo: GeometryJSON) => { - drawingLocation = geo - } - - return ( - <> - {nonDrawingModels.map((model: any) => { - const drawMode = getDrawModeFromModel({ model }) - const isInteractive = model.get('locationId') === interactiveGeo - const shapeTranslation = - translation && isInteractive ? translation : undefined - switch (drawMode) { - case 'bbox': - return ( - - ) - case 'circle': - return ( - - ) - case 'line': - return ( - - ) - case 'poly': - return ( - - ) - default: - return ( - - ) - } - })} - {drawingModel && ( - - {}} - disabledShapes={SHAPES.filter((shape) => shape !== drawingShape)} - onUpdate={updateGeo} - saveAndContinue={false} - mapStyle={DRAWING_STYLE} - /> - - )} - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/line-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/line-display.tsx deleted file mode 100644 index 7251de3aa71..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/line-display.tsx +++ /dev/null @@ -1,252 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import DistanceUtils from '../../../../js/DistanceUtils' -import ol from 'openlayers' -import _ from 'underscore' -import * as Turf from '@turf/turf' -import { validateGeo } from '../../../../react-component/utils/validation' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { removeOldDrawing } from './drawing-and-display' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import { StartupDataStore } from '../../../../js/model/Startup/startup' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' -import { Translation } from '../interactions.provider' -type CoordinateType = [number, number] -type CoordinatesType = Array -export function translateFromOpenlayersCoordinates(coords: CoordinatesType) { - const coordinates = [] as CoordinatesType - coords.forEach((point) => { - point = ol.proj.transform( - [ - DistanceUtils.coordinateRound(point[0]), - DistanceUtils.coordinateRound(point[1]), - ], - StartupDataStore.Configuration.getProjection(), - 'EPSG:4326' - ) - if (point[1] > 90) { - point[1] = 89.9 - } else if (point[1] < -90) { - point[1] = -89.9 - } - coordinates.push(point) - }) - return coordinates -} -export function translateToOpenlayersCoordinates(coords: CoordinatesType) { - const coordinates = [] as CoordinatesType - coords.forEach((item) => { - if (item[0].constructor === Array) { - coordinates.push( - translateToOpenlayersCoordinates( - item as unknown as CoordinatesType - ) as unknown as CoordinateType - ) - } else { - coordinates.push( - ol.proj.transform( - [item[0], item[1]], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) - ) - } - }) - return coordinates -} -const modelToLineString = (model: any) => { - const line = model.get('line') - const setArr = _.uniq(line) - if (setArr.length < 2) { - return - } - return new ol.geom.LineString(translateToOpenlayersCoordinates(setArr)) -} -const adjustLinePoints = (line: ol.geom.LineString) => { - const extent = line.getExtent() - const lon1 = extent[0] - const lon2 = extent[2] - const width = Math.abs(lon2 - lon1) - if (width > 180) { - const adjusted = line.getCoordinates() - adjusted.forEach((coord) => { - if (coord[0] < 0) { - coord[0] += 360 - } - }) - line.setCoordinates(adjusted) - } -} -const adjustMultiLinePoints = (lines: ol.geom.MultiLineString) => { - const adjusted: ol.Coordinate[][] = [] - lines.getLineStrings().forEach((line) => { - adjustLinePoints(line) - adjusted.push(line.getCoordinates()) - }) - lines.setCoordinates(adjusted) -} -export const drawLine = ({ - map, - model, - line, - id, - isInteractive, - translation, -}: { - map: any - model: any - line: ol.geom.LineString - id: string - isInteractive?: boolean - translation?: Translation -}) => { - if (!line) { - // Handles case where model changes to empty vars and we don't want to draw anymore - return - } - const lineWidth = - DistanceUtils.getDistanceInMeters( - model.get('lineWidth'), - model.get('lineUnits') - ) || 1 - if (translation) { - line.translate(translation.longitude, translation.latitude) - } - adjustLinePoints(line) - const turfLine = Turf.lineString( - translateFromOpenlayersCoordinates(line.getCoordinates()) - ) - const bufferedLine = Turf.buffer(turfLine, lineWidth, { units: 'meters' }) - const geometryRepresentation = new ol.geom.MultiLineString( - translateToOpenlayersCoordinates( - bufferedLine.geometry.coordinates as any - ) as unknown as any - ) - const drawnGeometryRepresentation = new ol.geom.LineString( - translateToOpenlayersCoordinates( - turfLine.geometry.coordinates as any - ) as unknown as any - ) - // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments - adjustMultiLinePoints(geometryRepresentation) - const billboard = new ol.Feature({ - geometry: geometryRepresentation, - }) - billboard.setId(id) - billboard.set('locationId', model.get('locationId')) - const drawnLineFeature = new ol.Feature({ - geometry: drawnGeometryRepresentation, - }) - const color = model.get('color') - const iconStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: isInteractive ? contrastingColor : color ? color : '#914500', - width: isInteractive ? 6 : 4, - }), - }) - const drawnLineIconStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: isInteractive ? contrastingColor : color ? color : '#914500', - width: 2, - lineDash: [10, 5], - }), - }) - billboard.setStyle(iconStyle) - drawnLineFeature.setStyle(drawnLineIconStyle) - const vectorSource = new ol.source.Vector({ - features: [billboard, drawnLineFeature], - }) - let vectorLayer = new ol.layer.Vector({ - source: vectorSource, - }) - vectorLayer.set('id', id) - const mapRef = map.getMap() as ol.Map - removeOldDrawing({ map: mapRef, id }) - map.getMap().addLayer(vectorLayer) -} -const updatePrimitive = ({ - map, - model, - id, - isInteractive, - translation, -}: { - map: any - model: any - id: string - isInteractive?: boolean - translation?: Translation -}) => { - const line = modelToLineString(model) - // Make sure the current model has width and height before drawing - if ( - line !== undefined && - !validateGeo('line', JSON.stringify(line.getCoordinates()))?.error - ) { - drawLine({ map, model, line, id, isInteractive, translation }) - } -} -const useListenToLineModel = ({ - model, - map, - isInteractive, - translation, -}: { - model: any - map: any - isInteractive?: boolean - translation?: Translation -}) => { - const callback = React.useMemo(() => { - return () => { - if (model && map) { - updatePrimitive({ - map, - model, - id: getIdFromModelForDisplay({ model }), - isInteractive, - translation, - }) - } - } - }, [model, map, isInteractive, translation]) - useListenTo(model, 'change:line change:lineWidth change:lineUnits', callback) - callback() -} -export const OpenlayersLineDisplay = ({ - map, - model, - isInteractive, - translation, -}: { - map: any - model: any - isInteractive?: boolean - translation?: Translation -}) => { - useListenToLineModel({ map, model, isInteractive, translation }) - React.useEffect(() => { - return () => { - if (map && model) { - removeOldDrawing({ - map: map.getMap(), - id: getIdFromModelForDisplay({ model }), - }) - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.ts deleted file mode 100644 index 8e1a5b9c955..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/map.openlayers.ts +++ /dev/null @@ -1,1069 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* global require, window */ -import wrapNum from '../../../../react-component/utils/wrap-num/wrap-num' -import $ from 'jquery' -import _ from 'underscore' -import utility from './utility' -import DrawingUtility from '../DrawingUtility' -import Openlayers from 'openlayers' -import { OpenlayersLayers } from '../../../../js/controllers/openlayers.layers' -import wreqr from '../../../../js/wreqr' -import { validateGeo } from '../../../../react-component/utils/validation' -import { ClusterType } from '../react/geometries' -import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult' -import { StartupDataStore } from '../../../../js/model/Startup/startup' -import _debounce from 'lodash.debounce' -const defaultColor = '#3c6dd5' -const rulerColor = '#506f85' -function createMap(insertionElement: any, mapLayers: any) { - const layerCollectionController = new OpenlayersLayers({ - collection: mapLayers, - }) - const map = layerCollectionController.makeMap({ - zoom: 2.7, - minZoom: 2.3, - center: [0, 0], - element: insertionElement, - }) - return map -} -function determineIdFromPosition(position: any, map: any) { - const features: any = [] - map.forEachFeatureAtPixel(position, (feature: any) => { - features.push(feature) - }) - if (features.length > 0) { - return features[0].getId() - } -} -function determineIdsFromPosition(position: any, map: any) { - const features: any = [] - let id, locationId - map.forEachFeatureAtPixel(position, (feature: any) => { - features.push(feature) - }) - if (features.length > 0) { - id = features[0].getId() - locationId = features[0].get('locationId') - } - return { id, locationId } -} -function convertPointCoordinate(point: [number, number]) { - const coords = [point[0], point[1]] - return Openlayers.proj.transform( - coords as Openlayers.Coordinate, - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) -} -function unconvertPointCoordinate(point: [number, number]) { - return Openlayers.proj.transform( - point, - StartupDataStore.Configuration.getProjection(), - 'EPSG:4326' - ) -} -// @ts-expect-error ts-migrate(6133) FIXME: 'longitude' is declared but its value is never rea... Remove this comment to see the full error message -function offMap([longitude, latitude]) { - return latitude < -90 || latitude > 90 -} -// The extension argument is a function used in panToExtent -// It allows for customization of the way the map pans to results -export default function ( - insertionElement: any, - _selectionInterface: any, - _notificationEl: any, - _componentElement: any, - mapModel: any, - mapLayers: any -) { - let overlays = {} - let shapes: any = [] - const map = createMap(insertionElement, mapLayers) - - setupTooltip(map) - function setupTooltip(map: any) { - map.on('pointermove', (e: any) => { - const point = unconvertPointCoordinate(e.coordinate) - if (!offMap(point)) { - mapModel.updateMouseCoordinates({ - lat: point[1], - lon: point[0], - }) - } else { - mapModel.clearMouseCoordinates() - } - }) - } - function resizeMap() { - map.updateSize() - } - const debouncedResizeMap = _debounce(resizeMap, 250) - function listenToResize() { - ;(wreqr as any).vent.on('resize', debouncedResizeMap) - window.addEventListener('resize', debouncedResizeMap) - } - function unlistenToResize() { - ;(wreqr as any).vent.off('resize', debouncedResizeMap) - window.removeEventListener('resize', debouncedResizeMap) - } - listenToResize() - /* - * Returns a visible label that is in the same location as the provided label (geometryInstance) if one exists. - * If findSelected is true, the function will also check for hidden labels in the same location but are selected. - */ - function findOverlappingLabel(findSelected: any, geometryInstance: any) { - return _.find( - mapModel.get('labels'), - (label) => - label.getSource().getFeatures()[0].getGeometry().getCoordinates()[0] === - geometryInstance.getCoordinates()[0] && - label.getSource().getFeatures()[0].getGeometry().getCoordinates()[1] === - geometryInstance.getCoordinates()[1] && - ((findSelected && label.get('isSelected')) || label.getVisible()) - ) - } - /* - Only shows one label if there are multiple labels in the same location. - - Show the label in the following importance: - - it is selected - - there is no other label displayed at the same location - - it is the label that was found by findOverlappingLabel - - Arguments are: - - the label to show/hide (geometry, feature) - - if the label is selected - - if the search for overlapping label should include hidden selected labels - */ - function showHideLabel({ geometry, feature, findSelected = false }: any) { - const isSelected = geometry.get('isSelected') - const geometryInstance = feature.getGeometry() - const labelWithSamePosition = findOverlappingLabel( - findSelected, - geometryInstance - ) - if ( - isSelected && - labelWithSamePosition && - !labelWithSamePosition.get('isSelected') - ) { - labelWithSamePosition.setVisible(false) - } - const otherLabelNotSelected = labelWithSamePosition - ? !labelWithSamePosition.get('isSelected') - : true - const visible = - (isSelected && otherLabelNotSelected) || - !labelWithSamePosition || - geometry.get('id') === labelWithSamePosition.get('id') - geometry.setVisible(visible) - } - /* - Shows a hidden label. Used when deleting a label that is shown. - */ - function showHiddenLabel(geometry: any) { - if (!geometry.getVisible()) { - return - } - const geometryInstance = geometry.getSource().getFeatures()[0].getGeometry() - const hiddenLabel = _.find( - mapModel.get('labels'), - (label) => - label.getSource().getFeatures()[0].getGeometry().getCoordinates()[0] === - geometryInstance.getCoordinates()[0] && - label.getSource().getFeatures()[0].getGeometry().getCoordinates()[1] === - geometryInstance.getCoordinates()[1] && - label.get('id') !== geometry.get('id') && - !label.getVisible() - ) - if (hiddenLabel) { - hiddenLabel.setVisible(true) - } - } - let geoDragDownListener: any - let geoDragMoveListener: any - let geoDragUpListener: any - let leftClickMapAPIListener: any - const exposedMethods = { - onMouseTrackingForGeoDrag({ - moveFrom, - down, - move, - up, - }: { - moveFrom?: any - down: any - move: any - up: any - }) { - // disable panning of the map - map.getInteractions().forEach((interaction: any) => { - if (interaction instanceof Openlayers.interaction.DragPan) { - interaction.setActive(false) - } - }) - - // enable dragging individual features - geoDragDownListener = function (event: any) { - const { locationId } = determineIdsFromPosition(event.pixel, map) - const coordinates = map.getCoordinateFromPixel(event.pixel) - const position = { latitude: coordinates[1], longitude: coordinates[0] } - down({ position: position, mapLocationId: locationId }) - } - map.on('pointerdown', geoDragDownListener) - - geoDragMoveListener = function (event: any) { - const { locationId } = determineIdsFromPosition(event.pixel, map) - const coordinates = map.getCoordinateFromPixel(event.pixel) - const translation = moveFrom - ? { - latitude: coordinates[1] - moveFrom.latitude, - longitude: coordinates[0] - moveFrom.longitude, - } - : null - move({ translation: translation, mapLocationId: locationId }) - } - map.on('pointerdrag', geoDragMoveListener) - - geoDragUpListener = up - map.on('pointerup', geoDragUpListener) - }, - clearMouseTrackingForGeoDrag() { - // re-enable panning - map.getInteractions().forEach((interaction: any) => { - if (interaction instanceof Openlayers.interaction.DragPan) { - interaction.setActive(true) - } - }) - map.un('pointerdown', geoDragDownListener) - map.un('pointerdrag', geoDragMoveListener) - map.un('pointerup', geoDragUpListener) - }, - onLeftClickMapAPI(callback: any) { - leftClickMapAPIListener = function (event: any) { - const { locationId } = determineIdsFromPosition(event.pixel, map) - callback(locationId) - } - map.on('singleclick', leftClickMapAPIListener) - }, - clearLeftClickMapAPI() { - map.un('singleclick', leftClickMapAPIListener) - }, - onLeftClick(callback: any) { - $(map.getTargetElement()).on('click', (e) => { - const boundingRect = map.getTargetElement().getBoundingClientRect() - callback(e, { - mapTarget: determineIdFromPosition( - [e.clientX - boundingRect.left, e.clientY - boundingRect.top], - map - ), - }) - }) - }, - onRightClick(callback: any) { - $(map.getTargetElement()).on('contextmenu', (e) => { - callback(e) - }) - }, - clearRightClick() { - $(map.getTargetElement()).off('contextmenu') - }, - onDoubleClick() { - $(map.getTargetElement()).on('dblclick', (e) => { - const boundingRect = map.getTargetElement().getBoundingClientRect() - const { locationId } = determineIdsFromPosition( - [e.clientX - boundingRect.left, e.clientY - boundingRect.top], - map - ) - if (locationId) { - ;(wreqr as any).vent.trigger('location:doubleClick', locationId) - } - }) - }, - clearDoubleClick() { - $(map.getTargetElement()).off('dblclick') - }, - onMouseTrackingForPopup( - downCallback: any, - moveCallback: any, - upCallback: any - ) { - $(map.getTargetElement()).on('mousedown', () => { - downCallback() - }) - $(map.getTargetElement()).on('mousemove', () => { - moveCallback() - }) - this.onLeftClick(upCallback) - }, - onMouseMove(callback: any) { - $(map.getTargetElement()).on('mousemove', (e) => { - const boundingRect = map.getTargetElement().getBoundingClientRect() - const position = [ - e.clientX - boundingRect.left, - e.clientY - boundingRect.top, - ] - const { locationId } = determineIdsFromPosition(position, map) - callback(e, { - mapTarget: determineIdFromPosition(position, map), - mapLocationId: locationId, - }) - }) - }, - clearMouseMove() { - $(map.getTargetElement()).off('mousemove') - }, - timeoutIds: [] as number[], - onCameraMoveStart(callback: any) { - this.timeoutIds.forEach((timeoutId: any) => { - window.clearTimeout(timeoutId) - }) - this.timeoutIds = [] - map.addEventListener('movestart', callback) - }, - offCameraMoveStart(callback: any) { - map.removeEventListener('movestart', callback) - }, - onCameraMoveEnd(callback: any) { - const timeoutCallback = () => { - this.timeoutIds.push( - window.setTimeout(() => { - callback() - }, 300) - ) - } - map.addEventListener('moveend', timeoutCallback) - }, - offCameraMoveEnd(callback: any) { - map.removeEventListener('moveend', callback) - }, - doPanZoom(coords: [number, number][]) { - const that = this - that.panZoomOut({ duration: 1000 }, () => { - setTimeout(() => { - that.zoomToExtent(coords, { duration: 2000 }) - }, 0) - }) - }, - panZoomOut(_opts: any, next: any) { - next() - }, - panToResults(results: any) { - const coordinates = _.flatten( - results.map((result: any) => result.getPoints('location')), - true - ) - this.panToExtent(coordinates) - }, - panToExtent(coords: [number, number][]) { - if (coords.constructor === Array && coords.length > 0) { - const lineObject = coords.map((coordinate) => - convertPointCoordinate(coordinate) - ) - const extent = Openlayers.extent.boundingExtent(lineObject) - map.getView().fit(extent, { - size: map.getSize(), - maxZoom: map.getView().getZoom(), - duration: 500, - }) - } - }, - getExtentOfIds(ids: string[]) { - var extent = Openlayers.extent.createEmpty() - map.getLayers().forEach((layer: any) => { - // might need to handle groups later, but no reason to yet - if ( - layer instanceof Openlayers.layer.Vector && - ids.includes(layer.get('id')) - ) { - Openlayers.extent.extend(extent, layer.getSource().getExtent()) - } - }) - if (extent[0] === Infinity) { - throw new Error('No extent found for ids') - } - return extent - }, - zoomToIds({ ids, duration = 500 }: { ids: string[]; duration?: number }) { - map.getView().fit(this.getExtentOfIds(ids), { - duration, - }) - }, - panToShapesExtent({ duration = 500 }: { duration?: number } = {}) { - var extent = Openlayers.extent.createEmpty() - map.getLayers().forEach((layer: any) => { - if (layer instanceof Openlayers.layer.Group) { - layer.getLayers().forEach(function (groupLayer) { - //If this is a vector layer, add it to our extent - if (layer instanceof Openlayers.layer.Vector) - Openlayers.extent.extend( - extent, - (groupLayer as any).getSource().getExtent() - ) - }) - } else if ( - layer instanceof Openlayers.layer.Vector && - layer.get('id') - ) { - Openlayers.extent.extend(extent, layer.getSource().getExtent()) - } - }) - if (extent[0] !== Infinity) { - map.getView().fit(extent, { - duration, - }) - } - }, - getShapes() { - return shapes - }, - zoomToExtent(coords: [number, number][], opts = {}) { - const lineObject = coords.map((coordinate: any) => - convertPointCoordinate(coordinate) - ) - const extent = Openlayers.extent.boundingExtent(lineObject) - map.getView().fit(extent, { - size: map.getSize(), - maxZoom: map.getView().getZoom(), - duration: 500, - ...opts, - }) - }, - zoomToBoundingBox({ north, east, south, west }: any) { - this.zoomToExtent([ - [west, south], - [east, north], - ]) - }, - limit(value: any, min: any, max: any) { - return Math.min(Math.max(value, min), max) - }, - getBoundingBox() { - const extent = map.getView().calculateExtent(map.getSize()) - let longitudeEast = wrapNum(extent[2], -180, 180) - const longitudeWest = wrapNum(extent[0], -180, 180) - //add 360 degrees to longitudeEast to accommodate bounding boxes that span across the anti-meridian - if (longitudeEast < longitudeWest) { - longitudeEast += 360 - } - return { - north: this.limit(extent[3], -90, 90), - east: longitudeEast, - south: this.limit(extent[1], -90, 90), - west: longitudeWest, - } - }, - overlayImage(model: LazyQueryResult) { - const metacardId = model.plain.id - this.removeOverlay(metacardId) - const coords = model.getPoints('location') - const array = _.map(coords, (coord) => convertPointCoordinate(coord)) - const polygon = new Openlayers.geom.Polygon([array]) - const extent = polygon.getExtent() - const projection = Openlayers.proj.get( - StartupDataStore.Configuration.getProjection() - ) - const overlayLayer = new Openlayers.layer.Image({ - source: new Openlayers.source.ImageStatic({ - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string | undefined' is not assignable to typ... Remove this comment to see the full error message - url: model.currentOverlayUrl, - projection, - imageExtent: extent, - }), - }) - map.addLayer(overlayLayer) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - overlays[metacardId] = overlayLayer - }, - removeOverlay(metacardId: any) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - if (overlays[metacardId]) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - map.removeLayer(overlays[metacardId]) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - delete overlays[metacardId] - } - }, - removeAllOverlays() { - for (const overlay in overlays) { - if (overlays.hasOwnProperty(overlay)) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - map.removeLayer(overlays[overlay]) - } - } - overlays = {} - }, - getCartographicCenterOfClusterInDegrees(cluster: ClusterType) { - return utility.calculateCartographicCenterOfGeometriesInDegrees( - cluster.results - ) - }, - getWindowLocationsOfResults(results: any) { - return results.map((result: any) => { - const openlayersCenterOfGeometry = - utility.calculateOpenlayersCenterOfGeometry(result) - const center = map.getPixelFromCoordinate(openlayersCenterOfGeometry) - if (center) { - return center - } else { - return undefined - } - }) - }, - /* - * Calculates the distance (in meters) between the two positions in the given array of - * Coordinates. - */ - calculateDistanceBetweenPositions(coords: any) { - const line = new Openlayers.geom.LineString(coords) - const sphereLength = Openlayers.Sphere.getLength(line) - return sphereLength - }, - /* - * Draws a marker on the map designating a start/end point for the ruler measurement. The given - * coordinates should be an object with 'lat' and 'lon' keys with degrees values. The given - * marker label should be a single character or digit that is displayed on the map marker. - */ - addRulerPoint(coordinates: any, markerLabel: any) { - const { lat, lon } = coordinates - const point = [lon, lat] - const options = { - id: markerLabel, - color: rulerColor, - } - return this.addPoint(point, options) - }, - /* - * Removes the given point Layer from the map. - */ - removeRulerPoint(pointLayer: any) { - map.removeLayer(pointLayer) - }, - rulerLine: null as null | Openlayers.layer.Vector, - /* - * Draws a line on the map between the points in the given array of point Vectors. - */ - addRulerLine(point: any) { - const options = { - id: 'ruler-line', - title: 'Line for ruler measurement', - color: '#506F85', - } - const startingCoordinates = mapModel.get('startingCoordinates') - const linePoints = [ - [startingCoordinates['lon'], startingCoordinates['lat']], - [point['lon'], point['lat']], - ] - this.rulerLine = this.addLine(linePoints, options) - return this.rulerLine - }, - /* - * Update the position of the ruler line - */ - setRulerLine(point: any) { - this.removeRulerLine() - this.addRulerLine(point) - }, - /* - * Removes the given line Layer from the map. - */ - removeRulerLine() { - map.removeLayer(this.rulerLine) - }, - /* - Adds a billboard point utilizing the passed in point and options. - Options are a view to relate to, and an id, and a color. - */ - addPointWithText(point: any, options: any) { - const pointObject = convertPointCoordinate(point) - const feature = new Openlayers.Feature({ - geometry: new Openlayers.geom.Point(pointObject), - }) - const badgeOffset = options.badgeOptions ? 8 : 0 - const imgWidth = 44 + badgeOffset - const imgHeight = 44 + badgeOffset - - feature.setId(options.id) - ;(feature as any).unselectedStyle = new Openlayers.style.Style({ - image: new Openlayers.style.Icon({ - img: DrawingUtility.getCircleWithText({ - fillColor: options.color, - text: options.id.length, - badgeOptions: options.badgeOptions, - }), - imgSize: [imgWidth, imgHeight], - }), - }) - ;(feature as any).partiallySelectedStyle = new Openlayers.style.Style({ - image: new Openlayers.style.Icon({ - img: DrawingUtility.getCircleWithText({ - fillColor: options.color, - text: options.id.length, - strokeColor: 'black', - textColor: 'white', - badgeOptions: options.badgeOptions, - }), - imgSize: [imgWidth, imgHeight], - }), - }) - ;(feature as any).selectedStyle = new Openlayers.style.Style({ - image: new Openlayers.style.Icon({ - img: DrawingUtility.getCircleWithText({ - fillColor: 'orange', - text: options.id.length, - strokeColor: 'white', - textColor: 'white', - badgeOptions: options.badgeOptions, - }), - imgSize: [imgWidth, imgHeight], - }), - }) - switch (options.isSelected) { - case 'selected': - feature.setStyle((feature as any).selectedStyle) - break - case 'partially': - feature.setStyle((feature as any).partiallySelectedStyle) - break - case 'unselected': - feature.setStyle((feature as any).unselectedStyle) - break - } - const vectorSource = new Openlayers.source.Vector({ - features: [feature], - }) - const vectorLayer = new Openlayers.layer.Vector({ - source: vectorSource, - zIndex: 1, - }) - map.addLayer(vectorLayer) - return vectorLayer - }, - /* - Adds a billboard point utilizing the passed in point and options. - Options are a view to relate to, and an id, and a color. - */ - addPoint(point: any, options: any) { - const pointObject = convertPointCoordinate(point) - const feature = new Openlayers.Feature({ - geometry: new Openlayers.geom.Point(pointObject), - name: options.title, - }) - feature.setId(options.id) - const badgeOffset = options.badgeOptions ? 8 : 0 - let x = 39 + badgeOffset, - y = 40 + badgeOffset - if (options.size) { - x = options.size.x - y = options.size.y - } - ;(feature as any).unselectedStyle = new Openlayers.style.Style({ - image: new Openlayers.style.Icon({ - img: DrawingUtility.getPin({ - fillColor: options.color, - icon: options.icon, - badgeOptions: options.badgeOptions, - }), - imgSize: [x, y], - anchor: [x / 2 - badgeOffset / 2, 0], - anchorOrigin: 'bottom-left', - anchorXUnits: 'pixels', - anchorYUnits: 'pixels', - }), - }) - ;(feature as any).selectedStyle = new Openlayers.style.Style({ - image: new Openlayers.style.Icon({ - img: DrawingUtility.getPin({ - fillColor: 'orange', - icon: options.icon, - badgeOptions: options.badgeOptions, - }), - imgSize: [x, y], - anchor: [x / 2 - badgeOffset / 2, 0], - anchorOrigin: 'bottom-left', - anchorXUnits: 'pixels', - anchorYUnits: 'pixels', - }), - }) - feature.setStyle( - options.isSelected - ? (feature as any).selectedStyle - : (feature as any).unselectedStyle - ) - const vectorSource = new Openlayers.source.Vector({ - features: [feature], - }) - const vectorLayer = new Openlayers.layer.Vector({ - source: vectorSource, - zIndex: 1, - }) - map.addLayer(vectorLayer) - return vectorLayer - }, - /* - Adds a label utilizing the passed in point and options. - Options are an id and text. - */ - addLabel(point: any, options: any) { - const pointObject = convertPointCoordinate(point) - const feature = new Openlayers.Feature({ - geometry: new Openlayers.geom.Point(pointObject), - name: options.text, - isLabel: true, - }) - feature.setId(options.id) - feature.setStyle( - new Openlayers.style.Style({ - text: new Openlayers.style.Text({ - text: options.text, - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ text: any; overflow: boolean; ... Remove this comment to see the full error message - overflow: true, - }), - }) - ) - const vectorSource = new Openlayers.source.Vector({ - features: [feature], - }) - const vectorLayer = new Openlayers.layer.Vector({ - source: vectorSource, - zIndex: 1, - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ source: Openlayers.source.Vect... Remove this comment to see the full error message - id: options.id, - isSelected: false, - }) - map.addLayer(vectorLayer) - mapModel.addLabel(vectorLayer) - return vectorLayer - }, - /* - Adds a polyline utilizing the passed in line and options. - Options are a view to relate to, and an id, and a color. - */ - addLine(line: any, options: any) { - const lineObject = line.map((coordinate: any) => - convertPointCoordinate(coordinate) - ) - const feature = new Openlayers.Feature({ - geometry: new Openlayers.geom.LineString(lineObject), - name: options.title, - }) - feature.setId(options.id) - const commonStyle = new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: options.color || defaultColor, - width: 4, - }), - }) - ;(feature as any).unselectedStyle = [ - new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: 'white', - width: 8, - }), - }), - commonStyle, - ] - ;(feature as any).selectedStyle = [ - new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: 'black', - width: 8, - }), - }), - commonStyle, - ] - feature.setStyle( - options.isSelected - ? (feature as any).selectedStyle - : (feature as any).unselectedStyle - ) - const vectorSource = new Openlayers.source.Vector({ - features: [feature], - }) - const vectorLayer = new Openlayers.layer.Vector({ - source: vectorSource, - }) - map.addLayer(vectorLayer) - return vectorLayer - }, - /* - Adds a polygon fill utilizing the passed in polygon and options. - Options are a view to relate to, and an id. - */ - addPolygon() {}, - /* - Updates a passed in geometry to reflect whether or not it is selected. - Options passed in are color and isSelected. - */ - updateCluster(geometry: any, options: any) { - if (geometry.constructor === Array) { - geometry.forEach((innerGeometry) => { - this.updateCluster(innerGeometry, options) - }) - } else { - const feature = geometry.getSource().getFeatures()[0] - const geometryInstance = feature.getGeometry() - if (geometryInstance.constructor === Openlayers.geom.Point) { - geometry.setZIndex(options.isSelected ? 2 : 1) - switch (options.isSelected) { - case 'selected': - feature.setStyle(feature.selectedStyle) - break - case 'partially': - feature.setStyle(feature.partiallySelectedStyle) - break - case 'unselected': - feature.setStyle(feature.unselectedStyle) - break - } - } else if ( - geometryInstance.constructor === Openlayers.geom.LineString - ) { - const styles = [ - new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: 'rgba(255,255,255, .1)', - width: 8, - }), - }), - new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: 'rgba(0,0,0, .1)', - width: 4, - }), - }), - ] - feature.setStyle(styles) - } - } - }, - /* - Updates a passed in geometry to reflect whether or not it is selected. - Options passed in are color and isSelected. - */ - updateGeometry(geometry: any, options: any) { - if (geometry.constructor === Array) { - geometry.forEach((innerGeometry) => { - this.updateGeometry(innerGeometry, options) - }) - } else { - const feature = geometry.getSource().getFeatures()[0] - const geometryInstance = feature.getGeometry() - if (geometryInstance.constructor === Openlayers.geom.Point) { - geometry.setZIndex(options.isSelected ? 2 : 1) - feature.setStyle( - options.isSelected ? feature.selectedStyle : feature.unselectedStyle - ) - } else if ( - geometryInstance.constructor === Openlayers.geom.LineString - ) { - feature.setStyle( - options.isSelected ? feature.selectedStyle : feature.unselectedStyle - ) - } - } - }, - setGeometryStyle(geometry: any, options: any, feature: any) { - const geometryInstance = feature.getGeometry() - if (geometryInstance.getType() === 'Point') { - let pointWidth = 39 - let pointHeight = 40 - if (options.size) { - pointWidth = options.size.x - pointHeight = options.size.y - } - geometry.setZIndex(options.isSelected ? 2 : 1) - if (!feature.getProperties().isLabel) { - feature.setStyle( - new Openlayers.style.Style({ - image: new Openlayers.style.Icon({ - img: DrawingUtility.getPin({ - fillColor: options.isSelected ? 'orange' : options.color, - strokeColor: 'white', - icon: options.icon, - }), - imgSize: [pointWidth, pointHeight], - anchor: [pointWidth / 2, 0], - anchorOrigin: 'bottom-left', - anchorXUnits: 'pixels', - anchorYUnits: 'pixels', - }), - }) - ) - } else { - feature.setStyle( - new Openlayers.style.Style({ - text: this.createTextStyle( - feature, - map.getView().getResolution() - ), - }) - ) - geometry.set('isSelected', options.isSelected) - showHideLabel({ - geometry, - feature, - }) - } - } else if (geometryInstance.getType() === 'LineString') { - const styles = [ - new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: 'white', - width: 8, - }), - }), - new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: options.color || defaultColor, - width: 4, - }), - }), - ] - feature.setStyle(styles) - } - }, - createTextStyle(feature: any, resolution: any) { - const fillColor = '#000000' - const outlineColor = '#ffffff' - const outlineWidth = 3 - return new Openlayers.style.Text({ - text: this.getText(feature, resolution), - fill: new Openlayers.style.Fill({ color: fillColor }), - stroke: new Openlayers.style.Stroke({ - color: outlineColor, - width: outlineWidth, - }), - offsetX: 20, - offsetY: -15, - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ text: any; fill: Openlayers.st... Remove this comment to see the full error message - placement: 'point', - maxAngle: 45, - overflow: true, - rotation: 0, - textAlign: 'left', - padding: [5, 5, 5, 5], - }) - }, - getText(feature: any, resolution: any) { - const maxResolution = 1200 - const text = - resolution > maxResolution ? '' : this.trunc(feature.get('name'), 20) - return text - }, - trunc(str: any, n: any) { - return str.length > n ? str.substr(0, n - 1) + '...' : str.substr(0) - }, - /* - Updates a passed in geometry to be hidden - */ - hideGeometry(geometry: any) { - geometry.setVisible(false) - }, - /* - Updates a passed in geometry to be shown - */ - showGeometry(geometry: any) { - const feature = geometry.getSource().getFeatures()[0] - if (feature.getProperties().isLabel) { - showHideLabel({ - geometry, - feature, - findSelected: true, - }) - } else { - geometry.setVisible(true) - } - }, - removeGeometry(geometry: any) { - const feature = geometry.getSource().getFeatures()[0] - if (feature.getProperties().isLabel) { - mapModel.removeLabel(geometry) - showHiddenLabel(geometry) - } - map.removeLayer(geometry) - }, - showMultiLineShape(locationModel: any) { - let lineObject = locationModel.get('multiline') - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. - if (validateGeo('multiline', JSON.stringify(lineObject)).error) { - return - } - lineObject = lineObject.map((line: any) => - line.map((coords: any) => convertPointCoordinate(coords)) - ) - let feature = new Openlayers.Feature({ - geometry: new Openlayers.geom.MultiLineString(lineObject), - }) - feature.setId(locationModel.cid) - const styles = [ - new Openlayers.style.Style({ - stroke: new Openlayers.style.Stroke({ - color: locationModel.get('color') || defaultColor, - width: 4, - }), - }), - ] - feature.setStyle(styles) - return this.createVectorLayer(locationModel, feature) - }, - createVectorLayer(locationModel: any, feature: any) { - let vectorSource = new Openlayers.source.Vector({ - features: [feature], - }) - let vectorLayer = new Openlayers.layer.Vector({ - source: vectorSource, - }) - map.addLayer(vectorLayer) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - overlays[locationModel.cid] = vectorLayer - return vectorLayer - }, - destroyShape(cid: any) { - // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'shape' implicitly has an 'any' type. - const shapeIndex = shapes.findIndex((shape) => cid === shape.model.cid) - if (shapeIndex >= 0) { - shapes[shapeIndex].destroy() - shapes.splice(shapeIndex, 1) - } - }, - destroyShapes() { - // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'shape' implicitly has an 'any' type. - shapes.forEach((shape) => { - shape.destroy() - }) - shapes = [] - }, - getMap() { - return map - }, - zoomIn() { - const view = map.getView() - const zoom = view.getZoom() - view.setZoom(zoom + 1) - }, - zoomOut() { - const view = map.getView() - const zoom = view.getZoom() - view.setZoom(zoom - 1) - }, - destroy() { - unlistenToResize() - }, - } - return exposedMethods -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.tsx deleted file mode 100644 index c4cbb40f1cf..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/openlayers.view.tsx +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { Memo } from '../../../memo/memo' -import { MapViewReact } from '../map.view' -import { OpenlayersDrawings } from './drawing-and-display' -import $ from 'jquery' -import { InteractionsProvider } from '../interactions.provider' -import { LayoutContext } from '../../../golden-layout/visual-settings.provider' -import user from '../../../singletons/user-instance' -import User from '../../../../js/model/User' -import { useBackbone } from '../../../selection-checkbox/useBackbone.hook' -import { MAP_LAYERS } from '../../settings-helpers' -import { OpenlayersStateType } from '../../../golden-layout/golden-layout.types' - -const loadOpenLayersCode = () => { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const deferred = new $.Deferred() - import('./map.openlayers').then((OpenlayersMap) => { - deferred.resolve(OpenlayersMap.default) - }) - return deferred -} - -export const OpenlayersMapViewReact = ({ - selectionInterface, - setMap: outerSetMap, - componentState, -}: { - selectionInterface: any - setMap?: (map: any) => void - componentState: OpenlayersStateType -}) => { - const [map, setMap] = React.useState(null) - const [mapLayers, setMapLayers] = React.useState(null) - const { listenTo } = useBackbone() - - const { getValue, setValue, hasLayoutContext } = - React.useContext(LayoutContext) - - const saveLayers = (layers: any) => { - if (hasLayoutContext) { - setValue(MAP_LAYERS, layers.toJSON()) - } else { - user.get('user>preferences').savePreferences() - } - } - - React.useEffect(() => { - const userDefaultLayers = user.get('user>preferences>mapLayers') - - let layerCollection = userDefaultLayers - if (hasLayoutContext) { - const layerSettings = getValue(MAP_LAYERS, componentState.mapLayers) - const layerModels = layerSettings.map((layer: any) => { - return new (User as any).MapLayer(layer, { parse: true }) - }) - layerCollection = new (User as any).MapLayers(layerModels) - } - - listenTo(layerCollection, 'add remove', () => saveLayers(layerCollection)) - layerCollection.validate() - setMapLayers(layerCollection) - }, []) - - React.useEffect(() => { - if (mapLayers) { - listenTo(mapLayers, 'change', () => saveLayers(mapLayers)) - } - }, [mapLayers]) - - React.useEffect(() => { - if (outerSetMap) { - outerSetMap(map) - } - }, [map]) - - if (!mapLayers) { - return null - } - - return ( - - - - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/polygon-display.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/polygon-display.tsx deleted file mode 100644 index 6812525eaf9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/polygon-display.tsx +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import DistanceUtils from '../../../../js/DistanceUtils' -import ol from 'openlayers' -import _ from 'underscore' -import * as Turf from '@turf/turf' -import { validateGeo } from '../../../../react-component/utils/validation' -import { useListenTo } from '../../../selection-checkbox/useBackbone.hook' -import { removeOldDrawing } from './drawing-and-display' -import ShapeUtils from '../../../../js/ShapeUtils' -import { getIdFromModelForDisplay } from '../drawing-and-display' -import { StartupDataStore } from '../../../../js/model/Startup/startup' -import { Translation } from '../interactions.provider' -import { contrastingColor } from '../../../../react-component/location/location-color-selector' -export const translateFromOpenlayersCoordinates = (coords: any) => { - return coords - .map((value: any) => - value.map((point: any) => { - const mappedPoint = ol.proj.transform( - [ - DistanceUtils.coordinateRound(point[0]), - DistanceUtils.coordinateRound(point[1]), - ], - StartupDataStore.Configuration.getProjection(), - 'EPSG:4326' - ) - if (mappedPoint[1] > 90) { - mappedPoint[1] = 89.9 - } else if (mappedPoint[1] < -90) { - mappedPoint[1] = -89.9 - } - return mappedPoint - }) - ) - .flatten() -} -const coordsToLineString = (rawCoords: any) => { - const setArr = _.uniq(rawCoords) - if (setArr.length < 3) { - return - } - const coords = setArr.map((item: any) => - ol.proj.transform( - [item[0], item[1]], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) - ) - // Ensure that the first and last coordinate are the same - if (!_.isEqual(coords[0], coords[coords.length - 1])) { - coords.push(coords[0]) - } - return [coords] -} -const modelToPolygon = (model: any) => { - const coords = model.get('polygon') - - if (coords && coords.length === 0) { - return new ol.geom.MultiPolygon([]) - } - - if ( - coords && - coords.length > 0 && - coords[0].toString() !== coords[coords.length - 1].toString() - ) { - coords.push(coords[0]) - } - - if ( - coords === undefined || - validateGeo('polygon', JSON.stringify(coords))?.error - ) { - return - } - const isMultiPolygon = ShapeUtils.isArray3D(coords) - const multiPolygon = isMultiPolygon ? coords : [coords] - const polygons: ol.Coordinate[][][] = [] - multiPolygon.forEach((polygon: any) => { - const lineString = coordsToLineString(polygon) - if (lineString) { - polygons.push(lineString) - } - }) - return new ol.geom.MultiPolygon(polygons) -} -const adjustPolygonPoints = (polygon: ol.geom.Polygon) => { - const extent = polygon.getExtent() - const lon1 = extent[0] - const lon2 = extent[2] - const width = Math.abs(lon1 - lon2) - if (width > 180) { - const adjusted = polygon.getCoordinates() - adjusted.forEach((ring) => { - ring.forEach((coord) => { - if (coord[0] < 0) { - coord[0] += 360 - } - }) - }) - polygon.setCoordinates(adjusted) - } -} -const adjustMultiPolygonPoints = (polygons: ol.geom.MultiPolygon) => { - const adjusted: ol.Coordinate[][][] = [] - polygons.getPolygons().forEach((polygon) => { - adjustPolygonPoints(polygon) - adjusted.push(polygon.getCoordinates()) - }) - polygons.setCoordinates(adjusted) -} -export const drawPolygon = ({ - map, - model, - polygon, - id, - isInteractive, - translation, -}: { - map: any - model: any - polygon: ol.geom.MultiPolygon - id: string - isInteractive?: boolean - translation?: Translation -}) => { - if (!polygon) { - // Handles case where model changes to empty vars and we don't want to draw anymore - return - } - if (translation) { - polygon.translate(translation.longitude, translation.latitude) - } - adjustMultiPolygonPoints(polygon) - const coordinates = polygon.getCoordinates() - const bufferWidth = - DistanceUtils.getDistanceInMeters( - model.get('polygonBufferWidth'), - model.get('polygonBufferUnits') - ) || 1 - const drawnPolygonSegments = coordinates.map((set) => { - return Turf.multiLineString([translateFromOpenlayersCoordinates(set)]) - .geometry.coordinates - }) - const bufferPolygonSegments = coordinates.map((set) => { - const polySegment = Turf.multiLineString([ - translateFromOpenlayersCoordinates(set), - ]) - const bufferedSegment = Turf.buffer(polySegment, bufferWidth, { - units: 'meters', - }) - const extent = Turf.bbox(bufferedSegment) - const width = Math.abs(extent[0] - extent[2]) - // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments - if (width > 180) { - Turf.coordEach(bufferedSegment, (coord) => { - if (coord[0] < 0) { - coord[0] += 360 - } - }) - } - const bufferPolygons = bufferedSegment.geometry.coordinates.map( - (set: any) => { - return Turf.polygon([set]) - } - ) - return bufferPolygons.reduce((a, b) => Turf.union(a, b), bufferPolygons[0]) - ?.geometry.coordinates - }) - const bufferGeometryRepresentation = new ol.geom.MultiPolygon( - bufferPolygonSegments as any - ) - const drawnGeometryRepresentation = new ol.geom.MultiPolygon( - drawnPolygonSegments as any - ) - const billboard = new ol.Feature({ - geometry: bufferGeometryRepresentation, - }) - billboard.setId(id) - billboard.set('locationId', model.get('locationId')) - const drawnPolygonFeature = new ol.Feature({ - geometry: drawnGeometryRepresentation, - }) - const color = model.get('color') - const bufferPolygonIconStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: isInteractive ? contrastingColor : color ? color : '#914500', - width: isInteractive ? 6 : 4, - }), - zIndex: 1, - }) - const drawnPolygonIconStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: isInteractive ? contrastingColor : color ? color : '#914500', - width: isInteractive ? 5 : 3, - lineDash: [10, 5], - }), - zIndex: 0, - }) - billboard.setStyle(bufferPolygonIconStyle) - drawnPolygonFeature.setStyle(drawnPolygonIconStyle) - const vectorSource = new ol.source.Vector({ - features: [billboard, drawnPolygonFeature], - }) - const vectorLayer = new ol.layer.Vector({ - source: vectorSource, - }) - const mapRef = map.getMap() as ol.Map - removeOldDrawing({ map: mapRef, id }) - vectorLayer.set('id', id) - mapRef.addLayer(vectorLayer) -} -const updatePrimitive = ({ - map, - model, - id, - isInteractive, - translation, -}: { - map: any - model: any - id: string - isInteractive?: boolean - translation?: Translation -}) => { - const polygon = modelToPolygon(model) - if (polygon !== undefined) { - drawPolygon({ map, model, polygon, id, isInteractive, translation }) - } -} -const useListenToPolygonModel = ({ - model, - map, - isInteractive, - translation, -}: { - model: any - map: any - isInteractive?: boolean - translation?: Translation -}) => { - const callback = React.useMemo(() => { - return () => { - if (model && map) { - updatePrimitive({ - map, - model, - id: getIdFromModelForDisplay({ model }), - isInteractive, - translation, - }) - } - } - }, [model, map, isInteractive, translation]) - useListenTo( - model, - 'change:polygon change:polygonBufferWidth change:polygonBufferUnits', - callback - ) - callback() -} -export const OpenlayersPolygonDisplay = ({ - map, - model, - isInteractive, - translation, -}: { - map: any - model: any - isInteractive?: boolean - translation?: Translation -}) => { - useListenToPolygonModel({ map, model, isInteractive, translation }) - React.useEffect(() => { - return () => { - if (map && model) { - removeOldDrawing({ - map: map.getMap(), - id: getIdFromModelForDisplay({ model }), - }) - } - } - }, [map, model]) - return <> -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/utility.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/utility.ts deleted file mode 100644 index 5e8dbd8dda6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/openlayers/utility.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import _ from 'lodash' -import Openlayers from 'openlayers' -import * as Turf from '@turf/turf' -import { Position, LineString, Polygon } from '@turf/turf' -import { GeometryJSON } from 'geospatialdraw/target/webapp/geometry' -import { StartupDataStore } from '../../../../js/model/Startup/startup' - -function convertPointCoordinate(point: any) { - const coords = [point[0], point[1]] - return Openlayers.proj.transform( - coords as any, - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ) -} -function unconvertPointCoordinate(point: any) { - return Openlayers.proj.transform( - point, - StartupDataStore.Configuration.getProjection(), - 'EPSG:4326' - ) -} -/* - A variety of helpful functions for dealing with Openlayers -*/ -export default { - /* - Calculates the center of given a geometry (WKT) - */ - calculateOpenlayersCenterOfGeometry(propertyModel: any) { - const lineObject = propertyModel - .getPoints() - .map((coordinate: any) => convertPointCoordinate(coordinate)) - const extent = Openlayers.extent.boundingExtent(lineObject) - return Openlayers.extent.getCenter(extent) - }, - /* - Calculates the center of given a geometry (WKT) - */ - calculateCartographicCenterOfGeometryInDegrees(propertyModel: any) { - const openlayersCenter = - this.calculateOpenlayersCenterOfGeometry(propertyModel) - return unconvertPointCoordinate(openlayersCenter) - }, - /* - Calculates the center of given geometries (WKT) - */ - calculateOpenlayersCenterOfGeometries(propertyModels: any) { - const allPoints = _.flatten( - propertyModels.map((propertyModel: any) => propertyModel.getPoints()) - ).map((coordinate) => convertPointCoordinate(coordinate)) - const extent = Openlayers.extent.boundingExtent(allPoints) - return Openlayers.extent.getCenter(extent) - }, - /* - Calculates the center of given geometries (WKT) - */ - calculateCartographicCenterOfGeometriesInDegrees(propertyModels: any) { - const openlayersCenter = - this.calculateOpenlayersCenterOfGeometries(propertyModels) - return unconvertPointCoordinate(openlayersCenter) - }, - convertCoordsToDisplay(coordinates: Position[]) { - const coords = _.cloneDeep(coordinates) - coords.forEach((coord) => { - if (coord[0] < 0) { - coord[0] += 360 - } - }) - return coords - }, - adjustGeoCoords(geo: GeometryJSON) { - const geometry = geo.geometry - const bbox = geo.bbox || Turf.bbox(geo.geometry) - const width = Math.abs(bbox[0] - bbox[2]) - const crossesAntiMeridian = width > 180 - if (crossesAntiMeridian) { - if (geo.properties.shape === 'Line') { - const lineStringCoords = (geometry as LineString).coordinates - geometry.coordinates = this.convertCoordsToDisplay(lineStringCoords) - } else if ( - geo.properties.shape === 'Bounding Box' || - geo.properties.shape === 'Polygon' - ) { - const coords = (geometry as Polygon).coordinates[0] - geometry.coordinates[0] = this.convertCoordsToDisplay(coords) - } - } - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/calculate-clusters.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/calculate-clusters.tsx deleted file mode 100644 index 3174e24d538..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/calculate-clusters.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import _ from 'underscore' - -import Clustering from '../Clustering' -import { ClusterType } from './geometries' -import { LazyResultsType } from '../../../selection-interface/hooks' -import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult' - -type Props = { - isClustering: boolean - map: any - setClusters: React.Dispatch> - lazyResults: LazyResultsType -} - -const CalculateClusters = ({ - map, - setClusters, - isClustering, - lazyResults, -}: Props) => { - const clusteringAnimationFrameId = React.useRef( - undefined as number | undefined - ) - - const getResultsWithGeometry = () => { - return Object.values(lazyResults).filter((lazyResult) => - lazyResult.hasGeometry() - ) - } - - const calculateClusters = _.debounce(() => { - if (isClustering) { - // const now = Date.now() look into trying to boost perf here - const calculatedClusters = Clustering.calculateClusters( - getResultsWithGeometry(), - map - ) as LazyQueryResult[][] - // console.log(`Time to cluster: ${Date.now() - now}`) - setClusters( - calculatedClusters.map((calculatedCluster) => { - return { - results: calculatedCluster, - id: calculatedCluster - .map((result) => result['metacard.id']) - .sort() - .toString(), - } - }) - ) - } - }, 500) - - const handleResultsChange = () => { - setClusters([]) - calculateClusters() - } - - const startClusterAnimating = () => { - if (isClustering) { - clusteringAnimationFrameId.current = window.requestAnimationFrame(() => { - calculateClusters() - startClusterAnimating() - }) - } - } - - const stopClusterAnimating = () => { - window.cancelAnimationFrame(clusteringAnimationFrameId.current as number) - calculateClusters() - } - - React.useEffect(() => { - handleResultsChange() - }, [lazyResults]) - - React.useEffect(() => { - if (isClustering) { - calculateClusters() - } else { - setClusters([]) - } - map.onCameraMoveStart(startClusterAnimating) - map.onCameraMoveEnd(stopClusterAnimating) - return () => { - map.offCameraMoveStart(startClusterAnimating) - map.offCameraMoveEnd(stopClusterAnimating) - } - }, [isClustering, lazyResults]) - - return <> -} - -export default hot(module)(CalculateClusters) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/cluster.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/cluster.tsx deleted file mode 100644 index a65c3ad86f4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/cluster.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { ClusterType } from './geometries' -import { useSelectionOfLazyResults } from '../../../../js/model/LazyQueryResult/hooks' -import _ from 'underscore' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'geo-... Remove this comment to see the full error message -import calculateConvexHull from 'geo-convex-hull' -import extension from '../../../../extension-points' - -type Props = { - cluster: ClusterType - map: any -} - -const Cluster = ({ cluster, map }: Props) => { - const geometries = React.useRef([] as any[]) - const isSelected = useSelectionOfLazyResults({ lazyResults: cluster.results }) - - React.useEffect(() => { - switch (isSelected) { - case 'selected': - map.updateCluster(geometries.current, { - color: 'orange', - isSelected, - count: cluster.results.length, - outline: 'white', - textFill: 'white', - }) - break - case 'partially': - map.updateCluster(geometries.current, { - color: cluster.results[0].getColor(), - isSelected, - count: cluster.results.length, - outline: 'black', - textFill: 'white', - }) - break - case 'unselected': - map.updateCluster(geometries.current, { - color: cluster.results[0].getColor(), - isSelected, - count: cluster.results.length, - outline: 'white', - textFill: 'white', - }) - break - } - }, [isSelected]) - - const handleCluster = () => { - const center = map.getCartographicCenterOfClusterInDegrees(cluster) - - const badgeOptions = extension.customMapBadge({ - results: cluster.results, - isCluster: true, - }) - - geometries.current.push( - map.addPointWithText(center, { - id: cluster.results.map((result) => result['metacard.id']), - color: cluster.results[0].getColor(), - isSelected, - badgeOptions, - }) - ) - } - - const addConvexHull = () => { - const points = cluster.results.map((result) => result.getPoints()) - const data = _.flatten(points, true).map((coord: any) => ({ - longitude: coord[0], - latitude: coord[1], - })) - const convexHull = calculateConvexHull(data).map((coord: any) => [ - coord.longitude, - coord.latitude, - ]) - convexHull.push(convexHull[0]) - const geometry = map.addLine(convexHull, { - id: cluster.results.map((result) => result['metacard.id']), - color: cluster.results[0].getColor(), - }) - map.hideGeometry(geometry) - geometries.current.push(geometry) - } - - React.useEffect(() => { - handleCluster() - addConvexHull() - return () => { - geometries.current.forEach((geometry) => { - map.removeGeometry(geometry) - }) - } - }, []) - return <> -} - -export default hot(module)(Cluster) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/geometries.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/geometries.tsx deleted file mode 100644 index fdae015a823..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/geometries.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { Drawing } from '../../../singletons/drawing' -import { useLazyResultsFromSelectionInterface } from '../../../selection-interface/hooks' -import Geometry from './geometry' -import CalculateClusters from './calculate-clusters' -import Cluster from './cluster' -import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult' -import ZoomToSelection from './zoom-to-selection' -import { SHAPE_ID_PREFIX } from '../drawing-and-display' -type Props = { - selectionInterface: any - map: any - isClustering: boolean -} - -export type ClusterType = { - results: LazyQueryResult[] - id: string -} - -const Geometries = (props: Props) => { - const { map, selectionInterface, isClustering } = props - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const lazyResultsRef = React.useRef(lazyResults) - lazyResultsRef.current = lazyResults - const [clusters, setClusters] = React.useState([] as ClusterType[]) - // possible since we debounce - if (isClustering === false && clusters.length > 0) { - setClusters([]) - } - React.useEffect(() => { - const handleCtrlClick = (id: string | string[]) => { - if (id.constructor === String) { - lazyResultsRef.current.results[id as string].controlSelect() - } else { - ;(id as string[]).map((subid) => { - return lazyResultsRef.current.results[subid as string].controlSelect() - }) - } - } - const handleClick = (id: string | string[]) => { - if (id.constructor === String) { - lazyResultsRef.current.results[id as string].select() - } else { - const resultIds = id as string[] - let shouldJustDeselect = resultIds.some( - (subid) => lazyResultsRef.current.results[subid].isSelected - ) - lazyResultsRef.current.deselect() - if (!shouldJustDeselect) { - resultIds.map((subid) => { - return lazyResultsRef.current.results[ - subid as string - ].controlSelect() - }) - } - } - } - const handleLeftClick = (event: any, mapEvent: any) => { - if ( - mapEvent.mapTarget && - mapEvent.mapTarget !== 'userDrawing' && - !Drawing.isDrawing() - ) { - // we get click events on normal drawn features from the location drawing - if ( - mapEvent.mapTarget.constructor === String && - (mapEvent.mapTarget as string).startsWith(SHAPE_ID_PREFIX) - ) { - return - } - if (event.shiftKey) { - handleCtrlClick(mapEvent.mapTarget) - } else if (event.ctrlKey || event.metaKey) { - handleCtrlClick(mapEvent.mapTarget) - } else { - handleClick(mapEvent.mapTarget) - } - } - } - map.onLeftClick(handleLeftClick) - return () => {} - }, []) - - const IndividualGeometries = React.useMemo(() => { - return Object.values(lazyResults.results).map((lazyResult) => { - return ( - - ) - }) - }, [lazyResults.results, clusters]) - - const Clusters = React.useMemo(() => { - return clusters.map((cluster) => { - return - }) - }, [clusters, lazyResults.results]) - - const CalculateClustersMemo = React.useMemo(() => { - return ( - - ) - }, [lazyResults.results, isClustering]) - - const ZoomToSelectionMemo = React.useMemo(() => { - return - }, [lazyResults]) - - return ( - <> - {ZoomToSelectionMemo} - {CalculateClustersMemo} - {Clusters} - {IndividualGeometries} - - ) -} - -export default hot(module)(Geometries) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/geometry.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/geometry.tsx deleted file mode 100644 index 5ae63041c45..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/geometry.tsx +++ /dev/null @@ -1,237 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { LazyQueryResult } from '../../../../js/model/LazyQueryResult/LazyQueryResult' -import { ClusterType } from './geometries' -import _ from 'underscore' -import _debounce from 'lodash/debounce' -import wkx from 'wkx' -import iconHelper from '../../../../js/IconHelper' -import { useUpdateEffect } from 'react-use' -import { useSelectionOfLazyResult } from '../../../../js/model/LazyQueryResult/hooks' -import extension from '../../../../extension-points' -import { useMetacardDefinitions } from '../../../../js/model/Startup/metacard-definitions.hooks' - -type Props = { - lazyResult: LazyQueryResult - map: any - clusters: ClusterType[] -} - -const determineIfClustered = ({ - clusters, - result, -}: { - clusters: ClusterType[] - result: LazyQueryResult -}) => { - return Boolean( - clusters.find((cluster) => - Boolean( - cluster.results.find( - (clusteredResult) => - clusteredResult['metacard.id'] === result['metacard.id'] - ) - ) - ) - ) -} - -const Geometry = ({ lazyResult, map, clusters }: Props) => { - const MetacardDefinitions = useMetacardDefinitions() - const isClustered = React.useRef(false) - const geometries = React.useRef([] as any[]) - const isSelected = useSelectionOfLazyResult({ lazyResult }) - - useUpdateEffect(() => { - updateDisplay(isSelected) - }, [isSelected, lazyResult.plain]) - - React.useEffect(() => { - checkIfClustered() - }, [clusters, lazyResult.plain]) - React.useEffect(() => { - updateGeometries() - - return () => { - // cleanup - destroyGeometries() - } - }, [lazyResult.plain]) - - const handlePoint = React.useMemo(() => { - const badgeOptions = extension.customMapBadge({ - results: [lazyResult], - isCluster: false, - }) - return (point: any) => { - geometries.current.push( - map.addPoint(point, { - id: lazyResult['metacard.id'], - title: lazyResult.plain.metacard.properties.title, - color, - icon, - isSelected, - badgeOptions, - }) - ) - } - }, [lazyResult.plain]) - - const handleLine = React.useMemo(() => { - return (line: any) => { - geometries.current.push( - map.addLine(line, { - id: lazyResult['metacard.id'], - title: lazyResult.plain.metacard.properties.title, - color, - isSelected, - }) - ) - } - }, [lazyResult.plain]) - - const handleGeometry = React.useMemo(() => { - return (geometry: any) => { - switch (geometry.type) { - case 'Point': - handlePoint(geometry.coordinates) - break - case 'Polygon': - geometry.coordinates.forEach((polygon: any) => { - handlePoint(polygon[0]) - handleLine(polygon) - }) - break - case 'LineString': - handlePoint(geometry.coordinates[0]) - handleLine(geometry.coordinates) - break - case 'MultiLineString': - geometry.coordinates.forEach((line: any) => { - handlePoint(line[0]) - handleLine(line) - }) - break - case 'MultiPoint': - geometry.coordinates.forEach((point: any) => { - handlePoint(point) - }) - break - case 'MultiPolygon': - geometry.coordinates.forEach((multipolygon: any) => { - multipolygon.forEach((polygon: any) => { - handlePoint(polygon[0]) - handleLine(polygon) - }) - }) - break - case 'GeometryCollection': - geometry.geometries.forEach((subgeometry: any) => { - handleGeometry(subgeometry) - }) - break - } - } - }, []) - - const checkIfClustered = React.useMemo(() => { - return () => { - const updateIsClustered = determineIfClustered({ - clusters, - result: lazyResult, - }) - if (isClustered.current !== updateIsClustered) { - isClustered.current = updateIsClustered - if (isClustered.current) { - hideGeometries() - } else { - showGeometries() - } - } - } - }, [clusters, lazyResult.plain]) - - const color = React.useMemo(() => { - return lazyResult.getColor() - }, []) - - const icon = React.useMemo(() => { - return iconHelper.getFullByMetacardObject(lazyResult.plain) - }, [lazyResult.plain]) - - const updateDisplay = React.useMemo(() => { - return _debounce( - (updateIsSelected: boolean) => { - geometries.current.forEach((geometry) => { - map.updateGeometry(geometry, { - color, - icon, - isSelected: updateIsSelected, - }) - }) - }, - 100, - { - leading: false, - trailing: true, - } - ) - }, []) as (updateIsSelected: boolean) => void - const updateGeometries = React.useMemo(() => { - return (propertiesModel?: any) => { - if ( - propertiesModel && - _.find( - Object.keys(propertiesModel.changedAttributes()), - (attribute: any) => - (MetacardDefinitions.getAttributeMap()[attribute] && - MetacardDefinitions.getAttributeMap()[attribute].type === - 'GEOMETRY') || - attribute === 'id' - ) === undefined - ) { - return - } - destroyGeometries() - isClustered.current = false - const lazyResultGeometries = _.flatten(lazyResult.getGeometries()) - if (lazyResultGeometries.length > 0) { - geometries.current = [] - _.forEach(lazyResultGeometries, (property: any) => { - try { - handleGeometry(wkx.Geometry.parse(property).toGeoJSON()) - } catch (err) { - console.error(err) - } - }) - checkIfClustered() - } - } - }, [lazyResult.plain, MetacardDefinitions]) - - const destroyGeometries = React.useMemo(() => { - return () => { - geometries.current.forEach((geometry) => { - map.removeGeometry(geometry) - }) - } - }, []) - const showGeometries = React.useMemo(() => { - return () => { - geometries.current.forEach((geometry) => { - map.showGeometry(geometry) - }) - } - }, []) - const hideGeometries = React.useMemo(() => { - return () => { - geometries.current.forEach((geometry) => { - map.hideGeometry(geometry) - }) - } - }, []) - - return null -} - -export default hot(module)(Geometry) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/zoom-to-selection.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/zoom-to-selection.tsx deleted file mode 100644 index f5afd84a41f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/maps/react/zoom-to-selection.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { useSelectedResults } from '../../../../js/model/LazyQueryResult/hooks' -import { LazyQueryResults } from '../../../../js/model/LazyQueryResult/LazyQueryResults' - -type Props = { - lazyResults: LazyQueryResults - map: any -} - -const ZoomToSelection = ({ lazyResults, map }: Props) => { - const selectedResults = useSelectedResults({ lazyResults }) - - React.useEffect(() => { - const arrayForm = Object.values(selectedResults) - if (arrayForm.length > 0) { - setTimeout(() => { - map.panToResults(Object.values(selectedResults)) - }, 0) - } - }, [selectedResults]) - return null -} - -export default hot(module)(ZoomToSelection) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/index.tsx deleted file mode 100644 index 0050d70e3fc..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from './results-visual' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.tsx deleted file mode 100644 index c54bc0e0cb8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/lazy-metacard-interactions.tsx +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' -import { hot } from 'react-hot-loader' -import MetacardInteractions from '../../../react-component/metacard-interactions' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' - -type Props = { - lazyResults: LazyQueryResult[] - onClose: () => void -} - -const LazyMetacardInteractions = ({ lazyResults, onClose }: Props) => { - return ( -
    - -
    - ) -} - -export default hot(module)(LazyMetacardInteractions) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item-row.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item-row.tsx deleted file mode 100644 index cea4dd65b99..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item-row.tsx +++ /dev/null @@ -1,392 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Button from '@mui/material/Button' -import Grid from '@mui/material/Grid' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { CellComponent } from './table-header' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { - useRerenderOnBackboneSync, - useSelectionOfLazyResult, -} from '../../../js/model/LazyQueryResult/hooks' -import user from '../../singletons/user-instance' -import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank' -import CheckBoxIcon from '@mui/icons-material/CheckBox' -import { SelectionBackground } from './result-item' -import { useBackbone } from '../../selection-checkbox/useBackbone.hook' -import { TypedUserInstance } from '../../singletons/TypedUser' -import useCoordinateFormat from '../../tabs/metacard/useCoordinateFormat' -import Common from '../../../js/Common' -import Extensions from '../../../extension-points' -import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks' -import wreqr from '../../../js/wreqr' -import { LayoutContext } from '../../golden-layout/visual-settings.provider' -import { - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable, -} from '../settings-helpers' -type ResultItemFullProps = { - lazyResult: LazyQueryResult - measure: () => void - index: number - results: LazyQueryResult[] - selectionInterface: any - headerColWidth: Map - actionWidth: number - setMaxActionWidth: (width: number) => void - addOnWidth: number - setMaxAddOnWidth: (width: number) => void -} -export function clearSelection() { - if (window.getSelection) { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - window.getSelection().removeAllRanges() - } else if ((document as any).selection) { - ;(document as any).selection.empty() - } -} -export function hasSelection(): boolean { - if (window.getSelection) { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - return window.getSelection().toString() !== '' - } else if ((document as any).selection) { - return (document as any).selection.toString() !== '' - } else { - return false - } -} -const CheckboxCell = ({ lazyResult }: { lazyResult: LazyQueryResult }) => { - const isSelected = useSelectionOfLazyResult({ lazyResult }) - return ( - - - - ) -} -const RowComponent = ({ - lazyResult, - measure: originalMeasure, - index, - results, - selectionInterface, - headerColWidth, - actionWidth, - setMaxActionWidth, - addOnWidth, - setMaxAddOnWidth, -}: ResultItemFullProps) => { - const { getValue, onStateChanged } = React.useContext(LayoutContext) - const MetacardDefinitions = useMetacardDefinitions() - const thumbnail = lazyResult.plain.metacard.properties.thumbnail - const [decimalPrecision, setDecimalPrecision] = React.useState( - TypedUserInstance.getDecimalPrecision() - ) - const [shownAttributes, setShownAttributes] = React.useState( - getValue( - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable() - ) as string[] - ) - const isLast = index === results.length - 1 - const { listenTo } = useBackbone() - const convertToFormat = useCoordinateFormat() - const convertToPrecision = (value: any) => { - return value && decimalPrecision - ? Number(value).toFixed(decimalPrecision) - : value - } - useRerenderOnBackboneSync({ lazyResult }) - - const actionRef = React.useRef(null) - const addOnRef = React.useRef(null) - React.useEffect(() => { - const actionWidth = actionRef.current?.getBoundingClientRect().width || 0 - setMaxActionWidth(actionWidth) - const addOnWidth = addOnRef.current?.getBoundingClientRect().width || 0 - setMaxAddOnWidth(addOnWidth) - }) - - React.useEffect(() => { - listenTo( - user.get('user').get('preferences'), - 'change:decimalPrecision', - () => { - setDecimalPrecision(TypedUserInstance.getDecimalPrecision()) - } - ) - onStateChanged(() => { - const shownList = getValue( - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable() - ) - setShownAttributes(shownList) - }) - }, []) - const imgsrc = Common.getImageSrc(thumbnail) - const measure = () => { - if ( - containerRef.current?.clientHeight && - containerRef.current?.clientHeight > 0 - ) { - originalMeasure() - } - } - React.useEffect(() => { - measure() - }, [shownAttributes, convertToFormat]) - const getDisplayValue = (value: any, property: string) => { - if (value && MetacardDefinitions.getAttributeMap()[property]) { - switch (MetacardDefinitions.getAttributeMap()[property].type) { - case 'GEOMETRY': - return convertToFormat(value) - case 'LONG': - case 'DOUBLE': - case 'FLOAT': - return convertToPrecision(value) - } - } - return value - } - listenTo(wreqr.vent, 'activeContentItemChanged', () => { - measure() - }) - const containerRef = React.useRef(null) - const ResultItemActionInstance = Extensions.resultItemAction({ - lazyResult, - selectionInterface, - itemContentRef: containerRef, - }) - - const ResultItemAddOnInstance = Extensions.resultItemRowAddOn({ - lazyResult, - isTableView: true, - }) - - return ( -
    -
    -
    - {ResultItemActionInstance ? ( - - - - ) : ( -
    - )} -
    -
    - - -
    -
    - - -
    -
    -
    - ) -} -export default hot(module)(RowComponent) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item.collection.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item.collection.tsx deleted file mode 100644 index 56f4b8696d3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item.collection.tsx +++ /dev/null @@ -1,322 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import ResultItem from './result-item' -import { hot } from 'react-hot-loader' -import { AutoVariableSizeList } from 'react-window-components' -import Grid from '@mui/material/Grid' -import Button from '@mui/material/Button' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import Paper from '@mui/material/Paper' -import { Elevations } from '../../theme/theme' -import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks' -import { - useSelectedResults, - useStatusOfLazyResults, -} from '../../../js/model/LazyQueryResult/hooks' -import { useTheme } from '@mui/material/styles' -import LinearProgress from '@mui/material/LinearProgress' -import ViewAgendaIcon from '@mui/icons-material/ViewAgenda' -import TableChartIcon from '@mui/icons-material/TableChart' -import { HeaderCheckbox } from './table-header' -import { DarkDivider } from '../../dark-divider/dark-divider' -import { ResultsCommonControls } from './table' -import { TypedUserInstance } from '../../singletons/TypedUser' -import { VariableSizeList } from 'react-window' -import { Memo } from '../../memo/memo' -import { LayoutContext } from '../../golden-layout/visual-settings.provider' -import { - RESULTS_ATTRIBUTES_LIST, - getDefaultResultsShownList, -} from '../settings-helpers' - -type Props = { - mode: any - setMode: any - selectionInterface: any -} - -function scrollToItem({ - listRef, - index, - animationFrameId, - currentScrollOffset, - lastChangedTime, -}: { - listRef: VariableSizeList - index: number - animationFrameId: React.MutableRefObject - currentScrollOffset: React.MutableRefObject - lastChangedTime: React.MutableRefObject -}) { - animationFrameId.current = window.requestAnimationFrame(() => { - const timeSinceLastChange = Date.now() - lastChangedTime.current! - if (timeSinceLastChange > 1000) { - return - } - if ((listRef.state as any).scrollOffset !== currentScrollOffset.current) { - lastChangedTime.current = Date.now() - currentScrollOffset.current = (listRef.state as any).scrollOffset - } - if (!(listRef.state as any).isScrolling) { - listRef.scrollToItem(index, 'smart') - } - scrollToItem({ - listRef, - index, - animationFrameId, - currentScrollOffset, - lastChangedTime, - }) - }) -} - -function startScrollingToItem({ - listRef, - index, - animationFrameId, - currentScrollOffset, - lastChangedTime, -}: { - listRef: VariableSizeList - index: number - animationFrameId: React.MutableRefObject - currentScrollOffset: React.MutableRefObject - lastChangedTime: React.MutableRefObject -}) { - lastChangedTime.current = Date.now() - currentScrollOffset.current = (listRef.state as any).scrollOffset - listRef.scrollToItem(index, 'smart') - scrollToItem({ - listRef, - index, - animationFrameId, - currentScrollOffset, - lastChangedTime, - }) -} - -export const useScrollToItemOnSelection = ({ - selectionInterface, -}: { - selectionInterface: Props['selectionInterface'] -}) => { - const [lastInteraction, setLastInteraction] = React.useState( - null - ) - const listRef = React.useRef(null) - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResults = useSelectedResults({ lazyResults }) - const animationFrameId = React.useRef(null) - const currentScrollOffset = React.useRef(null) - const lastChangedTime = React.useRef(null) - - React.useEffect(() => { - const allResults = Object.values(lazyResults.results) - const selected = Object.values(selectedResults) - if ( - listRef.current && - selected.length >= 1 && - Date.now() - (lastInteraction || 0) > 500 - ) { - startScrollingToItem({ - listRef: listRef.current, - index: allResults.indexOf(selected[0]), - animationFrameId, - currentScrollOffset, - lastChangedTime, - }) - } - return () => { - window.cancelAnimationFrame(animationFrameId.current as number) - } - }, [selectedResults, lazyResults, lastInteraction]) - return { listRef, setLastInteraction } -} - -const ResultCards = ({ mode, setMode, selectionInterface }: Props) => { - const { setValue, getValue } = React.useContext(LayoutContext) - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const results = Object.values(lazyResults.results) - const theme = useTheme() - const { isSearching, status } = useStatusOfLazyResults({ lazyResults }) - - /** - * Note that this scenario only plays out when the component is first created, so if this is open before a search is run it will already be mounted. - * - * This is solely to keep the illusion of responsiveness when switching from table mode to list mode (or dropping a new result visual in) - */ - const [isMounted, setIsMounted] = React.useState(false) - - const { listRef, setLastInteraction } = useScrollToItemOnSelection({ - selectionInterface, - }) - - React.useEffect(() => { - const mountedTimeout = setTimeout(() => { - setIsMounted(true) - }, 1000) - return () => { - clearTimeout(mountedTimeout) - } - }, []) - return ( - - - - - - - - getValue(RESULTS_ATTRIBUTES_LIST, getDefaultResultsShownList()) - } - getStartingRight={() => { - return TypedUserInstance.getResultsAttributesPossibleList( - getValue(RESULTS_ATTRIBUTES_LIST) - ) - }} - onSave={(active) => setValue(RESULTS_ATTRIBUTES_LIST, active)} - /> - - - - - - - - - - - - {isMounted ? ( - - - controlledMeasuring={true} - items={results} - defaultSize={60} - overscanCount={10} - Item={({ itemRef, item, measure, index, width }) => { - return ( -
    - {index !== 0 ? ( - <> -
    - - ) : null} - - {index === results.length - 1 ? ( - <> -
    - - ) : null} -
    - ) - }} - Empty={() => { - if (Object.values(status).length === 0) { - return ( -
    Search has not yet been run.
    - ) - } - if (isSearching) { - return - } - return ( -
    - No Results Found -
    - ) - }} - outerElementProps={{ - onMouseEnter: () => { - setLastInteraction(Date.now()) - }, - onMouseUp: () => { - setLastInteraction(Date.now()) - }, - }} - variableSizeListRef={listRef} - /> - - ) : ( - - )} - - - - ) -} - -export default hot(module)(ResultCards) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item.tsx deleted file mode 100644 index 19b6fd93e30..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/result-item.tsx +++ /dev/null @@ -1,808 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import LazyMetacardInteractions from './lazy-metacard-interactions' -import IconHelper from '../../../js/IconHelper' -import user from '../../singletons/user-instance' -import Button from '@mui/material/Button' -import LinkIcon from '@mui/icons-material/Link' -import GetAppIcon from '@mui/icons-material/GetApp' -import Grid from '@mui/material/Grid' -import { hot } from 'react-hot-loader' -import Paper from '@mui/material/Paper' -import Tooltip from '@mui/material/Tooltip' -import MoreIcon from '@mui/icons-material/MoreVert' -import WarningIcon from '@mui/icons-material/Warning' -import { useBackbone } from '../../selection-checkbox/useBackbone.hook' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { - useRerenderOnBackboneSync, - useSelectionOfLazyResult, -} from '../../../js/model/LazyQueryResult/hooks' -import Extensions from '../../../extension-points' -import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank' -import CheckIcon from '@mui/icons-material/Check' -import CheckBoxIcon from '@mui/icons-material/CheckBox' -import { Elevations } from '../../theme/theme' -import TouchRipple from '@mui/material/ButtonBase/TouchRipple' -import { clearSelection, hasSelection } from './result-item-row' -import { useLazyResultsSelectedResultsFromSelectionInterface } from '../../selection-interface/hooks' -import { TypedUserInstance } from '../../singletons/TypedUser' -import useCoordinateFormat from '../../tabs/metacard/useCoordinateFormat' -import EditIcon from '@mui/icons-material/Edit' -import { Link } from '../../link/link' -import { useMenuState } from '../../menu-state/menu-state' -import Popover from '@mui/material/Popover' -import Common from '../../../js/Common' -import ExtensionPoints from '../../../extension-points/extension-points' -import { StartupDataStore } from '../../../js/model/Startup/startup' -import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks' -import wreqr from '../../../js/wreqr' -import { useDialog } from '../../dialog' -import { useDownloadComponent } from '../../download/download' -import { LayoutContext } from '../../golden-layout/visual-settings.provider' -import { - RESULTS_ATTRIBUTES_LIST, - getDefaultResultsShownList, -} from '../settings-helpers' - -const PropertyComponent = (props: React.AllHTMLAttributes) => { - return ( -
    - ) -} -type ResultItemBasicProps = { - lazyResults: LazyQueryResult[] - lazyResult: LazyQueryResult - selectionInterface: any -} -type ResultItemFullProps = ResultItemBasicProps & { - measure: () => void - index: number - width: number -} -const showSource = () => { - return ( - StartupDataStore.Configuration.getResultShow().find( - (additionalProperty: string) => { - return additionalProperty === 'source-id' - } - ) !== undefined - ) -} -const showRelevanceScore = ({ - lazyResult, -}: { - lazyResult: ResultItemBasicProps['lazyResult'] -}) => { - return ( - StartupDataStore.Configuration.getShowRelevanceScores() && - lazyResult.hasRelevance() - ) -} -export const getIconClassName = ({ - lazyResult, -}: { - lazyResult: LazyQueryResult -}) => { - if (lazyResult.isRevision()) { - return 'fa fa-history' - } else if (lazyResult.isResource()) { - return IconHelper.getClassByMetacardObject(lazyResult.plain) - } else if (lazyResult.isDeleted()) { - return 'fa fa-trash' - } - return IconHelper.getClassByMetacardObject(lazyResult.plain) -} -// @ts-expect-error ts-migrate(6133) FIXME: 'MultiSelectActions' is declared but its value is ... Remove this comment to see the full error message -const MultiSelectActions = ({ - selectionInterface, -}: { - selectionInterface: any -}) => { - const selectedResults = useLazyResultsSelectedResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResultsArray = Object.values(selectedResults) - const metacardInteractionMenuState = useMenuState() - return ( - <> - - - - - - - - ) -} -const dynamicActionClasses = 'h-full' -const DynamicActions = ({ lazyResult }: { lazyResult: LazyQueryResult }) => { - const { setProps } = useDialog() - const metacardInteractionMenuState = useMenuState() - const DownloadComponent = useDownloadComponent() - return ( - - - - - - - - - - - {lazyResult.hasErrors() ? ( -
    - -
    - ) : ( - '' - )} -
    - - {!lazyResult.hasErrors() && lazyResult.hasWarnings() ? ( -
    - -
    - ) : ( - '' - )} -
    - - {lazyResult.plain.metacard.properties['ext.link'] ? ( - - ) : null} - - - {lazyResult.getDownloadUrl() ? ( - - ) : null} - - - - {lazyResult.isSearch() ? ( - - - - ) : null} - - {/** add inline editing later */} - {/* - {lazyResult.isSearch() ? ( - - ) : null} - */} -
    - ) -} -export const SelectionBackground = ({ - lazyResult, -}: { - lazyResult: LazyQueryResult - style?: React.CSSProperties -}) => { - const isSelected = useSelectionOfLazyResult({ lazyResult }) - return ( -
    - ) -} -const IconButton = ({ - lazyResult, - selectionInterface, - itemContentRef, -}: { - lazyResult: LazyQueryResult - selectionInterface: any - itemContentRef: React.RefObject -}) => { - const MetacardDefinitions = useMetacardDefinitions() - const isSelected = useSelectionOfLazyResult({ lazyResult }) - const ResultItemAction = ExtensionPoints.resultItemAction({ - lazyResult, - selectionInterface, - itemContentRef, - className: - 'scale-0 absolute z-10 left-0 -translate-x-full ml-[3px] group-hover:scale-100 transition pt-1', - }) - const extraClasses = ResultItemAction - ? 'group-hover:scale-50 group-hover:-translate-x-[85%]' - : '' - return ( - <> - {ResultItemAction && ( - - )} - - - ) -} -// factored out for easy debugging (can add bg-gray-400 to see trail) -const diagonalHoverClasses = - 'absolute z-50 right-0 bottom-100 h-4 transform scale-0 group-hover:scale-100 transition-all absolute z-50 right-0 bottom-100' -// fake event to pass ripple.stop -const fakeEvent = { - type: '', -} as any -export const ResultItem = ({ - lazyResult, - measure: originalMeasure, - selectionInterface, -}: ResultItemFullProps) => { - const { getValue, onStateChanged } = React.useContext(LayoutContext) - const MetacardDefinitions = useMetacardDefinitions() - const rippleRef = React.useRef<{ - pulsate: () => void - stop: (e: any) => void - start: (e: any) => void - }>(null) - const { listenTo } = useBackbone() - const convertToPrecision = (value: any) => { - return value && decimalPrecision - ? Number(value).toFixed(decimalPrecision) - : value - } - const convertToFormat = useCoordinateFormat() - const [renderExtras, setRenderExtras] = React.useState(false) // dynamic actions are a significant part of rendering time, so delay until necessary - const [decimalPrecision, setDecimalPrecision] = React.useState( - TypedUserInstance.getDecimalPrecision() - ) - const [shownAttributes, setShownAttributes] = React.useState( - getValue(RESULTS_ATTRIBUTES_LIST, getDefaultResultsShownList()) as string[] - ) - useRerenderOnBackboneSync({ lazyResult }) - - React.useEffect(() => { - listenTo( - user.get('user').get('preferences'), - 'change:decimalPrecision', - () => { - setDecimalPrecision(TypedUserInstance.getDecimalPrecision()) - } - ) - onStateChanged(() => { - const shownList = getValue( - RESULTS_ATTRIBUTES_LIST, - getDefaultResultsShownList() - ) - setShownAttributes(shownList) - }) - }, []) - - /** - * Unfocused (hidden) tab sets the container height to 0 - * Run the measure function when the height is 0 could cause items inside the tab to be unreadable - */ - const measure = () => { - if ( - buttonRef.current?.clientHeight && - buttonRef.current?.clientHeight > 0 - ) { - originalMeasure() - } - } - React.useEffect(() => { - measure() - }, [shownAttributes, convertToFormat]) - listenTo(wreqr.vent, 'activeContentItemChanged', () => { - measure() - }) - const thumbnail = lazyResult.plain.metacard.properties.thumbnail - const imgsrc = Common.getImageSrc(thumbnail) - const buttonRef = React.useRef(null) - const itemContentRef = React.useRef(null) - - const ResultItemAddOnInstance = Extensions.resultItemRowAddOn({ - lazyResult, - isTableView: false, - }) - const ResultTitleIconAddOnInstance = Extensions.resultTitleIconAddOn({ - lazyResult, - }) - - const shouldShowRelevance = showRelevanceScore({ lazyResult }) - const shouldShowSource = showSource() - const extraHighlights = Object.keys(lazyResult.highlights).filter( - (attr) => !shownAttributes.find((shownAttribute) => shownAttribute === attr) - ) - const getDisplayValue = ({ - detail, - lazyResult, - }: { - detail: string - lazyResult: LazyQueryResult - }) => { - let value = lazyResult.plain.metacard.properties[detail] - if (value && MetacardDefinitions.getAttributeMap()[detail]) { - switch (MetacardDefinitions.getAttributeMap()[detail].type) { - case 'DATE': - if (value.constructor === Array) { - value = value.map((val: any) => - TypedUserInstance.getMomentDate(val) - ) - } else { - value = TypedUserInstance.getMomentDate(value) - } - break - case 'GEOMETRY': - value = convertToFormat(value) - case 'LONG': - case 'DOUBLE': - case 'FLOAT': - value = convertToPrecision(value) - } - } - if (Array.isArray(value)) { - value = value.join(', ') - } - return value - } - const detailsMap = shownAttributes - .slice(1) // remove top one since that's special - .map((detail) => { - return { - attribute: detail, - value: getDisplayValue({ detail, lazyResult }), - } - }) - .filter((detail) => { - // this is special and is handled differently, see show source - if (detail.attribute === 'source-id') { - return false - } - return detail.value - }) - return ( - - ) -} -export default hot(module)(ResultItem) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/results-visual.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/results-visual.tsx deleted file mode 100644 index b8b4b65962f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/results-visual.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import ResultItemCollection from './result-item.collection' -import Grid from '@mui/material/Grid' -import TableVisual from './table' -// @ts-expect-error ts-migrate(6133) FIXME: 'CircularProgress' is declared but its value is ne... Remove this comment to see the full error message -import CircularProgress from '@mui/material/CircularProgress' -// @ts-expect-error ts-migrate(6133) FIXME: 'useLazyResultsFromSelectionInterface' is declared... Remove this comment to see the full error message -import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks' -// @ts-expect-error ts-migrate(6133) FIXME: 'useStatusOfLazyResults' is declared but its value... Remove this comment to see the full error message -import { useStatusOfLazyResults } from '../../../js/model/LazyQueryResult/hooks' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import Button from '@mui/material/Button' -import BackgroundInheritingDiv from '../../theme/background-inheriting-div' -import { LayoutContext } from '../../golden-layout/visual-settings.provider' -import { RESULTS_MODE } from '../settings-helpers' -import { ResultsState } from '../../golden-layout/golden-layout.types' -type Props = { - selectionInterface: any - componentState: ResultsState -} - -export type ModeType = 'card' | 'table' - -export const ResultsViewContext = React.createContext({ - edit: null as null | LazyQueryResult, - setEdit: (() => {}) as React.Dispatch, -}) - -const ResultsView = ({ selectionInterface, componentState }: Props) => { - const { getValue, setValue } = React.useContext(LayoutContext) - const [mode, setMode] = React.useState(null) - const [edit, setEdit] = React.useState(null as null | LazyQueryResult) - - React.useEffect(() => { - setMode(getValue(RESULTS_MODE, componentState['results-mode'])) - }, []) - - React.useEffect(() => { - mode && setValue(RESULTS_MODE, mode) - }, [mode]) - - return ( - - - - {edit !== null ? ( - -
    - Currently editing: {edit.plain.metacard.properties.title} - -
    -
    - ) : null} - {(() => { - if (mode === 'card') { - return ( - - ) - } else { - return ( - - ) - } - })()} -
    -
    -
    - ) -} - -export default hot(module)(ResultsView) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/table-header.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/table-header.tsx deleted file mode 100644 index 8d99249ab84..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/table-header.tsx +++ /dev/null @@ -1,385 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { LazyQueryResults } from '../../../js/model/LazyQueryResult/LazyQueryResults' -import _ from 'underscore' -import user from '../../singletons/user-instance' -import Button, { ButtonProps } from '@mui/material/Button' -import { useSelectionOfLazyResults } from '../../../js/model/LazyQueryResult/hooks' -import CheckBoxIcon from '@mui/icons-material/CheckBox' -import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank' -import IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox' -import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks' -import { LayoutContext } from '../../golden-layout/visual-settings.provider' -import { - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable, -} from '../settings-helpers' -export type Header = { - hidden: boolean - id: string - label?: string - sortable: boolean -} - -type HeaderProps = { - lazyResults: LazyQueryResults - setHeaderColWidth: Function - headerColWidth: Map - actionWidth: number - addOnWidth: number -} - -type Sort = { - attribute: string - direction: 'ascending' | 'descending' -} - -export const CellComponent = React.forwardRef( - ( - props: React.DetailedHTMLProps< - React.HTMLAttributes, - HTMLDivElement - >, - ref: React.Ref - ) => { - const { style, className, ...otherProps } = props - return ( -
    - ) - } -) - -const updateSort = (attribute: string) => { - const prefs = user.get('user').get('preferences') - const prefResultSort = prefs.get('resultSort') as Sort[] - const currSort = - prefResultSort && prefResultSort.length - ? prefResultSort.find((sort) => sort.attribute === attribute) - : undefined - - const sort: Sort[] = [ - { - attribute, - direction: 'ascending', - }, - ] - - if (currSort) { - sort[0].direction = - currSort.direction === 'ascending' ? 'descending' : 'ascending' - } - - prefs.set('resultSort', sort) - prefs.savePreferences() -} - -const getSortDirectionClass = (attribute: string) => { - const sorts = user.get('user').get('preferences').get('resultSort') as Sort[] - const matchedSort = - sorts && sorts.find((sort) => sort.attribute === attribute) - if (matchedSort && matchedSort.direction) { - if (matchedSort.direction === 'ascending') { - return 'fa fa-sort-asc' - } else if (matchedSort.direction === 'descending') { - return 'fa fa-sort-desc' - } else { - return '' - } - } else { - return '' - } -} - -export const HeaderCheckbox = ({ - showText = false, - lazyResults, - buttonProps, -}: { - showText?: boolean - lazyResults: HeaderProps['lazyResults'] - buttonProps?: ButtonProps -}) => { - const selection = useSelectionOfLazyResults({ - lazyResults: Object.values(lazyResults.results), - }) - return ( - - ) -} - -export const Header = ({ - lazyResults, - setHeaderColWidth, - headerColWidth, - actionWidth, - addOnWidth, -}: HeaderProps) => { - const { getValue, onStateChanged } = React.useContext(LayoutContext) - const MetacardDefinitions = useMetacardDefinitions() - const handleSortClick = _.debounce(updateSort, 500, true) - const [shownAttributes, setShownAttributes] = React.useState( - getValue( - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable() - ) as string[] - ) - - const [activeIndex, setActiveIndex] = React.useState(null) - - const columnRefs = React.useRef( - shownAttributes.map(() => React.createRef()) - ) - const prefs = user.get('user').get('preferences') - - const mouseDown = (index: any) => { - setActiveIndex(index) - } - - const mouseMove = React.useCallback( - (e: any) => { - const columnsWidth = new Map([...headerColWidth]) - - if (headerColWidth.size === 0) { - shownAttributes.map((col) => { - columnsWidth.set(col, '200px') - }) - } - - shownAttributes.map((col, i) => { - if (i === activeIndex) { - const currRef = columnRefs.current[i].current - const offset = currRef?.getBoundingClientRect().x - if (offset) { - const width = e.clientX - offset - if (currRef) { - currRef.style.width = `${width}px` - columnsWidth.set(col, `${width}px`) - } - } - } - }) - setHeaderColWidth(columnsWidth) - prefs.set('columnWidths', columnsWidth) - prefs.savePreferences() - }, - [activeIndex, shownAttributes] - ) - const resetColumnWidth = (col: string) => { - const columnsWidth = new Map([...headerColWidth]) - columnsWidth.set(col, '200px') - setHeaderColWidth(columnsWidth) - prefs.set('columnWidths', columnsWidth) - prefs.savePreferences() - } - - const removeListeners = React.useCallback(() => { - window.removeEventListener('mousemove', mouseMove) - window.removeEventListener('mouseup', removeListeners) - }, [mouseMove]) - - const mouseUp = React.useCallback(() => { - setActiveIndex(null) - removeListeners() - }, [setActiveIndex, removeListeners]) - - React.useEffect(() => { - if (activeIndex !== null) { - window.addEventListener('mousemove', mouseMove) - window.addEventListener('mouseup', mouseUp) - } - - return () => { - removeListeners() - } - }, [activeIndex, mouseMove, mouseUp, removeListeners]) - - React.useEffect(() => { - onStateChanged(() => { - const shownList = getValue( - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable() - ) - setShownAttributes(shownList) - columnRefs.current = shownList.map(() => - React.createRef() - ) - }) - }, []) - - return ( - -
    -
    -
    -
    -
    - - - -
    -
    -
    -
    - {shownAttributes.map((attr, index) => { - const label = MetacardDefinitions.getAlias(attr) - const sortable = true - return ( -
    - - -
    { - resetColumnWidth(attr) - const currRef = columnRefs.current[index].current - if (currRef) { - currRef.style.width = '200px' - } - }} - onMouseDown={() => { - mouseDown(index) - }} - >
    -
    -
    - ) - })} - {' '} - {/** // 8px is the scrollbar width and they only affect the body, so we need to account for it */} -
    - - ) -} - -export default hot(module)(Header) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/table.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/table.tsx deleted file mode 100644 index 6c7d883da61..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/results-visual/table.tsx +++ /dev/null @@ -1,319 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import Button from '@mui/material/Button' -import user from '../../singletons/user-instance' -import { hot } from 'react-hot-loader' -import { AutoVariableSizeList } from 'react-window-components' -import Grid from '@mui/material/Grid' -import { Header } from './table-header' -import ResultItemRow from './result-item-row' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import Paper from '@mui/material/Paper' -import { Elevations } from '../../theme/theme' -import Divider from '@mui/material/Divider' -import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks' -import { useStatusOfLazyResults } from '../../../js/model/LazyQueryResult/hooks' -import LinearProgress from '@mui/material/LinearProgress' -import { DarkDivider } from '../../dark-divider/dark-divider' -import { useTheme } from '@mui/material/styles' -import ViewAgendaIcon from '@mui/icons-material/ViewAgenda' -import TableChartIcon from '@mui/icons-material/TableChart' -import TransferList from '../../tabs/metacard/transfer-list' -import { useDialog } from '../../dialog' -import { TypedUserInstance } from '../../singletons/TypedUser' -import useTimePrefs from '../../fields/useTimePrefs' -import { useScrollToItemOnSelection } from './result-item.collection' -import { Memo } from '../../memo/memo' -import { LayoutContext } from '../../golden-layout/visual-settings.provider' -import { - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable, -} from '../settings-helpers' -type Props = { - selectionInterface: any - mode: any - setMode: any -} -type ResultsCommonControlsType = { - getStartingLeft: () => string[] - getStartingRight: () => string[] - onSave: (active: string[]) => void -} -export const ResultsCommonControls = ({ - getStartingLeft, - getStartingRight, - onSave, -}: ResultsCommonControlsType) => { - const dialogContext = useDialog() - return ( - <> - - - - - ) -} -const TableVisual = ({ selectionInterface, mode, setMode }: Props) => { - const { getValue, setValue } = React.useContext(LayoutContext) - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const results = Object.values(lazyResults.results) - const theme = useTheme() - const { isSearching, status } = useStatusOfLazyResults({ lazyResults }) - useTimePrefs() - const headerRef = React.useRef(null) - /** - * Note that this scenario only plays out when the component is first created, so if this is open before a search is run it will already be mounted. - * - * This is solely to keep the illusion of responsiveness when switching from table mode to list mode (or dropping a new result visual in) - */ - const [isMounted, setIsMounted] = React.useState(false) - const { listRef, setLastInteraction } = useScrollToItemOnSelection({ - selectionInterface, - }) - - React.useEffect(() => { - const mountedTimeout = setTimeout(() => { - setIsMounted(true) - }, 1000) - return () => { - clearTimeout(mountedTimeout) - } - }, []) - - const prefs = user.get('user').get('preferences') - const columnsWidth = new Map(prefs.get('columnWidths')) - const [headerColWidth, setHeaderColWidth] = React.useState(columnsWidth) - - const setWidth = (width: Map) => { - setHeaderColWidth(width) - } - - const [maxActionWidth, setMaxActionWidth] = React.useState(0) - const [maxAddOnWidth, setMaxAddOnWidth] = React.useState(0) - - return ( - - - - { - return getValue( - RESULTS_ATTRIBUTES_TABLE, - getDefaultResultsShownTable() - ) - }} - getStartingRight={() => { - return TypedUserInstance.getResultsAttributesPossibleTable( - getValue(RESULTS_ATTRIBUTES_TABLE) - ) - }} - onSave={(active) => setValue(RESULTS_ATTRIBUTES_TABLE, active)} - /> - - - - - - - - - - - - - {isMounted ? ( - - -
    -
    -
    -
    - - - - - - - outerElementProps={{ - onScroll: (e) => { - if (headerRef.current) { - headerRef.current.scrollLeft = ( - e.target as any - ).scrollLeft - } - }, - onMouseEnter: () => { - setLastInteraction(Date.now()) - }, - onMouseUp: () => { - setLastInteraction(Date.now()) - }, - }} - defaultSize={76} - overscanCount={10} - controlledMeasuring={true} - items={results} - Item={({ itemRef, item, measure, index }) => { - return ( -
    - - setMaxActionWidth((maxWidth) => - Math.max(width, maxWidth) - ) - } - addOnWidth={maxAddOnWidth} - setMaxAddOnWidth={(width) => - setMaxAddOnWidth((maxWidth) => - Math.max(width, maxWidth) - ) - } - /> -
    - ) - }} - Empty={() => { - if (Object.values(status).length === 0) { - return ( -
    - Search has not yet been run. -
    - ) - } - if (isSearching) { - return - } - return ( -
    - No Results Found -
    - ) - }} - variableSizeListRef={listRef} - /> -
    -
    -
    - ) : ( - - )} -
    -
    -
    - ) -} -export default hot(module)(TableVisual) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/settings-helpers.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/settings-helpers.tsx deleted file mode 100644 index 4c6b4666441..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/settings-helpers.tsx +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -/** - * We might want to not export anything beyond the default state functions, but for now we can leave this and refactor when we have time. - * The idea is this state should be flowing in at the top when we make the component, and not be getting fetched in the leaves. Maybe we can add it to the context. - */ -import { ComponentNameType } from '../golden-layout/golden-layout.types' -import { TypedUserInstance } from '../singletons/TypedUser' -import { ModeType } from './results-visual/results-visual' - -export const RESULTS_ATTRIBUTES_TABLE = 'results-attributesShownTable' -export const RESULTS_ATTRIBUTES_LIST = 'results-attributesShownList' -export const RESULTS_MODE = 'results-mode' - -export const MAP_LAYERS = 'mapLayers' - -export function getDefaultComponentState(component: ComponentNameType) { - switch (component) { - case 'cesium': - return { - [MAP_LAYERS]: getUserPreferencesMapLayersJSON(), - } - case 'openlayers': - return { - [MAP_LAYERS]: getUserPreferencesMapLayersJSON(), - } - case 'results': - return { - [RESULTS_ATTRIBUTES_TABLE]: getDefaultResultsShownTable(), - [RESULTS_ATTRIBUTES_LIST]: getDefaultResultsShownList(), - [RESULTS_MODE]: getDefaultResultsMode(), - } - default: - return {} - } -} - -export const getUserPreferencesMapLayersJSON = () => { - return TypedUserInstance.getMapLayers().toJSON() -} - -export const getDefaultResultsMode = (): ModeType => { - return 'card' -} - -export const getDefaultResultsShownList = () => { - const defaultAttributes = TypedUserInstance.getResultsAttributesShownList() - if (defaultAttributes && defaultAttributes.length > 0) { - return defaultAttributes - } - return ['title', 'thumbnail'] -} - -export const getDefaultResultsShownTable = () => { - const defaultAttributes = TypedUserInstance.getResultsAttributesShownTable() - if (defaultAttributes && defaultAttributes.length > 0) { - return defaultAttributes - } - return ['title', 'thumbnail'] -} - -export const getUserCoordinateFormat = () => { - return TypedUserInstance.getCoordinateFormat() -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/timeline/timeline.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/timeline/timeline.tsx deleted file mode 100644 index 564660e0e80..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/timeline/timeline.tsx +++ /dev/null @@ -1,228 +0,0 @@ -import WithListenTo, { - WithBackboneProps, -} from './../../../react-component/backbone-container' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import styled from 'styled-components' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { useLazyResultsFromSelectionInterface } from '../../selection-interface/hooks' -import { useSelectedResults } from '../../../js/model/LazyQueryResult/hooks' -import Timeline from '../../timeline' -import { TimelineItem } from '../../timeline/timeline' -import moment, { Moment } from 'moment-timezone' -import useTimePrefs from '../../fields/useTimePrefs' -import IconHelper from '../../../js/IconHelper' -import useSnack from '../../hooks/useSnack' -import wreqr from '../../../js/wreqr' -import user from '../../singletons/user-instance' -import Extensions from '../../../extension-points' -import _ from 'lodash' -import { useConfiguration } from '../../../js/model/Startup/configuration.hooks' -import { StartupDataStore } from '../../../js/model/Startup/startup' -const maxDate = moment().tz(user.getTimeZone()) -type Props = { - selectionInterface: any -} & WithBackboneProps -const TimelineWrapper = styled.div` - padding: 40px 40px 60px 40px; - height: 100%; - - .MuiButton-label { - font-size: 0.875rem !important; - } -` -const getDateAttributes = (results: any) => { - const availableAttributes = Object.keys(results) - .reduce((currentAvailable, key) => { - const result = results[key] - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string[]' is not assignable to type 'never[]... Remove this comment to see the full error message - currentAvailable = _.union( - currentAvailable, - Object.keys(result.plain.metacard.properties) - ) - return currentAvailable - }, []) - .sort() - let dateAttributes = availableAttributes.reduce( - (list: any, attribute: any) => { - if ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] - ?.type == 'DATE' - ) { - list.push(attribute) - } - return list - }, - [] - ) - return dateAttributes -} -const renderTooltip = (timelineItems: TimelineItem[]) => { - const itemsToExpand = 5 - const uniqueMetacards = timelineItems.filter( - (item, index) => timelineItems.indexOf(item) === index - ) - const results = uniqueMetacards.slice(0, itemsToExpand).map((item) => { - const data = item.data as LazyQueryResult - const icon = IconHelper.getFullByMetacardObject(data.plain) - const metacard = data.plain.metacard.properties - const ItemAddOn = Extensions.timelineItemAddOn({ - results: [data], - isSingleItem: true, - }) - const valCount = timelineItems.filter((i) => i.id === item.id).length - return ( - - -   - {ItemAddOn && ( - <> - {ItemAddOn} -   - - )} - {`${metacard.title || metacard.id}${ - valCount > 1 ? ` (${valCount})` : '' - }`} -
    -
    - ) - }) - - let OtherItemsAddOn = null - if (uniqueMetacards.length > itemsToExpand) { - OtherItemsAddOn = Extensions.timelineItemAddOn({ - results: uniqueMetacards - .slice(itemsToExpand) - .map((item) => item.data as LazyQueryResult), - isSingleItem: false, - }) - } - - const otherResults = ( - -
    - {`+${uniqueMetacards.length - itemsToExpand} other results`} - {OtherItemsAddOn && ( - <> -   - {OtherItemsAddOn} - - )} -
    - ) - return ( - - {results} - {uniqueMetacards.length > itemsToExpand && otherResults} - - ) -} -const TimelineVisualization = (props: Props) => { - const { selectionInterface } = props - const { config } = useConfiguration() - useTimePrefs() - const lazyResults = useLazyResultsFromSelectionInterface({ - selectionInterface, - }) - const selectedResults = useSelectedResults({ - lazyResults, - }) - const { results } = lazyResults - const [data, setData] = React.useState([]) - const [dateAttributeAliases, setDateAttributeAliases] = React.useState({}) - const [height, setHeight] = React.useState(0) - const [pause, setPause] = React.useState(false) - const rootRef = React.useRef(null) - const [resized, setResized] = React.useState(false) - const addSnack = useSnack() - React.useEffect(() => { - props.listenTo((wreqr as any).vent, 'resize', () => { - if (rootRef.current) { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - const rect = rootRef.current.getBoundingClientRect() - setHeight(rect.height) - } - setResized(true) - }) - }, []) - React.useEffect(() => { - if (resized) { - setResized(false) - } - }, [resized]) - React.useEffect(() => { - const selectedIds = Object.values(selectedResults).map( - (result) => result.plain.metacard.properties.id - ) - const possibleDateAttributes = getDateAttributes(results) - const resultData: TimelineItem[] = Object.values(results).map((result) => { - const metacard = result.plain.metacard.properties - const resultDateAttributes: { - [key: string]: Moment[] - } = {} - possibleDateAttributes.forEach((dateAttribute: string) => { - const val = metacard[dateAttribute] - if (val) { - resultDateAttributes[dateAttribute] = Array.isArray(val) - ? val.map((v) => moment(v) as Moment) - : [moment(val) as Moment] - } - }) - const id = metacard.id - const resultDataPoint: TimelineItem = { - id, - selected: selectedIds.includes(id), - data: result, - attributes: resultDateAttributes, - } - return resultDataPoint - }) - setData(resultData) - if (Object.keys(possibleDateAttributes).length > 0) { - const aliasMap: { - [key: string]: string - } = {} - possibleDateAttributes.forEach((dateAttribute: any) => { - aliasMap[dateAttribute] = - config?.attributeAliases[dateAttribute] || dateAttribute - }) - if (!_.isEqual(aliasMap, dateAttributeAliases)) { - setDateAttributeAliases(aliasMap) - } - } - }, [results, selectedResults, config]) - const onSelect = (selectedData: TimelineItem[]) => { - const selectedIds = selectedData.map((d) => d.id) - setPause(true) - lazyResults.selectByIds(selectedIds) - setPause(false) - } - if (pause) { - return null - } - return ( - - { - addSnack('Copied to clipboard: ' + copiedValue, { - alertProps: { - severity: 'success', - }, - }) - }} - /> - - ) -} -export default hot(module)(WithListenTo(TimelineVisualization)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/visualizations.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/visualizations.tsx deleted file mode 100644 index 07a502dcb6d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/component/visualization/visualizations.tsx +++ /dev/null @@ -1,181 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import LinearProgress from '@mui/material/LinearProgress' - -type VisualizationType = { - id: string - title: string - view: any - icon: string - options: any - singular: boolean -} - -/** - * Swapping to not doing string interpolation and generation of dynamic imports, as this increases build time and ends up producing larger bundles in the end downstream. - */ -const DynamicCesiumImport = (...args: any) => { - const [Component, setComponent] = React.useState(null) - - React.useEffect(() => { - import(`./maps/cesium/cesium.view`).then((code) => { - setComponent(() => { - return code.CesiumMapViewReact - }) - }) - }, []) - - if (Component) { - return React.createElement(Component, ...args) - } - return -} - -const DynamicOpenlayersImport = (...args: any) => { - const [Component, setComponent] = React.useState(null) - - React.useEffect(() => { - import('./maps/openlayers/openlayers.view').then((code) => { - setComponent(() => { - return code.OpenlayersMapViewReact - }) - }) - }, []) - - if (Component) { - return React.createElement(Component, ...args) - } - return -} - -const DynamicHistogramImport = (...args: any) => { - const [Component, setComponent] = React.useState(null) - - React.useEffect(() => { - import('./histogram/histogram').then((code) => { - setComponent(() => { - return code.Histogram - }) - }) - }, []) - - if (Component) { - return React.createElement(Component, ...args) - } - return -} - -const DynamicInspectorImport = (...args: any) => { - const [Component, setComponent] = React.useState(null) - - React.useEffect(() => { - import('./inspector/audited-inspector').then((code) => { - setComponent(() => { - return code.AuditedInspector - }) - }) - }, []) - - if (Component) { - return React.createElement(Component, ...args) - } - return -} - -const DynamicResultsImport = (...args: any) => { - const [Component, setComponent] = React.useState(null) - - React.useEffect(() => { - import('./results-visual').then((code) => { - setComponent(() => { - return code.default - }) - }) - }, []) - - if (Component) { - return React.createElement(Component, ...args) - } - return -} - -const DynamicTimelineImport = (...args: any) => { - const [Component, setComponent] = React.useState(null) - - React.useEffect(() => { - import('./timeline/timeline').then((code) => { - setComponent(() => { - return code.default - }) - }) - }, []) - - if (Component) { - return React.createElement(Component, ...args) - } - return -} - -export const Visualizations = [ - { - id: 'openlayers', - title: '2D Map', - view: DynamicOpenlayersImport, - icon: 'fa fa-map', - options: { - desiredContainer: 'openlayers', - }, - singular: true, - }, - { - id: 'cesium', - title: '3D Map', - view: DynamicCesiumImport, - icon: 'fa fa-globe', - options: { - desiredContainer: 'cesium', - }, - singular: true, - }, - { - id: 'histogram', - title: 'Histogram', - icon: 'fa fa-bar-chart', - view: DynamicHistogramImport, - singular: true, - }, - { - id: 'results', - title: 'Results', - view: DynamicResultsImport, - icon: 'fa fa-table', - singular: true, - }, - { - id: 'inspector', - title: 'Inspector', - icon: 'fa fa-info', - view: DynamicInspectorImport, - singular: true, - }, - { - id: 'timeline', - title: 'Timeline', - icon: 'fa fa-hourglass-half', - view: DynamicTimelineImport, - singular: true, - }, -] as VisualizationType[] diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/exports/wreqr.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/exports/wreqr.ts deleted file mode 100644 index 02d91d6b708..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/exports/wreqr.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import wreqr from '../js/wreqr' -export default wreqr diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/extension-points.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/extension-points.tsx deleted file mode 100644 index 25604d778e2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/extension-points.tsx +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { FC } from '../react-component/hoc/utils' -import { providers, Props as ProviderProps } from './providers' -import metacardInteractions from './metacard-interactions' -import { LazyQueryResult } from '../js/model/LazyQueryResult/LazyQueryResult' -import { MetacardAttribute, ResultType } from '../js/model/Types' -import { ValueTypes } from '../component/filter-builder/filter.structure' -import { Suggestion } from '../react-component/location/gazetteer' -import { MetacardInteractionProps } from '../react-component/metacard-interactions' -import { PermissiveComponentType } from '../typescript' -import { InputsType } from '../react-component/location/location' -import { CustomHover } from '../component/visualization/histogram/add-on-helpers' - -type EditorProps = { - result: LazyQueryResult - attribute: string - onCancel?: () => void - onSave?: () => void - goBack?: () => void -} - -export type ExtensionPointsType = { - providers: FC> - metacardInteractions: (( - props: MetacardInteractionProps - ) => React.ReactNode | any)[] - customFilterInput: (props: { - value: string - onChange: (val: any) => void - }) => React.ReactNode | undefined - customCanWritePermission: (props: { - attribute: string - lazyResult: LazyQueryResult - user: any - editableAttributes: string[] - }) => boolean | undefined - customEditableAttributes: () => Promise - resultItemTitleAddOn: ({ - lazyResult, - }: { - lazyResult: LazyQueryResult - }) => JSX.Element | null - resultItemRowAddOn: ({ - lazyResult, - isTableView, - }: { - lazyResult: LazyQueryResult - isTableView?: boolean - }) => JSX.Element | null - resultTitleIconAddOn: ({ - lazyResult, - }: { - lazyResult: LazyQueryResult - }) => JSX.Element | null - layoutDropdown: (props: { - goldenLayout: any - layoutResult?: ResultType - editLayoutRef?: any - }) => JSX.Element | null - customSourcesPage: - | ((props: { onChange?: () => void }) => JSX.Element | null) - | null - serializeLocation: ( - property: string, - value: ValueTypes['location'] - ) => null | any - handleFilter: (map: any, filter: any) => null | any - suggester: (input: string) => null | Promise - handleMetacardUpdate: - | (({ - lazyResult, - attributesToUpdate, - }: { - lazyResult: LazyQueryResult - attributesToUpdate: MetacardAttribute[] - }) => Promise) - | null - extraRoutes: PermissiveComponentType - locationTypes: (baseTypes: InputsType) => InputsType - userInformation: PermissiveComponentType - extraHeader: PermissiveComponentType - extraFooter: PermissiveComponentType - customMapBadge: (props: { - results: LazyQueryResult[] - isCluster: boolean - }) => { text: string; color: string } | undefined - resultItemAction: ({ - lazyResult, - selectionInterface, - itemContentRef, - className, - }: { - lazyResult: LazyQueryResult - selectionInterface: any - itemContentRef: React.RefObject - className?: string - }) => null | PermissiveComponentType - attributeEditor: ( - result: LazyQueryResult, - attribute: string - ) => React.FC | null - customHistogramHover: - | ((props: { results: LazyQueryResult[] }) => CustomHover | undefined) - | undefined - timelineItemAddOn: (props: { - results: LazyQueryResult[] - isSingleItem: boolean - }) => JSX.Element | null - extraSidebarButtons?: PermissiveComponentType - includeNavigationButtons?: boolean -} - -const ExtensionPoints: ExtensionPointsType = { - providers, - metacardInteractions, - customFilterInput: () => undefined, - customCanWritePermission: () => undefined, - customEditableAttributes: async () => undefined, - resultItemTitleAddOn: () => null, - resultTitleIconAddOn: () => null, - resultItemRowAddOn: () => null, - layoutDropdown: () => null, - customSourcesPage: null, - serializeLocation: () => null, - handleFilter: () => null, - suggester: () => null, - handleMetacardUpdate: null, - extraRoutes: () => null, - locationTypes: (baseTypes: InputsType) => baseTypes, - userInformation: () => null, - extraFooter: () => null, - extraHeader: () => null, - customMapBadge: () => undefined, - resultItemAction: ({ - selectionInterface: _selectionInterface, - lazyResult: _lazyResult, - itemContentRef: _containerRef, - }) => null, - attributeEditor: () => null, - customHistogramHover: undefined, - timelineItemAddOn: () => null, - extraSidebarButtons: () => null, - includeNavigationButtons: false, -} - -export default ExtensionPoints diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/index.tsx deleted file mode 100644 index 60cad4993d6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default, ExtensionPointsType } from './extension-points' -export { default as metacardInteractions } from './metacard-interactions' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/metacard-interactions/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/metacard-interactions/index.tsx deleted file mode 100644 index d0f2ac6eb96..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/metacard-interactions/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './metacard-interactions' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.tsx deleted file mode 100644 index 23f2b8ed9e4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/metacard-interactions/metacard-interactions.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import ExpandMetacard from '../../react-component/metacard-interactions/expand-interaction' -import DownloadProduct from '../../react-component/metacard-interactions/download-interaction' -import ExportActions from '../../react-component/metacard-interactions/export-interaction' -import OverwriteAction from '../../react-component/metacard-interactions/overwrite-interaction' -import ArchiveAction from '../../react-component/metacard-interactions/archive-interaction' - -const DefaultItems = [ - ExpandMetacard, - DownloadProduct, - ExportActions, - OverwriteAction, - ArchiveAction, -] - -export default DefaultItems diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/global-styles.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/global-styles.tsx deleted file mode 100644 index d3b54d572b1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/global-styles.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { createGlobalStyle } from 'styled-components' - -export const GlobalStyles = createGlobalStyle` - /* Only needed because we import 'bootstrap.less' in . */ - legend { - /* Unset all properties */ - all: unset; - - /* Place back material-ui styling */ - padding: 0 !important; - text-align: left !important; - transition: width 200ms cubic-bezier(0, 0, 0.2, 1) 0ms; - line-height: 11px !important; - } - - /* So we match Material */ - .navigation-item + .navigation-item { - margin-left: 10px; - } - .navigation-item:not(:last-of-type) { - border-radius: 25px; - } - - .inspector-content { - transform: none; - } - .MuiPickersModal-dialogRootWider { - min-width: 500px !important; - } - .MuiPickersBasePicker-pickerView { - max-width: none !important; - } - .MuiDialog-paperWidthSm { - max-width: none !important; - } - - .no-resource { - *[data-id='Overwrite'] { - display: none !important; - } - } - .federated { - *[data-id='Notes'] { - display: none !important; - } - } -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/index.tsx deleted file mode 100644 index a4e4092824e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default as providers, Props } from './providers.container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/providers.container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/providers.container.tsx deleted file mode 100644 index 2cb9ed6eca4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/extension-points/providers/providers.container.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' - -import ThemeContainer from '../../react-component/theme' -import { IntlProvider } from 'react-intl' -import { Provider as ThemeProvider } from '../../component/theme/theme' -import { SnackProvider } from '../../component/snack/snack.provider' -import { DialogProvider } from '../../component/dialog' -import { HashRouter as Router } from 'react-router-dom' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' - -export type Props = { - children: React.ReactNode -} - -const ProviderContainer = (props: Props) => { - const { getI18n } = useConfiguration() - return ( - - - - - - - - <>{props.children} - - - - - - - - ) -} - -export default hot(module)(ProviderContainer) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/handle-query-params.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/handle-query-params.tsx deleted file mode 100644 index b74829e7a20..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/handle-query-params.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -// some systems like keycloak attach query params which interfere with react router / golden layout and their use of query params (when using hash routing) -export function removeRedirectQueryParams() { - if (location.href.includes(`${location.pathname}?`)) { - const preHashStuff = location.href.split('?')[0] - location.href = preHashStuff + location.hash - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/index.tsx deleted file mode 100644 index 34238c0025b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/index.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// check browser before loading the rest of the app -import { isSupportedBrowser } from './check-browser' -//@ts-ignore -import { StartupDataStore } from './js/model/Startup/startup' -import { removeRedirectQueryParams } from './handle-query-params' -;(async () => { - // check if supported browser - if (isSupportedBrowser()) { - removeRedirectQueryParams() - // wait for critical data to be fetched - await (await import('./js/WaitForReady')).waitForReady() - await import('./app') - } -})() diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/AjaxSettings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/AjaxSettings.tsx deleted file mode 100644 index 82436e8fe93..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/AjaxSettings.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export const CommonAjaxSettings = { - cache: false, - headers: { - 'X-Requested-With': 'XMLHttpRequest', - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationHelpers.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationHelpers.ts deleted file mode 100644 index c40eb505938..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationHelpers.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* global define */ -import Backbone from 'backbone' -import 'backbone-associations' -// Backbone associations uses "." as its standard sub-object selecting within their framework. -// However since some of our json attribute names have "." characters in the name, this causes -// associations to do undesired sub-object querying when we do simple set operations on models -// model.set("my.attribute.name","foo"). If we ever want utilize this pathing, we need to use -// ">" instead so we don't conflicts with the pathing functionality. -// -// if someone wants to use the Backbone.Association sub-object selecting, they can do -// model.get('object>subObject>deeperSubObject'); -// -// This sub object selecting can be see at -// http://dhruvaray.github.io/backbone-associations/specify-associations.html#sa-getsetop -Backbone.Associations.setSeparator('>') diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationSetup.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationSetup.tsx deleted file mode 100644 index 89ebfa0bf2a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationSetup.tsx +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import 'focus-visible' -import 'cesium/Build/Cesium/Widgets/widgets.css' -import '@blueprintjs/core/lib/css/blueprint.css' -import '@blueprintjs/datetime/lib/css/blueprint-datetime.css' -import 'font-awesome/css/font-awesome.css' -import '../lib/cesium-drawhelper/DrawHelper.css' -import 'golden-layout/src/css/goldenlayout-base.css' -import 'golden-layout/src/css/goldenlayout-dark-theme.css' -import '../styles/fonts.css' -import '../styles/input-range.css' -import '../styles/additional-styles.css' -import '../styles/plotly.css' -import Backbone from 'backbone' -import './extensions/application.patches' -import '../component/singletons/session-auto-renew' -import $ from 'jquery' -import { StartupDataStore } from './model/Startup/startup' -if (process.env.NODE_ENV !== 'production') { - $('html').addClass('is-development') - if ((module as any)?.hot) { - import('react-hot-loader') - $('html').addClass('is-hot-reloading') - } -} -// @ts-ignore disable all react-beautiful-dnd development warnings (we have some spurious ones, but if you're working a component with this you can re-enable) -window['__react-beautiful-dnd-disable-dev-warnings'] = true -;(window as any).CESIUM_BASE_URL = './cesium/assets' -//in here we drop in any top level patches, etc. -const associationsSet = Backbone.AssociatedModel.prototype.set -// @ts-expect-error ts-migrate(2322) FIXME: Type '(key: any, value: any, options: any) => any'... Remove this comment to see the full error message -Backbone.AssociatedModel.prototype.set = function ( - key: any, - value: any, - options: any -) { - if (typeof key === 'object') { - options = value - } - if (options && options.withoutSet === true) { - return this - } - return associationsSet.apply(this, arguments) -} -$(window.document).ready(() => { - window.document.title = - StartupDataStore.Configuration.config?.customBranding + - ' ' + - StartupDataStore.Configuration.config?.product - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - window.document.querySelector('.welcome-branding').textContent = - StartupDataStore.Configuration.config?.customBranding - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - window.document.querySelector('.welcome-branding-name').textContent = - StartupDataStore.Configuration.config?.product - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - window.document.querySelector('#loading').classList.add('show-welcome') -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationStart.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationStart.tsx deleted file mode 100644 index 49cd8104d16..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ApplicationStart.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { createRoot } from 'react-dom/client' - -export const attemptToStart = async () => { - import('../component/app/base-app').then((BaseApp) => { - const root = createRoot(document.querySelector('#router') as any) - root.render() - }) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Autocomplete.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Autocomplete.ts deleted file mode 100644 index 0f14e9efbd2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Autocomplete.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -/*jshint latedef: nofunc*/ -/* - Chrome only lets us pull off this trick once per loaded iframe. So we need to detach and reattach it after every submit. - Luckily, we can put it on the load event, and keep the logic centralized here. -*/ - -import $ from 'jquery' - -function waitForInitialAttachLoad($iframe: any) { - $iframe.on('load', () => { - $iframe.off('load') - attachSubmitListener($iframe) - }) -} - -function attachSubmitListener($iframe: any) { - $iframe.on('load', () => { - $iframe.off('load') - $iframe.detach() - waitForInitialAttachLoad($iframe) - $('body').append($iframe) - }) -} - -let $iframe = $('iframe[name=autocomplete]') -attachSubmitListener($iframe) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CQLUtils.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CQLUtils.spec.ts deleted file mode 100644 index be870455fa6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CQLUtils.spec.ts +++ /dev/null @@ -1,555 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import chai from 'chai' - -const expect = chai.expect -import wkx from 'wkx' -import CQLUtils from './CQLUtils' - -const mockMetacardDefinitions = { - anyText: { - id: 'anyText', - type: 'STRING', - multivalued: false, - }, - anyGeo: { - id: 'anyGeo', - type: 'LOCATION', - multivalued: false, - }, - created: { - id: 'created', - type: 'DATE', - multivalued: false, - }, -} - -const mockMetacardDefinitionsObject = { - getAttributeMap: () => mockMetacardDefinitions, -} as any - -function assertCoordinateArray(actual: any, expected: any) { - expect(actual.length).equals(expected.length) - actual.forEach((point: any, i: any) => { - let expectedPoint = expected[i] - expect(point[0]).equals(expectedPoint[0]) - expect(point[1]).equals(expectedPoint[1]) - }) -} - -function assertMultiCoordinateArray(actual: any, expected: any) { - expect(actual.length).equals(expected.length) - actual.forEach((shape: any, i: any) => { - assertCoordinateArray(shape, expected[i]) - }) -} - -describe('CQL Utils', () => { - it('strips double quotes from property', () => { - const prop = CQLUtils.getProperty({ property: '"some property"' }) - expect(prop).to.equal('some property') - }) - - it('returns null if property is not a string', () => { - const prop = CQLUtils.getProperty({ property: {} }) - expect(prop).to.be.null - }) - - describe('filter to CQL and CQL to filter conversions', () => { - // it('transform filter to CQL', () => { - // const cql = CQLUtils.transformFilterToCQL({ - // type: 'INTERSECTS', - // property: 'anyGeo', - // value: 'POLYGON((1 2,3 4,5 6,1 2))', - // }) - // expect(cql).to.equal('(INTERSECTS("anyGeo", POLYGON((1 2,3 4,5 6,1 2))))') - // }) - // it('transform compound AND filter to CQL', () => { - // const cql = CQLUtils.transformFilterToCQL({ - // type: 'AND', - // filters: [ - // { - // type: 'INTERSECTS', - // property: 'anyGeo', - // value: 'LINESTRING((1 2,3 4))', - // }, - // { - // type: 'INTERSECTS', - // property: 'anyGeo', - // value: 'POLYGON((5 6,7 8,9 10,5 6))', - // }, - // ], - // }) - // expect(cql).to.equal( - // '((INTERSECTS("anyGeo", LINESTRING((1 2,3 4)))) AND (INTERSECTS("anyGeo", POLYGON((5 6,7 8,9 10,5 6)))))' - // ) - // }) - // it('transform CQL to filter', () => { - // const cql = CQLUtils.transformCQLToFilter( - // '(INTERSECTS(anyGeo, POLYGON((1 2,3 4,5 6,1 2))))' - // ) - // expect(cql).to.deep.equal({ - // type: 'INTERSECTS', - // property: 'anyGeo', - // value: { type: 'GEOMETRY', value: 'POLYGON((1 2,3 4,5 6,1 2))' }, - // }) - // }) - // it('transform compound AND CQL to filter', () => { - // const cql = CQLUtils.transformCQLToFilter( - // '((INTERSECTS(anyGeo, LINESTRING((1 2,3 4)))) AND (INTERSECTS(anyGeo, POLYGON((5 6,7 8,9 10,5 6)))))' - // ) - // expect(cql).to.deep.equal({ - // type: 'AND', - // filters: [ - // { - // type: 'INTERSECTS', - // property: 'anyGeo', - // value: { type: 'GEOMETRY', value: 'LINESTRING((1 2,3 4))' }, - // }, - // { - // type: 'INTERSECTS', - // property: 'anyGeo', - // value: { type: 'GEOMETRY', value: 'POLYGON((5 6,7 8,9 10,5 6))' }, - // }, - // ], - // }) - // }) - }) - - describe('transforms CQL', () => { - it('removes single quotes from POLYGON WKTs in CQL', () => { - const cql = CQLUtils.sanitizeGeometryCql( - "(INTERSECTS(anyGeo, 'POLYGON((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6))'))" - ) - expect(cql).to.equal( - '(INTERSECTS(anyGeo, POLYGON((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6))))' - ) - }) - - it('removes single quotes from MULTIPOLYGON WKTs in CQL', () => { - const cql = CQLUtils.sanitizeGeometryCql( - "(INTERSECTS(anyGeo, 'MULTIPOLYGON(((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6)))'))" - ) - expect(cql).to.equal( - '(INTERSECTS(anyGeo, MULTIPOLYGON(((-112.2 43.6,-102.1 48.3,-90.7 35.6,-112.2 43.6)))))' - ) - }) - - it('removes single quotes from POINT WKTs in CQL', () => { - const cql = CQLUtils.sanitizeGeometryCql( - "(DWITHIN(anyGeo, 'POINT(-110.4 30.4)', 100, meters))" - ) - expect(cql).to.equal('(DWITHIN(anyGeo, POINT(-110.4 30.4), 100, meters))') - }) - - it('removes single quotes from LINESTRING WKTs in CQL', () => { - const cql = CQLUtils.sanitizeGeometryCql( - "(DWITHIN(anyGeo, 'LINESTRING(-106.7 36.2,-87.5 46.5)', 1, meters))" - ) - expect(cql).to.equal( - '(DWITHIN(anyGeo, LINESTRING(-106.7 36.2,-87.5 46.5), 1, meters))' - ) - }) - - it('builds CQL for POINT location', () => { - const cql = CQLUtils.buildIntersectCQL(wkx.Geometry.parse('POINT(1 2)')) - expect(cql).to.equal('(DWITHIN(anyGeo, POINT(1 2), 1, meters))') - }) - - it('builds CQL for LINESTRING location', () => { - const cql = CQLUtils.buildIntersectCQL( - wkx.Geometry.parse('LINESTRING(1 2, 3 4)') - ) - expect(cql).to.equal('(DWITHIN(anyGeo, LINESTRING(1 2,3 4), 1, meters))') - }) - - it('builds CQL for POLYGON location', () => { - const cql = CQLUtils.buildIntersectCQL( - wkx.Geometry.parse('POLYGON((1 2, 3 4, 5 6, 1 2))') - ) - expect(cql).to.equal('(INTERSECTS(anyGeo, POLYGON((1 2,3 4,5 6,1 2))))') - }) - - it('builds CQL for MULTIPOINT location', () => { - const cql = CQLUtils.buildIntersectCQL( - wkx.Geometry.parse('MULTIPOINT((1 2), (3 4))') - ) - expect(cql).to.equal( - '(DWITHIN(anyGeo, POINT(1 2), 1, meters)) OR (DWITHIN(anyGeo, POINT(3 4), 1, meters))' - ) - }) - - it('builds CQL for MULTILINESTRING location', () => { - const cql = CQLUtils.buildIntersectCQL( - wkx.Geometry.parse('MULTILINESTRING((1 2, 3 4), (5 6, 7 8))') - ) - expect(cql).to.equal( - '(DWITHIN(anyGeo, LINESTRING(1 2,3 4), 1, meters)) OR (DWITHIN(anyGeo, LINESTRING(5 6,7 8), 1, meters))' - ) - }) - - it('builds CQL for MULTIPOLYGON location', () => { - const cql = CQLUtils.buildIntersectCQL( - wkx.Geometry.parse( - 'MULTIPOLYGON(((1 2, 3 4, 5 6, 1 2)), ((10 20, 30 40, 50 60, 10 20)))' - ) - ) - expect(cql).to.equal( - '(INTERSECTS(anyGeo, POLYGON((1 2,3 4,5 6,1 2)))) OR (INTERSECTS(anyGeo, POLYGON((10 20,30 40,50 60,10 20))))' - ) - }) - - it('builds CQL for GEOMETRYCOLLECTION location', () => { - const cql = CQLUtils.buildIntersectCQL( - wkx.Geometry.parse( - 'GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(1 2, 3 4))' - ) - ) - expect(cql).to.equal( - '(DWITHIN(anyGeo, POINT(1 2), 1, meters)) OR (DWITHIN(anyGeo, LINESTRING(1 2,3 4), 1, meters))' - ) - }) - }) - - describe('generates filters', () => { - it('generates filter with anyGeo property and LINE type', () => { - const filter = CQLUtils.generateFilter( - 'some type', - 'anyGeo', - { - type: 'LINE', - line: [ - [1, 1], - [2, 2], - ], - lineWidth: 5.0, - }, - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('DWITHIN') - expect(filter.property).equals('anyGeo') - expect(filter.value).equals('LINESTRING(1 1,2 2)') - expect(filter.distance).equals(5.0) - }) - - it('generates filter with anyGeo property and POLYGON type', () => { - const filter = CQLUtils.generateFilter( - 'some type', - 'anyGeo', - { - type: 'POLYGON', - polygon: [ - [1, 1], - [2, 2], - [1, 1], - ], - }, - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('INTERSECTS') - expect(filter.property).equals('anyGeo') - expect(filter.value).equals('POLYGON((1 1,2 2,1 1))') - }) - - it('generates filter with anyGeo property and MULTIPOLYGON type', () => { - const filter = CQLUtils.generateFilter( - 'some type', - 'anyGeo', - { - type: 'MULTIPOLYGON', - polygon: [ - [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ], - [ - [8.0, 55.0], - [9.0, 54.0], - [9.0, 55.0], - [8.0, 55.0], - ], - ], - }, - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('INTERSECTS') - expect(filter.property).equals('anyGeo') - expect(filter.value).equals( - 'MULTIPOLYGON(((3 50,4 49,4 50,3 50)),((8 55,9 54,9 55,8 55)))' - ) - }) - - it('generates filter with anyGeo property and BBOX type (dd)', () => { - const filter = CQLUtils.generateFilter( - 'some type', - 'anyGeo', - { - type: 'BBOX', - locationType: 'dd', - west: -97, - south: 41, - east: -90, - north: 46, - }, - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('INTERSECTS') - expect(filter.property).equals('anyGeo') - expect(filter.value).equals( - 'POLYGON((-97 41,-97 46,-90 46,-90 41,-97 41))' - ) - }) - - it('generates filter with anyGeo property and BBOX type (usng)', () => { - const filter = CQLUtils.generateFilter( - 'some type', - 'anyGeo', - { - type: 'BBOX', - locationType: 'usng', - mapWest: -97, - mapSouth: 41, - mapEast: -90, - mapNorth: 46, - }, - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('INTERSECTS') - expect(filter.property).equals('anyGeo') - expect(filter.value).equals( - 'POLYGON((-97 41,-97 46,-90 46,-90 41,-97 41))' - ) - }) - - it('generates filter with anyGeo property and POINTRADIUS type', () => { - const filter = CQLUtils.generateFilter( - 'some type', - 'anyGeo', - { type: 'POINTRADIUS', lon: 2, lat: 3, radius: 10 }, - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('DWITHIN') - expect(filter.property).equals('anyGeo') - expect(filter.value).equals('POINT(2 3)') - expect(filter.distance).equals(10) - }) - - it('generates filter with anyText property', () => { - const filter = CQLUtils.generateFilter( - 'some type', - 'anyText', - 'some value', - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('some type') - expect(filter.property).equals('anyText') - expect(filter.value).equals('some value') - }) - - it('generates filter for filter function', () => { - const filter = CQLUtils.generateFilterForFilterFunction( - 'myFunc', - { param1: 'val1' }, - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 3. - mockMetacardDefinitions - ) - expect(filter.type).equals('=') - expect(filter.value).to.be.true - expect(filter.property).to.deep.equal({ - type: 'FILTER_FUNCTION', - filterFunctionName: 'myFunc', - params: { param1: 'val1' }, - }) - }) - - it('generates DURING filter with temporal property', () => { - const filter = CQLUtils.generateFilter( - 'DURING', - 'created', - '2018-11-01T19:00:00.000Z/2018-11-30T19:00:00.000Z', - mockMetacardDefinitionsObject - ) - expect(filter.type).equals('DURING') - expect(filter.value).equals( - '2018-11-01T19:00:00.000Z/2018-11-30T19:00:00.000Z' - ) - expect(filter.from).equals('2018-11-01T19:00:00.000Z') - expect(filter.to).equals('2018-11-30T19:00:00.000Z') - }) - }) - - describe('checks filter types', () => { - it('DWITHIN is a geo filter', () => { - const isGeoFilter = CQLUtils.isGeoFilter('DWITHIN') - expect(isGeoFilter).to.be.true - }) - - it('INTERSECTS is a geo filter', () => { - const isGeoFilter = CQLUtils.isGeoFilter('INTERSECTS') - expect(isGeoFilter).to.be.true - }) - - it('AFTER is not a geo filter', () => { - const isGeoFilter = CQLUtils.isGeoFilter('AFTER') - expect(isGeoFilter).to.be.false - }) - - it('filter with a POINT is a point radius', () => { - const isPointRadiusFilter = CQLUtils.isPointRadiusFilter({ - value: 'POINT(1 1)', - }) - expect(isPointRadiusFilter).to.be.true - }) - - it('filter with a POINT is not a polygon', () => { - const isPolygonFilter = CQLUtils.isPolygonFilter({ - value: 'POINT(1 1)', - }) - expect(isPolygonFilter).to.be.false - }) - - it('filter with a POLYGON is a polygon', () => { - const isPolygonFilter = CQLUtils.isPolygonFilter({ - value: 'POLYGON((3 50, 4 49, 4 50, 3 50))', - }) - expect(isPolygonFilter).to.be.true - }) - - it('filter with a POLYGON is not a point radius', () => { - const isPointRadiusFilter = CQLUtils.isPointRadiusFilter({ - value: 'POLYGON((3 50, 4 49, 4 50, 3 50))', - }) - expect(isPointRadiusFilter).to.be.false - }) - }) - - describe('parses WKTs into arrays', () => { - it('correctly parses a POLYGON into an array', () => { - const polygon = CQLUtils.arrayFromPolygonWkt( - 'POLYGON((3 50, 4 49, 4 50, 3 50))' - ) - assertCoordinateArray(polygon, [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ]) - }) - - it('correctly parses a MULTIPOLYGON with one POLYGON into an array', () => { - const multipolygon = CQLUtils.arrayFromPolygonWkt( - 'MULTIPOLYGON(((3 50, 4 49, 4 50, 3 50)))' - ) - assertMultiCoordinateArray(multipolygon, [ - [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ], - ]) - }) - - it('correctly parses a MULTIPOLYGON with multiple POLYGONs into an array', () => { - const multipolygon = CQLUtils.arrayFromPolygonWkt( - 'MULTIPOLYGON(((3 50, 4 49, 4 50, 3 50)), ((8 55, 9 54, 9 55, 8 55)))' - ) - assertMultiCoordinateArray(multipolygon, [ - [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ], - [ - [8.0, 55.0], - [9.0, 54.0], - [9.0, 55.0], - [8.0, 55.0], - ], - ]) - }) - - it('correctly parses a LINESTRING into an array', () => { - const linestring = CQLUtils.arrayFromLinestringWkt( - 'LINESTRING(3 50, 4 49, 4 50, 3 50)' - ) - assertCoordinateArray(linestring, [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ]) - }) - - it('correctly parses a MULTILINESTRING with one LINESTRING into an array', () => { - const multilinestring = CQLUtils.arrayFromMultilinestringWkt( - 'MULTILINESTRING((3 50, 4 49, 4 50, 3 50))' - ) - assertMultiCoordinateArray(multilinestring, [ - [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ], - ]) - }) - - it('correctly parses a MULTILINESTRING with multiple LINESTRINGs into an array', () => { - const multilinestring = CQLUtils.arrayFromMultilinestringWkt( - 'MULTILINESTRING((3 50, 4 49, 4 50, 3 50), (8 55, 9 54, 9 55, 8 55))' - ) - assertMultiCoordinateArray(multilinestring, [ - [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ], - [ - [8.0, 55.0], - [9.0, 54.0], - [9.0, 55.0], - [8.0, 55.0], - ], - ]) - }) - - it('correctly parses a POINT into an array', () => { - const point = CQLUtils.arrayFromPointWkt('POINT(3 50)') - assertCoordinateArray(point, [[3.0, 50.0]]) - }) - - it('correctly parses a MULTIPOINT with one POINT into an array', () => { - const multipoint = CQLUtils.arrayFromPointWkt('MULTIPOINT(3 50)') - assertCoordinateArray(multipoint, [[3.0, 50.0]]) - }) - - it('correctly parses a MULTIPOINT with multiple POINTs into an array', () => { - const multipoint = CQLUtils.arrayFromPointWkt( - 'MULTIPOINT(3 50, 4 49, 4 50, 3 50)' - ) - assertCoordinateArray(multipoint, [ - [3.0, 50.0], - [4.0, 49.0], - [4.0, 50.0], - [3.0, 50.0], - ]) - }) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CQLUtils.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CQLUtils.ts deleted file mode 100644 index 8b11c9d0934..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CQLUtils.ts +++ /dev/null @@ -1,393 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/*jshint bitwise: false*/ -import $ from 'jquery' -import DistanceUtils from './DistanceUtils' -import { StartupData, StartupDataStore } from './model/Startup/startup' -function sanitizeForCql(text: any) { - return text - .split('[') - .join('(') - .split(']') - .join(')') - .split("'") - .join('') - .split('"') - .join('') -} -function lineToCQLLine(model: any) { - const cqlLINE = model.map((point: any) => point[0] + ' ' + point[1]) - return cqlLINE -} -function polygonToCQLPolygon(model: any) { - const cqlPolygon = model.map((point: any) => point[0] + ' ' + point[1]) - if (cqlPolygon[0] !== cqlPolygon[cqlPolygon.length - 1]) { - cqlPolygon.push(cqlPolygon[0]) - } - return [cqlPolygon] -} -function polygonToCQLMultiPolygon(model: any) { - return model.map((polygon: any) => polygonToCQLPolygon(polygon)) -} -function bboxToCQLPolygon(model: any) { - if (model.locationType === 'usng') { - return [ - model.mapWest + ' ' + model.mapSouth, - model.mapWest + ' ' + model.mapNorth, - model.mapEast + ' ' + model.mapNorth, - model.mapEast + ' ' + model.mapSouth, - model.mapWest + ' ' + model.mapSouth, - ] - } else { - return [ - model.west + ' ' + model.south, - model.west + ' ' + model.north, - model.east + ' ' + model.north, - model.east + ' ' + model.south, - model.west + ' ' + model.south, - ] - } -} -function generateAnyGeoFilter(property: any, model: any) { - if (model === null) { - return { - type: 'IS NULL', - property, - value: null, - } - } - const defaultGeoFilter = { - type: 'INTERSECTS', - property, - value: '', - } - switch (model.type) { - case 'LINE': - if (!Array.isArray(model.line)) { - return defaultGeoFilter - } - return { - type: model.lineWidth > 0 ? 'DWITHIN' : 'INTERSECTS', - property, - value: - 'LINESTRING' + - sanitizeForCql(JSON.stringify(lineToCQLLine(model.line))), - distance: DistanceUtils.getDistanceInMeters( - model.lineWidth, - model.lineUnits - ), - } - case 'POLYGON': - if (!Array.isArray(model.polygon)) { - return defaultGeoFilter - } - return { - type: model.polygonBufferWidth > 0 ? 'DWITHIN' : 'INTERSECTS', - property, - value: `POLYGON${sanitizeForCql( - JSON.stringify(polygonToCQLPolygon(model.polygon)) - )}`, - ...(model.polygonBufferWidth && { - distance: DistanceUtils.getDistanceInMeters( - model.polygonBufferWidth, - model.polygonBufferUnits - ), - }), - } - case 'MULTIPOLYGON': - if (!Array.isArray(model.polygon)) { - return defaultGeoFilter - } - const poly = - 'MULTIPOLYGON' + - sanitizeForCql(JSON.stringify(polygonToCQLMultiPolygon(model.polygon))) - return { - type: model.polygonBufferWidth > 0 ? 'DWITHIN' : 'INTERSECTS', - property, - value: poly, - ...(model.polygonBufferWidth && { - distance: DistanceUtils.getDistanceInMeters( - model.polygonBufferWidth, - model.polygonBufferUnits - ), - }), - } - case 'BBOX': - return { - type: 'INTERSECTS', - property, - value: - 'POLYGON(' + - sanitizeForCql(JSON.stringify(bboxToCQLPolygon(model))) + - ')', - } - case 'POINT': - case 'POINTRADIUS': - return { - type: 'DWITHIN', - property, - value: 'POINT(' + model.lon + ' ' + model.lat + ')', - distance: DistanceUtils.getDistanceInMeters( - model.radius, - model.radiusUnits - ), - } - default: - return defaultGeoFilter - } -} -function buildIntersectOrCQL(this: any, shapes: any) { - let locationFilter = '' - $.each(shapes, (i, shape) => { - locationFilter += this.buildIntersectCQL(shape) - if (i !== shapes.length - 1) { - locationFilter += ' OR ' - } - }) - return locationFilter -} -function arrayFromPartialWkt(partialWkt: any) { - let result = partialWkt - if (partialWkt.startsWith('((')) { - // remove the leading and trailing parentheses - result = partialWkt.replace(/^\(/, '').replace(/\)$/, '') - } - // change parentheses to array brackets - result = result.replace(/\(/g, '[').replace(/\)/g, ']') - // change each space-separated coordinate pair to a two-element array - // eslint-disable-next-line no-useless-escape - result = result.replace(/([^,\[\]]+)\s+([^,\[\]]+)/g, '[$1,$2]') - // build nested arrays from the string - return JSON.parse(result) -} -function sanitizeGeometryCql(cqlString: any) { - //sanitize polygons - let polygons = cqlString.match( - /'POLYGON\(\((-?[0-9]*.?[0-9]* -?[0-9]*.?[0-9]*,?)*\)\)'/g - ) - if (polygons) { - polygons.forEach((polygon: any) => { - cqlString = cqlString.replace(polygon, polygon.replace(/'/g, '')) - }) - } - //sanitize multipolygons - let multipolygons = cqlString.match(/'MULTIPOLYGON\(\(\(.*\)\)\)'/g) - if (multipolygons) { - multipolygons.forEach((multipolygon: any) => { - cqlString = cqlString.replace( - multipolygon, - multipolygon.replace(/'/g, '') - ) - }) - } - //sanitize points - let points = cqlString.match(/'POINT\(-?[0-9]*.?[0-9]* -?[0-9]*.?[0-9]*\)'/g) - if (points) { - points.forEach((point: any) => { - cqlString = cqlString.replace(point, point.replace(/'/g, '')) - }) - } - //sanitize linestrings - let linestrings = cqlString.match( - /'LINESTRING\((-?[0-9]*.?[0-9]* -?[0-9]*.?[0-9]*.?)*\)'/g - ) - if (linestrings) { - linestrings.forEach((linestring: any) => { - cqlString = cqlString.replace(linestring, linestring.replace(/'/g, '')) - }) - } - return cqlString -} -function getProperty(filter: any) { - if (typeof filter.property !== 'string') { - return null - } - return filter.property.split('"').join('') -} -function generateIsEmptyFilter(property: any) { - return { - type: 'IS NULL', - property, - value: null, - } -} -function generateFilter( - type: any, - property: string, - value: any, - metacardDefinitions?: StartupData['MetacardDefinitions'] -) { - if (!metacardDefinitions) { - metacardDefinitions = StartupDataStore.MetacardDefinitions - } - if (metacardDefinitions.getAttributeMap()[property] === undefined) { - return null - } - switch (metacardDefinitions.getAttributeMap()[property].type) { - case 'LOCATION': - case 'GEOMETRY': - return generateAnyGeoFilter(property, value) - default: - const filter = { - type, - property, - value, - } - if (type === 'DURING') { - const dates = value.split('/') - ;(filter as any).from = dates[0] - ;(filter as any).to = dates[1] - } - if (type === 'BETWEEN') { - ;(filter as any).lowerBoundary = value.lower - ;(filter as any).upperBoundary = value.upper - } - return filter - } -} -function generateFilterForFilterFunction(filterFunctionName: any, params: any) { - return { - type: '=', - value: true, - property: { - type: 'FILTER_FUNCTION', - filterFunctionName, - params, - }, - } -} -function isGeoFilter(type: any) { - return type === 'DWITHIN' || type === 'INTERSECTS' -} -// function transformFilterToCQL(filter) { -// // todo: see if we need the extra surrounding parens -// return this.sanitizeGeometryCql('(' + cql.write(filter) + ')') -// } -// function transformCQLToFilter(cqlString) { -// return cql.simplify(cql.read(cqlString)) -// } -const isPolygonFilter = (filter: any) => { - return geometryFilterContainsString(filter, 'POLYGON') -} -const isLineFilter = (filter: any) => { - return geometryFilterContainsString(filter, 'LINESTRING') -} -function isPointRadiusFilter(filter: any) { - return geometryFilterContainsString(filter, 'POINT') -} -function geometryFilterContainsString(filter: any, filterSearchString: any) { - return filter.value && filter.value.indexOf(filterSearchString) >= 0 -} -function buildIntersectCQL(this: any, locationGeometry: any) { - let locationFilter = '' - let locationWkt = locationGeometry.toWkt() - const locationType = locationGeometry.toGeoJSON().type.toUpperCase() - let shapes - switch (locationType) { - case 'POINT': - case 'LINESTRING': - locationFilter = '(DWITHIN(anyGeo, ' + locationWkt + ', 1, meters))' - break - case 'POLYGON': - // Test if the shape wkt contains ,( - if (/,\(/.test(locationWkt)) { - shapes = locationWkt.split(',(') - $.each(shapes, (i, polygon) => { - locationWkt = polygon.replace(/POLYGON|[()]/g, '') - locationWkt = 'POLYGON((' + locationWkt + '))' - locationFilter += '(INTERSECTS(anyGeo, ' + locationWkt + '))' - if (i !== shapes.length - 1) { - locationFilter += ' OR ' - } - }) - } else { - locationFilter = '(INTERSECTS(anyGeo, ' + locationWkt + '))' - } - break - case 'MULTIPOINT': - shapes = locationGeometry.points - locationFilter = buildIntersectOrCQL.call(this, shapes) - break - case 'MULTIPOLYGON': - shapes = locationGeometry.polygons - locationFilter = buildIntersectOrCQL.call(this, shapes) - break - case 'MULTILINESTRING': - shapes = locationGeometry.lineStrings - locationFilter = buildIntersectOrCQL.call(this, shapes) - break - case 'GEOMETRYCOLLECTION': - shapes = locationGeometry.geometries - locationFilter = buildIntersectOrCQL.call(this, shapes) - break - default: - console.error('unknown location type') - return - } - return locationFilter -} -function arrayFromPolygonWkt(wkt: any) { - // Handle POLYGON with no internal rings (i.e. holes) - if (wkt.startsWith('POLYGON')) { - const polygon = wkt.match(/\(\([^()]+\)\)/g) - return polygon.length === 1 ? arrayFromPartialWkt(polygon[0]) : [] - } - // Handle MULTIPOLYGON with no internal rings (i.e. holes) - const polygons = wkt.match(/\(\([^()]+\)\)/g) - if (polygons) { - return polygons.map((polygon: any) => arrayFromPartialWkt(polygon)) - } - return [] -} -const arrayFromLinestringWkt = (wkt: string): Array<[number, number]> => { - const lines = wkt.match(/\([^()]+\)/g) - if (lines && lines.length > 0) { - return arrayFromPartialWkt(lines[0]) - } - return [] -} -const arrayFromMultilinestringWkt = ( - wkt: string -): Array> => { - const lines = wkt.match(/\([^()]+\)/g) - if (lines && lines.length > 0) { - return lines.map((line) => arrayFromPartialWkt(line)) - } - return [] -} -const arrayFromPointWkt = (wkt: string): Array<[number, number]> => { - const points = wkt.match(/\([^()]+\)/g) - if (points && points.length > 0) { - return arrayFromPartialWkt(points[0]) - } - return [] -} -export default { - sanitizeGeometryCql, - getProperty, - generateIsEmptyFilter, - generateAnyGeoFilter, - generateFilter, - generateFilterForFilterFunction, - isGeoFilter, - isPolygonFilter, - isLineFilter, - isPointRadiusFilter, - buildIntersectCQL, - arrayFromPolygonWkt, - arrayFromLinestringWkt, - arrayFromMultilinestringWkt, - arrayFromPointWkt, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CacheSourceSelector.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CacheSourceSelector.ts deleted file mode 100644 index 0293057c2c8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/CacheSourceSelector.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import cql from './cql' -import CQLUtils from './CQLUtils' -function buildCacheSourcesCql(sources: any) { - return { - type: 'OR', - filters: sources - .filter((source: any) => source !== 'cache') - .map((source: any) => ({ - property: '"metacard_source"', - type: '=', - value: source, - })), - } -} - -function limitCacheSources(cql: any, sources: any) { - return { - type: 'AND', - filters: [cql, buildCacheSourcesCql(sources)], - } -} - -export default { - trimCacheSources(cqlString: any, sources: any) { - return CQLUtils.sanitizeGeometryCql( - '(' + - cql.write( - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ type: string; filters: any[]; ... Remove this comment to see the full error message - limitCacheSources(cql.simplify(cql.read(cqlString)), sources) - ) + - ')' - ) - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Common.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Common.spec.ts deleted file mode 100644 index 4615523a2c1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Common.spec.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -import Common from './Common' - -describe('Common', () => { - describe('wrapMapCoordinates', () => { - it('overflow +1/-1', () => { - expect(Common.wrapMapCoordinates(181, [-180, 180])).to.equal(-179) - expect(Common.wrapMapCoordinates(-181, [-180, 180])).to.equal(179) - }) - it('overflow +/-a lot', () => { - expect(Common.wrapMapCoordinates(64.25 + 180 * 7, [-180, 180])).to.equal( - -180 + 64.25 - ) - expect(Common.wrapMapCoordinates(-64.25 - 180 * 7, [-180, 180])).to.equal( - 180 - 64.25 - ) - }) - it('no overflow mid', () => { - expect(Common.wrapMapCoordinates(-179, [-180, 180])).to.equal(-179) - expect(Common.wrapMapCoordinates(179, [-180, 180])).to.equal(179) - expect(Common.wrapMapCoordinates(0, [-180, 180])).to.equal(0) - expect(Common.wrapMapCoordinates(5, [-180, 180])).to.equal(5) - expect(Common.wrapMapCoordinates(-15, [-180, 180])).to.equal(-15) - }) - it('max should map to min', () => { - expect(Common.wrapMapCoordinates(180, [-180, 180])).to.equal(-180) - }) - it('min should remain min', () => { - expect(Common.wrapMapCoordinates(-180, [-180, 180])).to.equal(-180) - }) - }) - describe('wrapMapCoordinatesArray', () => { - it('wraps as expected', () => { - const coordinates = [ - [-181, -91], - [181, 91], - [0, 0], - ] - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number[][]' is not assignable to... Remove this comment to see the full error message - const results = Common.wrapMapCoordinatesArray(coordinates) - expect(results[0][0]).to.equal(179) - expect(results[0][1]).to.equal(89) - expect(results[1][0]).to.equal(-179) - expect(results[1][1]).to.equal(-89) - expect(results[2][0]).to.equal(0) - expect(results[2][1]).to.equal(0) - expect(results.length).to.equal(3) - }) - }) - describe('getImageSrc', () => { - it('prepends data:image to null', () => { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'null' is not assignable to param... Remove this comment to see the full error message - const image = Common.getImageSrc(null) - expect(image).to.equal('data:image/png;base64,null') - }) - it('prepends data:image to undefined', () => { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'undefined' is not assignable to ... Remove this comment to see the full error message - const image = Common.getImageSrc(undefined) - expect(image).to.equal('data:image/png;base64,undefined') - }) - it('prepends data:image to non-empty and non-http string', () => { - const image = Common.getImageSrc('iVBORw0KGgoAAAANSUhEUgAABkAAAAH') - expect(image).to.equal( - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABkAAAAH' - ) - }) - it('prepends data:image to non-string value', () => { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'number' is not assignable to par... Remove this comment to see the full error message - const image = Common.getImageSrc(123456789) - expect(image).to.equal('data:image/png;base64,123456789') - }) - it('returns url with cache bust', () => { - const image = Common.getImageSrc('http://some.url/cx.png') - expect(image.includes('?_=')).to.equal(true) - }) - it('returns empty string unchanged', () => { - const image = Common.getImageSrc('') - expect(image).to.equal('') - }) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Common.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Common.tsx deleted file mode 100644 index 066b9f445e5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Common.tsx +++ /dev/null @@ -1,271 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/*jshint bitwise: false*/ -import $ from 'jquery' -import moment from 'moment' -import './requestAnimationFramePolyfill' -import { TimePrecision } from '@blueprintjs/datetime' -import { cacheBustUrl } from './cache-bust-url' -const timeZones = { - UTC: 'Etc/UTC', - '-12': 'Etc/GMT+12', - '-11': 'Etc/GMT+11', - '-10': 'Etc/GMT+10', - '-9': 'Etc/GMT+9', - '-8': 'Etc/GMT+8', - '-7': 'Etc/GMT+7', - '-6': 'Etc/GMT+6', - '-5': 'Etc/GMT+5', - '-4': 'Etc/GMT+4', - '-3': 'Etc/GMT+3', - '-2': 'Etc/GMT+2', - '-1': 'Etc/GMT+1', - 1: 'Etc/GMT-1', - 2: 'Etc/GMT-2', - 3: 'Etc/GMT-3', - 4: 'Etc/GMT-4', - 5: 'Etc/GMT-5', - 6: 'Etc/GMT-6', - 7: 'Etc/GMT-7', - 8: 'Etc/GMT-8', - 9: 'Etc/GMT-9', - 10: 'Etc/GMT-10', - 11: 'Etc/GMT-11', - 12: 'Etc/GMT-12', -} -const dateTimeFormats = { - ISO: { - millisecond: { - datetimefmt: 'YYYY-MM-DD[T]HH:mm:ss.SSSZ', - timefmt: 'HH:mm:ssZ', - }, - second: { datetimefmt: 'YYYY-MM-DD[T]HH:mm:ssZ', timefmt: 'HH:mm:ssZ' }, - minute: { datetimefmt: 'YYYY-MM-DD[T]HH:mmZ', timefmt: 'HH:mmZ' }, - }, - '24': { - millisecond: { - datetimefmt: 'DD MMM YYYY HH:mm:ss.SSS Z', - timefmt: 'HH:mm:ss Z', - }, - second: { - datetimefmt: 'DD MMM YYYY HH:mm:ss Z', - timefmt: 'HH:mm:ss Z', - }, - minute: { - datetimefmt: 'DD MMM YYYY HH:mm Z', - timefmt: 'HH:mm Z', - }, - }, - '12': { - millisecond: { - datetimefmt: 'DD MMM YYYY hh:mm:ss.SSS a Z', - timefmt: 'hh:mm:ss a Z', - }, - second: { - datetimefmt: 'DD MMM YYYY hh:mm:ss a Z', - timefmt: 'hh:mm:ss a Z', - }, - minute: { - datetimefmt: 'DD MMM YYYY hh:mm a Z', - timefmt: 'hh:mm a Z', - }, - }, -} as { - [key: string]: { - [key in keyof TimePrecision as TimePrecision]: { - datetimefmt: string - timefmt: string - } - } -} -const dateTimeFormatsReverseMap = Object.entries(dateTimeFormats).reduce( - (map, val) => { - const format = val[0] - for (const [precision, formats] of Object.entries(val[1])) { - map[formats.datetimefmt] = { - format, - precision: precision as TimePrecision, - } - } - return map - }, - {} as { [key: string]: { format: string; precision: TimePrecision } } -) -const timeFormatsReverseMap = Object.entries(dateTimeFormats).reduce( - (map, val) => { - const format = val[0] - for (const [precision, formats] of Object.entries(val[1])) { - map[formats.timefmt] = { format, precision: precision as TimePrecision } - } - return map - }, - {} as { [key: string]: { format: string; precision: TimePrecision } } -) -export const Common = { - //randomly generated guid guaranteed to be unique ;) - undefined: '2686dcb5-7578-4957-974d-aaa9289cd2f0', - coreTransitionTime: 250, - cqlToHumanReadable(cql?: string) { - if (cql === undefined) { - return cql - } - cql = cql.replace(new RegExp('anyText ILIKE ', 'g'), '~') - cql = cql.replace(new RegExp('anyText LIKE ', 'g'), '') - cql = cql.replace(new RegExp('AFTER', 'g'), '>') - cql = cql.replace(new RegExp('DURING', 'g'), 'BETWEEN') - return cql - }, - getFileSize(item?: string) { - if (item === undefined || item === null) { - return 'Unknown Size' - } - const givenProductSize = item?.replace(/[,]+/g, '').trim() || '' - //remove any commas and trailing whitespace - const bytes = parseInt(givenProductSize, 10) - const noUnitsGiven = /[0-9]$/ - //number without a word following - const reformattedProductSize = givenProductSize.replace(/\s\s+/g, ' ') - //remove extra whitespaces - const finalFormatProductSize = reformattedProductSize.replace( - /([0-9])([a-zA-Z])/g, - '$1 $2' - ) - //make sure there is exactly one space between number and unit - const sizeArray = finalFormatProductSize.split(' ') - //splits size into number and unit - if (isNaN(bytes)) { - return 'Unknown Size' - } - if (noUnitsGiven.test(givenProductSize)) { - //need to parse number given and add units, number is assumed to be bytes - let size, - index, - type = ['bytes', 'KB', 'MB', 'GB', 'TB'] - if (bytes === 0) { - return '0 bytes' - } else { - index = Math.floor(Math.log(bytes) / Math.log(1024)) - if (index > 4) { - index = 4 - } - size = (bytes / Math.pow(1024, index)).toFixed(index < 2 ? 0 : 1) - } - return size + ' ' + type[index] - } else { - //units were included with size - switch (sizeArray[1].toLowerCase()) { - case 'bytes': - return sizeArray[0] + ' bytes' - case 'b': - return sizeArray[0] + ' bytes' - case 'kb': - return sizeArray[0] + ' KB' - case 'kilobytes': - return sizeArray[0] + ' KB' - case 'kbytes': - return sizeArray[0] + ' KB' - case 'mb': - return sizeArray[0] + ' MB' - case 'megabytes': - return sizeArray[0] + ' MB' - case 'mbytes': - return sizeArray[0] + ' MB' - case 'gb': - return sizeArray[0] + ' GB' - case 'gigabytes': - return sizeArray[0] + ' GB' - case 'gbytes': - return sizeArray[0] + ' GB' - case 'tb': - return sizeArray[0] + ' TB' - case 'terabytes': - return sizeArray[0] + ' TB' - case 'tbytes': - return sizeArray[0] + ' TB' - default: - return 'Unknown Size' - } - } - }, - //can be deleted once histogram changes are merged - getHumanReadableDateTime(date: string) { - return moment(date).format(dateTimeFormats['24']['second']['datetimefmt']) - }, - getDateTimeFormats() { - return dateTimeFormats - }, - getDateTimeFormatsReverseMap() { - return dateTimeFormatsReverseMap - }, - getTimeFormatsReverseMap() { - return timeFormatsReverseMap - }, - getTimeZones() { - return timeZones - }, - getRelativeDate(date: string) { - return `${moment(date).fromNow()}` - }, - getImageSrc(img: string) { - if ( - typeof img === 'string' && - (img === '' || img.substring(0, 4) === 'http') - ) - return cacheBustUrl(img) - if (typeof img === 'string' && img.startsWith('data:image/png;base64,')) - return img - return 'data:image/png;base64,' + img - }, - getResourceUrlFromThumbUrl(url: string) { - return url.replace(/=thumbnail[_=&\d\w\s;]+/, '=resource') - }, - cancelRepaintForTimeframe(requestDetails: any) { - if (requestDetails) { - window.cancelAnimationFrame(requestDetails.requestId) - } - }, - repaintForTimeframe(time: any, callback: any) { - const requestDetails = { - requestId: undefined, - } as any - const timeEnd = Date.now() + time - const repaint = function () { - callback() - if (Date.now() < timeEnd) { - requestDetails.requestId = window.requestAnimationFrame(() => { - repaint() - }) - } - } - requestDetails.requestId = window.requestAnimationFrame(() => { - repaint() - }) - return requestDetails - }, - escapeHTML(value: string) { - return $('
    ').text(value).html() - }, - wrapMapCoordinates(x: number, [min, max]: [number, number]) { - const d = max - min - return ((((x - min) % d) + d) % d) + min - }, - wrapMapCoordinatesArray(coordinates: Array<[number, number]>) { - return coordinates.map(([lon, lat]) => [ - this.wrapMapCoordinates(lon, [-180, 180]), - this.wrapMapCoordinates(lat, [-90, 90]), - ]) - }, -} -export default Common diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/DistanceUtils.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/DistanceUtils.tsx deleted file mode 100644 index 8df465ad80a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/DistanceUtils.tsx +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -/*jshint bitwise: false*/ - -const EARTH_MEAN_RADIUS_METERS = 6371008.7714 - -const DEGREES_TO_RADIANS = Math.PI / 180 -const RADIANS_TO_DEGREES = 1 / DEGREES_TO_RADIANS - -const METERS_KILOMETERS = 1000 -const METERS_FEET = 0.3048 -const METERS_YARDS = 0.9144 -const METERS_MILES = 1609.344 -const METERS_NAUTICAL_MILES = 1852 - -/* 6 Digits of precision used because it gives precision up to -0.11 meters, which was deemed precise enough for any use case -of application */ -const DECIMAL_PRECISION = 6 - -type UnitsType = - | 'kilometers' - | 'feet' - | 'yards' - | 'miles' - | 'nautical miles' - | 'meters' - -export const DistanceUtils = { - distToDegrees(distanceInMeters: number) { - return this.toDegrees(this.distToRadians(distanceInMeters)) - }, - distToRadians(distanceInMeters: number) { - return distanceInMeters / EARTH_MEAN_RADIUS_METERS - }, - toDegrees(distanceInRadians: number) { - return distanceInRadians * RADIANS_TO_DEGREES - }, - getDistanceInMeters(distance: number, units: UnitsType) { - distance = distance || 0 - switch (units) { - case 'kilometers': - return distance * METERS_KILOMETERS - case 'feet': - return distance * METERS_FEET - case 'yards': - return distance * METERS_YARDS - case 'miles': - return distance * METERS_MILES - case 'nautical miles': - return distance * METERS_NAUTICAL_MILES - case 'meters': - default: - return Number(distance) - } - }, - getDistanceFromMeters(distance: number, units: UnitsType) { - distance = distance || 0 - switch (units) { - case 'kilometers': - return distance / METERS_KILOMETERS - case 'feet': - return distance / METERS_FEET - case 'yards': - return distance / METERS_YARDS - case 'miles': - return distance / METERS_MILES - case 'nautical miles': - return distance / METERS_NAUTICAL_MILES - case 'meters': - default: - return distance - } - }, - altitudeRound(value: number) { - // round the value, don't need picometer precision. - return Math.round(value) - }, - coordinateRound(value: string | number) { - return parseFloat(parseFloat(value.toString()).toFixed(DECIMAL_PRECISION)) - }, -} - -export default DistanceUtils diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Entry.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Entry.tsx deleted file mode 100644 index 8ae710fd158..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Entry.tsx +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/** - * ApplicationSetup needs to happen first. - * This ensures styles are applied correctly, - * because some of our styles have the same specificity as vendor - * styles. - */ -;(function verifyFirstImport() { - if (document.querySelector('[data-styled-components]')) { - const firstImportErrorMessage = `The entry import has to be the first (top) import for your application, otherwise styles won't be applied properly. - If you're seeing this, it probably means you need to move your import of the Entry file to the top of whatever file it's in. - ` - alert(firstImportErrorMessage) - throw Error(firstImportErrorMessage) - } -})() -import '../js/ApplicationSetup' -import ExtensionPoints, { ExtensionPointsType } from '../extension-points' - -import { attemptToStart } from './ApplicationStart' - -const entry = ( - extensionPoints: Partial = {}, - startFunction: Function = attemptToStart -) => { - Object.assign(ExtensionPoints, extensionPoints) - startFunction() -} - -export default entry diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Environment.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Environment.tsx deleted file mode 100644 index 2acad0d6753..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Environment.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__ENV__'. -console.info(__ENV__) // moving this here as it's useful to see at least once -export const Environment = { - isTest() { - // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__ENV__'. - return __ENV__ === 'test' - }, - // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__COMMIT_HASH__'. - commitHash: __COMMIT_HASH__, - // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__IS_DIRTY__'. - isDirty: __IS_DIRTY__, - // @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '__COMMIT_DATE__'. - commitDate: __COMMIT_DATE__, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/IconHelper.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/IconHelper.tsx deleted file mode 100644 index 1f7b409a3c8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/IconHelper.tsx +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { LazyQueryResult } from './model/LazyQueryResult/LazyQueryResult' - -import _get from 'lodash/get' -import { StartupDataStore } from './model/Startup/startup' - -const _map = Object.keys(StartupDataStore.Configuration.getIconConfig()).reduce( - (totalIconMap, iconConfigKey) => { - const iconProp = - StartupDataStore.Configuration.getIconConfig()[iconConfigKey] - totalIconMap[iconConfigKey] = { - class: iconProp.className, - style: { - code: iconProp.code, - font: iconProp.font, - size: iconProp.size, - }, - } - return totalIconMap - }, - {} as { - [key: string]: { - class: string - style: { - code: string - font: string - size: string - } - } - } -) - -/* Maps top-level mime type category names to the closest icon. */ -const _mimeMap = { - application: _map.document, - audio: _map.sound, - example: _map.default, - font: _map.document, - image: _map.image, - message: _map.document, - model: _map.dataset, - multipart: _map.collection, - text: _map.text, - video: _map.video, -} - -/* This is the default icon that will be used if a Metacard cannot be - mapped to an icon. Set default attributes to empty strings for no icon. */ -const _default = _map.default - -/* Remove resource keyword from datatype and covert to lowercase. */ -function _formatAttribute(attr: string) { - if (attr !== undefined) { - return attr.toLowerCase().replace(' resource', '') - } - return attr -} - -/* Checks if the attribute value exists in the icon map. */ -function _iconExistsInMap(attr: any, map: any) { - if (Array.isArray(attr)) { - attr = attr[0] - } - if ( - attr !== undefined && - attr.length > 0 && - map.hasOwnProperty(_formatAttribute(attr)) - ) { - return true - } else { - return false - } -} - -/* Find the correct icon based on various Metacard attributes. */ -function _deriveIconByMetacardObject(metacard: LazyQueryResult['plain']) { - let prop, - dataTypes, - metacardType, - mimeType, - contentType, - icon = _default - - prop = metacard.metacard.properties - dataTypes = prop.datatype - metacardType = _formatAttribute(prop['metacard-type']) - mimeType = _formatAttribute(prop['media.type']) - contentType = _formatAttribute(prop['metadata-content-type']) - - if (mimeType !== undefined) { - const mime = mimeType.split('/') - if (mime && mime.length === 2) { - mimeType = mime[0] - } - } - - if (_iconExistsInMap(dataTypes, _map)) { - icon = _get(_map, _formatAttribute(dataTypes[0]), _default) - } else if (_iconExistsInMap(metacardType, _map)) { - icon = _get(_map, metacardType, _default) - } else if (_iconExistsInMap(contentType, _map)) { - icon = _get(_map, contentType, _default) - } else if (_iconExistsInMap(mimeType, _mimeMap)) { - icon = _get(_mimeMap, mimeType, _default) - } - if (metacardType === 'metacard.query') { - return { - class: 'fa fa-search', - style: { - code: 'f002', - font: 'FontAwesome', - size: '12px', - }, - } - } - if (!icon) { - return { - class: 'fa fa-question', - style: { - code: 'f128', - font: 'FontAwesome', - size: '12px', - }, - } - } - return icon -} - -/* Find the correct icon by icon name. */ -function _deriveIconByName(name: string) { - return _get(_map, _formatAttribute(name), _default) -} - -export default { - getClassByMetacardObject(metacard: LazyQueryResult['plain']) { - const i = _deriveIconByMetacardObject(metacard) - return _get(i, 'class', _default.class) - }, - getFullByMetacardObject(metacard: LazyQueryResult['plain']) { - const i = _deriveIconByMetacardObject(metacard) - return i !== undefined ? i : _default - }, - getClassByName(name: string) { - const i = _deriveIconByName(name) - return _get(i, 'class', _default?.class) - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/OpenLayersGeometryUtils.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/OpenLayersGeometryUtils.spec.ts deleted file mode 100644 index 5c44420df7c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/OpenLayersGeometryUtils.spec.ts +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'sino... Remove this comment to see the full error message -import sinon from 'sinon' -import { - mock as mockJquery, - unmock as unmockJquery, -} from '../test/mock-api/mock-jquery' -import { - mock as mockProperties, - unmock as unmockProperties, -} from '../test/mock-api/mock-properties' -import olUtils from './OpenLayersGeometryUtils' - -describe('Common', () => { - before(() => { - mockJquery() - mockProperties() - }) - after(() => { - unmockJquery() - unmockProperties() - }) - describe('wrapCoordinatesFromGeometry', () => { - class MockGeometry { - props: any - constructor(props: any) { - this.props = props - } - getType() { - return this.props.type - } - getCoordinates() { - return this.props.coordinates - } - getCenter() { - return this.props.center - } - setCenter() { - throw new Error() - } - setCoordinates() { - throw new Error() - } - } - const sandbox = sinon.createSandbox() - afterEach(() => { - sandbox.restore() - }) - it('LineString wraps coordinates', () => { - const coordinates = [ - [210, 50], - [0, 0], - [-240, -15], - ].map(olUtils.lonLatToMapCoordinate) - const line = new MockGeometry({ - type: 'LineString', - coordinates, - }) - const stub = sandbox.stub(line, 'setCoordinates') - olUtils.wrapCoordinatesFromGeometry(line) - const calls = stub.getCalls() - const results = calls[0].args[0].map(olUtils.mapCoordinateToLonLat) - expect(results[0][0]).to.be.closeTo(-150, 0.001) - expect(results[0][1]).to.be.closeTo(50, 0.001) - expect(results[1][0]).to.be.closeTo(-0, 0.001) - expect(results[1][1]).to.be.closeTo(0, 0.001) - expect(results[2][0]).to.be.closeTo(120, 0.001) - expect(results[2][1]).to.be.closeTo(-15, 0.001) - expect(results.length).to.equal(3) - }) - it('Polygon wraps coordinates', () => { - const coordinates = [ - [210, 50], - [0, 0], - [-240, -15], - [210, 50], - ].map(olUtils.lonLatToMapCoordinate) - const line = new MockGeometry({ - type: 'Polygon', - coordinates: [coordinates], - }) - const stub = sandbox.stub(line, 'setCoordinates') - olUtils.wrapCoordinatesFromGeometry(line) - const calls = stub.getCalls() - const results = calls[0].args[0][0].map(olUtils.mapCoordinateToLonLat) - expect(results[0][0]).to.be.closeTo(-150, 0.001) - expect(results[0][1]).to.be.closeTo(50, 0.001) - expect(results[1][0]).to.be.closeTo(-0, 0.001) - expect(results[1][1]).to.be.closeTo(0, 0.001) - expect(results[2][0]).to.be.closeTo(120, 0.001) - expect(results[2][1]).to.be.closeTo(-15, 0.001) - expect(results[3][0]).to.equal(results[0][0]) - expect(results[3][1]).to.equal(results[0][1]) - expect(results.length).to.equal(4) - }) - it('Circle wraps coordinates', () => { - const coordinates = olUtils.lonLatToMapCoordinate([210, 50]) - const line = new MockGeometry({ - type: 'Circle', - center: coordinates, - }) - const stub = sandbox.stub(line, 'setCenter') - olUtils.wrapCoordinatesFromGeometry(line) - const calls = stub.getCalls() - const results = olUtils.mapCoordinateToLonLat(calls[0].args[0]) - expect(results[0]).to.be.closeTo(-150, 0.001) - expect(results[1]).to.be.closeTo(50, 0.001) - }) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/OpenLayersGeometryUtils.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/OpenLayersGeometryUtils.tsx deleted file mode 100644 index 10e98131e33..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/OpenLayersGeometryUtils.tsx +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Common from './Common' -/*jshint esversion: 6, bitwise: false*/ -import ol from 'openlayers' -import { StartupDataStore } from './model/Startup/startup' -type CoordinateType = Array -type PointType = Array -type GeometryType = { - getType: () => 'LineString' | 'Polygon' | 'Circle' - getCoordinates: () => CoordinateType - getCenter: () => any - setCoordinates: (coords: CoordinateType) => void - setCenter: (cords: CoordinateType) => void -} -export const OpenLayersGeometryUtils = { - getCoordinatesFromGeometry: (geometry: GeometryType) => { - const type = geometry.getType() - switch (type) { - case 'LineString': - return geometry.getCoordinates() - case 'Polygon': - return geometry.getCoordinates()[0] - case 'Circle': - return [geometry.getCenter()] - default: - return [] - } - }, - setCoordinatesForGeometry: ( - geometry: GeometryType, - coordinates: CoordinateType - ) => { - const type = geometry.getType() - switch (type) { - case 'LineString': - geometry.setCoordinates(coordinates) - break - case 'Polygon': - geometry.setCoordinates([coordinates]) - break - case 'Circle': - geometry.setCenter(coordinates[0]) - break - default: - break - } - }, - mapCoordinateToLonLat: (point: PointType) => - ol.proj.transform( - point as any, - StartupDataStore.Configuration.getProjection(), - 'EPSG:4326' - ), - lonLatToMapCoordinate: (point: PointType) => - ol.proj.transform( - point as any, - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ), - wrapCoordinatesFromGeometry: (geometry: GeometryType) => { - let coordinates = OpenLayersGeometryUtils.getCoordinatesFromGeometry( - geometry - ).map(OpenLayersGeometryUtils.mapCoordinateToLonLat) - coordinates = Common.wrapMapCoordinatesArray(coordinates).map( - OpenLayersGeometryUtils.lonLatToMapCoordinate - ) - OpenLayersGeometryUtils.setCoordinatesForGeometry(geometry, coordinates) - return geometry - }, -} -export default OpenLayersGeometryUtils diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Positioning.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Positioning.ts deleted file mode 100644 index cf59401b797..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/Positioning.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -const zeroScale = 'matrix(0, 0, 0, 0, 0, 0)' -const zeroOpacity = '0' -const notDisplayed = 'none' - -export default { - // @ts-expect-error ts-migrate(7023) FIXME: 'isEffectivelyHidden' implicitly has return type '... Remove this comment to see the full error message - isEffectivelyHidden(element: any) { - if (element === document) { - return false - } else if (element === null) { - return true - } else { - const computedStyle = window.getComputedStyle(element) - if ( - computedStyle.transform === zeroScale || - computedStyle.opacity === zeroOpacity || - computedStyle.display === notDisplayed - ) { - return true - } else { - return this.isEffectivelyHidden(element.parentNode) - } - } - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ShapeUtils.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ShapeUtils.tsx deleted file mode 100644 index 65ef3e7cbc2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/ShapeUtils.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export default { - isArray3D(values: any) { - return values && values[0] && Array.isArray(values[0][0]) - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/WaitForReady.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/WaitForReady.tsx deleted file mode 100644 index ce603bf0591..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/WaitForReady.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { StartupDataStore } from '../js/model/Startup/startup' - -function sleep(ms: number = 60) { - return new Promise((resolve) => setTimeout(resolve, ms)) -} - -export const waitForReady: () => Promise = async () => { - if (!StartupDataStore.Configuration.config) { - await sleep() - return waitForReady() - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cache-bust-url.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cache-bust-url.tsx deleted file mode 100644 index 714c236ac64..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cache-bust-url.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export function cacheBustUrl(url: string): string { - if (url && url.indexOf('_=') === -1) { - let newUrl = url - if (url.indexOf('?') >= 0) { - newUrl += '&' - } else { - newUrl += '?' - } - newUrl += '_=' + Date.now() - return newUrl - } - return url -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layer-ordering.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layer-ordering.spec.ts deleted file mode 100644 index bf36b156e23..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layer-ordering.spec.ts +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -import { addLayer, shiftLayers, getShift } from './cesium.layer-ordering' - -describe('Cesium Layer Ordering', () => { - const checkOrdering = ({ actual, expected }: any) => - expect(actual).to.have.same.ordered.members(expected) - - describe('addLayer()', () => { - describe('Returns correct layer order when adding to:', () => { - const initialized = ['b', 'd'] - const all = ['a', 'b', 'c', 'd', 'e'] - const testData = [ - { test: 'beginning', layer: 'a', expectedOrder: ['a', 'b', 'd'] }, - { test: 'middle', layer: 'c', expectedOrder: ['b', 'c', 'd'] }, - { test: 'end', layer: 'e', expectedOrder: ['b', 'd', 'e'] }, - ] - - testData.forEach(({ test, layer, expectedOrder }) => { - it(`${test}`, () => { - const newLayerOrder = addLayer({ - initialized, - all, - layer, - }) - checkOrdering({ actual: newLayerOrder, expected: expectedOrder }) - }) - }) - }) - it('Can add layer to empty ordering', () => { - const newLayerOrder = addLayer({ - initialized: [], - all: ['a', 'b', 'c', 'd', 'e'], - layer: 'a', - }) - checkOrdering({ actual: newLayerOrder, expected: ['a'] }) - }) - it('Does not duplicate an existing layer', () => { - const newLayerOrder = addLayer({ - initialized: ['a', 'c', 'd'], - all: ['a', 'b', 'c', 'd', 'e'], - layer: 'c', - }) - checkOrdering({ actual: newLayerOrder, expected: ['a', 'c', 'd'] }) - }) - it('Does not add a layer that does not exist', () => { - const newLayerOrder = addLayer({ - initialized: ['a', 'c', 'd'], - all: ['a', 'b', 'c', 'd', 'e'], - layer: 'g', - }) - checkOrdering({ actual: newLayerOrder, expected: ['a', 'c', 'd'] }) - }) - it('Throws the correct error when the passed in layer orders have different orders', () => { - expect( - addLayer.bind(this, { - initialized: ['d', 'a', 'b'], - all: ['a', 'b', 'c', 'd', 'e'], - layer: 'c', - }) - ).to.throw( - Error, - 'addLayer: the two layer orders cannot have different orders' - ) - }) - it('Throws the correct error when the when the set of all layers is not a superset of the initialized layers', () => { - expect( - addLayer.bind(this, { - initialized: ['a', 'g', 'd'], - all: ['a', 'b', 'c', 'd', 'e'], - layer: 'c', - }) - ).to.throw( - Error, - 'addLayer: the set of all layers must be a superset of initialized layers' - ) - }) - }) - - describe('Shift Layers', () => { - const testData = [ - //shift from ['a', 'b', 'c', 'd', 'e'] - { test: 'from beginning to middle', cur: ['b', 'c', 'a', 'd', 'e'] }, - { test: 'from beginning to end', cur: ['b', 'c', 'd', 'e', 'a'] }, - { test: 'from middle to beginning', cur: ['c', 'a', 'b', 'd', 'e'] }, - { test: 'from middle to end', cur: ['a', 'b', 'd', 'e', 'c'] }, - { test: 'from middle leftwards', cur: ['a', 'c', 'b', 'd', 'e'] }, - { test: 'from middle rightwards', cur: ['a', 'b', 'd', 'c', 'e'] }, - { test: 'from end to middle', cur: ['a', 'b', 'e', 'c', 'd'] }, - { test: 'from end to beginning', cur: ['e', 'a', 'b', 'c', 'd'] }, - { test: 'no change in ordering', cur: ['a', 'b', 'c', 'd', 'e'] }, - ] - describe('shiftLayers()', () => { - describe('All layers initialized', () => { - const prev = ['a', 'b', 'c', 'd', 'e'] - - describe('Returns correct layer order for shifts:', () => { - testData.forEach(({ test, cur }) => { - it(`${test}`, () => { - const newLayerOrder = shiftLayers({ prev, cur }) - checkOrdering({ actual: newLayerOrder, expected: cur }) - }) - }) - }) - }) - describe('Not all layers initialized', () => { - const prev = ['b', 'c', 'e'] - const previousLayers = new Set(prev) - describe('Returns correct layer order for shifts:', () => { - testData.forEach(({ test, cur }) => { - it(`${test}`, () => { - const newLayerOrder = shiftLayers({ prev, cur }) - checkOrdering({ - actual: newLayerOrder, - expected: cur.filter((layer) => previousLayers.has(layer)), - }) - }) - }) - }) - }) - }) - describe('getShift()', () => { - const prev = ['a', 'b', 'c', 'd', 'e'] - const applyShift = ({ - prev: previousLayerOrder, - layer, - method, - count, - }: any) => { - const METHOD_RAISE = 'raise' - const shiftLayerToIndex = ({ - layerOrder, - layer: layerId, - index, - }: any) => { - const layerIdRemoved = layerOrder.filter((id: any) => id !== layerId) - return [ - ...layerIdRemoved.slice(0, index), - layerId, - ...layerIdRemoved.slice(index), - ] - } - const modifier = method === METHOD_RAISE ? 1 : -1 - const index = previousLayerOrder.indexOf(layer) + modifier * count - return shiftLayerToIndex({ - layerOrder: previousLayerOrder, - layer, - index, - }) - } - describe('Returns the correct shift:', () => { - testData.forEach(({ test, cur }) => { - it(`${test}`, () => { - const { layer, method, count } = getShift({ - prev, - cur, - }) - const appliedShift = applyShift({ prev, layer, method, count }) - checkOrdering({ actual: appliedShift, expected: cur }) - }) - }) - it('Throws the correct error when the passed in layer orders do not contain the same ids', () => { - expect( - getShift.bind(this, { - prev: ['a', 'b', 'c', 'd'], - cur: ['a', 'b'], - }) - ).to.throw(Error, 'getShift: arrays must contain the same ids') - }) - it('Throws the correct error when more than one shift is required', () => { - expect( - getShift.bind(this, { - prev: ['d', 'a', 'b'], - cur: ['b', 'a', 'd'], - }) - ).to.throw(Error, 'getShift: unable to find shift') - }) - }) - }) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layer-ordering.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layer-ordering.tsx deleted file mode 100644 index 91381057a63..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layer-ordering.tsx +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { isEqual, intersection } from 'lodash' - -export function addLayer({ - initialized: initializedLayerOrder, - all: allLayerOrder, - layer: layerId, -}: any) { - const initializedLayers = new Set(initializedLayerOrder) - const filtered = allLayerOrder.filter((id: any) => initializedLayers.has(id)) - - if (filtered.length < initializedLayerOrder.length) { - throw new Error( - `addLayer: the set of all layers must be a superset of initialized layers` - ) - } - if (!isEqual(filtered, initializedLayerOrder)) { - throw new Error( - `addLayer: the two layer orders cannot have different orders` - ) - } - return allLayerOrder.filter( - (id: any) => id === layerId || initializedLayers.has(id) - ) -} - -export function shiftLayers({ - prev: previousLayerOrder, - cur: currentLayerOrder, -}: any) { - const previousLayers = new Set(previousLayerOrder) - return currentLayerOrder.filter((id: any) => previousLayers.has(id)) -} - -export function getShift({ - prev: previousLayerOrder, - cur: currentLayerOrder, -}: any) { - if ( - intersection(previousLayerOrder, currentLayerOrder).length !== - previousLayerOrder.length || - currentLayerOrder.length !== previousLayerOrder.length - ) { - throw new Error(`getShift: arrays must contain the same ids`) - } - - if (isEqual(previousLayerOrder, currentLayerOrder)) { - return { layer: previousLayerOrder[0], method: 'lower', count: 0 } - } - - const shiftLayerToIndex = ({ layerOrder, layer: layerId, index }: any) => { - const layerIdRemoved = layerOrder.filter((id: any) => id !== layerId) - return [ - ...layerIdRemoved.slice(0, index), - layerId, - ...layerIdRemoved.slice(index), - ] - } - - const changedLayers = previousLayerOrder.filter( - (id: any, index: any) => currentLayerOrder[index] !== id - ) - - for (let i = 0; i < changedLayers.length; i++) { - const layer = changedLayers[i] - const previousOrder = previousLayerOrder.indexOf(layer) - const currentOrder = currentLayerOrder.indexOf(layer) - const shiftLayer = shiftLayerToIndex({ - layerOrder: previousLayerOrder, - layer, - index: currentOrder, - }) - if (isEqual(shiftLayer, currentLayerOrder)) { - return { - layer, - method: currentOrder > previousOrder ? 'raise' : 'lower', // raise means move to higher index :( - count: Math.abs(currentOrder - previousOrder), - } - } - } - throw new Error(`getShift: unable to find shift`) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layers.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layers.tsx deleted file mode 100644 index 9183c3e0092..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/cesium.layers.tsx +++ /dev/null @@ -1,186 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/*jshint newcap: false, bitwise: false */ -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import url from 'url' -import { addLayer, shiftLayers, getShift } from './cesium.layer-ordering' -import _ from 'underscore' -const DEFAULT_HTTPS_PORT = 443 -const DEFAULT_HTTP_PORT = 80 -export const CesiumImageryProviderTypes = { - OSM: Cesium.createOpenStreetMapImageryProvider, - AGM: Cesium.ArcGisMapServerImageryProvider, - BM: Cesium.BingMapsImageryProvider, - WMS: Cesium.WebMapServiceImageryProvider, - WMT: Cesium.WebMapTileServiceImageryProvider, - TMS: Cesium.createTileMapServiceImageryProvider, - GE: Cesium.GoogleEarthImageryProvider, - CT: Cesium.CesiumTerrainProvider, - AGS: Cesium.ArcGisImageServerTerrainProvider, - VRW: Cesium.VRTheWorldTerrainProvider, - SI: Cesium.SingleTileImageryProvider, -} as { - [key: string]: any -} -import { Layers } from './layers' -import Backbone from 'backbone' -import { StartupDataStore } from '../model/Startup/startup' -type MakeMapType = { - cesiumOptions: any - element: HTMLElement -} -export class CesiumLayers { - layers: Layers - map: any - isMapCreated: boolean - layerForCid: any - backboneModel: any - layerOrder: Array - constructor({ collection }: { collection: any }) { - this.backboneModel = new Backbone.Model({}) - this.isMapCreated = false - this.layerOrder = [] - this.layerForCid = {} - const layerPrefs = collection - this.layers = new Layers(layerPrefs) - this.backboneModel.listenTo( - layerPrefs, - 'change:alpha', - this.setAlpha.bind(this) - ) - this.backboneModel.listenTo( - layerPrefs, - 'change:show change:alpha', - this.setShow.bind(this) - ) - this.backboneModel.listenTo(layerPrefs, 'add', this.addLayer.bind(this)) - this.backboneModel.listenTo( - layerPrefs, - 'remove', - this.removeLayer.bind(this) - ) - this.backboneModel.listenTo( - layerPrefs, - 'sort', - this.reIndexLayers.bind(this) - ) - } - makeMap(options: MakeMapType) { - // must create cesium map after containing DOM is attached. - this.map = new Cesium.Viewer(options.element, options.cesiumOptions) - this.map.scene.requestRenderMode = true - this.layers.layers.forEach((model) => { - if (model.get('show')) { - this.initLayer(model) - } - }, this) - this.isMapCreated = true - return this.map - } - initLayer(model: any) { - const type = CesiumImageryProviderTypes[model.get('type')] - const initObj = _.omit( - model.attributes, - 'type', - 'label', - 'index', - 'modelCid' - ) - if (model.get('type') === 'WMT') { - /* If matrixSet is present (OpenLayers WMTS keyword) set tileMatrixSetID (Cesium WMTS keyword) */ - if (initObj.matrixSet) { - initObj.tileMatrixSetID = initObj.matrixSet - } - /* Set the tiling scheme for WMTS imagery providers that are EPSG:4326 */ - if (StartupDataStore.Configuration.getProjection() === 'EPSG:4326') { - initObj.tilingScheme = new Cesium.GeographicTilingScheme() - } - } - const provider = new type(initObj) - /* - Optionally add this provider as a TrustedServer. This sets withCredentials = true - on the XmlHttpRequests for CORS. - */ - if (model.get('withCredentials')) { - const parsedUrl = url.parse(provider.url) - let port = parsedUrl.port - if (!port) { - // @ts-expect-error ts-migrate(2322) FIXME: Type '443 | 80' is not assignable to type 'string ... Remove this comment to see the full error message - port = - parsedUrl.protocol === 'https:' - ? DEFAULT_HTTPS_PORT - : DEFAULT_HTTP_PORT - } - Cesium.TrustedServers.add(parsedUrl.hostname, port) - } - this.layerOrder = addLayer({ - initialized: this.layerOrder, - all: this.layers.layers.map((model) => model.id).reverse(), - layer: model.id, - }) - const layerIndex = this.layerOrder.indexOf(model.id) - const layer = this.map.imageryLayers.addImageryProvider( - provider, - layerIndex - ) - this.layerForCid[model.id] = layer - layer.alpha = model.get('alpha') - layer.show = model.shouldShowLayer() - } - addLayer() { - // never done - } - removeLayer() { - // never done - } - setAlpha(model: any) { - const layer = this.layerForCid[model.id] - layer.alpha = model.get('alpha') - } - setShow(model: any) { - if (!this.layerForCid[model.id]) { - this.initLayer(model) - } - const layer = this.layerForCid[model.id] - layer.show = model.shouldShowLayer() - this.map.scene.requestRender() - } - /* - removing/re-adding the layers causes visible "re-render" of entire map; - raising/lowering is smoother. - raising means to move to a higher index. higher indexes are displayed on top of lower indexes. - so we have to reverse the order property here to make it display correctly. - in other words, order 1 means highest index. - */ - reIndexLayers() { - const newLayerOrder = shiftLayers({ - prev: this.layerOrder, - cur: this.layers.layers.map((model) => model.id).reverse(), - }) - const { layer, method, count } = getShift({ - prev: this.layerOrder, - cur: newLayerOrder, - }) - _.times( - count, - () => { - this.map.imageryLayers[method](this.layerForCid[layer]) - }, - this - ) - this.layerOrder = newLayerOrder - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/layers.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/layers.tsx deleted file mode 100644 index c85e0429f8e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/layers.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { Subscribable } from '../model/Base/base-classes' - -export type LayerType = { - alpha: string - id: string - label: string - name: string - order: number - parameters: any - proxyEnabled: boolean - show: boolean - type: string - url: string - withCredentials: boolean -} - -export class Layer extends Subscribable<{ thing: 'change' }> { - layer: LayerType - constructor(layer: LayerType) { - super() - this.layer = layer - } -} - -export class Layers extends Subscribable<{ thing: 'sort' | 'add' | 'remove' }> { - layers: Array - constructor(layers: Array) { - super() - this.layers = layers - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/openlayers.layers.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/openlayers.layers.tsx deleted file mode 100644 index ccd04b7e221..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/controllers/openlayers.layers.tsx +++ /dev/null @@ -1,221 +0,0 @@ -import { Layers } from './layers' -import _ from 'underscore' -import ol from 'openlayers' -import user from '../../component/singletons/user-instance' -import Backbone from 'backbone' -import { StartupDataStore } from '../model/Startup/startup' -const createTile = ( - { show, alpha, ...options }: any, - Source: any, - Layer = ol.layer.Tile -) => - new Layer({ - visible: show, - preload: Infinity, - opacity: alpha, - source: new Source(options), - }) -const OSM = (opts: any) => { - const { url } = opts - return createTile( - { - ...opts, - url: url + (url.indexOf('/{z}/{x}/{y}') === -1 ? '/{z}/{x}/{y}.png' : ''), - }, - ol.source.OSM - ) -} -const BM = (opts: any) => { - const imagerySet = opts.imagerySet || opts.url - return createTile({ ...opts, imagerySet }, ol.source.BingMaps) -} -const WMS = (opts: any) => { - const params = opts.params || { - LAYERS: opts.layers, - ...opts.parameters, - } - return createTile({ ...opts, params }, ol.source.TileWMS) -} -const WMT = async (opts: any) => { - const { url, withCredentials, proxyEnabled } = opts - const originalUrl = proxyEnabled - ? new URL(url, window.location.origin + window.location.pathname) - : new URL(url) - const getCapabilitiesUrl = new URL(originalUrl) - getCapabilitiesUrl.searchParams.set('request', 'GetCapabilities') - const res = await window.fetch(getCapabilitiesUrl, { - credentials: withCredentials ? 'include' : 'same-origin', - }) - const text = await res.text() - const parser = new ol.format.WMTSCapabilities() - const result = parser.read(text) - if ((result as any).Contents.Layer.length === 0) { - throw new Error('WMTS map layer source has no layers.') - } - let { layer, matrixSet } = opts - /* If tileMatrixSetID is present (Cesium WMTS keyword) set matrixSet (OpenLayers WMTS keyword) */ - if (opts.tileMatrixSetID) { - matrixSet = opts.tileMatrixSetID - } - if (!layer) { - layer = (result as any).Contents.Layer[0].Identifier - } - const options = ol.source.WMTS.optionsFromCapabilities(result, { - ...opts, - layer, - matrixSet, - }) - if (options === null) { - throw new Error('WMTS map layer source could not be setup.') - } - if (proxyEnabled) { - // Set this to the proxy URL. Otherwise, OpenLayers will use the URL provided by the - // GetCapabilities response. - options.url = originalUrl.toString() - options.urls = [originalUrl.toString()] - } - return createTile(opts, () => new ol.source.WMTS(options)) -} -const AGM = (opts: any) => { - // We strip the template part of the url because we will manually format - // it in the `tileUrlFunction` function. - const url = opts.url.replace('tile/{z}/{y}/{x}', '') - // arcgis url format: - // http:///tile/// - // - // reference links: - // - https://openlayers.org/en/latest/examples/xyz-esri-4326-512.html - // - https://developers.arcgis.com/rest/services-reference/map-tile.htm - const tileUrlFunction = (tileCoord: any) => { - const [z, x, y] = tileCoord - return `${url}/tile/${z - 1}/${-y - 1}/${x}` - } - return createTile({ ...opts, tileUrlFunction }, ol.source.XYZ) -} -const SI = (opts: any) => { - const imageExtent = - opts.imageExtent || - ol.proj.get(StartupDataStore.Configuration.getProjection()).getExtent() - return createTile( - { ...opts, imageExtent, ...opts.parameters }, - ol.source.ImageStatic, - ol.layer.Image as any - ) -} -const sources = { OSM, BM, WMS, WMT, AGM, SI } as { - [key: string]: any -} -const createLayer = (type: any, opts: any) => { - const fn = sources[type] - if (fn === undefined) { - throw new Error(`Unsupported map layer type ${type}`) - } - return fn(opts) -} -type MakeMapType = { - zoom: number - minZoom: number - center: [number, number] - element: HTMLElement -} -export class OpenlayersLayers { - layers: Layers - map: any - isMapCreated: boolean - layerForCid: any - backboneModel: any - constructor({ collection }: { collection: any }) { - this.backboneModel = new Backbone.Model({}) - this.isMapCreated = false - this.layerForCid = {} - const layerPrefs = collection - this.layers = new Layers(layerPrefs) - this.backboneModel.listenTo( - layerPrefs, - 'change:alpha', - this.setAlpha.bind(this) - ) - this.backboneModel.listenTo( - layerPrefs, - 'change:show change:alpha', - this.setShow.bind(this) - ) - this.backboneModel.listenTo(layerPrefs, 'add', this.addLayer.bind(this)) - this.backboneModel.listenTo( - layerPrefs, - 'remove', - this.removeLayer.bind(this) - ) - this.backboneModel.listenTo( - layerPrefs, - 'sort', - this.reIndexLayers.bind(this) - ) - } - makeMap(mapOptions: MakeMapType) { - this.layers.layers.forEach((layer) => { - this.addLayer(layer) - }) - const view = new ol.View({ - projection: ol.proj.get(StartupDataStore.Configuration.getProjection()), - center: ol.proj.transform( - [0, 0], - 'EPSG:4326', - StartupDataStore.Configuration.getProjection() - ), - zoom: mapOptions.zoom, - minZoom: mapOptions.minZoom, - }) - const config = { - target: mapOptions.element, - view, - interactions: ol.interaction.defaults({ doubleClickZoom: false }), - } - this.map = new ol.Map(config) - this.isMapCreated = true - return this.map - } - async addLayer(model: any) { - const { id, type } = model.toJSON() - const opts = _.omit(model.attributes, 'type', 'label', 'index', 'modelCid') - opts.show = model.shouldShowLayer() - try { - const layer = await Promise.resolve(createLayer(type, opts)) - this.map.addLayer(layer) - this.layerForCid[id] = layer - this.reIndexLayers() - } catch (e) { - model.set('warning', e.message) - } - } - removeLayer(model: any) { - const id = model.get('id') - const layer = this.layerForCid[id] - if (layer !== undefined) { - this.map.removeLayer(layer) - } - delete this.layerForCid[id] - this.reIndexLayers() - } - reIndexLayers() { - this.layers.layers.forEach((model, index) => { - const layer = this.layerForCid[model.id] - if (layer !== undefined) { - layer.setZIndex(-(index + 1)) - } - }, this) - user.savePreferences() - } - setAlpha(model: any) { - const layer = this.layerForCid[model.id] - if (layer !== undefined) { - layer.setOpacity(model.get('alpha')) - } - } - setShow(model: any) { - const layer = this.layerForCid[model.id] - if (layer !== undefined) { - layer.setVisible(model.shouldShowLayer()) - } - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cql.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cql.spec.ts deleted file mode 100644 index f26ac6ffb92..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cql.spec.ts +++ /dev/null @@ -1,1493 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -import { - FilterBuilderClass, - FilterClass, -} from '../component/filter-builder/filter.structure' -import cql from './cql' -import { StartupDataStore } from './model/Startup/startup' -import { DataTypesConfiguration } from '../component/datatypes/datatypes' - -const DatatypesJSONConfig = { - groups: { - Object: { - iconConfig: { - class: 'fa fa-file-text-o', - }, - values: { - Person: { - attributes: { - description: ['person'], - }, - iconConfig: { - class: 'fa fa-user', - }, - }, - Group: { - attributes: { - description: ['group'], - }, - iconConfig: { - class: 'fa fa-users', - }, - }, - Equipment: { - attributes: { - description: ['equipment'], - }, - iconConfig: { - class: 'fa fa-wrench', - }, - }, - Platform: { - attributes: { - description: ['platform'], - }, - iconConfig: { - class: 'fa fa-industry', - }, - }, - Facility: { - attributes: { - description: ['facility'], - }, - iconConfig: { - class: 'fa fa-building', - }, - }, - }, - }, - Happenings: { - iconConfig: { - class: 'fa fa-bolt', - }, - values: { - Civil: { - attributes: { - description: ['civil'], - }, - iconConfig: { - class: 'fa fa-university', - }, - }, - Military: { - attributes: { - description: ['military'], - }, - iconConfig: { - class: 'fa fa-shield', - }, - }, - Political: { - attributes: { - description: ['political'], - }, - iconConfig: { - class: 'fa fa-balance-scale', - }, - }, - Natural: { - attributes: { - description: ['natural'], - }, - iconConfig: { - class: 'fa fa-leaf', - }, - }, - Other: { - attributes: { - description: ['other'], - }, - }, - }, - }, - 'Visual Media': { - iconConfig: { - class: 'fa fa-camera-retro', - }, - values: { - Image: { - attributes: { - datatype: ['Image'], - }, - iconConfig: { - class: 'fa fa-picture-o', - }, - }, - 'Moving Image': { - attributes: { - datatype: ['Moving Image'], - }, - iconConfig: { - class: 'fa fa-film', - }, - }, - 'Still Image': { - attributes: { - datatype: ['Still Image'], - }, - iconConfig: { - class: 'fa fa-camera-retro', - }, - }, - }, - }, - }, -} as DataTypesConfiguration - -type CapabilityCategoriesType = - | 'strings' - | 'numbers' - | 'dates' - | 'booleans' - | 'geometries' - -/** - * Test all the capabilities (without boolean logic involved). - * - * left is input, right is expected output (can differ, we do our best effort but ultimately simplifying can change things!) - * categorized by types so make this easier to maintain and update as needed - */ -const cqlCapabilityStrings = { - strings: [ - `("anyText" ILIKE '1')`, - `("anyText" LIKE '1')`, - `("anyText" = '1')`, - `(proximity('anyText',2,'second first') = true)`, - `(("title" IS NULL))`, - ], - numbers: [ - `("media.width-pixels" > 0)`, - `("media.width-pixels" < 0)`, - `("media.width-pixels" = 0)`, - `("media.width-pixels" >= 0)`, - `("media.width-pixels" <= 0)`, - `("media.width-pixels" BETWEEN 0 AND 1)`, - `(("media.width-pixels" IS NULL))`, - ], - dates: [ - `("modified" BEFORE 2020-12-10T20:31:03.388Z)`, - `("modified" AFTER 2020-12-10T20:31:03.388Z)`, - `("modified" = 'RELATIVE(PT1S)')`, - `("modified" = 'RELATIVE(PT1M)')`, - `("modified" = 'RELATIVE(PT1H)')`, - `("modified" = 'RELATIVE(P1D)')`, - `("modified" = 'RELATIVE(P7D)')`, - `("modified" = 'RELATIVE(P1M)')`, - `("modified" = 'RELATIVE(P1Y)')`, - `(("created" IS NULL))`, - ], - booleans: [ - `("enterprise" = false)`, - `("enterprise" = true)`, - `(("enterprise" IS NULL))`, - ], - geometries: [ - `(("location" IS NULL))`, - `(INTERSECTS("anyGeo", LINESTRING(-1.385015 11.713654,-2.691833 0.382483,-10.326418 8.220109)))`, - `(DWITHIN("anyGeo", LINESTRING(-1.719894 11.760274,-1.611331 3.939398,-8.774062 7.567764), 500, meters))`, - `(INTERSECTS("anyGeo", POLYGON((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094))))`, - `(DWITHIN("anyGeo", POLYGON((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094)), 500, meters))`, - `(DWITHIN("anyGeo", POINT(-2.703933 4.726838), 523283.971121, meters))`, - ], -} as Record> - -const cqlMultipolygonStrings = { - geometries: [ - { - input: `(INTERSECTS("anyGeo", - MULTIPOLYGON( - ((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094)), - ((0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,0.580634 10.295094)), - ((10 10,-10 -10,-10 10,10 10)) - )))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - polygon: [ - [-0.580634, 10.295094], - [0.577341, -1.188461], - [-5.041638, -1.100891], - [-0.580634, 10.295094], - ], - type: 'POLYGON', - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - polygon: [ - [0.580634, 10.295094], - [0.577341, -1.188461], - [-5.041638, -1.100891], - [0.580634, 10.295094], - ], - type: 'POLYGON', - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - polygon: [ - [10, 10], - [-10, -10], - [-10, 10], - [10, 10], - ], - type: 'POLYGON', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(INTERSECTS("anyGeo", MULTIPOLYGON(((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094)))))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - polygon: [ - [-0.580634, 10.295094], - [0.577341, -1.188461], - [-5.041638, -1.100891], - [-0.580634, 10.295094], - ], - type: 'POLYGON', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(DWITHIN("anyGeo", MULTIPOLYGON(((-0.580634 10.295094,0.577341 -1.188461,-5.041638 -1.100891,-0.580634 10.295094))), 500, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - polygon: [ - [-0.580634, 10.295094], - [0.577341, -1.188461], - [-5.041638, -1.100891], - [-0.580634, 10.295094], - ], - polygonBufferWidth: '500', - type: 'POLYGON', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(INTERSECTS("anyGeo", MULTIPOLYGON(((17.704563951827325 26.80670872544821,26.69962466928798 14.956073177047667,9.280618200554649 15.313020030915167,17.704563951827325 26.80670872544821))))) OR (INTERSECTS("anyGeo", MULTIPOLYGON(((37.62219839763307 22.095010254397405,48.83032960907214 32.5892477581015,50.68645324918305 21.09555906356843,40.19221574547897 17.31192241257309,37.62219839763307 22.095010254397405)))))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - polygon: [ - [17.704563951827325, 26.80670872544821], - [26.69962466928798, 14.956073177047667], - [9.280618200554649, 15.313020030915167], - [17.704563951827325, 26.80670872544821], - ], - type: 'POLYGON', - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - polygon: [ - [37.62219839763307, 22.095010254397405], - [48.83032960907214, 32.5892477581015], - [50.68645324918305, 21.09555906356843], - [40.19221574547897, 17.31192241257309], - [37.62219839763307, 22.095010254397405], - ], - type: 'POLYGON', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - ], -} - -const cqlPointStrings = { - geometries: [ - { - input: `(INTERSECTS("anyGeo", POINT(10 20)))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - lat: 20, - lon: 10, - type: 'POINTRADIUS', - }, - }, - ], - negated: false, - type: 'AND', - }, - }, - { - input: `(INTERSECTS("anyGeo", MULTIPOINT(10 20, 5 5)))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - lat: 20, - lon: 10, - type: 'POINTRADIUS', - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - lat: 5, - lon: 5, - type: 'POINTRADIUS', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(DWITHIN("anyGeo", POINT(10 20), 100, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - lat: 20, - lon: 10, - radius: '100', - type: 'POINTRADIUS', - }, - }, - ], - negated: false, - type: 'AND', - }, - }, - { - input: `(DWITHIN("anyGeo", MULTIPOINT(10 20), 100, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - lat: 20, - lon: 10, - radius: '100', - type: 'POINTRADIUS', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(DWITHIN("anyGeo", MULTIPOINT(10 20, 5 5), 100, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - lat: 20, - lon: 10, - radius: '100', - type: 'POINTRADIUS', - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - lat: 5, - lon: 5, - radius: '100', - type: 'POINTRADIUS', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - ], -} - -const cqlLinestrings = { - geometries: [ - { - input: `(INTERSECTS("anyGeo", LINESTRING(10 20, 30 30, 40 20)))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - line: [ - [10, 20], - [30, 30], - [40, 20], - ], - }, - }, - ], - negated: false, - type: 'AND', - }, - }, - { - input: `(INTERSECTS("anyGeo", MULTILINESTRING((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - line: [ - [10, 10], - [20, 20], - [10, 40], - ], - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - line: [ - [40, 40], - [30, 30], - [40, 20], - [30, 10], - ], - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(DWITHIN("anyGeo", LINESTRING(10 20, 30 30, 40 20), 1000, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - lineWidth: '1000', - line: [ - [10, 20], - [30, 30], - [40, 20], - ], - }, - }, - ], - negated: false, - type: 'AND', - }, - }, - { - input: `(DWITHIN("anyGeo", MULTILINESTRING((10 10, 20 20, 10 40)), 1000, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - lineWidth: '1000', - line: [ - [10, 10], - [20, 20], - [10, 40], - ], - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(DWITHIN("anyGeo", MULTILINESTRING((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10)), 1000, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - lineWidth: '1000', - line: [ - [10, 10], - [20, 20], - [10, 40], - ], - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - lineWidth: '1000', - line: [ - [40, 40], - [30, 30], - [40, 20], - [30, 10], - ], - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - ], -} - -const cqlGeometryCollections = { - geometries: [ - { - input: `(INTERSECTS("anyGeo", GEOMETRYCOLLECTION(POINT(10 20), LINESTRING(30 30, 40 20))))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - type: 'POINTRADIUS', - lat: 20, - lon: 10, - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - line: [ - [30, 30], - [40, 20], - ], - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(INTERSECTS("anyGeo", GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(10 20)), LINESTRING(30 30, 40 20))))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - type: 'POINTRADIUS', - lat: 20, - lon: 10, - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - line: [ - [30, 30], - [40, 20], - ], - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(DWITHIN("anyGeo", GEOMETRYCOLLECTION(POINT(10 20)), 1000, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'circle', - type: 'POINTRADIUS', - lat: 20, - lon: 10, - radius: '1000', - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - { - input: `(DWITHIN("anyGeo", GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((10 20, 15 18, 5 9, 10 20))), LINESTRING(30 30, 40 20)), 1000, meters))`, - output: { - filters: [ - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'poly', - type: 'POLYGON', - polygonBufferWidth: '1000', - polygon: [ - [10, 20], - [15, 18], - [5, 9], - [10, 20], - ], - }, - }, - { - context: undefined, - negated: false, - property: 'anyGeo', - type: 'GEOMETRY', - value: { - mode: 'line', - type: 'LINE', - lineWidth: '1000', - line: [ - [30, 30], - [40, 20], - ], - }, - }, - ], - negated: false, - type: 'OR', - }, - }, - ], -} - -/** - * Same as above, but this goes beyond just testing functions, it tests the boolean logic - * - * The different section is for things that technically can be simplified by boolean logic. Due to how reconstitution works, utilizing postfix, we are forced to simplify. If we didn't, things would get super nested (lookup postfix notation for more on why). So in some cases, we might simplify beyond the expectation. The two results will have parity though since we follow boolean algebra rules. - */ -const cqlBooleanLogicStrings = { - same: [ - `("anyText" ILIKE '1') AND ("anyText" ILIKE '2')`, - `("anyText" ILIKE '1') OR ("anyText" ILIKE '2')`, - `("anyText" ILIKE '1') OR (NOT (("anyText" ILIKE '2')))`, - `NOT (("anyText" ILIKE '%') AND (NOT (("anyText" ILIKE ''))))`, - `(NOT (("anyText" ILIKE '1'))) OR (NOT (("anyText" ILIKE '2')))`, - `NOT ((NOT (("anyText" ILIKE '1'))) OR (NOT (("anyText" ILIKE '2'))))`, - `NOT (("anyText" ILIKE '1') OR (NOT (("anyText" ILIKE '2'))))`, - `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (NOT (("anyText" ILIKE '')))`, - `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (NOT ((NOT (("anyText" ILIKE '')))))`, - `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (("anyText" ILIKE '') AND ("anyText" ILIKE ''))`, - `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (NOT (("anyText" ILIKE '') OR ("anyText" ILIKE '')))`, - `NOT (("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (NOT (("anyText" ILIKE '') OR ("anyText" ILIKE ''))))`, - `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (NOT (("anyText" ILIKE '') OR ("anyText" ILIKE '')))`, - `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (NOT (("anyText" ILIKE '') OR ("anyText" ILIKE '') OR (("anyText" ILIKE '') AND ("anyText" ILIKE ''))))`, - ], - different: [ - { - input: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (("anyText" ILIKE ''))`, - output: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR ("anyText" ILIKE '')`, - }, - { - input: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR ((NOT (("anyText" ILIKE ''))))`, - output: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (NOT (("anyText" ILIKE '')))`, - }, - { - input: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (("anyText" ILIKE '') OR ("anyText" ILIKE ''))`, - output: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR ("anyText" ILIKE '') OR ("anyText" ILIKE '')`, - }, - { - input: `NOT (("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (("anyText" ILIKE '') OR ("anyText" ILIKE '')))`, - output: `NOT (("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR ("anyText" ILIKE '') OR ("anyText" ILIKE ''))`, - }, - { - input: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR (("anyText" ILIKE '') OR ("anyText" ILIKE '') OR (("anyText" ILIKE '') AND ("anyText" ILIKE '')))`, - output: `("anyText" ILIKE '1') OR ("anyText" ILIKE '2') OR ("anyText" ILIKE '') OR ("anyText" ILIKE '') OR (("anyText" ILIKE '') AND ("anyText" ILIKE ''))`, - }, - { - input: `NOT (("anyText" ILIKE '%') AND (NOT (("anyText" ILIKE '5') AND ((NOT (("anyText" ILIKE '1'))) AND ("anyText" ILIKE '3')) AND (NOT (("anyText" ILIKE '4'))))))`, - output: `NOT (("anyText" ILIKE '%') AND (NOT (("anyText" ILIKE '5') AND (NOT (("anyText" ILIKE '1'))) AND ("anyText" ILIKE '3') AND (NOT (("anyText" ILIKE '4'))))))`, - }, - ], -} as { - same: Array - different: Array<{ input: string; output: string }> -} - -describe('read & write parity for capabilities, as well as boolean logic', () => { - it('TEST GET GEO FILTERS', () => { - const wkt = 'GEOMETRYCOLLECTION(POINT(50 40), LINESTRING(10 20, 40 50))' - cql.getGeoFilters(wkt, 'anyGeo', '100') - expect('test-value', 'Adding bogus expectation.').to.equal('test-value') - }) - - it('TEST LINESTRING FILTERS', () => { - const wkt = 'LINESTRING(10 20, 40 50)' - cql.getGeoFilters(wkt, 'anyGeo', '100') - expect('test-value', 'Adding bogus expectation.').to.equal('test-value') - }) - - describe('test all capabilities', () => { - for (const type in cqlCapabilityStrings) { - cqlCapabilityStrings[type as CapabilityCategoriesType].forEach( - (capability) => { - it(`${capability}`, () => { - expect(capability, 'Unexpected filter value.').to.equal( - cql.write(cql.read(capability)) - ) - }) - } - ) - } - }) - - describe('test all logic', () => { - describe('where things stay the same (already simplified)', () => { - cqlBooleanLogicStrings['same'].forEach((input) => { - it(`${input}`, () => { - expect(input, 'Unexpected filter value.').to.equal( - cql.write(cql.read(input)) - ) - }) - }) - }) - - describe('where things differ (they get simplified)', () => { - cqlBooleanLogicStrings['different'].forEach((inputOutputPair) => { - it(`${inputOutputPair.input}`, () => { - expect(inputOutputPair.output, 'Unexpected filter value.').to.equal( - cql.write(cql.read(inputOutputPair.input)) - ) - }) - }) - }) - }) - - describe('test corner cases / special', () => { - it('it handles escaping _ in properties that are not id', () => { - const value = '12123123_123213123' - const originalFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: '=', - property: 'title', - value, - }), - ], - }) - const cqlText = cql.write(originalFilter) - const newFilter = cql.read(cqlText) - const filterToCheck = newFilter.filters[0] as FilterClass - expect(cqlText, `Doesn't escape properly`).to.equal( - '("title" = \'12123123\\_123213123\')' - ) - expect(filterToCheck.value).to.equal(value) - }) - - it('it handles escaping _ in properties that are id', () => { - const value = '12123123_123213123' - const originalFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: '=', - property: 'id', - value, - }), - ], - }) - const cqlText = cql.write(originalFilter) - const newFilter = cql.read(cqlText) - const filterToCheck = newFilter.filters[0] as FilterClass - expect(cql.write(originalFilter), `Doesn't escape properly`).to.equal( - '("id" = \'12123123_123213123\')' - ) - expect(filterToCheck.value).to.equal(value) - }) - - it('it handles escaping _ in properties that are "id" (double wrapped!)', () => { - const value = '12123123_123213123' - const originalFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: '=', - property: '"id"', - value, - }), - ], - }) - const cqlText = cql.write(originalFilter) - const newFilter = cql.read(cqlText) - const filterToCheck = newFilter.filters[0] as FilterClass - expect(cql.write(originalFilter), `Doesn't escape properly`).to.equal( - '("id" = \'12123123_123213123\')' - ) - expect(filterToCheck.value).to.equal(value) - }) - - it(`it handles escaping _ in properties that are 'id' (double wrapped!)`, () => { - const value = '12123123_123213123' - const originalFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: '=', - property: `'id'`, - value, - }), - ], - }) - const cqlText = cql.write(originalFilter) - const newFilter = cql.read(cqlText) - const filterToCheck = newFilter.filters[0] as FilterClass - expect(cql.write(originalFilter), `Doesn't escape properly`).to.equal( - '("id" = \'12123123_123213123\')' - ) - expect(filterToCheck.value).to.equal(value) - }) - }) - - describe('invalid filters get removed', () => { - it('handles typical anyDate removal', () => { - const testFilter = new FilterBuilderClass({ - filters: [ - new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'anyDate', - value: '', - type: 'BEFORE', - }), - ], - }), - new FilterClass({ - property: 'anyText', - value: '*', - type: 'ILIKE', - }), - ], - type: 'OR', - }) - expect(cql.write(testFilter)).to.equal(`(\"anyText\" ILIKE '%')`) - }) - - it('handles empty reserved.basic-datatype', () => { - const testFilter = new FilterBuilderClass({ - filters: [ - new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'reserved.basic-datatype', - value: [], - type: 'ILIKE', - }), - ], - }), - new FilterClass({ - property: 'anyText', - value: '*', - type: 'ILIKE', - }), - ], - type: 'OR', - }) - expect(cql.write(testFilter)).to.equal(`(\"anyText\" ILIKE '%')`) - }) - - it('handles invalid values in reserved.basic-datatype', () => { - const testFilter = new FilterBuilderClass({ - filters: [ - new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'reserved.basic-datatype', - value: ['bogus'], - type: 'ILIKE', - }), - ], - }), - new FilterClass({ - property: 'anyText', - value: '*', - type: 'ILIKE', - }), - ], - type: 'OR', - }) - expect(cql.write(testFilter)).to.equal(`(\"anyText\" ILIKE '%')`) - }) - - it('handles invalid values mixed with valid values in reserved.basic-datatype', () => { - if (StartupDataStore.Configuration.config) - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - const testFilter = new FilterBuilderClass({ - filters: [ - new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'reserved.basic-datatype', - value: ['bogus', 'Person'], - type: 'ILIKE', - }), - ], - }), - new FilterClass({ - property: 'anyText', - value: '*', - type: 'ILIKE', - }), - ], - type: 'OR', - }) - expect(cql.write(testFilter)).to.equal( - `(((("description" ILIKE \'person\')))) OR ("anyText" ILIKE \'%\')` - ) - }) - - it('handles anyDate removal', () => { - const testFilter = new FilterBuilderClass({ - filters: [ - new FilterClass({ - property: 'anyDate', - value: '', - type: 'BEFORE', - }), - new FilterClass({ - property: 'anyText', - value: '*', - type: 'ILIKE', - }), - ], - type: 'OR', - }) - expect(cql.write(testFilter)).to.equal(`(\"anyText\" ILIKE '%')`) - }) - }) - - describe('test reserved.basic-datatype', () => { - it('does handle a simple reserved.basic-datatype', () => { - if (StartupDataStore.Configuration.config) - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - const testFilter = new FilterBuilderClass({ - filters: [ - new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - property: 'reserved.basic-datatype', - value: ['Person', 'Military'], - type: 'ILIKE', - }), - ], - }), - ], - type: 'OR', - }) - expect(cql.write(testFilter)).to.equal( - `(((("description" ILIKE \'person\') OR ("description" ILIKE \'military\'))))` - ) - }) - - it('does handle a negated reserved.basic-datatype', () => { - if (StartupDataStore.Configuration.config) - StartupDataStore.Configuration.config.extra = { - datatypes: DatatypesJSONConfig, - } - const testFilter = new FilterBuilderClass({ - filters: [ - new FilterBuilderClass({ - negated: true, - type: 'AND', - filters: [ - new FilterClass({ - property: 'reserved.basic-datatype', - value: ['Person', 'Military'], - type: 'ILIKE', - }), - ], - }), - ], - type: 'OR', - }) - expect(cql.write(testFilter)).to.equal( - `(NOT (((("description" ILIKE \'person\') OR ("description" ILIKE \'military\')))))` - ) - }) - }) - - describe('test boolean search', () => { - it('does handles a simple boolean search', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE '*')`, - error: false, - text: '"*"', - }, - }), - ], - }) - expect(cql.write(testFilter)).to.equal(`((anyText ILIKE '*'))`) - }) - - it('does handles a simple boolean search 2', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat')`, - error: false, - text: 'dog or cat', - }, - }), - ], - }) - expect(cql.write(testFilter)).to.equal( - `((anyText ILIKE 'dog') or (anyText ILIKE 'cat'))` - ) - }) - - it('does handles a simple boolean search that is empty', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: ``, - error: false, - text: '', - }, - }), - ], - }) - expect(cql.write(testFilter)).to.equal(`((anyText ILIKE '*'))`) - }) - - it('does handles a simple boolean search with not', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: false, - text: 'dog or cat and not (fish)', - }, - }), - ], - }) - expect(cql.write(testFilter)).to.equal( - `((anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish'))))` - ) - }) - - it('does handles a simple boolean search other terms', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: false, - text: 'dog or cat and not (fish)', - }, - }), - new FilterBuilderClass({ - type: 'OR', - filters: [ - new FilterClass({ - property: 'datatype', - type: 'ILIKE', - value: 'Moving Image', - }), - new FilterClass({ - property: 'metadata-content-type', - type: 'ILIKE', - value: 'Moving Image', - }), - ], - }), - ], - }) - expect(cql.write(testFilter)).to.equal( - `((anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))) AND ((\"datatype\" ILIKE 'Moving Image') OR (\"metadata-content-type\" ILIKE 'Moving Image'))` - ) - }) - - it('does handles a simple boolean search other terms and negations', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - negated: true, - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: false, - text: 'dog or cat and not (fish)', - }, - }), - new FilterBuilderClass({ - type: 'OR', - filters: [ - new FilterClass({ - property: 'datatype', - type: 'ILIKE', - value: 'Moving Image', - }), - new FilterClass({ - property: 'metadata-content-type', - type: 'ILIKE', - value: 'Moving Image', - }), - ], - }), - ], - }) - expect(cql.write(testFilter)).to.equal( - `(NOT (((anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))))) AND ((\"datatype\" ILIKE 'Moving Image') OR (\"metadata-content-type\" ILIKE 'Moving Image'))` - ) - }) - - it('does handles a simple boolean search other terms with interspersed errors', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: true, - text: 'dog or cat and not (fish)', - }, - }), - new FilterBuilderClass({ - type: 'OR', - filters: [ - new FilterClass({ - property: 'datatype', - type: 'ILIKE', - value: 'Moving Image', - }), - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: true, - text: 'dog or cat and not (fish)', - }, - }), - new FilterClass({ - property: 'metadata-content-type', - type: 'ILIKE', - value: 'Moving Image', - }), - ], - }), - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: true, - text: 'dog or cat and not (fish)', - }, - }), - ], - }) - expect(cql.write(testFilter)).to.equal( - `((\"datatype\" ILIKE 'Moving Image') OR (\"metadata-content-type\" ILIKE 'Moving Image'))` - ) - }) - - it('does handles a simple boolean search other terms with interspersed errors and negations', () => { - const testFilter = new FilterBuilderClass({ - type: 'AND', - negated: true, - filters: [ - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - negated: true, - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: true, - text: 'dog or cat and not (fish)', - }, - }), - new FilterBuilderClass({ - type: 'OR', - filters: [ - new FilterClass({ - property: 'datatype', - type: 'ILIKE', - value: 'Moving Image', - }), - new FilterClass({ - type: 'BOOLEAN_TEXT_SEARCH', - negated: true, - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: true, - text: 'dog or cat and not (fish)', - }, - }), - new FilterClass({ - property: 'metadata-content-type', - type: 'ILIKE', - value: 'Moving Image', - }), - ], - }), - new FilterClass({ - negated: true, - type: 'BOOLEAN_TEXT_SEARCH', - value: { - cql: `(anyText ILIKE 'dog') or (anyText ILIKE 'cat') and (NOT ((anyText ILIKE 'fish')))`, - error: true, - text: 'dog or cat and not (fish)', - }, - }), - ], - }) - expect(cql.write(testFilter)).to.equal( - `NOT ((("datatype" ILIKE \'Moving Image\') OR ("metadata-content-type" ILIKE \'Moving Image\')))` - ) - }) - }) - - describe('multipolygon cql string read test', () => { - cqlMultipolygonStrings.geometries.forEach((capability) => { - it(`${capability}`, () => { - const filterBuilderClassOutput = cql.read(capability.input) - const filtersArray: any[] = [] - - filterBuilderClassOutput.filters.forEach((filter) => { - if (filter instanceof FilterClass) { - const { id, ...newFilter } = filter - filtersArray.push(newFilter) - } - }) - const { id, ...expectedOutput } = filterBuilderClassOutput - expectedOutput.filters = filtersArray - expect(expectedOutput, 'Unexpected filter value.').to.deep.equal( - capability.output - ) - }) - }) - }) - - describe('point and multipoint cql string read test', () => { - cqlPointStrings.geometries.forEach((capability) => { - it(`${capability}`, () => { - const filterBuilderClassOutput = cql.read(capability.input) - const filtersArray: any[] = [] - - filterBuilderClassOutput.filters.forEach((filter) => { - const { id, ...newFilter } = filter - filtersArray.push(newFilter) - }) - const { id, ...expectedOutput } = filterBuilderClassOutput - expectedOutput.filters = filtersArray - expect(expectedOutput, 'Unexpected filter value.').to.deep.equal( - capability.output - ) - }) - }) - }) - - describe('linestring and multilinestring cql string read test', () => { - cqlLinestrings.geometries.forEach((capability) => { - it(`${capability}`, () => { - const filterBuilderClassOutput = cql.read(capability.input) - const filtersArray: any[] = [] - - filterBuilderClassOutput.filters.forEach((filter) => { - const { id, ...newFilter } = filter - filtersArray.push(newFilter) - }) - const { id, ...expectedOutput } = filterBuilderClassOutput - expectedOutput.filters = filtersArray - expect(expectedOutput, 'Unexpected filter value.').to.deep.equal( - capability.output - ) - }) - }) - }) - - describe('geometry collection cql string read test', () => { - cqlGeometryCollections.geometries.forEach((capability) => { - it(`${capability}`, () => { - const filterBuilderClassOutput = cql.read(capability.input) - const filtersArray: any[] = [] - - filterBuilderClassOutput.filters.forEach((filter) => { - const { id, ...newFilter } = filter - filtersArray.push(newFilter) - }) - const { id, ...expectedOutput } = filterBuilderClassOutput - expectedOutput.filters = filtersArray - expect(expectedOutput, 'Unexpected filter value.').to.deep.equal( - capability.output - ) - }) - }) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cql.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cql.tsx deleted file mode 100644 index c6132bdbb11..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/cql.tsx +++ /dev/null @@ -1,1102 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/* Copyright (c) 2006-2015 by OpenLayers Contributors (see authors.txt for - * full list of contributors). Published under the 2-clause BSD license. - * See license.txt in the OpenLayers distribution or repository for the - * full text of the license. */ -import { - BooleanTextType, - CQLStandardFilterBuilderClass, - deserialize, - FilterBuilderClass, - FilterClass, - isBasicDatatypeClass, - isFilterBuilderClass, - isCQLStandardFilterBuilderClass, - serialize, - shouldBeFilterBuilderClass, - ValueTypes, - convertResourceSizeFilterClassValueToBytes, - isResourceSizeFilterClass, - isResourceSizeRangeFilterClass, - convertResourceSizeRangeFilterClassValueToBytes, -} from '../component/filter-builder/filter.structure' -import { getDataTypesConfiguration } from '../component/reserved-basic-datatype/reserved.basic-datatype' -import CQLUtils from './CQLUtils' -import _cloneDeep from 'lodash/cloneDeep' -import wkx from 'wkx' -import { StartupDataStore } from './model/Startup/startup' - -const getPointRadiusFilter = ( - point: [number, number], - property: string, - radius?: string -) => { - const value = { - mode: 'circle', - type: 'POINTRADIUS', - lat: point[1], - lon: point[0], - } - - return new FilterClass({ - type: 'GEOMETRY', - value: (radius ? { ...value, radius } : value) as ValueTypes['location'], - property, - }) -} - -const getLinestringFilter = ( - line: number[][], - property: string, - buffer?: string -) => { - const value = { - mode: 'line', - type: 'LINE', - line: line, - } - - return new FilterClass({ - type: 'GEOMETRY', - value: (buffer - ? { ...value, lineWidth: buffer } - : value) as ValueTypes['location'], - property, - }) -} - -const getPolygonFilter = ( - poly: number[][], - property: string, - buffer?: string -) => { - const value = { - mode: 'poly', - type: 'POLYGON', - polygon: poly, - } - - return new FilterClass({ - type: 'GEOMETRY', - value: (buffer - ? { ...value, polygonBufferWidth: buffer } - : value) as ValueTypes['location'], - property, - }) -} -const ANYTEXT_WILDCARD = '"anyText" ILIKE \'%\'' -type PrecendenceType = 'RPAREN' | 'LOGICAL' | 'COMPARISON' -type FilterFunctionNames = 'proximity' | 'pi' -type PatternReturnType = RegExp | ((text: string) => string[] | null) - -type PatternNamesType = - | 'PROPERTY' - | 'COMPARISON' - | 'IS_NULL' - | 'COMMA' - | 'LOGICAL' - | 'VALUE' - | 'FILTER_FUNCTION' - | 'BOOLEAN' - | 'LPAREN' - | 'RPAREN' - | 'SPATIAL' - | 'UNITS' - | 'NOT' - | 'BETWEEN' - | 'BEFORE' - | 'AFTER' - | 'DURING' - | 'RELATIVE' - | 'TIME' - | 'TIME_PERIOD' - | 'GEOMETRY' - -const timePattern = - /((([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?)|^'')/i, - patterns = { - //Allows for non-standard single-quoted property names - PROPERTY: /^([_a-zA-Z]\w*|"[^"]+"|'[^']+')/, - COMPARISON: /^(=|<>|<=|<|>=|>|LIKE|ILIKE)/i, - IS_NULL: /^IS NULL/i, - COMMA: /^,/, - LOGICAL: /^(AND|OR)/i, - VALUE: /^('([^']|'')*'|-?\d+(\.\d*)?|\.\d+)/, - FILTER_FUNCTION: /^[a-z]\w+\(/, - BOOLEAN: /^(false|true)/i, - LPAREN: /^\(/, - RPAREN: /^\)/, - SPATIAL: /^(BBOX|INTERSECTS|DWITHIN|WITHIN|CONTAINS)/i, - UNITS: /^(meters)/i, - NOT: /^NOT/i, - BETWEEN: /^BETWEEN/i, - BEFORE: /^BEFORE/i, - AFTER: /^AFTER/i, - DURING: /^DURING/i, - RELATIVE: /^'RELATIVE\([A-Za-z0-9.]*\)'/i, - TIME: new RegExp('^' + timePattern.source), - TIME_PERIOD: new RegExp( - '^' + timePattern.source + '/' + timePattern.source - ), - GEOMETRY(text: string) { - const type = - /^(POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)/.exec( - text - ) - if (type) { - const len = text.length - let idx = text.indexOf('(', type[0].length) - if (idx > -1) { - let depth = 1 - while (idx < len && depth > 0) { - idx++ - switch (text.charAt(idx)) { - case '(': - depth++ - break - case ')': - depth-- - break - default: - // in default case, do nothing - } - } - } - return [text.substr(0, idx + 1)] - } - return null - }, - END: /^$/, - } as Record, - follows = { - ROOT_NODE: [ - 'NOT', - 'GEOMETRY', - 'SPATIAL', - 'FILTER_FUNCTION', - 'PROPERTY', - 'LPAREN', - ], - LPAREN: [ - 'NOT', - 'GEOMETRY', - 'SPATIAL', - 'FILTER_FUNCTION', - 'PROPERTY', - 'VALUE', - 'LPAREN', - ], - RPAREN: ['NOT', 'LOGICAL', 'END', 'RPAREN', 'COMPARISON', 'COMMA'], - PROPERTY: [ - 'COMPARISON', - 'BETWEEN', - 'COMMA', - 'IS_NULL', - 'BEFORE', - 'AFTER', - 'DURING', - 'RPAREN', - ], - BETWEEN: ['VALUE'], - IS_NULL: ['RPAREN', 'LOGICAL', '[', ']'], - COMPARISON: ['RELATIVE', 'VALUE', 'BOOLEAN'], - COMMA: ['FILTER_FUNCTION', 'GEOMETRY', 'VALUE', 'UNITS', 'PROPERTY'], - VALUE: ['LOGICAL', 'COMMA', 'RPAREN', 'END'], - BOOLEAN: ['RPAREN'], - SPATIAL: ['LPAREN'], - UNITS: ['RPAREN'], - LOGICAL: [ - 'FILTER_FUNCTION', - 'NOT', - 'VALUE', - 'SPATIAL', - 'PROPERTY', - 'LPAREN', - ], - NOT: ['PROPERTY', 'LPAREN'], - GEOMETRY: ['COMMA', 'RPAREN'], - BEFORE: ['TIME'], - AFTER: ['TIME'], - DURING: ['TIME_PERIOD'], - TIME: ['LOGICAL', 'RPAREN', 'END'], - TIME_PERIOD: ['LOGICAL', 'RPAREN', 'END'], - RELATIVE: ['RPAREN', 'END'], - FILTER_FUNCTION: ['LPAREN', 'PROPERTY', 'VALUE', 'RPAREN'], - END: [], - } as Record< - PatternNamesType | 'ROOT_NODE' | 'END', - Array - >, - precedence = { - RPAREN: 3, - LOGICAL: 2, - COMPARISON: 1, - } as Record, - // as an improvement, these could be figured out while building the syntax tree - filterFunctionParamCount = { - proximity: 3, - pi: 0, - } as Record, - dateTimeFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" - -function tryToken(text: string, pattern: PatternReturnType) { - if (pattern instanceof RegExp) { - return pattern.exec(text) - } else { - return pattern(text) - } -} - -function nextToken(text: string, tokens: Array) { - let i, - token, - len = tokens.length - for (i = 0; i < len; i++) { - token = tokens[i] - const pat = patterns[token] - const matches = tryToken(text, pat) - if (matches) { - const match = matches[0] - const remainder = text.substr(match.length).replace(/^\s*/, '') - return { - type: token, - text: match, - remainder, - } - } - } - - let msg = 'ERROR: In parsing: [' + text + '], expected one of: ' - for (i = 0; i < len; i++) { - token = tokens[i] - msg += '\n ' + token + ': ' + patterns[token] - } - - throw new Error(msg) -} - -type TokenType = { - type: PatternNamesType | 'END' - text: string - remainder: string -} - -function tokenize(text: string): Array { - const results = [] - let token = undefined as undefined | TokenType - let expect = follows['ROOT_NODE'] - - do { - token = nextToken(text, expect) - text = token.remainder - expect = follows[token.type] - if (token.type !== 'END' && !expect) { - throw new Error('No follows list for ' + token.type) - } - results.push(token) - } while (token.type !== 'END') - return results -} - -type SpecialCQLCharacters = '%' | '_' - -// Mapping of Intrigue's query language syntax to CQL syntax -const userqlToCql = { - '*': '%', - '?': '_', - '%': '\\%', - _: '\\_', -} - -const translateUserqlToCql = (str: string): string => - str.replace( - /([^*?%_])?([*?%_])/g, - (_, a = '', b) => - a + (a === '\\' ? b : userqlToCql[b as SpecialCQLCharacters]) - ) - -//Mapping of CQL syntax to Intrigue's query language syntax -const cqlToUserql = { - '%': '*', - _: '?', -} as Record - -const translateCqlToUserql = (str: string): string => - str.replace(/([^%_])?([%_])/g, (_, a = '', b) => - a === '\\' ? b : a + cqlToUserql[b as SpecialCQLCharacters] - ) - -const getNextToken = (postfix: Array): TokenType => { - if ( - postfix[postfix.length - 3] && - postfix[postfix.length - 3].type === 'FILTER_FUNCTION' - ) { - // first two are useless - postfix.pop() - postfix.pop() - return postfix.pop() as TokenType - } - if ( - postfix[postfix.length - 2] && - postfix[postfix.length - 2].type === 'RELATIVE' - ) { - // first one is useless - postfix.pop() - return postfix.pop() as TokenType - } - return postfix.pop() as TokenType -} - -const getGeoFilters = ( - wkt: string, - property: string, - buffer?: string -): FilterClass | FilterBuilderClass => { - if (wkt.startsWith('GEOMETRYCOLLECTION')) { - const parsedWkt = wkx.Geometry.parse(wkt) - const geoJson = parsedWkt.toGeoJSON() as any - const innerWkts: string[] = geoJson.geometries.map((geometry: any) => - wkx.Geometry.parseGeoJSON(geometry).toWkt() - ) - return new FilterBuilderClass({ - type: 'OR', - filters: innerWkts.map((wkt) => getGeoFilters(wkt, property, buffer)), - }) - } else if (wkt.startsWith('LINESTRING')) { - const line = CQLUtils.arrayFromLinestringWkt(wkt) - return getLinestringFilter(line, property, buffer) - } else if (wkt.startsWith('MULTILINESTRING')) { - return new FilterBuilderClass({ - type: 'OR', - filters: CQLUtils.arrayFromMultilinestringWkt(wkt).map( - (line: number[][]) => getLinestringFilter(line, property, buffer) - ), - }) - } else if (wkt.startsWith('POLYGON')) { - const poly = CQLUtils.arrayFromPolygonWkt(wkt) - return getPolygonFilter(poly, property, buffer) - } else if (wkt.startsWith('MULTIPOLYGON')) { - return new FilterBuilderClass({ - type: 'OR', - filters: CQLUtils.arrayFromPolygonWkt(wkt).map((poly: number[][]) => - getPolygonFilter(poly, property, buffer) - ), - }) - } else if (wkt.startsWith('POINT')) { - const point = CQLUtils.arrayFromPointWkt(wkt)[0] - return getPointRadiusFilter(point, property, buffer) - } else if (wkt.startsWith('MULTIPOINT')) { - return new FilterBuilderClass({ - type: 'OR', - filters: CQLUtils.arrayFromPointWkt(wkt).map((point: [number, number]) => - getPointRadiusFilter(point, property, buffer) - ), - }) - } - throw new Error('Unknown spatial type encountered') -} - -function buildTree(postfix: Array): any { - let value, - property, - tok = getNextToken(postfix) - const tokenType = tok.type - switch (tokenType) { - case 'LOGICAL': - const rhs = buildTree(postfix), - lhs = buildTree(postfix) - return new FilterBuilderClass({ - filters: [lhs, rhs], - type: tok.text.toUpperCase() as FilterBuilderClass['type'], - }) - case 'NOT': - const peekToken = postfix[postfix.length - 1] as TokenType - if (peekToken.type === 'LOGICAL') { - return new FilterBuilderClass({ - ...buildTree(postfix), - negated: true, - }) - } else if (peekToken.type === 'NOT') { - return new FilterBuilderClass({ - filters: [buildTree(postfix)], - type: 'AND', - negated: true, - }) - } else { - return new FilterClass({ - ...buildTree(postfix), - negated: true, - }) - } - case 'BETWEEN': // works - let min, max - postfix.pop() // unneeded AND token here - max = buildTree(postfix) - min = buildTree(postfix) - property = buildTree(postfix) - return new FilterClass({ - property, - value: { - start: min, - end: max, - } as ValueTypes['between'], - type: tokenType as FilterClass['type'], - }) - case 'BEFORE': // works - case 'AFTER': // works - value = buildTree(postfix) - property = buildTree(postfix) - return new FilterClass({ - property, - value: value as ValueTypes['date'], - type: tok.text.toUpperCase() as FilterClass['type'], - }) - case 'DURING': // technically between for dates, works - const dates = buildTree(postfix).split('/') - property = buildTree(postfix) - return new FilterClass({ - property, - value: { - start: dates[0], - end: dates[1], - } as ValueTypes['during'], - type: tok.text.toUpperCase() as FilterClass['type'], - }) - case 'COMPARISON': // works - value = buildTree(postfix) as ValueTypes['integer'] - property = buildTree(postfix) - return new FilterClass({ - property, - value, - type: tok.text.toUpperCase() as FilterClass['type'], - }) - case 'IS_NULL': // works - property = buildTree(postfix) - return new FilterClass({ - property, - type: tok.text.toUpperCase() as FilterClass['type'], - }) - case 'VALUE': //works - const match = tok.text.match(/^'(.*)'$/) - if (match) { - if (unwrap(postfix[0].text) === 'id') { - // don't escape ids - return match[1].replace(/''/g, "'") - } else { - return translateCqlToUserql(match[1].replace(/''/g, "'")) - } - } else { - return Number(tok.text) - } - case 'BOOLEAN': // works - switch (tok.text.toUpperCase()) { - case 'TRUE': - return true - default: - return false - } - case 'SPATIAL': // working - // next token tells us whether this is DWITHIN or INTERSECTS - switch (tok.text) { - case 'INTERSECTS': { - // things without buffers, could be poly or line - const valueToken = postfix.pop() as TokenType - const propertyToken = postfix.pop() as TokenType - return getGeoFilters(valueToken.text, propertyToken.text, undefined) - } - case 'DWITHIN': { - // things with buffers, could be poly, line or point - const bufferToken = postfix.pop() as TokenType - const valueToken = postfix.pop() as TokenType - const propertyToken = postfix.pop() as TokenType - return getGeoFilters( - valueToken.text, - propertyToken.text, - bufferToken.text - ) - } - default: - throw new Error('Unknown spatial type encountered') - } - case 'GEOMETRY': - return { - type: tokenType, - value: tok.text, - } - case 'RELATIVE': - return new FilterClass({ - type: 'RELATIVE', - value: deserialize.dateRelative(tok.text), - property: (postfix.pop() as TokenType).text, - }) - case 'FILTER_FUNCTION': // working - const filterFunctionName = tok.text.slice(0, -1) // remove trailing '(' - const paramCount = - filterFunctionParamCount[filterFunctionName as FilterFunctionNames] - if (paramCount === undefined) { - throw new Error('Unsupported filter function: ' + filterFunctionName) - } - const params = Array.apply(null, Array(paramCount)) - .map(() => buildTree(postfix)) - .reverse() - switch (filterFunctionName) { - case 'proximity': - const proximityStrings = params[2] as string - return new FilterClass({ - type: 'FILTER FUNCTION proximity', - property: params[0], - value: { - first: proximityStrings.split(' ')[0], - second: proximityStrings.split(' ')[1], - distance: params[1], - } as ValueTypes['proximity'], - }) - default: - throw new Error('Unknown filter function') - } - case 'TIME_PERIOD': - return tok.text - default: - return tok.text - } -} - -function buildAst(tokens: TokenType[]) { - const operatorStack = [] as Array, - postfix = [] as Array - - while (tokens.length) { - const tok = tokens.shift() as TokenType - switch (tok.type) { - case 'PROPERTY': - tok.text = unwrap(tok.text) - case 'GEOMETRY': - case 'VALUE': - case 'TIME': - case 'TIME_PERIOD': - case 'RELATIVE': - case 'BOOLEAN': - postfix.push(tok) - break - case 'COMPARISON': - case 'BETWEEN': - case 'IS_NULL': - case 'LOGICAL': - case 'BEFORE': - case 'AFTER': - case 'DURING': - const p = precedence[tok.type as PrecendenceType] - - while ( - operatorStack.length > 0 && - precedence[ - operatorStack[operatorStack.length - 1].type as PrecendenceType - ] <= p - ) { - postfix.push(operatorStack.pop() as TokenType) - } - - operatorStack.push(tok) - break - case 'SPATIAL': - case 'NOT': - case 'LPAREN': - operatorStack.push(tok) - break - case 'FILTER_FUNCTION': - operatorStack.push(tok) - // insert a '(' manually because we lost the original LPAREN matching the FILTER_FUNCTION regex - operatorStack.push({ type: 'LPAREN' } as TokenType) - break - case 'RPAREN': - while ( - operatorStack.length > 0 && - operatorStack[operatorStack.length - 1].type !== 'LPAREN' - ) { - postfix.push(operatorStack.pop() as TokenType) - } - operatorStack.pop() // toss out the LPAREN - - // if this right parenthesis ends a function argument list (it's not for a logical grouping), - // it's now time to add that function to the postfix-ordered list - const lastOperatorType = - operatorStack.length > 0 && - operatorStack[operatorStack.length - 1].type - if ( - lastOperatorType === 'SPATIAL' || - lastOperatorType === 'FILTER_FUNCTION' - ) { - postfix.push(operatorStack.pop() as TokenType) - } - break - case 'COMMA': - case 'END': - case 'UNITS': - break - default: - throw new Error('Unknown token type ' + tok.type) - } - } - - while (operatorStack.length > 0) { - postfix.push(operatorStack.pop() as TokenType) - } - - const result = buildTree(postfix) - if (postfix.length > 0) { - let msg = 'Remaining tokens after building AST: \n' - for (let i = postfix.length - 1; i >= 0; i--) { - msg += postfix[i].type + ': ' + postfix[i].text + '\n' - } - throw new Error(msg) - } - - return result -} - -function wrap(property: string): string { - let wrapped = property - if (!wrapped.startsWith('"')) { - wrapped = '"' + wrapped - } - if (!wrapped.endsWith('"')) { - wrapped = wrapped + '"' - } - return wrapped -} - -function unwrap(property: string): string { - // Remove single and double quotes if they exist in property name - return property.replace(/^'|'$/g, '').replace(/^"|"$/g, '') -} - -// really could use some refactoring to enable better typing, right now it's recursive and calls itself with so many different types / return types -function write(filter: any): any { - switch (filter.type) { - // spatialClass - case 'BBOX': - const xmin = filter.value[0], - ymin = filter.value[1], - xmax = filter.value[2], - ymax = filter.value[3] - return ( - 'BBOX(' + - wrap(filter.property) + - ',' + - xmin + - ',' + - ymin + - ',' + - xmax + - ',' + - ymax + - ')' - ) - // verified line, polygon, point radius - case 'DWITHIN': - return `DWITHIN(${wrap(filter.property)}, ${filter.value}, ${ - filter.distance - }, meters)` - // unused at the moment - case 'WITHIN': - return ( - 'WITHIN(' + wrap(filter.property) + ', ' + write(filter.value) + ')' - ) - // verified bbox - case 'INTERSECTS': - return 'INTERSECTS(' + wrap(filter.property) + ', ' + filter.value + ')' - // unused at the moment - case 'CONTAINS': - return ( - 'CONTAINS(' + wrap(filter.property) + ', ' + write(filter.value) + ')' - ) - // all "geo" filters pass through this first, which serializes them into a form that cql understands - // this is only done here on the fly because the transformation involves a loss of information - // (such as the units [meters or miles?] and coordinate system [dms or mgrs?]) - case 'GEOMETRY': - return write(serialize.location(filter.property, filter.value)) - // logicalClass - case 'AND': - case 'OR': - let res = '(' - let first = true - for (let i = 0; i < filter.filters.length; i++) { - const writtenFilter = write(filter.filters[i]) - if (writtenFilter) { - if (first) { - first = false - } else { - res += ') ' + filter.type + ' (' - } - res += writtenFilter - } - } - return res + ')' - case 'NOT': - // TODO: deal with precedence of logical operators to - // avoid extra parentheses (not urgent) - return 'NOT (' + write(filter.filters[0]) + ')' - // comparisonClass - case 'IS NULL': - return `("${filter.property}" ${filter.type})` - case 'BETWEEN': - return ( - wrap(filter.property) + - ' BETWEEN ' + - write(Math.min(filter.value.start, filter.value.end)) + - ' AND ' + - write(Math.max(filter.value.start, filter.value.end)) - ) - case '=': - case '<>': - case '<': - case '<=': - case '>': - case '>=': - case 'LIKE': - case 'ILIKE': - let property = - typeof filter.property === 'object' - ? write(filter.property) - : wrap(unwrap(filter.property)) // unwrap first, because technically only "" is supported (so swap '' for "") - - if (filter.value === null) { - return `${property} ${filter.type}` - } - - return `${property} ${filter.type} ${ - unwrap(filter.property) === 'id' - ? `'${filter.value}'` - : write(filter.value) - }` // don't escape ids - // temporalClass - case 'RELATIVE': - // weird thing I noticed is you have to wrap the value in single quotes, double quotes don't work - return `${wrap(filter.property)} = '${serialize.dateRelative( - filter.value - )}'` - case 'AROUND': - return `${wrap(filter.property)} ${serialize.dateAround(filter.value)}` - case 'BEFORE': - case 'AFTER': - return ( - wrap(filter.property) + - ' ' + - filter.type + - ' ' + - (filter.value ? filter.value.toString(dateTimeFormat) : "''") - ) - case 'DURING': - return `${wrap(filter.property)} ${filter.type} ${filter.value.start}/${ - filter.value.end - }` - // filterFunctionClass - case 'FILTER FUNCTION proximity': - // not sure why we need the = true part but without it the backend fails to parse - return `proximity(${write(filter.property)},${write( - filter.value.distance - )},${write(`${filter.value.first} ${filter.value.second}`)}) = true` - break - case 'BOOLEAN_TEXT_SEARCH': - const booleanTextSearchFilter = filter.value as BooleanTextType - if (booleanTextSearchFilter.error) { - return - } else if (booleanTextSearchFilter.cql === '') { - return "(anyText ILIKE '*')" - } else { - return booleanTextSearchFilter.cql - } - break - case undefined: - if (typeof filter === 'string') { - return translateUserqlToCql("'" + filter.replace(/'/g, "''") + "'") - } else if (typeof filter === 'number') { - return String(filter) - } else if (typeof filter === 'boolean') { - return Boolean(filter) - } - break - default: - throw new Error("Can't encode: " + filter.type + ' ' + filter) - } -} - -function simplifyFilters(cqlAst: FilterBuilderClass) { - for (let i = 0; i < cqlAst.filters.length; i++) { - if (simplifyAst(cqlAst.filters[i], cqlAst)) { - cqlAst.filters.splice.apply( - cqlAst.filters, - ([i, 1] as any[]).concat( - (cqlAst.filters[i] as FilterBuilderClass).filters - ) - ) - } - } - return cqlAst -} - -/** - * The current read function for cql produces an unoptimized tree. While it's possible we could - * fix the output there, I'm not sure of how. It ends up producing very nested filter trees from - * relatively simple cql. - * @param cqlAst - * @param parentNode - */ -function simplifyAst( - cqlAst: FilterBuilderClass | FilterClass, - parentNode?: FilterBuilderClass -) { - if (!isFilterBuilderClass(cqlAst) && parentNode) { - return false - } else if (!parentNode) { - if (isFilterBuilderClass(cqlAst)) { - simplifyFilters(cqlAst) - } - return cqlAst - } else { - simplifyFilters(cqlAst as FilterBuilderClass) - if (cqlAst.type === parentNode.type && !cqlAst.negated) { - // these are the only simplifications we can make based on boolean algebra rules - return true - } else { - return false - } - } -} - -function uncollapseNOTs({ - cqlAst, -}: { - cqlAst: FilterBuilderClass | FilterClass -}): CQLStandardFilterBuilderClass | FilterClass { - if (isFilterBuilderClass(cqlAst)) { - if (cqlAst.negated) { - return new CQLStandardFilterBuilderClass({ - type: 'NOT', - filters: [ - new CQLStandardFilterBuilderClass({ - type: cqlAst.type, - filters: cqlAst.filters.map((filter) => - uncollapseNOTs({ cqlAst: filter }) - ), - }), - ], - }) - } else { - return new CQLStandardFilterBuilderClass({ - type: cqlAst.type, - filters: cqlAst.filters.map((filter) => - uncollapseNOTs({ cqlAst: filter }) - ), - }) - } - } else { - if (cqlAst.negated) { - const clonedFieldFilter = _cloneDeep(cqlAst) - return new CQLStandardFilterBuilderClass({ - type: 'NOT', - filters: [ - new CQLStandardFilterBuilderClass({ - type: 'AND', - filters: [ - new FilterClass({ - ...clonedFieldFilter, - }), - ], - }), - ], - }) - } else { - return cqlAst - } - } -} - -function getDataTypesConfigurationUsingStartupStore() { - return getDataTypesConfiguration({ - Configuration: StartupDataStore.Configuration, - MetacardDefinitions: StartupDataStore.MetacardDefinitions, - }) -} - -function handleAllFilterTypes( - cqlAst: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass -): CQLStandardFilterBuilderClass | FilterClass { - if (isCQLStandardFilterBuilderClass(cqlAst) || isFilterBuilderClass(cqlAst)) { - return new CQLStandardFilterBuilderClass({ - type: cqlAst.type, - filters: cqlAst.filters.map((filter) => handleAllFilterTypes(filter)), - }) - } else if (isBasicDatatypeClass(cqlAst)) { - const dataTypeConfiguration = getDataTypesConfigurationUsingStartupStore() - const datatypeFilters: FilterClass[] = [] - cqlAst.value.map((value) => { - const relevantAttributes = dataTypeConfiguration.valueMap[value] - if (relevantAttributes) { - Object.keys(relevantAttributes.attributes).map((attribute) => { - const relevantValues = relevantAttributes.attributes[attribute] - relevantValues.forEach((relevantValue) => { - datatypeFilters.push( - new FilterClass({ - property: attribute, - value: relevantValue, - type: 'ILIKE', - }) - ) - }) - }) - } - }) - return new CQLStandardFilterBuilderClass({ - type: 'AND', - filters: [ - new CQLStandardFilterBuilderClass({ - type: 'OR', - filters: datatypeFilters, - }), - ], - }) - } else if (isResourceSizeFilterClass(cqlAst)) { - const bytesValue = convertResourceSizeFilterClassValueToBytes(cqlAst) - return new FilterClass({ - ...cqlAst, - value: bytesValue, - }) - } else if (isResourceSizeRangeFilterClass(cqlAst)) { - const bytesValue = convertResourceSizeRangeFilterClassValueToBytes(cqlAst) - return new FilterClass({ - ...cqlAst, - value: bytesValue, - }) - } else { - return cqlAst - } -} - -/** - * For now, all this does is remove anyDate from cql since that's purely for the UI to track the query basic view state correctly. - * We might want to reconsider how we do the basic query in order to avoid this necessity (it's really the checkbox). - * - * This will only ever happen with a specific structure, so we don't need to recurse or anything. - */ -function removeInvalidFilters( - cqlAst: FilterBuilderClass | FilterClass | CQLStandardFilterBuilderClass -): FilterBuilderClass | FilterClass | boolean | CQLStandardFilterBuilderClass { - // loop over filters, splicing out invalid ones, at end of loop if all filters gone, remove self? - if ( - isFilterBuilderClass(cqlAst) || - shouldBeFilterBuilderClass(cqlAst) || - isCQLStandardFilterBuilderClass(cqlAst) - ) { - let i = cqlAst.filters.length - while (i--) { - const currentFilter = cqlAst.filters[i] - const validFilter = removeInvalidFilters(currentFilter) - if (!validFilter) { - cqlAst.filters.splice(i, 1) - } - } - if (cqlAst.filters.length === 0) { - return false - } - } else { - if (cqlAst.property === 'anyDate') { - return false - } - if (cqlAst.type === 'BOOLEAN_TEXT_SEARCH') { - const booleanTextValue = cqlAst.value as BooleanTextType - if (booleanTextValue.error) { - return false - } - } - } - return cqlAst -} - -function iterativelySimplify(cqlAst: FilterBuilderClass) { - let prevAst = _cloneDeep(cqlAst) - simplifyAst(cqlAst) - while (JSON.stringify(prevAst) !== JSON.stringify(cqlAst)) { - prevAst = _cloneDeep(cqlAst) - simplifyAst(cqlAst) - } - return cqlAst -} - -export default { - /** - * This function should be used only to test reconstitution, or as a last resort to handle upgrades from a system where the filter tree is - * no longer compatible. No loss of accuracy will occur, but nice UX touches like remembering coordinate systems and units will. - * - * Also, it may group things slightly different (we do our best effort, but the postfix notation technically causes parens around everything, and from there - * we do a simplification, which means the resulting filter tree may look simpler than you remember). However, once again, the accuracy and - * results returned by the search will remain the same. - * @param cql - */ - read(cql?: string): FilterBuilderClass { - if (cql === undefined || cql.length === 0) { - return new FilterBuilderClass({ - type: 'AND', - filters: [], - }) - } - // if anything goes wrong, simply log the error and move on (return a default filter tree). - try { - const reconstructedFilter = this.simplify(buildAst(tokenize(cql))) - if ( - isFilterBuilderClass(reconstructedFilter) || - shouldBeFilterBuilderClass(reconstructedFilter) - ) { - return new FilterBuilderClass(reconstructedFilter) - } else { - return new FilterBuilderClass({ - type: 'AND', - filters: [reconstructedFilter as FilterClass], - }) - } - } catch (err) { - console.error(err) - return new FilterBuilderClass({ type: 'AND', filters: [] }) - } - }, - write(filter: FilterBuilderClass): string { - try { - const standardCqlAst = handleAllFilterTypes( - uncollapseNOTs({ - cqlAst: filter, - }) - ) - removeInvalidFilters(standardCqlAst) - return write(standardCqlAst) - } catch (err) { - console.error(err) - return write( - new FilterBuilderClass({ - type: 'AND', - filters: [], - }) - ) - } - }, - removeInvalidFilters, - simplify(cqlAst: FilterBuilderClass): FilterBuilderClass { - return iterativelySimplify(cqlAst) - }, - translateCqlToUserql, - translateUserqlToCql, - ANYTEXT_WILDCARD, - getGeoFilters, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/application.patches.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/application.patches.tsx deleted file mode 100644 index f01f12074ca..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/application.patches.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Collection of patches we apply to various libraries or setup functions - */ -import '../requestAnimationFramePolyfill' - -import '../ApplicationHelpers' -import '../Autocomplete' -import './network.proxy' -import './backbone.ajax' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/backbone.ajax.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/backbone.ajax.tsx deleted file mode 100644 index d56d703a19e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/backbone.ajax.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import Backbone from 'backbone' -import { - checkForErrors, - throwFetchErrorEvent, -} from '../../react-component/utils/fetch/fetch' -type BackboneAjaxType = NonNullable[0]> - -const oldBackboneAjax = Backbone.ajax - -Backbone.ajax = function (request: Required) { - const originalError = request.error - const newError: typeof request.error = (...params) => { - throwFetchErrorEvent([params[2]]) - if (typeof originalError === 'function') { - originalError.apply(this, params) - } else if (typeof originalError === 'object') { - originalError.forEach((errorCallback) => { - if (typeof errorCallback === 'function') { - errorCallback.apply(this, params) - } - }) - } - } - const originalSuccess = request.success - const newSuccess: typeof request.success = (...params) => { - checkForErrors(params[0]) // query response is 200 even with errors -> check if any source has an error - if (typeof originalSuccess === 'function') { - originalSuccess.apply(this, params) - } else if (typeof originalSuccess === 'object') { - originalSuccess.forEach((successCallback) => { - if (typeof successCallback === 'function') { - successCallback.apply(this, params) - } - }) - } - } - request.error = newError - request.success = newSuccess - return oldBackboneAjax(request) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/network.proxy.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/network.proxy.tsx deleted file mode 100644 index 61fbe1ad8bf..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/extensions/network.proxy.tsx +++ /dev/null @@ -1,14 +0,0 @@ -/** - * When we're in test environment, patch everything to avoid hitting the network. - * - * For now this is a simple voiding of fetch, but we could detect which model is doing the fetch and return mocked responses. - */ -import { Environment } from '../Environment' -import * as Backbone from 'backbone' - -if (Environment.isTest()) { - // @ts-expect-error ts-migrate(2322) FIXME: Type '() => void' is not assignable to type '(opti... Remove this comment to see the full error message - Backbone.Model.prototype.fetch = function () { - // mock response? - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/jquery.whenAll.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/jquery.whenAll.ts deleted file mode 100644 index ced63393ea1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/jquery.whenAll.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import $ from 'jquery' -;($ as any).whenAll = function () { - let args = arguments, - sliceDeferred = [].slice, - i = 0, - length = args.length, - count = length, - rejected: any, - deferred = $.Deferred() - function resolveFunc(i: any, reject: any) { - return function (value: any) { - rejected = rejected || reject - args[i] = arguments.length > 1 ? sliceDeferred.call(arguments, 0) : value - if (!--count) { - // Strange bug in FF4: - // Values changed onto the arguments object sometimes end up as undefined values - // outside the $.when method. Cloning the object into a fresh array solves the issue - const fn = rejected ? deferred.rejectWith : deferred.resolveWith - fn.call(deferred, deferred, sliceDeferred.call(args, 0)) - } - } - } - for (; i < length; i++) { - if (args[i] && $.isFunction(args[i].promise)) { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - args[i].promise().then(resolveFunc(i), resolveFunc(i, true)) - } else { - --count - } - } - if (count === 0) { - deferred.resolveWith(deferred, args) - } - return deferred.promise() -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Alert.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Alert.ts deleted file mode 100644 index 3b0ac77cdf0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Alert.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import Backbone from 'backbone' - -import { v4 } from 'uuid' -import 'backbone-associations' - -export default Backbone.AssociatedModel.extend({ - defaults: { - unseen: true, - queryId: undefined, - when: undefined, - metacardIds: [], - }, - initialize() { - if (!this.id) { - this.set('id', v4()) - } - }, - getTimeComparator() { - return this.get('when') - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/AsyncTask/async-task.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/AsyncTask/async-task.tsx deleted file mode 100644 index 58f8d4dde8b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/AsyncTask/async-task.tsx +++ /dev/null @@ -1,712 +0,0 @@ -import { Subscribable } from '../Base/base-classes' -import * as React from 'react' -import _cloneDeep from 'lodash/cloneDeep' -import { LazyQueryResult } from '../LazyQueryResult/LazyQueryResult' -import fetch from '../../../react-component/utils/fetch' -import { useParams } from 'react-router-dom' -import CQL from '../../cql' -import { v4 } from 'uuid' - -type PlainMetacardPropertiesType = - LazyQueryResult['plain']['metacard']['properties'] - -type MinimalPropertySet = Partial & { - title: PlainMetacardPropertiesType['title'] -} - -export const convertToBackendCompatibleForm = ({ - properties, -}: { - properties: MinimalPropertySet -}) => { - const duplicatedProperties = _cloneDeep(properties) - Object.keys(duplicatedProperties).forEach((key) => { - if (typeof duplicatedProperties[key] !== 'string') { - if (duplicatedProperties[key]?.constructor === Array) { - duplicatedProperties[key] = (duplicatedProperties[key] as any[]).map( - (value) => { - if (typeof value === 'object') { - // sorts on queries! - return value - } - return value.toString() - } - ) - } else { - duplicatedProperties[key] = duplicatedProperties[key]?.toString() - } - } - }) - return duplicatedProperties -} - -type AsyncSubscriptionsType = { thing: 'update' } -/** - * Provides a singleton for tracking async tasks in the UI - */ -class AsyncTasksClass extends Subscribable<{ - thing: 'add' | 'remove' | 'update' -}> { - list: Array - constructor() { - super() - this.list = [] - } - delete({ lazyResult }: { lazyResult: LazyQueryResult }) { - const existingTask = this.list - .filter(DeleteTask.isInstanceOf) - .find((task) => task.lazyResult === lazyResult) - if (existingTask) { - return existingTask - } - const newTask = new DeleteTask({ lazyResult }) - this.add(newTask) - return newTask - } - restore({ lazyResult }: { lazyResult: LazyQueryResult }) { - const existingTask = this.list - .filter(RestoreTask.isInstanceOf) - .find((task) => task.lazyResult === lazyResult) - if (existingTask) { - return existingTask - } - const newTask = new RestoreTask({ lazyResult }) - this.add(newTask) - return newTask - } - create({ - data, - metacardType, - }: { - data: MinimalPropertySet - metacardType: string - }) { - const newTask = new CreateTask({ data, metacardType }) - this.add(newTask) - return newTask - } - save({ - lazyResult, - data, - metacardType, - }: { - data: PlainMetacardPropertiesType - lazyResult: LazyQueryResult - metacardType: string - }) { - const existingTask = this.list - .filter(SaveTask.isInstanceOf) - .find((task) => task.lazyResult === lazyResult) - if (existingTask) { - existingTask.update({ data }) - return existingTask - } - const newTask = new SaveTask({ lazyResult, data, metacardType }) - this.add(newTask) - return newTask - } - createSearch({ data }: { data: PlainMetacardPropertiesType }) { - const newTask = new CreateSearchTask({ data }) - this.add(newTask) - return newTask - } - saveSearch({ - lazyResult, - data, - }: { - data: PlainMetacardPropertiesType - lazyResult: LazyQueryResult - }) { - const existingTask = this.list - .filter(SaveSearchTask.isInstanceOf) - .find((task) => task.lazyResult === lazyResult) - if (existingTask) { - existingTask.update({ data }) - return existingTask - } - const newTask = new SaveSearchTask({ lazyResult, data }) - this.add(newTask) - return newTask - } - isRestoreTask(task: AsyncTask): task is RestoreTask { - return RestoreTask.isInstanceOf(task) - } - isDeleteTask(task: AsyncTask): task is DeleteTask { - return DeleteTask.isInstanceOf(task) - } - isCreateTask(task: AsyncTask): task is CreateTask { - return CreateTask.isInstanceOf(task) - } - isSaveTask(task: AsyncTask): task is SaveTask { - return SaveTask.isInstanceOf(task) - } - isCreateSearchTask(task: AsyncTask): task is CreateSearchTask { - return CreateSearchTask.isInstanceOf(task) - } - isSaveSearchTask(task: AsyncTask): task is SaveSearchTask { - return SaveSearchTask.isInstanceOf(task) - } - hasShowableTasks() { - return ( - this.list.filter((task) => !SaveSearchTask.isInstanceOf(task)).length > 0 - ) - } - private add(asyncTask: AsyncTask) { - if (this.list.indexOf(asyncTask) === -1) { - this.list.push(asyncTask) - this._notifySubscribers({ thing: 'add' }) - this._notifySubscribers({ thing: 'update' }) - } - } - remove(asyncTask: AsyncTask) { - const index = this.list.indexOf(asyncTask) - if (index >= 0) { - this.list.splice(this.list.indexOf(asyncTask), 1) - this._notifySubscribers({ thing: 'remove' }) - this._notifySubscribers({ thing: 'update' }) - } - } -} - -export const AsyncTasks = new AsyncTasksClass() - -/** - * Goal is to provide a common abstraction to track long running async tasks in the UI, and free up the user to do whatever they want during them. - * Through subscriptions, we'll allow views to track progress if necessary. (useTaskProgress hooks?) - */ -abstract class AsyncTask extends Subscribable { - constructor() { - super() - } -} - -export const useRenderOnAsyncTasksAddOrRemove = () => { - const [, setForceRender] = React.useState(Math.random()) - React.useEffect(() => { - const unsub = AsyncTasks.subscribeTo({ - subscribableThing: 'update', - callback: () => { - setForceRender(Math.random()) - }, - }) - return () => { - unsub() - } - }, []) - return -} - -// allow someone to see if one exists, and sub to updates -export const useRestoreSearchTaskBasedOnParams = () => { - const { id } = useParams<{ id?: string }>() - const task = useRestoreSearchTask({ id }) - return task -} - -// allow someone to see if one exists, and sub to updates -export const useRestoreSearchTask = ({ id }: { id?: string }) => { - const [task, setTask] = React.useState(null as null | RestoreTask) - useRenderOnAsyncTasksAddOrRemove() - React.useEffect(() => { - const updateTask = () => { - /** - * Watch out for metacard.deleted.id not existing, hence the guard, - * and also that either id could match depending on where we are in the restore - * process - */ - const relevantTask = id - ? AsyncTasks.list.filter(RestoreTask.isInstanceOf).find((task) => { - return ( - task.lazyResult.plain.metacard.properties[ - 'metacard.deleted.id' - ] === id || task.lazyResult.plain.metacard.properties['id'] === id - ) - }) - : null - setTask(relevantTask || null) - } - const unsub = AsyncTasks.subscribeTo({ - subscribableThing: 'update', - callback: () => { - updateTask() - }, - }) - updateTask() - return () => { - unsub() - } - }, [id]) - - return task -} - -// allow someone to see if one exists, and sub to updates -export const useCreateTaskBasedOnParams = () => { - const { id } = useParams<{ id?: string }>() - const task = useCreateTask({ id }) - return task -} - -// allow someone to see if one exists, and sub to updates -export const useCreateTask = ({ id }: { id?: string }) => { - const [task, setTask] = React.useState(null as null | CreateTask) - useRenderOnAsyncTasksAddOrRemove() - React.useEffect(() => { - const updateTask = () => { - const relevantTask = AsyncTasks.list - .filter(CreateTask.isInstanceOf) - .find((task) => { - return task.data.id === id - }) - setTask(relevantTask || null) - } - const unsub = AsyncTasks.subscribeTo({ - subscribableThing: 'update', - callback: () => { - updateTask() - }, - }) - updateTask() - return () => { - unsub() - } - }, [id]) - - return task -} - -// allow someone to see if one exists, and sub to updates -export const useSaveTaskBasedOnParams = () => { - const { id } = useParams<{ id?: string }>() - const task = useSaveTask({ id }) - return task -} - -// allow someone to see if one exists, and sub to updates -export const useSaveTask = ({ id }: { id?: string }) => { - const [task, setTask] = React.useState(null as null | SaveTask) - useRenderOnAsyncTasksAddOrRemove() - React.useEffect(() => { - const updateTask = () => { - const relevantTask = AsyncTasks.list - .filter(SaveTask.isInstanceOf) - .find((task) => { - return task.data.id === id - }) - setTask(relevantTask || null) - } - const unsub = AsyncTasks.subscribeTo({ - subscribableThing: 'update', - callback: () => { - updateTask() - }, - }) - updateTask() - return () => { - unsub() - } - }, [id]) - - return task -} - -// allow someone to see if one exists, and sub to updates -export const useCreateSearchTaskBasedOnParams = () => { - const { id } = useParams<{ id?: string }>() - const task = useCreateSearchTask({ id }) - return task -} - -// allow someone to see if one exists, and sub to updates -export const useCreateSearchTask = ({ id }: { id?: string }) => { - const [task, setTask] = React.useState(null as null | CreateSearchTask) - useRenderOnAsyncTasksAddOrRemove() - React.useEffect(() => { - const updateTask = () => { - const relevantTask = AsyncTasks.list - .filter(CreateSearchTask.isInstanceOf) - .find((task) => { - return task.data.id === id - }) - setTask(relevantTask || null) - } - const unsub = AsyncTasks.subscribeTo({ - subscribableThing: 'update', - callback: () => { - updateTask() - }, - }) - updateTask() - return () => { - unsub() - } - }, [id]) - - return task -} - -// allow someone to see if one exists, and sub to updates -export const useSaveSearchTaskBasedOnParams = () => { - const { id } = useParams<{ id?: string }>() - const task = useSaveSearchTask({ id }) - return task -} - -// allow someone to see if one exists, and sub to updates -export const useSaveSearchTask = ({ id }: { id?: string }) => { - const [task, setTask] = React.useState(null as null | CreateSearchTask) - useRenderOnAsyncTasksAddOrRemove() - React.useEffect(() => { - const updateTask = () => { - const relevantTask = AsyncTasks.list - .filter(SaveSearchTask.isInstanceOf) - .find((task) => { - return task.data.id === id - }) - setTask(relevantTask || null) - } - const unsub = AsyncTasks.subscribeTo({ - subscribableThing: 'update', - callback: () => { - updateTask() - }, - }) - updateTask() - return () => { - unsub() - } - }, [id]) - - return task -} - -/** - * Pass an async task that you want updates for. Each update will cause your component to rerender, - * and then you can then check whatever you want to about the task. - */ -export const useRenderOnAsyncTaskUpdate = ({ - asyncTask, -}: { - asyncTask: AsyncTask -}) => { - const [, setForceRender] = React.useState(Math.random()) - React.useEffect(() => { - const unsub = asyncTask.subscribeTo({ - subscribableThing: 'update', - callback: () => { - setForceRender(Math.random()) - }, - }) - return () => { - unsub() - } - }, []) - return -} - -const getCqlForFilterTree = (filterTree: any): string => { - if (typeof filterTree === 'string') { - try { - filterTree = JSON.parse(filterTree) - } catch (err) { - // Continue using string literal if string is not valid JSON. - } - } - return CQL.write(filterTree) -} - -class RestoreTask extends AsyncTask { - lazyResult: LazyQueryResult - constructor({ lazyResult }: { lazyResult: LazyQueryResult }) { - super() - this.lazyResult = lazyResult - this.attemptRestore() - } - attemptRestore() { - const unsubscibeCallback = this.lazyResult.subscribeTo({ - subscribableThing: 'backboneSync', - callback: () => { - const deletedId = - this.lazyResult.plain.metacard.properties['metacard.deleted.id'] - const deletedVersion = - this.lazyResult.plain.metacard.properties['metacard.deleted.version'] - const sourceId = this.lazyResult.plain.metacard.properties['source-id'] - if (!deletedId) { - window.setTimeout(() => { - this.lazyResult.refreshDataOverNetwork() - }, 5000) - } else { - fetch( - `./internal/history/revert/${deletedId}/${deletedVersion}/${sourceId}` - ).then(() => { - this._notifySubscribers({ thing: 'update' }) - }) - unsubscibeCallback() - } - }, - }) - window.setTimeout(() => { - this.lazyResult.refreshDataOverNetwork() - }, 5000) - } - static isInstanceOf(task: any): task is RestoreTask { - return task.constructor === RestoreTask - } -} - -class DeleteTask extends AsyncTask { - lazyResult: LazyQueryResult - constructor({ lazyResult }: { lazyResult: LazyQueryResult }) { - super() - this.lazyResult = lazyResult - setTimeout(() => { - this.attemptDelete() - }, 1000) - } - attemptDelete() { - const payload = { - id: '1', - jsonrpc: '2.0', - method: 'ddf.catalog/delete', - params: { - ids: [this.lazyResult.plain.id], - }, - } - fetch('/direct', { - method: 'POST', - body: JSON.stringify(payload), - }).then(() => { - this._notifySubscribers({ thing: 'update' }) - }) - } - static isInstanceOf(task: any): task is DeleteTask { - return task.constructor === DeleteTask - } -} - -class CreateTask extends AsyncTask { - metacardType: string - data: MinimalPropertySet - constructor({ - data, - metacardType, - }: { - data: MinimalPropertySet - metacardType: string - }) { - super() - this.metacardType = metacardType - this.data = data - this.data.id = this.data.id || v4() - setTimeout(() => { - this.attemptSave() - }, 1000) - } - attemptSave() { - const payload = { - id: '1', - jsonrpc: '2.0', - method: 'ddf.catalog/create', - params: { - metacards: [ - { - attributes: { - ...convertToBackendCompatibleForm({ properties: this.data }), - }, - metacardType: this.metacardType, - }, - ], - }, - } - - fetch('/direct', { - method: 'POST', - body: JSON.stringify(payload), - }).then(() => { - this._notifySubscribers({ thing: 'update' }) - }) - } - static isInstanceOf(task: any): task is CreateTask { - return task.constructor === CreateTask - } -} - -class SaveTask extends AsyncTask { - metacardType: string - lazyResult: LazyQueryResult - data: PlainMetacardPropertiesType - controller: AbortController - timeoutid: number | undefined - constructor({ - lazyResult, - data, - metacardType, - }: { - lazyResult: LazyQueryResult - data: PlainMetacardPropertiesType - metacardType: string - }) { - super() - this.metacardType = metacardType - this.lazyResult = lazyResult - this.data = data - this.controller = new AbortController() - this.attemptSave() - } - update({ data }: { data: PlainMetacardPropertiesType }) { - clearTimeout(this.timeoutid) - this.controller.abort() - this.data = data - this.attemptSave() - } - attemptSave() { - this.controller = new AbortController() - this.timeoutid = window.setTimeout(() => { - const payload = { - id: '1', - jsonrpc: '2.0', - method: 'ddf.catalog/update', - params: { - metacards: [ - { - attributes: { - ...convertToBackendCompatibleForm({ properties: this.data }), - }, - metacardType: this.metacardType, - }, - ], - }, - } - - fetch('/direct', { - method: 'POST', - body: JSON.stringify(payload), - signal: this.controller.signal, - }).then(() => { - this.lazyResult.refreshDataOverNetwork() - const unsub = this.lazyResult.subscribeTo({ - subscribableThing: 'backboneSync', - callback: () => { - this._notifySubscribers({ thing: 'update' }) - unsub() - }, - }) - }) - }, 500) - } - static isInstanceOf(task: any): task is SaveTask { - return task.constructor === SaveTask - } -} - -class CreateSearchTask extends AsyncTask { - lazyResult?: LazyQueryResult - data: LazyQueryResult['plain']['metacard']['properties'] - constructor({ - data, - }: { - data: LazyQueryResult['plain']['metacard']['properties'] - }) { - super() - this.data = data - this.data.id = v4() - setTimeout(() => { - this.attemptSave() - }, 1000) - } - attemptSave() { - const payload = { - id: '1', - jsonrpc: '2.0', - method: 'ddf.catalog/create', - params: { - metacards: [ - { - attributes: { - ...convertToBackendCompatibleForm({ properties: this.data }), - 'metacard-tags': ['query'], - cql: getCqlForFilterTree(this.data.filterTree), - }, - metacardType: 'metacard.query', - }, - ], - }, - } - - fetch('/direct', { - method: 'POST', - body: JSON.stringify(payload), - }).then(() => { - this._notifySubscribers({ thing: 'update' }) - }) - } - static isInstanceOf(task: any): task is CreateSearchTask { - return task.constructor === CreateSearchTask - } -} - -class SaveSearchTask extends AsyncTask { - lazyResult: LazyQueryResult - data: PlainMetacardPropertiesType - controller: AbortController - timeoutid: number | undefined - constructor({ - lazyResult, - data, - }: { - lazyResult: LazyQueryResult - data: PlainMetacardPropertiesType - }) { - super() - this.lazyResult = lazyResult - this.data = data - this.controller = new AbortController() - this.attemptSave() - } - update({ data }: { data: PlainMetacardPropertiesType }) { - clearTimeout(this.timeoutid) - this.controller.abort() - this.data = data - this.attemptSave() - } - attemptSave() { - this.controller = new AbortController() - this.timeoutid = window.setTimeout(() => { - const payload = { - id: '1', - jsonrpc: '2.0', - method: 'ddf.catalog/create', - params: { - metacards: [ - { - attributes: { - ...convertToBackendCompatibleForm({ properties: this.data }), - 'metacard-tags': ['query'], - cql: getCqlForFilterTree(this.data.filterTree), - }, - metacardType: 'metacard.query', - }, - ], - }, - } - - fetch('/direct', { - method: 'POST', - body: JSON.stringify(payload), - signal: this.controller.signal, - }).then(() => { - this.lazyResult.refreshDataOverNetwork() - const unsub = this.lazyResult.subscribeTo({ - subscribableThing: 'backboneSync', - callback: () => { - this._notifySubscribers({ thing: 'update' }) - unsub() - }, - }) - }) - }, 500) - } - static isInstanceOf(task: any): task is SaveSearchTask { - return task.constructor === SaveSearchTask - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/base-classes.hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/base-classes.hooks.tsx deleted file mode 100644 index 31617113b95..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/base-classes.hooks.tsx +++ /dev/null @@ -1,28 +0,0 @@ -// hooks to deal with the base classes -import React from 'react' -import { Subscribable, Overridable } from './base-classes' - -export function useSubscribable( - subscribable: Subscribable, - thing: T['thing'], - callback: (val: T['args']) => void -) { - React.useEffect(() => { - return subscribable.subscribeTo({ subscribableThing: thing, callback }) - }, [subscribable, thing, callback]) -} - -/** - * Notice that we are passing a function to useState. This is because useState will call functions - * that are passed to it to compute the initial state. Since overridable.get() could return a function, - * we need to encapsulate the call to it within another function to ensure that useState handles it correctly. - * Similar with setValue, when passed a function it assumes you're trying to access the previous state, so we - * need to encapsulate that call as well. - */ -export function useOverridable(overridable: Overridable) { - const [value, setValue] = React.useState(() => overridable.get()) - useSubscribable(overridable, 'override', () => { - setValue(() => overridable.get()) - }) - return value -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/base-classes.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/base-classes.tsx deleted file mode 100644 index 030650d38b2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/base-classes.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Attempt to pull out what is a fairly common pattern around subscribing - * to instances. - */ -export class Subscribable { - subscriptionsToMe: Record void>> - subscribeTo({ - subscribableThing, - callback, - }: { - subscribableThing: T['thing'] - callback: (val: T['args']) => void - }) { - const id = Math.random().toString() - if (!this.subscriptionsToMe[subscribableThing]) { - this.subscriptionsToMe[subscribableThing] = {} - } - this.subscriptionsToMe[subscribableThing][id] = callback - return () => { - delete this.subscriptionsToMe[subscribableThing][id] - } - } - _notifySubscribers(parameters: T) { - const subscribers = this.subscriptionsToMe[parameters['thing']] - if (subscribers) - Object.values(subscribers).forEach((callback) => - callback(parameters['args']) - ) - } - constructor() { - this.subscriptionsToMe = {} - } -} - -export class Overridable extends Subscribable<{ - thing: 'override' - args: T -}> { - private value: T - constructor(value: T) { - super() - this.value = value - } - override(newValue: T) { - this.value = newValue - this._notifySubscribers({ thing: 'override', args: newValue }) - } - get() { - return this.value - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/subscribable.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/subscribable.spec.tsx deleted file mode 100644 index d1e95c1f73d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Base/subscribable.spec.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Subscribable } from './base-classes' - -class ExampleClass extends Subscribable<{ thing: 'one' } | { thing: 'two' }> { - constructor() { - super() - setTimeout(() => { - this._notifySubscribers({ thing: 'one' }) - this._notifySubscribers({ thing: 'two' }) - }, 500) // 2000ms is max before jest complains - } -} - -describe('subscribable classes work as expected', () => { - it('allows subscribing', (done) => { - const exampleInstance = new ExampleClass() - exampleInstance.subscribeTo({ - subscribableThing: 'one', - callback: () => { - done() - }, - }) - }) - - it('allows unsubscribing', (done) => { - const exampleInstance = new ExampleClass() - const unsubCall = exampleInstance.subscribeTo({ - subscribableThing: 'one', - callback: () => { - throw new Error('This should not happen') - }, - }) - unsubCall() - setTimeout(() => { - done() - }, 1000) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.tsx deleted file mode 100644 index 887af56c8f2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/LazyQueryResult.tsx +++ /dev/null @@ -1,476 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { ResultType } from '../Types' -import QueryResult from '../QueryResult' -import { LazyQueryResults, AttributeHighlights } from './LazyQueryResults' -import cql from '../../cql' -import _ from 'underscore' -import * as TurfMeta from '@turf/meta' -import wkx from 'wkx' -import { - FilterBuilderClass, - FilterClass, -} from '../../../component/filter-builder/filter.structure' -import Common from '../../Common' -const debounceTime = 50 -import $ from 'jquery' -import { StartupDataStore } from '../Startup/startup' -function getThumbnailAction(result: ResultType) { - return result.actions.find( - (action) => action.id === 'catalog.data.metacard.thumbnail' - ) -} -function humanizeResourceSize(plain: ResultType) { - if (plain.metacard.properties['resource-size']) { - plain.metacard.properties['resource-size'] = Common.getFileSize( - plain.metacard.properties['resource-size'] - ) - } -} -/** - * Add defaults, etc. We need to make sure everything has a tag at the very least - */ -const transformPlain = ({ - plain, -}: { - plain: LazyQueryResult['plain'] -}): LazyQueryResult['plain'] => { - if (!plain.metacard.properties['metacard-tags']) { - plain.metacard.properties['metacard-tags'] = ['resource'] - } - const thumbnailAction = getThumbnailAction(plain) - if (thumbnailAction) { - plain.metacard.properties.thumbnail = thumbnailAction.url - } - plain.metacardType = plain.metacard.properties['metacard-type'] - if ( - plain.metacardType === 'metacard.query' || - (plain.metacard.properties['metacard.deleted.tags'] && - plain.metacard.properties['metacard.deleted.tags'].includes('query')) - ) { - // since the plain cql search endpoint doesn't understand more complex properties on metacards, we can handle them like this - // plain.metacard.properties.filterTree = - // plain.metacard.properties.filterTree && - // typeof plain.metacard.properties.filterTree === 'string' - // ? JSON.parse(plain.metacard.properties.filterTree) - // : plain.metacard.properties.filterTree - // we could do the same thing we do for filterTree in query to get rid of this, but it requires a lot of tech debt cleanup I think - try { - plain.metacard.properties.sorts = - plain.metacard.properties.sorts && - typeof plain.metacard.properties.sorts[0] === 'string' - ? (plain.metacard.properties.sorts as string[]).map((sort) => { - const attribute = sort - .split('attribute=')[1] - .split(', direction=')[0] - const direction = sort.split(', direction=')[1].slice(0, -1) - return { - attribute, - direction, - } - }) - : plain.metacard.properties.sorts - } catch (err) { - plain.metacard.properties.sorts = - plain.metacard.properties.sorts && - typeof plain.metacard.properties.sorts[0] === 'string' - ? (plain.metacard.properties.sorts as string[]).map((sort) => { - const attribute = sort.split(',')[0] - const direction = sort.split(',')[1] - return { - attribute, - direction, - } - }) - : plain.metacard.properties.sorts - } - } - plain.metacard.id = plain.metacard.properties.id - plain.id = plain.metacard.properties.id - return plain -} -type SubscribableType = - | 'backboneCreated' - | 'selected' - | 'filtered' - | 'backboneSync' -type SubscriptionType = { - [key: string]: () => void -} -export class LazyQueryResult { - ['subscriptionsToMe.backboneCreated']: { - [key: string]: () => void - }; - ['subscriptionsToMe.backboneSync']: { - [key: string]: () => void - }; - ['subscriptionsToMe.selected']: { - [key: string]: () => void - }; - ['subscriptionsToMe.filtered']: { - [key: string]: () => void - } - subscribeTo({ - subscribableThing, - callback, - }: { - subscribableThing: SubscribableType - callback: () => void - }) { - const id = Math.random().toString() - // @ts-ignore - this[`subscriptionsToMe.${subscribableThing}`][id] = callback - return () => { - // @ts-ignore - delete this[`subscriptionsToMe.${subscribableThing}`][id] - } - } - _notifySubscribers(subscribableThing: SubscribableType) { - // @ts-ignore - const subscribers = this[ - `subscriptionsToMe.${subscribableThing}` - ] as SubscriptionType - Object.values(subscribers).forEach((callback) => callback()) - } - ['_notifySubscribers.backboneCreated']() { - this._notifySubscribers('backboneCreated') - } - ['_notifySubscribers.backboneSync']() { - this._notifySubscribers('backboneSync') - } - ['_notifySubscribers.selected']() { - this._notifySubscribers('selected') - } - ['_notifySubscribers.filtered']() { - this._notifySubscribers('filtered') - } - _turnOnDebouncing() { - this['_notifySubscribers.backboneCreated'] = _.debounce( - this['_notifySubscribers.backboneCreated'], - debounceTime - ) - this['_notifySubscribers.backboneSync'] = _.debounce( - this['_notifySubscribers.backboneSync'], - debounceTime - ) - this['_notifySubscribers.selected'] = _.debounce( - this['_notifySubscribers.selected'], - debounceTime - ) - this['_notifySubscribers.filtered'] = _.debounce( - this['_notifySubscribers.filtered'], - debounceTime - ) - } - index: number - prev?: LazyQueryResult - next?: LazyQueryResult - parent?: LazyQueryResults - plain: ResultType - backbone?: any - isResourceLocal: boolean - highlights: AttributeHighlights - type: 'query-result'; - ['metacard.id']: string - isSelected: boolean - isFiltered: boolean - constructor(plain: ResultType, highlights: AttributeHighlights = {}) { - this.highlights = highlights - this.type = 'query-result' - this.plain = transformPlain({ plain }) - this.isResourceLocal = false || plain.isResourceLocal - this['subscriptionsToMe.backboneCreated'] = {} - this['subscriptionsToMe.backboneSync'] = {} - this['subscriptionsToMe.selected'] = {} - this['subscriptionsToMe.filtered'] = {} - this['metacard.id'] = plain.metacard.properties.id - this.isSelected = false - this.isFiltered = false - humanizeResourceSize(plain) - } - syncWithBackbone() { - if (this.backbone) { - this.plain = transformPlain({ plain: this.backbone.toJSON() }) - humanizeResourceSize(this.plain) - this['_notifySubscribers.backboneSync']() - } - } - syncWithPlain() { - this.plain = transformPlain({ plain: { ...this.plain } }) - humanizeResourceSize(this.plain) - this['_notifySubscribers.backboneSync']() - } - // this is a partial update (like title only or something) - refreshFromEditResponse( - response: [ - { - ids: string[] - attributes: [ - { - attribute: string - values: string[] - } - ] - } - ] - ) { - response.forEach((part) => - part.attributes.forEach((attribute) => { - this.plain.metacard.properties[attribute.attribute] = - StartupDataStore.MetacardDefinitions.isMulti(attribute.attribute) - ? attribute.values - : attribute.values[0] - }) - ) - // I think we should update the edit endpoint to include the new metacard modified date, as this is just to force a refresh - this.plain.metacard.properties['metacard.modified'] = new Date().toJSON() - this.syncWithPlain() - } - // we have the entire metacard sent back - refreshData( - metacardProperties: LazyQueryResult['plain']['metacard']['properties'] - ) { - if (metacardProperties !== undefined) { - this.plain.metacard.properties = metacardProperties - this.syncWithPlain() - } else { - this.refreshDataOverNetwork() - } - } - // just ask the source of truth - refreshDataOverNetwork() { - //let solr flush - setTimeout(() => { - const req = { - count: 1, - cql: cql.write( - new FilterBuilderClass({ - type: 'AND', - filters: [ - new FilterBuilderClass({ - type: 'OR', - filters: [ - new FilterClass({ - type: '=', - property: '"id"', - value: - this.plain.metacard.properties['metacard.deleted.id'] || - this.plain.id, - }), - new FilterClass({ - type: '=', - property: '"metacard.deleted.id"', - value: this.plain.id, - }), - ], - }), - new FilterClass({ - type: 'ILIKE', - property: '"metacard-tags"', - value: '*', - }), - ], - }) - ), - id: '0', - sort: 'modified:desc', - src: this.plain.metacard.properties['source-id'], - } - $.ajax({ - type: 'POST', - url: './internal/cql', - data: JSON.stringify(req), - contentType: 'application/json', - }).then(this.parseRefresh.bind(this), this.handleRefreshError.bind(this)) - }, 1000) - } - handleRefreshError() { - //do nothing for now, should we announce this? - } - parseRefresh(response: { results: ResultType[] }) { - response.results.forEach((result) => { - this.plain = result - }) - this.syncWithPlain() - } - getDownloadUrl(): string { - const downloadAction = this.plain.actions.find( - (action) => - action.id === 'catalog.data.metacard.resource.alternate-download' - ) - - return downloadAction - ? downloadAction.url - : this.plain.metacard.properties['resource-download-url'] - } - getPreview(): string { - return this.plain.metacard.properties['ext.extracted.text'] - } - hasPreview(): boolean { - return this.plain.metacard.properties['ext.extracted.text'] !== undefined - } - isSearch(): boolean { - return this.plain.metacard.properties['metacard-type'] === 'metacard.query' - } - isResource(): boolean { - return ( - this.plain.metacard.properties['metacard-tags'].indexOf('resource') >= 0 - ) - } - isRevision(): boolean { - return ( - this.plain.metacard.properties['metacard-tags'].indexOf('revision') >= 0 - ) - } - isDeleted(): boolean { - return ( - this.plain.metacard.properties['metacard-tags'].indexOf('deleted') >= 0 - ) - } - isRemote(): boolean { - const harvestedSources = StartupDataStore.Sources.harvestedSources - return ( - harvestedSources.includes(this.plain.metacard.properties['source-id']) === - false - ) - } - hasGeometry(attribute?: any): boolean { - return ( - _.filter( - this.plain.metacard.properties, - (_value: any, key: string) => - (attribute === undefined || attribute === key) && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === - 'GEOMETRY' - ).length > 0 - ) - } - getGeometries(attribute?: any): any { - return _.filter( - this.plain.metacard.properties, - (_value: any, key: string) => - !StartupDataStore.MetacardDefinitions.isHiddenAttribute(key) && - (attribute === undefined || attribute === key) && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === - 'GEOMETRY' - ) - } - getPoints(attribute?: any): any { - try { - return this.getGeometries(attribute).reduce( - (pointArray: any, wkt: any) => - pointArray.concat( - TurfMeta.coordAll(wkx.Geometry.parse(wkt).toGeoJSON() as any) - ), - [] - ) - } catch (err) { - console.error(err) - return [] - } - } - getMapActions() { - return this.plain.actions.filter( - (action) => action.id.indexOf('catalog.data.metacard.map.') === 0 - ) - } - hasMapActions(): boolean { - return this.getMapActions().length > 0 - } - getExportActions() { - const otherActions = this.getMapActions() - return this.plain.actions - .filter((action) => action.title.indexOf('Export') === 0) - .filter((action) => otherActions.indexOf(action) === -1) - } - hasExportActions(): boolean { - return this.getExportActions().length > 0 - } - getOtherActions() { - const otherActions = this.getExportActions().concat(this.getMapActions()) - return this.plain.actions.filter( - (action) => otherActions.indexOf(action) === -1 - ) - } - hasRelevance() { - return Boolean(this.plain.relevance) - } - getRoundedRelevance() { - return this.plain.relevance.toPrecision( - StartupDataStore.Configuration.getRelevancePrecision() - ) - } - hasErrors() { - return Boolean(this.getErrors()) - } - getErrors() { - return this.plain.metacard.properties['validation-errors'] - } - hasWarnings() { - return Boolean(this.getWarnings()) - } - getWarnings() { - return this.plain.metacard.properties['validation-warnings'] - } - getColor() { - return '#004949' - } - getBackbone() { - if (this.backbone === undefined) { - this._setBackbone(new QueryResult(this.plain)) - } - return this.backbone - } - _setBackbone(backboneModel: Backbone.Model) { - this.backbone = backboneModel - this['_notifySubscribers.backboneCreated']() - } - setSelected(isSelected: boolean) { - if (this.isSelected !== isSelected) { - this.isSelected = isSelected - this['_notifySubscribers.selected']() - return true - } else { - return false - } - } - shiftSelect() { - if (this.parent) { - this.parent.shiftSelect(this) - } - } - controlSelect() { - if (this.parent) { - this.parent.controlSelect(this) - } - } - select() { - if (this.parent) { - this.parent.select(this) - } - } - setFiltered(isFiltered: boolean) { - if (this.isFiltered !== isFiltered) { - this.isFiltered = isFiltered - this['_notifySubscribers.filtered']() - return true - } else { - return false - } - } - currentOverlayUrl?: string -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.tsx deleted file mode 100644 index 8721e020224..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/LazyQueryResults.tsx +++ /dev/null @@ -1,609 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { ResultType } from '../Types' -import { generateCompareFunction } from './sort' -import { LazyQueryResult } from './LazyQueryResult' -import { QuerySortType } from './types' -import { Status } from './status' -import { TransformSortsComposedFunctionType } from '../TypedQuery' -import _ from 'underscore' -const debounceTime = 250 - -import Backbone from 'backbone' -import { FilterBuilderClass } from '../../../component/filter-builder/filter.structure' - -export type SearchStatus = { - [key: string]: Status -} - -export type AttributeHighlight = { - highlight: string - attribute: string - endIndex: string - startIndex: string - valueIndex: string -} - -export type AttributeHighlights = { - [key: string]: Array -} - -/** - * Example: - * [ - { - "id": "29c0c0e9-b205-49bb-9649-ddf3b31e46f7", - "highlights": [ - { - "valueIndex": "0", - "highlight": "Windham County, Vermont", - "startIndex": "16", - "endIndex": "23", - "attribute": "title" - } - ] - } - ] - */ -export type ResponseHighlightType = Array<{ - id: string - highlights: Array -}> - -/** store highlights in a map - * Example: - * { - "29c0c0e9-b205-49bb-9649-ddf3b31e46f7": { - "title": [ - { - "valueIndex": "0", - "highlight": "Windham County, Vermont", - "startIndex": "16", - "endIndex": "23", - "attribute": "title" - } - ] - } - } - */ -type TransformedHighlightsType = { - [key: string]: AttributeHighlights -} - -export const transformResponseHighlightsToMap = ({ - highlights = [], -}: { - highlights?: ResponseHighlightType -}) => { - return highlights.reduce((blob, highlight) => { - blob[highlight.id] = highlight.highlights.reduce( - (innerblob, subhighlight) => { - innerblob[subhighlight.attribute] = highlight.highlights.filter( - (hl) => hl.attribute === subhighlight.attribute - ) - return innerblob - }, - {} as { [key: string]: Array } - ) - return blob - }, {} as TransformedHighlightsType) -} - -type ConstructorProps = { - filterTree?: FilterBuilderClass - results?: ResultType[] - sorts?: QuerySortType[] - sources?: string[] - transformSorts?: TransformSortsComposedFunctionType - status?: SearchStatus - highlights?: TransformedHighlightsType - showingResultsForFields?: any[] - didYouMeanFields?: any[] -} - -type SubscribableType = - | 'status' - | 'filteredResults' - | 'selectedResults' - | 'results.backboneSync' - | 'filterTree' -type SubscriptionType = { [key: string]: () => void } -/** - * Constructed with performance in mind, taking advantage of maps whenever possible. - * This is the heart of our app, so take care when updating / adding things here to - * do it with performance in mind. - * - */ -export class LazyQueryResults { - ['subscriptionsToOthers.result.isSelected']: (() => void)[]; - ['subscriptionsToOthers.result.backboneCreated']: (() => void)[]; - ['subscriptionsToOthers.result.backboneSync']: (() => void)[]; - ['subscriptionsToMe.status']: SubscriptionType; - ['subscriptionsToMe.filteredResults']: SubscriptionType; - ['subscriptionsToMe.selectedResults']: SubscriptionType; - ['subscriptionsToMe.filterTree']: SubscriptionType; - ['subscriptionsToMe.results.backboneSync']: SubscriptionType - subscribeTo({ - subscribableThing, - callback, - }: { - subscribableThing: SubscribableType - callback: () => void - }) { - const id = Math.random().toString() - - // @ts-ignore remove when we upgrade ace to use latest typescript - this[`subscriptionsToMe.${subscribableThing}`][id] = callback - return () => { - // @ts-ignore remove when we upgrade ace to use latest typescript - delete this[`subscriptionsToMe.${subscribableThing}`][id] - } - } - _notifySubscribers(subscribableThing: SubscribableType) { - // @ts-ignore remove when we upgrade ace to use latest typescript - const subscribers = this[ - `subscriptionsToMe.${subscribableThing}` - ] as SubscriptionType - Object.values(subscribers).forEach((callback) => callback()) - } - ['_notifySubscribers.status']() { - this._notifySubscribers('status') - } - ['_notifySubscribers.filteredResults']() { - this._notifySubscribers('filteredResults') - } - ['_notifySubscribers.selectedResults']() { - this._notifySubscribers('selectedResults') - } - ['_notifySubscribers.results.backboneSync']() { - this._notifySubscribers('results.backboneSync') - } - ['_notifySubscribers.filterTree']() { - this._notifySubscribers('filterTree') - } - _turnOnDebouncing() { - this['_notifySubscribers.status'] = _.debounce( - this['_notifySubscribers.status'], - debounceTime - ) - this['_notifySubscribers.filteredResults'] = _.debounce( - this['_notifySubscribers.filteredResults'], - debounceTime - ) - this['_notifySubscribers.selectedResults'] = _.debounce( - this['_notifySubscribers.selectedResults'], - debounceTime - ) - this['_notifySubscribers.results.backboneSync'] = _.debounce( - this['_notifySubscribers.results.backboneSync'], - debounceTime - ) - this['_notifySubscribers.filterTree'] = _.debounce( - this['_notifySubscribers.filterTree'], - debounceTime - ) - } - compareFunction: (a: LazyQueryResult, b: LazyQueryResult) => number - results: { - [key: string]: LazyQueryResult - } - selectedResults: { - [key: string]: LazyQueryResult - } - _getMaxIndexOfSelectedResults() { - return Object.values(this.selectedResults).reduce((max, result) => { - return Math.max(max, result.index) - }, -1) - } - _getMinIndexOfSelectedResults() { - return Object.values(this.selectedResults).reduce((min, result) => { - return Math.min(min, result.index) - }, Object.keys(this.results).length) - } - /** - * This is used mostly by - */ - groupSelect() {} - /** - * This will set swathes of sorted results to be selected. It does not deselect anything. - * Primarily used in the list view (card / table) - */ - shiftSelect(target: LazyQueryResult) { - const firstIndex = this._getMinIndexOfSelectedResults() - const lastIndex = this._getMaxIndexOfSelectedResults() - const indexClicked = target.index - if (Object.keys(this.selectedResults).length === 0) { - target.setSelected(target.isSelected) - } else if (indexClicked <= firstIndex) { - // traverse from target to next until firstIndex - let currentItem = target as LazyQueryResult | undefined - while (currentItem && currentItem.index <= firstIndex) { - currentItem.setSelected(true) - currentItem = currentItem.next - } - } else if (indexClicked >= lastIndex) { - // traverse from target to prev until lastIndex - let currentItem = target as LazyQueryResult | undefined - while (currentItem && currentItem.index >= lastIndex) { - currentItem.setSelected(true) - currentItem = currentItem.prev - } - } else { - // traverse from target to prev until something doesn't change - let currentItem = target as LazyQueryResult | undefined - let changed = true - while (currentItem && changed) { - changed = currentItem.setSelected(true) && changed - currentItem = currentItem.prev - } - } - } - /** - * This takes a list of ids to set to selected, and will deselect all others. - */ - selectByIds(targets: string[]) { - this.deselect() - targets.forEach((id) => { - if (this.results[id]) { - this.results[id].setSelected(true) - } - }) - } - controlSelect(target: LazyQueryResult) { - target.setSelected(!target.isSelected) - } - /** - * This will toggle selection of the lazyResult passed in, and deselect all others. - */ - select(target: LazyQueryResult) { - const isSelected = !target.isSelected - this.deselect() - target.setSelected(isSelected) - } - deselect() { - Object.values(this.selectedResults).forEach((result) => { - result.setSelected(false) - }) - } - backboneModel: Backbone.Model - /** - * Can contain distance / best text match - * (this matches what the query requested) - */ - persistantSorts: QuerySortType[] - /** - * Pass a function that returns the sorts to use, allowing such things as substituting ephemeral sorts - */ - transformSorts: TransformSortsComposedFunctionType = ({ originalSorts }) => { - return originalSorts - } - /** - * Should really only be set at constructor time (moment a query is done) - */ - _updatePersistantSorts(sorts: QuerySortType[]) { - this.persistantSorts = sorts - } - _updateTransformSorts(transformSorts: TransformSortsComposedFunctionType) { - this.transformSorts = transformSorts - } - _getSortedResults(results: LazyQueryResult[]) { - return results.sort( - generateCompareFunction( - this.transformSorts({ originalSorts: this.persistantSorts }) - ) - ) - } - /** - * The map of results will ultimately be the source of truth here - * Maps guarantee chronological order for Object.keys operations, - * so we turn it into an array to sort then feed it back into a map. - * - * On resort we have to update the links between results (used for selecting performantly), - * as well as the indexes which are used similarly - * - */ - _resort() { - this.results = this._getSortedResults(Object.values(this.results)).reduce( - (blob, result, index, results) => { - result.index = index - result.prev = results[index - 1] - result.next = results[index + 1] - blob[result['metacard.id']] = result - return blob - }, - {} as { [key: string]: LazyQueryResult } - ) - } - /** - * This is purely to force a rerender in scenarios where we update result values and want to update views without resorting - * (resorting wouldn't make sense to do client side since there could be more results on the server) - * It also would be weird since things in tables or lists might jump around while the user is working with them. - */ - _fakeResort() { - this.results = Object.values(this.results).reduce( - (blob, result, index, results) => { - result.index = index - result.prev = results[index - 1] - result.next = results[index + 1] - blob[result['metacard.id']] = result - return blob - }, - {} as { [key: string]: LazyQueryResult } - ) - } - highlights: TransformedHighlightsType = {} - // we can do a shallow merge because there will be no overlap between the two objects (separate queries, seperate results i.e. ids) - addHighlights(highlights: TransformedHighlightsType) { - this.highlights = { ...this.highlights, ...highlights } - } - resetHighlights() { - this.highlights = {} - } - constructor({ - filterTree = undefined, - results = [], - sorts = [], - sources = [], - transformSorts, - status = {}, - highlights = {}, - didYouMeanFields = [], - showingResultsForFields = [], - }: ConstructorProps = {}) { - this._turnOnDebouncing() - this.reset({ - filterTree, - results, - sorts, - sources, - transformSorts, - status, - highlights, - didYouMeanFields, - showingResultsForFields, - }) - - this.backboneModel = new Backbone.Model({ - id: Math.random().toString(), - }) - } - init() { - this.currentAsOf = Date.now() - if (this['subscriptionsToOthers.result.isSelected']) - this['subscriptionsToOthers.result.isSelected'].forEach((unsubscribe) => { - unsubscribe() - }) - if (this['subscriptionsToOthers.result.backboneSync']) - this['subscriptionsToOthers.result.backboneSync'].forEach( - (unsubscribe) => { - unsubscribe() - } - ) - this['subscriptionsToOthers.result.backboneSync'] = [] - this['subscriptionsToOthers.result.isSelected'] = [] - this._resetSelectedResults() - if (this['subscriptionsToMe.filteredResults'] === undefined) - this['subscriptionsToMe.filteredResults'] = {} - if (this['subscriptionsToMe.selectedResults'] === undefined) - this['subscriptionsToMe.selectedResults'] = {} - if (this['subscriptionsToMe.status'] === undefined) - this['subscriptionsToMe.status'] = {} - if (this['subscriptionsToMe.filterTree'] === undefined) - this['subscriptionsToMe.filterTree'] = {} - this.results = {} - this.types = {} - this.sources = [] - this.status = {} - } - _resetSelectedResults() { - const shouldNotify = - this.selectedResults !== undefined && - Object.keys(this.selectedResults).length > 0 - this.selectedResults = {} - if (shouldNotify) this['_notifySubscribers.selectedResults']() - } - reset({ - filterTree = undefined, - results = [], - sorts = [], - sources = [], - transformSorts = ({ originalSorts }) => { - return originalSorts - }, - status = {}, - highlights = {}, - didYouMeanFields = [], - showingResultsForFields = [], - }: ConstructorProps = {}) { - this.init() - this.resetHighlights() - this.resetDidYouMeanFields() - this.resetShowingResultsForFields() - this._resetFilterTree(filterTree) - this._resetSources(sources) - this._updatePersistantSorts(sorts) - this._updateTransformSorts(transformSorts) - this.updateDidYouMeanFields(didYouMeanFields) - this.updateShowingResultsForFields(showingResultsForFields) - this.addHighlights(highlights) - this.add({ results }) - this.updateStatus(status) - } - destroy() { - this.backboneModel.stopListening() - } - isEmpty() { - return Object.keys(this.results).length === 0 - } - add({ - results = [], - }: { - results?: ResultType[] - } = {}) { - results.forEach((result) => { - const lazyResult = new LazyQueryResult( - result, - this.highlights[result.metacard.properties.id] - ) - this.results[lazyResult['metacard.id']] = lazyResult - lazyResult.parent = this - /** - * Keep a fast lookup of what results are selected - */ - this['subscriptionsToOthers.result.isSelected'].push( - lazyResult.subscribeTo({ - subscribableThing: 'selected', - callback: () => { - this._updateSelectedResults({ lazyResult }) - }, - }) - ) - /** - * When a backbone model is created we want to start listening for updates so the plain object has the same information - */ - this['subscriptionsToOthers.result.backboneSync'].push( - lazyResult.subscribeTo({ - subscribableThing: 'backboneSync', - callback: () => { - /** - * In this case we don't want to really resort, just force renders on views by telling them things have changed. - */ - this._fakeResort() - this['_notifySubscribers.filteredResults']() - }, - }) - ) - }) - this._resort() - this['_notifySubscribers.filteredResults']() - } - _updateSelectedResults({ lazyResult }: { lazyResult: LazyQueryResult }) { - if (lazyResult.isSelected) { - this.selectedResults[lazyResult['metacard.id']] = lazyResult - } else { - delete this.selectedResults[lazyResult['metacard.id']] - } - this['_notifySubscribers.selectedResults']() - } - types: MetacardTypes - addTypes(types: MetacardTypes) { - this.types = { - ...this.types, - ...types, - } - } - getCurrentAttributes() { - return Object.keys( - Object.values(this.types).reduce((blob, definition) => { - return { - ...blob, - ...definition, - } - }, {}) - ) - } - sources: string[] - _resetSources(sources: string[]) { - this.sources = sources - this._resetStatus() - } - _resetStatus() { - this.status = this.sources.reduce((blob, source) => { - blob[source] = new Status({ id: source }) - return blob - }, {} as SearchStatus) - this._updateIsSearching() - this['_notifySubscribers.status']() - } - filterTree?: FilterBuilderClass - _resetFilterTree(filterTree?: FilterBuilderClass) { - this.filterTree = filterTree - this['_notifySubscribers.filterTree']() - } - cancel() { - Object.keys(status).forEach((id) => { - if (this.status[id].hasReturned === false) { - this.status[id].updateStatus({ - hasReturned: true, - message: 'Canceled by user', - successful: false, - }) - } - }) - this._updateIsSearching() - this['_notifySubscribers.status']() - } - updateStatus(status: SearchStatus) { - Object.keys(status).forEach((id) => { - this.status[id].updateStatus(status[id]) - }) - this._updateIsSearching() - this['_notifySubscribers.status']() - } - updateStatusWithError({ - sources, - message, - }: { - sources: string[] - message: string - }) { - sources.forEach((id) => { - if (this.status[id]) - this.status[id].updateStatus({ - message, - successful: false, - }) - }) - this._updateIsSearching() - this['_notifySubscribers.status']() - } - _updateIsSearching() { - this.isSearching = Object.values(this.status).some((status) => { - return !status.hasReturned - }) - } - isSearching: boolean - currentAsOf: number - status: SearchStatus - updateDidYouMeanFields(update: any[] | null) { - if (update !== null) - this.didYouMeanFields = [...this.didYouMeanFields, ...update] - } - resetDidYouMeanFields() { - this.didYouMeanFields = [] - } - didYouMeanFields: any[] - updateShowingResultsForFields(update: any[] | null) { - if (update !== null) - this.showingResultsForFields = [ - ...this.showingResultsForFields, - ...update, - ] - } - resetShowingResultsForFields() { - this.showingResultsForFields = [] - } - showingResultsForFields: any[] -} - -type MetacardTypes = { - [key: string]: { - [key: string]: { - format: string - multivalued: boolean - indexed: boolean - } - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/hooks.tsx deleted file mode 100644 index 1d16ddde831..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/hooks.tsx +++ /dev/null @@ -1,251 +0,0 @@ -import { LazyQueryResult } from './LazyQueryResult' -import * as React from 'react' -import { LazyQueryResults } from './LazyQueryResults' -import _ from 'underscore' - -/** - * If a view cares about whether or not a lazy result is selected, - * this will let them know. - */ -export const useSelectionOfLazyResult = ({ - lazyResult, -}: { - lazyResult: LazyQueryResult -}) => { - const [isSelected, setIsSelected] = React.useState(lazyResult.isSelected) - React.useEffect(() => { - setIsSelected(lazyResult.isSelected) - const unsubscribe = lazyResult.subscribeTo({ - subscribableThing: 'selected', - callback: () => { - setIsSelected(lazyResult.isSelected) - }, - }) - return () => { - unsubscribe() - } - }, [lazyResult]) - return isSelected -} - -/** - * If a view cares about whether or not a lazy result is filtered, - * this will let them know. - */ -export const useFilteredOfLazyResult = ({ - lazyResult, -}: { - lazyResult: LazyQueryResult -}) => { - const [isFiltered, setIsFiltered] = React.useState(lazyResult.isFiltered) - React.useEffect(() => { - const unsubscribe = lazyResult.subscribeTo({ - subscribableThing: 'filtered', - callback: () => { - setIsFiltered(lazyResult.isFiltered) - }, - }) - return () => { - unsubscribe() - } - }, [lazyResult]) - return isFiltered -} - -type useSelectionOfLazyResultsReturn = 'unselected' | 'partially' | 'selected' - -/** - * Used by clusters to respond quickly to changes they care about - * (in other words the results in their cluster) - */ -export const useSelectionOfLazyResults = ({ - lazyResults, -}: { - lazyResults: LazyQueryResult[] -}) => { - const cache = React.useRef({} as { [key: string]: boolean }) - const calculateIfSelected = React.useMemo(() => { - return () => { - const currentValues = Object.values(cache.current) - let baseline = currentValues[0] - let updateToIsSelected = baseline - ? 'selected' - : ('unselected' as useSelectionOfLazyResultsReturn) - for (let i = 1; i <= currentValues.length - 1; i++) { - if (baseline !== currentValues[i]) { - updateToIsSelected = 'partially' - break - } - } - return updateToIsSelected - } - }, []) - const debouncedUpdatedIsSelected = React.useMemo(() => { - return _.debounce(() => { - setIsSelected(calculateIfSelected()) - }, 100) - }, []) - - const [isSelected, setIsSelected] = React.useState( - calculateIfSelected() as useSelectionOfLazyResultsReturn - ) - - React.useEffect(() => { - cache.current = lazyResults.reduce((blob, lazyResult) => { - blob[lazyResult['metacard.id']] = lazyResult.isSelected - return blob - }, {} as { [key: string]: boolean }) - setIsSelected(calculateIfSelected()) - const unsubscribeCalls = lazyResults.map((lazyResult) => { - return lazyResult.subscribeTo({ - subscribableThing: 'selected', - callback: () => { - cache.current[lazyResult['metacard.id']] = lazyResult.isSelected - debouncedUpdatedIsSelected() - }, - }) - }) - return () => { - unsubscribeCalls.forEach((unsubscribeCall) => { - unsubscribeCall() - }) - } - }, [lazyResults]) - return isSelected -} - -const getSelectedResultsOfLazyResults = ({ - lazyResults, -}: { - lazyResults?: LazyQueryResults -}) => { - if (lazyResults) { - return { - ...lazyResults.selectedResults, - } - } - return {} -} - -/** - * If a view cares about the entirety of what results are selected out - * of a LazyQueryResults object, this will keep them up to date. - * - * This is overkill for most components, but needed for things like - * the inspector. Most other components will instead respond to changes - * in a single result. - */ -export const useSelectedResults = ({ - lazyResults, -}: { - lazyResults?: LazyQueryResults -}) => { - const [selectedResults, setSelectedResults] = React.useState( - getSelectedResultsOfLazyResults({ lazyResults }) - ) - React.useEffect(() => { - if (lazyResults) { - const unsubscribeCall = lazyResults.subscribeTo({ - subscribableThing: 'selectedResults', - callback: () => { - setSelectedResults(getSelectedResultsOfLazyResults({ lazyResults })) - }, - }) - return () => { - unsubscribeCall() - } - } - return () => {} - }, [lazyResults]) - - return selectedResults -} - -const getStatusFromLazyResults = ({ - lazyResults, -}: { - lazyResults: LazyQueryResults -}) => { - return { - status: lazyResults.status, - isSearching: lazyResults.isSearching, - currentAsOf: lazyResults.currentAsOf, - } -} - -/** - * If a view cares about the status of a LazyQueryResults object - */ -export const useStatusOfLazyResults = ({ - lazyResults, -}: { - lazyResults: LazyQueryResults -}) => { - const [status, setStatus] = React.useState( - getStatusFromLazyResults({ lazyResults }) - ) - React.useEffect(() => { - setStatus(getStatusFromLazyResults({ lazyResults })) - const unsubscribeCall = lazyResults.subscribeTo({ - subscribableThing: 'status', - callback: () => { - setStatus(getStatusFromLazyResults({ lazyResults })) - }, - }) - return () => { - unsubscribeCall() - } - }, [lazyResults]) - - return status -} - -/** - * If a view cares about the status of a LazyQueryResults object - */ -export const useFilterTreeOfLazyResults = ({ - lazyResults, -}: { - lazyResults: LazyQueryResults -}) => { - const [filterTree, setFilterTree] = React.useState(lazyResults.filterTree) - React.useEffect(() => { - setFilterTree(lazyResults.filterTree) - const unsubscribeCall = lazyResults.subscribeTo({ - subscribableThing: 'filterTree', - callback: () => { - setFilterTree(lazyResults.filterTree) - }, - }) - return () => { - unsubscribeCall() - } - }, [lazyResults]) - - return filterTree -} - -/** - * Allow a view to rerender when the backbone model resyncs to the plain model - */ -export const useRerenderOnBackboneSync = ({ - lazyResult, -}: { - lazyResult?: LazyQueryResult -}) => { - const [, setRandomNumber] = React.useState(Math.random()) - React.useEffect(() => { - setRandomNumber(Math.random()) - const unsubscribeCall = lazyResult - ? lazyResult.subscribeTo({ - subscribableThing: 'backboneSync', - callback: () => { - setRandomNumber(Math.random()) - }, - }) - : () => {} - return () => { - unsubscribeCall() - } - }, [lazyResult]) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/sort.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/sort.tsx deleted file mode 100644 index 5bbb9f2de86..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/sort.tsx +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { StartupDataStore } from '../Startup/startup' -import { LazyQueryResult } from './LazyQueryResult' -import { QuerySortType } from './types' - -function parseMultiValue(value: any) { - if (value && value.constructor === Array) { - return value[0] - } - return value -} - -function isEmpty(value: any) { - return value === undefined || value === null -} - -function parseValue(value: any, attribute: string) { - const attributeDefinition = - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] - if (!attributeDefinition) { - return value.toString().toLowerCase() - } - switch (attributeDefinition.type) { - case 'DATE': - case 'BOOLEAN': - return value - case 'STRING': - return value.toString().toLowerCase() - default: - return parseFloat(value) - } -} - -function compareValues(aVal: any, bVal: any, sorting: QuerySortType) { - const sortOrder = sorting.direction === 'descending' ? -1 : 1 - aVal = parseValue(aVal, sorting.attribute) - bVal = parseValue(bVal, sorting.attribute) - if (aVal < bVal) { - return sortOrder * -1 - } - if (aVal > bVal) { - return sortOrder - } - return 0 -} - -function checkSortValue( - a: LazyQueryResult, - b: LazyQueryResult, - sorting: QuerySortType -) { - const aVal = parseMultiValue(a.plain.metacard.properties[sorting.attribute]) - const bVal = parseMultiValue(b.plain.metacard.properties[sorting.attribute]) - if (isEmpty(aVal) && isEmpty(bVal)) { - return 0 - } - if (isEmpty(aVal)) { - return 1 - } - if (isEmpty(bVal)) { - return -1 - } - return compareValues(aVal, bVal, sorting) -} - -export const generateCompareFunction = (sorting: QuerySortType[]) => { - if (!sorting) { - throw new Error(`Sorting can't be undefined!`) - } - return function (a: LazyQueryResult, b: LazyQueryResult) { - let sortValue = 0 - for (let i = 0; i <= sorting.length - 1; i++) { - const sortField = sorting[i].attribute - const sortOrder = sorting[i].direction === 'descending' ? -1 : 1 - switch (sortField) { - case 'RELEVANCE': - sortValue = sortOrder * (a.plain.relevance - b.plain.relevance) - break - case 'DISTANCE': - // this says distance could be null, could be a bug we need to address - - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - sortValue = sortOrder * (a.plain.distance - b.plain.distance) - break - default: - sortValue = checkSortValue(a, b, sorting[i]) - } - if (sortValue !== 0) { - break - } - } - return sortValue - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/status.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/status.tsx deleted file mode 100644 index 336704e1c00..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/status.tsx +++ /dev/null @@ -1,55 +0,0 @@ -export type StatusBySourceType = { - [key: string]: { - count: number - elapsed: number - hits: number - id: string - successful: boolean - } -} - -export class Status { - /** - * Amount of results returned - */ - count: number - /** - * Time the search took in milliseconds - */ - elapsed: number - /** - * Total amount of results that match the search criteria - * Not all are sent back, just what is in count, so this should always be - * >= count - */ - hits: number - /** - * Source name - */ - id: string - successful: boolean - fromcache: number - cacheHasReturned: boolean - cacheSuccessful: boolean - cacheMessages: [] - hasReturned: boolean - message: string - warnings: [string] - errors: [string] - constructor({ id }: { id: string }) { - this.id = id - this.count = 0 - this.hasReturned = false - } - updateStatus( - update: Partial< - StatusBySourceType[0] & { hasReturned: boolean; message: string } - > - ) { - Object.keys(update).forEach((key) => { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - this[key] = update[key] - }) - this.hasReturned = true - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/types.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/types.tsx deleted file mode 100644 index 30263a59129..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/LazyQueryResult/types.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { SortType } from '../Query.shared-types' - -export type QuerySortType = SortType - -export type TruncatingFilterType = { - type: 'ILIKE' | string - property: string - value: string - filters: undefined -} - -export type FilterType = { - type: 'AND' | 'OR' | 'NOT AND' | 'NOT OR' - filters: (TruncatingFilterType | FilterType)[] -} - -export type MasterType = TruncatingFilterType | FilterType diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Metacard.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Metacard.ts deleted file mode 100644 index 44f28f8909f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Metacard.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' - -import 'backbone-associations' -import MetacardPropertiesModel from './MetacardProperties' - -export default Backbone.AssociatedModel.extend({ - hasGeometry(attribute: any) { - return this.get('properties').hasGeometry(attribute) - }, - getPoints(attribute: any) { - return this.get('properties').getPoints(attribute) - }, - getGeometries(attribute: any) { - return this.get('properties').getGeometries(attribute) - }, - relations: [ - { - type: Backbone.One, - key: 'properties', - relatedModel: MetacardPropertiesModel, - }, - ], - defaults: { - queryId: undefined, - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/MetacardAction.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/MetacardAction.ts deleted file mode 100644 index 5bce8437d1f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/MetacardAction.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' - -import 'backbone-associations' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'urij... Remove this comment to see the full error message -import URITemplate from 'urijs/src/URITemplate' -const DECODED_QUERY_ID_TEMPLATE = '{&queryId}' -const ENCODED_QUERY_ID_TEMPLATE = encodeURIComponent(DECODED_QUERY_ID_TEMPLATE) - -export default Backbone.AssociatedModel.extend({ - defaults() { - return { - url: undefined, - title: undefined, - description: undefined, - id: undefined, - queryId: undefined, - displayName: undefined, - } - }, - getExportType() { - return this.get('displayName') - }, - initialize() { - this.handleQueryId() - this.listenTo(this, 'change:queryId', this.handleQueryId) - }, - handleQueryId() { - if (this.get('queryId') !== undefined) { - // This is the story: - // An action provider can include {&queryId} as a template in the url if it needs the queryId - // The backend is encoding {&queryId} because it has to. - // The entire url was being decoded and that caused issues because it decoded things that were supposed to be remain encoded - // The entire url couldn't be encoded because it was returning a useless url - // An attempt was made at decoding and encoding the individual parts of both the path and query params - // This caused an issue because it was encoding the transform ids, some of which include a ':' - // So that's why the string replace "decoding" is currently being done - const url = this.get('url') - const replacedUrl = url.replace( - ENCODED_QUERY_ID_TEMPLATE, - DECODED_QUERY_ID_TEMPLATE - ) - const replacedUrlTemplate = new URITemplate(replacedUrl) - const expandedUrl = replacedUrlTemplate.expand({ - queryId: this.get('queryId'), - }) - - this.set('url', expandedUrl) - } - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/MetacardProperties.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/MetacardProperties.ts deleted file mode 100644 index c373f7bb5c1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/MetacardProperties.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' - -import _ from 'underscore' -import * as TurfMeta from '@turf/meta' -import wkx from 'wkx' -import 'backbone-associations' -import { StartupDataStore } from './Startup/startup' - -export default Backbone.AssociatedModel.extend({ - type: 'metacard-properties', - defaults() { - return { - 'metacard-tags': ['resource'], - } - }, - hasGeometry(attribute: any) { - return ( - _.filter( - this.toJSON(), - (_value, key) => - (attribute === undefined || attribute === key) && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === - 'GEOMETRY' - ).length > 0 - ) - }, - getCombinedGeoJSON() { - return - }, - getPoints(attribute: any) { - try { - return this.getGeometries(attribute).reduce( - (pointArray: any, wkt: any) => - pointArray.concat( - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{}' is not assignable to paramet... Remove this comment to see the full error message - TurfMeta.coordAll(wkx.Geometry.parse(wkt).toGeoJSON()) - ), - [] - ) - } catch (err) { - console.error(err) - return [] - } - }, - getGeometries(attribute: any) { - return _.filter( - this.toJSON(), - (_value, key) => - !StartupDataStore.MetacardDefinitions.isHiddenAttribute(key) && - (attribute === undefined || attribute === key) && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key] && - StartupDataStore.MetacardDefinitions.getAttributeMap()[key].type === - 'GEOMETRY' - ) - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Overwrite.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Overwrite.tsx deleted file mode 100644 index 698238d6072..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Overwrite.tsx +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' -import { LazyQueryResult } from './LazyQueryResult/LazyQueryResult' - -export default Backbone.Model.extend({ - defaults() { - return { - id: undefined, - result: undefined, - file: undefined, - percentage: 0, - sending: false, - success: false, - error: false, - message: '', - dropzone: undefined, - } - }, - initialize() { - this.setupDropzoneListeners() - }, - setupDropzoneListeners() { - this.get('dropzone').on('sending', this.handleSending.bind(this)) - this.get('dropzone').on( - 'uploadprogress', - this.handleUploadProgress.bind(this) - ) - this.get('dropzone').on('error', this.handleError.bind(this)) - this.get('dropzone').on('success', this.handleSuccess.bind(this)) - }, - handleSending(file: any) { - this.set({ - file, - sending: true, - }) - }, - handleUploadProgress(_file: any, percentage: any) { - this.set('percentage', percentage) - }, - handleError(file: any, response: any) { - const result = this.get('result') as LazyQueryResult - const message = - result.plain.metacard.properties.title + - ' could not be overwritten by ' + - file.name + - response - this.set({ - error: true, - message, - }) - }, - handleSuccess(file: any) { - const result = this.get('result') as LazyQueryResult - const message = - result.plain.metacard.properties.title + - ' has been overwritten by ' + - file.name - this.set({ - success: true, - message, - }) - result.refreshDataOverNetwork() - }, - removeIfUnused() { - if (!this.get('sending')) { - this.collection.remove(this) - } - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.methods.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.methods.tsx deleted file mode 100644 index 02c242b47eb..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.methods.tsx +++ /dev/null @@ -1,543 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -// slowly seperate out methods from Query model (which has a lot of dependencies) to here, where we can import them in a spec and test them - -export type IndexForSourceGroupType = { - [key: string]: number -} - -export type SourceStatus = { - id: string - count: number - hasReturned: boolean - hits: number - elapsed: number - successful: boolean - warnings: [] -} - -// key is going to be id in SourceStatus -export type QueryStatus = { - [key: string]: SourceStatus -} - -/** - * We use the current status + current index to calculate next index. - * Local sources get grouped into a single index. - * - * If current index is blank it's assumed to be the start. - * - * We throw an error if status is provided while current index is blank, as that doesn't make sense. - * - * Notice that a good chunk of the logic is dedicated to ensuring we don't go beyond hits. - * Locally this doesn't matter, but remote sources tend to throw errors if we do. - */ -export const calculateNextIndexForSourceGroupNextPage = ({ - queryStatus = {}, - sources, - isLocal, - currentIndexForSourceGroup, -}: { - queryStatus: QueryStatus - sources: Array - isLocal: (id: string) => boolean - currentIndexForSourceGroup: IndexForSourceGroupType -}): IndexForSourceGroupType => { - if ( - Object.keys(queryStatus).length > 0 && - Object.keys(currentIndexForSourceGroup).length === 0 - ) { - throw 'Invalid invocation: queryStatus cannot be provided if currentIndexForSourceGroup is not' - } - const federatedSources = sources.filter((id) => { - return !isLocal(id) - }) - const hasLocal = sources.some((id) => isLocal(id)) - const maxLocalStart = Math.max( - 1, - Object.values(queryStatus) - .filter((indiviualStatus) => isLocal(indiviualStatus.id)) - .filter((indiviualStatus) => indiviualStatus.hits !== undefined) - .reduce((blob, status) => { - return blob + status.hits - }, 1) - ) - return Object.values(queryStatus).reduce( - (blob, indiviualStatus) => { - if (isLocal(indiviualStatus.id)) { - blob['local'] = Math.min( - maxLocalStart, - blob['local'] + indiviualStatus.count - ) - } else { - blob[indiviualStatus.id] = Math.min( - indiviualStatus.hits !== undefined ? indiviualStatus.hits + 1 : 1, - blob[indiviualStatus.id] + indiviualStatus.count - ) - } - return blob - }, - { - ...(hasLocal ? { local: 1 } : {}), - ...federatedSources.reduce((blob, id) => { - blob[id] = 1 - return blob - }, {} as { [key: string]: number }), - ...currentIndexForSourceGroup, - } as { [key: string]: number } - ) -} - -export const getIndexOfNoMoreResultsForSourceGroup = ({ - queryStatus, - isLocal, -}: { - queryStatus: QueryStatus - isLocal: (id: string) => boolean -}): IndexForSourceGroupType => { - const indexOfLastResultForSourceGroup = getIndexOfLastResultForSourceGroup({ - queryStatus, - isLocal, - }) - return Object.keys(indexOfLastResultForSourceGroup).reduce((blob, key) => { - blob[key] = indexOfLastResultForSourceGroup[key] + 1 - return blob - }, {} as IndexForSourceGroupType) -} - -/** - * This is the index of the final result for a source group. - */ -export const getIndexOfLastResultForSourceGroup = ({ - queryStatus, - isLocal, -}: { - queryStatus: QueryStatus - isLocal: (id: string) => boolean -}): IndexForSourceGroupType => { - if (Object.keys(queryStatus).length === 0) { - console.warn( - 'Invalid invocation: queryStatus is required to determine max index for a query' - ) - return {} - } - const hasLocal = Object.values(queryStatus).some((status) => - isLocal(status.id) - ) - const maxLocalStart = Math.max( - 0, - Object.values(queryStatus) - .filter((indiviualStatus) => isLocal(indiviualStatus.id)) - .filter((indiviualStatus) => indiviualStatus.hits !== undefined) - .reduce((blob, status) => { - return blob + status.hits - }, 0) - ) - return Object.values(queryStatus).reduce( - (blob, indiviualStatus) => { - if (!isLocal(indiviualStatus.id)) { - blob[indiviualStatus.id] = indiviualStatus.hits - } - return blob - }, - { - ...(hasLocal ? { local: maxLocalStart } : {}), - } as IndexForSourceGroupType - ) -} - -export const hasPreviousPageForSourceGroup = ({ - currentIndexForSourceGroup, -}: { - currentIndexForSourceGroup: IndexForSourceGroupType -}): boolean => { - return ( - Object.values(currentIndexForSourceGroup).length > 0 && - Object.values(currentIndexForSourceGroup).some((start) => start !== 1) - ) -} - -// should not be used outside of calculating the constrained next page -const getNextPageForSourceGroup = ({ - currentIndexForSourceGroup, - sources, - isLocal, - count, - queryStatus, -}: { - sources: Array - isLocal: (id: string) => boolean - currentIndexForSourceGroup: IndexForSourceGroupType - count: number - queryStatus: QueryStatus -}): IndexForSourceGroupType => { - const finalIndexForSourceGroup = getFinalPageForSourceGroup({ - queryStatus, - isLocal, - count, - }) - - if (Object.keys(currentIndexForSourceGroup).length > 0) { - return Object.keys(currentIndexForSourceGroup).reduce( - (blob, key) => { - blob[key] = Math.min(blob[key] + count, finalIndexForSourceGroup[key]) - return blob - }, - { ...currentIndexForSourceGroup } as IndexForSourceGroupType - ) - } else { - const hasLocal = sources.some((id) => isLocal(id)) - return sources.reduce( - (blob, sourceName) => { - if (!isLocal(sourceName)) { - blob[sourceName] = - Math.min(1, finalIndexForSourceGroup[sourceName]) || 1 - } - return blob - }, - { - ...(hasLocal ? { local: 1 } : {}), - } as IndexForSourceGroupType - ) - } -} - -export const hasNextPageForSourceGroup = ({ - queryStatus, - isLocal, - currentIndexForSourceGroup, - count, -}: { - queryStatus: QueryStatus - isLocal: (id: string) => boolean - currentIndexForSourceGroup: IndexForSourceGroupType - count: number -}): boolean => { - if (!queryStatus) { - return false - } - - const indexOfLastResultForSourceGroup = getIndexOfLastResultForSourceGroup({ - queryStatus, - isLocal, - }) - - return Object.keys(indexOfLastResultForSourceGroup).some((key) => { - return ( - currentIndexForSourceGroup[key] + count - 1 < - indexOfLastResultForSourceGroup[key] - ) - }) -} - -// should not be used outside of calculating the constrained previous page -const getPreviousPageForSourceGroup = ({ - currentIndexForSourceGroup, - sources, - isLocal, - count, - queryStatus, -}: { - sources: Array - isLocal: (id: string) => boolean - currentIndexForSourceGroup: IndexForSourceGroupType - count: number - queryStatus: QueryStatus -}): IndexForSourceGroupType => { - const finalIndexForSourceGroup = getFinalPageForSourceGroup({ - queryStatus, - isLocal, - count, - }) - - if (Object.keys(currentIndexForSourceGroup).length > 0) { - return Object.keys(currentIndexForSourceGroup).reduce( - (blob, key) => { - blob[key] = Math.max( - Math.min(blob[key] - count, finalIndexForSourceGroup[key]), - 1 - ) - return blob - }, - { ...currentIndexForSourceGroup } as IndexForSourceGroupType - ) - } else { - const hasLocal = sources.some((id) => isLocal(id)) - return sources.reduce( - (blob, sourceName) => { - if (!isLocal(sourceName)) { - blob[sourceName] = - Math.min(1, finalIndexForSourceGroup[sourceName]) || 1 - } - return blob - }, - { - ...(hasLocal ? { local: 1 } : {}), - } as IndexForSourceGroupType - ) - } -} - -export const getFirstPageForSourceGroup = ({ - sources, - isLocal, -}: { - sources: Array - isLocal: (id: string) => boolean -}): IndexForSourceGroupType => { - return calculateNextIndexForSourceGroupNextPage({ - sources, - isLocal, - queryStatus: {}, - currentIndexForSourceGroup: {}, - }) -} - -const getFinalPageForSourceGroup = ({ - queryStatus, - isLocal, - count, -}: { - queryStatus: QueryStatus - isLocal: (id: string) => boolean - count: number -}): IndexForSourceGroupType => { - if (!queryStatus) { - return {} - } - const indexOfLastResultForSourceGroup = getIndexOfLastResultForSourceGroup({ - queryStatus, - isLocal, - }) - return Object.keys(indexOfLastResultForSourceGroup).reduce( - (blob, sourceName) => { - let remainderOnFinalPage = - indexOfLastResultForSourceGroup[sourceName] % count - remainderOnFinalPage = - remainderOnFinalPage === 0 ? count : remainderOnFinalPage - blob[sourceName] = Math.max( - indexOfLastResultForSourceGroup[sourceName] - remainderOnFinalPage + 1, - 1 - ) - return blob - }, - { - ...indexOfLastResultForSourceGroup, - } as { [key: string]: number } - ) -} - -export type QueryStartAndEndType = { - start: number - end: number - hits: number -} - -export const getCurrentStartAndEndForSourceGroup = ({ - queryStatus, - currentIndexForSourceGroup, - isLocal, -}: { - queryStatus: QueryStatus - currentIndexForSourceGroup: IndexForSourceGroupType - isLocal: (id: string) => boolean -}): QueryStartAndEndType => { - if (!queryStatus || Object.keys(queryStatus).length === 0) { - return { - start: 0, - end: 0, - hits: 0, - } - } - const lastIndexForSourceGroup = getIndexOfLastResultForSourceGroup({ - queryStatus, - isLocal, - }) - - let start = 1 - const isBeginning = Object.values(currentIndexForSourceGroup).every( - (start) => start === 1 - ) - - if (!isBeginning) { - start = Object.keys(currentIndexForSourceGroup).reduce((blob, key) => { - return ( - blob + - Math.min(currentIndexForSourceGroup[key], lastIndexForSourceGroup[key]) - ) // if we go beyond the hits, we should only add the total hits for that source - }, 0) - } - - const end = Object.keys(queryStatus).reduce((blob, key) => { - return blob + queryStatus[key].count - }, start - 1) - - const hits = Object.keys(queryStatus).reduce((blob, key) => { - return blob + queryStatus[key].hits - }, 0) - - return { - start: Math.min(start, hits), - end: Math.min(Math.max(start, end), hits), - hits, - } -} - -function getFarthestIndexForSourceGroup( - sourceGroup: IndexForSourceGroupType -): number { - // find the max index for the source group - return Math.max(...Object.values(sourceGroup)) -} - -/** - * Ensures that the next page indices for a group of sources make sense. We do this by examining the farthest index, since paging is done individually for each source. - * If the farthest index is beyond the hits for a source, we essentially "lock" the source to the end to ensure we don't recieve further results. - **/ -export const getConstrainedNextPageForSourceGroup = ({ - currentIndexForSourceGroup, - sources, - isLocal, - count, - queryStatus, -}: { - sources: Array - isLocal: (id: string) => boolean - currentIndexForSourceGroup: IndexForSourceGroupType - count: number - queryStatus: QueryStatus -}): IndexForSourceGroupType => { - const nextPageForSourceGroup = getNextPageForSourceGroup({ - queryStatus, - isLocal, - count, - currentIndexForSourceGroup, - sources, - }) - const farthestIndexForSourceGroup = getFarthestIndexForSourceGroup( - nextPageForSourceGroup - ) - const indexOfNoMoreResultsForSourceGroup = - getIndexOfNoMoreResultsForSourceGroup({ - queryStatus, - isLocal, - }) - return Object.keys(nextPageForSourceGroup).reduce( - (blob, sourceName) => { - if (blob[sourceName] < farthestIndexForSourceGroup) { - blob[sourceName] = indexOfNoMoreResultsForSourceGroup[sourceName] // lock the source to the end, since we've gone beyond the hits (will ensure no results come back) - } - return blob - }, - { - ...nextPageForSourceGroup, - } as { [key: string]: number } - ) -} - -/** - * The final index for a source group is not the same as the final index when thinking about the very last page, since we have multiple sources. - * Some sources may have already "exhausted" their results, so we need to make sure that if we don't return results that we've already "passed". - */ -export const getConstrainedFinalPageForSourceGroup = ({ - queryStatus, - isLocal, - count, -}: { - queryStatus: QueryStatus - isLocal: (id: string) => boolean - count: number -}): IndexForSourceGroupType => { - const finalPageForSourceGroup = getFinalPageForSourceGroup({ - queryStatus, - isLocal, - count, - }) - const maxFinalPageIndexForSourceGroup = Math.max( - ...Object.values(finalPageForSourceGroup) - ) - const indexOfNoMoreResultsForSourceGroup = - getIndexOfNoMoreResultsForSourceGroup({ - queryStatus, - isLocal, - }) - return Object.keys(finalPageForSourceGroup).reduce( - (blob, sourceName) => { - if (blob[sourceName] < maxFinalPageIndexForSourceGroup) { - blob[sourceName] = indexOfNoMoreResultsForSourceGroup[sourceName] - } - return blob - }, - { - ...finalPageForSourceGroup, - } as { [key: string]: number } - ) -} - -/** - * Ensures that the next page indices for a group of sources make sense. We do this by examining the farthest index, since paging is done individually for each source. - * If the farthest index is beyond the hits for a source, we essentially "lock" the source to the end to ensure we don't recieve further results. - **/ -export const getConstrainedPreviousPageForSourceGroup = ({ - currentIndexForSourceGroup, - sources, - isLocal, - count, - queryStatus, -}: { - sources: Array - isLocal: (id: string) => boolean - currentIndexForSourceGroup: IndexForSourceGroupType - count: number - queryStatus: QueryStatus -}): IndexForSourceGroupType => { - if (!queryStatus || Object.keys(queryStatus).length === 0) { - return getFirstPageForSourceGroup({ - sources, - isLocal, - }) - } - const previousPageForSourceGroup = getPreviousPageForSourceGroup({ - queryStatus, - isLocal, - count, - currentIndexForSourceGroup, - sources, - }) - const farthestIndexForSourceGroup = getFarthestIndexForSourceGroup( - previousPageForSourceGroup - ) - const indexOfNoMoreResultsForSourceGroup = - getIndexOfNoMoreResultsForSourceGroup({ - queryStatus, - isLocal, - }) - return Object.keys(previousPageForSourceGroup).reduce( - (blob, sourceName) => { - if (blob[sourceName] < farthestIndexForSourceGroup) { - // never go beyond the no more results index, but make sure we keep indexes in sync when going backwards - blob[sourceName] = Math.min( - indexOfNoMoreResultsForSourceGroup[sourceName], - farthestIndexForSourceGroup - ) - } - return blob - }, - { - ...previousPageForSourceGroup, - } as { [key: string]: number } - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.shared-types.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.shared-types.tsx deleted file mode 100644 index 237b41547b9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.shared-types.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { FilterBuilderClass } from '../../component/filter-builder/filter.structure' - -export type SortType = { - attribute: string - direction: 'ascending' | 'descending' -} - -export type QueryAttributesType = { - filterTree?: FilterBuilderClass - sources?: string[] - sorts?: SortType[] - count?: number - type?: string - isLocal?: boolean - isOutdated?: boolean - spellcheck?: boolean - phonetics?: boolean - additionalOptions?: string - currentIndexForSourceGroup?: { - [key: string]: number - } - nextIndexForSourceGroup?: { - [key: string]: number - } - mostRecentStatus?: { - [key: string]: { - id: string - count: number - hasReturned: boolean - hits: number - elapsed: number - successful: boolean - warnings: string[] - errors: string[] - } - } - [key: string]: any // slowly build out the proper type, then remove this (leave for now so we don't accidentally leave something off) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.spec.tsx deleted file mode 100644 index 9a85acc2bb8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.spec.tsx +++ /dev/null @@ -1,3820 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' - -import { - getConstrainedNextPageForSourceGroup, - getIndexOfLastResultForSourceGroup, - getConstrainedPreviousPageForSourceGroup, - getConstrainedFinalPageForSourceGroup, - getCurrentStartAndEndForSourceGroup, -} from './Query.methods' - -// Helper function to run a test case -function runTest( - description: string, - method: (input: T) => U, - input: T, - expectedOutput: U -) { - it(description, (done) => { - expect(JSON.stringify(method(input))).to.equal( - JSON.stringify(expectedOutput) - ) - done() - }) -} - -type CaseDataType = Parameters[0] & - Parameters[0] & - Parameters[0] & - Parameters[0] & - Parameters[0] - -type NeccessaryParametersForTests = { - caseDescription: string - caseData: CaseDataType - caseReturns?: { - constrainedNextPageForSourceGroup?: ReturnType< - typeof getConstrainedNextPageForSourceGroup - > - indexOfLastResultForSourceGroup?: ReturnType< - typeof getIndexOfLastResultForSourceGroup - > - constrainedPreviousPageForSourceGroup?: ReturnType< - typeof getConstrainedPreviousPageForSourceGroup - > - constrainedFinalPageForSourceGroup?: ReturnType< - typeof getConstrainedFinalPageForSourceGroup - > - currentStartAndEndForSourceGroup?: ReturnType< - typeof getCurrentStartAndEndForSourceGroup - > - } -} - -const CasesToTest: NeccessaryParametersForTests[] = [ - // non local sources only - { - caseDescription: 'for single non local source without queryStatus', - caseData: { - sources: ['Geoserver'], - queryStatus: {}, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: {}, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { Geoserver: 1 }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for single non local source with queryStatus at beginning of results', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { Geoserver: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { Geoserver: 2 }, - indexOfLastResultForSourceGroup: { Geoserver: 100 }, - constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, - constrainedFinalPageForSourceGroup: { Geoserver: 100 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 1, - hits: 100, - }, - }, - }, - { - caseDescription: - 'for single non local source with queryStatus, at end of results', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { Geoserver: 100 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { Geoserver: 100 }, - indexOfLastResultForSourceGroup: { Geoserver: 100 }, - constrainedPreviousPageForSourceGroup: { Geoserver: 99 }, - constrainedFinalPageForSourceGroup: { Geoserver: 100 }, - currentStartAndEndForSourceGroup: { - start: 100, - end: 100, - hits: 100, - }, - }, - }, - { - caseDescription: 'for multiple non local sources only, with no queryStatus', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: {}, - isLocal: () => false, - currentIndexForSourceGroup: {}, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for multiple non local sources with queryStatus at beginning of results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 2, - Geoserver2: 2, - Geoserver3: 2, - }, - indexOfLastResultForSourceGroup: { - Geoserver1: 100, - Geoserver2: 105, - Geoserver3: 110, - }, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - constrainedFinalPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 110, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple non local sources with queryStatus mixed between already ended and not yet ended results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { - Geoserver1: 101, - Geoserver2: 105, - Geoserver3: 105, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 106, - }, - indexOfLastResultForSourceGroup: { - Geoserver1: 100, - Geoserver2: 105, - Geoserver3: 110, - }, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 104, - Geoserver3: 104, - }, - constrainedFinalPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 110, - }, - currentStartAndEndForSourceGroup: { - start: 310, - end: 311, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple non local sources with queryStatus at end of results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 110, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 110, - }, - indexOfLastResultForSourceGroup: { - Geoserver1: 100, - Geoserver2: 105, - Geoserver3: 110, - }, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 109, - }, - constrainedFinalPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 110, - }, - currentStartAndEndForSourceGroup: { - start: 315, - end: 315, - hits: 315, - }, - }, - }, - // non local sources, count of 3 - { - caseDescription: - 'for single non local source without queryStatus, with count of 3', - caseData: { - sources: ['Geoserver'], - queryStatus: {}, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: {}, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { Geoserver: 1 }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for single non local source with queryStatus at beginning of results, with count of 3', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 3, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { Geoserver: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { Geoserver: 4 }, - indexOfLastResultForSourceGroup: { Geoserver: 100 }, - constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, - constrainedFinalPageForSourceGroup: { Geoserver: 100 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 100, - }, - }, - }, - { - caseDescription: - 'for single non local source with queryStatus, at end of results, with count of 3', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { Geoserver: 100 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { Geoserver: 100 }, - indexOfLastResultForSourceGroup: { Geoserver: 100 }, - constrainedPreviousPageForSourceGroup: { Geoserver: 97 }, - constrainedFinalPageForSourceGroup: { Geoserver: 100 }, - currentStartAndEndForSourceGroup: { - start: 100, - end: 100, - hits: 100, - }, - }, - }, - { - caseDescription: - 'for multiple non local sources only, with no queryStatus, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: {}, - isLocal: () => false, - currentIndexForSourceGroup: {}, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for multiple non local sources with queryStatus at beginning of results, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 3, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 3, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 3, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 4, - Geoserver2: 4, - Geoserver3: 4, - }, - indexOfLastResultForSourceGroup: { - Geoserver1: 100, - Geoserver2: 105, - Geoserver3: 110, - }, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 1, - Geoserver2: 1, - Geoserver3: 1, - }, - constrainedFinalPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 109, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 9, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple non local sources with queryStatus mixed between already ended and not yet ended results, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 3, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 3, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { - Geoserver1: 101, - Geoserver2: 103, - Geoserver3: 103, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 106, - }, - indexOfLastResultForSourceGroup: { - Geoserver1: 100, - Geoserver2: 105, - Geoserver3: 110, - }, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 100, - Geoserver2: 100, - Geoserver3: 100, - }, - constrainedFinalPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 109, - }, - currentStartAndEndForSourceGroup: { - start: 306, - end: 311, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple non local sources with queryStatus at end of results, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 2, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 109, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 109, - }, - indexOfLastResultForSourceGroup: { - Geoserver1: 100, - Geoserver2: 105, - Geoserver3: 110, - }, - constrainedPreviousPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 106, - }, - constrainedFinalPageForSourceGroup: { - Geoserver1: 101, - Geoserver2: 106, - Geoserver3: 109, - }, - currentStartAndEndForSourceGroup: { - start: 314, - end: 315, - hits: 315, - }, - }, - }, - // only local sources - { - caseDescription: 'for single local source without queryStatus', - caseData: { - sources: ['Geoserver'], - queryStatus: {}, - isLocal: (id) => ['Geoserver'].includes(id), - currentIndexForSourceGroup: {}, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1 }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { local: 1 }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for single local source with queryStatus at beginning of results', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver'].includes(id), - currentIndexForSourceGroup: { local: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 2 }, - indexOfLastResultForSourceGroup: { local: 100 }, - constrainedPreviousPageForSourceGroup: { local: 1 }, - constrainedFinalPageForSourceGroup: { local: 100 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 1, - hits: 100, - }, - }, - }, - { - caseDescription: - 'for single local source with queryStatus, at end of results', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver'].includes(id), - currentIndexForSourceGroup: { local: 100 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 100 }, - indexOfLastResultForSourceGroup: { local: 100 }, - constrainedPreviousPageForSourceGroup: { local: 99 }, - constrainedFinalPageForSourceGroup: { local: 100 }, - currentStartAndEndForSourceGroup: { - start: 100, - end: 100, - hits: 100, - }, - }, - }, - { - caseDescription: 'for multiple local sources only, with no queryStatus', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: {}, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: {}, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 1, - }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { - local: 1, - }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for multiple local sources with queryStatus at beginning of results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: { - local: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 2, - }, - indexOfLastResultForSourceGroup: { - local: 315, - }, - constrainedPreviousPageForSourceGroup: { - local: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 315, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 1, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple local sources with queryStatus mixed between already ended and not yet ended results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: { - local: 105, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 106, - }, - indexOfLastResultForSourceGroup: { - local: 315, - }, - constrainedPreviousPageForSourceGroup: { - local: 104, - }, - constrainedFinalPageForSourceGroup: { - local: 315, - }, - currentStartAndEndForSourceGroup: { - start: 105, - end: 105, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple local sources with queryStatus at end of results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: { - local: 315, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 315, - }, - indexOfLastResultForSourceGroup: { - local: 315, - }, - constrainedPreviousPageForSourceGroup: { - local: 314, - }, - constrainedFinalPageForSourceGroup: { - local: 315, - }, - currentStartAndEndForSourceGroup: { - start: 315, - end: 315, - hits: 315, - }, - }, - }, - // only local sources, count of 3 - { - caseDescription: - 'for single local source without queryStatus, with count of 3', - caseData: { - sources: ['Geoserver'], - queryStatus: {}, - isLocal: (id) => ['Geoserver'].includes(id), - currentIndexForSourceGroup: {}, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1 }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { local: 1 }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for single local source with queryStatus at beginning of results, with count of 3', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 3, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver'].includes(id), - currentIndexForSourceGroup: { local: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 4 }, - indexOfLastResultForSourceGroup: { local: 100 }, - constrainedPreviousPageForSourceGroup: { local: 1 }, - constrainedFinalPageForSourceGroup: { local: 100 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 100, - }, - }, - }, - { - caseDescription: - 'for single local source with queryStatus, at end of results, with count of 3', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver'].includes(id), - currentIndexForSourceGroup: { local: 100 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 100 }, - indexOfLastResultForSourceGroup: { local: 100 }, - constrainedPreviousPageForSourceGroup: { local: 97 }, - constrainedFinalPageForSourceGroup: { local: 100 }, - currentStartAndEndForSourceGroup: { - start: 100, - end: 100, - hits: 100, - }, - }, - }, - { - caseDescription: - 'for multiple local sources only, with no queryStatus, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: {}, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: {}, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 1, - }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { - local: 1, - }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for multiple local sources with queryStatus at beginning of results, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: { - local: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 4, - }, - indexOfLastResultForSourceGroup: { - local: 315, - }, - constrainedPreviousPageForSourceGroup: { - local: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 313, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple local sources with queryStatus mixed between already ended and not yet ended results, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: { - local: 103, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 106, - }, - indexOfLastResultForSourceGroup: { - local: 315, - }, - constrainedPreviousPageForSourceGroup: { - local: 100, - }, - constrainedFinalPageForSourceGroup: { - local: 313, - }, - currentStartAndEndForSourceGroup: { - start: 103, - end: 105, - hits: 315, - }, - }, - }, - { - caseDescription: - 'for multiple local sources with queryStatus at end of results, with count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2', 'Geoserver3'].includes(id), - currentIndexForSourceGroup: { - local: 313, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 313, - }, - indexOfLastResultForSourceGroup: { - local: 315, - }, - constrainedPreviousPageForSourceGroup: { - local: 310, - }, - constrainedFinalPageForSourceGroup: { - local: 313, - }, - currentStartAndEndForSourceGroup: { - start: 313, - end: 315, - hits: 315, - }, - }, - }, - // now let's do a mix of both local and non local sources - { - caseDescription: - 'for single local source and single non local source without queryStatus', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: {}, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: {}, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for single local source and single non local source with queryStatus at beginning of results', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 2, Geoserver2: 2 }, - indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 105 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 2, - hits: 205, - }, - }, - }, - { - caseDescription: - 'for single local source and single non local source with queryStatus, at end of results', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 101, Geoserver2: 105 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 101, Geoserver2: 105 }, - indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, - constrainedPreviousPageForSourceGroup: { local: 101, Geoserver2: 104 }, - constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 105 }, - currentStartAndEndForSourceGroup: { - start: 205, - end: 205, - hits: 205, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources without queryStatus', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: {}, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: {}, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at beginning of results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 1, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 2, - Geoserver3: 2, - Geoserver4: 2, - }, - indexOfLastResultForSourceGroup: { - local: 205, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 430, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 1, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 111, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 112, - }, - indexOfLastResultForSourceGroup: { - local: 40, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 41, - Geoserver3: 110, - Geoserver4: 110, - }, - constrainedFinalPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - currentStartAndEndForSourceGroup: { - start: 261, - end: 261, - hits: 265, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 1, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - indexOfLastResultForSourceGroup: { - local: 40, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 114, - }, - constrainedFinalPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - currentStartAndEndForSourceGroup: { - start: 265, - end: 265, - hits: 265, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 116, - Geoserver3: 111, - Geoserver4: 116, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 117, - Geoserver3: 111, - Geoserver4: 116, - }, - indexOfLastResultForSourceGroup: { - local: 205, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 115, - Geoserver3: 111, - Geoserver4: 115, - }, - constrainedFinalPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - currentStartAndEndForSourceGroup: { - start: 341, - end: 341, - hits: 430, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - indexOfLastResultForSourceGroup: { - local: 205, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 204, - Geoserver3: 111, - Geoserver4: 116, - }, - constrainedFinalPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - currentStartAndEndForSourceGroup: { - start: 430, - end: 430, - hits: 430, - }, - }, - }, - // now let's do a mix of both local and non local sources with a count of 3 - { - caseDescription: - 'for single local source and single non local source without queryStatus, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: {}, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: {}, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for single local source and single non local source with queryStatus at beginning of results, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 3, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 3, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 4, Geoserver2: 4 }, - indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 103 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 6, - hits: 205, - }, - }, - }, - { - caseDescription: - 'for single local source and single non local source with queryStatus, at end of results, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 3, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 101, Geoserver2: 103 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 101, Geoserver2: 103 }, - indexOfLastResultForSourceGroup: { local: 100, Geoserver2: 105 }, - constrainedPreviousPageForSourceGroup: { local: 100, Geoserver2: 100 }, - constrainedFinalPageForSourceGroup: { local: 101, Geoserver2: 103 }, - currentStartAndEndForSourceGroup: { - start: 203, - end: 205, - hits: 205, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources without queryStatus, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: {}, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: {}, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: {}, - constrainedPreviousPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: {}, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at beginning of results, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 3, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 3, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 3, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 4, - Geoserver3: 4, - Geoserver4: 4, - }, - indexOfLastResultForSourceGroup: { - local: 205, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 9, - hits: 430, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 3, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 112, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - indexOfLastResultForSourceGroup: { - local: 40, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 41, - Geoserver3: 109, - Geoserver4: 109, - }, - constrainedFinalPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - currentStartAndEndForSourceGroup: { - start: 262, - end: 264, - hits: 265, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 20, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 1, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - indexOfLastResultForSourceGroup: { - local: 40, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 112, - }, - constrainedFinalPageForSourceGroup: { - local: 41, - Geoserver3: 111, - Geoserver4: 115, - }, - currentStartAndEndForSourceGroup: { - start: 265, - end: 265, - hits: 265, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 2, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 1, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 115, - Geoserver3: 111, - Geoserver4: 115, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 118, - Geoserver3: 111, - Geoserver4: 116, - }, - indexOfLastResultForSourceGroup: { - local: 205, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 112, - Geoserver3: 111, - Geoserver4: 112, - }, - constrainedFinalPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - currentStartAndEndForSourceGroup: { - start: 340, - end: 343, - hits: 430, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end, with a count of 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 105, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 115, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - indexOfLastResultForSourceGroup: { - local: 205, - Geoserver3: 110, - Geoserver4: 115, - }, - constrainedPreviousPageForSourceGroup: { - local: 202, - Geoserver3: 111, - Geoserver4: 116, - }, - constrainedFinalPageForSourceGroup: { - local: 205, - Geoserver3: 111, - Geoserver4: 116, - }, - currentStartAndEndForSourceGroup: { - start: 430, - end: 430, - hits: 430, - }, - }, - }, - // now let's test when the number of hits is 0 for certain sources - { - caseDescription: - 'for single non local source with queryStatus at beginning of results with 0 hits', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['local'].includes(id), - currentIndexForSourceGroup: { Geoserver: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { Geoserver: 1 }, - indexOfLastResultForSourceGroup: { Geoserver: 0 }, - constrainedPreviousPageForSourceGroup: { Geoserver: 1 }, - constrainedFinalPageForSourceGroup: { Geoserver: 1 }, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for single local source with queryStatus at beginning of results with 0 hits', - caseData: { - sources: ['Geoserver'], - queryStatus: { - Geoserver: { - id: 'Geoserver', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver'].includes(id), - currentIndexForSourceGroup: { local: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1 }, - indexOfLastResultForSourceGroup: { local: 0 }, - constrainedPreviousPageForSourceGroup: { local: 1 }, - constrainedFinalPageForSourceGroup: { local: 1 }, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results with 0 hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results, with local having no hits and non local having hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 2 }, - indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 1, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at end of results, with local having no hits and non local having hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 10 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 10 }, - indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 9 }, - constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, - currentStartAndEndForSourceGroup: { - start: 10, - end: 10, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 2, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 1, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 2, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 1, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at end of results, with local having hits and non local having no hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 10, Geoserver2: 1 }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 10, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 9, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 10, - end: 10, - hits: 10, - }, - }, - }, - // now let's test when the number of hits is 0 for certain sources with a count of 3 - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results with 0 hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 0, - end: 0, - hits: 0, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results, with local having no hits and non local having hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 3, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 4 }, - indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at end of results, with local having no hits and non local having hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 1, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 10 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 1, Geoserver2: 10 }, - indexOfLastResultForSourceGroup: { local: 0, Geoserver2: 10 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 7 }, - constrainedFinalPageForSourceGroup: { local: 1, Geoserver2: 10 }, - currentStartAndEndForSourceGroup: { - start: 10, - end: 10, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 3, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 4, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at beginning of results, with local having hits and non local having no hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 3, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 1, Geoserver2: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 4, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 1, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 3, - hits: 10, - }, - }, - }, - { - caseDescription: - 'for a local source and non local source with queryStatus at end of results, with local having hits and non local having no hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 10, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1'].includes(id), - currentIndexForSourceGroup: { local: 10, Geoserver2: 1 }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { local: 10, Geoserver2: 1 }, - indexOfLastResultForSourceGroup: { local: 10, Geoserver2: 0 }, - constrainedPreviousPageForSourceGroup: { local: 7, Geoserver2: 1 }, - constrainedFinalPageForSourceGroup: { local: 10, Geoserver2: 1 }, - currentStartAndEndForSourceGroup: { - start: 10, - end: 10, - hits: 10, - }, - }, - }, - // now let's do multiple sources for each type with some having 0 hits - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at beginning of results, with one of each source type having 0 hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 2, - Geoserver3: 2, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 100, - Geoserver3: 110, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 101, - Geoserver3: 110, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 2, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results with one of each source type having 0 hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 101, - Geoserver3: 101, - Geoserver4: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 101, - Geoserver3: 102, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 100, - Geoserver3: 110, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 100, - Geoserver3: 100, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 101, - Geoserver3: 110, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 201, - end: 201, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end with one of each source type having 0 hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 101, - Geoserver3: 110, - Geoserver4: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 101, - Geoserver3: 110, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 100, - Geoserver3: 110, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 101, - Geoserver3: 109, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 101, - Geoserver3: 110, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 210, - end: 210, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results with one of each source type having 0 hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 101, - Geoserver3: 101, - Geoserver4: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 102, - Geoserver3: 101, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 110, - Geoserver3: 100, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 100, - Geoserver3: 100, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 110, - Geoserver3: 101, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 201, - end: 201, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end with one of each source type having 0 hits', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 1, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 110, - Geoserver3: 101, - Geoserver4: 1, - }, - count: 1, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 110, - Geoserver3: 101, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 110, - Geoserver3: 100, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 109, - Geoserver3: 101, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 110, - Geoserver3: 101, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 210, - end: 210, - hits: 210, - }, - }, - }, - // now let's do multiple sources for each type with some having 0 hits with a count of 3 - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at beginning of results, with one of each source type having 0 hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 3, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 3, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 4, - Geoserver3: 4, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 100, - Geoserver3: 110, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 1, - Geoserver3: 1, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 101, - Geoserver3: 109, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 1, - end: 6, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between local and non local already ended, and non local not yet ended results with one of each source type having 0 hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 3, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 101, - Geoserver3: 103, - Geoserver4: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 101, - Geoserver3: 106, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 100, - Geoserver3: 110, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 100, - Geoserver3: 100, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 101, - Geoserver3: 109, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 203, - end: 205, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with non local being the last to end with one of each source type having 0 hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 2, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 101, - Geoserver3: 109, - Geoserver4: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 101, - Geoserver3: 109, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 100, - Geoserver3: 110, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 101, - Geoserver3: 106, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 101, - Geoserver3: 109, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 209, - end: 210, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus mixed between non local already ended, and local not yet ended results with one of each source type having 0 hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 3, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 103, - Geoserver3: 101, - Geoserver4: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 106, - Geoserver3: 101, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 110, - Geoserver3: 100, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 100, - Geoserver3: 100, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 109, - Geoserver3: 101, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 203, - end: 205, - hits: 210, - }, - }, - }, - { - caseDescription: - 'for multiple local sources and multiple non local sources with queryStatus at end of results, with local being the last to end with one of each source type having 0 hits with count 3', - caseData: { - sources: ['Geoserver1', 'Geoserver2', 'Geoserver3', 'Geoserver4'], - queryStatus: { - Geoserver1: { - id: 'Geoserver1', - count: 2, - hasReturned: true, - hits: 110, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver2: { - id: 'Geoserver2', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver3: { - id: 'Geoserver3', - count: 0, - hasReturned: true, - hits: 100, - elapsed: 500, - successful: true, - warnings: [], - }, - Geoserver4: { - id: 'Geoserver4', - count: 0, - hasReturned: true, - hits: 0, - elapsed: 500, - successful: true, - warnings: [], - }, - }, - isLocal: (id) => ['Geoserver1', 'Geoserver2'].includes(id), - currentIndexForSourceGroup: { - local: 109, - Geoserver3: 101, - Geoserver4: 1, - }, - count: 3, - }, - caseReturns: { - constrainedNextPageForSourceGroup: { - local: 109, - Geoserver3: 101, - Geoserver4: 1, - }, - indexOfLastResultForSourceGroup: { - local: 110, - Geoserver3: 100, - Geoserver4: 0, - }, - constrainedPreviousPageForSourceGroup: { - local: 106, - Geoserver3: 101, - Geoserver4: 1, - }, - constrainedFinalPageForSourceGroup: { - local: 109, - Geoserver3: 101, - Geoserver4: 1, - }, - currentStartAndEndForSourceGroup: { - start: 209, - end: 210, - hits: 210, - }, - }, - }, -] - -// this will verify that you've set up the test case data correctly, otherwise tests will fail for reasons outside of actual method issues, like returning wrong counts in sources -function verifyCaseData(caseData: CaseDataType, caseDescription: string) { - const { queryStatus, currentIndexForSourceGroup, count, isLocal } = caseData - - Object.values(queryStatus).forEach((status) => { - if (isLocal(status.id)) { - return // we verify this separately - } - const currentIndex = currentIndexForSourceGroup[status.id] - let correctCount = 0 - if (currentIndex <= status.hits) { - correctCount = Math.min(count, status.hits - currentIndex + 1) - } - // based of currentIndex and hits, we can decide if the count on the status is correct - if (status.count !== correctCount) { - it(`${caseDescription} status count is incorrect for ${status.id}, expected ${correctCount}, got ${status.count}`, () => { - expect(status.count).to.equal(correctCount) - }) - } - }) - if (Object.values(queryStatus).length > 0) { - const localStatuses = Object.values(queryStatus).filter((status) => - isLocal(status.id) - ) - if (localStatuses.length > 0) { - const currentLocalIndex = currentIndexForSourceGroup['local'] - const totalLocalHits = localStatuses.reduce( - (acc, status) => acc + status.hits, - 0 - ) - const totalLocalCount = localStatuses.reduce( - (acc, status) => acc + status.count, - 0 - ) - let correctCount = 0 - if (currentLocalIndex <= totalLocalHits) { - correctCount = Math.min(count, totalLocalHits - currentLocalIndex + 1) - } - if (totalLocalCount !== correctCount) { - it(`${caseDescription} local status count is incorrect, expected ${correctCount}, got ${totalLocalCount}`, () => { - expect(totalLocalCount).to.equal(correctCount) - }) - } - } - } -} - -describe('exercise various edge cases for searches involving sources and paging', () => { - CasesToTest.forEach((testCase) => { - const { caseDescription, caseData, caseReturns } = testCase - - if (!caseReturns) { - return - } - - // first verify that the status of the case test data is not in an inconsistent state - verifyCaseData(caseData, caseDescription) - - if (caseReturns.constrainedNextPageForSourceGroup) { - runTest( - `calculates next index ${caseDescription}`, - getConstrainedNextPageForSourceGroup, - caseData, - caseReturns.constrainedNextPageForSourceGroup - ) - } - - if (caseReturns.indexOfLastResultForSourceGroup) { - runTest( - `calculates index of last result ${caseDescription}`, - getIndexOfLastResultForSourceGroup, - caseData, - caseReturns.indexOfLastResultForSourceGroup - ) - } - - if (caseReturns.constrainedPreviousPageForSourceGroup) { - runTest( - `calculates previous page ${caseDescription}`, - getConstrainedPreviousPageForSourceGroup, - caseData, - caseReturns.constrainedPreviousPageForSourceGroup - ) - } - - if (caseReturns.constrainedFinalPageForSourceGroup) { - runTest( - `calculates final page ${caseDescription}`, - getConstrainedFinalPageForSourceGroup, - caseData, - caseReturns.constrainedFinalPageForSourceGroup - ) - } - - if (caseReturns.currentStartAndEndForSourceGroup) { - runTest( - `calculates current start and end ${caseDescription}`, - getCurrentStartAndEndForSourceGroup, - caseData, - caseReturns.currentStartAndEndForSourceGroup - ) - } - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.tsx deleted file mode 100644 index 2ccdcb5b8c7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Query.tsx +++ /dev/null @@ -1,747 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' -import _ from 'underscore' -import QueryResponse from './QueryResponse' -import { postSimpleAuditLog } from '../../react-component/utils/audit/audit-endpoint' -import cql from '../cql' -import _merge from 'lodash/merge' -import _cloneDeep from 'lodash.clonedeep' -import { v4 } from 'uuid' -import 'backbone-associations' -import { - LazyQueryResults, - SearchStatus, -} from './LazyQueryResult/LazyQueryResults' -import { - FilterBuilderClass, - FilterClass, - isFilterBuilderClass, -} from '../../component/filter-builder/filter.structure' -import { downgradeFilterTreeToBasic } from '../../component/query-basic/query-basic.view' -import { - getConstrainedFinalPageForSourceGroup, - getConstrainedNextPageForSourceGroup, - getCurrentStartAndEndForSourceGroup, - getConstrainedPreviousPageForSourceGroup, - hasNextPageForSourceGroup, - hasPreviousPageForSourceGroup, - IndexForSourceGroupType, - QueryStartAndEndType, -} from './Query.methods' -import wreqr from '../wreqr' -import { CommonAjaxSettings } from '../AjaxSettings' -import { StartupDataStore } from './Startup/startup' -export type QueryType = { - constructor: (_attributes: any, options: any) => void - set: (p1: any, p2?: any, p3?: any) => void - toJSON: () => any - defaults: () => any - resetToDefaults: (overridenDefaults: any) => void - applyDefaults: () => void - revert: () => void - isLocal: () => boolean - _handleDeprecatedFederation: (attributes: any) => void - initialize: (attributes: any) => void - getSelectedSources: () => Array - buildSearchData: () => any - isOutdated: () => boolean - startSearchIfOutdated: () => void - updateCqlBasedOnFilterTree: () => void - initializeResult: (options?: any) => { - data: any - selectedSources: any - isHarvested: any - isFederated: any - result: any - resultOptions: any - } - startSearchFromFirstPage: (options?: any, done?: any) => void - startSearch: (options?: any, done?: any) => void - currentSearches: Array - cancelCurrentSearches: () => void - clearResults: () => void - setSources: (sources: any) => void - setColor: (color: any) => void - getColor: () => any - color: () => any - getPreviousServerPage: () => void - hasPreviousServerPage: () => boolean - hasNextServerPage: () => boolean - getNextServerPage: () => void - getHasFirstServerPage: () => boolean - getFirstServerPage: () => void - getHasLastServerPage: () => boolean - getLastServerPage: () => void - getCurrentIndexForSourceGroup: () => IndexForSourceGroupType - getNextIndexForSourceGroup: () => IndexForSourceGroupType - resetCurrentIndexForSourceGroup: () => void - setNextIndexForSourceGroupToPrevPage: () => void - setNextIndexForSourceGroupToNextPage: () => void - getCurrentStartAndEndForSourceGroup: () => QueryStartAndEndType - hasCurrentIndexForSourceGroup: () => boolean - getMostRecentStatus: () => any - getLazyResults: () => LazyQueryResults - updateMostRecentStatus: () => void - refetch: () => void - canRefetch: () => boolean - [key: string]: any -} -export function limitToDeleted(cqlFilterTree: any) { - return new FilterBuilderClass({ - type: 'AND', - filters: [ - cqlFilterTree, - new FilterClass({ - property: '"metacard-tags"', - type: 'ILIKE', - value: 'deleted', - }), - new FilterClass({ - property: '"metacard.deleted.tags"', - type: 'ILIKE', - value: 'resource', - }), - ], - }) -} -export function limitToHistoric(cqlFilterTree: any) { - return new FilterBuilderClass({ - type: 'AND', - filters: [ - cqlFilterTree, - new FilterClass({ - property: '"metacard-tags"', - type: 'ILIKE', - value: 'revision', - }), - ], - }) -} -export default Backbone.AssociatedModel.extend({ - relations: [ - { - type: Backbone.One, - key: 'result', - relatedModel: QueryResponse, - isTransient: true, - }, - ], - // override constructor slightly to ensure options / attributes are available on the self ref immediately - constructor(attributes: any, options: any) { - if ( - !options || - !options.transformDefaults || - !options.transformFilterTree || - !options.transformSorts || - !options.transformCount - ) { - throw new Error( - 'Options for transformDefaults, transformFilterTree, transformSorts, and transformCount must be provided' - ) - } - this._constructorAttributes = attributes || {} - this.options = options - return Backbone.AssociatedModel.apply(this, arguments) - }, - set(data: any, value: any, options: any) { - try { - switch (typeof data) { - case 'object': - if ( - data.filterTree !== undefined && - typeof data.filterTree === 'string' - ) { - data.filterTree = JSON.parse(data.filterTree) - } - if (!isFilterBuilderClass(data.filterTree)) { - data.filterTree = new FilterBuilderClass(data.filterTree) - } - break - case 'string': - if (data === 'filterTree') { - if (typeof value === 'string') { - value = JSON.parse(value) - } - if (!isFilterBuilderClass(value)) { - value = new FilterBuilderClass(value) - } - } - break - } - } catch (e) { - console.error(e) - } - return Backbone.AssociatedModel.prototype.set.apply(this, [ - data, - value, - options, - ]) - }, - toJSON(...args: any) { - const json = Backbone.AssociatedModel.prototype.toJSON.call(this, ...args) - if (typeof json.filterTree === 'object') { - json.filterTree = JSON.stringify(json.filterTree) - } - return json - }, - defaults() { - const filterTree = this._constructorAttributes?.filterTree - let constructedFilterTree: FilterBuilderClass - let constructedCql = this._constructorAttributes?.cql || "anyText ILIKE '*'" - if (filterTree && typeof filterTree === 'string') { - constructedFilterTree = new FilterBuilderClass(JSON.parse(filterTree)) - } else if (!filterTree || filterTree.id === undefined) { - // when we make drastic changes to filter tree it will be necessary to fall back to cql and reconstruct a filter tree that's compatible - constructedFilterTree = cql.read(constructedCql) - console.warn('migrating a filter tree to the latest structure') - // allow downstream projects to handle how they want to inform users of migrations - ;(wreqr as any).vent.trigger('filterTree:migration', { - search: this, - }) - } else { - constructedFilterTree = new FilterBuilderClass(filterTree) - } - return this.options.transformDefaults({ - originalDefaults: { - cql: constructedCql, - filterTree: constructedFilterTree, - associatedFormModel: undefined, - excludeUnnecessaryAttributes: true, - count: StartupDataStore.Configuration.getResultCount(), - sorts: [ - { - attribute: 'modified', - direction: 'descending', - }, - ], - sources: ['all'], - // initialize this here so we can avoid creating spurious references to LazyQueryResults objects - result: new QueryResponse({ - lazyResults: new LazyQueryResults({ - filterTree: constructedFilterTree, - sorts: [], - sources: [], - transformSorts: ({ originalSorts }) => { - return this.options.transformSorts({ - originalSorts, - queryRef: this, - }) - }, - }), - }), - type: 'text', - isLocal: false, - isOutdated: false, - 'detail-level': undefined, - spellcheck: false, - phonetics: false, - additionalOptions: '{}', - currentIndexForSourceGroup: {} as IndexForSourceGroupType, - nextIndexForSourceGroup: {} as IndexForSourceGroupType, - mostRecentStatus: {} as SearchStatus, - }, - queryRef: this, - }) - }, - /** - * Add filterTree in here, since initialize is only run once (and defaults can't have filterTree) - */ - resetToDefaults(overridenDefaults: any) { - const defaults = _.omit( - { - ...this.defaults(), - filterTree: new FilterBuilderClass({ - filters: [ - new FilterClass({ - property: 'anyText', - value: '*', - type: 'ILIKE', - }), - ], - type: 'AND', - }), - }, - ['isLocal', 'result'] - ) - this.set(_merge(defaults, overridenDefaults)) - this.trigger('resetToDefaults') - }, - applyDefaults() { - this.set(_.pick(this.defaults(), ['sorts', 'sources'])) - }, - revert() { - this.trigger('revert') - }, - isLocal() { - return this.get('isLocal') - }, - _handleDeprecatedFederation(attributes: any) { - if (attributes && attributes.federation) { - console.error( - 'Attempt to set federation on a search. This attribute is deprecated. Did you mean to set sources?' - ) - } - }, - initialize(attributes: any) { - // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. - _.bindAll.apply(_, [this].concat(_.functions(this))) // underscore bindAll does not take array arg - this._handleDeprecatedFederation(attributes) - this.listenTo( - this, - 'change:cql change:filterTree change:sources change:sorts change:spellcheck change:phonetics change:count change:additionalOptions', - () => { - this.set('isOutdated', true) - this.set('mostRecentStatus', {}) - } - ) - this.listenTo(this, 'change:filterTree', () => { - this.getLazyResults()._resetFilterTree(this.get('filterTree')) - }) - // basically remove invalid filters when going from basic to advanced, and make it basic compatible - this.listenTo(this, 'change:type', () => { - if (this.get('type') === 'basic') { - const cleanedUpFilterTree = cql.removeInvalidFilters( - this.get('filterTree') - ) - this.set( - 'filterTree', - downgradeFilterTreeToBasic(cleanedUpFilterTree as any) - ) - } - }) - this.getLazyResults().subscribeTo({ - subscribableThing: 'status', - callback: () => { - this.updateMostRecentStatus() - }, - }) - }, - getSelectedSources() { - const Sources = StartupDataStore.Sources.sources - const sourceIds = Sources.map((src) => src.id) - const localSourceIds = Sources.filter((source) => source.harvested).map( - (src) => src.id - ) - const remoteSourceIds = Sources.filter((source) => !source.harvested).map( - (src) => src.id - ) - const selectedSources = this.get('sources') - let sourceArray = selectedSources - if (selectedSources.includes('all')) { - sourceArray = sourceIds - } - if (selectedSources.includes('local')) { - sourceArray = sourceArray - .concat(localSourceIds) - .filter((src: any) => src !== 'local') - } - if (selectedSources.includes('remote')) { - sourceArray = sourceArray - .concat(remoteSourceIds) - .filter((src: any) => src !== 'remote') - } - return sourceArray - }, - buildSearchData() { - const data = this.toJSON() - data.sources = this.getSelectedSources() - data.count = this.options.transformCount({ - originalCount: this.get('count'), - queryRef: this, - }) - data.sorts = this.options.transformSorts({ - originalSorts: this.get('sorts'), - queryRef: this, - }) - return _.pick( - data, - 'sources', - 'count', - 'timeout', - 'cql', - 'sorts', - 'id', - 'spellcheck', - 'phonetics', - 'additionalOptions' - ) - }, - isOutdated() { - return this.get('isOutdated') - }, - startSearchIfOutdated() { - if (this.isOutdated()) { - this.startSearch() - } - }, - /** - * We only keep filterTree up to date, then when we interact with the server we write out what it means - * - * We do this for performance, and because transformation is lossy. - * - * Also notice that we do a slight bit of validation, so anything that has no filters will translate to a star query (everything) - */ - updateCqlBasedOnFilterTree() { - const filterTree = this.get('filterTree') - if ( - !filterTree || - filterTree.filters === undefined || - filterTree.filters.length === 0 - ) { - this.set( - 'filterTree', - new FilterBuilderClass({ - filters: [ - new FilterClass({ value: '*', property: 'anyText', type: 'ILIKE' }), - ], - type: 'AND', - }) - ) - this.updateCqlBasedOnFilterTree() - } else { - this.set('cql', cql.write(filterTree)) - } - }, - startSearchFromFirstPage(options: any, done: any) { - this.updateCqlBasedOnFilterTree() - this.resetCurrentIndexForSourceGroup() - this.startSearch(options, done) - }, - initializeResult(options: any) { - const Sources = StartupDataStore.Sources.sources - options = _.extend( - { - limitToDeleted: false, - limitToHistoric: false, - additionalOptions: undefined, - }, - options - ) - this.options = _.extend(this.options, options) - - const data = _cloneDeep(this.buildSearchData()) - - if (options.additionalOptions) { - let optionsObj = JSON.parse(data.additionalOptions || '{}') - optionsObj = _.extend(optionsObj, options.additionalOptions) - data.additionalOptions = JSON.stringify(optionsObj) - } - data.batchId = v4() - // Data.sources is set in `buildSearchData` based on which sources you have selected. - let selectedSources = data.sources - const harvestedSources = Sources.filter((source) => source.harvested).map( - (source) => source.id - ) - const isHarvested = (id: any) => harvestedSources.includes(id) - const isFederated = (id: any) => !harvestedSources.includes(id) - if (options.limitToDeleted) { - selectedSources = data.sources.filter(isHarvested) - } - let result = this.get('result') - this.getLazyResults().reset({ - filterTree: this.get('filterTree'), - sorts: this.get('sorts'), - sources: selectedSources, - transformSorts: ({ originalSorts }: any) => { - return this.options.transformSorts({ originalSorts, queryRef: this }) - }, - }) - return { - data, - selectedSources, - isHarvested, - isFederated, - result, - resultOptions: options, - } - }, - // we need at least one status for the search to be able to correctly page things, technically we could just use the first one - updateMostRecentStatus() { - const currentStatus = this.getLazyResults().status - const previousStatus = this.getMostRecentStatus() - const newStatus = JSON.parse(JSON.stringify(previousStatus)) - // compare each key and overwrite only when the new status is successful - we need a successful status to page - Object.keys(currentStatus).forEach((key) => { - if (currentStatus[key].successful) { - newStatus[key] = currentStatus[key] - } - }) - this.set('mostRecentStatus', newStatus) - }, - getLazyResults(): LazyQueryResults { - return this.get('result').get('lazyResults') - }, - startSearch(options: any, done: any) { - this.trigger('panToShapesExtent') - this.set('isOutdated', false) - if (this.get('cql') === '') { - return - } - this.cancelCurrentSearches() - const { - data, - selectedSources, - isHarvested, - isFederated, - result, - resultOptions, - } = this.initializeResult(options) - data.fromUI = true - let cqlFilterTree = this.get('filterTree') - if (resultOptions.limitToDeleted) { - cqlFilterTree = limitToDeleted(cqlFilterTree) - } else if (resultOptions.limitToHistoric) { - cqlFilterTree = limitToHistoric(cqlFilterTree) - } - let cqlString = this.options.transformFilterTree({ - originalFilterTree: cqlFilterTree, - queryRef: this, - }) - this.set('currentIndexForSourceGroup', this.getNextIndexForSourceGroup()) - - postSimpleAuditLog({ - action: 'SEARCH_SUBMITTED', - component: - 'query: [' + cqlString + '] sources: [' + selectedSources + ']', - }) - - const federatedSearchesToRun = selectedSources - .filter(isFederated) - .map((source: any) => ({ - ...data, - cql: cqlString, - srcs: [source], - start: this.get('currentIndexForSourceGroup')[source], - })) - const searchesToRun = [...federatedSearchesToRun].filter( - (search) => search.srcs.length > 0 - ) - if (this.getCurrentIndexForSourceGroup().local) { - const localSearchToRun = { - ...data, - cql: cqlString, - srcs: selectedSources.filter(isHarvested), - start: this.getCurrentIndexForSourceGroup().local, - } - searchesToRun.push(localSearchToRun) - } - if (searchesToRun.length === 0) { - // reset to all and run - this.set('sources', ['all']) - this.startSearchFromFirstPage() - return - } - this.currentSearches = searchesToRun.map((search) => { - delete search.sources // This key isn't used on the backend and only serves to confuse those debugging this code. - // `result` is QueryResponse - return result.fetch({ - ...CommonAjaxSettings, - customErrorHandling: true, - data: JSON.stringify(search), - remove: false, - dataType: 'json', - contentType: 'application/json', - method: 'POST', - processData: false, - timeout: StartupDataStore.Configuration.getSearchTimeout(), - success(_model: any, response: any, options: any) { - response.options = options - }, - error(_model: any, response: any, options: any) { - response.options = options - }, - }) - }) - if (typeof done === 'function') { - done(this.currentSearches) - } - }, - currentSearches: [], - cancelCurrentSearches() { - this.currentSearches.forEach((request: any) => { - request.abort('Canceled') - }) - const result = this.get('result') - if (result) { - this.getLazyResults().cancel() - } - this.currentSearches = [] - }, - clearResults() { - this.cancelCurrentSearches() - this.set({ - result: undefined, - }) - }, - setSources(sources: any) { - const sourceArr = [] as any - sources.each((src: any) => { - if (src.get('available') === true) { - sourceArr.push(src.get('id')) - } - }) - if (sourceArr.length > 0) { - this.set('sources', sourceArr.join(',')) - } else { - this.set('sources', '') - } - }, - setColor(color: any) { - this.set('color', color) - }, - getColor() { - return this.get('color') - }, - color() { - return this.get('color') - }, - getPreviousServerPage() { - this.setNextIndexForSourceGroupToPrevPage() - this.startSearch(this.options) - }, - /** - * Much simpler than seeing if a next page exists - */ - hasPreviousServerPage() { - return hasPreviousPageForSourceGroup({ - currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), - }) - }, - hasNextServerPage() { - return hasNextPageForSourceGroup({ - queryStatus: this.getMostRecentStatus(), - isLocal: this.isLocalSource, - currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), - count: this.get('count'), - }) - }, - getNextServerPage() { - this.setNextIndexForSourceGroupToNextPage() - this.startSearch(this.options) - }, - getHasFirstServerPage() { - // so technically always "true" but what we really mean is, are we not on page 1 already - return this.hasPreviousServerPage() - }, - getFirstServerPage() { - this.startSearchFromFirstPage(this.options) - }, - getHasLastServerPage() { - // so technically always "true" but what we really mean is, are we not on last page already - return this.hasNextServerPage() - }, - getLastServerPage() { - this.set( - 'nextIndexForSourceGroup', - getConstrainedFinalPageForSourceGroup({ - queryStatus: this.getMostRecentStatus(), - isLocal: this.isLocalSource, - count: this.get('count'), - }) - ) - this.startSearch(this.options) - }, - resetCurrentIndexForSourceGroup() { - this.set('currentIndexForSourceGroup', {}) - if (this.get('result')) { - this.getLazyResults()._resetSources([]) - } - this.setNextIndexForSourceGroupToNextPage() - }, - /** - * Update the next index to be the prev page - */ - setNextIndexForSourceGroupToPrevPage() { - this.set( - 'nextIndexForSourceGroup', - getConstrainedPreviousPageForSourceGroup({ - sources: this.getSelectedSources(), - currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), - count: this.get('count'), - isLocal: this.isLocalSource, - queryStatus: this.getMostRecentStatus(), - }) - ) - }, - isLocalSource(id: string) { - const Sources = StartupDataStore.Sources.sources - const harvestedSources = Sources.filter((source) => source.harvested).map( - (source) => source.id - ) - return harvestedSources.includes(id) - }, - /** - * Update the next index to be the next page - */ - setNextIndexForSourceGroupToNextPage() { - this.set( - 'nextIndexForSourceGroup', - getConstrainedNextPageForSourceGroup({ - sources: this.getSelectedSources(), - currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), - count: this.get('count'), - isLocal: this.isLocalSource, - queryStatus: this.getMostRecentStatus(), - }) - ) - }, - getCurrentStartAndEndForSourceGroup() { - return getCurrentStartAndEndForSourceGroup({ - currentIndexForSourceGroup: this.getCurrentIndexForSourceGroup(), - queryStatus: this.getMostRecentStatus(), - isLocal: this.isLocalSource, - }) - }, - // try to return the most recent successful status - getMostRecentStatus(): SearchStatus { - const mostRecentStatus = this.get('mostRecentStatus') as SearchStatus - if (Object.keys(mostRecentStatus).length === 0) { - return this.getLazyResults().status || {} - } - return mostRecentStatus - }, - getCurrentIndexForSourceGroup() { - return this.get('currentIndexForSourceGroup') - }, - getNextIndexForSourceGroup() { - return this.get('nextIndexForSourceGroup') - }, - hasCurrentIndexForSourceGroup() { - return Object.keys(this.getCurrentIndexForSourceGroup()).length > 0 - }, - refetch() { - if (this.canRefetch()) { - this.set('nextIndexForSourceGroup', this.getCurrentIndexForSourceGroup()) - this.startSearch() - } else { - throw new Error( - 'Missing necessary data to refetch (currentIndexForSourceGroup), or search criteria is outdated.' - ) - } - }, - // as long as we have a current index, and the search criteria isn't out of date, we can refetch - useful for resuming searches - canRefetch() { - return this.hasCurrentIndexForSourceGroup() && !this.isOutdated() - }, - // common enough that we should extract this for ease of use - refetchOrStartSearchFromFirstPage() { - if (this.canRefetch()) { - this.refetch() - } else { - this.startSearchFromFirstPage() - } - }, -} as QueryType) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QueryResponse.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QueryResponse.ts deleted file mode 100644 index 30b4f786b03..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QueryResponse.ts +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import $ from 'jquery' -import Backbone from 'backbone' -import 'backbone-associations' -import { - LazyQueryResults, - transformResponseHighlightsToMap, -} from './LazyQueryResult/LazyQueryResults' -import { Client } from 'rpc-websockets' -import { StartupDataStore } from './Startup/startup' -import { - QueryResponseType, - checkForErrors, -} from '../../react-component/utils/fetch/fetch' - -let rpc: Client | null = null -let rpcInitial: Client | null = null -let rpcConnectionInitiated = false - -if (StartupDataStore.Configuration.getWebSocketsEnabled() && window.WebSocket) { - const protocol = { 'http:': 'ws:', 'https:': 'wss:' } - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const url = `${protocol[location.protocol]}//${location.hostname}:${ - location.port - }${location.pathname}ws` - rpcInitial = new Client(url, { autoconnect: false }) - - // Only set rpc if the connection succeeds - rpcInitial.once('open', () => { - rpc = rpcInitial - }) -} - -export default Backbone.AssociatedModel.extend({ - defaults() { - return { - lazyResults: undefined, - } - }, - url: './internal/cql', - initialize() { - this.listenTo(this, 'error', this.handleError) - - if (rpcInitial && !rpcConnectionInitiated) { - rpcInitial.connect() - rpcConnectionInitiated = true - } - }, - sync(method: any, model: any, options: any) { - if (rpc !== null) { - let handled = false - const promise = rpc - .call('query', [options.data], options.timeout) - .then( - // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. - (res: QueryResponseType) => { - if (!handled) { - handled = true - checkForErrors(res) - options.success(res) - return [res, 'success'] - } - } - ) - // @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. - .catch((res: any) => { - if (!handled) { - handled = true - res.options = options - switch (res.code) { - case 400: - case 404: - case 500: - options.error({ - responseJSON: res, - }) - break - case -32000: - if (rpc !== null) { - rpc.close() - rpc = null - } - options.error({ - responseJSON: { - message: 'User not logged in.', - }, - }) - break - default: - // notify user and fallback to http - if (rpc !== null) { - rpc.close() - rpc = null - } - options.error({ - responseJSON: { - message: - 'Search failed due to unknown reasons, please try again.', - }, - }) - } - return [res, 'error'] - } - }) - model.trigger('request', model, null, options) - return { - abort() { - if (!handled) { - handled = true - options.error({ - responseJSON: { - message: 'Stopped', - }, - }) - } - }, - promise() { - const d = $.Deferred() - promise - .then((value: any) => { - d.resolve(value) - }) - .catch((err: any) => { - d.reject(err) - }) - return d - }, - } - } else { - return Backbone.AssociatedModel.prototype.sync.call( - this, - method, - model, - options - ) - } - }, - handleError(_resultModel: any, response: any, sent: any) { - const dataJSON = JSON.parse(sent.data) - this.get('lazyResults').updateStatusWithError({ - sources: dataJSON.srcs, - message: response.responseJSON - ? response.responseJSON.message - : response.statusText, - }) - }, - handleSync() {}, - parse(resp: any) { - StartupDataStore.MetacardDefinitions.addDynamicallyFoundMetacardDefinitionsFromSearchResults( - resp.types - ) - const lazyResults = this.get('lazyResults') as LazyQueryResults - lazyResults.addTypes(resp.types) - lazyResults.updateStatus(resp.statusBySource) - lazyResults.updateDidYouMeanFields(resp.didYouMeanFields) - lazyResults.updateShowingResultsForFields(resp.showingResultsForFields) - lazyResults.addHighlights( - transformResponseHighlightsToMap({ - highlights: resp.highlights, - }) - ) - lazyResults.add({ - results: resp.results, - }) - return {} - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QueryResult.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QueryResult.ts deleted file mode 100644 index 1f77c44dd56..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QueryResult.ts +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' - -import _ from 'underscore' -import $ from 'jquery' -import Common from '../Common' -import cql from '../cql' -import 'backbone-associations' -import Metacard from './Metacard' -import MetacardActionModel from './MetacardAction' -import { StartupDataStore } from './Startup/startup' - -function generateThumbnailUrl(url: any) { - let newUrl = url - if (url.indexOf('?') >= 0) { - newUrl += '&' - } else { - newUrl += '?' - } - newUrl += '_=' + Date.now() - return newUrl -} - -function humanizeResourceSize(result: any) { - if (result.metacard.properties['resource-size']) { - result.metacard.properties['resource-size'] = Common.getFileSize( - result.metacard.properties['resource-size'] - ) - } -} - -export default Backbone.AssociatedModel.extend({ - type: 'query-result', - defaults() { - return { - isResourceLocal: false, - } - }, - relations: [ - { - type: Backbone.One, - key: 'metacard', - relatedModel: Metacard, - }, - { - type: Backbone.Many, - key: 'actions', - collectionType: Backbone.Collection.extend({ - model: MetacardActionModel, - comparator(c: any) { - return c.get('title').toLowerCase() - }, - }), - }, - ], - initialize() { - this.refreshData = _.throttle(this.refreshData, 200) - }, - getTitle() { - return this.get('metacard').get('properties').attributes.title - }, - getPreview() { - return this.get('metacard').get('properties').get('ext.extracted.text') - }, - hasPreview() { - return ( - this.get('metacard').get('properties').get('ext.extracted.text') !== - undefined - ) - }, - isResource() { - return ( - this.get('metacard') - .get('properties') - .get('metacard-tags') - .indexOf('resource') >= 0 - ) - }, - isRevision() { - return ( - this.get('metacard') - .get('properties') - .get('metacard-tags') - .indexOf('revision') >= 0 - ) - }, - isDeleted() { - return ( - this.get('metacard') - .get('properties') - .get('metacard-tags') - .indexOf('deleted') >= 0 - ) - }, - isRemote() { - const Sources = StartupDataStore.Sources.sources - const harvestedSources = Sources.filter((source) => source.harvested).map( - (source) => source.id - ) - return ( - harvestedSources.includes( - this.get('metacard').get('properties').get('source-id') - ) === false - ) - }, - hasGeometry(attribute: any) { - return this.get('metacard').hasGeometry(attribute) - }, - getPoints(attribute: any) { - return this.get('metacard').getPoints(attribute) - }, - getGeometries(attribute: any) { - return this.get('metacard').getGeometries(attribute) - }, - hasExportActions() { - return this.getExportActions().length > 0 - }, - getOtherActions() { - const otherActions = this.getExportActions().concat(this.getMapActions()) - return this.get('actions').filter( - (action: any) => otherActions.indexOf(action) === -1 - ) - }, - getExportActions() { - const otherActions = this.getMapActions() - return this.get('actions') - .filter((action: any) => action.get('title').indexOf('Export') === 0) - .filter((action: any) => otherActions.indexOf(action) === -1) - }, - hasMapActions() { - return this.getMapActions().length > 0 - }, - getMapActions() { - return this.get('actions').filter( - (action: any) => action.id.indexOf('catalog.data.metacard.map.') === 0 - ) - }, - refreshData(metacardProperties: any) { - if (metacardProperties !== undefined) { - const updatedResult = this.toJSON() - updatedResult.metacard.properties = metacardProperties - this.set(updatedResult) - - const clearedAttributes = Object.keys( - this.get('metacard').get('properties').toJSON() - ).reduce((acc, cur) => { - return cur in metacardProperties ? acc : [cur, ...acc] - }, []) - clearedAttributes.forEach((attribute) => { - this.get('metacard').get('properties').unset(attribute) - }) - - this.trigger('refreshdata') - return - } - - //let solr flush - setTimeout(() => { - const metacard = this.get('metacard') - const req = { - count: 1, - cql: cql.write({ - type: 'AND', - filters: [ - { - type: 'OR', - filters: [ - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: "="; property: string; value: any; }... Remove this comment to see the full error message - { - type: '=', - property: '"id"', - value: - metacard.get('properties').get('metacard.deleted.id') || - metacard.id, - }, - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: "="; property: string; value: any; }... Remove this comment to see the full error message - { - type: '=', - property: '"metacard.deleted.id"', - value: metacard.id, - }, - ], - }, - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: "ILIKE"; property: string; value: st... Remove this comment to see the full error message - { - type: 'ILIKE', - property: '"metacard-tags"', - value: '*', - }, - ], - }), - id: '0', - sort: 'modified:desc', - src: metacard.get('properties').get('source-id'), - } - $.ajax({ - type: 'POST', - url: './internal/cql', - data: JSON.stringify(req), - contentType: 'application/json', - }).then(this.parseRefresh.bind(this), this.handleRefreshError.bind(this)) - }, 1000) - }, - handleRefreshError() { - //do nothing for now, should we announce this? - }, - parseRefresh(response: any) { - const queryId = this.get('metacard').get('queryId') - const color = this.get('metacard').get('color') - _.forEach(response.results, (result) => { - delete result.relevance - result.propertyTypes = - response.types[result.metacard.properties['metacard-type']] - result.metacardType = result.metacard.properties['metacard-type'] - result.metacard.id = result.metacard.properties.id - result.id = result.metacard.id + result.metacard.properties['source-id'] - result.metacard.queryId = queryId - result.metacard.color = color - humanizeResourceSize(result) - result.actions.forEach((action: any) => (action.queryId = queryId)) - const thumbnailAction = _.findWhere(result.actions, { - id: 'catalog.data.metacard.thumbnail', - }) - if (result.hasThumbnail && thumbnailAction) { - result.metacard.properties.thumbnail = generateThumbnailUrl( - thumbnailAction.url - ) - } else { - result.metacard.properties.thumbnail = undefined - } - }) - this.set(response.results[0]) - this.trigger('refreshdata') - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QuerySettings.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QuerySettings.ts deleted file mode 100644 index 6900cf8dbea..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/QuerySettings.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' -import { StartupDataStore } from './Startup/startup' -export default Backbone.Model.extend({ - defaults() { - const sources = StartupDataStore.Configuration.getDefaultSources() - return { - type: 'text', - sources, - sorts: [ - { - attribute: 'modified', - direction: 'descending', - }, - ], - template: undefined, - spellcheck: false, - phonetics: false, - additionalOptions: '{}', - } - }, - isTemplate(template: any) { - if (this.get('defaultResultFormId') === template.id) { - return true - } - if (this.get('template') !== undefined) { - return this.get('template').id === template.id - } else { - return false - } - }, - isDefaultTemplate(template: any) { - return this.isTemplate(template) && this.get('template').default - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/configuration.hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/configuration.hooks.tsx deleted file mode 100644 index 6e54c2a5bf9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/configuration.hooks.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { SnapshotManager } from './snapshot' -import { StartupDataStore } from './startup' -import { useSyncExternalStore } from 'react' - -const subscribe = (callback: () => void) => { - const cancelSubscription = StartupDataStore.Configuration.subscribeTo({ - subscribableThing: 'configuration-update', - callback, - }) - return () => { - cancelSubscription() - } -} - -const snapshotManager = new SnapshotManager(() => { - return StartupDataStore.Configuration -}, subscribe) - -export const useConfiguration = () => { - const configuration = useSyncExternalStore( - snapshotManager.subscribe, - snapshotManager.getSnapshot - ) - return configuration -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/configuration.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/configuration.tsx deleted file mode 100644 index c0826234334..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/configuration.tsx +++ /dev/null @@ -1,185 +0,0 @@ -import { Subscribable } from '../Base/base-classes' -import { StartupPayloadType } from './startup.types' -import { StartupData } from './startup' -import _ from 'underscore' -import { DataTypesConfiguration } from '../../../component/datatypes/datatypes' - -function match(regexList: any, attribute: any) { - return ( - _.chain(regexList) - .map((str) => new RegExp(str)) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '(regex: RegExp) => RegExpExecArr... Remove this comment to see the full error message - .find((regex) => regex.exec(attribute)) - .value() !== undefined - ) -} - -class Configuration extends Subscribable<{ thing: 'configuration-update' }> { - config?: StartupPayloadType['config'] - platformUiConfiguration?: StartupPayloadType['platformUiConfiguration'] - constructor(startupData?: StartupData) { - super() - startupData?.subscribeTo({ - subscribableThing: 'fetched', - callback: (startupPayload) => { - this.config = startupPayload.config - this.platformUiConfiguration = startupPayload.platformUiConfiguration - this._notifySubscribers({ thing: 'configuration-update' }) - }, - }) - } - getExportLimit = () => { - return this.config?.exportResultLimit || 1000 - } - getResultCount = () => { - return this.config?.resultCount || 250 - } - getProjection = () => { - return this.config?.projection || 'EPSG:4326' - } - getI18n = () => { - return this.config?.i18n || {} - } - getAttributeAliases = () => { - return this.config?.attributeAliases || {} - } - isReadOnly = (attribute: string) => { - return match(this.getReadOnly(), attribute) - } - getReadOnly = () => { - return this.config?.readOnly || [] - } - getSummaryShow = () => { - return this.config?.summaryShow || [] - } - getRequiredExportAttributes = () => { - return this.config?.requiredExportAttributes || [] - } - getExportMetacardFormatOptions = () => { - return this.config?.exportMetacardFormatOptions || [] - } - getExportMetacardsFormatOptions = () => { - return this.config?.exportMetacardsFormatOptions || [] - } - getCommonAttributes = () => { - return this.config?.commonAttributes || [] - } - getImageryProviders = () => { - return this.config?.imageryProviders || [] - } - getTerrainProvider = () => { - return this.config?.terrainProvider || {} - } - getBingKey = () => { - return this.config?.bingKey || '' - } - getSystemUsageMessage = () => { - return this.platformUiConfiguration?.systemUsageMessage || '' - } - // in minutes - getPlatformUITimeout = () => { - return this.platformUiConfiguration?.timeout || 15 - } - getBasicSearchTemporalSelectionDefault = () => { - return ( - this.config?.basicSearchTemporalSelectionDefault || [ - 'created', - 'effective', - 'modified', - 'metacard.created', - 'metacard.modified', - ] - ) - } - getEnums = () => { - return this.config?.enums || {} - } - getOnlineGazetteer = () => { - return this.config?.onlineGazetteer || false - } - getResultShow = () => { - return this.config?.resultShow || [] - } - getIconConfig = () => { - return this.config?.iconConfig || {} - } - getShowRelevanceScores = () => { - return this.config?.showRelevanceScores || false - } - getRelevancePrecision = () => { - return this.config?.relevancePrecision || 2 - } - getMapHome = () => { - return this.config?.mapHome || '' - } - getHelpUrl = () => { - return this.config?.helpUrl || '' - } - getCustomBranding = () => { - return this.config?.customBranding || '' - } - getTopLeftLogoSrc = () => { - return this.config?.topLeftLogoSrc || '' - } - getProduct = () => { - return this.config?.product || '' - } - getMenuIconSrc = () => { - return this.config?.menuIconSrc || '' - } - getBottomLeftBackgroundSrc = () => { - return this.config?.bottomLeftBackgroundSrc || '' - } - getPlatformHeader = () => { - return this.platformUiConfiguration?.header - } - getPlatformFooter = () => { - return this.platformUiConfiguration?.footer - } - getPlatformBackground = () => { - return this.platformUiConfiguration?.background - } - getPlatformColor = () => { - return this.platformUiConfiguration?.color - } - getWebSocketsEnabled = () => { - return this.config?.webSocketsEnabled - } - getBasicSearchMatchType = () => { - return this.config?.basicSearchMatchType || 'datatype' - } - getDefaultLayout = () => { - return this.config?.defaultLayout - } - // in milliseconds - getSearchTimeout = () => { - return this.config?.timeout || 300000 - } - getDefaultSources = () => { - return this.config?.defaultSources && this.config?.defaultSources.length > 0 - ? this.config.defaultSources - : ['all'] - } - getDefaultTableColumns = () => { - return this.config?.defaultTableColumns || [] - } - getIsFuzzyResultsEnabled = () => { - return this.config?.isFuzzyResultsEnabled || false - } - getDisableUnknownErrorBox = () => { - return this.config?.disableUnknownErrorBox || false - } - getExtra = () => { - return this.config?.extra - } - getDataTypes = (): DataTypesConfiguration => { - return { - groups: this.getExtra()?.datatypes?.groups || {}, - } - } - getResourceSizeIdentifiers = (): string[] => { - return this.getExtra()?.resourceSizeIdentifiers || [] - } -} - -export { Configuration } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/metacard-definitions.hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/metacard-definitions.hooks.tsx deleted file mode 100644 index 1bb6faa1fbb..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/metacard-definitions.hooks.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { SnapshotManager } from './snapshot' -import { StartupDataStore } from './startup' -import { useSyncExternalStore } from 'react' - -const subscribe = (callback: () => void) => { - const cancelSubscription = StartupDataStore.MetacardDefinitions.subscribeTo({ - subscribableThing: 'metacard-definitions-update', - callback, - }) - return () => { - cancelSubscription() - } -} - -const snapshotManager = new SnapshotManager(() => { - return StartupDataStore.MetacardDefinitions -}, subscribe) - -export const useMetacardDefinitions = () => { - const metacardDefinitions = useSyncExternalStore( - snapshotManager.subscribe, - snapshotManager.getSnapshot - ) - return metacardDefinitions -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/metacard-definitions.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/metacard-definitions.tsx deleted file mode 100644 index 7cdb8d7f95e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/metacard-definitions.tsx +++ /dev/null @@ -1,205 +0,0 @@ -import { BasicDataTypePropertyName } from '../../../component/filter-builder/reserved.properties' -import { Subscribable } from '../Base/base-classes' -import { StartupData } from './startup' -import { - AttributeDefinitionType, - AttributeMapType, - MetacardDefinitionType, - MetacardDefinitionsType, - SearchResultAttributeDefinitionType, - SearchResultMetacardDefinitionType, - StartupPayloadType, -} from './startup.types' - -function sortMetacardTypes(metacardTypes: AttributeMapType = {}) { - return Object.values(metacardTypes).sort((a, b) => { - const attrToCompareA = (a.alias || a.id).toLowerCase() - const attrToCompareB = (b.alias || b.id).toLowerCase() - if (attrToCompareA < attrToCompareB) { - return -1 - } - if (attrToCompareA > attrToCompareB) { - return 1 - } - return 0 - }) -} - -class MetacardDefinitions extends Subscribable<{ - thing: 'metacard-definitions-update' -}> { - attributeMap?: StartupPayloadType['attributeMap'] - sortedAttributes?: StartupPayloadType['sortedAttributes'] - metacardTypes?: StartupPayloadType['metacardTypes'] - constructor(startupData?: StartupData) { - super() - startupData?.subscribeTo({ - subscribableThing: 'fetched', - callback: (startupPayload) => { - this.attributeMap = startupPayload.attributeMap - this.sortedAttributes = startupPayload.sortedAttributes - this.metacardTypes = startupPayload.metacardTypes - this._notifySubscribers({ thing: 'metacard-definitions-update' }) - }, - }) - } - // each time a search is conducted, this is possible, as searches return types - addDynamicallyFoundMetacardDefinitionsFromSearchResults = ( - definitions: SearchResultMetacardDefinitionType - ) => { - const unknownMetacardTypes = Object.keys(definitions).filter( - this.isUnknownMetacardType - ) - if (unknownMetacardTypes.length === 0) { - // don't do unnecessary work - return - } - const transformedDefinitions = Object.entries(definitions).reduce( - (blob, entry) => { - const [key, value] = entry - blob[key] = Object.entries(value).reduce((innerBlob, innerEntry) => { - const [innerKey, innerValue] = innerEntry as unknown as [ - string, - SearchResultAttributeDefinitionType - ] - innerBlob[innerKey] = { - id: innerKey, - type: innerValue.format, - multivalued: innerValue.multivalued, - isInjected: false, // not sure we need this - } - return innerBlob - }, {} as AttributeMapType) - return blob - }, - {} as MetacardDefinitionsType - ) - this.addDynamicallyFoundMetacardDefinitions(transformedDefinitions) - } - addDynamicallyFoundMetacardDefinitions = ( - definitions: MetacardDefinitionsType - ) => { - const unknownMetacardTypes = Object.keys(definitions).filter( - this.isUnknownMetacardType - ) - unknownMetacardTypes.forEach((type) => { - this.addUnknownMetacardType({ - name: type, - definition: definitions[type], - }) - }) - const unknownAttributes = unknownMetacardTypes.reduce( - (blob, definitionName) => { - const mapOfUnknownAttributeDefinitionsFromUnknownType = Object.keys( - definitions[definitionName] - ) - .filter(this.isUnknownAttribute) - .reduce((innerBlob, attributeName) => { - innerBlob[attributeName] = - definitions[definitionName][attributeName] - return innerBlob - }, {} as AttributeMapType) - Object.assign(blob, mapOfUnknownAttributeDefinitionsFromUnknownType) - return blob - }, - {} as AttributeMapType - ) - this.addUnknownAttributes(unknownAttributes) - if (Object.keys(unknownAttributes).length > 0) { - this.resortKnownMetacardAttributes() - } - } - addUnknownMetacardType = ({ - name, - definition, - }: { - name: string - definition: MetacardDefinitionType - }) => { - if (this.metacardTypes) { - this.metacardTypes[name] = definition - } - } - addUnknownAttributes = (definition: MetacardDefinitionType) => { - if (this.attributeMap) { - Object.entries(definition) - .filter((entry) => this.isUnknownAttribute(entry[0])) - .forEach((entry) => { - this.addUnknownAttribute({ - attributeName: entry[0], - attributeDefinition: entry[1], - }) - }) - } - } - addUnknownAttribute = ({ - attributeDefinition, - attributeName, - }: { - attributeName: string - attributeDefinition: AttributeDefinitionType - }) => { - if (this.attributeMap) { - this.attributeMap[attributeName] = attributeDefinition - } - } - isUnknownAttribute = (attributeName: string) => { - if (this.attributeMap) { - return this.attributeMap[attributeName] === undefined - } - return true - } - isUnknownMetacardType = (metacardType: string) => { - if (this.metacardTypes) { - return this.metacardTypes[metacardType] === undefined - } - return true - } - resortKnownMetacardAttributes = () => { - this.sortedAttributes = sortMetacardTypes(this.attributeMap) - this._notifySubscribers({ thing: 'metacard-definitions-update' }) - } - isHiddenAttribute = (id: string): boolean => { - if (!this.attributeMap) { - return false - } - return ( - this.attributeMap[id] === undefined || - this.attributeMap[id].hidden === true - ) - } - getMetacardDefinition = (metacardTypeName: string) => { - return this.metacardTypes?.[metacardTypeName] || {} - } - getRequired = (metacardTypeName: string, attributeName: string) => { - return ( - this.metacardTypes?.[metacardTypeName]?.[attributeName]?.required || false - ) - } - getAlias = (attributeName: string) => { - return this.attributeMap?.[attributeName]?.alias || attributeName - } - getType = (attributeName: string) => { - return this.attributeMap?.[attributeName]?.type || 'STRING' - } - isMulti = (attributeName: string) => { - return this.attributeMap?.[attributeName]?.multivalued || false - } - getEnum = (attributeName: string) => { - return this.attributeMap?.[attributeName]?.enumerations || [] - } - getSearchOnlyAttributes = () => { - return ['anyText', 'anyGeo', 'anyDate', BasicDataTypePropertyName] - } - getSortedAttributes = () => { - return this.sortedAttributes || [] - } - getAttributeMap = () => { - return this.attributeMap || {} - } - getAttributeDefinition = (id: string) => { - return this.attributeMap?.[id] - } -} - -export { MetacardDefinitions } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/snapshot.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/snapshot.tsx deleted file mode 100644 index 03c3b4112c2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/snapshot.tsx +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import _cloneDeep from 'lodash.clonedeep' -import _isEqualWith from 'lodash.isequalwith' -import { Subscribable } from '../Base/base-classes' - -/** - * useSyncExternalStore expects us to return a cached or immutable version of the object - * as a result, it tries to be smart and only rerender if the object itself is different (despite our subscription telling it to update) - * this allows us to do a simple compare / snapshot to handle our usage of mutable data with useSyncExternalStore - */ -export class SnapshotManager extends Subscribable<{ thing: 'update' }> { - private snapshot: Data - private getMutable: () => Data - private subscribeToMutable: (callback: () => void) => void - private updateSnapshot = () => { - const newSnapshot = _cloneDeep(this.getMutable()) - if ( - !_isEqualWith(newSnapshot, this.snapshot, (_v1, _v2, key) => { - if (key === 'subscriptionsToMe') { - return true // Ignore the "subscriptionsToMe" field - } - // Perform default comparison for other fields - return undefined - }) - ) { - this.snapshot = newSnapshot - this._notifySubscribers({ thing: 'update' }) - } - } - constructor( - getMutable: () => Data, - subscribeToMutable: (callback: () => void) => void - ) { - super() - this.getMutable = getMutable - this.snapshot = _cloneDeep(this.getMutable()) - this.subscribeToMutable = subscribeToMutable - this.subscribeToMutable(() => { - this.updateSnapshot() - }) - } - subscribe = (callback: () => void) => { - return this.subscribeTo({ subscribableThing: 'update', callback }) - } - getSnapshot = (): Data => { - return this.snapshot - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/sources.hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/sources.hooks.tsx deleted file mode 100644 index 222f47241e0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/sources.hooks.tsx +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { StartupDataStore } from './startup' -import { useSyncExternalStore } from 'react' -import { SnapshotManager } from './snapshot' - -const subscribe = (callback: () => void) => { - const cancelSubscription = StartupDataStore.Sources.subscribeTo({ - subscribableThing: 'sources-update', - callback, - }) - return () => { - cancelSubscription() - } -} - -const snapshotManager = new SnapshotManager(() => { - return StartupDataStore.Sources -}, subscribe) - -// I want to be able to pass a subscribe callback, and only update it when the subscribe happens -export const useSources = () => { - const sources = useSyncExternalStore( - snapshotManager.subscribe, - snapshotManager.getSnapshot - ) - return sources -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/sources.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/sources.tsx deleted file mode 100644 index 75f1f425b32..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/sources.tsx +++ /dev/null @@ -1,152 +0,0 @@ -import { Subscribable } from '../Base/base-classes' -import { StartupPayloadType } from './startup.types' -import { StartupData } from './startup' -import fetch from '../../../react-component/utils/fetch/fetch' - -function getLocalCatalog(data?: Sources) { - return data?.localSourceId || 'local' -} - -function getSourcePollInterval(data?: StartupPayloadType) { - return data?.config.sourcePollInterval || 60000 -} - -function markHarvestedSources({ - sources, - data, -}: { - sources: StartupPayloadType['sources'] - data?: Sources -}) { - sources.forEach((source) => { - source.harvested = data?.harvestedSources?.includes(source.id) - }) -} - -function updateSources({ - data, - sources, -}: { - data?: Sources - sources: StartupPayloadType['sources'] -}) { - if (data) { - sources = removeLocalCatalogIfNeeded({ sources, data }) - sources = removeCache({ sources }) - markLocalSource({ sources, data }) - markHarvestedSources({ sources, data }) - sources = sortSources({ sources }) - data.sources = sources - } -} - -function removeLocalCatalogIfNeeded({ - sources, - data, -}: { - sources: StartupPayloadType['sources'] - data?: Sources -}) { - if (data?.disableLocalCatalog) { - sources = sources.filter((source) => source.id !== getLocalCatalog(data)) - } - return sources -} - -function removeCache({ sources }: { sources: StartupPayloadType['sources'] }) { - return sources.filter((source) => source.id !== 'cache') -} - -function markLocalSource({ - sources, - data, -}: { - sources: StartupPayloadType['sources'] - data?: Sources -}) { - const localSource = sources.find( - (source) => source.id === getLocalCatalog(data) - ) - if (localSource) { - localSource.local = true - } -} - -function sortSources({ sources }: { sources: StartupPayloadType['sources'] }) { - return sources.sort((a, b) => { - const aName = a.id.toLowerCase() - const bName = b.id.toLowerCase() - const aAvailable = a.available - const bAvailable = b.available - if ((aAvailable && bAvailable) || (!aAvailable && !bAvailable)) { - if (aName < bName) { - return -1 - } - if (aName > bName) { - return 1 - } - return 0 - } else if (!aAvailable) { - return -1 - } else if (!bAvailable) { - return 1 - } - return 0 - }) -} - -class Sources extends Subscribable<{ - thing: 'sources-initialized' | 'sources-update' -}> { - sources: StartupPayloadType['sources'] = [] - localSourceId: StartupPayloadType['localSourceId'] = 'local' - harvestedSources: StartupPayloadType['harvestedSources'] = ['local'] - sourcePollInterval: StartupPayloadType['config']['sourcePollInterval'] = 60000 - disableLocalCatalog: StartupPayloadType['config']['disableLocalCatalog'] = - false - constructor(startupData?: StartupData) { - super() - startupData?.subscribeTo({ - subscribableThing: 'fetched', - callback: (startupPayload) => { - this.sources = startupPayload.sources - this.localSourceId = startupPayload.localSourceId - this.harvestedSources = startupPayload.harvestedSources - this.disableLocalCatalog = startupPayload.config.disableLocalCatalog - this.sourcePollInterval = getSourcePollInterval(startupPayload) - this.setHarvestedSources(this.harvestedSources) - this.startPollingSources() - }, - }) - } - - fetchSources = () => { - fetch('./internal/catalog/sources') - .then((response) => response.json()) - .then((sources) => { - this.updateSources(sources) - }) - } - - startPollingSources = () => { - this._notifySubscribers({ thing: 'sources-initialized' }) - window.setInterval(() => { - this.fetchSources() - }, this.sourcePollInterval) - } - updateSources = (sources: StartupPayloadType['sources'] = []) => { - updateSources({ data: this, sources }) - this._notifySubscribers({ thing: 'sources-update' }) - } - setHarvestedSources = (harvestedSources: string[] = []) => { - if (this.sources) { - this.harvestedSources = - harvestedSources.length > 0 - ? [...harvestedSources, this.localSourceId] - : [this.localSourceId] - this.updateSources(this.sources) - } - } -} - -export { Sources } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.hooks.tsx deleted file mode 100644 index c73b1af127d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.hooks.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { StartupDataStore } from './startup' -import { useSyncExternalStore } from 'react' -import { SnapshotManager } from './snapshot' - -const subscribe = (callback: () => void) => { - const cancelSubscription = StartupDataStore.subscribeTo({ - subscribableThing: 'fetched', - callback, - }) - return () => { - cancelSubscription() - } -} - -const snapshotManager = new SnapshotManager(() => { - return StartupDataStore -}, subscribe) - -export const useStartupData = () => { - const startupData = useSyncExternalStore( - snapshotManager.subscribe, - snapshotManager.getSnapshot - ) - return startupData -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.tsx deleted file mode 100644 index 183a558e683..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { Subscribable } from '../Base/base-classes' // Import Subscribable from base-classes module -import { StartupPayloadType } from './startup.types' -import { Sources } from './sources' -import fetch from '../../../react-component/utils/fetch/fetch' -import { Configuration } from './configuration' -import { MetacardDefinitions } from './metacard-definitions' - -export class StartupData extends Subscribable<{ - thing: 'fetched' - args: StartupPayloadType -}> { - data?: Omit< - StartupPayloadType, - | 'sources' - | 'harvestedSources' - | 'localSourceId' - | 'config' - | 'platformUIConfiguration' - | 'attributeMap' - | 'sortedAttributes' - | 'metacardTypes' - > - Sources: Sources - Configuration: Configuration - MetacardDefinitions: MetacardDefinitions - constructor() { - super() - this.Configuration = new Configuration(this) - this.Sources = new Sources(this) - this.MetacardDefinitions = new MetacardDefinitions(this) - this.fetch() - } - fetch() { - fetch('./internal/compose/startup') - .then((response) => response.json()) - .then((startupPayload: StartupPayloadType) => { - this.data = startupPayload - this._notifySubscribers({ thing: 'fetched', args: startupPayload }) - }) - } -} - -export const StartupDataStore = new StartupData() diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.types.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.types.tsx deleted file mode 100644 index 6911d613018..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Startup/startup.types.tsx +++ /dev/null @@ -1,378 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { DataTypesConfiguration } from '../../../component/datatypes/datatypes' - -export type AttributeTypes = - | 'BINARY' - | 'DATE' - | 'LOCATION' - | 'GEOMETRY' - | 'LONG' - | 'DOUBLE' - | 'FLOAT' - | 'INTEGER' - | 'SHORT' - | 'STRING' - | 'BOOLEAN' - | 'XML' - | 'OBJECT' - -export type AttributeDefinitionType = { - id: string - isInjected: boolean - multivalued: boolean - type: AttributeTypes - alias?: string - enumerations?: string[] - deprecatedEnumerations?: string[] - hidden?: boolean - required?: boolean -} - -export type AttributeMapType = { - [key: string]: AttributeDefinitionType -} - -export type MetacardDefinitionType = AttributeMapType - -export type MetacardDefinitionsType = { - [key: string]: MetacardDefinitionType -} - -// slightly different format, which we have to transform - probably worth updating the search endpoint to return it in the format we expect -export type SearchResultAttributeDefinitionType = { - format: AttributeTypes - indexed: boolean - multivalued: boolean -} - -export type SearchResultAttributeMap = { - [key: string]: SearchResultAttributeDefinitionType -} - -export type SearchResultMetacardDefinitionType = SearchResultAttributeMap - -export type SortedAttributesType = Array - -export interface ImageryProvider { - type: string - url: string - parameters: { - format?: string - transparent?: boolean - imageSize?: number[] - } - alpha: number - name: string - show: boolean - proxyEnabled: boolean - order: number -} - -export interface IconConfig { - [key: string]: { - code: string - size: string - className: string - font: string - } -} - -export interface VisualizationType { - type: string - title: string - content: { - type: string - title: string - width: number - content: { - type: string - component: string - componentName: string - title: string - }[] - }[] -} - -export interface UIConfigType { - mapHome: string - resultCount: number - showLogo: boolean - relevancePrecision: number - attributeDescriptions: Record - basicSearchTemporalSelectionDefault: string[] - branding: string - basicSearchMatchType: string - onlineGazetteer: boolean - imageryProviders: ImageryProvider[] - requiredExportAttributes: string[] - exportMetacardFormatOptions: string[] - exportMetacardsFormatOptions: string[] - isCacheDisabled: boolean - isCustomTextNotationEnabled: boolean - isVersioningEnabled: boolean - isSpellcheckEnabled: boolean - attributeSuggestionList: any[] - summaryShow: string[] - readOnly: string[] - version: string - commonAttributes: string[] - i18n: Record - customTextNotationAttribute: string - isExperimental: boolean - sourcePollInterval: number - requiredAttributes: any[] - scheduleFrequencyList: number[] - defaultSources: any[] - terrainProvider: { - type: string - url: string - } - topLeftLogoSrc: string - hiddenAttributes: string[] - timeout: number - attributeAliases: Record - iconConfig: IconConfig - enums: Record - extra: { - [key: string]: any - datatypes?: DataTypesConfiguration - resourceSizeIdentifiers?: string[] - } - editorAttributes: string[] - resultShow: string[] - disableUnknownErrorBox: boolean - isFuzzyResultsEnabled: boolean - theme: string - projection: string - defaultLayout: VisualizationType[] - webSocketsEnabled: boolean - showRelevanceScores: boolean - menuIconSrc: string - product: string - typeNameMapping: Record - visualizations: VisualizationType[] - landingPageBackgroundSrc: string - bottomLeftBackgroundSrc: string - gazetteer: boolean - isPhoneticsEnabled: boolean - helpUrl: string - customBranding: string - defaultTableColumns: string[] - exportResultLimit: number - bingKey: string - bottomLeftLogoSrc: string - useHyphensInUuid: boolean - disableLocalCatalog: boolean -} - -export type localSourceIdType = string - -export type platformConfigType = { - productImage: string - color?: string - footer?: string - background?: string - vendorImage: string - favIcon: string - header?: string - title: string - version: string - timeout: number - systemUsageMessage?: string - systemUsageOncePerSession?: boolean - systemUsageTitle?: string -} - -type SourceType = { - sourceActions: any[] - available: boolean - id: string - contentTypes: Array<{ name: string; version: string }> - version: string - local?: boolean - harvested?: boolean -} - -type SourcesType = Array - -interface PreferencesType { - id: string - resultDisplay: string - resultPreview: string[] - 'inspector-hideEmpty': boolean - 'inspector-summaryShown': any[] - 'inspector-summaryOrder': any[] - 'inspector-detailsOrder': string[] - 'inspector-detailsHidden': any[] - 'results-attributesShownTable': any[] - 'results-attributesShownList': any[] - homeFilter: string - homeSort: string - homeDisplay: string - decimalPrecision: number - alertPersistence: boolean - alertExpiration: number - visualization: string - columnHide: any[] - columnOrder: string[] - columnWidths: any[] - hasSelectedColumns: boolean - oauth: any[] - fontSize: number - dateTimeFormat: { - datetimefmt: string - timefmt: string - } - timeZone: string - coordinateFormat: string - autoPan: boolean - goldenLayout: { - settings: { - hasHeaders: boolean - constrainDragToContainer: boolean - reorderEnabled: boolean - selectionEnabled: boolean - popoutWholeStack: boolean - blockedPopoutsThrowError: boolean - closePopoutsOnUnload: boolean - showPopoutIcon: boolean - showMaximiseIcon: boolean - showCloseIcon: boolean - responsiveMode: string - } - dimensions: { - borderWidth: number - minItemHeight: number - minItemWidth: number - headerHeight: number - dragProxyWidth: number - dragProxyHeight: number - } - labels: { - close: string - maximise: string - minimise: string - popout: string - popin: string - tabDropdown: string - } - content: any[] - isClosable: boolean - reorderEnabled: boolean - title: string - openPopouts: any[] - } - animation: boolean - hoverPreview: boolean - layoutId: string - mapLayers: { - type: string - url: string - parameters: { - format?: string - transparent?: boolean - imageSize?: number[] - } - alpha: number - name: string - show: boolean - proxyEnabled: boolean - order: number - label: string - id: string - }[] - alerts: any[] - uploads: { - unseen: boolean - percentage: number - errors: number - successes: number - complete: number - amount: number - issues: number - sending: boolean - finished: boolean - interrupted: boolean - sentAt: number - id: string - uploads: { - file: { - upload: { - progress: number - total: number - bytesSent: number - } - status: string - accepted: boolean - processing: boolean - xhr: object - } - id: string - percentage: number - sending: boolean - success: boolean - error: boolean - message: string - validating: boolean - issues: boolean - }[] - }[] - theme: { - palette: string - theme: string - } - querySettings: { - type: string - sources: string[] - sorts: { - attribute: string - direction: string - }[] - spellcheck: boolean - phonetics: boolean - additionalOptions?: string - } -} - -export type UserType = { - email: string - isGuest: boolean - preferences: PreferencesType - roles: Array - userid: string - username: string -} - -export type StartupPayloadType = { - attributeMap: AttributeMapType - config: UIConfigType - localSourceId: localSourceIdType - metacardTypes: MetacardDefinitionsType - platformUiConfiguration: platformConfigType - sortedAttributes: SortedAttributesType - sources: SourcesType - user: UserType - harvestedSources: string[] -} - -export type DatatypeQueryMap = { - datatype: string - attributes: { - name: string - values: string[] - }[] -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/TypedQuery.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/TypedQuery.tsx deleted file mode 100644 index ef4d4266c78..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/TypedQuery.tsx +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React, { Dispatch, SetStateAction } from 'react' -import { FilterBuilderClass } from '../../component/filter-builder/filter.structure' -import { useListenTo } from '../../component/selection-checkbox/useBackbone.hook' -import { TypedUserInstance } from '../../component/singletons/TypedUser' -import cql from '../cql' -import { QueryAttributesType, SortType } from './Query.shared-types' -import UntypedQuery, { QueryType } from './Query' - -/** - * Mainly used by lazy query results, since it gets passed a function that adds in the query ref for it - */ -export type TransformSortsComposedFunctionType = ({ - originalSorts, -}: { - originalSorts: SortType[] -}) => SortType[] - -export type TransformSortsFunctionType = ({ - originalSorts, - queryRef, -}: { - originalSorts: SortType[] - queryRef: Backbone.Model -}) => SortType[] - -export type QueryOptions = { - /** - * Pass a function that returns the defaults to use - */ - transformDefaults?: ({ - originalDefaults, - queryRef, - }: { - originalDefaults: QueryAttributesType - queryRef: Backbone.Model - }) => QueryAttributesType - /** - * Pass a function that returns the cql given a filter tree, allowing such things as mixing in ephemeral filters - */ - transformFilterTree?: ({ - originalFilterTree, - queryRef, - }: { - originalFilterTree: FilterBuilderClass - queryRef: Backbone.Model - }) => string - /** - * Pass a function that returns the sorts to use, allowing such things as substituting ephemeral sorts - */ - transformSorts?: TransformSortsFunctionType - transformCount?: ({ - originalCount, - queryRef, - }: { - originalCount: number - queryRef: Backbone.Model - }) => number - limitToDeleted?: boolean - limitToHistoric?: boolean - additionalOptions?: any -} - -export const DEFAULT_QUERY_OPTIONS: Readonly> = { - transformDefaults: ({ originalDefaults }) => { - return originalDefaults - }, - transformFilterTree: ({ originalFilterTree }) => { - return cql.write(originalFilterTree) - }, - transformCount: ({ originalCount }) => { - return originalCount - }, - transformSorts: ({ originalSorts }) => { - return originalSorts - }, - limitToHistoric: false, - limitToDeleted: false, - additionalOptions: undefined, -} - -export const Query = ( - attributes?: QueryAttributesType, - options?: QueryOptions -) => { - const mergedOptions: Required = { - ...DEFAULT_QUERY_OPTIONS, - ...options, - } - return new UntypedQuery(attributes, mergedOptions) -} - -function mixinEphemeralFilter( - originalCQL: FilterBuilderClass -): FilterBuilderClass { - const ephemeralFilter = TypedUserInstance.getEphemeralFilter() - try { - if (ephemeralFilter) { - return new FilterBuilderClass({ - filters: [ephemeralFilter, originalCQL], - type: 'AND', - }) - } else { - return originalCQL - } - } catch (err) { - console.error(err) - return originalCQL - } -} - -export const DEFAULT_USER_QUERY_OPTIONS: Readonly> = { - transformDefaults: ({ originalDefaults }) => { - return { - ...originalDefaults, - ...TypedUserInstance.getQuerySettingsJSON(), - count: TypedUserInstance.getResultCount(), - } - }, - transformFilterTree: ({ originalFilterTree }) => { - return cql.write(mixinEphemeralFilter(originalFilterTree)) - }, - transformSorts: ({ originalSorts }) => { - return TypedUserInstance.getEphemeralSorts() || originalSorts - }, - transformCount: ({ originalCount }) => { - return TypedUserInstance.getResultCount() || originalCount - }, - limitToDeleted: false, - limitToHistoric: false, - additionalOptions: undefined, -} - -/** - * This should be used in place of useUserQuery _only_ if you do not intend to listen to changes to user prefs. - */ -export const UserQuery = ( - attributes?: QueryAttributesType, - options?: QueryOptions -) => { - const mergedOptions: Required = { - ...DEFAULT_USER_QUERY_OPTIONS, - ...options, - } - return Query(attributes, mergedOptions) -} - -export const useQuery = ({ - attributes, - options, -}: { - attributes?: QueryAttributesType - options?: QueryOptions -} = {}): [QueryType, Dispatch>] => { - const [query, setQuery] = React.useState(Query(attributes, options)) - return [query, setQuery] -} - -export const useUserQuery = ({ - attributes, - options, -}: { - attributes?: QueryAttributesType - options?: QueryOptions -} = {}): [QueryType, Dispatch>] => { - const [query, setQuery] = React.useState(UserQuery(attributes, options)) - useListenTo(TypedUserInstance.getPreferences(), 'change:resultCount', () => { - query.set('count', TypedUserInstance.getResultCount()) - }) - useListenTo(TypedUserInstance.getPreferences(), 'change:resultFilter', () => { - query.startSearchFromFirstPage() - }) - useListenTo(TypedUserInstance.getPreferences(), 'change:resultSort', () => { - query.startSearchFromFirstPage() - }) - return [query, setQuery] -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Types.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Types.tsx deleted file mode 100644 index f81f8fec40f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Types.tsx +++ /dev/null @@ -1,49 +0,0 @@ -export type ResultType = { - actions: ActionType[] - distance: null - hasThumbnail: boolean - isResourceLocal: boolean - matches: {} - metacard: MetacardType - relevance: number - metacardType: string - id: string -} - -type MetacardType = { - cached: string - properties: MetacardPropertiesType - id: string -} - -export type MetacardPropertiesType = { - id: string - title: string - 'metacard.deleted.id'?: string - 'metacard.deleted.version'?: string - 'metacard.deleted.date'?: string - 'metacard.deleted.tags'?: string[] - 'metacard.owner': string - description: string - created: string - modified: string - 'security.access-individuals'?: string[] - 'security.access-individuals-read'?: string[] - 'security.access-groups'?: string[] - 'security.access-groups-read'?: string[] - sorts?: string[] | { attribute: string; direction: string }[] - [key: string]: any -} - -type ActionType = { - description: string - displayName: string - id: string - title: string - url: string -} - -export type MetacardAttribute = { - attribute: string - values: any -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Upload.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Upload.ts deleted file mode 100644 index 12f3b610ea5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/Upload.ts +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' -import $ from 'jquery' -import fetch from '../../react-component/utils/fetch' -import '../jquery.whenAll' -function fileMatches(file: any, model: any) { - return file === model.get('file') -} -function checkValidation(model: any) { - if (model.get('id')) { - model.set('validating', true) - //wait for solr - setTimeout(function (this: any) { - ;($ as any).whenAll - .apply(this, [ - fetch( - './internal/metacard/' + model.get('id') + '/attribute/validation' - ) - .then((response) => response.json()) - .then((response) => { - model.set({ - issues: model.get('issues') || response.length > 0, - }) - }), - fetch('./internal/metacard/' + model.get('id') + '/validation') - .then((response) => response.json()) - .then((response) => { - model.set({ - issues: model.get('issues') || response.length > 0, - }) - }), - ]) - .always(() => { - model.set({ - validating: false, - }) - }) - }, 2000) - } -} -export default Backbone.Model.extend({ - options: undefined, - defaults() { - return { - id: undefined, - children: undefined, - result: undefined, - file: undefined, - percentage: 0, - sending: false, - success: false, - error: false, - message: '', - validating: false, - issues: false, - } - }, - bindCallbacks() { - this.handleUploadProgress = this.handleUploadProgress.bind(this) - this.handleSending = this.handleSending.bind(this) - this.handleSuccess = this.handleSuccess.bind(this) - this.handleError = this.handleError.bind(this) - this.handleComplete = this.handleComplete.bind(this) - this.handleQueueComplete = this.handleQueueComplete.bind(this) - }, - // @ts-expect-error ts-migrate(6133) FIXME: 'attributes' is declared but its value is never re... Remove this comment to see the full error message - initialize(attributes: any, options: any) { - this.bindCallbacks() - this.options = options - this.setupDropzoneListeners() - }, - setupDropzoneListeners() { - if (this.options.dropzone) { - this.options.dropzone.on('sending', this.handleSending) - this.options.dropzone.on('uploadprogress', this.handleUploadProgress) - this.options.dropzone.on('error', this.handleError) - this.options.dropzone.on('success', this.handleSuccess) - this.options.dropzone.on('complete', this.handleComplete) - this.options.dropzone.on('queuecomplete', this.handleQueueComplete) - } - }, - handleSending(file: any) { - if (fileMatches(file, this)) { - this.set({ - sending: true, - }) - } - }, - handleUploadProgress(file: any, percentage: any) { - if (fileMatches(file, this)) { - this.set('percentage', percentage) - } - }, - handleError(file: any) { - if (fileMatches(file, this)) { - const message = file.name + ' could not be uploaded successfully.' - this.set({ - error: true, - message, - }) - } - }, - hasChildren() { - return this.get('children') && this.get('children').length > 1 - }, - handleQueueComplete() { - // https://github.com/enyo/dropzone/blob/v4.3.0/dist/dropzone.js#L56 - // if we remove callbacks too early this loop will fail, look to see if updating to latest fixes this - setTimeout(() => { - this.unlistenToDropzone() - }, 0) - }, - unlistenToDropzone() { - this.options.dropzone.off('sending', this.handleSending) - this.options.dropzone.off('queuecomplete', this.handleQueueComplete) - this.options.dropzone.off('uploadprogress', this.handleUploadProgress) - this.options.dropzone.off('success', this.handleSuccess) - this.options.dropzone.off('error', this.handleError) - this.options.dropzone.off('complete', this.handleComplete) - }, - handleSuccess(file: any) { - if (fileMatches(file, this)) { - let message = `${file.name} uploaded successfully.` - const addedIdsHeader = file.xhr.getResponseHeader('added-ids') - const children = addedIdsHeader ? addedIdsHeader.split(',') : undefined - if (children && children.length > 1) { - message += ` ${children.length} items found.` - } - this.set({ - id: file.xhr.getResponseHeader('id'), - children, - success: true, - message, - }) - checkValidation(this) - } - }, - handleComplete(file: any) { - if (fileMatches(file, this) && file.status === 'canceled') { - this.collection.remove(this) - } - }, - checkValidation() { - checkValidation(this) - }, - cancel() { - if (this.options.dropzone) { - this.options.dropzone.removeFile(this.get('file')) - if (this.collection) { - this.collection.remove(this) - } - } - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/UploadBatch.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/UploadBatch.ts deleted file mode 100644 index c095e982d4a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/UploadBatch.ts +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import UploadModel from './Upload' -import Backbone from 'backbone' -import wreqr from '../wreqr' -import _ from 'underscore' -import { v4 } from 'uuid' -const updatePreferences = _.throttle(() => { - ;(wreqr as any).vent.trigger('preferences:save') -}, 1000) -export default Backbone.AssociatedModel.extend({ - options: undefined, - defaults() { - return { - unseen: true, - uploads: [], - percentage: 0, - errors: 0, - successes: 0, - complete: 0, - amount: 0, - issues: 0, - sending: false, - finished: false, - interrupted: false, - sentAt: undefined, - } - }, - relations: [ - { - type: Backbone.Many, - key: 'uploads', - relatedModel: UploadModel, - }, - ], - bindCallbacks() { - this.handleAddFile = this.handleAddFile.bind(this) - this.handleTotalUploadProgress = this.handleTotalUploadProgress.bind(this) - this.handleSending = this.handleSending.bind(this) - this.handleQueueComplete = this.handleQueueComplete.bind(this) - this.handleSuccess = this.handleSuccess.bind(this) - this.handleError = this.handleError.bind(this) - this.handleComplete = this.handleComplete.bind(this) - }, - // @ts-expect-error ts-migrate(6133) FIXME: 'attributes' is declared but its value is never re... Remove this comment to see the full error message - initialize(attributes: any, options: any) { - this.bindCallbacks() - this.options = options - if (!this.id) { - this.set('id', v4()) - } - this.listenTo( - this.get('uploads'), - 'add remove reset update', - this.handleUploadUpdate - ) - this.listenTo( - this.get('uploads'), - 'change:issues', - this.handleIssuesUpdates - ) - this.listenToDropzone() - }, - listenToDropzone() { - if (this.options.dropzone) { - this.options.dropzone.on('addedfile', this.handleAddFile) - this.options.dropzone.on( - 'totaluploadprogress', - this.handleTotalUploadProgress - ) - this.options.dropzone.on('sending', this.handleSending) - this.options.dropzone.on('queuecomplete', this.handleQueueComplete) - this.options.dropzone.on('success', this.handleSuccess) - this.options.dropzone.on('error', this.handleError) - this.options.dropzone.on('complete', this.handleComplete) - } else { - this.set('interrupted', this.get('interrupted') || !this.get('finished')) - this.set('finished', true) - } - }, - handleAddFile(file: any) { - this.get('uploads').add( - { - file, - }, - { - dropzone: this.options.dropzone, - } - ) - }, - handleSuccess(file: any) { - if (file.status !== 'canceled') { - this.set('successes', this.get('successes') + 1) - } - }, - handleError(file: any) { - if (file.status !== 'canceled') { - this.set('errors', this.get('errors') + 1) - } - }, - handleComplete(file: any) { - if (file.status === 'success') { - this.set('complete', this.get('complete') + 1) - } - updatePreferences() - }, - handleSending() { - this.set({ - sending: true, - }) - }, - handleTotalUploadProgress() { - this.set({ - percentage: this.calculatePercentageDone(), - }) - }, - unlistenToDropzone() { - this.options.dropzone.off('addedfile', this.handleAddFile) - this.options.dropzone.off( - 'totaluploadprogress', - this.handleTotalUploadProgress - ) - this.options.dropzone.off('sending', this.handleSending) - this.options.dropzone.off('queuecomplete', this.handleQueueComplete) - this.options.dropzone.off('success', this.handleSuccess) - this.options.dropzone.off('error', this.handleError) - this.options.dropzone.off('complete', this.handleComplete) - }, - handleQueueComplete() { - // https://github.com/enyo/dropzone/blob/v4.3.0/dist/dropzone.js#L56 - // if we remove callbacks too early this loop will fail, look to see if updating to latest fixes this - setTimeout(() => { - this.unlistenToDropzone() - }, 0) - this.set({ - finished: true, - percentage: 100, - }) - updatePreferences() - }, - handleUploadUpdate() { - this.set({ - amount: this.get('uploads').length, - }) - }, - handleIssuesUpdates() { - this.set({ - issues: this.get('uploads').reduce((issues: any, upload: any) => { - issues += upload.get('issues') ? 1 : 0 - return issues - }, 0), - }) - }, - clear() { - this.cancel() - this.get('uploads').reset() - }, - cancel() { - if (this.options.dropzone) { - this.options.dropzone.removeAllFiles(true) - } - this.set('finished', true) - }, - start() { - if (this.options.dropzone) { - this.set({ - sending: true, - sentAt: Date.now(), //- Math.random() * 14 * 86400000 - }) - ;(wreqr as any).vent.trigger('uploads:add', this) - this.listenTo(this, 'change', updatePreferences) - this.options.dropzone.options.autoProcessQueue = true - this.options.dropzone.processQueue() - } - }, - getTimeComparator() { - return this.get('sentAt') - }, - calculatePercentageDone() { - const files = this.options.dropzone.files - if (files.length === 0) { - return 100 - } - const totalBytes = files.reduce((total: any, file: any) => { - total += file.upload.total - return total - }, 0) - const bytesSent = files.reduce((total: any, file: any) => { - total += file.upload.bytesSent - return total - }, 0) - let progress = 100 * (bytesSent / totalBytes) - if (progress >= 100 && !this.get('finished')) { - progress = 99 - } - return progress - }, -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/User.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/User.spec.ts deleted file mode 100644 index 40e18cca549..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/User.spec.ts +++ /dev/null @@ -1,190 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' -import user from '../../component/singletons/user-instance' -import { StartupDataStore } from './Startup/startup' -import _ from 'underscore' -import { userModifiableLayerProperties } from './User' - -const exampleProviders1 = [ - { - proxyEnabled: true, - withCredentials: false, - alpha: 1, - name: 'World Topo Map - 1', - show: true, - type: 'AGM', - parameters: { - transparent: true, - format: 'image/png', - }, - url: './proxy/catalog20', - order: 0, - }, - { - proxyEnabled: true, - withCredentials: false, - alpha: 1, - name: 'World Imagery - 3', - show: true, - type: 'AGM', - parameters: { - transparent: true, - format: 'image/png', - }, - url: './proxy/catalog21', - order: 1, - }, -] - -// same as one, but with user modifiable properties changed (order, alpha, show) -const exampleProviders2 = [ - { - proxyEnabled: true, - withCredentials: false, - alpha: 0.7, - name: 'World Imagery - 3', - show: false, - type: 'AGM', - parameters: { - transparent: true, - format: 'image/png', - }, - url: './proxy/catalog21', - order: 0, - }, - { - proxyEnabled: true, - withCredentials: false, - alpha: 0.7, - name: 'World Topo Map - 1', - show: true, - type: 'AGM', - parameters: { - transparent: true, - format: 'image/png', - }, - url: './proxy/catalog20', - order: 1, - }, -] - -// same as one, but with one layer removed -const exampleProviders3 = [ - { - proxyEnabled: true, - withCredentials: false, - alpha: 1, - name: 'World Topo Map - 1', - show: true, - type: 'AGM', - parameters: { - transparent: true, - format: 'image/png', - }, - url: './proxy/catalog20', - order: 0, - }, -] - -describe('user preferences and such are handled correctly', () => { - it('should overwrite user layers if none exist', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.imageryProviders = exampleProviders1 - } - const userLayers = user.get('user>preferences>mapLayers') - userLayers.reset([]) - - expect( - userLayers - .toJSON() - .map((layer: any) => _.omit(layer, userModifiableLayerProperties)) - ).to.deep.equal( - exampleProviders1.map((layer) => - _.omit(layer, userModifiableLayerProperties) - ) - ) - }) - - it('should leave user layers alone if the configuration has not updated', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.imageryProviders = exampleProviders1 - } - const userLayers = user.get('user>preferences>mapLayers') - userLayers.reset(exampleProviders2) - - expect( - userLayers - .toJSON() - .map((layer: any) => _.omit(layer, userModifiableLayerProperties)) - ).to.deep.equal( - exampleProviders2.map((layer) => - _.omit(layer, userModifiableLayerProperties) - ) - ) - }) - - it('should remove layers that have been removed', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.imageryProviders = exampleProviders3 - } - const userLayers = user.get('user>preferences>mapLayers') - userLayers.reset(exampleProviders1) - - expect( - userLayers - .toJSON() - .map((layer: any) => _.omit(layer, userModifiableLayerProperties)) - ).to.deep.equal( - exampleProviders3.map((layer) => - _.omit(layer, userModifiableLayerProperties) - ) - ) - }) - - it('should add layers that have been added', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.imageryProviders = exampleProviders1 - } - const userLayers = user.get('user>preferences>mapLayers') - userLayers.reset(exampleProviders3) - - expect( - userLayers - .toJSON() - .map((layer: any) => _.omit(layer, userModifiableLayerProperties)) - ).to.deep.equal( - exampleProviders1.map((layer) => - _.omit(layer, userModifiableLayerProperties) - ) - ) - }) - - it('should handle empty imagery providers', () => { - if (StartupDataStore.Configuration.config) { - StartupDataStore.Configuration.config.imageryProviders = [] - } - const userLayers = user.get('user>preferences>mapLayers') - userLayers.reset(exampleProviders3) - - expect( - userLayers - .toJSON() - .map((layer: any) => _.omit(layer, userModifiableLayerProperties)) - ).to.deep.equal( - [].map((layer) => _.omit(layer, userModifiableLayerProperties)) - ) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/User.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/User.ts deleted file mode 100644 index d6b869ebd12..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/model/User.ts +++ /dev/null @@ -1,521 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { - Restrictions, - Security, -} from '../../react-component/utils/security/security' -import fetch from '../../react-component/utils/fetch' -import _ from 'underscore' -import _get from 'lodash.get' -import _cloneDeep from 'lodash.clonedeep' -import _debounce from 'lodash.debounce' -import wreqr from '../wreqr' -import Backbone from 'backbone' -import Alert from './Alert' -import Common from '../Common' -import UploadBatch from './UploadBatch' -import moment from 'moment-timezone' -import QuerySettings from './QuerySettings' -import 'backbone-associations' -import { CommonAjaxSettings } from '../AjaxSettings' -import { v4 } from 'uuid' -import { StartupDataStore } from './Startup/startup' -const User = {} as any -const Theme = Backbone.Model.extend({ - defaults() { - return { - palette: 'default', - theme: 'dark', - } - }, -}) - -export const userModifiableLayerProperties = [ - 'id', - 'label', - 'alpha', - 'show', - 'order', -] -function areTheSameLayer(layer1: any, layer2: any) { - return _.isEqual( - _.omit(layer1, userModifiableLayerProperties), - _.omit(layer2, userModifiableLayerProperties) - ) -} -function isValidLayer(layer: any) { - const providers = StartupDataStore.Configuration.getImageryProviders() - return providers.some((provider: any) => areTheSameLayer(provider, layer)) -} - -// compare to imagery providers and remove any layers that are not in the providers, and add any providers that are not in the layers -function validateMapLayersAgainstProviders(layers: any) { - const providers = StartupDataStore.Configuration.getImageryProviders() - // find layers that have been removed from the providers and remove them - const layersToRemove = layers.filter((model: any) => { - return !isValidLayer(model.toJSON()) - }) - layers.remove(layersToRemove) - - // find providers that have not been added to the layers and add them - const layersToAdd = providers.filter((provider: any) => { - return !layers.some((model: any) => - areTheSameLayer(provider, model.toJSON()) - ) - }) - layers.add( - layersToAdd.map( - (provider: any) => new (User as any).MapLayer(provider, { parse: true }) - ) - ) -} - -;(User as any).MapLayer = Backbone.AssociatedModel.extend({ - defaults() { - return { - alpha: 0.5, - show: true, - id: v4(), - } - }, - blacklist: ['warning'], - toJSON() { - return _.omit(this.attributes, this.blacklist) - }, - shouldShowLayer() { - return this.get('show') && this.get('alpha') > 0 - }, - parse(resp: any) { - const layer = _.clone(resp) - layer.label = 'Type: ' + layer.type - if (layer.layer) { - layer.label += ' Layer: ' + layer.layer - } - if (layer.layers) { - layer.label += ' Layers: ' + layer.layers.join(', ') - } - return layer - }, -}) -;(User as any).MapLayers = Backbone.Collection.extend({ - model: (User as any).MapLayer, - defaults() { - return _.map( - _.values(StartupDataStore.Configuration.getImageryProviders()), - (layerConfig) => new (User as any).MapLayer(layerConfig, { parse: true }) - ) - }, - initialize(models: any) { - if (!models || models.length === 0) { - this.set(this.defaults()) - } - this.listenTo(this, 'add reset', () => { - validateMapLayersAgainstProviders(this) - }) - validateMapLayersAgainstProviders(this) - }, - comparator(model: any) { - return model.get('order') - }, - getMapLayerConfig(url: any) { - return this.findWhere({ url }) - }, - savePreferences() { - this.parents[0].savePreferences() - }, - validate() { - validateMapLayersAgainstProviders(this) - }, -}) -;(User as any).Preferences = Backbone.AssociatedModel.extend({ - url: './internal/user/preferences', - defaults() { - return { - id: 'preferences', - mapLayers: new (User as any).MapLayers(), - resultDisplay: 'List', - resultPreview: ['modified'], - resultFilter: undefined, - resultSort: undefined, - 'inspector-hideEmpty': false, - 'inspector-summaryShown': [], - 'inspector-summaryOrder': [], - 'inspector-detailsOrder': ['title', 'created', 'modified', 'thumbnail'], - 'inspector-detailsHidden': [], - 'results-attributesShownTable': [], - 'results-attributesShownList': [], - homeFilter: 'Owned by anyone', - homeSort: 'Last modified', - homeDisplay: 'Grid', - decimalPrecision: 2, - alerts: [], - alertPersistence: true, - alertExpiration: 2592000000, - visualization: '3dmap', - columnHide: [], - columnOrder: ['title', 'created', 'modified', 'thumbnail'], - columnWidths: [], - hasSelectedColumns: false, - uploads: [], - oauth: [], - fontSize: 16, - resultCount: StartupDataStore.Configuration.getResultCount(), - dateTimeFormat: Common.getDateTimeFormats()['ISO']['millisecond'], - timeZone: Common.getTimeZones()['UTC'], - coordinateFormat: 'degrees', - autoPan: true, - goldenLayout: undefined, - goldenLayoutUpload: undefined, - goldenLayoutMetacard: undefined, - goldenLayoutAlert: undefined, - theme: { - palette: 'custom', - theme: 'dark', - }, - animation: true, - hoverPreview: true, - querySettings: new QuerySettings(), - mapHome: undefined, - } - }, - relations: [ - { - type: Backbone.Many, - key: 'mapLayers', - relatedModel: (User as any).MapLayer, - collectionType: (User as any).MapLayers, - }, - { - type: Backbone.Many, - key: 'alerts', - relatedModel: Alert, - }, - { - type: Backbone.Many, - key: 'uploads', - relatedModel: UploadBatch, - }, - { - type: Backbone.One, - key: 'theme', - relatedModel: Theme, - }, - { - type: Backbone.One, - key: 'querySettings', - relatedModel: QuerySettings, - }, - ], - initialize() { - this.savePreferences = _debounce(this.savePreferences, 1200) - this.handleAlertPersistence() - this.handleResultCount() - this.listenTo((wreqr as any).vent, 'alerts:add', this.addAlert) - this.listenTo((wreqr as any).vent, 'uploads:add', this.addUpload) - this.listenTo((wreqr as any).vent, 'preferences:save', this.savePreferences) - this.listenTo(this.get('alerts'), 'remove', this.savePreferences) - this.listenTo(this.get('uploads'), 'remove', this.savePreferences) - this.listenTo(this, 'change:decimalPrecision', this.savePreferences) - this.listenTo(this, 'change:visualization', this.savePreferences) - this.listenTo(this, 'change:fontSize', this.savePreferences) - this.listenTo(this, 'change:goldenLayout', this.savePreferences) - this.listenTo(this, 'change:goldenLayoutUpload', this.savePreferences) - this.listenTo(this, 'change:goldenLayoutMetacard', this.savePreferences) - this.listenTo(this, 'change:goldenLayoutAlert', this.savePreferences) - this.listenTo(this, 'change:mapHome', this.savePreferences) - this.listenTo(this, 'change:theme', this.savePreferences) - }, - handleRemove() { - this.savePreferences() - }, - addUpload(upload: any) { - this.get('uploads').add(upload) - this.savePreferences() - }, - addAlert(alertDetails: any) { - this.get('alerts').add(alertDetails) - /* - * Add alert to notification core - * Alert will be retrieved and sent to the UI by UserApplication.java (getSubjectPreferences()) on refresh - */ - fetch('./internal/user/notifications', { - method: 'put', - body: JSON.stringify({ alerts: [alertDetails] }), - headers: { - 'Content-Type': 'application/json', - }, - }) - this.savePreferences() - }, - needsUpdate(upToDatePrefs: any) { - if (_.isEqual(_cloneDeep(upToDatePrefs), this.lastSaved)) { - return false - } - return true - }, - savePreferences() { - const currentPrefs = this.toJSON() - if (!this.needsUpdate(currentPrefs)) { - return - } - this.lastSaved = _cloneDeep(currentPrefs) - this.save(currentPrefs, { - ...CommonAjaxSettings, - drop: true, - withoutSet: true, - customErrorHandling: true, - error: () => { - ;(wreqr as any).vent.trigger('snack', { - message: - 'Issue Authorizing Request: You appear to have been logged out. Please sign in again.', - snackProps: { - alertProps: { - severity: 'error', - }, - }, - }) - }, - }) - }, - handleResultCount() { - this.set( - 'resultCount', - Math.min( - StartupDataStore.Configuration.getResultCount(), - this.get('resultCount') - ) - ) - }, - handleAlertPersistence() { - if (!this.get('alertPersistence')) { - this.get('alerts').reset() - this.get('uploads').reset() - } else { - const expiration = this.get('alertExpiration') - this.removeExpiredAlerts(expiration) - this.removeExpiredUploads(expiration) - } - }, - removeExpiredAlerts(expiration: any) { - const expiredAlerts = this.get('alerts').filter((alert: any) => { - const recievedAt = alert.getTimeComparator() - return Date.now() - recievedAt > expiration - }) - if (expiredAlerts.length === 0) { - return - } - this.get('alerts').remove(expiredAlerts) - fetch('./internal/user/notifications', { - method: 'delete', - body: JSON.stringify({ alerts: expiredAlerts.map(({ id }: any) => id) }), - headers: { - 'Content-Type': 'application/json', - }, - }) - }, - removeExpiredUploads(expiration: any) { - const expiredUploads = this.get('uploads').filter((upload: any) => { - const recievedAt = upload.getTimeComparator() - return Date.now() - recievedAt > expiration - }) - this.get('uploads').remove(expiredUploads) - }, - getSummaryShown() { - return this.get('inspector-summaryShown') - }, - getHoverPreview() { - return this.get('hoverPreview') - }, - getQuerySettings() { - return this.get('querySettings') - }, - getDecimalPrecision() { - return this.get('decimalPrecision') - }, - parse(data: any, options: any) { - if (options && options.drop) { - return {} - } - return data - }, -}) -;(User as any).Model = Backbone.AssociatedModel.extend({ - defaults() { - return { - id: 'user', - preferences: new (User as any).Preferences(), - isGuest: true, - username: 'guest', - userid: 'guest', - roles: ['guest'], - } - }, - relations: [ - { - type: Backbone.One, - key: 'preferences', - relatedModel: (User as any).Preferences, - }, - ], - getEmail() { - return this.get('email') - }, - getUserId() { - return this.get('userid') - }, - getUserName() { - return this.get('username') - }, - getSummaryShown() { - return this.get('preferences').getSummaryShown() - }, - getHoverPreview() { - return this.get('preferences').getHoverPreview() - }, - getPreferences() { - return this.get('preferences') - }, - savePreferences() { - this.get('preferences').savePreferences() - }, - getQuerySettings() { - return this.get('preferences').getQuerySettings() - }, -}) -;(User as any).Response = Backbone.AssociatedModel.extend({ - url: './internal/user', - relations: [ - { - type: Backbone.One, - key: 'user', - relatedModel: (User as any).Model, - }, - ], - defaults() { - return { - user: new (User as any).Model(), - } - }, - initialize() { - this.listenTo(this, 'sync', this.handleSync) - this.handleSync() - }, - handleSync() { - this.get('user').get('preferences').handleAlertPersistence() - this.get('user').get('preferences').handleResultCount() - }, - getGuestPreferences() { - try { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string | null' is not assignable... Remove this comment to see the full error message - return JSON.parse(window.localStorage.getItem('preferences')) || {} - } catch (e) { - return {} - } - }, - getEmail() { - return this.get('user').getEmail() - }, - getUserId() { - return this.get('user').getUserId() - }, - getRoles() { - return this.get('user').get('roles') - }, - getUserName() { - return this.get('user').getUserName() - }, - getPreferences() { - return this.get('user').getPreferences() - }, - savePreferences() { - this.get('user').savePreferences() - }, - getQuerySettings() { - return this.get('user').getQuerySettings() - }, - getSummaryShown() { - return this.get('user').getSummaryShown() - }, - getUserReadableDateTime(date: any) { - return moment - .tz(date, this.get('user').get('preferences').get('timeZone')) - .format( - this.get('user').get('preferences').get('dateTimeFormat')['datetimefmt'] - ) - }, - getAmPmDisplay() { - const timefmt = this.get('user').get('preferences').get('dateTimeFormat')[ - 'timefmt' - ] - return Common.getTimeFormatsReverseMap()[timefmt].format === '12' - }, - getDateTimeFormat() { - return this.get('user').get('preferences').get('dateTimeFormat')[ - 'datetimefmt' - ] - }, - getTimeZone() { - return this.get('user').get('preferences').get('timeZone') - }, - getHoverPreview() { - return this.get('user').getHoverPreview() - }, - parse(body: any) { - if (body.isGuest) { - return { - user: _.extend({ id: 'user' }, body, { - preferences: _.extend( - { id: 'preferences' }, - this.getGuestPreferences() - ), - }), - } - } else { - _.extend(body.preferences, { id: 'preferences' }) - return { - user: _.extend( - { - id: 'user', - }, - body - ), - } - } - }, - canRead(metacard: any) { - return new Security(Restrictions.from(metacard)).canRead(this) - }, - canWrite(thing: any) { - switch (thing.type) { - case 'metacard-properties': - return new Security(Restrictions.from(thing)).canWrite(this) - case 'query-result': - return this.canWrite(thing.get('metacard').get('properties')) - case 'query-result.collection': - default: - if (thing.some !== undefined) { - !thing.some((subthing: any) => { - return !this.canWrite(subthing) - }) - } else { - return new Security(Restrictions.from(thing)).canWrite(this) - } - } - }, - canShare(metacard: any) { - return new Security(Restrictions.from(metacard)).canShare(this) - }, -}) -export default User diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/requestAnimationFramePolyfill.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/requestAnimationFramePolyfill.ts deleted file mode 100644 index 38860730673..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/requestAnimationFramePolyfill.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ -// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating - -// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel - -// MIT license -// jshint ignore: start -// eslint-disable-next-line no-extra-semi -;(function () { - let lastTime = 0 - const vendors = ['ms', 'moz', 'webkit', 'o'] - for (let x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { - // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message - window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'] - window.cancelAnimationFrame = - // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message - window[vendors[x] + 'CancelAnimationFrame'] || - // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message - window[vendors[x] + 'CancelRequestAnimationFrame'] - } - - if (!window.requestAnimationFrame) - // @ts-expect-error ts-migrate(2322) FIXME: Type '(callback: any, element: any) => number' is ... Remove this comment to see the full error message - window.requestAnimationFrame = function (callback: any, element: any) { - const currTime = new Date().getTime() - const timeToCall = Math.max(0, 16 - (currTime - lastTime)) - const id = window.setTimeout(() => { - callback(currTime + timeToCall) - }, timeToCall) - lastTime = currTime + timeToCall - return id - } - - if (!window.cancelAnimationFrame) - window.cancelAnimationFrame = function (id) { - clearTimeout(id) - } -})() diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/wreqr.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/wreqr.ts deleted file mode 100644 index f6537b5089b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/js/wreqr.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Backbone from 'backbone' -import 'backbone.wreqr' -const wreqr = {} -;(wreqr as any).vent = new (Backbone as any).Wreqr.EventAggregator() -;(wreqr as any).commands = new (Backbone as any).Wreqr.Commands() -;(wreqr as any).reqres = new (Backbone as any).Wreqr.RequestResponse() -export default wreqr as { - vent: any - commands: any - reqres: any -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/DrawHelper.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/DrawHelper.ts deleted file mode 100644 index ecf4d9166cb..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/lib/cesium-drawhelper/DrawHelper.ts +++ /dev/null @@ -1,2004 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/** - * Created by thomas on 9/01/14. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * (c) www.geocento.com - * www.metaaps.com - * - */ -/* eslint-disable */ -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cesi... Remove this comment to see the full error message -import Cesium from 'cesium/Build/Cesium/Cesium' -import * as Turf from '@turf/turf' -import utility from '../../component/visualization/maps/cesium/utility' -import _ from 'lodash' -import dragHalfSvg from '!!raw-loader!./drag-half.svg' -import vertexSvg from '!!raw-loader!./vertex.svg' -import { contrastingColor } from '../../react-component/location/location-color-selector' -// Avoid conflict with the name _, which DrawHelper uses a lot -const lodash = _ -const DrawHelper = (function () { - // static variables - const ellipsoid = Cesium.Ellipsoid.WGS84 - // constructor - function _(this: any, cesiumWidget: any) { - this._scene = cesiumWidget.scene - this._tooltip = createTooltip(cesiumWidget.container) - this._surfaces = [] - this.initialiseHandlers() - this.enhancePrimitives() - } - _.prototype.initialiseHandlers = function () { - const scene = this._scene - // scene events - const handler = new Cesium.ScreenSpaceEventHandler(scene.canvas) - function callPrimitiveCallback(name: any, position: any) { - const pickedObject = scene.pick(position) - if ( - pickedObject && - pickedObject.primitive && - pickedObject.primitive[name] - ) { - pickedObject.primitive[name](position) - } - } - handler.setInputAction((movement: any) => { - callPrimitiveCallback('leftClick', movement.position) - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) - handler.setInputAction((movement: any) => { - callPrimitiveCallback('leftDoubleClick', movement.position) - }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK) - handler.setInputAction((movement: any) => { - callPrimitiveCallback('rightClick', movement.position) - }, Cesium.ScreenSpaceEventType.RIGHT_CLICK) - let mouseOutObject: any - handler.setInputAction((movement: any) => { - let pickedObject = scene.pick(movement.endPosition) - if ( - mouseOutObject && - (!pickedObject || mouseOutObject != pickedObject.primitive) - ) { - !(mouseOutObject.isDestroyed && mouseOutObject.isDestroyed()) && - mouseOutObject.mouseOut(movement.endPosition) - mouseOutObject = null - } - if (pickedObject && pickedObject.primitive) { - pickedObject = pickedObject.primitive - if (pickedObject.mouseOut) { - mouseOutObject = pickedObject - } - if (pickedObject.mouseMove) { - pickedObject.mouseMove(movement.endPosition) - } - } - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - handler.setInputAction((movement: any) => { - callPrimitiveCallback('leftUp', movement.position) - }, Cesium.ScreenSpaceEventType.LEFT_UP) - handler.setInputAction((movement: any) => { - callPrimitiveCallback('leftDown', movement.position) - }, Cesium.ScreenSpaceEventType.LEFT_DOWN) - } - _.prototype.setListener = function ( - primitive: any, - type: any, - callback: any - ) { - primitive[type] = callback - } - // register event handling for an editable shape - // shape should implement setEditMode and setHighlighted - _.prototype.registerEditableShape = function (surface: any) { - const _self = this - // handlers for interactions - // highlight polygon when mouse is entering - setListener(surface, 'mouseMove', (position: any) => { - surface.setHighlighted(true) - if (!surface._editMode) { - _self._tooltip.showAt(position, 'Click to edit this shape') - } - }) - // hide the highlighting when mouse is leaving the polygon - setListener(surface, 'mouseOut', () => { - surface.setHighlighted(false) - _self._tooltip.setVisible(false) - }) - setListener(surface, 'leftClick', () => { - surface.setEditMode(true) - }) - } - _.prototype.startDrawing = function (cleanUp: any) { - // check for cleanUp first - if (this.editCleanUp) { - this.editCleanUp() - } - this.editCleanUp = cleanUp - } - _.prototype.stopDrawing = function () { - // check for cleanUp first - if (this.editCleanUp) { - this.editCleanUp() - this.editCleanUp = null - } - } - // make sure only one shape is highlighted at a time - _.prototype.disableAllHighlights = function () { - this.setHighlighted(undefined) - } - _.prototype.setHighlighted = function (surface: any) { - if ( - this._highlightedSurface && - !this._highlightedSurface.isDestroyed() && - this._highlightedSurface != surface - ) { - this._highlightedSurface.setHighlighted(false) - } - this._highlightedSurface = surface - } - _.prototype.disableAllEditMode = function () { - this.setEdited(undefined) - } - _.prototype.setEdited = function (surface: any) { - if (this._editedSurface && !this._editedSurface.isDestroyed()) { - this._editedSurface.setEditMode(false) - } - this._editedSurface = surface - } - const material = Cesium.Material.fromType(Cesium.Material.ColorType) - material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 0.5) - const defaultShapeOptions = { - ellipsoid: Cesium.Ellipsoid.WGS84, - textureRotationAngle: 0.0, - height: 0.0, - asynchronous: true, - show: true, - debugShowBoundingVolume: false, - } - let defaultSurfaceOptions = copyOptions(defaultShapeOptions, { - appearance: new Cesium.EllipsoidSurfaceAppearance({ - aboveGround: false, - }), - material, - granularity: Math.PI / 180.0, - }) - let defaultPolygonOptions = copyOptions(defaultShapeOptions, {}) - let defaultExtentOptions = copyOptions(defaultShapeOptions, {}) - let defaultCircleOptions = copyOptions(defaultShapeOptions, {}) - let defaultEllipseOptions = copyOptions(defaultSurfaceOptions, { - rotation: 0, - }) - let defaultPolylineOptions = copyOptions(defaultShapeOptions, { - width: 5, - geodesic: true, - granularity: 10000, - appearance: new Cesium.PolylineMaterialAppearance({ - aboveGround: false, - }), - material, - }) - // Cesium.Polygon.prototype.setStrokeStyle = setStrokeStyle; - // - // Cesium.Polygon.prototype.drawOutline = drawOutline; - // - const ChangeablePrimitive = (function () { - function _() {} - _.prototype.initialiseOptions = function (options: any) { - fillOptions(this, options) - this._ellipsoid = undefined - this._granularity = undefined - this._height = undefined - this._textureRotationAngle = undefined - this._id = undefined - // set the flags to initiate a first drawing - this._createPrimitive = true - this._primitive = undefined - this._outlinePolygon = undefined - } - _.prototype.setAttribute = function (name: any, value: any) { - this[name] = value - this._createPrimitive = true - } - _.prototype.getAttribute = function (name: any) { - return this[name] - } - /** - * @private - */ - _.prototype.update = function ( - context: any, - frameState: any, - commandList: any - ) { - if (!Cesium.defined(this.ellipsoid)) { - throw new Cesium.DeveloperError('this.ellipsoid must be defined.') - } - if (!Cesium.defined(this.appearance)) { - throw new Cesium.DeveloperError('this.material must be defined.') - } - if (this.granularity < 0.0) { - throw new Cesium.DeveloperError( - 'this.granularity and scene2D/scene3D overrides must be greater than zero.' - ) - } - if (!this.show) { - return - } - if (!this._createPrimitive && !Cesium.defined(this._primitive)) { - // No positions/hierarchy to draw - return - } - if ( - this._createPrimitive || - this._ellipsoid !== this.ellipsoid || - this._granularity !== this.granularity || - this._height !== this.height || - this._textureRotationAngle !== this.textureRotationAngle || - this._id !== this.id - ) { - const geometry = this.getGeometry() - if (!geometry) { - return - } - this._createPrimitive = false - this._ellipsoid = this.ellipsoid - this._granularity = this.granularity - this._height = this.height - this._textureRotationAngle = this.textureRotationAngle - this._id = this.id - this._primitive = this._primitive && this._primitive.destroy() - this._primitive = new Cesium.Primitive({ - geometryInstances: new Cesium.GeometryInstance({ - geometry, - id: this.id, - pickPrimitive: this, - }), - appearance: this.appearance, - asynchronous: this.asynchronous, - }) - this._outlinePolygon = - this._outlinePolygon && this._outlinePolygon.destroy() - if (this.buffer && this.getOutlineGeometry) { - const outlineGeometry = this.getOutlineGeometry() - if (outlineGeometry) { - // create the highlighting frame - this._outlinePolygon = new Cesium.Primitive({ - geometryInstances: new Cesium.GeometryInstance({ - geometry: outlineGeometry, - attributes: { - color: Cesium.ColorGeometryInstanceAttribute.fromColor( - Cesium.Color.fromCssColorString(contrastingColor) - ), - }, - }), - appearance: new Cesium.PolylineMaterialAppearance({ - material: Cesium.Material.fromType('Color', { - color: Cesium.Color.fromCssColorString(contrastingColor), - }), - }), - }) - } - } - } - const primitive = this._primitive - primitive.appearance.material = this.material - primitive.debugShowBoundingVolume = this.debugShowBoundingVolume - primitive.update(context, frameState, commandList) - if (this._outlinePolygon) { - this._outlinePolygon.update(context, frameState, commandList) - } - } - _.prototype.isDestroyed = function () { - return false - } - _.prototype.destroy = function () { - this._primitive = this._primitive && this._primitive.destroy() - return Cesium.destroyObject(this) - } - _.prototype.setStrokeStyle = function (strokeColor: any, strokeWidth: any) { - if ( - !this.strokeColor || - !this.strokeColor.equals(strokeColor) || - this.strokeWidth != strokeWidth - ) { - this._createPrimitive = true - this.strokeColor = strokeColor - this.strokeWidth = strokeWidth - } - } - return _ - })() - _.ExtentPrimitive = (function () { - // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. - function _(this: any, this: any, options: any) { - if (!Cesium.defined(options.extent)) { - throw new Cesium.DeveloperError('Extent is required') - } - options = copyOptions(options, defaultSurfaceOptions) - this.initialiseOptions(options) - this.setExtent(options.extent) - } - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - _.prototype = new ChangeablePrimitive() - _.prototype.setExtent = function (extent: any) { - this.setAttribute('extent', extent) - } - _.prototype.getExtent = function () { - return this.getAttribute('extent') - } - _.prototype.getGeometry = function () { - if (!Cesium.defined(this.extent)) { - return - } - const positions = [ - Cesium.Cartesian3.fromRadians(this.extent.west, this.extent.south), - Cesium.Cartesian3.fromRadians(this.extent.west, this.extent.north), - Cesium.Cartesian3.fromRadians(this.extent.east, this.extent.north), - Cesium.Cartesian3.fromRadians(this.extent.east, this.extent.south), - Cesium.Cartesian3.fromRadians(this.extent.west, this.extent.south), - ] - // Display a PolygonGeometry instead of a RectangleGeometry because RectangleGeometries - // appear to always wrap the long way around the antimeridian. - return Cesium.PolygonGeometry.fromPositions({ - positions, - height: this.height, - stRotation: this.textureRotationAngle, - ellipsoid: this.ellipsoid, - granularity: this.granularity, - }) - } - _.prototype.getOutlineGeometry = function () { - return new Cesium.RectangleOutlineGeometry({ - rectangle: this.extent, - }) - } - return _ - })() - _.PolygonPrimitive = (function () { - // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. - function _(this: any, this: any, options: any) { - options = copyOptions(options, defaultSurfaceOptions) - this.initialiseOptions(options) - this.isPolygon = true - } - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - _.prototype = new ChangeablePrimitive() - _.prototype.setPositions = function (positions: any) { - this.setAttribute('positions', positions) - } - _.prototype.getPositions = function () { - return this.getAttribute('positions') - } - _.prototype.getGeometry = function () { - if (!Cesium.defined(this.positions) || this.positions.length < 3) { - return - } - return Cesium.PolygonGeometry.fromPositions({ - positions: this.positions, - height: this.height, - stRotation: this.textureRotationAngle, - ellipsoid: this.ellipsoid, - granularity: this.granularity, - }) - } - _.prototype.getOutlineGeometry = function () { - if ( - !Cesium.defined(this.positions) || - this.positions.length < 3 || - !this.buffer - ) { - return - } - const coordinates = this.positions.map((pos: Cesium.Cartesian3) => { - const cartographic = Cesium.Cartographic.fromCartesian(pos) - return [ - Cesium.Math.toDegrees(cartographic.longitude), - Cesium.Math.toDegrees(cartographic.latitude), - cartographic.altitude, - ] - }) - - const adjustedPolygon = Turf.polygon([coordinates]) - utility.adjustGeoCoords(adjustedPolygon) - - const bufferedPolygon = Turf.buffer( - adjustedPolygon, - Math.max(this.buffer, 1), - { - units: 'meters', - } - ) - if (!bufferedPolygon) { - return - } - // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments - utility.adjustGeoCoords(bufferedPolygon) - const outlinePositions = bufferedPolygon.geometry.coordinates[0].map( - (coord) => Cesium.Cartesian3.fromDegrees(coord[0], coord[1], coord[2]) - ) - return new Cesium.PolylineGeometry({ - positions: outlinePositions, - height: this.height, - width: this.width < 1 ? 1 : this.width, - ellipsoid: this.ellipsoid, - }) - } - return _ - })() - _.CirclePrimitive = (function () { - // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. - function _(this: any, this: any, options: any) { - if (!(Cesium.defined(options.center) && Cesium.defined(options.radius))) { - throw new Cesium.DeveloperError('Center and radius are required') - } - options = copyOptions(options, defaultSurfaceOptions) - this.initialiseOptions(options) - this.setRadius(options.radius) - } - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - _.prototype = new ChangeablePrimitive() - _.prototype.setCenter = function (center: any) { - this.setAttribute('center', center) - } - _.prototype.setRadius = function (radius: any) { - this.setAttribute('radius', Math.max(0.1, radius)) - } - _.prototype.getCenter = function () { - return this.getAttribute('center') - } - _.prototype.getRadius = function () { - return this.getAttribute('radius') - } - _.prototype.getGeometry = function () { - if (!(Cesium.defined(this.center) && Cesium.defined(this.radius))) { - return - } - return new Cesium.CircleGeometry({ - center: this.center, - radius: this.radius, - height: this.height, - stRotation: this.textureRotationAngle, - ellipsoid: this.ellipsoid, - granularity: this.granularity, - }) - } - _.prototype.getOutlineGeometry = function () { - return new Cesium.CircleOutlineGeometry({ - center: this.getCenter(), - radius: this.getRadius(), - }) - } - return _ - })() - _.EllipsePrimitive = (function () { - function _(this: any, options: any) { - if ( - !( - Cesium.defined(options.center) && - Cesium.defined(options.semiMajorAxis) && - Cesium.defined(options.semiMinorAxis) - ) - ) { - throw new Cesium.DeveloperError( - 'Center and semi major and semi minor axis are required' - ) - } - options = copyOptions(options, defaultEllipseOptions) - this.initialiseOptions(options) - } - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - _.prototype = new ChangeablePrimitive() - _.prototype.setCenter = function (center: any) { - this.setAttribute('center', center) - } - _.prototype.setSemiMajorAxis = function (semiMajorAxis: any) { - if (semiMajorAxis < this.getSemiMinorAxis()) return - this.setAttribute('semiMajorAxis', semiMajorAxis) - } - _.prototype.setSemiMinorAxis = function (semiMinorAxis: any) { - if (semiMinorAxis > this.getSemiMajorAxis()) return - this.setAttribute('semiMinorAxis', semiMinorAxis) - } - _.prototype.setRotation = function (rotation: any) { - return this.setAttribute('rotation', rotation) - } - _.prototype.getCenter = function () { - return this.getAttribute('center') - } - _.prototype.getSemiMajorAxis = function () { - return this.getAttribute('semiMajorAxis') - } - _.prototype.getSemiMinorAxis = function () { - return this.getAttribute('semiMinorAxis') - } - _.prototype.getRotation = function () { - return this.getAttribute('rotation') - } - _.prototype.getGeometry = function () { - if ( - !( - Cesium.defined(this.center) && - Cesium.defined(this.semiMajorAxis) && - Cesium.defined(this.semiMinorAxis) - ) - ) { - return - } - return new Cesium.EllipseGeometry({ - ellipsoid: this.ellipsoid, - center: this.center, - semiMajorAxis: this.semiMajorAxis, - semiMinorAxis: this.semiMinorAxis, - rotation: this.rotation, - height: this.height, - vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT, - stRotation: this.textureRotationAngle, - // @ts-expect-error ts-migrate(1117) FIXME: An object literal cannot have multiple properties ... Remove this comment to see the full error message - ellipsoid: this.ellipsoid, - granularity: this.granularity, - }) - } - _.prototype.getOutlineGeometry = function () { - return new Cesium.EllipseOutlineGeometry({ - center: this.getCenter(), - semiMajorAxis: this.getSemiMajorAxis(), - semiMinorAxis: this.getSemiMinorAxis(), - rotation: this.getRotation(), - }) - } - return _ - })() - _.PolylinePrimitive = (function () { - function _(this: any, options: any) { - options = copyOptions(options, defaultPolylineOptions) - this.initialiseOptions(options) - } - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - _.prototype = new ChangeablePrimitive() - _.prototype.setPositions = function (positions: any) { - this.setAttribute('positions', positions) - } - _.prototype.setWidth = function (width: any) { - this.setAttribute('width', width) - } - _.prototype.setGeodesic = function (geodesic: any) { - this.setAttribute('geodesic', geodesic) - } - _.prototype.getPositions = function () { - return this.getAttribute('positions') - } - _.prototype.getWidth = function () { - return this.getAttribute('width') - } - _.prototype.getGeodesic = function () { - return this.getAttribute('geodesic') - } - _.prototype.getGeometry = function () { - if (!Cesium.defined(this.positions) || this.positions.length < 2) { - return - } - return new Cesium.PolylineGeometry({ - positions: this.positions, - height: this.height, - width: this.width < 1 ? 1 : this.width, - vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT, - ellipsoid: this.ellipsoid, - }) - } - _.prototype.getOutlineGeometry = function () { - if ( - !Cesium.defined(this.positions) || - this.positions.length < 2 || - !this.buffer - ) { - return - } - const coordinates = this.positions.map((pos: Cesium.Cartesian3) => { - const cartographic = Cesium.Cartographic.fromCartesian(pos) - return [ - Cesium.Math.toDegrees(cartographic.longitude), - Cesium.Math.toDegrees(cartographic.latitude), - cartographic.altitude, - ] - }) - const turfLine = Turf.lineString(coordinates) - utility.adjustGeoCoords(turfLine) - const bufferedLine = Turf.buffer(turfLine, Math.max(this.buffer, 1), { - units: 'meters', - }) - if (!bufferedLine) { - return - } - // need to adjust the points again AFTER buffering, since buffering undoes the antimeridian adjustments - utility.adjustGeoCoords(bufferedLine) - const outlinePositions = bufferedLine.geometry.coordinates[0].map( - (coord) => Cesium.Cartesian3.fromDegrees(coord[0], coord[1], coord[2]) - ) - return new Cesium.PolylineGeometry({ - positions: outlinePositions, - height: this.height, - width: this.width < 1 ? 1 : this.width, - vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT, - ellipsoid: this.ellipsoid, - }) - } - return _ - })() - /* - Create our own Image objects and pass them, instead of URLS, to the - BillboardCollections. This ensures the shape editing controls will always - be displayed immediately after the user clicks the Draw button, and without - requiring any user interaction with the map. If we used unloaded images - (e.g., image URLs), as we did previously, then sometimes the shape editing - controls would not be displayed until the user interacted with the map, - like moving it or zooming in or out. This is because we have Cesium's - requestRenderMode enabled. Sometimes, the image was not loaded by the time - the render request for the drawing primitive was made, and another render - request (triggered, for example, by moving the map) had to be made for - it to be shown. - */ - const vertexImage = new Image() - vertexImage.src = `data:image/svg+xml;base64,${window.btoa(vertexSvg)}` - const dragHalfImage = new Image() - dragHalfImage.src = `data:image/svg+xml;base64,${window.btoa(dragHalfSvg)}` - const defaultBillboard = { - image: vertexImage, - shiftX: 0, - shiftY: 0, - } - const dragBillboard = { - image: vertexImage, - shiftX: 0, - shiftY: 0, - } - const dragHalfBillboard = { - image: dragHalfImage, - shiftX: 0, - shiftY: 0, - } - _.prototype.createBillboardGroup = function ( - points: any, - options: any, - callbacks: any - ) { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const markers = new _.BillboardGroup(this, options) - markers.addBillboards(points, callbacks) - return markers - } - _.BillboardGroup = function (drawHelper: any, options: any) { - ;(this as any)._drawHelper = drawHelper - ;(this as any)._scene = drawHelper._scene - ;(this as any)._options = copyOptions(options, defaultBillboard) - // create one common billboard collection for all billboards - const b = new Cesium.BillboardCollection() - ;(this as any)._scene.primitives.add(b) - ;(this as any)._billboards = b - // keep an ordered list of billboards - ;(this as any)._orderedBillboards = [] - } - _.BillboardGroup.prototype.createBillboard = function ( - position: any, - callbacks: any - ) { - const billboard = this._billboards.add({ - show: true, - position, - pixelOffset: new Cesium.Cartesian2( - this._options.shiftX, - this._options.shiftY - ), - eyeOffset: new Cesium.Cartesian3(0.0, 0.0, 0.0), - horizontalOrigin: Cesium.HorizontalOrigin.CENTER, - verticalOrigin: Cesium.VerticalOrigin.CENTER, - scale: 1.0, - image: this._options.image, - color: new Cesium.Color(1.0, 1.0, 1.0, 1.0), - }) - // if editable - if (callbacks) { - var _self = this - const screenSpaceCameraController = - this._scene.screenSpaceCameraController - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function enableRotation(enable: any) { - screenSpaceCameraController.enableRotate = enable - } - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function getIndex() { - // find index - for ( - var i = 0, I = _self._orderedBillboards.length; - i < I && _self._orderedBillboards[i] != billboard; - ++i - ); - return i - } - if (callbacks.dragHandlers) { - // eslint-disable-next-line no-redeclare - var _self = this - setListener(billboard, 'leftDown', (position: any) => { - // TODO - start the drag handlers here - // create handlers for mouseOut and leftUp for the billboard and a mouseMove - function onDrag(position: any) { - billboard.position = position - // find index - for ( - let i = 0, I = _self._orderedBillboards.length; - i < I && _self._orderedBillboards[i] != billboard; - ++i - ); - callbacks.dragHandlers.onDrag && - callbacks.dragHandlers.onDrag(getIndex(), position) - } - function onDragEnd(position: any) { - handler.destroy() - enableRotation(true) - callbacks.dragHandlers.onDragEnd && - callbacks.dragHandlers.onDragEnd(getIndex(), position) - } - var handler = new Cesium.ScreenSpaceEventHandler(_self._scene.canvas) - handler.setInputAction((movement: any) => { - const cartesian = _self._scene.camera.pickEllipsoid( - movement.endPosition, - ellipsoid - ) - if (cartesian) { - onDrag(cartesian) - } else { - onDragEnd(cartesian) - } - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - handler.setInputAction((movement: any) => { - onDragEnd( - _self._scene.camera.pickEllipsoid(movement.position, ellipsoid) - ) - }, Cesium.ScreenSpaceEventType.LEFT_UP) - enableRotation(false) - callbacks.dragHandlers.onDragStart && - callbacks.dragHandlers.onDragStart( - getIndex(), - _self._scene.camera.pickEllipsoid(position, ellipsoid) - ) - }) - } - if (callbacks.onRightClick) { - setListener(billboard, 'rightClick', () => { - callbacks.onRightClick(getIndex()) - }) - } - if (callbacks.onClick) { - setListener(billboard, 'leftClick', () => { - callbacks.onClick(getIndex()) - }) - } - if (callbacks.tooltip) { - setListener(billboard, 'mouseMove', (position: any) => { - _self._drawHelper._tooltip.showAt(position, callbacks.tooltip()) - }) - setListener(billboard, 'mouseOut', () => { - _self._drawHelper._tooltip.setVisible(false) - }) - } - } - return billboard - } - _.BillboardGroup.prototype.insertBillboard = function ( - index: any, - position: any, - callbacks: any - ) { - this._orderedBillboards.splice( - index, - 0, - this.createBillboard(position, callbacks) - ) - } - _.BillboardGroup.prototype.addBillboard = function ( - position: any, - callbacks: any - ) { - this._orderedBillboards.push(this.createBillboard(position, callbacks)) - } - _.BillboardGroup.prototype.addBillboards = function ( - positions: any, - callbacks: any - ) { - let index = 0 - for (; index < positions.length; index++) { - this.addBillboard(positions[index], callbacks) - } - } - _.BillboardGroup.prototype.updateBillboardsPositions = function ( - positions: any - ) { - let index = 0 - for (; index < positions.length; index++) { - this.getBillboard(index).position = positions[index] - } - } - _.BillboardGroup.prototype.countBillboards = function () { - return this._orderedBillboards.length - } - _.BillboardGroup.prototype.getBillboard = function (index: any) { - return this._orderedBillboards[index] - } - _.BillboardGroup.prototype.removeBillboard = function (index: any) { - this._billboards.remove(this.getBillboard(index)) - this._orderedBillboards.splice(index, 1) - } - _.BillboardGroup.prototype.remove = function () { - this._billboards = - this._billboards && - this._scene.primitives.remove(this._billboards) && - this._billboards.removeAll() && - this._billboards.destroy() - } - _.BillboardGroup.prototype.setOnTop = function () { - this._scene.primitives.raiseToTop(this._billboards) - } - _.prototype.startDrawingMarker = function (options: any) { - // eslint-disable-next-line no-redeclare - var options = copyOptions(options, defaultBillboard) - this.startDrawing(() => { - markers.remove() - mouseHandler.destroy() - tooltip.setVisible(false) - }) - const _self = this - const scene = this._scene - // @ts-expect-error ts-migrate(6133) FIXME: 'primitives' is declared but its value is never re... Remove this comment to see the full error message - const primitives = scene.primitives - const tooltip = this._tooltip - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const markers = new _.BillboardGroup(this, options) - const mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas) - // Now wait for start - mouseHandler.setInputAction((movement: any) => { - if (movement.position != null) { - const cartesian = scene.camera.pickEllipsoid( - movement.position, - ellipsoid - ) - if (cartesian) { - markers.addBillboard(cartesian) - _self.stopDrawing() - options.callback(cartesian) - } - } - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) - mouseHandler.setInputAction((movement: any) => { - const position = movement.endPosition - if (position != null) { - const cartesian = scene.camera.pickEllipsoid(position, ellipsoid) - if (cartesian) { - tooltip.showAt( - position, - '

    Click to add your marker. Position is:

    ' + - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - getDisplayLatLngString( - ellipsoid.cartesianToCartographic(cartesian) - ) - ) - } else { - tooltip.showAt( - position, - '

    Click on the globe to add your marker.

    ' - ) - } - } - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - } - _.prototype.startDrawingPolygon = function (options: any) { - // eslint-disable-next-line no-redeclare - var options = copyOptions(options, defaultSurfaceOptions) - this.startDrawingPolyshape(true, options) - } - _.prototype.startDrawingPolyline = function (options: any) { - // eslint-disable-next-line no-redeclare - var options = copyOptions(options, defaultPolylineOptions) - this.startDrawingPolyshape(false, options) - } - _.prototype.startDrawingPolyshape = function (isPolygon: any, options: any) { - this.startDrawing(() => { - primitives.remove(poly) - markers.remove() - mouseHandler.destroy() - tooltip.setVisible(false) - }) - const _self = this - const scene = this._scene - const primitives = scene.primitives - const tooltip = this._tooltip - const minPoints = isPolygon ? 3 : 2 - let poly: any - if (isPolygon) { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - poly = new DrawHelper.PolygonPrimitive(options) - } else { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - poly = new DrawHelper.PolylinePrimitive(options) - } - poly.asynchronous = false - primitives.add(poly) - const positions: any = [] - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const markers = new _.BillboardGroup(this, defaultBillboard) - const mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas) - // Now wait for start - mouseHandler.setInputAction((movement: any) => { - if (movement.position != null) { - const cartesian = scene.camera.pickEllipsoid( - movement.position, - ellipsoid - ) - if (cartesian) { - // first click - if (positions.length == 0) { - // If user clicks, they have started drawing, so disable editing - _self.disableAllEditMode() - positions.push(cartesian.clone()) - markers.addBillboard(positions[0]) - } - if (positions.length >= minPoints) { - poly.positions = positions - poly._createPrimitive = true - } - // add new point to polygon - // this one will move with the mouse - positions.push(cartesian) - // add marker at the new position - markers.addBillboard(cartesian) - } - } - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) - mouseHandler.setInputAction((movement: any) => { - const position = movement.endPosition - if (position != null) { - if (positions.length == 0) { - const feature = scene.pick(position) - const isBillboard = - feature?.primitive && feature.primitive instanceof Cesium.Billboard - // Show this tooltip only if the mouse isn't over a billboard. The billboards shown for - // editing have their own tooltips and we want to show those instead. - if (!isBillboard) { - tooltip.showAt(position, 'Click to add first point') - } - } else { - const cartesian = scene.camera.pickEllipsoid(position, ellipsoid) - if (cartesian) { - positions.pop() - // make sure it is slightly different - cartesian.y += 1 + Math.random() - positions.push(cartesian) - if (positions.length >= minPoints) { - poly.positions = positions - poly._createPrimitive = true - } - // update marker - markers.getBillboard(positions.length - 1).position = cartesian - // show tooltip - tooltip.showAt( - position, - `Click to add new point (${positions.length}) - ${ - positions.length >= minPoints - ? '
    Double click to finish drawing' - : '' - }` - ) - if (isPolygon && positions.length === 2) { - // Request a render so the first polygon point will be displayed before the user - // has clicked the second point. After the user has clicked to create a point, - // the length of positions will be (# of points) + 1, because the last point is - // wherever the mouse is. Renders will always happen on mouse movement when - // positions.length is greater than 2, due to _createPrimitive being enabled above. - scene.requestRender() - } - } - } - } - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - mouseHandler.setInputAction((movement: any) => { - const position = movement.position - if (position != null) { - if (positions.length < minPoints + 2) { - return - } else { - const cartesian = scene.camera.pickEllipsoid(position, ellipsoid) - if (cartesian) { - _self.stopDrawing() - if (typeof options.callback == 'function') { - //https://github.com/leforthomas/cesium-drawhelper/issues/13 - //need to remove last 2 positions since those are from finishing the drawing - options.callback(positions.slice(0, positions.length - 2)) - } - } - } - } - }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK) - } - function getExtentCorners(value: any) { - return ellipsoid.cartographicArrayToCartesianArray([ - Cesium.Rectangle.northwest(value), - Cesium.Rectangle.northeast(value), - Cesium.Rectangle.southeast(value), - Cesium.Rectangle.southwest(value), - ]) - } - _.prototype.startDrawingExtent = function (options: any) { - // eslint-disable-next-line no-redeclare - var options = copyOptions(options, defaultSurfaceOptions) - this.startDrawing(() => { - if (extent != null) { - primitives.remove(extent) - } - markers?.remove() - mouseHandler.destroy() - tooltip.setVisible(false) - }) - const _self = this - const scene = this._scene - const primitives = this._scene.primitives - const tooltip = this._tooltip - let firstPoint: any = null - let extent: any = null - let markers: any = null - const mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas) - function updateExtent(value: any) { - if (extent == null) { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - extent = new DrawHelper.ExtentPrimitive({ ...options, extent: value }) - extent.asynchronous = false - primitives.add(extent) - } - extent.extent = value - // update the markers - const corners = getExtentCorners(value) - // create if they do not yet exist - if (markers == null) { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - markers = new _.BillboardGroup(_self, defaultBillboard) - markers.addBillboards(corners) - } else { - markers.updateBillboardsPositions(corners) - } - } - // Now wait for start - mouseHandler.setInputAction((movement: any) => { - if (movement.position != null) { - const cartesian = scene.camera.pickEllipsoid( - movement.position, - ellipsoid - ) - if (cartesian) { - if (extent == null) { - // If user clicks, they have started drawing, so disable editing - _self.disableAllEditMode() - // create the rectangle - firstPoint = ellipsoid.cartesianToCartographic(cartesian) - const value = getExtent(firstPoint, firstPoint) - updateExtent(value) - } else { - _self.stopDrawing() - if (typeof options.callback == 'function') { - options.callback( - getExtent( - firstPoint, - ellipsoid.cartesianToCartographic(cartesian) - ) - ) - } - } - } - } - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) - mouseHandler.setInputAction((movement: any) => { - const position = movement.endPosition - if (position != null) { - if (extent == null) { - const feature = scene.pick(position) - const isBillboard = - feature?.primitive && feature.primitive instanceof Cesium.Billboard - // Show this tooltip only if the mouse isn't over a billboard. The billboards shown for - // editing have their own tooltips and we want to show those instead. - if (!isBillboard) { - tooltip.showAt(position, 'Click to start drawing rectangle') - } - } else { - const cartesian = scene.camera.pickEllipsoid(position, ellipsoid) - if (cartesian) { - extent._createPrimitive = true - const value = getExtent( - firstPoint, - ellipsoid.cartesianToCartographic(cartesian) - ) - updateExtent(value) - tooltip.showAt( - position, - 'Drag to change rectangle extent
    Click again to finish drawing' - ) - } - } - } - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - } - _.prototype.startDrawingCircle = function (options: any) { - // eslint-disable-next-line no-redeclare - var options = copyOptions(options, defaultSurfaceOptions) - this.startDrawing(function cleanUp() { - if (circle != null) { - primitives.remove(circle) - } - markers?.remove() - mouseHandler.destroy() - tooltip.setVisible(false) - }) - const _self = this - const scene = this._scene - const primitives = this._scene.primitives - const tooltip = this._tooltip - let circle: any = null - let markers: any = null - const mouseHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas) - // Now wait for start - mouseHandler.setInputAction((movement: any) => { - if (movement.position != null) { - const cartesian = scene.camera.pickEllipsoid( - movement.position, - ellipsoid - ) - if (cartesian) { - if (circle == null) { - // If user clicks, they have started drawing, so disable editing - _self.disableAllEditMode() - // create the circle - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - circle = new _.CirclePrimitive({ - center: cartesian, - radius: 0, - asynchronous: false, - material: options.material, - }) - primitives.add(circle) - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - markers = new _.BillboardGroup(_self, defaultBillboard) - markers.addBillboards([cartesian]) - } else { - if (typeof options.callback == 'function') { - options.callback(circle.getCenter(), circle.getRadius()) - } - _self.stopDrawing() - } - } - } - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) - mouseHandler.setInputAction((movement: any) => { - const position = movement.endPosition - if (position != null) { - if (circle == null) { - const feature = scene.pick(position) - const isBillboard = - feature?.primitive && feature.primitive instanceof Cesium.Billboard - // Show this tooltip only if the mouse isn't over a billboard. The billboards shown for - // editing have their own tooltips and we want to show those instead. - if (!isBillboard) { - tooltip.showAt(position, 'Click to start drawing the circle') - } - } else { - const cartesian = scene.camera.pickEllipsoid(position, ellipsoid) - if (cartesian) { - circle.setRadius( - Cesium.Cartesian3.distance(circle.getCenter(), cartesian) - ) - markers.updateBillboardsPositions(cartesian) - tooltip.showAt( - position, - 'Move mouse to change circle radius
    Click again to finish drawing' - ) - } - } - } - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - } - _.prototype.enhancePrimitives = function () { - const drawHelper = this - Cesium.Billboard.prototype.setEditable = function () { - if (this._editable) { - return - } - this._editable = true - const billboard = this - const _self = this - function enableRotation(enable: any) { - drawHelper._scene.screenSpaceCameraController.enableRotate = enable - } - setListener(billboard, 'leftDown', () => { - // TODO - start the drag handlers here - // create handlers for mouseOut and leftUp for the billboard and a mouseMove - function onDrag(position: any) { - billboard.position = position - _self.executeListeners({ name: 'drag', positions: position }) - } - function onDragEnd(position: any) { - handler.destroy() - enableRotation(true) - _self.executeListeners({ name: 'dragEnd', positions: position }) - } - var handler = new Cesium.ScreenSpaceEventHandler( - drawHelper._scene.canvas - ) - handler.setInputAction((movement: any) => { - const cartesian = drawHelper._scene.camera.pickEllipsoid( - movement.endPosition, - ellipsoid - ) - if (cartesian) { - onDrag(cartesian) - } else { - onDragEnd(cartesian) - } - }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) - handler.setInputAction((movement: any) => { - onDragEnd( - drawHelper._scene.camera.pickEllipsoid(movement.position, ellipsoid) - ) - }, Cesium.ScreenSpaceEventType.LEFT_UP) - enableRotation(false) - }) - enhanceWithListeners(billboard) - } - function setHighlighted(this: any, highlighted: any) { - // if no change - // if already highlighted, the outline polygon will be available - if (this._highlighted && this._highlighted == highlighted) { - return - } - // disable if already in edit mode - if (this._editMode === true) { - return - } - this._highlighted = highlighted - // highlight by creating an outline polygon matching the polygon points - if (highlighted) { - // make sure all other shapes are not highlighted - drawHelper.setHighlighted(this) - this._strokeColor = this.strokeColor - this.setStrokeStyle( - Cesium.Color.fromCssColorString('white'), - this.strokeWidth - ) - } else { - if (this._strokeColor) { - this.setStrokeStyle(this._strokeColor, this.strokeWidth) - } else { - this.setStrokeStyle(undefined, undefined) - } - } - } - function setEditMode(this: any, editMode: any) { - // if no change - if (this._editMode == editMode) { - return - } - // make sure all other shapes are not in edit mode before starting the editing of this shape - drawHelper.disableAllHighlights() - // display markers - if (editMode) { - drawHelper.setEdited(this) - const _self = this - // create the markers and handlers for the editing - if (this._markers == null) { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const markers = new _.BillboardGroup(drawHelper, dragBillboard) - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const editMarkers = new _.BillboardGroup( - drawHelper, - dragHalfBillboard - ) - // function for updating the edit markers around a certain point - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function updateHalfMarkers(index: any, positions: any) { - // update the half markers before and after the index - let editIndex = index - 1 < 0 ? positions.length - 1 : index - 1 - if (editIndex < editMarkers.countBillboards()) { - editMarkers.getBillboard(editIndex).position = - calculateHalfMarkerPosition(editIndex) - } - editIndex = index - if (editIndex < editMarkers.countBillboards()) { - editMarkers.getBillboard(editIndex).position = - calculateHalfMarkerPosition(editIndex) - } - } - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function onEdited() { - _self.executeListeners({ - name: 'onEdited', - positions: _self.positions, - }) - } - const handleMarkerChanges = { - dragHandlers: { - onDrag(index: any, position: any) { - _self.positions[index] = position - updateHalfMarkers(index, _self.positions) - _self._createPrimitive = true - }, - onDragEnd() { - _self._createPrimitive = true - onEdited() - }, - }, - onRightClick(index: any) { - // Need to count unique points because polygon-display adds the first point to the end. - const uniquePoints = lodash.uniqWith( - _self.positions, - Cesium.Cartesian3.equals - ).length - const minPointsForRemoval = _self.isPolygon ? 4 : 3 - if (uniquePoints < minPointsForRemoval) { - return - } - // remove the point and the corresponding markers - _self.positions.splice(index, 1) - _self._createPrimitive = true - markers.removeBillboard(index) - editMarkers.removeBillboard(index) - updateHalfMarkers(index, _self.positions) - onEdited() - drawHelper._scene.requestRender() - }, - tooltip() { - let msg = 'Drag to move' - // Need to count unique points because polygon-display adds the first point to the end. - const uniquePoints = lodash.uniqWith( - _self.positions, - Cesium.Cartesian3.equals - ).length - const minPointsForRemoval = _self.isPolygon ? 4 : 3 - if (uniquePoints >= minPointsForRemoval) { - msg += '
    Right click to remove' - } - return msg - }, - } - // add billboards and keep an ordered list of them for the polygon edges - markers.addBillboards(_self.positions, handleMarkerChanges) - this._markers = markers - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function calculateHalfMarkerPosition(index: any) { - const positions = _self.positions - return ellipsoid.cartographicToCartesian( - new Cesium.EllipsoidGeodesic( - ellipsoid.cartesianToCartographic(positions[index]), - ellipsoid.cartesianToCartographic( - positions[index < positions.length - 1 ? index + 1 : 0] - ) - ).interpolateUsingFraction(0.5) - ) - } - const halfPositions = [] - let index = 0 - let length = _self.positions.length + (this.isPolygon ? 0 : -1) - for (; index < length; index++) { - halfPositions.push(calculateHalfMarkerPosition(index)) - } - const handleEditMarkerChanges = { - dragHandlers: { - onDragStart(index: any, position: any) { - // add a new position to the polygon but not a new marker yet - ;(this as any).index = index + 1 - _self.positions.splice((this as any).index, 0, position) - _self._createPrimitive = true - }, - onDrag(_index: any, position: any) { - _self.positions[(this as any).index] = position - _self._createPrimitive = true - }, - onDragEnd(_index: any, position: any) { - // create new sets of makers for editing - markers.insertBillboard( - (this as any).index, - position, - handleMarkerChanges - ) - editMarkers.getBillboard((this as any).index - 1).position = - calculateHalfMarkerPosition((this as any).index - 1) - editMarkers.insertBillboard( - (this as any).index, - calculateHalfMarkerPosition((this as any).index), - handleEditMarkerChanges - ) - _self._createPrimitive = true - onEdited() - }, - }, - tooltip() { - return 'Drag to create a new point' - }, - } - editMarkers.addBillboards(halfPositions, handleEditMarkerChanges) - this._editMarkers = editMarkers - // set on top of the polygon - markers.setOnTop() - editMarkers.setOnTop() - } - this._editMode = true - } else { - if (this._markers != null) { - this._markers.remove() - this._editMarkers.remove() - this._markers = null - this._editMarkers = null - } - this._editMode = false - } - } - DrawHelper.PolylinePrimitive.prototype.setEditable = function () { - if (this.setEditMode) { - return - } - const polyline = this - polyline.isPolygon = false - polyline.asynchronous = false - polyline.setEditMode = setEditMode - const originalWidth = this.width - polyline.setHighlighted = function (highlighted: any) { - // disable if already in edit mode - if (this._editMode === true) { - return - } - if (highlighted) { - drawHelper.setHighlighted(this) - this.setWidth(originalWidth * 2) - } else { - this.setWidth(originalWidth) - } - } - polyline.getExtent = function () { - return Cesium.Extent.fromCartographicArray( - ellipsoid.cartesianArrayToCartographicArray(this.positions) - ) - } - enhanceWithListeners(polyline) - polyline.setEditMode(true) - } - DrawHelper.PolygonPrimitive.prototype.setEditable = function () { - if (this.setEditMode) { - return - } - const polygon = this - polygon.asynchronous = false - polygon.setEditMode = setEditMode - polygon.setHighlighted = setHighlighted - enhanceWithListeners(polygon) - polygon.setEditMode(true) - } - DrawHelper.ExtentPrimitive.prototype.setEditable = function () { - if (this.setEditMode) { - return - } - const extent = this - extent.asynchronous = false - extent.setEditMode = function (editMode: any) { - // if no change - if (this._editMode == editMode) { - return - } - drawHelper.disableAllHighlights() - // display markers - if (editMode) { - // make sure all other shapes are not in edit mode before starting the editing of this shape - drawHelper.setEdited(this) - // create the markers and handlers for the editing - if (this._markers == null) { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const markers = new _.BillboardGroup(drawHelper, dragBillboard) - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function onEdited() { - extent.executeListeners({ - name: 'onEdited', - extent: extent.extent, - }) - } - const handleMarkerChanges = { - dragHandlers: { - onDrag(index: any, position: any) { - const corner = markers.getBillboard((index + 2) % 4).position - extent.setExtent( - getExtent( - ellipsoid.cartesianToCartographic(corner), - ellipsoid.cartesianToCartographic(position) - ) - ) - markers.updateBillboardsPositions( - getExtentCorners(extent.extent) - ) - }, - onDragEnd() { - onEdited() - }, - }, - tooltip() { - return 'Drag to change the corners of this extent' - }, - } - markers.addBillboards( - getExtentCorners(extent.extent), - handleMarkerChanges - ) - this._markers = markers - markers.setOnTop() - } - this._editMode = true - } else { - if (this._markers != null) { - this._markers.remove() - this._markers = null - } - this._editMode = false - } - } - extent.setHighlighted = setHighlighted - enhanceWithListeners(extent) - extent.setEditMode(true) - } - _.EllipsePrimitive.prototype.setEditable = function () { - if (this.setEditMode) { - return - } - const ellipse = this - const scene = drawHelper._scene - ellipse.asynchronous = false - drawHelper.registerEditableShape(ellipse) - ellipse.setEditMode = function (editMode: any) { - // if no change - if (this._editMode == editMode) { - return - } - drawHelper.disableAllHighlights() - // display markers - if (editMode) { - // make sure all other shapes are not in edit mode before starting the editing of this shape - drawHelper.setEdited(this) - const _self = this - // create the markers and handlers for the editing - if (this._markers == null) { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const markers = new _.BillboardGroup(drawHelper, dragBillboard) - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function getMarkerPositions() { - return Cesium.Shapes.computeEllipseBoundary( - ellipsoid, - ellipse.getCenter(), - ellipse.getSemiMajorAxis(), - ellipse.getSemiMinorAxis(), - ellipse.getRotation() + Math.PI / 2, - Math.PI / 2.0 - ).splice(0, 4) - } - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function onEdited() { - ellipse.executeListeners({ - name: 'onEdited', - center: ellipse.getCenter(), - semiMajorAxis: ellipse.getSemiMajorAxis(), - semiMinorAxis: ellipse.getSemiMinorAxis(), - rotation: 0, - }) - } - const handleMarkerChanges = { - dragHandlers: { - onDrag(index: any, position: any) { - const distance = Cesium.Cartesian3.distance( - ellipse.getCenter(), - position - ) - if (index % 2 == 0) { - ellipse.setSemiMajorAxis(distance) - } else { - ellipse.setSemiMinorAxis(distance) - } - markers.updateBillboardsPositions(getMarkerPositions()) - }, - onDragEnd() { - onEdited() - }, - }, - tooltip() { - return 'Drag to change the excentricity and radius' - }, - } - markers.addBillboards(getMarkerPositions(), handleMarkerChanges) - this._markers = markers - // add a handler for clicking in the globe - this._globeClickhandler = new Cesium.ScreenSpaceEventHandler( - scene.canvas - ) - this._globeClickhandler.setInputAction((movement: any) => { - const pickedObject = scene.pick(movement.position) - if (!(pickedObject && pickedObject.primitive)) { - _self.setEditMode(false) - } - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) - // set on top of the polygon - markers.setOnTop() - } - this._editMode = true - } else { - if (this._markers != null) { - this._markers.remove() - this._markers = null - this._globeClickhandler.destroy() - } - this._editMode = false - } - } - ellipse.setHighlighted = setHighlighted - enhanceWithListeners(ellipse) - ellipse.setEditMode(false) - } - _.CirclePrimitive.prototype.getCircleCartesianCoordinates = function ( - granularity: any - ) { - const geometry = Cesium.CircleOutlineGeometry.createGeometry( - new Cesium.CircleOutlineGeometry({ - ellipsoid, - center: this.getCenter(), - radius: this.getRadius(), - granularity, - }) - ) - let count = 0, - value, - values = [] - for (; count < geometry.attributes.position.values.length; count += 3) { - value = geometry.attributes.position.values - values.push( - new Cesium.Cartesian3( - value[count], - value[count + 1], - value[count + 2] - ) - ) - } - return values - } - _.CirclePrimitive.prototype.setEditable = function () { - if (this.setEditMode) { - return - } - const circle = this - circle.asynchronous = false - circle.setEditMode = function (editMode: any) { - // if no change - if (this._editMode == editMode) { - return - } - drawHelper.disableAllHighlights() - // display markers - if (editMode) { - // make sure all other shapes are not in edit mode before starting the editing of this shape - drawHelper.setEdited(this) - const _self = this - // create the markers and handlers for the editing - if (this._markers == null) { - // @ts-expect-error ts-migrate(7009) FIXME: 'new' expression, whose target lacks a construct s... Remove this comment to see the full error message - const markers = new _.BillboardGroup(drawHelper, dragBillboard) - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function getMarkerPositions() { - return _self.getCircleCartesianCoordinates( - Cesium.Math.PI_OVER_TWO - ) - } - // @ts-expect-error ts-migrate(1252) FIXME: Function declarations are not allowed inside block... Remove this comment to see the full error message - function onEdited() { - circle.executeListeners({ - name: 'onEdited', - center: circle.getCenter(), - radius: circle.getRadius(), - }) - } - const handleMarkerChanges = { - dragHandlers: { - onDrag(_index: any, position: any) { - circle.setRadius( - Cesium.Cartesian3.distance(circle.getCenter(), position) - ) - markers.updateBillboardsPositions(getMarkerPositions()) - }, - onDragEnd() { - onEdited() - }, - }, - tooltip() { - return 'Drag to change the radius' - }, - } - markers.addBillboards(getMarkerPositions(), handleMarkerChanges) - this._markers = markers - markers.setOnTop() - } - this._editMode = true - } else { - if (this._markers != null) { - this._markers.remove() - this._markers = null - } - this._editMode = false - } - } - circle.setHighlighted = setHighlighted - enhanceWithListeners(circle) - circle.setEditMode(true) - } - } - _.DrawHelperWidget = (function () { - // constructor - // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. - function _(this: any, this: any, drawHelper: any, options: any) { - // container must be specified - if (!Cesium.defined(options.container)) { - throw new Cesium.DeveloperError('Container is required') - } - const drawOptions = { - markerIcon: './img/glyphicons_242_google_maps.png', - polylineIcon: './img/glyphicons_097_vector_path_line.png', - polygonIcon: './img/glyphicons_096_vector_path_polygon.png', - circleIcon: './img/glyphicons_095_vector_path_circle.png', - extentIcon: './img/glyphicons_094_vector_path_square.png', - clearIcon: './img/glyphicons_067_cleaning.png', - polylineDrawingOptions: defaultPolylineOptions, - polygonDrawingOptions: defaultPolygonOptions, - extentDrawingOptions: defaultExtentOptions, - circleDrawingOptions: defaultCircleOptions, - } - fillOptions(options, drawOptions) - const _self = this - const toolbar = document.createElement('DIV') - toolbar.className = 'toolbar' - options.container.appendChild(toolbar) - function addIcon(_id: any, url: any, title: any, callback: any) { - const div = document.createElement('DIV') - div.className = 'button' - div.title = title - toolbar.appendChild(div) - div.onclick = callback - const span = document.createElement('SPAN') - div.appendChild(span) - const image = document.createElement('IMG') - ;(image as any).src = url - span.appendChild(image) - return div - } - const scene = drawHelper._scene - addIcon( - 'marker', - options.markerIcon, - 'Click to start drawing a 2D marker', - () => { - drawHelper.startDrawingMarker({ - callback(position: any) { - _self.executeListeners({ - name: 'markerCreated', - position, - }) - }, - }) - } - ) - addIcon( - 'polyline', - options.polylineIcon, - 'Click to start drawing a 2D polyline', - () => { - drawHelper.startDrawingPolyline({ - callback(positions: any) { - _self.executeListeners({ - name: 'polylineCreated', - positions, - }) - }, - }) - } - ) - addIcon( - 'polygon', - options.polygonIcon, - 'Click to start drawing a 2D polygon', - () => { - drawHelper.startDrawingPolygon({ - callback(positions: any) { - _self.executeListeners({ - name: 'polygonCreated', - positions, - }) - }, - }) - } - ) - addIcon( - 'extent', - options.extentIcon, - 'Click to start drawing an Extent', - () => { - drawHelper.startDrawingExtent({ - callback(extent: any) { - _self.executeListeners({ name: 'extentCreated', extent }) - }, - }) - } - ) - addIcon( - 'circle', - options.circleIcon, - 'Click to start drawing a Circle', - () => { - drawHelper.startDrawingCircle({ - callback(center: any, radius: any) { - _self.executeListeners({ - name: 'circleCreated', - center, - radius, - }) - }, - }) - } - ) - // add a clear button at the end - // add a divider first - let div = document.createElement('DIV') - div.className = 'divider' - toolbar.appendChild(div) - addIcon('clear', options.clearIcon, 'Remove all primitives', () => { - scene.primitives.removeAll() - }) - enhanceWithListeners(this) - } - return _ - })() - _.prototype.addToolbar = function (container: any, options: any) { - options = copyOptions(options, { container }) - // @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 2. - return new _.DrawHelperWidget(this, options) - } - function getExtent(mn: any, mx: any) { - const e = new Cesium.Rectangle() - // Re-order so west < east and south < north - e.west = Math.min(mn.longitude, mx.longitude) - e.east = Math.max(mn.longitude, mx.longitude) - e.south = Math.min(mn.latitude, mx.latitude) - e.north = Math.max(mn.latitude, mx.latitude) - // Check for approx equal (shouldn't require abs due to re-order) - const epsilon = Cesium.Math.EPSILON7 - if (e.east - e.west < epsilon) { - e.east += epsilon * 2.0 - } - if (e.north - e.south < epsilon) { - e.north += epsilon * 2.0 - } - return e - } - function createTooltip(frameDiv: any) { - // @ts-expect-error ts-migrate(2300) FIXME: Duplicate identifier 'this'. - const tooltip = function (this: any, this: any, frameDiv: any) { - const div = document.createElement('DIV') - div.className = 'twipsy right pointer-events-none' - const arrow = document.createElement('DIV') - arrow.className = 'twipsy-arrow' - div.appendChild(arrow) - const title = document.createElement('DIV') - title.className = 'twipsy-inner' - div.appendChild(title) - this._div = div - this._title = title - // add to frame div and display coordinates - frameDiv.appendChild(div) - } - tooltip.prototype.setVisible = function (visible: any) { - this._div.style.display = visible ? 'block' : 'none' - } - tooltip.prototype.showAt = function (position: any, message: any) { - if (position && message) { - this.setVisible(true) - this._title.innerHTML = message - this._div.style.left = position.x + 15 + 'px' - this._div.style.top = position.y + 7 - this._div.clientHeight / 2 + 'px' - } - } - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - return new tooltip(frameDiv) - } - function getDisplayLatLngString(cartographic: any, precision: any) { - return ( - cartographic.longitude.toFixed(precision || 3) + - ', ' + - cartographic.latitude.toFixed(precision || 3) - ) - } - function clone(from: any, to: any) { - if (from == null || typeof from != 'object') return from - if (from.constructor != Object && from.constructor != Array) return from - if ( - from.constructor == Date || - from.constructor == RegExp || - from.constructor == Function || - from.constructor == String || - from.constructor == Number || - from.constructor == Boolean - ) - return new from.constructor(from) - to = to || new from.constructor() - for (const name in from) { - to[name] = - typeof to[name] == 'undefined' ? clone(from[name], null) : to[name] - } - return to - } - function fillOptions(options: any, defaultOptions: any) { - options = options || {} - let option - for (option in defaultOptions) { - if (options[option] === undefined) { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - options[option] = clone(defaultOptions[option]) - } - } - } - // shallow copy - function copyOptions(options: any, defaultOptions: any) { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - let newOptions = clone(options), - option - for (option in defaultOptions) { - if (newOptions[option] === undefined) { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1. - newOptions[option] = clone(defaultOptions[option]) - } - } - return newOptions - } - function setListener(primitive: any, type: any, callback: any) { - primitive[type] = callback - } - function enhanceWithListeners(element: any) { - element._listeners = {} - element.addListener = function (name: any, callback: any) { - this._listeners[name] = this._listeners[name] || [] - this._listeners[name].push(callback) - return this._listeners[name].length - } - element.executeListeners = function (event: any, defaultCallback: any) { - if ( - this._listeners[event.name] && - this._listeners[event.name].length > 0 - ) { - let index = 0 - for (; index < this._listeners[event.name].length; index++) { - this._listeners[event.name][index](event) - } - } else { - if (defaultCallback) { - defaultCallback(event) - } - } - } - } - return _ -})() -export default DrawHelper diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/container.tsx deleted file mode 100644 index 74d66ca0e24..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/container.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import About from './presentation' -import moment from 'moment' -import { Environment } from '../../js/Environment' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' - -const AboutContainer = () => { - const { config } = useConfiguration() - return ( - - ) -} - -export default AboutContainer diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/presentation.tsx deleted file mode 100644 index 362b5d61057..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/about/presentation.tsx +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { CustomElement } from '../styles/mixins' -import { hot } from 'react-hot-loader' -import Divider from '@mui/material/Divider' - -interface Props { - branding: string - product: string - version: string - commitHash: string - commitDate: string - isDirty: boolean - date: string -} - -const Root = styled.div` - ${CustomElement} overflow: auto; - padding: ${(props) => props.theme.minimumSpacing} 0px; - - .about-content { - margin: auto; - max-width: ${(props) => { - return props.theme.screenBelow(props.theme.mediumScreenSize) - ? '100%' - : '1200px' - }}; - padding: 0px - ${(props) => - props.theme.screenBelow(props.theme.mediumScreenSize) - ? '20px' - : '100px'}; - } - - .content-version, - .version-message { - padding: ${(props) => props.theme.minimumSpacing}; - } -` - -export default hot(module)((props: Props) => { - return ( - -
    -
    - - {props.branding} - - {props.product} -
    - -
    -
    -
    Version
    -
    - {props.version} -
    -
    - -
    -
    Unique Identifier
    -
    - {`${props.commitHash} ${props.isDirty ? 'with Changes' : ''}`} -
    -
    - -
    -
    Release Date
    -
    - {props.date} -
    -
    -
    -
    -
    - ) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/container.tsx deleted file mode 100644 index d126f15099a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/container.tsx +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import user from '../../component/singletons/user-instance' -import AlertSettingsComponent from './presentation' -import withListenTo, { WithBackboneProps } from '../backbone-container' -import { hot } from 'react-hot-loader' - -type Props = {} & WithBackboneProps -type State = { - persistence: boolean - expiration: number -} - -type Value = { - [key: string]: unknown -} - -const save = (value: Value) => { - const preferences = user.get('user').get('preferences') - preferences.set(value) - preferences.savePreferences() -} - -const onExpirationChange = (value: number) => { - save({ - alertExpiration: value, - }) -} - -const onPersistenceChange = (value: boolean) => { - save({ - alertPersistence: value, - }) -} - -const mapBackboneToState = () => { - return { - persistence: user.get('user').get('preferences').get('alertPersistence'), - expiration: user.get('user').get('preferences').get('alertExpiration'), - } -} - -class AlertSettings extends React.Component { - constructor(props: Props) { - super(props) - this.state = mapBackboneToState() - this.props.listenTo( - user.get('user').get('preferences'), - 'change', - this.updateState - ) - } - updateState = () => { - this.setState(mapBackboneToState()) - } - render() { - const { persistence, expiration } = this.state - return ( - - ) - } -} - -export default hot(module)(withListenTo(AlertSettings)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/presentation.tsx deleted file mode 100644 index 9b67cb689b8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/alert-settings/presentation.tsx +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' - -type Props = { - persistence: boolean - expiration: number - onExpirationChange: (v: number) => any - onPersistenceChange: (v: boolean) => any -} -const millisecondsInDay = 24 * 60 * 60 * 1000 -const expireOptions = [ - { - label: '1 Day', - value: millisecondsInDay, - }, - { - label: '2 Days', - value: 2 * millisecondsInDay, - }, - { - label: '4 Days', - value: 4 * millisecondsInDay, - }, - { - label: '1 Week', - value: 7 * millisecondsInDay, - }, - { - label: '2 Weeks', - value: 14 * millisecondsInDay, - }, - { - label: '1 Month', - value: 30 * millisecondsInDay, - }, - { - label: '2 Months', - value: 60 * millisecondsInDay, - }, - { - label: '4 Months', - value: 120 * millisecondsInDay, - }, - { - label: '6 Months', - value: 180 * millisecondsInDay, - }, - { - label: '1 Year', - value: 365 * millisecondsInDay, - }, -] as { label: string; value: number }[] - -const keepNotificationsOptions = [ - { - label: 'Yes', - value: true, - }, - { - label: 'No', - value: false, - }, -] as { label: string; value: boolean }[] - -const render = (props: Props) => { - const { persistence, expiration, onExpirationChange, onPersistenceChange } = - props - - return ( -
    -
    -
    - { - onPersistenceChange(newValue.value) - }} - isOptionEqualToValue={(option) => option.value === persistence} - getOptionLabel={(option) => { - return option.label - }} - disableClearable - value={keepNotificationsOptions.find( - (choice) => choice.value === persistence - )} - renderInput={(params) => ( - - )} - /> -
    -
    - {persistence ? ( - { - onExpirationChange(newValue.value) - }} - isOptionEqualToValue={(option) => option.value === expiration} - getOptionLabel={(option) => { - return option.label - }} - disableClearable - value={expireOptions.find( - (choice) => choice.value === expiration - )} - renderInput={(params) => ( - - )} - /> - ) : null} -
    -
    -
    - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/attribute-settings/attribute-settings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/attribute-settings/attribute-settings.tsx deleted file mode 100644 index 43104935e77..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/attribute-settings/attribute-settings.tsx +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import user from '../../component/singletons/user-instance' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' - -const Root = styled.div` - overflow: hidden; - padding: ${(props) => props.theme.minimumSpacing}; -` - -type PrecisionOption = { - label: string - value: number -} - -const Options = [ - { - label: 'Default', - value: undefined, - }, - { - label: 'One', - value: 1, - }, - { - label: 'Two', - value: 2, - }, - { - label: 'Three', - value: 3, - }, - { - label: 'Four', - value: 4, - }, - { - label: 'Five', - value: 5, - }, - { - label: 'Six', - value: 6, - }, - { - label: 'Seven', - value: 7, - }, - { - label: 'Eight', - value: 8, - }, - { - label: 'Nine', - value: 9, - }, - { - label: 'Ten', - value: 10, - }, -] as PrecisionOption[] - -const getDecimalPrecision = () => { - return user.get('user').get('preferences').get('decimalPrecision') as number -} - -const AttributeSettings = () => { - const initState = Options.find( - (option) => option.value === getDecimalPrecision() - ) - const [decimalPrecision, setDecimalPrecision] = React.useState(initState) - - return ( - - { - setDecimalPrecision(newPrecision) - user.getPreferences().set({ - decimalPrecision: newPrecision.value, - }) - }} - isOptionEqualToValue={(option, value) => { - return option.value === value.value - }} - options={Options} - getOptionLabel={(option) => option.label} - style={{ width: '100%', paddingTop: '2em' }} - renderInput={(params) => ( - - )} - value={decimalPrecision} - /> - - ) -} -export default hot(module)(AttributeSettings) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/attribute-settings/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/attribute-settings/index.tsx deleted file mode 100644 index f79b6253b42..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/attribute-settings/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './attribute-settings' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.tsx deleted file mode 100644 index 5288c8cd239..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/auto-complete/gazetteer-autocomplete.tsx +++ /dev/null @@ -1,162 +0,0 @@ -import React, { useCallback, useEffect, useState } from 'react' -import _debounce from 'lodash/debounce' -import { Suggestion } from '../location/gazetteer' -import Autocomplete from '@mui/material/Autocomplete' -import CircularProgress from '@mui/material/CircularProgress' -import TextField, { TextFieldProps } from '@mui/material/TextField' -import Button from '@mui/material/Button' -import Chip from '@mui/material/Chip' -import RoomIcon from '@mui/icons-material/Room' -import DeleteIcon from '@mui/icons-material/Clear' - -type Props = { - suggester: (input: string) => Promise - onChange: (suggestion?: Suggestion) => Promise - debounce?: number - minimumInputLength?: number - onError?: any - value: any - placeholder?: string - variant?: TextFieldProps['variant'] -} - -const GazetteerAutoComplete = ({ - suggester, - debounce = 350, - minimumInputLength = 3, - onError, - value, - ...props -}: Props) => { - const [selected, setSelected] = React.useState(value) - const [input, setInput] = useState(value) - const [loading, setLoading] = useState(false) - const [suggestions, setSuggestions] = useState([]) - const [error, setError] = useState(null) - - const fetchSuggestionsFunc = async (input: string) => { - if (!(input.length < minimumInputLength)) { - try { - const suggestions = await suggester(input) - setSuggestions(suggestions) - setLoading(false) - } catch (e) { - setLoading(false) - setError('Endpoint unavailable') - if (typeof onError === 'function') onError(e) - } - } else { - setLoading(false) - } - } - - const fetchSuggestions = useCallback( - _debounce(fetchSuggestionsFunc, debounce), - [] - ) - - useEffect(() => { - fetchSuggestions(input) - }, [input]) - - const onChange = (input: string) => { - setInput(input) - setLoading(true) - setSuggestions([]) - setError(null) - } - - const onValueSelect = ( - _event: React.ChangeEvent, - suggestion: Suggestion - ) => { - if (suggestion) { - props.onChange(suggestion) - } else { - setInput('') - } - } - - const placeholder = - input.length < minimumInputLength - ? `Please enter ${minimumInputLength} or more characters` - : undefined - - const getNoOptionsText = () => { - if (!input) { - return 'Start typing to see suggestions' - } else if (input.length < minimumInputLength) { - const charactersToType = minimumInputLength - input.length - const pluralCharacter = charactersToType === 1 ? '' : 's' - return `Type ${charactersToType} more character${pluralCharacter} to see suggestions` - } else { - return error || 'No results found' - } - } - React.useEffect(() => { - setSelected(Boolean(value)) - }, [value]) - - if (selected) { - return ( - } - label={ -
    -
    {value}
    - -
    - } - variant="outlined" - /> - ) - } - - return ( - suggestion.name} - options={suggestions} - loading={loading} - loadingText="Searching..." - size="small" - onChange={onValueSelect} - onBlur={() => setInput('')} - noOptionsText={getNoOptionsText()} - autoHighlight - renderInput={(params) => ( - onChange(e.target.value)} - InputProps={{ - ...params.InputProps, - endAdornment: ( - <> - {loading && } - {params.InputProps.endAdornment} - - ), - }} - /> - )} - /> - ) -} - -export default GazetteerAutoComplete diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/backbone-container/backbone-container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/backbone-container/backbone-container.tsx deleted file mode 100644 index 587ac3754da..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/backbone-container/backbone-container.tsx +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { Subtract } from '../../typescript' - -import Backbone from 'backbone' - -export type WithBackboneProps = { - listenTo: (object: any, events: string, callback: Function) => any - stopListening: ( - object?: any, - events?: string | undefined, - callback?: Function | undefined - ) => any - listenToOnce: (object: any, events: string, callback: Function) => any -} - -const withListenTo =

    ( - Component: React.ComponentType> -) => { - return class BackboneContainer extends React.Component< - Subtract, - {} - > { - backbone: any = new Backbone.Model({}) - componentWillUnmount() { - this.backbone.stopListening() - this.backbone.destroy() - } - render() { - return ( - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ listenTo: any; stopListening: any; listenT... Remove this comment to see the full error message - - ) - } - } -} - -export default withListenTo diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/backbone-container/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/backbone-container/index.tsx deleted file mode 100644 index 803e72e527d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/backbone-container/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default, WithBackboneProps } from './backbone-container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/button/split-button/zoomToHome.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/button/split-button/zoomToHome.tsx deleted file mode 100644 index 74888a43d29..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/button/split-button/zoomToHome.tsx +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import Button from '@mui/material/Button' -import { hot } from 'react-hot-loader' -import { useMenuState } from '../../../component/menu-state/menu-state' -import HomeIcon from '@mui/icons-material/Home' -import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown' -import Popover from '@mui/material/Popover' -import RoomIcon from '@mui/icons-material/Room' -import Paper from '@mui/material/Paper' -import { Elevations } from '../../../component/theme/theme' -type voidFunc = () => void - -type Props = { - goHome: voidFunc - saveHome: voidFunc -} - -const ZoomToHome = (props: Props) => { - const { saveHome, goHome } = props - const menuState = useMenuState() - return ( - <> -

    - -
    - -
    - - - - - - - ) -} - -export default hot(module)(ZoomToHome) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/card/card.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/card/card.tsx deleted file mode 100644 index a8e047948c0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/card/card.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import * as React from 'react' -import Card, { CardProps } from '@mui/material/Card' -import CardHeader, { CardHeaderProps } from '@mui/material/CardHeader' -import CardActions, { CardActionsProps } from '@mui/material/CardActions' -import CardContent, { CardContentProps } from '@mui/material/CardContent' -import CardActionArea, { - CardActionAreaProps, -} from '@mui/material/CardActionArea' -import Typography, { TypographyProps } from '@mui/material/Typography' -import styled from 'styled-components' -import CreateIcon from '@mui/icons-material/AddBox' - -export const ZeroWidthSpace = () => { - return <>{String.fromCharCode(8203)} -} - -export const WrappedHeader = ({ title, ...otherProps }: CardHeaderProps) => { - return ( - - {title} - - - } - {...otherProps} - /> - ) -} - -export const WrappedCard = styled( - React.forwardRef((props: CardProps, ref: React.Ref) => { - return - }) -)`` as React.ComponentType> - -export const WrappedCardActions = styled( - React.forwardRef((props: CardActionsProps, ref: React.Ref) => { - return - }) -)`` as React.ComponentType< - React.PropsWithChildren -> - -export const WrappedCardContent = styled( - React.forwardRef((props: CardContentProps, ref: React.Ref) => { - return - }) -)`` as React.ComponentType< - React.PropsWithChildren -> - -export const WrappedCardContentLabel = (props: TypographyProps) => { - return -} - -export const WrappedCardContentValue = ({ - children, - ...otherProps -}: TypographyProps) => { - return ( - - {children} - - - ) -} - -export const WrappedCardActionArea = styled( - React.forwardRef((props: CardActionAreaProps, ref: React.Ref) => { - return - }) -)`` - -type CreateCardProps = { - text: string - cardProps?: CardProps -} - -export const CreateCard = styled( - React.forwardRef((props: CreateCardProps, ref: React.Ref) => { - return ( - - - - -

    {props.text}

    -
    -
    -
    - ) - }) -)`` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/card/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/card/index.tsx deleted file mode 100644 index 307685932f5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/card/index.tsx +++ /dev/null @@ -1,10 +0,0 @@ -export { - WrappedCard as Card, - WrappedCardActions as CardActions, - WrappedCardContent as CardContent, - WrappedHeader as CardHeader, - WrappedCardActionArea as CardActionArea, - WrappedCardContentLabel as CardContentLabel, - WrappedCardContentValue as CardContentValue, - CreateCard, -} from './card' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/copy-coordinates/copy-coordinates.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/copy-coordinates/copy-coordinates.tsx deleted file mode 100644 index 0961ecc32ff..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/copy-coordinates/copy-coordinates.tsx +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import { useMenuState } from '../../component/menu-state/menu-state' -import Popover from '@mui/material/Popover' -import ExpandMoreIcon from '@mui/icons-material/ExpandMore' -import useSnack from '../../component/hooks/useSnack' -import { AddSnack } from '../../component/snack/snack.provider' - -type Props = { - coordinateValues: { - dms: string - lat: string - lon: string - mgrs: string - utmUps: string - } - closeParent: () => void -} - -const generateClipboardHandler = ({ - text, - closeParent, - addSnack, -}: { - text: string - closeParent: () => void - addSnack: AddSnack -}) => { - return async () => { - try { - await navigator.clipboard.writeText(text) - addSnack(`Copied to clipboard: ${text}`, { - alertProps: { - severity: 'success', - }, - }) - } catch (e) { - addSnack(`Unable to copy ${text} to clipboard.`, { - alertProps: { - severity: 'error', - }, - // Longer timeout to give the user a chance to copy the coordinates from the snack. - timeout: 10000, - }) - } finally { - closeParent() - } - } -} - -const render = (props: Props) => { - const { dms, lat, lon, mgrs, utmUps } = props.coordinateValues - const { closeParent } = props - const menuState = useMenuState() - const addSnack = useSnack() - return ( - <> - - -
    - - - {mgrs ? ( - - ) : null} - - -
    -
    - - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/copy-coordinates/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/copy-coordinates/index.tsx deleted file mode 100644 index 2b66bcdb0f7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/copy-coordinates/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './copy-coordinates' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/distance-info.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/distance-info.tsx deleted file mode 100644 index 04acb464a95..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/distance-info.tsx +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import withListenTo, { WithBackboneProps } from '../backbone-container' -import DistanceInfoPresentation from './presentation' -const LEFT_OFFSET = 390 -const TOP_OFFSET = 180 - -const mapPropsToState = (props: Props) => { - const { map } = props - const distance = map.get('currentDistance') - return { - showDistance: map.get('measurementState') === 'START' && distance, - currentDistance: distance, - left: map.get('distanceInfo')['left'] - LEFT_OFFSET + 'px', - top: map.get('distanceInfo')['top'] - TOP_OFFSET + 'px', - } -} - -type Props = { - map: Backbone.Model -} & WithBackboneProps - -type State = { - showDistance: Boolean - currentDistance: Number - left: String - top: String -} - -class DistanceInfo extends React.Component { - constructor(props: Props) { - super(props) - this.state = { ...mapPropsToState(props), showDistance: false } - } - - componentDidMount() { - this.listenToMap() - } - - componentWillUnmount() { - const { stopListening, map } = this.props - stopListening(map, 'change:currentDistance', this.handleDistanceChange) - stopListening( - map, - 'change:measurementState', - this.handleMeasurementStateChange - ) - } - - listenToMap = () => { - const { listenTo, map } = this.props - listenTo(map, 'change:currentDistance', this.handleDistanceChange) - listenTo(map, 'change:measurementState', this.handleMeasurementStateChange) - } - - handleDistanceChange = () => { - this.setState(mapPropsToState(this.props)) - } - - handleMeasurementStateChange = () => { - this.setState(mapPropsToState(this.props)) - } - - render() { - return this.state.showDistance ? ( - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ showDistance: Boolean; currentDistance: Nu... Remove this comment to see the full error message - - ) : null - } -} - -export default hot(module)(withListenTo(DistanceInfo)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/index.tsx deleted file mode 100644 index 9cd06450f26..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './distance-info' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/presentation.tsx deleted file mode 100644 index d3f0066b501..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/distance-info/presentation.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import DistanceUtils from '../../js/DistanceUtils' - -type Props = { - currentDistance: number - left: number - top: number -} - -const Root = styled.div` - font-family: 'Inconsolata', 'Lucida Console', monospace; - background: ${(props) => props.theme.backgroundModal}; - display: block; - width: auto; - height: auto; - font-size: ${(props) => props.theme.mediumFontSize}; - position: absolute; - text-align: left; - padding: ${(props) => props.theme.minimumSpacing}; - max-width: 50%; -` - -const DistanceInfoText = styled.div` - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -` - -/* - * Formats the current distance value to a string with the appropriate unit of measurement. - */ -const getDistanceText = (distance: number) => { - // use meters when distance is under 1000m and convert to kilometers when ≥1000m - const distanceText = - distance < 1000 - ? `${distance} m` - : `${DistanceUtils.getDistanceFromMeters(distance, 'kilometers').toFixed( - 2 - )} km` - - return distanceText -} - -const render = (props: Props) => { - const distance = props.currentDistance ? props.currentDistance : 0 - - return ( - - {getDistanceText(distance)} - - ) -} - -export default render diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.tsx deleted file mode 100644 index 91572bd86c0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/comparatorUtils.tsx +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { AttributeTypes } from '../../../js/model/Startup/startup.types' -import { getAttributeType } from '../filterHelper' -import React from 'react' - -type ComparatorType = { value: string; label: string } -// verified -export const dateComparators = [ - { - value: 'BEFORE', - label: 'BEFORE', - }, - { - value: 'AFTER', - label: 'AFTER', - }, - { - value: 'RELATIVE', - label: 'WITHIN THE LAST', - }, - { - value: 'DURING', - label: 'BETWEEN', - }, - { - value: 'IS NULL', - label: 'IS EMPTY', - }, - { - value: 'AROUND', - label: 'AROUND', - }, -] as ComparatorType[] -// verified -export const geometryComparators = [ - { - value: 'GEOMETRY', - label: 'INTERSECTS', - }, - { - value: 'IS NULL', - label: 'IS EMPTY', - }, -] as ComparatorType[] -// verified -export const stringComparators = [ - { - value: 'ILIKE', - label: 'CONTAINS', - }, - { - value: 'LIKE', - label: 'MATCHCASE', - }, - { - value: '=', - label: '=', - }, - { - value: 'FILTER FUNCTION proximity', - label: 'NEAR', - }, - { - value: 'BOOLEAN_TEXT_SEARCH', - label: 'BOOLEAN', - }, - { - value: 'IS NULL', - label: 'IS EMPTY', - }, -] as ComparatorType[] -// verified -export const numberComparators = [ - { - value: '>', - label: '>', - }, - { - value: '<', - label: '<', - }, - { - value: '=', - label: '=', - }, - { - value: '>=', - label: '>=', - }, - { - value: '<=', - label: '<=', - }, - { - value: 'BETWEEN', - label: 'RANGE', - }, - { - value: 'IS NULL', - label: 'IS EMPTY', - }, -] -// verified -export const booleanComparators = [ - { - value: '=', - label: '=', - }, - { - value: 'IS NULL', - label: 'IS EMPTY', - }, -] as ComparatorType[] - -export const TypeToComparators: { [key in AttributeTypes]: ComparatorType[] } = - { - STRING: stringComparators, - DATE: dateComparators, - LONG: numberComparators, - DOUBLE: numberComparators, - FLOAT: numberComparators, - INTEGER: numberComparators, - SHORT: numberComparators, - LOCATION: geometryComparators, - GEOMETRY: geometryComparators, - BOOLEAN: booleanComparators, - XML: [], - OBJECT: [], - BINARY: [], - } - -export const getComparators = (attribute: string): ComparatorType[] => { - let comparators = TypeToComparators[getAttributeType(attribute)] || [] - // IS NULL checks do not work on these - if (attribute === 'anyGeo' || attribute === 'anyText') { - comparators = comparators.filter( - (comparator) => comparator.value !== 'IS NULL' - ) - } - return comparators -} - -export const ComparatorContext = React.createContext({ - getComparators, -}) - -export function DefaultComparatorProvider({ - children, -}: { - children: React.ReactNode -}) { - return ( - - {children} - - ) -} - -export function useComparators() { - return React.useContext(ComparatorContext) -} - -export function useGetComparators() { - return useComparators().getComparators -} - -export function useComparatorsForAttribute(attribute: string) { - const comparators = useGetComparators() - const [comparatorList, setComparatorList] = React.useState( - comparators(attribute) - ) - React.useEffect(() => { - setComparatorList(comparators(attribute)) - }, [attribute, comparators]) - return comparatorList -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.tsx deleted file mode 100644 index e66ba8e80cd..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/filter-comparator.tsx +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React, { useEffect } from 'react' -import MenuItem from '@mui/material/MenuItem' -import TextField, { TextFieldProps } from '@mui/material/TextField' -import { - FilterClass, - isBasicDatatypeClass, -} from '../../../component/filter-builder/filter.structure' -import { useComparatorsForAttribute } from './comparatorUtils' - -type Props = { - filter: FilterClass - setFilter: (filter: FilterClass) => void - textFieldProps?: TextFieldProps -} - -const FilterComparator = ({ filter, setFilter, textFieldProps }: Props) => { - const comparators = useComparatorsForAttribute(filter.property) - useEffect(() => { - if ( - !comparators.map((comparator) => comparator.value).includes(filter.type) - ) { - setFilter( - new FilterClass({ - ...filter, - type: comparators[0]?.value as FilterClass['type'], - }) - ) - } - }, [filter, setFilter, comparators]) - - if (isBasicDatatypeClass(filter)) { - return null - } - - return ( - { - const newType = e.target.value as FilterClass['type'] - setFilter( - new FilterClass({ - ...filter, - type: newType, - }) - ) - }} - size="small" - {...textFieldProps} - > - {comparators.map((comparator) => ( - - {comparator.label} - - ))} - - ) -} - -export default FilterComparator diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/index.tsx deleted file mode 100644 index 68df7785150..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-comparator/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './filter-comparator' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.tsx deleted file mode 100644 index d0269879b20..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/customInputOrDefault.tsx +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import extension from '../../../extension-points' -import TextField from '@mui/material/TextField' -import { TextFieldProps } from '@mui/material/TextField' -import { EnterKeySubmitProps } from '../../../component/custom-events/enter-key-submit' -import { BooleanTextType } from '../../../component/filter-builder/filter.structure' - -type CustomInputOrDefaultType = { - value: string - onChange: (e: string) => void - props?: Partial -} - -const validateShape = ({ value, onChange }: CustomInputOrDefaultType) => { - if (typeof value !== 'string') { - const booleanText = (value as BooleanTextType)?.text - if (booleanText) { - onChange(booleanText) - } else { - onChange('') - } - } -} - -const ShapeValidator = (props: CustomInputOrDefaultType) => { - const { value } = props - const [isValid, setIsValid] = React.useState(false) - React.useEffect(() => { - if (typeof value !== 'string') { - setIsValid(false) - validateShape(props) - } else { - setIsValid(true) - } - }, [value]) - if (isValid) { - return - } - return null -} - -export const CustomInputOrDefaultPostValidation = ({ - value, - onChange, - props, -}: CustomInputOrDefaultType) => { - let textValue = value - //Clear out value when switching between structured string inputs (e.g. NEAR) - if (typeof textValue !== 'string') { - textValue = (value as any)?.text || '' - } - // call out to extension, if extension handles it, great, if not fallback to this - const componentToReturn = extension.customFilterInput({ - value: textValue, - onChange: onChange, - }) - if (componentToReturn) { - return componentToReturn as JSX.Element - } else { - return ( - ) => { - onChange(e.target.value) - }} - {...EnterKeySubmitProps} - {...props} - /> - ) - } -} - -export const CustomInputOrDefault = ShapeValidator diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/enum-input.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/enum-input.tsx deleted file mode 100644 index c39cd17df3d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/enum-input.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import { dispatchEnterKeySubmitEvent } from '../../../component/custom-events/enter-key-submit' - -export const EnumInput = ({ - options, - onChange, - value, -}: { - options: string[] - onChange: (val: any) => void - value: string -}) => { - const [isOpen, setIsOpen] = React.useState(false) - - return ( - { - setIsOpen(true) - }} - onClose={() => { - setIsOpen(false) - }} - open={isOpen} - fullWidth - size="small" - options={options} - onChange={(_e: any, newValue: string) => { - onChange(newValue) - }} - disableClearable - value={value} - renderInput={(params) => } - // in this case do press so since the dropdown will close before keyup fires - onKeyPress={(e) => { - if (e.key === 'Enter' && !isOpen) { - dispatchEnterKeySubmitEvent(e) - } - }} - /> - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/filter-input.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/filter-input.tsx deleted file mode 100644 index 25ea082bf32..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/filter-input.tsx +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { getAttributeType as defaultGetAttributeType } from '../filterHelper' -import LocationInput from './filter-location-input' - -import { DateField } from '../../../component/fields/date' -import { NearField } from '../../../component/fields/near' -import { NumberRangeField } from '../../../component/fields/number-range' -import { DateRangeField } from '../../../component/fields/date-range' -import { DateRelativeField } from '../../../component/fields/date-relative' -import { - BasicDatatypeFilter, - FilterClass, - ValueTypes, -} from '../../../component/filter-builder/filter.structure' -import { IntegerField } from '../../../component/fields/integer' -import { FloatField } from '../../../component/fields/float' -import { BooleanField } from '../../../component/fields/boolean' -import { DateAroundField } from '../../../component/fields/date-around' -import { CustomInputOrDefault } from './customInputOrDefault' -import BooleanSearchBar from '../../../component/boolean-search-bar/boolean-search-bar' -import { EnterKeySubmitProps } from '../../../component/custom-events/enter-key-submit' -import { EnumInput } from './enum-input' -import { ValidationResult } from '../../location/validators' -import { useMetacardDefinitions } from '../../../js/model/Startup/metacard-definitions.hooks' -import { ReservedBasicDatatype } from '../../../component/reserved-basic-datatype/reserved.basic-datatype' -import { BasicDataTypePropertyName } from '../../../component/filter-builder/reserved.properties' -import { ResourceSizeField } from '../../../component/fields/resource-size' -import { ResourceSizeRangeField } from '../../../component/fields/resource-size-range' -import { useConfiguration } from '../../../js/model/Startup/configuration.hooks' -export type Props = { - filter: FilterClass - setFilter: (filter: FilterClass) => void - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void - getAttributeType?: typeof defaultGetAttributeType -} - -export const FilterInputContext = React.createContext({ - resourceSizeIdentifiers: [] as string[], -}) - -/** - * This is how we determine when we should show the resource size input. - * The default provider uses the configuration to get the resource size identifiers. - * - * If you want to show the resource size input for a custom filter, - * you can create a custom provider and wrap your filter input with it. - */ -export const DefaultFilterInputProvider = ({ - children, -}: { - children: React.ReactNode -}) => { - const resourceSizeIdentifiers = - useConfiguration().getResourceSizeIdentifiers() - return ( - - {children} - - ) -} - -function useResourceSizeIdentifiers() { - return React.useContext(FilterInputContext) -} - -const FilterInput = ({ - filter, - setFilter, - errorListener, - getAttributeType = defaultGetAttributeType, -}: Props) => { - const resourceSizeIdentifiers = - useResourceSizeIdentifiers().resourceSizeIdentifiers - const type = getAttributeType(filter.property) - const MetacardDefinitions = useMetacardDefinitions() - const { value } = filter - const onChange = (val: any) => { - const { context, ...rest } = filter // most filters don't need context, and if they do they are using setFilter directly, not onChange - setFilter( - new FilterClass({ - ...rest, - value: val, - }) - ) - } - - if (filter.property === BasicDataTypePropertyName) { - return ( - - ) - } - - if (resourceSizeIdentifiers.includes(filter.property)) { - switch (filter.type) { - case 'BETWEEN': - return - case 'IS NULL': - return null - default: - return - } - } - - switch (filter.type) { - case 'IS NULL': - return null - case 'BOOLEAN_TEXT_SEARCH': - return ( - - ) - case 'FILTER FUNCTION proximity': - return ( - - ) - case 'DURING': - return ( - - ) - case 'RELATIVE': - return ( - - ) - case 'AROUND': - return ( - - ) - case 'BETWEEN': - return ( - - ) - } - - switch (type) { - case 'BOOLEAN': - return ( - - ) - case 'DATE': - return - case 'LOCATION': - return ( - - ) - case 'FLOAT': - return ( - - ) - case 'INTEGER': - return ( - - ) - } - const textValue = value as string - const enumForAttr = MetacardDefinitions.getEnum(filter.property) - - if (enumForAttr.length > 0) { - let allEnumForAttr = [] as string[] - if (enumForAttr) { - allEnumForAttr = allEnumForAttr.concat(enumForAttr) - } - return ( - - ) - } - - return ( - - ) -} - -export default FilterInput diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/filter-location-input.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/filter-location-input.tsx deleted file mode 100644 index 0262cb5bd73..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/filter-location-input.tsx +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import LocationView from '../../location/location' -import { hot } from 'react-hot-loader' - -/** - * consolidated with location since there is no reason for indirection here, we should delete this - */ -const LocationInput = ({ onChange, value, errorListener }: any) => { - return ( - - ) -} - -export default hot(module)(LocationInput) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/index.tsx deleted file mode 100644 index 6648d810ece..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-input/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './filter-input' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-property.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-property.tsx deleted file mode 100644 index 59826706ea0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter-property.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from 'react' -import { Attribute, getGroupedFilteredAttributes } from './filterHelper' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import { FilterClass } from '../../component/filter-builder/filter.structure' -import { getComparators } from './filter-comparator/comparatorUtils' -import { Props, FilterContext } from './filter' - -export const FilterProperty = ({ filter, setFilter }: Props) => { - const { limitedAttributeList } = React.useContext(FilterContext) - let attributeList = limitedAttributeList - let groups = 1 - if (!attributeList) { - const groupedFilteredAttributes = getGroupedFilteredAttributes() - attributeList = groupedFilteredAttributes.attributes - groups = groupedFilteredAttributes.groups.length - } - const { property } = filter - const currentSelectedAttribute = attributeList.find( - (attrInfo) => attrInfo.value === property - ) - const groupBy = groups > 1 ? (option: Attribute) => option.group! : undefined - return ( - option.label} - isOptionEqualToValue={(option, value) => option.value === value.value} - onChange={(_e, newValue) => { - /** - * should update both the property and the type, since type is restricted based on property - */ - const newProperty = newValue.value as FilterClass['property'] - const comparators = getComparators(newProperty) - const updates = { - property: newProperty, - type: !comparators - .map((comparator) => comparator.value) - .includes(filter.type) - ? (comparators[0].value as FilterClass['type']) - : filter.type, - } - - setFilter( - new FilterClass({ - ...filter, - ...updates, - }) - ) - }} - disableClearable - value={currentSelectedAttribute} - renderInput={(params) => } - /> - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter.tsx deleted file mode 100644 index 54987317c8d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filter.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import * as React from 'react' - -import FilterComparator from './filter-comparator' -import FilterInput from './filter-input' -import { Attribute } from './filterHelper' -import Grid from '@mui/material/Grid' - -import { hot } from 'react-hot-loader' -import { FilterClass } from '../../component/filter-builder/filter.structure' -import { ValidationResult } from '../location/validators' -import { FilterProperty } from './filter-property' -import { DefaultComparatorProvider } from './filter-comparator/comparatorUtils' -import { DefaultFilterInputProvider } from './filter-input/filter-input' - -export type Props = { - filter: FilterClass - setFilter: (filter: FilterClass) => void - errorListener?: (validationResults: { - [key: string]: ValidationResult | undefined - }) => void -} - -export const FilterContext = React.createContext({ - limitedAttributeList: undefined as undefined | Attribute[], -}) -const Filter = ({ filter, setFilter, errorListener }: Props) => { - return ( - - - - - - - - - - - - - - - - ) -} - -export default hot(module)(Filter) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filterHelper.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filterHelper.tsx deleted file mode 100644 index f29b27400c7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/filterHelper.tsx +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { BasicDataTypePropertyName } from '../../component/filter-builder/reserved.properties' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { - AttributeDefinitionType, - AttributeMapType, - AttributeTypes, -} from '../../js/model/Startup/startup.types' -export type Attribute = { - label: string - value: string - description: string | undefined - group?: string -} -const toAttribute = ( - attribute: AttributeDefinitionType, - group?: string -): Attribute => { - return { - label: attribute.alias || attribute.id, - value: attribute.id, - description: (StartupDataStore.Configuration.config - ?.attributeDescriptions || {})[attribute.id], - group, - } -} -export const getGroupedFilteredAttributes = (): { - groups: string[] - attributes: Attribute[] -} => { - const allAttributes = - StartupDataStore.MetacardDefinitions.getSortedAttributes().reduce( - (attributes, attr) => { - attributes[attr.id] = attr - return attributes - }, - {} as AttributeMapType - ) - const validCommonAttributes = - StartupDataStore.Configuration.getCommonAttributes().reduce( - (attributes: Attribute[], id: string) => { - const attribute = allAttributes[id] - if (attribute) { - attributes.push(toAttribute(attribute, 'Commonly Used Attributes')) - } - return attributes - }, - [] - ) - - const basicDataTypeAttributeDefinition = - StartupDataStore.MetacardDefinitions.getAttributeDefinition( - BasicDataTypePropertyName - ) as AttributeDefinitionType - - const groupedFilteredAttributes = validCommonAttributes - .concat([ - toAttribute(basicDataTypeAttributeDefinition, 'Special Attributes'), - ]) - .concat(getFilteredAttributeList('All Attributes')) - const groups = - validCommonAttributes.length > 0 - ? ['Commonly Used Attributes', 'Special Attributes', 'All Attributes'] - : ['Special Attributes', 'All Attributes'] - return { - groups, - attributes: groupedFilteredAttributes, - } -} -export const getFilteredAttributeList = (group?: string): Attribute[] => { - return StartupDataStore.MetacardDefinitions.getSortedAttributes() - .filter( - ({ id }: any) => - id === 'anyText' || - id === 'anyGeo' || - id === BasicDataTypePropertyName || - (!StartupDataStore.MetacardDefinitions.isHiddenAttribute(id) && - id !== 'thumbnail') - ) - .map((attr) => toAttribute(attr, group)) -} - -export const getAttributeType = (attribute: string): AttributeTypes => { - const type = - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute]?.type - if (type === 'GEOMETRY') return 'LOCATION' - if (isIntegerType(type)) return 'INTEGER' - if (isFloatType(type)) return 'FLOAT' - return type -} -const isIntegerType = (type: string) => { - return type === 'INTEGER' || type === 'SHORT' || type === 'LONG' -} -const isFloatType = (type: string) => { - return type === 'FLOAT' || type === 'DOUBLE' -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/index.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/index.ts deleted file mode 100644 index 35a22b1430c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/filter/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './filter' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/grid/grid.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/grid/grid.tsx deleted file mode 100644 index 1df460ebc7a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/grid/grid.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import * as React from 'react' -import Grid, { GridProps } from '@mui/material/Grid' -import styled from 'styled-components' - -export const WrappedGrid = styled( - React.forwardRef((props: GridProps, ref: React.Ref) => { - return - }) -)`` as React.ComponentType> - -const GridItem = styled(WrappedGrid)` - > * { - height: 100%; - } -` - -type CardGridProps = { - gridProps?: GridProps - gridItemProps?: GridProps - children?: React.ReactNode -} - -export const WrappedCardGridItem = ({ - children, - gridItemProps, -}: CardGridProps) => { - return ( - - {children} - - ) -} - -export const WrappedCardGrid = styled( - ({ gridProps, children }: CardGridProps) => { - return ( - - {children} - - ) - } -)`` as React.ComponentType< - React.PropsWithChildren -> diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/grid/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/grid/index.tsx deleted file mode 100644 index 0033dd2928d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/grid/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export { - WrappedGrid as Grid, - WrappedCardGrid as CardGrid, - WrappedCardGridItem as CardGridItem, -} from './grid' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/group/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/group/index.tsx deleted file mode 100644 index 3900e6654f3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/group/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -const Group = (props: any) => ( -
    - {props.children} -
    -) - -export default Group diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/hoc/utils/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/hoc/utils/index.tsx deleted file mode 100644 index 15208a2e678..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/hoc/utils/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { FC } from './utils' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/hoc/utils/utils.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/hoc/utils/utils.tsx deleted file mode 100644 index c78fd9fa7ce..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/hoc/utils/utils.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export type FC

    = (props: P) => JSX.Element diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/index.tsx deleted file mode 100644 index de13b8d71bd..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/index.tsx +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export type LayerInfo = { - name: string - id: string - warning: string - isRemovable: boolean -} - -export type Order = { - order: number - isBottom: boolean - isTop: boolean -} - -export type Visibility = { - alpha: number - show: boolean -} - -export type Actions = { - updateLayerShow: () => void - updateLayerAlpha: (e: any) => void - moveDown: (e: any) => void - moveUp: (e: any) => void - onRemove: () => void -} - -export { default } from './layer-item' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/layer-item.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/layer-item.tsx deleted file mode 100644 index f970cac6552..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/layer-item.tsx +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { Order, Visibility } from '.' -import LayerItemPresentation from './presentation/layer-item' -import { useListenTo } from '../../component/selection-checkbox/useBackbone.hook' - -type State = { - order: Order - visibility: Visibility -} - -type ContainerProps = { - layer: Backbone.Model - sortable: any - updateOrdering: any - focusModel: any -} - -const mapPropsToState = (props: ContainerProps) => { - const { layer } = props - const show = layer.get('show') - const alpha = layer.get('alpha') - const order = layer.get('order') - const isBottom = layer.collection.last().id === layer.id - const isTop = layer.collection.first().id === layer.id - - return { - order: { order, isBottom, isTop }, - visibility: { show, alpha }, - } -} - -const LayerItem = (props: ContainerProps) => { - const [state, setState] = React.useState(mapPropsToState(props)) - useListenTo(props.layer, 'change:show change:alpha change:order', () => { - setState(mapPropsToState(props)) - }) - useListenTo(props.layer.collection, 'sort remove add', () => { - setState(mapPropsToState(props)) - }) - - const { layer } = props - const id = layer.get('id') - const layerInfo = { - name: layer.get('name'), - warning: layer.get('warning'), - isRemovable: layer.has('userRemovable'), - id, - } - - const actions = { - updateLayerShow: () => { - const show = state.visibility.show - props.layer.set('show', !show) - }, - updateLayerAlpha: (e: any) => { - props.layer.set('alpha', e.target.value) - }, - moveDown: () => { - const { focusModel, layer, sortable, updateOrdering } = props - const ordering = sortable.toArray() - const currentIndex = ordering.indexOf(layer.id) - ordering.splice(currentIndex, 1) - ordering.splice(currentIndex + 1, 0, layer.id) - sortable.sort(ordering) - focusModel.setDown(layer.id) - updateOrdering() - }, - moveUp: () => { - const { layer, sortable, focusModel, updateOrdering } = props - const ordering = sortable.toArray() - const currentIndex = ordering.indexOf(layer.id) - ordering.splice(currentIndex - 1, 0, layer.id) - ordering.splice(currentIndex + 1, 1) - sortable.sort(ordering) - focusModel.setUp(layer.id) - updateOrdering() - }, - onRemove: () => { - const { layer } = props - layer.collection.remove(layer) - }, - } - - const presProps = { - ...state, - layerInfo, - actions: actions, - options: { focusModel: props.focusModel }, - } - - return ( -

    - -
    - ) -} - -export default hot(module)(LayerItem) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/alpha.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/alpha.tsx deleted file mode 100644 index 8f9ef6f2be6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/alpha.tsx +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import { PresentationProps, DisabledBehavior } from '.' - -const Alpha = styled.input.attrs({ - min: '0', - max: '1', - step: '0.01', - type: 'range', -})` - display: inline-block; - vertical-align: middle !important; -` - -const AlphaDisabled = styled(Alpha)` - ${(props) => DisabledBehavior(props.theme)}; -` - -const AlphaEnabled = styled(Alpha)` - opacity: 1; - cursor: default !important; -` - -const render = (props: PresentationProps) => { - const { show, alpha } = props.visibility - const { updateLayerAlpha } = props.actions - return show ? ( - - ) : ( - - ) -} - -export const LayerAlpha = hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/index.tsx deleted file mode 100644 index e9b7bd9d225..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/index.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export { - GrabCursor, - IsButton, - HighlightBehavior, - DisabledBehavior, -} from '../../styles/mixins' - -import { LayerInfo, Order, Visibility, Actions } from '..' -export type PresentationProps = { - layerInfo: LayerInfo - order: Order - visibility: Visibility - actions: Actions - options?: any -} - -export { default as LayerRearrange } from './rearrange' -export { LayerInteractions } from './interactions' -export { LayerAlpha } from './alpha' -export { LayerName } from './name' -export { default } from './layer-item' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/interactions.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/interactions.tsx deleted file mode 100644 index 66116225638..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/interactions.tsx +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import { PresentationProps, IsButton, HighlightBehavior } from '.' - -const Interactions = styled.div` - text-align: right; -` - -const InteractionsButton = styled.button` - ${(props) => IsButton(props.theme)}; - ${(props) => - HighlightBehavior({ initialOpacity: props.theme.minimumOpacity })}; - width: ${(props) => props.theme.minimumButtonSize}; - height: ${(props) => props.theme.minimumButtonSize}; - vertical-align: top; -` - -const Warning = styled(InteractionsButton)` - display: inline-block; - color: ${(props) => props.theme.warningColor}; - cursor: default; -` -/* stylelint-disable block-no-empty */ -const Remove = styled(InteractionsButton)`` - -const Show = styled(InteractionsButton)` - position: relative; - display: inline-block !important; - vertical-align: middle; -` - -const ShowIcon = styled.span` - position: absolute; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - display: inline; -` - -const ContentShow = ({ visibility }: PresentationProps) => { - const className = `fa ${visibility.show ? 'fa-eye' : 'fa-eye-slash'}` - return -} - -const render = (props: PresentationProps) => { - const { isRemovable, warning = '' } = props.layerInfo - const { updateLayerShow, onRemove } = props.actions - return ( - - {warning !== '' && ( - - - - )} - - {isRemovable && ( - - - - )} - - - - - - ) -} - -export const LayerInteractions = hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/layer-item.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/layer-item.tsx deleted file mode 100644 index cb4e2a4d7a9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/layer-item.tsx +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import { PresentationProps } from '.' - -import { LayerRearrange, LayerAlpha, LayerInteractions, LayerName } from '.' - -const Root = styled.div` - display: block; - white-space: nowrap; - width: 100%; - overflow: hidden; - position: relative; - border: 2px solid rgba(255, 255, 255, 0.1); - border-top: ${(props) => { - if (!props.order.isTop) { - return 'none' - } - return - }}; -` - -const LayerPropertiesRoot = styled.div` - display: inline-block; - vertical-align: middle; - padding: 0 ${(props) => props.theme.mediumSpacing}; - margin-left: ${(props) => props.theme.minimumButtonSize}; - width: calc(100% - ${(props) => props.theme.minimumButtonSize}); - border-left: 2px solid rgba(255, 255, 255, 0.1); -` - -const render = (props: PresentationProps) => { - return ( - - - - - - - - - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/name.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/name.tsx deleted file mode 100644 index 039fd3cde8d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/name.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import { PresentationProps, DisabledBehavior } from '.' - -const Name = styled.div` - line-height: ${(props) => props.theme.minimumButtonSize}; - overflow: hidden; - text-overflow: ellipsis; -` -const NameDisabled = styled(Name)` - ${(props) => DisabledBehavior(props.theme)}; - cursor: text !important; -` - -const NameEnabled = styled(Name)` - opacity: 1; -` - -const render = (props: PresentationProps) => { - const { name = 'Untitled' } = props.layerInfo - const { show } = props.visibility - return show ? ( - {name} - ) : ( - {name} - ) -} - -export const LayerName = hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/rearrange.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/rearrange.tsx deleted file mode 100644 index 0d5b13dc002..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/layer-item/presentation/rearrange.tsx +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import { PresentationProps, IsButton, HighlightBehavior, GrabCursor } from '.' - -/* stylelint-disable block-no-empty */ -const Rearrange = styled.div`` - -const RearrangeButton = styled.button` - ${(props) => IsButton(props.theme)}; - ${HighlightBehavior({ initialOpacity: 0 })}; - z-index: 1; - position: absolute; - height: calc(0.5 * ${(props) => props.theme.minimumButtonSize}); - line-height: calc(0.5 * ${(props) => props.theme.minimumButtonSize}); -` -const Down = styled(RearrangeButton)` - top: calc(100% - 0.5 * ${(props) => props.theme.minimumButtonSize}); -` -const Up = styled(RearrangeButton)` - top: 0px; -` -const RearrangeIcon = styled.span` - position: absolute; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); -` - -const Drag = styled.button` - ${(props) => IsButton(props.theme)}; - ${(props) => - HighlightBehavior({ initialOpacity: props.theme.minimumOpacity })}; - ${GrabCursor}; - vertical-align: middle; - position: absolute; - top: 0px; - height: 100%; -` -const RearrangeUp = ( - props: PresentationProps, - forwardedRef: React.RefObject -) => { - const { isTop } = props.order - const { moveUp: handleClick } = props.actions - - return ( - !isTop && ( - - - - ) - ) -} - -const RearrangeDown = ( - props: PresentationProps, - forwardedRef: React.RefObject -) => { - const { isBottom } = props.order - const { moveDown: handleClick } = props.actions - - return ( - !isBottom && ( - - - - ) - ) -} -class LayerRearrange extends React.Component { - private down: React.RefObject - private up: React.RefObject - constructor(props: PresentationProps) { - super(props) - this.down = React.createRef() - this.up = React.createRef() - } - - componentDidMount() { - const { isTop, isBottom } = this.props.order - const { id } = this.props.layerInfo - const { focusModel } = this.props.options - - if (focusModel.id === id) { - let focusRef = focusModel.isUp() ? this.up : this.down - focusRef = isTop ? this.down : focusRef - focusRef = isBottom ? this.up : focusRef - setTimeout(() => focusRef.current!.focus(), 0) - } - } - - render() { - return ( - - {RearrangeUp(this.props, this.up)} - {RearrangeDown(this.props, this.down)} - - - - - ) - } -} - -export default hot(module)(LayerRearrange) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/base.line.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/base.line.tsx deleted file mode 100644 index e578169cbc0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/base.line.tsx +++ /dev/null @@ -1,590 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React, { useState, useEffect } from 'react' -import { - ErrorComponent, - validateGeo, - initialErrorState, -} from '../utils/validation' -import Button from '@mui/material/Button' -import CloseIcon from '@mui/icons-material/Close' -import { - validateUsngLineOrPoly, - validateDmsLineOrPoly, - validateUtmUpsLineOrPoly, -} from './validators' -import DmsTextField from './dms-textfield' -import UtmupsTextField from './utmups-textfield' -import { Units } from './common' -import TextField from '../text-field' -import { Radio, RadioItem } from '../radio/radio' -import { MinimumSpacing } from './common' -import _ from 'underscore' - -const coordinatePairRegex = /-?\d{1,3}(\.\d*)?\s-?\d{1,3}(\.\d*)?/g - -function buildWktString(coordinates: any) { - return '[[' + coordinates.join('],[') + ']]' -} - -function convertWktString(value: any) { - if (value.includes('MULTI')) { - return convertMultiWkt(value.includes('POLYGON'), value) - } else if (value.includes('POLYGON') && value.endsWith('))')) { - return convertWkt(value, 4) - } else if (value.includes('LINESTRING') && value.endsWith(')')) { - return convertWkt(value, 2) - } - return value -} - -function convertWkt(value: any, numCoords: any) { - const coordinatePairs = value.match(coordinatePairRegex) - if (!coordinatePairs || coordinatePairs.length < numCoords) { - return value - } - const coordinates = coordinatePairs.map((coord: any) => - coord.replace(' ', ',') - ) - return buildWktString(coordinates) -} - -function convertMultiWkt(isPolygon: any, value: any) { - if (isPolygon && !value.endsWith(')))')) { - return value - } else if (!value.endsWith('))')) { - return value - } - const splitter = isPolygon ? '))' : ')' - const numPoints = isPolygon ? 4 : 2 - let shapes = value - .split(splitter) - .map((shape: any) => shape.match(coordinatePairRegex)) - shapes = shapes - .filter((shape: any) => shape !== null && shape.length >= numPoints) - .map((shape: any) => - shape.map((coordinatePair: any) => coordinatePair.replace(' ', ',')) - ) - return shapes.length === 0 - ? value - : shapes.length === 1 - ? buildWktString(shapes[0]) - : '[' + shapes.map((shapeCoords: any) => buildWktString(shapeCoords)) + ']' -} - -function getPolygonValue(currentValue: any, value: any) { - // if current value's 1st coord is different - // from value's first coord, then delete value's last coord - try { - const parsedValue = JSON.parse(value) - const parsedCurrentValue = JSON.parse(currentValue) - if ( - Array.isArray(parsedValue) && - Array.isArray(parsedCurrentValue) && - !_.isEqual(parsedValue[0], parsedCurrentValue[0]) - ) { - parsedValue.splice(-1, 1) - return JSON.stringify(parsedValue) - } else { - return value - } - } catch (e) { - return value - } -} - -const clearValidationResults = (errorListener?: any) => { - errorListener && - errorListener({ - line: undefined, - buffer: undefined, - }) -} - -const LineLatLon = (props: any) => { - const { - label, - geometryKey, - setState, - setBufferState, - unitKey, - widthKey, - mode, - polyType, - errorListener, - } = props - const [currentValue, setCurrentValue] = useState( - JSON.stringify(props[geometryKey]) - ) - const [baseLineError, setBaseLineError] = useState(initialErrorState) - const [bufferError, setBufferError] = useState(initialErrorState) - - useEffect(() => { - const { geometryKey } = props - const newValue = - typeof props[geometryKey] === 'string' - ? props[geometryKey] - : JSON.stringify(props[geometryKey]) - setCurrentValue(newValue) - if (props.drawing) { - setBaseLineError(initialErrorState) - setBufferError(initialErrorState) - } else { - const lineValidationResult = validateGeo(mode || polyType, newValue) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBaseLineError(lineValidationResult || initialErrorState) - const bufferValidationResult = validateGeo(widthKey, { - value: props[widthKey], - units: props[unitKey], - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBufferError(bufferValidationResult || initialErrorState) - errorListener && - errorListener({ - line: lineValidationResult, - buffer: bufferValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [ - props.polygon, - props.line, - props.lineWidth, - props.bufferWidth, - props.polygonBufferWidth, - props.lineUnits, - props.polygonBufferUnits, - ]) - - return ( -
    -
    - { - value = convertWktString(value.trim()) - if (geometryKey.includes('poly')) { - value = getPolygonValue(currentValue, value) - } - setCurrentValue(value) - try { - setState({ [geometryKey]: JSON.parse(value) }) - } catch (e) { - // Set state with invalid value to trigger error messaging - setState({ [geometryKey]: value }) - } - }} - /> - - { - typeof setBufferState === 'function' - ? setBufferState(unitKey, value) - : setState({ [unitKey]: value }) - }} - > - { - typeof setBufferState === 'function' - ? setBufferState(widthKey, value) - : setState({ [widthKey]: value }) - }} - /> - - -
    -
    - ) -} - -const LineDms = (props: any) => { - const { - geometryKey, - dmsPointArray, - setState, - unitKey, - setBufferState, - widthKey, - errorListener, - } = props - const [baseLineError, setBaseLineError] = useState(initialErrorState) - const [bufferError, setBufferError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setBaseLineError(initialErrorState) - setBufferError(initialErrorState) - } else { - const lineValidationResult = validateDmsLineOrPoly( - dmsPointArray, - geometryKey - ) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBaseLineError(lineValidationResult || initialErrorState) - const bufferValidationResult = validateGeo(widthKey, { - value: props[widthKey], - units: props[unitKey], - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBufferError(bufferValidationResult || initialErrorState) - errorListener && - errorListener({ - line: lineValidationResult, - buffer: bufferValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [ - props.polygon, - props.line, - dmsPointArray, - props.lineWidth, - props.bufferWidth, - props.polygonBufferWidth, - props.lineUnits, - props.polygonBufferUnits, - ]) - - return ( -
    -
    - {dmsPointArray && - dmsPointArray.map((point: any, index: any) => { - return ( -
    - { - let array = [...dmsPointArray] - array.splice(index, 1, point) - setState({ ['dmsPointArray']: array }) - }} - deletePoint={() => { - let array = [...dmsPointArray] - array.splice(index, 1) - setState({ ['dmsPointArray']: array }) - }} - /> - -
    - ) - })} -
    - - - { - typeof setBufferState === 'function' - ? setBufferState(unitKey, value) - : setState({ [unitKey]: value }) - }} - > - { - typeof setBufferState === 'function' - ? setBufferState(widthKey, value) - : setState({ [widthKey]: value }) - }} - /> - - -
    - ) -} - -const LineMgrs = (props: any) => { - const { - geometryKey, - usngPointArray, - setState, - unitKey, - setBufferState, - widthKey, - errorListener, - } = props - const [baseLineError, setBaseLineError] = useState(initialErrorState) - const [bufferError, setBufferError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setBaseLineError(initialErrorState) - setBufferError(initialErrorState) - } else { - const lineValidationResult = validateUsngLineOrPoly( - usngPointArray, - geometryKey - ) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBaseLineError(lineValidationResult || initialErrorState) - const bufferValidationResult = validateGeo(widthKey, { - value: props[widthKey], - units: props[unitKey], - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBufferError(bufferValidationResult || initialErrorState) - errorListener && - errorListener({ - line: lineValidationResult, - buffer: bufferValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [ - props.polygon, - props.line, - usngPointArray, - props.lineWidth, - props.bufferWidth, - props.polygonBufferWidth, - props.lineUnits, - props.polygonBufferUnits, - ]) - - return ( -
    -
    - {usngPointArray && - usngPointArray.map((coord: any, index: any) => { - return ( - { - let points = [...usngPointArray] - points.splice(index, 1, value) - setState({ ['usngPointArray']: points }) - }} - addon={ - - } - /> - ) - })} - - - { - typeof setBufferState === 'function' - ? setBufferState(unitKey, value) - : setState({ [unitKey]: value }) - }} - > - { - typeof setBufferState === 'function' - ? setBufferState(widthKey, value) - : setState({ [widthKey]: value }) - }} - /> - - -
    -
    - ) -} - -const LineUtmUps = (props: any) => { - const { - geometryKey, - utmUpsPointArray, - setState, - unitKey, - setBufferState, - widthKey, - errorListener, - } = props - const [baseLineError, setBaseLineError] = useState(initialErrorState) - const [bufferError, setBufferError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setBaseLineError(initialErrorState) - setBufferError(initialErrorState) - } else { - const lineValidationResult = validateUtmUpsLineOrPoly( - utmUpsPointArray, - geometryKey - ) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBaseLineError(lineValidationResult || initialErrorState) - const bufferValidationResult = validateGeo(widthKey, { - value: props[widthKey], - units: props[unitKey], - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setBufferError(bufferValidationResult || initialErrorState) - errorListener && - errorListener({ - line: lineValidationResult, - buffer: bufferValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [ - props.polygon, - props.line, - utmUpsPointArray, - props.lineWidth, - props.bufferWidth, - props.polygonBufferWidth, - props.lineUnits, - props.polygonBufferUnits, - ]) - - return ( -
    - {utmUpsPointArray && - utmUpsPointArray.map((point: any, index: any) => { - return ( -
    - { - let points = [...utmUpsPointArray] - points.splice(index, 1, point) - setState({ ['utmUpsPointArray']: points }) - }} - deletePoint={() => { - let points = [...utmUpsPointArray] - points.splice(index, 1) - setState({ ['utmUpsPointArray']: points }) - }} - /> - -
    - ) - })} - - - { - typeof setBufferState === 'function' - ? setBufferState(unitKey, value) - : setState({ [unitKey]: value }) - }} - > - { - typeof setBufferState === 'function' - ? setBufferState(widthKey, value) - : setState({ [widthKey]: value }) - }} - /> - - -
    - ) -} - -const BaseLine = (props: any) => { - const { setState, locationType } = props - - const inputs = { - usng: LineMgrs, - dd: LineLatLon, - dms: LineDms, - utmups: LineUtmUps, - } - - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const Component = inputs[locationType] || null - - return ( -
    - setState({ ['locationType']: value })} - > - Lat/Lon (DD) - Lat/Lon (DMS) - USNG / MGRS - UTM / UPS - - - {Component !== null ? : null} -
    - ) -} - -export default BaseLine diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/bounding-box.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/bounding-box.tsx deleted file mode 100644 index 4bdd30169c6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/bounding-box.tsx +++ /dev/null @@ -1,479 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React, { useState, useEffect } from 'react' -import { - validateGeo, - ErrorComponent, - initialErrorState, - initialErrorStateWithDefault, -} from '../utils/validation' -import Group from '../group' -import Label from './label' -import TextField from '../text-field' -import { Radio, RadioItem } from '../radio/radio' -import { Zone, Hemisphere, MinimumSpacing } from './common' -import { - DmsLatitude, - DmsLongitude, -} from '../../component/location-new/geo-components/coordinates' -import DirectionInput from '../../component/location-new/geo-components/direction' -import { Direction } from '../../component/location-new/utils/dms-utils' - -const clearValidationResults = (errorListener?: any) => { - errorListener && - errorListener({ - bbox: undefined, - bboxUL: undefined, - bboxLR: undefined, - }) -} - -const BoundingBoxLatLonDd = (props: any) => { - const { north, east, south, west, setState, errorListener } = props - const [ddError, setDdError] = useState(initialErrorStateWithDefault) - - useEffect(() => { - if (props.drawing) { - setDdError(initialErrorStateWithDefault) - } else { - const validationResults = [ - validateGeo('lon', west), - validateGeo('lon', east), - validateGeo('lat', north), - validateGeo('lat', south), - validateGeo('bbox', { north, south, west, east }), - ] - const validationResult = validationResults.find( - (validation) => validation?.error - ) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setDdError(validationResult || initialErrorStateWithDefault) - errorListener && errorListener({ bbox: validationResult }) - } - return () => clearValidationResults(errorListener) - }, [props.east, props.west, props.south, props.north]) - - function clampDd(key: any, value: any) { - const coordinateType = - key.includes('east') || key.includes('west') ? 'lon' : 'lat' - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message - const { defaultValue } = validateGeo(coordinateType, value) - setState({ [key]: defaultValue || value }) - } - - return ( -
    - clampDd('west', value)} - type="number" - step="any" - min={-180} - max={180} - addon="°" - /> - clampDd('south', value)} - type="number" - step="any" - min={-90} - max={90} - addon="°" - /> - clampDd('east', value)} - type="number" - step="any" - min={-180} - max={180} - addon="°" - /> - clampDd('north', value)} - type="number" - step="any" - min={-90} - max={90} - addon="°" - /> - -
    - ) -} - -const BoundingBoxLatLonDms = (props: any) => { - const { - dmsSouth, - dmsNorth, - dmsWest, - dmsEast, - dmsSouthDirection, - dmsNorthDirection, - dmsWestDirection, - dmsEastDirection, - setState, - errorListener, - } = props - const [dmsError, setDmsError] = useState(initialErrorStateWithDefault) - const latitudeDirections = [Direction.North, Direction.South] - const longitudeDirections = [Direction.East, Direction.West] - - useEffect(() => { - if (props.drawing) { - setDmsError(initialErrorStateWithDefault) - } else { - const validationResults = [ - validateGeo('dmsLon', dmsWest), - validateGeo('dmsLon', dmsEast), - validateGeo('dmsLat', dmsNorth), - validateGeo('dmsLat', dmsSouth), - validateGeo('bbox', { - isDms: true, - dmsNorthDirection, - dmsSouthDirection, - dmsWestDirection, - dmsEastDirection, - north: dmsNorth, - south: dmsSouth, - west: dmsWest, - east: dmsEast, - }), - ] - const validationResult = validationResults.find( - (validation) => validation?.error - ) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setDmsError(validationResult || initialErrorStateWithDefault) - errorListener && errorListener({ bbox: validationResult }) - } - return () => clearValidationResults(errorListener) - }, [props.dmsWest, props.dmsSouth, props.dmsEast, props.dmsNorth]) - - function clampDms(key: any, value: any) { - const coordinateType = - key.includes('East') || key.includes('West') ? 'dmsLon' : 'dmsLat' - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message - const { defaultValue } = validateGeo(coordinateType, value) - setState({ [key]: defaultValue || value }) - } - - return ( -
    - clampDms('dmsWest', value)} - > - setState({ ['dmsWestDirection']: value })} - /> - - clampDms('dmsSouth', value)} - > - setState({ ['dmsSouthDirection']: value })} - /> - - clampDms('dmsEast', value)} - > - setState({ ['dmsEastDirection']: value })} - /> - - clampDms('dmsNorth', value)} - > - setState({ ['dmsNorthDirection']: value })} - /> - - -
    - ) -} - -const BoundingBoxUsngMgrs = (props: any) => { - const { usngbbUpperLeft, usngbbLowerRight, setState, errorListener } = props - const [usngError, setUsngError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setUsngError(initialErrorState) - } else { - const validationResult = [ - validateGeo('usng', usngbbUpperLeft), - validateGeo('usng', usngbbLowerRight), - validateGeo('bbox', { - isUsng: true, - upperLeft: usngbbUpperLeft, - lowerRight: usngbbLowerRight, - }), - ].find((validation) => validation?.error) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setUsngError(validationResult || initialErrorState) - errorListener && errorListener({ bbox: validationResult }) - } - return () => clearValidationResults(errorListener) - }, [props.usngbbUpperLeft, props.usngbbLowerRight]) - - return ( -
    - setState({ ['usngbbUpperLeft']: value })} - /> - setState({ ['usngbbLowerRight']: value })} - /> - -
    - ) -} - -const BoundingBoxUtmUps = (props: any) => { - const { - utmUpsUpperLeftEasting, - utmUpsUpperLeftNorthing, - utmUpsUpperLeftZone, - utmUpsUpperLeftHemisphere, - utmUpsLowerRightEasting, - utmUpsLowerRightNorthing, - utmUpsLowerRightZone, - utmUpsLowerRightHemisphere, - setState, - errorListener, - } = props - const upperLeft = { - easting: utmUpsUpperLeftEasting, - northing: utmUpsUpperLeftNorthing, - zoneNumber: utmUpsUpperLeftZone, - hemisphere: utmUpsUpperLeftHemisphere, - } - const lowerRight = { - easting: utmUpsLowerRightEasting, - northing: utmUpsLowerRightNorthing, - zoneNumber: utmUpsLowerRightZone, - hemisphere: utmUpsLowerRightHemisphere, - } - const [upperLeftError, setUpperLeftError] = useState(initialErrorState) - const [lowerRightError, setLowerRightError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setUpperLeftError(initialErrorState) - setLowerRightError(initialErrorState) - } else { - const upperLeftValidationResult = [ - validateGeo('easting', upperLeft), - validateGeo('northing', upperLeft), - validateGeo('zoneNumber', upperLeft), - validateGeo('hemisphere', upperLeft), - ].find((validation) => validation?.error) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setUpperLeftError(upperLeftValidationResult || initialErrorState) - const lowerRightValidationResult = [ - validateGeo('easting', lowerRight), - validateGeo('northing', lowerRight), - validateGeo('zoneNumber', lowerRight), - validateGeo('hemisphere', lowerRight), - validateGeo('bbox', { isUtmUps: true, upperLeft, lowerRight }), - ].find((validation) => validation?.error) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setLowerRightError(lowerRightValidationResult || initialErrorState) - errorListener && - errorListener({ - bboxUL: upperLeftValidationResult, - bboxLR: lowerRightValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [ - props.utmUpsUpperLeftEasting, - props.utmUpsUpperLeftNorthing, - props.utmUpsUpperLeftZone, - props.utmUpsUpperLeftHemisphere, - props.utmUpsLowerRightEasting, - props.utmUpsLowerRightNorthing, - props.utmUpsLowerRightZone, - props.utmUpsLowerRightHemisphere, - ]) - - return ( -
    -
    - - -
    - - setState({ ['utmUpsUpperLeftEasting']: value }) - } - addon="m" - /> - - setState({ ['utmUpsUpperLeftNorthing']: value }) - } - addon="m" - /> - - setState({ ['utmUpsUpperLeftZone']: value }) - } - /> - - setState({ ['utmUpsUpperLeftHemisphere']: value }) - } - /> -
    -
    - -
    -
    - - -
    - - setState({ ['utmUpsLowerRightEasting']: value }) - } - addon="m" - /> - - setState({ ['utmUpsLowerRightNorthing']: value }) - } - addon="m" - /> - - setState({ ['utmUpsLowerRightZone']: value }) - } - /> - - setState({ ['utmUpsLowerRightHemisphere']: value }) - } - /> -
    -
    - -
    -
    - ) -} - -const BoundingBox = (props: any) => { - const { setState, locationType } = props - - const inputs = { - dd: BoundingBoxLatLonDd, - dms: BoundingBoxLatLonDms, - usng: BoundingBoxUsngMgrs, - utmUps: BoundingBoxUtmUps, - } - - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const Component = inputs[locationType] || null - - return ( -
    - setState({ ['locationType']: value })} - > - Lat/Lon (DD) - Lat/Lon (DMS) - USNG / MGRS - UTM / UPS - - - {Component !== null ? : null} -
    - ) -} - -export default BoundingBox diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/common.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/common.tsx deleted file mode 100644 index 9a87d6093a8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/common.tsx +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import styled from 'styled-components' - -import Group from '../group' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import Label from './label' - -const Units = ({ value, onChange, children }: any) => ( - - {children} - { - return - }} - value={value} - onChange={(_event, newVal) => { - onChange(newVal) - }} - size="small" - style={{ minWidth: '200px' }} - > - -) - -// create an array of 1-60 for zones -const range = [...Array(61).keys()].map((val) => val.toString()).slice(1) -const Zone = ({ value, onChange }: any) => ( - - - { - return - }} - value={value.toString()} - onChange={(_event, newVal) => { - onChange(parseInt(newVal)) - }} - size="small" - > - -) - -const Hemisphere = ({ value, onChange }: any) => ( - - - { - return - }} - value={value} - onChange={(_event, newVal) => { - onChange(newVal) - }} - size="small" - > - -) - -const MinimumSpacing = styled.div` - height: ${(props) => props.theme.minimumSpacing}; -` - -export { Units, Zone, Hemisphere, MinimumSpacing } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/dms-textfield.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/dms-textfield.tsx deleted file mode 100644 index eddea9e4af0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/dms-textfield.tsx +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import CloseIcon from '@mui/icons-material/Close' -import IconButton from '@mui/material/IconButton' -import { - DmsLatitude, - DmsLongitude, -} from '../../component/location-new/geo-components/coordinates' -import DirectionInput from '../../component/location-new/geo-components/direction' - -type Direction = 'N' | 'S' | 'E' | 'W' - -type Point = { - latDirection: Direction - lonDirection: Direction - lat: string - lon: string -} - -const DmsTextfield = ({ - point, - setPoint, - deletePoint, -}: { - point: Point - setPoint: (point: Point) => void - deletePoint: () => void -}) => { - return ( -
    -
    -
    - { - setPoint({ - ...point, - lat: value, - }) - }} - > - { - setPoint({ - ...point, - latDirection: value, - }) - }} - /> - - { - setPoint({ - ...point, - lon: value, - }) - }} - > - { - setPoint({ - ...point, - lonDirection: value, - }) - }} - /> - -
    -
    - - - -
    -
    -
    - ) -} - -export default DmsTextfield diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer.spec.ts deleted file mode 100644 index b22d2eda2de..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer.spec.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { expect } from 'chai' - -import { - mock as mockProperties, - unmock as unmockProperties, -} from '../../test/mock-api/mock-properties' -import { getLargestBbox } from './gazetteer' -let GetLargestBbox: any - -// @ts-expect-error ts-migrate(2732) FIXME: Cannot find module './gazetteer-france-test-data.j... Remove this comment to see the full error message -import testData from './gazetteer-france-test-data.json' - -describe('getLargestBbox', () => { - before(() => { - mockProperties() - GetLargestBbox = getLargestBbox - }) - after(() => { - unmockProperties() - }) - const expectedAnswer = { - maxX: 7.8125, - minX: -5.1953125, - maxY: 50.77891890432069, - minY: 43.37399002495726, - } - it( - 'Largest bounding box for France should equal ' + - JSON.stringify(expectedAnswer), - () => { - const result = GetLargestBbox(testData[0].geojson.coordinates, true) - expect(result).to.deep.equal(expectedAnswer) - } - ) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer.tsx deleted file mode 100644 index 53a183799fc..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/gazetteer.tsx +++ /dev/null @@ -1,326 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { TextFieldProps } from '@mui/material/TextField' -import * as React from 'react' -import defaultFetch from '../utils/fetch' -import Keyword from './keyword' -import { StartupDataStore } from '../../js/model/Startup/startup' -export const getLargestBbox = ( - polygonCoordinates: any[], - isMultiPolygon: boolean -) => { - let finalMax = { x: Number.MIN_SAFE_INTEGER, y: Number.MIN_SAFE_INTEGER } - let finalMin = { x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER } - const boundingBoxLimit = 75 - let encompassingBoundingBox = { - maxX: Number.MIN_SAFE_INTEGER, - minX: Number.MAX_SAFE_INTEGER, - maxY: Number.MIN_SAFE_INTEGER, - minY: Number.MAX_SAFE_INTEGER, - } - let maxArea = -1 - let currentArea = -1 - let currentMax: { - x: number - y: number - } - let currentMin: { - x: number - y: number - } - polygonCoordinates.map((rowCoordinates) => { - currentMax = { x: Number.MIN_SAFE_INTEGER, y: Number.MIN_SAFE_INTEGER } - currentMin = { x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER } - if (isMultiPolygon) { - rowCoordinates[0].map((coordinates: any) => { - currentMax.x = Math.max(coordinates[0], currentMax.x) - currentMax.y = Math.max(coordinates[1], currentMax.y) - currentMin.x = Math.min(coordinates[0], currentMin.x) - currentMin.y = Math.min(coordinates[1], currentMin.y) - encompassingBoundingBox.maxX = Math.max( - coordinates[0], - encompassingBoundingBox.maxX - ) - encompassingBoundingBox.maxY = Math.max( - coordinates[1], - encompassingBoundingBox.maxY - ) - encompassingBoundingBox.minX = Math.min( - coordinates[0], - encompassingBoundingBox.minX - ) - encompassingBoundingBox.minY = Math.min( - coordinates[1], - encompassingBoundingBox.minY - ) - }) - } else { - rowCoordinates.map((coordinates: any) => { - currentMax.x = Math.max(coordinates[0], currentMax.x) - currentMax.y = Math.max(coordinates[1], currentMax.y) - currentMin.x = Math.min(coordinates[0], currentMin.x) - currentMin.y = Math.min(coordinates[1], currentMin.y) - encompassingBoundingBox.maxX = Math.max( - coordinates[0], - encompassingBoundingBox.maxX - ) - encompassingBoundingBox.maxY = Math.max( - coordinates[1], - encompassingBoundingBox.maxY - ) - encompassingBoundingBox.minX = Math.min( - coordinates[0], - encompassingBoundingBox.minX - ) - encompassingBoundingBox.minY = Math.min( - coordinates[1], - encompassingBoundingBox.minY - ) - }) - } - currentArea = (currentMax.x - currentMin.x) * (currentMax.y - currentMin.y) - if (currentArea > maxArea) { - maxArea = currentArea - finalMax = currentMax - finalMin = currentMin - } - }) - const encompassingBoundingBoxHeight = - encompassingBoundingBox.maxY - encompassingBoundingBox.minY - const encompassingBoundingBoxWidth = - encompassingBoundingBox.maxX - encompassingBoundingBox.minX - return encompassingBoundingBoxWidth >= boundingBoxLimit || - encompassingBoundingBoxHeight >= boundingBoxLimit - ? { - maxX: finalMax.x, - minX: finalMin.x, - maxY: finalMax.y, - minY: finalMin.y, - } - : encompassingBoundingBox -} -type Props = { - value?: string - setState: any - fetch?: any - placeholder?: string - loadingMessage?: string - variant?: TextFieldProps['variant'] -} -type Place = { - boundingbox: string[] - class: string - display_name: string - importance: number - lat: string - licence: string - lon: string - osm_id: number - osm_type: OsmType - place_id: number - type: string -} -type OsmType = 'node' | 'way' | 'relation' -export type Suggestion = { - id: string - name: string - geo?: any - extensionGeo?: GeoFeature -} -export type GeoFeature = { - type: string - geometry: { - type: string - coordinates: any[][][] - } - properties?: any - id: string -} -const Gazetteer = (props: Props) => { - const fetch = props.fetch || defaultFetch - const expandPoint = (geo: any) => { - const offset = 0.1 - if (geo.length === 1) { - const point = geo[0] - return [ - { - lat: point.lat + offset, - lon: point.lon + offset, - }, - { - lat: point.lat + offset, - lon: point.lon - offset, - }, - { - lat: point.lat - offset, - lon: point.lon - offset, - }, - { - lat: point.lat - offset, - lon: point.lon + offset, - }, - ] - } - return geo - } - const extractGeo = (suggestion: Suggestion) => { - return { - type: 'Feature', - geometry: { - type: 'Polygon', - coordinates: [ - expandPoint(suggestion.geo).map((coord: any) => [ - coord.lon, - coord.lat, - ]), - ], - }, - properties: {}, - id: suggestion.id, - } - } - const suggesterWithLiteralSupport = async (input: string) => { - const res = await fetch( - `./internal/geofeature/suggestions?q=${encodeURIComponent(input)}` - ) - return await res.json() - } - const geofeatureWithLiteralSupport = async (suggestion: Suggestion) => { - if (suggestion.id.startsWith('LITERAL')) { - return extractGeo(suggestion) - } - const { id } = suggestion - const res = await fetch(`./internal/geofeature?id=${id}`) - const data = await res.json() - const finalArea = getLargestBbox( - data.geometry.coordinates, - isMultiPolygon(data.geometry.coordinates) - ) - return { - type: 'Feature', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [finalArea.minX, finalArea.minY], - [finalArea.maxX, finalArea.minY], - [finalArea.maxX, finalArea.maxY], - [finalArea.minX, finalArea.maxY], - ], - ], - }, - properties: {}, - id: data.display_name, - } - } - const getOsmTypeSymbol = (type: OsmType) => { - switch (type) { - case 'node': - return 'N' - case 'way': - return 'W' - case 'relation': - return 'R' - default: - throw 'Unexpected OSM type ' + type - } - } - const suggester = async (input: string) => { - const res = await (window as any).__global__fetch( - `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent( - input - )}` - ) - const suggestions = await res.json() - return suggestions.map((place: Place) => { - return { - id: getOsmTypeSymbol(place.osm_type) + ':' + place.osm_id, - name: place.display_name, - } - }) - } - const isMultiPolygon = (coordinates: any[]) => { - return ( - coordinates[0][0][0] !== undefined && - coordinates[0][0][0][0] !== undefined - ) - } - const geofeature = async (suggestion: Suggestion) => { - const [type, id] = suggestion.id.split(':') - const res = await (window as any).__global__fetch( - `https://nominatim.openstreetmap.org/lookup?format=json&osm_ids=${type}${id}&polygon_geojson=1` - ) - const data = (await res.json())[0] - const boundingBoxLimit = 75 - const boundingBoxWidth = data.boundingbox[3] - data.boundingbox[2] - const boundingBoxHeight = data.boundingbox[1] - data.boundingbox[0] - if ( - (boundingBoxWidth >= boundingBoxLimit || - boundingBoxHeight >= boundingBoxLimit) && - Object.keys(data.address).length === 2 - ) { - const finalArea = getLargestBbox( - data.geojson.coordinates, - isMultiPolygon(data.geojson.coordinates) - ) - data.boundingbox[0] = finalArea.minY - data.boundingbox[1] = finalArea.maxY - data.boundingbox[2] = finalArea.minX - data.boundingbox[3] = finalArea.maxX - } - return { - type: 'Feature', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [data.boundingbox[2], data.boundingbox[0]], - [data.boundingbox[3], data.boundingbox[0]], - [data.boundingbox[3], data.boundingbox[1]], - [data.boundingbox[2], data.boundingbox[1]], - ], - ], - }, - properties: {}, - id: data.display_name, - } - } - return ( - <> - {StartupDataStore.Configuration.getOnlineGazetteer() ? ( - - ) : ( - - )} - - ) -} -export default Gazetteer diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/index.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/index.ts deleted file mode 100644 index 6552eeca424..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import location from './location' -export default location diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/keyword.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/keyword.tsx deleted file mode 100644 index 1dc5b07c05c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/keyword.tsx +++ /dev/null @@ -1,204 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { useState } from 'react' -import ExtensionPoints from '../../extension-points' -import GazetteerAutoComplete from '../auto-complete/gazetteer-autocomplete' -import Polygon from './polygon' -import MultiPolygon from './multipoly' -import { TextFieldProps } from '@mui/material/TextField' -import defaultFetch from '../utils/fetch' -import { Suggestion, GeoFeature } from './gazetteer' -import useSnack from '../../component/hooks/useSnack' - -type Props = { - setState: any - fetch?: any - value?: string - onError?: (error: any) => void - suggester?: (input: string) => Promise - geofeature?: (suggestion: Suggestion) => Promise - errorMessage?: string - polygon?: any[] - polyType?: string - setBufferState?: any - polygonBufferWidth?: string - polygonBufferUnits?: string - loadingMessage?: string - minimumInputLength?: number - placeholder?: string - variant?: TextFieldProps['variant'] -} - -const Keyword = (props: Props) => { - const [value, setValue] = useState(props.value || '') - const [loading, setLoading] = useState(false) - const [error, setError] = useState('') - const fetch = props.fetch || defaultFetch - const addSnack = useSnack() - const { - polygon, - setBufferState, - polygonBufferWidth, - polygonBufferUnits, - polyType, - } = props - - const internalSuggester = async (input: string): Promise => { - const res = await fetch(`./internal/geofeature/suggestions?q=${input}`) - const json = await res.json() - return await json.filter(({ id }: Suggestion) => !id.startsWith('LITERAL')) - } - - const suggester = async (input: string): Promise => { - let suggestions: Suggestion[] = [] - - const extensionSuggestions = await ExtensionPoints.suggester(input) - - if (extensionSuggestions) { - suggestions = suggestions.concat(extensionSuggestions) - } - - if (props.suggester) { - const propsSuggestions = await props.suggester(input) - suggestions = suggestions.concat(propsSuggestions) - } else { - const internalSuggestions = await internalSuggester(input) - suggestions = suggestions.concat(internalSuggestions) - } - - return suggestions - } - - const internalGeofeature = async ({ - id, - }: Suggestion): Promise => { - const res = await fetch(`./internal/geofeature?id=${id}`) - return await res.json() - } - - const geofeature = async (suggestion: Suggestion): Promise => { - if (suggestion.extensionGeo) { - return suggestion.extensionGeo - } else if (props.geofeature) { - return await props.geofeature(suggestion) - } else { - return await internalGeofeature(suggestion) - } - } - - const onChange = async (suggestion: Suggestion) => { - if (!suggestion) { - props.setState({ hasKeyword: false, value: '', polygon: [] }) - setValue('') - return - } - - setError('') - setValue(suggestion.name) - setLoading(true) - try { - const { type, geometry } = await geofeature(suggestion) - setLoading(false) - - switch (geometry.type) { - case 'Polygon': { - const polygon = geometry.coordinates[0] - props.setState({ - hasKeyword: true, - locationId: undefined, - locationType: 'latlon', - polygon, - polyType: 'polygon', - value: suggestion.name, - }) - break - } - case 'MultiPolygon': { - // outer ring only - const polygon = geometry.coordinates.map((ring: any[]) => ring[0]) - - props.setState({ - hasKeyword: true, - locationId: undefined, - locationType: 'latlon', - polygon, - polyType: 'multipolygon', - value: suggestion.name, - }) - break - } - default: { - addSnack( - 'Invalid feature - Unrecognized feature type: ' + - JSON.stringify(type), - { - alertProps: { - severity: 'error', - }, - } - ) - } - } - } catch (e) { - console.error(e) - setLoading(false) - setError(props.errorMessage || 'Geo feature endpoint unavailable') - props.onError && props.onError(e) - } - } - - return ( - <> - - {loading && ( -
    - {props.loadingMessage || 'Loading geometry...'}{' '} - -
    - )} - {error &&
    {error}
    } - {polyType === 'polygon' && ( - - )} - {polyType === 'multipolygon' && ( - - )} - - ) -} - -export default Keyword diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/label.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/label.tsx deleted file mode 100644 index cbb3cf58add..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/label.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -const Label = ({ children }: any) => ( - - {children} -   - -) - -export default Label diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/line.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/line.tsx deleted file mode 100644 index 22b410b9c5d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/line.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import BaseLine from './base.line' - -const options = { - label: 'Line', - geometryKey: 'line', - unitKey: 'lineUnits', - widthKey: 'lineWidth', -} -const Line = (props: any) => - -export default Line diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/location-color-selector.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/location-color-selector.tsx deleted file mode 100644 index e854e43198f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/location-color-selector.tsx +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (c) Connexta, LLC */ -import * as React from 'react' -import styled from 'styled-components' -import { Grid } from '@mui/material' -import Tooltip from '@mui/material/Tooltip/Tooltip' -import { transparentize } from 'polished' - -const ColorSwatch = styled.button` - height: 1.5rem; - width: 1.5rem; - min-width: 1.5rem; - margin: 0.2rem; - border-radius: 4px; - background-color: ${(props: any) => props.color}; -` - -export const ColorSquare = styled(ColorSwatch)` - height: ${(props: any) => props.size}; - width: ${(props: any) => props.size}; - min-width: ${(props: any) => props.size}; - background-clip: padding-box; - &:enabled { - border: 0.12rem solid - ${(props: any) => transparentize(0.5, props.palette.text.primary)}; - } - &:enabled:hover { - border: 0.15rem solid - ${(props: any) => transparentize(0.1, props.palette.text.primary)}; - } -` - -const ColorGrid = styled(Grid)` - padding: 0.5rem; -` - -type LocationColorSelectorProps = { - setColor: (color: string) => void -} - -type ColorSwatchProps = { - colorValue: string - title?: string -} & LocationColorSelectorProps - -const ColorPaletteItem = ({ - title, - colorValue, - setColor, -}: ColorSwatchProps) => { - return ( - - setColor(colorValue)} /> - - ) -} - -export const locationColors = { - purple: '#8E79DD', - yellow: '#EECC66', - cyan: '#33BBEE', - red: '#961E00', - green: '#117733', - blue: '#0022FF', - violet: '#AA4499', - orange: '#EE7733', - teal: '#44AA99', - grey: '#BBBBBB', - black: '#000000', - white: '#FFFFFF', -} - -// a color that is not similar looking to the ones above -export const contrastingColor = '#996600' - -export const LocationColorSelector = ({ - setColor, -}: LocationColorSelectorProps) => { - return ( - - - - - - - - - - - - - - - - - - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/location.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/location.tsx deleted file mode 100644 index 3ed52ea4e2d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/location.tsx +++ /dev/null @@ -1,307 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import LocationOldModel from '../../component/location-old/location-old' -import wreqr from '../../js/wreqr' -import { Drawing, useIsDrawing } from '../../component/singletons/drawing' -import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook' -import { hot } from 'react-hot-loader' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import Button from '@mui/material/Button' -import Line from './line' -import Polygon from './polygon' -import PointRadius from './point-radius' -import BoundingBox from './bounding-box' -import Gazetteer from './gazetteer' -import ShapeUtils from '../../js/ShapeUtils' -import ExtensionPoints from '../../extension-points/extension-points' -import { useTheme } from '@mui/material/styles' -import { Popover } from '@mui/material' -import { ColorSquare, LocationColorSelector } from './location-color-selector' -import { useMenuState } from '../../component/menu-state/menu-state' -import { useMetacardDefinitions } from '../../js/model/Startup/metacard-definitions.hooks' - -type InputType = { - label: string - Component: any -} -export type InputsType = { - [key: string]: InputType -} - -const BaseInputs = { - line: { - label: 'Line', - Component: Line, - }, - poly: { - label: 'Polygon', - Component: Polygon, - }, - circle: { - label: 'Point-Radius', - Component: PointRadius, - }, - bbox: { - label: 'Bounding Box', - Component: BoundingBox, - }, - keyword: { - label: 'Keyword', - Component: ({ setState, keywordValue, ...props }: any) => { - return ( - // Offsets className="form-group flow-root" below -
    - { - setState({ keywordValue: value, ...data }) - }} - setBufferState={(key: any, value: any) => - setState({ [key]: value }) - } - variant="outlined" - /> -
    - ) - }, - }, -} as InputsType - -const drawTypes = ['line', 'poly', 'circle', 'bbox'] -function getCurrentValue({ locationModel }: any) { - const modelJSON = locationModel.toJSON() - let type - if (modelJSON.polygon !== undefined) { - type = ShapeUtils.isArray3D(modelJSON.polygon) ? 'MULTIPOLYGON' : 'POLYGON' - } else if ( - modelJSON.lat !== undefined && - modelJSON.lon !== undefined && - modelJSON.radius !== undefined - ) { - type = 'POINTRADIUS' - } else if ( - modelJSON.line !== undefined && - modelJSON.lineWidth !== undefined - ) { - type = 'LINE' - } else if ( - modelJSON.north !== undefined && - modelJSON.south !== undefined && - modelJSON.east !== undefined && - modelJSON.west !== undefined - ) { - type = 'BBOX' - } - return Object.assign(modelJSON, { - type, - lineWidth: modelJSON.lineWidth, - radius: modelJSON.radius, - }) -} -function updateMap({ locationModel }: any) { - const mode = locationModel.get('mode') - if (mode !== undefined && Drawing.isDrawing() !== true) { - ;(wreqr as any).vent.trigger('search:' + mode + 'display', locationModel) - } -} -export const LocationContext = React.createContext({ - filterInputPredicate: (_name: string): boolean => { - return true - }, -}) -const LocationInput = ({ onChange, value, errorListener }: any) => { - const MetacardDefinitions = useMetacardDefinitions() - const inputs = React.useMemo(() => { - return ExtensionPoints.locationTypes(BaseInputs) - }, [ExtensionPoints.locationTypes]) - const locationContext = React.useContext(LocationContext) - const [locationModel] = React.useState(new LocationOldModel(value) as any) - const [state, setState] = React.useState(locationModel.toJSON() as any) - const isDrawing = useIsDrawing() - const { listenTo, stopListening } = useBackbone() - const { MuiButtonProps, MuiPopoverProps } = useMenuState() - const onDraw = () => { - ;(wreqr as any).vent.trigger( - 'search:draw' + locationModel.attributes.mode, - locationModel - ) - } - const onDrawCancel = () => { - ;(wreqr as any).vent.trigger('search:drawcancel', locationModel) - } - const onDrawEnd = () => { - ;(wreqr as any).vent.trigger('search:drawend', locationModel) - } - const setColor = (color: string) => { - locationModel.set('color', color) - onDrawEnd() - } - React.useEffect(() => { - const callback = () => updateMap({ locationModel }) - listenTo((wreqr as any).vent, 'search:requestlocationmodels', callback) - return () => - stopListening( - (wreqr as any).vent, - 'search:requestlocationmodels', - callback - ) - }, []) - React.useEffect(() => { - return () => { - setTimeout(() => { - // This is to facilitate clearing out the map, it isn't about the value, but we don't want the changeCallback to fire! - locationModel.set(locationModel.defaults()) - ;(wreqr as any).vent.trigger('search:removedisplay', locationModel) - onDrawEnd() - }, 0) - } - }, []) - React.useEffect(() => { - const callback = () => onDraw() - listenTo((wreqr as any).vent, 'search:requestdrawingmodels', callback) - return () => - stopListening( - (wreqr as any).vent, - 'search:requestdrawingmodels', - callback - ) - }, []) - React.useEffect(() => { - const onChangeCallback = () => { - setState(locationModel.toJSON()) - updateMap({ locationModel }) - onChange(getCurrentValue({ locationModel })) - } - listenTo(locationModel, 'change', onChangeCallback) - return () => { - stopListening(locationModel, 'change', onChangeCallback) - } - }, [onChange]) - React.useEffect(() => { - const onDoubleClickCallback = (locationId: any) => { - if (locationModel.attributes.locationId === locationId) onDraw() - } - listenTo((wreqr as any).vent, 'location:doubleClick', onDoubleClickCallback) - return () => { - stopListening( - (wreqr as any).vent, - 'location:doubleClick', - onDoubleClickCallback - ) - } - }, [locationModel, state]) - const ComponentToRender = inputs[state.mode] - ? inputs[state.mode].Component - : () => null - const options = Object.entries(inputs) - .map((entry) => { - const [key, value] = entry - return { - label: value.label, - value: key, - } - }) - .filter((value) => { - return locationContext.filterInputPredicate(value.value) - }) - return ( -
    -
    - option.label} - isOptionEqualToValue={(option, value) => { - return option.value === value.value - }} - onChange={(_e, newValue) => { - locationModel.set('mode', newValue.value) - }} - disableClearable - value={ - options.find((opt) => opt.value === state.mode) || { - value: '', - label: '', - } - } - renderInput={(params) => ( - - )} - /> - -
    - {/* this part is really weird, we splat state as separate props, that's why we use destructuring */} - { - locationModel.set(args) // always update the locationModel, that's our "source of truth", above we map this back into state by listening to changes - }} - errorListener={errorListener} - /> - {drawTypes.includes(state.mode) ? ( -
    -
    -
    Color
    - - - - -
    - {isDrawing && locationModel === Drawing.getDrawModel() ? ( - - ) : ( - - )} -
    - ) : null} -
    -
    -
    - ) -} -export default hot(module)(LocationInput) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/multipoly.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/multipoly.tsx deleted file mode 100644 index 059be2facf9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/multipoly.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import BaseLine from './base.line' - -const options = { - label: 'MultiPolygon', - geometryKey: 'polygon', - unitKey: 'polygonBufferUnits', - widthKey: 'polygonBufferWidth', -} - -const MultiPolygon = (props: any) => - -export default MultiPolygon diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/point-radius.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/point-radius.tsx deleted file mode 100644 index 350fa067bb1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/point-radius.tsx +++ /dev/null @@ -1,392 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React, { useState, useEffect } from 'react' -import { Radio, RadioItem } from '../radio/radio' -import TextField from '../text-field' -import { - validateGeo, - initialErrorState, - initialErrorStateWithDefault, - ErrorComponent, -} from '../utils/validation' -import { Units, Zone, Hemisphere, MinimumSpacing } from './common' -import { - DmsLatitude, - DmsLongitude, -} from '../../component/location-new/geo-components/coordinates' -import DirectionInput from '../../component/location-new/geo-components/direction' -import { Direction } from '../../component/location-new/utils/dms-utils' - -const clearValidationResults = (errorListener?: any) => { - errorListener && - errorListener({ - point: undefined, - radius: undefined, - }) -} - -const PointRadiusLatLonDd = (props: any) => { - const { lat, lon, radius, radiusUnits, setState, errorListener } = props - const [ddError, setDdError] = useState(initialErrorStateWithDefault) - const [radiusError, setRadiusError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setDdError(initialErrorStateWithDefault) - setRadiusError(initialErrorState) - } else { - const ddValidationResult = [ - validateGeo('lat', lat), - validateGeo('lon', lon), - ].find((validation) => validation?.error) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message - setDdError(ddValidationResult || initialErrorStateWithDefault) - const radiusValidationResult = validateGeo('radius', { - value: radius, - units: radiusUnits, - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setRadiusError(radiusValidationResult || initialErrorState) - errorListener && - errorListener({ - point: ddValidationResult, - radius: radiusValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [props.lat, props.lon, props.radius, props.radiusUnits]) - - function clampDd(key: any, value: any) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message - const { defaultValue } = validateGeo(key, value) - setState({ [key]: defaultValue || value }) - } - - return ( -
    - clampDd('lat', value)} - addon="°" - /> - clampDd('lon', value)} - addon="°" - /> - - setState({ ['radiusUnits']: value })} - > - setState({ ['radius']: value })} - /> - - -
    - ) -} - -const PointRadiusLatLonDms = (props: any) => { - const { - dmsLat, - dmsLon, - dmsLatDirection, - dmsLonDirection, - radius, - radiusUnits, - setState, - errorListener, - } = props - const [dmsError, setDmsError] = useState(initialErrorStateWithDefault) - const [radiusError, setRadiusError] = useState(initialErrorState) - const latitudeDirections = [Direction.North, Direction.South] - const longitudeDirections = [Direction.East, Direction.West] - - useEffect(() => { - if (props.drawing) { - setDmsError(initialErrorStateWithDefault) - setRadiusError(initialErrorState) - } else { - const dmsValidationResult = [ - validateGeo('dmsLat', dmsLat), - validateGeo('dmsLon', dmsLon), - ].find((validation) => validation?.error) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message - setDmsError(dmsValidationResult || initialErrorStateWithDefault) - const radiusValidationResult = validateGeo('radius', { - value: radius, - units: radiusUnits, - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setRadiusError(radiusValidationResult || initialErrorState) - errorListener && - errorListener({ - point: dmsValidationResult, - radius: radiusValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [props.dmsLat, props.dmsLon, props.radius, props.radiusUnits]) - - function clampDms(key: any, value: any) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message - const { defaultValue } = validateGeo(key, value) - setState({ [key]: defaultValue || value }) - } - - return ( -
    - clampDms('dmsLat', value)} - > - setState({ ['dmsLatDirection']: value })} - /> - - clampDms('dmsLon', value)} - > - setState({ ['dmsLonDirection']: value })} - /> - - - setState({ ['radiusUnits']: value })} - > - setState({ ['radius']: value })} - /> - - -
    - ) -} - -const PointRadiusUsngMgrs = (props: any) => { - const { usng, radius, radiusUnits, setState, errorListener } = props - const [usngError, setUsngError] = useState(initialErrorState) - const [radiusError, setRadiusError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setUsngError(initialErrorState) - setRadiusError(initialErrorState) - } else { - const usngValidationResult = validateGeo('usng', usng) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setUsngError(usngValidationResult) - const radiusValidationResult = validateGeo('radius', { - value: radius, - units: radiusUnits, - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setRadiusError(radiusValidationResult || initialErrorState) - errorListener && - errorListener({ - point: usngValidationResult, - radius: radiusValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [props.usng, props.radius, props.radiusUnits]) - - return ( -
    - setState({ ['usng']: value })} - /> - - setState({ ['radiusUnits']: value })} - > - setState({ ['radius']: value })} - /> - - -
    - ) -} - -const PointRadiusUtmUps = (props: any) => { - const { - utmUpsEasting, - utmUpsNorthing, - utmUpsZone, - utmUpsHemisphere, - radius, - radiusUnits, - setState, - errorListener, - } = props - const [utmError, setUtmError] = useState(initialErrorState) - const [radiusError, setRadiusError] = useState(initialErrorState) - - useEffect(() => { - if (props.drawing) { - setUtmError(initialErrorState) - setRadiusError(initialErrorState) - } else { - const utmUps = { - easting: utmUpsEasting, - northing: utmUpsNorthing, - zoneNumber: utmUpsZone, - hemisphere: utmUpsHemisphere, - } - const utmUpsValidationResult = [ - validateGeo('easting', utmUps), - validateGeo('northing', utmUps), - validateGeo('zoneNumber', utmUps), - validateGeo('hemisphere', utmUps), - ].find((validation) => validation?.error) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type '{ error: ... Remove this comment to see the full error message - setUtmError(utmUpsValidationResult || initialErrorStateWithDefault) - const radiusValidationResult = validateGeo('radius', { - value: radius, - units: radiusUnits, - }) - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ error: boolean; message: strin... Remove this comment to see the full error message - setRadiusError(radiusValidationResult || initialErrorState) - errorListener && - errorListener({ - point: utmUpsValidationResult, - radius: radiusValidationResult, - }) - } - return () => clearValidationResults(errorListener) - }, [ - props.utmUpsEasting, - props.utmUpsNorthing, - props.utmUpsZone, - props.utmUpsHemisphere, - props.radius, - props.radiusUnits, - ]) - - return ( -
    - setState({ ['utmUpsEasting']: value })} - addon="m" - /> - setState({ ['utmUpsNorthing']: value })} - addon="m" - /> - setState({ ['utmUpsZone']: value })} - /> - setState({ ['utmUpsHemisphere']: value })} - /> - - setState({ ['radiusUnits']: value })} - > - setState({ ['radius']: value })} - /> - - -
    - ) -} - -const PointRadius = (props: any) => { - const { setState, locationType } = props - - const inputs = { - dd: PointRadiusLatLonDd, - dms: PointRadiusLatLonDms, - usng: PointRadiusUsngMgrs, - utmUps: PointRadiusUtmUps, - } - - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const Component = inputs[locationType] || null - - return ( -
    - setState({ ['locationType']: value })} - > - Lat / Lon (DD) - Lat / Lon (DMS) - USNG / MGRS - UTM / UPS - - -
    - {Component !== null ? : null} -
    -
    - ) -} - -export default PointRadius diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/polygon.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/polygon.tsx deleted file mode 100644 index db4dacd65b9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/polygon.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import BaseLine from './base.line' - -const options = { - label: 'Polygon', - geometryKey: 'polygon', - unitKey: 'polygonBufferUnits', - widthKey: 'polygonBufferWidth', -} - -const Polygon = (props: any) => - -export default Polygon diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/utmups-textfield.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/utmups-textfield.tsx deleted file mode 100644 index d14f9032b20..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/utmups-textfield.tsx +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import IconButton from '@mui/material/IconButton' -import CloseIcon from '@mui/icons-material/Close' -import TextField from '../text-field' -import { Zone, Hemisphere } from './common' - -type UtmUpsPoint = { - easting: number - northing: number - zoneNumber: number - hemisphere: 'Northern' | 'Southern' -} - -const UtmupsTextfield = ({ - point, - setPoint, - deletePoint, -}: { - point: UtmUpsPoint - setPoint: (point: UtmUpsPoint) => void - deletePoint: () => void -}) => { - return ( -
    -
    -
    - { - setPoint({ - ...point, - easting: value, - }) - }} - addon="m" - /> - { - setPoint({ - ...point, - northing: value, - }) - }} - addon="m" - /> - { - setPoint({ - ...point, - zoneNumber: value, - }) - }} - /> - { - setPoint({ - ...point, - hemisphere: value, - }) - }} - /> -
    -
    - - - -
    -
    -
    - ) -} - -export default UtmupsTextfield diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/validators.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/validators.tsx deleted file mode 100644 index 66a2b29363d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/location/validators.tsx +++ /dev/null @@ -1,246 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as usng from 'usng.js' -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. -const converter = new usng.Converter() -import errorMessages from '../../component/location-new/utils/errors' -import { validateGeo } from '../utils/validation' -import _ from 'lodash' - -const dmsRegex = new RegExp('^([0-9_]*)°([0-9_]*)\'([0-9_]*\\.?[0-9_]*)"$') - -type Direction = 'N' | 'S' | 'E' | 'W' - -type Point = { - latDirection: Direction - lonDirection: Direction - lat: string - lon: string -} - -type DmsCoordinate = { - degrees: string - minutes: string - seconds: string - direction: Direction -} - -type UtmUpsPoint = { - easting: number - northing: number - zoneNumber: number - hemisphere: 'NORTHERN' | 'SOUTHERN' -} - -export type ValidationResult = { - error: boolean - message?: string - defaultValue?: any -} - -function isUPS(input: string) { - try { - converter.deserializeUPS(input) - return true - } catch (err) { - return false - } -} - -function validateUsngGrid(grid: string) { - //corner case for ups zone - return converter.isUSNG(grid) !== 0 || isUPS(grid) -} - -function gridIsBlank(grid: string) { - return grid.length === 0 -} - -function dmsPointIsBlank(point: Point) { - return point.lat === '' || point.lon === '' -} - -function utmUpsIsBlank(point: UtmUpsPoint) { - return point.easting || point.hemisphere || point.northing || point.zoneNumber - ? false - : true -} - -function validateUtmUpsPoint(point: UtmUpsPoint) { - const validation = validateGeo('easting', point) - return !validation?.error -} - -function inValidRange(coordinate: DmsCoordinate, maximum: number) { - const degrees = parseInt(coordinate.degrees) - const minutes = parseInt(coordinate.minutes) - const seconds = parseFloat(coordinate.seconds) - if (isNaN(seconds)) { - return false - } - if (degrees > maximum || minutes > 60 || seconds > 60) { - return false - } - if (degrees === maximum && (minutes > 0 || seconds > 0)) { - return false - } - return true -} - -function replacePlaceholderWithZeros(numString = '') { - while (numString.includes('_')) { - if (numString.includes('.')) { - numString = numString.replace('_', '0') - } else { - numString = numString.replace('_', '') - numString = '0' + numString - } - } - return numString -} - -function parseDmsCoordinate(coordinate: string) { - if (coordinate === undefined) { - return undefined - } - - const matches = dmsRegex.exec(coordinate) - if (!matches) { - return undefined - } - const degrees = replacePlaceholderWithZeros(matches[1]) - const minutes = replacePlaceholderWithZeros(matches[2]) - const seconds = replacePlaceholderWithZeros(matches[3]) - return { degrees, minutes, seconds } as DmsCoordinate -} - -function validateDmsPoint(point: Point) { - const latitude = parseDmsCoordinate(point.lat) - const longitude = parseDmsCoordinate(point.lon) - if (latitude && longitude) { - return inValidRange(latitude, 90) && inValidRange(longitude, 180) - } - return false -} - -function validateDmsLineOrPoly(dms: Point[], type: 'line' | 'polygon') { - let defaultValue - if (!dms || dms.some(dmsPointIsBlank)) { - return { error: true, message: errorMessages.invalidList, defaultValue } - } - let error = false - let message = null - switch (type) { - case 'line': - if (!dms.every(validateDmsPoint)) { - error = true - message = errorMessages.invalidList - } else if (dms.length < 2) { - error = true - message = errorMessages.tooFewPointsLine - } - break - case 'polygon': - if (!dms.every(validateDmsPoint)) { - error = true - message = errorMessages.invalidList - } else if (dms.length < 4) { - error = true - message = errorMessages.tooFewPointsPolygon - } else if (!_.isEqual(dms[0], dms.slice(-1)[0])) { - error = true - message = errorMessages.firstLastPointMismatch - } - break - } - return { error, message, defaultValue } -} - -function validateUsngLineOrPoly(usng: string[], type: 'line' | 'polygon') { - let defaultValue - if (!usng || usng.some(gridIsBlank)) { - return { error: true, message: errorMessages.invalidList, defaultValue } - } - let error = false - let message = null - switch (type) { - case 'line': - if (!usng.every(validateUsngGrid)) { - error = true - message = errorMessages.invalidList - } else if (usng.length < 2) { - error = true - message = errorMessages.tooFewPointsLine - } - break - case 'polygon': - if (!usng.every(validateUsngGrid)) { - error = true - message = errorMessages.invalidList - } else if (usng.length < 4) { - error = true - message = errorMessages.tooFewPointsPolygon - } else if (!_.isEqual(usng[0], usng.slice(-1)[0])) { - error = true - message = errorMessages.firstLastPointMismatch - } - break - } - return { error, message, defaultValue } -} - -function validateUtmUpsLineOrPoly( - utmups: UtmUpsPoint[], - type: 'line' | 'polygon' -) { - let defaultValue - if (!utmups || utmups.some(utmUpsIsBlank)) { - return { error: true, message: errorMessages.invalidList, defaultValue } - } - let error = false - let message = null - switch (type) { - case 'line': - if (!utmups.every(validateUtmUpsPoint)) { - error = true - message = errorMessages.invalidList - } else if (utmups.length < 2) { - error = true - message = errorMessages.tooFewPointsLine - } - break - case 'polygon': - if (!utmups.every(validateUtmUpsPoint)) { - error = true - message = errorMessages.invalidList - } else if (utmups.length < 4) { - error = true - message = errorMessages.tooFewPointsPolygon - } else if (!_.isEqual(utmups[0], utmups.slice(-1)[0])) { - error = true - message = errorMessages.firstLastPointMismatch - } - break - } - return { error, message, defaultValue } -} - -export { - validateUsngLineOrPoly, - validateDmsLineOrPoly, - parseDmsCoordinate, - validateUtmUpsLineOrPoly, - isUPS, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/container.tsx deleted file mode 100644 index 35c91eaf0d7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/container.tsx +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { hot } from 'react-hot-loader' -import * as React from 'react' -import wreqr from '../../js/wreqr' -import MapActionsPresentation from './presentation' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -type Props = { - model: LazyQueryResult -} -type State = { - currentOverlayUrl: string -} -const getActionsWithIdPrefix = ( - actions: LazyQueryResult['plain']['actions'], - id: string -) => { - return actions.filter((action) => action.id.startsWith(id)) -} -class MapActions extends React.Component { - constructor(props: Props) { - super(props) - this.state = { - currentOverlayUrl: this.props.model.currentOverlayUrl || '', - } - } - getActions = () => { - return this.props.model.plain.actions - } - getMapActions = () => { - return getActionsWithIdPrefix( - this.getActions(), - 'catalog.data.metacard.map.' - ) - } - getOverlayActions = () => { - const modelOverlayActions = getActionsWithIdPrefix( - this.getActions(), - 'catalog.data.metacard.map.overlay.' - ) - return modelOverlayActions.map((modelOverlayAction) => { - return { - description: modelOverlayAction.description, - url: modelOverlayAction.url, - overlayText: this.getOverlayText(modelOverlayAction.url), - } - }) - } - getOverlayText = (actionUrl: String) => { - const overlayTransformerPrefix = 'overlay.' - const overlayTransformerIndex = actionUrl.lastIndexOf( - overlayTransformerPrefix - ) - if (overlayTransformerIndex >= 0) { - const overlayName = actionUrl.substr( - overlayTransformerIndex + overlayTransformerPrefix.length - ) - return 'Overlay ' + overlayName + ' on the map' - } - return '' - } - overlayImage = (event: any) => { - const clickedOverlayUrl = event.target.getAttribute('data-url') - const removeOverlay = clickedOverlayUrl === this.state.currentOverlayUrl - if (removeOverlay) { - this.props.model.currentOverlayUrl = undefined - this.setState({ currentOverlayUrl: '' }) - ;(wreqr as any).vent.trigger( - 'metacard:overlay:remove', - this.props.model.plain.id - ) - } else { - this.props.model.currentOverlayUrl = clickedOverlayUrl - this.setState({ currentOverlayUrl: clickedOverlayUrl }) - ;(wreqr as any).vent.trigger('metacard:overlay', this.props.model) - } - } - render() { - const hasMapActions = this.getMapActions().length !== 0 - return ( - - ) - } -} -export default hot(module)(MapActions) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/presentation.tsx deleted file mode 100644 index b356ecb1fdb..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-actions/presentation.tsx +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import styled from 'styled-components' -import { readableColor } from 'polished' - -type Props = { - overlayActions: any - currentOverlayUrl: string - overlayImage: (event: any) => void - hasMapActions: any -} - -type OverlayAction = { - url: string - description: string - overlayText: string -} - -const Header = styled.div` - text-align: left; - font-size: ${(props) => props.theme.largeFontSize}; - font-weight: bolder; - opacity: 0.8; -` - -const Divider = styled.div` - height: ${(props) => props.theme.borderRadius}; - margin: ${(props) => props.theme.minimumSpacing} 0px; - background: ${(props) => readableColor(props.theme.backgroundContent)}; - opacity: 0.1; -` - -const Actions = styled.div` - padding: 0px ${(props) => props.theme.largeSpacing}; -` - -const OverlayActionLink = styled.a` - margin-top: ${(props) => props.theme.minimumSpacing}; - cursor: pointer; - display: block; -` - -const render = (props: Props) => { - const { hasMapActions, overlayActions, overlayImage, currentOverlayUrl } = - props - - if (!hasMapActions) { - return null - } - return ( - <> -
    Map:
    - - - {overlayActions.map((overlayAction: OverlayAction) => { - return ( - - {overlayAction.overlayText} - {overlayAction.url === currentOverlayUrl ? ' (remove)' : ''} - - ) - })} - - - - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/container.tsx deleted file mode 100644 index ca1b238a325..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/container.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import withListenTo, { WithBackboneProps } from '../backbone-container' -import MapInfoPresentation from './presentation' -import { hot } from 'react-hot-loader' -import { Format, Attribute } from '.' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { LayoutContext } from '../../component/golden-layout/visual-settings.provider' -import { getUserCoordinateFormat } from '../../component/visualization/settings-helpers' -import user from '../../component/singletons/user-instance' - -type Props = { - map: Backbone.Model -} & WithBackboneProps - -const mapPropsToState = (props: Props) => { - const { map } = props - return { - coordinates: { - lat: map.get('mouseLat'), - lon: map.get('mouseLon'), - }, - attributes: getAttributes(map), - measurementState: map.get('measurementState'), - currentDistance: map.get('currentDistance'), - } -} - -const getAttributes = (map: Backbone.Model) => { - if (map.get('targetMetacard') === undefined) { - return [] - } - return StartupDataStore.Configuration.getSummaryShow() - .map((attribute: string) => { - const value = - map.get('targetMetacard').plain.metacard.properties[attribute] - return { name: attribute, value } - }) - .filter(({ value }: Attribute) => value !== undefined) -} - -const MapInfo = (props: Props) => { - const { getValue, onStateChanged, visualTitle, hasLayoutContext } = - React.useContext(LayoutContext) - const [stateProps, setStateProps] = React.useState(mapPropsToState(props)) - const [coordFormat, setCoordFormat] = React.useState('degrees') - - const { listenTo, map } = props - const coordFormatKey = `${visualTitle}-coordFormat` - - const onChange = () => setStateProps(mapPropsToState(props)) - - React.useEffect(() => { - const userDefaultFormat = getUserCoordinateFormat() - if (hasLayoutContext) { - setCoordFormat(getValue(coordFormat, userDefaultFormat)) - onStateChanged(() => { - const coordFormat = getValue(coordFormatKey, getUserCoordinateFormat()) - setCoordFormat(coordFormat) - }) - } else { - setCoordFormat(userDefaultFormat) - props.listenTo( - user.get('user').get('preferences'), - 'change:coordinateFormat', - () => setCoordFormat(getUserCoordinateFormat()) - ) - } - - listenTo( - map, - 'change:mouseLat change:mouseLon change:targetMetacard change:currentDistance', - onChange - ) - }, []) - - return -} - -export default hot(module)(withListenTo(MapInfo)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/formatting.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/formatting.tsx deleted file mode 100644 index 2498ca1c588..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/formatting.tsx +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message -import mtgeo from 'mt-geo' -import * as usngs from 'usng.js' - -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. -const converter = new usngs.Converter() -const usngPrecision = 6 - -import { Attribute, Coordinates, Format, validCoordinates } from '.' -import Common from '../../js/Common' -import { StartupDataStore } from '../../js/model/Startup/startup' - -export const formatAttribute = ({ name, value }: Attribute): string | null => { - const definition = - StartupDataStore.MetacardDefinitions.getAttributeMap()[name] - if (definition === undefined) { - return null - } - - const isDate = definition.type === 'DATE' - const displayName = definition.alias || name - - return `${displayName.toUpperCase()}: ${ - isDate ? Common.getHumanReadableDateTime(value) : value - }` -} - -const formatter = { - degrees: ({ lat, lon }: Coordinates) => - `${mtgeo.toLat(lat)} ${mtgeo.toLon(lon)}`, - decimal: ({ lat, lon }: Coordinates) => decimalComponent({ lat, lon }), - mgrs: ({ lat, lon }: Coordinates) => - lat > 84 || lat < -80 - ? 'In UPS Space' - : converter.LLtoUSNG(lat, lon, usngPrecision), - utm: ({ lat, lon }: Coordinates) => converter.LLtoUTMUPS(lat, lon), - wkt: ({ lat, lon }: Coordinates) => `POINT (${lon} ${lat})`, -} - -export const formatCoordinates = ({ - coordinates, - format, -}: { - coordinates: Coordinates - format: Format -}) => { - if (!(format in formatter)) { - throw `Unrecognized coordinate format value [${format}]` - } - - return validCoordinates(coordinates) - ? formatter[format](coordinates) - : undefined -} - -const decimalComponent = ({ lat, lon }: Coordinates) => { - const numPlaces = 6 - const latPadding = numPlaces + 4 - const lonPadding = numPlaces + 5 - - const formattedLat = lat - .toFixed(numPlaces) - .toString() - .padStart(latPadding, ' ') - - const formattedLon = lon - .toFixed(numPlaces) - .toString() - .padStart(lonPadding, ' ') - - return `${formattedLat} ${formattedLon}` -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/index.tsx deleted file mode 100644 index 1eac5228784..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export { default } from './container' - -export type Attribute = { - name: string - value: string -} -export type Coordinates = { - lat: number - lon: number -} -export const validCoordinates = ({ lat, lon }: Coordinates) => - lat !== undefined && lon !== undefined - -export type Format = 'degrees' | 'decimal' | 'mgrs' | 'utm' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/presentation.tsx deleted file mode 100644 index c8ff7fe4172..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-info/presentation.tsx +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import { Attribute, Coordinates, Format, validCoordinates } from '.' -import { formatAttribute, formatCoordinates } from './formatting' -import DistanceUtils from '../../js/DistanceUtils' - -type Props = { - format: Format - attributes: Attribute[] - coordinates: Coordinates - measurementState: String - currentDistance: number -} - -const Root = styled.div` - font-family: 'Inconsolata', 'Lucida Console', monospace; - background: ${(props) => props.theme.backgroundModal}; - display: block; - width: auto; - height: auto; - font-size: ${(props) => props.theme.minimumFontSize}; - position: absolute; - left: 0px; - bottom: 0px; - text-align: left; - padding: ${(props) => props.theme.minimumSpacing}; - max-width: 50%; -` -const CoordinateInfo = styled.div` - white-space: pre; - display: inline-block; -` -const MetacardInfo = styled.div` - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -` - -const metacardInfo = ({ attributes }: Props) => - attributes.map(({ name, value }: Attribute) => { - if (name === 'thumbnail') { - return ( -
    - -
    - ) - } else { - return ( - - {formatAttribute({ name, value })} - - ) - } - }) - -/* - * Formats the current distance value to a string with the appropriate unit of measurement. - */ -const getDistanceText = (distance: number) => { - // use meters when distance is under 1000m and convert to kilometers when ≥1000m - const distanceText = - distance < 1000 - ? `${distance.toFixed(2)} m` - : `${DistanceUtils.getDistanceFromMeters(distance, 'kilometers').toFixed( - 2 - )} km` - - return distanceText -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -const distanceInfo = (props: Props) => { - if (props.measurementState !== 'NONE') { - return ( - - distance: {getDistanceText(props.currentDistance)} - - ) - } -} - -const render = (props: Props) => { - if (!validCoordinates(props.coordinates)) { - return null - } - - const coordinates = formatCoordinates(props) - return ( - - {metacardInfo(props)} - {distanceInfo(props)} - - {coordinates} - - - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/container.tsx deleted file mode 100644 index a1890a695e3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/container.tsx +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { useState, useEffect } from 'react' -import MapSettingsPresentation from './presentation' -import { hot } from 'react-hot-loader' -import withListenTo, { - WithBackboneProps, -} from '../../react-component/backbone-container' -import Paper from '@mui/material/Paper' -import { useMenuState } from '../../component/menu-state/menu-state' -import Button from '@mui/material/Button' -import Popover from '@mui/material/Popover' -import user from '../../component/singletons/user-instance' -import SettingsIcon from '@mui/icons-material/Settings' -import { Elevations } from '../../component/theme/theme' -import { getUserCoordinateFormat } from '../../component/visualization/settings-helpers' -import { LayoutContext } from '../../component/golden-layout/visual-settings.provider' - -const MapSettings = (props: WithBackboneProps) => { - const { getValue, setValue, onStateChanged, visualTitle, hasLayoutContext } = - React.useContext(LayoutContext) - - const [coordFormat, setCoordFormat] = useState('degrees') - - const [autoPan, setAutoPan] = useState( - user.get('user').get('preferences').get('autoPan') - ) - const menuState = useMenuState() - const coordFormatKey = `${visualTitle}-coordFormat` - - useEffect(() => { - const userDefaultFormat = getUserCoordinateFormat() - if (hasLayoutContext) { - setCoordFormat(getValue(coordFormatKey, userDefaultFormat)) - onStateChanged(() => { - const coordFormat = getValue(coordFormatKey, getUserCoordinateFormat()) - setCoordFormat(coordFormat) - }) - } else { - setCoordFormat(userDefaultFormat) - props.listenTo( - user.get('user').get('preferences'), - 'change:coordinateFormat', - () => setCoordFormat(getUserCoordinateFormat()) - ) - } - - props.listenTo( - user.get('user').get('preferences'), - 'change:autoPan', - (_prefs: any, value: boolean) => setAutoPan(value) - ) - }, []) - - const updateCoordFormat = (coordinateFormat: string) => { - if (hasLayoutContext) { - setValue(coordFormatKey, coordinateFormat) - } else { - const preferences = user - .get('user') - .get('preferences') - .set({ coordinateFormat }) - preferences.savePreferences() - } - } - - const updateAutoPan = ( - _event: React.ChangeEvent, - autoPan: boolean - ) => { - const preferences = user.get('user').get('preferences').set({ autoPan }) - preferences.savePreferences() - } - - return ( - <> - - - - - - - - ) -} - -export default hot(module)(withListenTo(MapSettings)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/example-coordinates.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/example-coordinates.spec.tsx deleted file mode 100644 index 32c9ba82879..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/example-coordinates.spec.tsx +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import { expect } from 'chai' -import { mount } from 'enzyme' -import { testComponent as ExampleCoordinates } from './example-coordinates' - -describe('', () => { - const props = { - selected: 'mgrs', - examples: { mgrs: '4Q FL 23009 12331' }, - } - - it('renders', () => { - const wrapper = mount() - expect(wrapper.find({ selected: 'foo' }).length).to.equal(1) - }) - - it('displays empty example for unknown coordinate type', () => { - const wrapper = mount() - expect(wrapper.containsMatchingElement()).to.equal(true) - }) - - it('displays the correct example', () => { - const wrapper = mount() - expect( - wrapper.containsMatchingElement(4Q FL 23009 12331) - ).to.equal(true) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/example-coordinates.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/example-coordinates.tsx deleted file mode 100644 index 106a4301c82..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/example-coordinates.tsx +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'mt-g... Remove this comment to see the full error message -import mtgeo from 'mt-geo' - -type Props = { - selected: string - examples?: { [index: string]: string } -} - -const Root = styled.div` - display: block; - width: 100%; - white-space: nowrap; - padding: ${(props) => props.theme.minimumSpacing}; - position: relative; - - &.example-label, - &.example-value { - width: 50%; - display: inline-block; - vertical-align: middle; - position: relative; - } - - &.example-label { - text-align: right; - } -` - -const Label = styled.label` - .example-label & { - vertical-align: middle; - cursor: auto; - font-weight: bolder; - max-width: calc(100% - ${(props) => props.theme.minimumButtonSize}); - margin: 0px; - line-height: 1.4; - padding: ${(props) => props.theme.minimumSpacing} 0px; - min-height: ${(props) => props.theme.minimumButtonSize}; - overflow: hidden; - text-overflow: ellipsis; - word-wrap: normal; - white-space: normal; - } -` -const exampleLat = '14.94', - exampleLon = '-11.875' -const defaultExamples = { - degrees: `${mtgeo.toLat(exampleLat)} ${mtgeo.toLon(exampleLon)}`, - decimal: `${exampleLat} ${exampleLon}`, - mgrs: '4Q FL 23009 12331', - utm: '14N 1925mE 1513mN', - wkt: 'POINT (50 40)', -} as { - [index: string]: string -} - -const render = (props: Props) => { - const { selected, examples = defaultExamples } = props - const example = examples[selected] - if (typeof example === 'undefined') { - console.warn(`Unrecognized coordinate format value [${selected}]`) - } - return ( - -
    - -
    -
    - {example} -
    -
    - ) -} - -export default hot(module)(render) -export const testComponent = render diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/presentation.tsx deleted file mode 100644 index 9423b27851d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-settings/presentation.tsx +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import ExampleCoordinates from './example-coordinates' -import FormGroup from '@mui/material/FormGroup' -import FormControlLabel from '@mui/material/FormControlLabel' -import Checkbox from '@mui/material/Checkbox' -import Typography from '@mui/material/Typography' -import Select from '@mui/material/Select' -import MenuItem from '@mui/material/MenuItem' - -type Props = { - coordFormat: string - updateCoordFormat: (selected: string) => void - autoPan: boolean - updateAutoPan: ( - event: - | React.ChangeEvent - | React.KeyboardEvent, - checked: boolean - ) => void -} - -const Root = styled.div` - overflow: auto; - min-width: ${(props) => props.theme.minimumScreenSize}; - padding: ${(props) => props.theme.minimumSpacing}; -` - -const coordinateFormatOptions = [ - { label: 'Degrees, Minutes, Seconds', value: 'degrees' }, - { label: 'Decimal', value: 'decimal' }, - { label: 'MGRS', value: 'mgrs' }, - { label: 'UTM/UPS', value: 'utm' }, - { label: 'Well Known Text', value: 'wkt' }, -] - -const render = ({ - coordFormat, - updateCoordFormat, - autoPan, - updateAutoPan, -}: Props) => { - return ( - - - { - if (e.key === 'Enter') { - updateAutoPan(e, !autoPan) - } - }} - checked={autoPan} - onChange={updateAutoPan} - color="primary" - name="autoPan" - /> - } - label={Auto-Pan} - labelPlacement="start" - style={{ paddingLeft: '10px' }} - /> - - -
    - Coordinate Format - -
    - - -
    - ) -} - -export default hot(module)(render) -export const testComponent = render diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-user-settings/coordinate-settings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-user-settings/coordinate-settings.tsx deleted file mode 100644 index 70e517a98a5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-user-settings/coordinate-settings.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from 'react' -import { useState } from 'react' -import FormControl from '@mui/material/FormControl' -import FormControlLabel from '@mui/material/FormControlLabel' -import RadioGroup from '@mui/material/RadioGroup' -import Radio from '@mui/material/Radio' -import Typography from '@mui/material/Typography' -import { TypedUserInstance } from '../../component/singletons/TypedUser' -import user from '../../component/singletons/user-instance' - -const coordinateFormatOptions = [ - { label: 'Degrees, Minutes, Seconds (DMS) (Lat/Lon)', value: 'degrees' }, - { label: 'Decimal (Lat/Lon)', value: 'decimal' }, - { label: 'MGRS', value: 'mgrs' }, - { label: 'UTM/UPS (Lat/Lon)', value: 'utm' }, - { label: 'Well Known Text (Lon/Lat)', value: 'wkt' }, -] - -const CoordinateSettings = () => { - const [coordFormat, setCoordFormat] = useState( - TypedUserInstance.getCoordinateFormat() - ) - - const updateCoordFormat = (coordinateFormat: string) => { - const preferences = user.get('user').get('preferences') - setCoordFormat(coordinateFormat) - preferences.set({ coordinateFormat }) - preferences.savePreferences() - } - - return ( - - Coordinate System (CS) - updateCoordFormat(e.target.value)} - > - {coordinateFormatOptions.map((format) => ( - } - label={
    {format.label}
    } - /> - ))} -
    -
    - ) -} - -export default CoordinateSettings diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-user-settings/map-user-settings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-user-settings/map-user-settings.tsx deleted file mode 100644 index 2f3ee4606ba..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/map-user-settings/map-user-settings.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import * as React from 'react' -import CoordinateSettings from './coordinate-settings' -import MapLayerSettings from '../../component/layers/layers.view' - -export const MapUserSettings = () => { - return ( - <> - - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/index.tsx deleted file mode 100644 index 3afa8591891..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { Menu, MenuItem } from './menu' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/menu.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/menu.spec.tsx deleted file mode 100644 index ce618219b4e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/menu.spec.tsx +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import Enzyme from 'enzyme' -import Adapter from '@wojtekmaj/enzyme-adapter-react-17' -import { expect } from 'chai' -Enzyme.configure({ adapter: new Adapter() }) -import { Menu, MenuItem } from './menu' -const { shallow } = Enzyme -describe('', () => { - it('should not throw an error with no children', () => { - // @ts-expect-error ts-migrate(2741) FIXME: Property 'onChange' is missing in type '{}' but re... Remove this comment to see the full error message - shallow() - }) - it('should render the correct number of s', () => { - const wrapper = shallow( - {}}> - - - - - ) - expect(wrapper.find('MenuItem').length).to.equal(3) - }) - it('should have the correct selected', () => { - const wrapper = shallow( - {}}> - - - - - ) - expect(wrapper.find({ selected: true }).prop('value')).to.equal('two') - }) - it('should select the right on click', (done) => { - const onChange = (value: any) => { - expect(value).to.equal('one') - done() - } - const wrapper = shallow( - - - - - - ) - wrapper.find({ value: 'one' }).prop('onClick')() - }) - const table = [ - { - events: [], - state: 'two', - }, - { - events: ['ArrowDown'], - state: 'three', - }, - { - events: ['ArrowUp'], - state: 'one', - }, - { - events: ['ArrowDown', 'ArrowDown'], - state: 'one', - }, - { - events: ['ArrowDown', 'ArrowDown', 'ArrowDown'], - state: 'two', - }, - ] - const mockEvent = (code: any) => ({ - code, - preventDefault: () => {}, - }) - table.forEach(({ events, state }) => { - it(`should equal value='${state}' after ${JSON.stringify( - events - )}`, (done) => { - const onChange = (value: any) => { - expect(value).to.equal(state) - done() - } - const wrapper = shallow( - - - - - - ) - const listener = wrapper.find('DocumentListener').prop('listener') - events.forEach((event) => { - ;(listener as any)(mockEvent(event)) - }) - ;(listener as any)(mockEvent('Enter')) - }) - }) - it('should activate on hover', () => { - const wrapper = shallow( - {}}> - - - - - ) - expect(wrapper.state('active')).to.equal('two') - wrapper.find({ value: 'one' }).prop('onHover')() - expect(wrapper.state('active')).to.equal('one') - }) - it('should support multi', (done) => { - const onChange = (value: any) => { - expect(value).to.deep.equal(['one', 'two']) - done() - } - const wrapper = shallow( - - - - - - ) - const selected = wrapper.find({ value: 'one' }).prop('selected') - expect(selected).to.equal(true) - wrapper.find({ value: 'two' }).prop('onClick')() - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/menu.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/menu.tsx deleted file mode 100644 index 49dffd50b15..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/menu/menu.tsx +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { useEffect } from 'react' -import styled from 'styled-components' -import { readableColor, rgba } from 'polished' - -const mod = (n: any, m: any) => ((n % m) + m) % m - -const MenuRoot = styled.div` - max-height: 50vh; - position: relative; -` - -const after = ` - ::after { - display: inline-block; - content: '\f00c'; - font-family: FontAwesome; - font-style: normal; - position: absolute; - top: 50%; - right: 0px; - width: 2.275rem; - text-align: center; - transform: translateY(-50%); - } -` - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -const background = (props: any) => { - if (props.theme.backgroundDropdown !== undefined) { - return rgba(readableColor(props.theme.backgroundDropdown), 0.1) - } -} - -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -const foreground = (props: any) => { - if (props.theme.backgroundDropdown !== undefined) { - return readableColor(props.theme.backgroundDropdown) - } -} - -const ItemRoot = styled.div<{ - active: boolean - disabled: boolean - selected: boolean -}>` - position: relative; - padding: 0px ${({ theme }) => theme.minimumSpacing}; - padding-right: ${({ theme }) => theme.minimumButtonSize}; - box-sizing: border-box; - height: ${({ theme }) => theme.minimumButtonSize}; - line-height: ${({ theme }) => theme.minimumButtonSize}; - cursor: pointer; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */ - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - ${({ disabled }) => (disabled ? 'pointer-events : none' : '')} - ${({ theme, active, disabled }) => - active && !disabled - ? `box-shadow: inset 0px 0px 0px 1px ${theme.primaryColor};` - : ''} -${({ selected }) => (selected ? 'font-weight: bold;' : '')} -${({ selected, disabled }) => (selected && !disabled ? after : '')} -background: ${(props) => - props.active && !props.disabled ? background(props) : 'inherit'}; - color: ${(props) => (props.disabled ? 'lightgrey' : foreground)}; -` - -const DocumentListener = (props: any) => { - useEffect(() => { - document.addEventListener(props.event, props.listener) - return () => { - document.removeEventListener(props.event, props.listener) - } - }, []) - return null -} - -interface MenuProps { - /** Currently selected value of the provided ``. */ - value?: any - /** - * Determines if multiple items can be selected - * - * @default false - */ - multi?: boolean - /** - * MenuItems - */ - children?: any - /** Optional value change handler. */ - onChange: (value: any) => void - /** Optional className to style root menu element. */ - className?: string - - onClose?: () => void -} - -type MenuState = { - active: boolean -} - -export class Menu extends React.Component { - constructor(props: MenuProps) { - super(props) - this.state = { active: this.chooseActive() } - this.onKeyDown = this.onKeyDown.bind(this) - } - chooseActive() { - const selection = this.props.value - const active = this.state ? this.state.active : undefined - const itemNames = this.getChildren().map((child: any) => child.props.value) - if (itemNames.includes(active)) { - return active - } else if (itemNames.includes(selection)) { - return selection - } else if (itemNames.length > 0) { - return itemNames[0] - } else { - return undefined - } - } - onHover(active: any) { - this.setState({ active }) - } - getChildren() { - return this.getChildrenFrom(this.props.children) - } - getChildrenFrom(children: any) { - return React.Children.toArray(children).filter((o: any) => o) - } - onShift(offset: any) { - const values = this.getChildren().map(({ props }: any) => props.value) - const index = values.findIndex((value: any) => value === this.state.active) - const next = mod(index + offset, values.length) - this.onHover(values[next]) - } - getValue(value: any) { - if (this.props.multi) { - if (this.props.value.indexOf(value) !== -1) { - return this.props.value.filter((v: any) => v !== value) - } else { - return this.props.value.concat(value) - } - } else { - return value - } - } - onChange(value: any) { - this.props.onChange(this.getValue(value)) - - if (!this.props.multi && typeof this.props.onClose === 'function') { - this.props.onClose() - } - } - onKeyDown(e: any) { - switch (e.code) { - case 'ArrowUp': - e.preventDefault() - this.onShift(-1) - break - case 'ArrowDown': - e.preventDefault() - this.onShift(1) - break - case 'Enter': - e.preventDefault() - const { active } = this.state - if (active !== undefined) { - this.onChange(active) - } - break - } - } - componentDidUpdate(previousProps: MenuProps) { - if (previousProps.children !== this.props.children) { - this.setState({ active: this.chooseActive() }) - } - } - render() { - const { multi, value, children } = this.props - - const childrenWithProps = this.getChildrenFrom(children).map( - (child: any) => { - return React.cloneElement(child, { - selected: multi - ? value.indexOf(child.props.value) !== -1 - : value === child.props.value, - onClick: () => this.onChange(child.props.value), - active: this.state.active === child.props.value, - onHover: () => this.onHover(child.props.value), - ...child.props, - }) - } - ) - - return ( - - {childrenWithProps} - - - ) - } -} - -type MenuItemProps = { - /** A value to represent the current Item */ - value?: any - /** - * Children to display for menu item. - * - * @default value - */ - children?: any - /** Optional styles for root element. */ - style?: object - selected?: any - onClick?: any - active?: any - disabled?: any - onHover?: any -} - -export const MenuItem = (props: MenuItemProps) => { - const { - value, - children, - selected, - onClick, - active, - onHover, - style, - disabled, - } = props - - return ( - onHover(value)} - onFocus={() => onHover(value)} - tabIndex={0} - onClick={() => onClick(value)} - disabled={disabled} - > - {children || value} - - ) -} - -MenuItem.displayName = 'MenuItem' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/container.tsx deleted file mode 100644 index 89e1f023e30..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/container.tsx +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import _ from 'underscore' -import MetacardActionsPresentation from './presentation' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { OverridableGetColumnOrder, aliasMap } from '../utils/export' - -type Props = { - result: LazyQueryResult -} - -const MetacardActions = (props: Props) => { - const model = props.result - - const exportActions = _.sortBy( - model.getExportActions().map((action) => ({ - url: - action.url + - `&columnOrder=${OverridableGetColumnOrder.get()()}&aliases=${aliasMap}`, - title: action.displayName, - })), - (action: any) => action.title.toLowerCase() - ) - const otherActions = _.sortBy( - model.getOtherActions().map((action) => ({ - url: action.url, - title: action.title, - })), - (action: any) => action.title.toLowerCase() - ) - - return ( - - ) -} - -export default hot(module)(MetacardActions) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/presentation.tsx deleted file mode 100644 index f84f67c606b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-actions/presentation.tsx +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import styled from 'styled-components' -import { readableColor } from 'polished' -import MapActions from '../map-actions' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' - -type Props = { - model: LazyQueryResult - exportActions: any - otherActions: any -} - -const Root = styled.div` - overflow: auto; - height: 100%; - padding: 0px ${(props) => props.theme.largeSpacing}; -` -const Header = styled.div` - text-align: left; - font-size: ${(props) => props.theme.largeFontSize}; - font-weight: bolder; - opacity: 0.8; -` - -const MapActionsDiv = styled.div` - margin-top: ${(props) => props.theme.minimumSpacing}; -` -const Divider = styled.div` - height: ${(props) => props.theme.borderRadius}; - margin: ${(props) => props.theme.minimumSpacing} 0px; - background: ${(props) => readableColor(props.theme.backgroundContent)}; - opacity: 0.1; -` - -const Actions = styled.div` - padding: 0px ${(props) => props.theme.largeSpacing}; -` - -const ActionLink = styled.a` - margin-top: ${(props) => props.theme.minimumSpacing}; - cursor: pointer; - display: block; -` - -const ExportActions = (props: any) => { - const exportActions = props.exportActions - return ( - <> -
    Export as:
    - - - {exportActions.map((exportAction: any) => { - return ( - - {exportAction.title} - - ) - })} - - - ) -} - -const OtherActions = (props: any) => { - const otherActions = props.otherActions - if (otherActions.length === 0) { - return null - } - return ( - <> -
    Various:
    - - - {otherActions.map((otherAction: any) => { - return ( - - {otherAction.title} - - ) - })} - - - - ) -} - -const render = (props: Props) => { - const { exportActions, otherActions, model } = props - return ( - - - - - - - - - - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/container.tsx deleted file mode 100644 index 360b07a56ad..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/container.tsx +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import withListenTo, { WithBackboneProps } from '../backbone-container' -import fetch from '../utils/fetch' -import MetacardArchivePresentation from './presentation' -import wreqr from '../../js/wreqr' -type Props = { - results: LazyQueryResult[] -} & WithBackboneProps -type State = { - collection: LazyQueryResult[] - isDeleted: boolean - loading: boolean -} -class MetacardArchive extends React.Component { - constructor(props: Props) { - super(props) - const collection = props.results - const isDeleted = collection.some((result) => { - return result.isDeleted() - }) - - this.state = { - collection, - isDeleted, - loading: false, - } - } - onArchiveConfirm = async () => { - const body = JSON.stringify( - this.state.collection.map((result) => { - return result.plain.id - }) - ) - this.setState({ loading: true }) - const res = await fetch('./internal/metacards', { - method: 'DELETE', - headers: { 'Content-Type': 'application/json' }, - body, - }) - if (!res.ok) { - this.setState({ loading: false }) - ;(wreqr as any).vent.trigger('snack', { - message: 'Unable to archive the selected item(s).', - snackProps: { - alertProps: { - severity: 'error', - }, - }, - }) - return - } - setTimeout(() => { - this.setState({ isDeleted: true, loading: false }) - this.state.collection.forEach(function (result) { - result.plain.metacard.properties['metacard-tags'] = ['deleted'] - result.syncWithPlain() - }) - this.refreshResults() - }, 2000) - } - onRestoreConfirm = async () => { - this.setState({ loading: true }) - const promises = this.state.collection.map((result) => { - const metacardDeletedId = - result.plain.metacard.properties['metacard.deleted.id'] - const metacardDeletedVersion = - result.plain.metacard.properties['metacard.deleted.version'] - const storeId = result.plain.metacard.properties['source-id'] - return fetch( - `./internal/history/revert/${metacardDeletedId}/${metacardDeletedVersion}/${storeId}` - ) - }) - Promise.all(promises).then((responses: any) => { - const isResponseOk = responses.every((resp: any) => { - return resp.ok - }) - if (!isResponseOk) { - this.setState({ loading: false }) - ;(wreqr as any).vent.trigger('snack', { - message: 'Unable to restore the selected item(s).', - snackProps: { - alertProps: { - severity: 'error', - }, - }, - }) - } - this.state.collection.map((result) => { - result.refreshDataOverNetwork() - }) - setTimeout(() => { - this.setState({ isDeleted: false, loading: false }) - }, 2000) - }) - } - refreshResults = () => { - this.state.collection.forEach((result) => { - result.refreshDataOverNetwork() - }) - } - render() { - const { isDeleted, loading } = this.state - return ( - - ) - } -} -export default hot(module)(withListenTo(MetacardArchive)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/presentation.tsx deleted file mode 100644 index bf12af6144e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-archive/presentation.tsx +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import Button from '@mui/material/Button' -import ProgressButton from '../progress-button' -import { useDialog } from '../../component/dialog' -import DialogActions from '@mui/material/DialogActions' -import DialogContent from '@mui/material/DialogContent' -import DialogContentText from '@mui/material/DialogContentText' -import DialogTitle from '@mui/material/DialogTitle' -import useSnack from '../../component/hooks/useSnack' - -type Props = { - onArchiveConfirm: () => Promise - onRestoreConfirm: () => Promise - isDeleted: boolean - loading: boolean -} - -const render = (props: Props) => { - const { onArchiveConfirm, onRestoreConfirm, isDeleted, loading } = props - const addSnack = useSnack() - const dialogContext = useDialog() - return ( - <> - {isDeleted ? 'Restore' : 'Delete'} Item(s) - - - Are you sure you want to {isDeleted ? 'restore' : 'delete'}? - - - Doing so will {isDeleted ? 'include' : 'remove'} the item(s){' '} - {isDeleted ? 'in' : 'from'} future search results. - - - - - { - try { - dialogContext.setProps({ - onClose: (_event, reason) => { - if ( - reason === 'backdropClick' || - reason === 'escapeKeyDown' - ) { - return - } - dialogContext.setProps({ - open: false, - }) - }, - }) - isDeleted ? await onRestoreConfirm() : await onArchiveConfirm() - addSnack(`Successfully ${isDeleted ? `restored` : `deleted`}`) - } catch (err) { - console.log('Error: ', err) - addSnack( - `An error occurred while trying to ${ - isDeleted ? 'restore' : 'delete' - }.`, - { - status: 'error', - } - ) - } finally { - if (!loading) dialogContext.setProps({ open: false }) - } - }} - variant="contained" - color="primary" - disabled={loading} - loading={loading} - > - {isDeleted ? 'Restore' : 'Delete'} - - - - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/container.tsx deleted file mode 100644 index 5afa9de5f91..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/container.tsx +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { hot } from 'react-hot-loader' -import * as React from 'react' -import fetch from '../utils/fetch' -import moment from 'moment' -import MetacardHistoryPresentation from './presentation' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { TypedUserInstance } from '../../component/singletons/TypedUser' -import wreqr from '../../js/wreqr' -type Props = { - result: LazyQueryResult -} -type State = { - history: any - selectedVersion: any - loading: boolean -} -class MetacardHistory extends React.Component { - constructor(props: Props) { - super(props) - this.model = props.result - this.state = { - history: [], - selectedVersion: undefined, - loading: true, - } - } - model: LazyQueryResult - componentDidMount() { - this.loadData() - } - getSourceId() { - const metacardSourceId = this.model.plain.metacard.properties['source-id'] - const harvestedSourceId = - this.model.plain.metacard.properties['ext.harvested-from'] - return harvestedSourceId || metacardSourceId - } - loadData() { - setTimeout(async () => { - const id = this.model.plain.id - const res = await fetch(`./internal/history/${id}/${this.getSourceId()}`) - if (!res.ok || res.status === 204) { - this.setState({ history: [], loading: false }) - return - } - const history = await res.json() - history.sort((historyItem1: any, historyItem2: any) => { - return ( - (moment.unix(historyItem2.versioned.seconds) as unknown as number) - - (moment.unix(historyItem1.versioned.seconds) as unknown as number) - ) - }) - history.forEach((historyItem: any, index: any) => { - historyItem.niceDate = TypedUserInstance.getMomentDate( - moment - .unix(historyItem.versioned.seconds) - .valueOf() as unknown as string - ) - historyItem.versionNumber = history.length - index - }) - this.setState({ history, loading: false }) - }, 1000) - } - onClick = (event: any) => { - const selectedVersion = event.currentTarget.getAttribute('data-id') - this.setState({ selectedVersion }) - } - revertToSelectedVersion = async () => { - this.setState({ loading: true }) - const id = this.model.plain.id - const revertId = this.state.selectedVersion - const res = await fetch( - `./internal/history/revert/${id}/${revertId}/${this.getSourceId()}` - ) - if (!res.ok) { - this.setState({ loading: false }) - ;(wreqr as any).vent.trigger('snack', { - message: 'Unable to revert to the selected version', - snackProps: { - alertProps: { - severity: 'error', - }, - }, - }) - return - } - this.model.plain.metacard.properties['metacard-tags'] = ['revision'] - this.model.syncWithPlain() - this.model.refreshDataOverNetwork() - setTimeout(() => { - //let solr flush - this.model.syncWithPlain() - if ( - this.model.plain.metacard.properties['metacard-tags'].indexOf( - 'revision' - ) >= 0 - ) { - ;(wreqr as any).vent.trigger('snack', { - message: `Waiting on Reverted Data: It's taking an unusually long time for the reverted data to come back. The item will be put in a revision-like state (read-only) until data returns.`, - snackProps: { - alertProps: { - severity: 'warn', - }, - }, - }) - } - this.loadData() - }, 2000) - } - render() { - const { history, selectedVersion, loading } = this.state - return ( - - ) - } -} -export default hot(module)(MetacardHistory) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/presentation.tsx deleted file mode 100644 index 0273fff47a6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-history/presentation.tsx +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import Button from '@mui/material/Button' -import styled from 'styled-components' -import LinearProgress from '@mui/material/LinearProgress' - -type Props = { - onClick: (event: any) => void - revertToSelectedVersion: () => void - history: any - selectedVersion: any - loading: boolean - canEdit: boolean -} - -const Root = styled.div` - overflow: auto; - height: 100%; - - .metacardHistory-cell { - float: left; - padding: 10px; - text-align: center; - } - - ${(props) => { - if (props.theme.screenBelow(props.theme.smallScreenSize)) { - return ` - .metacardHistory-body { - max-height: none; - overflow: auto; - } - - .metacardHistory-cell { - display: block; - width: 100%; - } - ` - } - return - }}; -` - -const Header = styled.div` - height: 50px; -` - -const Row = styled.div` - transition: padding ${(props) => props.theme.transitionTime} linear; -` - -// prettier-ignore -const Body = styled.div` - max-height: calc(100% - ${props => props.theme.minimumButtonSize}*2 - 20px - ${props => props.theme.minimumSpacing}); - overflow: auto; - overflow-x: hidden; - width: 100%; - cursor: pointer; - display: table; - content: " "; - > *, - > * > td { - display: inline-block; - width: 100%; - border-top: 1px solid rgba(255, 255, 255, 0.1); - border-bottom: 1px solid rgba(255, 255, 255, 0.1); - } - > *:hover, - > *:hover > td { - border-top: 1px solid rgba(255, 255, 255, 0.2); - border-bottom: 1px solid rgba(255, 255, 255, 0.2); - } -` - -const Version = styled.div` - width: 20%; -` - -const Date = styled.div` - width: 50%; -` - -const Modified = styled.div` - width: 30%; - overflow: hidden; - text-overflow: ellipsis; -` - -const MetacardHistory = (props: Props) => { - const { - onClick, - revertToSelectedVersion, - history, - selectedVersion, - loading, - canEdit, - } = props - return loading ? ( - - ) : ( - <> - -
    - - Version - Date - Modified by - -
    - - {history.map((historyItem: any) => { - return ( - - - {historyItem.versionNumber} - - - {historyItem.niceDate} - - - {historyItem.editedBy} - - - ) - })} - - {selectedVersion && canEdit && ( - - )} -
    - - ) -} - -export default hot(module)(MetacardHistory) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/archive-interaction.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/archive-interaction.tsx deleted file mode 100644 index 4bad103ffa4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/archive-interaction.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import MetacardArchive from '../metacard-archive' -import { MetacardInteractionProps } from '.' -import { MetacardInteraction } from './metacard-interactions' -import { hot } from 'react-hot-loader' -import { useDialog } from '../../component/dialog' -import { Divider } from './metacard-interactions' -import { TypedUserInstance } from '../../component/singletons/TypedUser' - -export const ArchiveAction = (props: MetacardInteractionProps) => { - if (!props.model || props.model.length <= 0) { - return null - } - - const isDeleteAction = props.model.some((result) => { - return !result.isDeleted() - }) - - const canPerformOnAll = props.model.every((result) => { - return ( - TypedUserInstance.isAdmin(result) && - !result.isRemote() && - result.isDeleted() !== isDeleteAction - ) - }) - - if (!canPerformOnAll) { - return null - } - - const dialogContext = useDialog() - return ( - <> - - { - props.onClose() - if (props.model) { - dialogContext.setProps({ - children: , - open: true, - }) - } - }} - icon={isDeleteAction ? 'fa fa-trash' : 'fa fa-undo'} - text={isDeleteAction ? 'Delete' : 'Restore'} - help={ - isDeleteAction ? 'Move item(s) to trash' : 'Move item(s) from trash' - } - /> - - ) -} - -export default hot(module)(ArchiveAction) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/download-interaction.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/download-interaction.tsx deleted file mode 100644 index a5c751d046b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/download-interaction.tsx +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { MetacardInteractionProps } from '.' -import { MetacardInteraction } from './metacard-interactions' -import { hot } from 'react-hot-loader' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { useDialog } from '../../component/dialog' -import { useDownloadComponent } from '../../component/download/download' - -const isDownloadable = (model: LazyQueryResult[]): boolean => { - return model.some((result) => result.getDownloadUrl()) -} - -const DownloadProduct = ({ model }: MetacardInteractionProps) => { - const { setProps } = useDialog() - const DownloadComponent = useDownloadComponent() - if (!model || model.length === 0) { - return null - } - if (!isDownloadable(model)) { - return null - } - return ( - { - setProps({ - open: true, - children: , - }) - }} - > - {isRemoteResourceCached(model) && ( - - Local - - )} - - ) -} - -const isRemoteResourceCached = (model: LazyQueryResult[]): boolean => { - if (!model || model.length <= 0) return false - - return ( - model[0].isResourceLocal && - model[0].plain.metacard.properties['source-id'] !== - StartupDataStore.Sources.localSourceId - ) -} - -export default hot(module)(DownloadProduct) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.tsx deleted file mode 100644 index 2825f05a747..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/expand-interaction.spec.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react' -import { HashRouter as Router } from 'react-router-dom' -import ExpandInteraction from './expand-interaction' -import Enzyme, { mount } from 'enzyme' -import Adapter from '@wojtekmaj/enzyme-adapter-react-17' -Enzyme.configure({ adapter: new Adapter() }) -import { expect } from 'chai' - -describe('smoke test', () => { - it('it handles undefined', () => { - const wrapper = mount( - - {}} model={undefined} /> - - ) - expect(wrapper.html()).to.eq('') - }) - - it('it handles empty array', () => { - const wrapper = mount( - - {}} model={[]} /> - - ) - expect(wrapper.html()).to.eq('') - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/expand-interaction.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/expand-interaction.tsx deleted file mode 100644 index f2dbc235a91..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/expand-interaction.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { MetacardInteractionProps } from '.' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import { Link } from '../../component/link/link' -import { Divider } from './metacard-interactions' - -const ExpandMetacard = (props: MetacardInteractionProps) => { - if (!props.model || props.model.length !== 1) { - return null - } - let id = props.model[0].plain.id - - const to = - props.model[0].plain.metacardType === 'metacard.query' - ? `/search/${id}` - : `/metacards/${id}` - - return ( - <> - - - - ) -} - -export default hot(module)(ExpandMetacard) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/export-interaction.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/export-interaction.tsx deleted file mode 100644 index 47383e5a793..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/export-interaction.tsx +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import ResultsExport from '../results-export' -import { MetacardInteractionProps } from '.' -import { MetacardInteraction } from './metacard-interactions' -import { hot } from 'react-hot-loader' -import { getExportResults } from '../utils/export/export' -import { useDialogState } from '../../component/hooks/useDialogState' -import Button from '@mui/material/Button' -import Divider from '@mui/material/Divider' -import { Dialog, DialogActions, DialogTitle } from '@mui/material' - -export const ExportActions = (props: MetacardInteractionProps) => { - const [exportSuccessful, setExportSuccessful] = React.useState(false) - const [loading, setLoading] = React.useState(false) - const exportDialogState = useDialogState() - - if (!props.model || props.model.length <= 0) { - return null - } - if (!props.model[0].parent) { - return null - } - return ( - <> - { - if (reason === 'backdropClick') { - return - } - exportDialogState.MuiDialogProps.onClose(event, reason) - }} - > - -
    - Export -
    -
    - - { - exportDialogState.handleClose() - }} - /> -
    - - {exportSuccessful && ( - - -
    - Export Successful! -
    -
    - - -
    - -
    -
    -
    - )} - - { - props.onClose() - exportDialogState.handleClick() - }} - icon="fa fa-share" - text="Export as" - help="Starts the export process for the selected results." - /> - - ) -} - -export default hot(module)(ExportActions) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/index.tsx deleted file mode 100644 index c235a253992..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/index.tsx +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { Divider } from './metacard-interactions' -import ExtensionPoints from '../../extension-points' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' - -export type MetacardInteractionProps = { - model?: LazyQueryResult[] - onClose: () => void -} - -export type Result = { - get: (key: any) => any - isResource: () => boolean - isRevision: () => boolean - isDeleted: () => boolean - isRemote: () => boolean -} - -const MetacardInteractions = (props: MetacardInteractionProps) => { - return ( - <> - {ExtensionPoints.metacardInteractions.map((Component, i) => { - const componentName = Component.toString() - const key = componentName + '-' + i - return - })} - - ) -} - -const Component = MetacardInteractions - -export default hot(module)(Component) - -export { Divider } - -export { MetacardInteraction } from './metacard-interactions' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/metacard-interactions.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/metacard-interactions.tsx deleted file mode 100644 index 06f3cf9a30f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/metacard-interactions.tsx +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import MuiDivider from '@mui/material/Divider' - -export const Divider = () => { - return ( - - ) -} - -const InteractionIcon = styled.div` - text-align: center; - width: ${(props) => props.theme.minimumButtonSize}; - display: inline-block; - line-height: ${(props) => props.theme.minimumButtonSize}; - height: ${(props) => props.theme.minimumButtonSize}; -` - -const InteractionText = styled.div` - line-height: ${(props) => props.theme.minimumButtonSize}; - height: ${(props) => props.theme.minimumButtonSize}; - display: inline-block; -` - -const Interaction = styled.div` - line-height: ${(props) => props.theme.minimumButtonSize}; - height: ${(props) => props.theme.minimumButtonSize}; - white-space: nowrap; - padding: ${(props) => `0px ${props.theme.minimumSpacing}`}; - cursor: pointer; - overflow: hidden; -` - -type MetacardInteractionProps = { - help: string - icon: string - text: string - onClick: (props: any) => void - children?: any -} - -export const MetacardInteraction = (props: MetacardInteractionProps) => { - return ( - props.onClick(props)} - > - - {props.text} - {props.children} - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.tsx deleted file mode 100644 index f783b9cdd67..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-interactions/overwrite-interaction.tsx +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { MetacardInteractionProps } from '.' -import { MetacardInteraction } from './metacard-interactions' -import { hot } from 'react-hot-loader' -import { useDialog } from '../../component/dialog' -import { TypedUserInstance } from '../../component/singletons/TypedUser' -import { MetacardOverwrite } from '../../component/metacard-overwrite/metacard-overwrite.view' - -export const OverwriteAction = (props: MetacardInteractionProps) => { - if (!props.model || props.model.length !== 1) { - return null - } - - const result = props.model[0] - - if ( - result.isDeleted() || - result.isRevision() || - result.isRemote() || - !TypedUserInstance.canWrite(result) - ) { - return null - } - - const dialogContext = useDialog() - return ( - { - props.onClose() - if (props.model) { - dialogContext.setProps({ - children: ( - - ), - open: true, - }) - } - }} - icon="fa fa-files-o" - text={'Overwrite'} - help="This will overwrite the item content. To restore a previous content, you can click on 'File' in the toolbar, and then click 'Restore Archived Items'." - /> - ) -} - -export default hot(module)(OverwriteAction) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/container.tsx deleted file mode 100644 index 9731961ccc0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/container.tsx +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { hot } from 'react-hot-loader' -import * as React from 'react' -import fetch from '../utils/fetch' -import MetacardQualityPresentation from './presentation' -import { LazyQueryResult } from '../../js/model/LazyQueryResult/LazyQueryResult' -import wreqr from '../../js/wreqr' -type Props = { - result: LazyQueryResult -} -type State = { - attributeValidation: any - metacardValidation: any - loading: boolean -} -class MetacardQuality extends React.Component { - constructor(props: Props) { - super(props) - this.model = props.result - this.state = { - attributeValidation: [], - metacardValidation: [], - loading: true, - } - } - model: LazyQueryResult - componentDidMount() { - setTimeout(() => { - const metacardId = this.model.plain.id - const storeId = this.model.plain.metacard.properties['source-id'] - const attributeValidationRes = fetch( - `./internal/metacard/${metacardId}/${storeId}/attribute/validation` - ) - const metacardValidationRes = fetch( - `./internal/metacard/${metacardId}/${storeId}/validation` - ) - Promise.all([attributeValidationRes, metacardValidationRes]).then( - async (responses) => { - const attributeValidation = await this.getData( - responses[0], - 'Attribute' - ) - let metacardValidation = await this.getData(responses[1], 'Metacard') - this.checkForDuplicate(metacardValidation) - this.setState({ - attributeValidation, - metacardValidation, - loading: false, - }) - } - ) - }, 1000) - } - getData = (res: any, type: string) => { - if (!res.ok) { - ;(wreqr as any).vent.trigger('snack', { - message: `Unable to retrieve ${type} Validation Issues`, - snackProps: { - alertProps: { - severity: 'warn', - }, - }, - }) - return [] - } else { - return res.json() - } - } - checkForDuplicate = (metacardValidation: any) => { - metacardValidation.forEach((validationIssue: any) => { - if ( - validationIssue.message.startsWith('Duplicate data found in catalog') - ) { - var idRegEx = new RegExp('{(.*?)}') - var excutedregex = idRegEx.exec(validationIssue.message) - if (excutedregex) { - validationIssue.duplicate = { - ids: excutedregex[1].split(', '), - message: validationIssue.message.split(excutedregex[1]), - } - } - } - }) - } - render() { - const { attributeValidation, metacardValidation, loading } = this.state - return ( - - ) - } -} -export default hot(module)(MetacardQuality) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/presentation.tsx deleted file mode 100644 index cca4f915747..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/metacard-quality/presentation.tsx +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import styled from 'styled-components' -import LinearProgress from '@mui/material/LinearProgress' - -type Props = { - metacardValidation: any - attributeValidation: any - loading: boolean -} - -const Header = styled.h4` - text-align: left; - padding: ${(props) => props.theme.minimumSpacing}; -` - -const Root = styled.div` - overflow: auto; - - table { - width: 100%; - text-align: center; - margin-bottom: 40px; - } - - th { - width: 33%; - text-align: center; - } - - tr:nth-of-type(even) { - background: rgba(0, 0, 0, 0.1); - } - - th, - td { - padding: 10px; - } - - td + td { - border-left: 1px solid rgba(100, 100, 100, 0.3); - } - - tbody { - border-top: 1px solid rgba(100, 100, 100, 0.3); - } -` - -const MetacardValidation = (props: any) => { - const metacardValidation = props.metacardValidation - return ( - <> -
    Metacard Validation Issues
    - - - - - - - - {metacardValidation.map((validation: any, i: number) => { - return ( - - - - {validation.duplicate ? ( - - ) : ( - - )} - - ) - })} - -
    AttributeSeverityMessage
    - {validation.attributes.map((attribute: string, j: number) => { - return
    {attribute}
    - })} -
    {validation.severity} - {validation.duplicate.message[0]} - {validation.duplicate.ids.map((id: any, index: number) => { - return ( - - {id} - {index !== validation.duplicate.ids.length - 1 - ? ', ' - : ''} - - ) - })} - {validation.duplicate.message[1]} - {validation.message}
    - - ) -} - -const AttributeValidation = (props: any) => { - const attributeValidation = props.attributeValidation - return ( - <> -
    Attribute Validation Issues
    - - - - - - - - {attributeValidation.map((validation: any, i: number) => { - return ( - - - - - - ) - })} - -
    AttributeWarningsErrors
    {validation.attribute} - {validation.warnings.map((warning: string, j: number) => { - return
    {warning}
    - })} -
    - {validation.errors.map((error: string, j: number) => { - return
    {error}
    - })} -
    - - ) -} - -const render = (props: Props) => { - const { metacardValidation, attributeValidation, loading } = props - return loading ? ( - <> - - - ) : ( - <> - - {metacardValidation.length > 0 ? ( - - ) : ( -
    No Metacard Validation Issues to Report
    - )} - - {attributeValidation.length > 0 ? ( - - ) : ( -
    No Attribute Validation Issues to Report
    - )} -
    - - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/popup-preview/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/popup-preview/index.tsx deleted file mode 100644 index 9c1a0526467..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/popup-preview/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export { default } from './popup-preview' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/popup-preview/popup-preview.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/popup-preview/popup-preview.tsx deleted file mode 100644 index 883ad65734a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/popup-preview/popup-preview.tsx +++ /dev/null @@ -1,315 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import styled from 'styled-components' -import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook' - -export type MetacardType = { - getPreview: Function - getTitle: Function - id: String - toJSON: () => any -} - -export type LocationType = { - left: number - top: number -} - -const Root = styled.div` - font-family: 'Inconsolata', 'Lucida Console', monospace; - background: ${(props) => props.theme.backgroundModal}; - display: block; - width: auto; - height: auto; - font-size: ${(props) => props.theme.mediumFontSize}; - position: absolute; - text-align: left; - padding: 4px; - max-height: 290px; - max-width: 50%; - transform: translate(-51.25%, -100%); - - &::before { - top: 100%; - content: ' '; - border-top: 15px solid ${(props) => props.theme.backgroundModal}; - border-left: 10px solid transparent; - border-right: 10px solid transparent; - height: 0; - width: 0; - left: 50%; - position: absolute; - pointer-events: none; - } -` - -const Title = styled.div` - font-size: 20px; - margin: 0; - padding: 2px 6px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-family: 'Open Sans', arial, sans-serif; -` - -const Preview = styled.div` - position: relative; - min-width: 200px; - height: 100%; - min-height: 15px; - max-height: 250px; - padding: 2px; - background-color: ${(props) => props.theme.backgroundContent}; - border: 1px solid; - overflow-y: auto; - overflow-x: auto; - text-overflow: ellipsis; -` - -const PreviewText = styled.p` - font-family: 'Open Sans', arial, sans-serif; - font-size: 14px; - padding: 2px 4px; - white-space: pre-line; -` - -const ClusterList = styled.ul` - margin: 1px; - padding: 1px; - border: 1px solid; -` - -const ClusterTitle = styled.li` - font-size: 18px; - margin: 0; - padding: 2px 6px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-family: 'Open Sans', arial, sans-serif; - - &:hover { - background-color: ${(props) => props.theme.backgroundSlideout}; - } -` - -const NO_PREVIEW = 'No preview text available.' -const STATUS_OK = 200 - -const TOP_OFFSET = 60 - -const DRAG_SENSITIVITY = 10 - -type Props = { - map: any - selectionInterface: { - getSelectedResults: () => { - models: MetacardType[] - } & Array - getActiveSearchResults: () => { - models: MetacardType[] - } & Array - clearSelectedResults: () => void - addSelectedResult: (metacard: MetacardType) => void - } - mapModel: any -} - -const getLeft = (location: undefined | LocationType) => { - return location ? location.left + 'px' : 0 -} - -const getTop = (location: undefined | LocationType) => { - return location ? location.top - TOP_OFFSET + 'px' : 0 -} - -const extractPreviewText = (responseHtml: string) => { - const htmlElement = document.createElement('html') - htmlElement.innerHTML = responseHtml - const bodyElement = htmlElement!.querySelector('body') - if (bodyElement) { - bodyElement.innerHTML = bodyElement.innerHTML.replace(//gm, '\n') - return bodyElement.innerText - } - return NO_PREVIEW -} - -const getPreviewText = ({ - targetMetacard, - setPreviewText, -}: { - targetMetacard: MetacardType | undefined - setPreviewText: React.Dispatch> -}) => { - if (targetMetacard) { - const url = targetMetacard.getPreview() as string - const xhr = new XMLHttpRequest() - xhr.addEventListener('load', () => { - if (xhr.status === STATUS_OK) { - const previewText = extractPreviewText(xhr.responseText) - setPreviewText(previewText !== NO_PREVIEW ? previewText : undefined) - } - }) - - xhr.open('GET', url) - xhr.send() - } else { - setPreviewText(undefined) - } -} - -/** - * Get the pixel location from a metacard(s) - * returns { left, top } relative to the map view - */ -const getLocation = (map: any, target: MetacardType[]) => { - if (target) { - const location = map.getWindowLocationsOfResults(target) - const coordinates = location ? location[0] : undefined - return coordinates - ? { left: coordinates[0], top: coordinates[1] } - : undefined - } - return -} - -const HookPopupPreview = (props: Props) => { - const { map, selectionInterface } = props - const [location, setLocation] = React.useState( - undefined as undefined | LocationType - ) - const dragRef = React.useRef(0) - const [open, setOpen] = React.useState(false) - const [previewText, setPreviewText] = React.useState( - undefined as undefined | string - ) - const { listenTo } = useBackbone() - - const getTarget = () => { - return selectionInterface.getSelectedResults() - } - - let popupAnimationFrameId: any - const startPopupAnimating = (map: any) => { - if (getTarget().length !== 0) { - popupAnimationFrameId = window.requestAnimationFrame(() => { - const location = getLocation(map, getTarget()) - setLocation(location) - startPopupAnimating(map) - }) - } - } - - const handleCameraMoveEnd = () => { - if (getTarget().length !== 0) { - window.cancelAnimationFrame(popupAnimationFrameId) - } - } - - React.useEffect(() => { - listenTo( - selectionInterface.getSelectedResults(), - 'reset add remove', - () => { - if (selectionInterface.getSelectedResults().length === 1) { - getPreviewText({ - targetMetacard: selectionInterface.getSelectedResults().models[0], - setPreviewText, - }) - } - setLocation(getLocation(map, getTarget())) - if (selectionInterface.getSelectedResults().length !== 0) { - setOpen(true) - } - } - ) - map.onMouseTrackingForPopup( - () => { - dragRef.current = 0 - }, - () => { - dragRef.current += 1 - }, - (_event: any, mapTarget: any) => { - if (DRAG_SENSITIVITY > dragRef.current) { - setOpen(mapTarget.mapTarget !== undefined) - } - } - ) - - map.onCameraMoveStart(() => { - startPopupAnimating(map) - }) - map.onCameraMoveEnd(() => { - handleCameraMoveEnd() - }) - - return () => { - window.cancelAnimationFrame(popupAnimationFrameId) - } - }, []) - - if (!open) { - return null - } - - return ( - - {(function () { - if (selectionInterface.getSelectedResults().length === 1) { - const metacardJSON = selectionInterface - .getSelectedResults() - .models[0].toJSON() - return ( - <> - {metacardJSON.metacard.properties.title} - {previewText && ( - - {previewText} - - )} - - ) - } else if (selectionInterface.getSelectedResults().length > 1) { - return ( - - {selectionInterface - .getSelectedResults() - .map((clusterModel: any) => { - return ( - { - selectionInterface.clearSelectedResults() - selectionInterface.addSelectedResult(clusterModel) - }} - > - {clusterModel.toJSON().metacard.properties.title} - - ) - })} - - ) - } - return - })()} - - ) -} - -export default hot(module)(HookPopupPreview) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/portal/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/portal/index.tsx deleted file mode 100644 index 1320683151e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/portal/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './portal' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/portal/portal.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/portal/portal.tsx deleted file mode 100644 index d17b0a1e056..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/portal/portal.tsx +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import * as ReactDOM from 'react-dom' - -const Portal = ({ - children, -}: { - children: React.ReactNode -}): React.ReactPortal => { - /* - Why this wrapper? Well, styled-components doesn't have a good - abstraction for making a portal yet, so we keep the portal lightly styled - in a wrapper where we feed styled-components. Hence the overflow set - to visible. This allows us to accomplish pretty much exactly what - we want. - */ - const [wrapper] = React.useState(document.createElement('react-portal')) - - React.useEffect(() => { - wrapper.style.position = 'absolute' - wrapper.style.left = '0px' - wrapper.style.top = '0px' - wrapper.style.display = 'block' - wrapper.style.overflow = 'visible' - wrapper.style.zIndex = '103' // use creation / append order from here on out - document.body.appendChild(wrapper) - return () => { - wrapper.remove() - } - }, []) - - return ReactDOM.createPortal(children, wrapper) -} - -export default Portal diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/progress-button/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/progress-button/index.tsx deleted file mode 100644 index 5a117ffe877..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/progress-button/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './progress-button' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/progress-button/progress-button.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/progress-button/progress-button.tsx deleted file mode 100644 index 3e185e9aaab..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/progress-button/progress-button.tsx +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import LinearProgress, { - LinearProgressProps, -} from '@mui/material/LinearProgress' -import Button, { ButtonProps } from '@mui/material/Button' -import CircularProgress, { - CircularProgressProps, -} from '@mui/material/CircularProgress' - -type Props = { - children: React.ReactNode - style?: React.CSSProperties - disabled?: boolean - loading?: boolean - variant?: ButtonProps['variant'] - color?: ButtonProps['color'] - size?: ButtonProps['size'] - progressVariant?: 'circular' | 'linear' - onClick?: React.MouseEventHandler - buttonProps?: ButtonProps - linearProgressProps?: LinearProgressProps - circularProgressProps?: CircularProgressProps - className?: string - dataId?: string -} - -const ProgressButton = (props: Props) => { - const { - children, - style, - disabled, - loading, - variant, - color, - size, - progressVariant, - onClick, - buttonProps, - linearProgressProps, - circularProgressProps, - className, - dataId, - } = props - - const Loading = () => { - return progressVariant === 'circular' ? ( - - ) : ( - - ) - } - - return ( - - ) -} - -export default ProgressButton diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.tsx deleted file mode 100644 index cc1d0b5d6fe..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/ephemeral-search-sort.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import SortSelections from './sort-selections' -import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook' -import Grid from '@mui/material/Grid' -import Button from '@mui/material/Button' -import user from '../../component/singletons/user-instance' - -const getResultSort = () => { - return user.get('user').get('preferences').get('resultSort') || [] -} - -type Props = { - closeDropdown: () => void -} - -const PermanentSearchSort = ({ closeDropdown }: Props) => { - const [sorts, setSorts] = React.useState(getResultSort()) - const [hasSort, setHasSort] = React.useState(sorts.length > 0) - const { listenTo } = useBackbone() - - React.useEffect(() => { - listenTo(user.get('user').get('preferences'), 'change:resultSort', () => { - const resultSort = getResultSort() - setHasSort(resultSort !== undefined && resultSort.length > 0) - setSorts(resultSort) - }) - }, []) - const removeSort = () => { - user.get('user').get('preferences').set('resultSort', '') - user.get('user').get('preferences').savePreferences() - closeDropdown() - } - const saveSort = () => { - user - .get('user') - .get('preferences') - .set('resultSort', sorts.length === 0 ? undefined : sorts) - - user.get('user').get('preferences').savePreferences() - closeDropdown() - // once again, something is weird with arrays and backbone? - user.get('user').get('preferences').trigger('change:resultSort') - } - return ( -
    -
    - { - setSorts(newVal) - }} - /> -
    - - {hasSort ? ( - - - - ) : null} - - - - -
    - ) -} - -export default hot(module)(PermanentSearchSort) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.tsx deleted file mode 100644 index 990bbfe8562..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/permanent-search-sort.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import * as React from 'react' -import _cloneDeep from 'lodash.clonedeep' -import { hot } from 'react-hot-loader' -import SortSelections from './sort-selections' -import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook' -import { QueryType } from '../../js/model/Query' - -type Props = { - model: QueryType -} - -/** - * If we don't do this, we might muck with how backbone determines changes. That's because we might modify the object directly, then update it. - * So then it would see the set, determine there are no changes, and weird things would be afoot. - * @param param0 - */ -const getCopyOfSortsFromModel = ({ model }: Props) => { - return _cloneDeep(model.get('sorts')) -} - -const PermanentSearchSort = ({ model }: Props) => { - const [sorts, setSorts] = React.useState(getCopyOfSortsFromModel({ model })) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(model, 'change:sorts', () => { - setSorts(getCopyOfSortsFromModel({ model })) - }) - }, []) - return ( - { - model.set('sorts', newVal) - // something to do with this being an array causes the event not to trigger, I think? - model.trigger('change:sorts') - }} - /> - ) -} - -export default hot(module)(PermanentSearchSort) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-item.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-item.tsx deleted file mode 100644 index 6372e48d3aa..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-item.tsx +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' - -import { isDirectionalSort } from './sort-selection-helpers' -import { SortItemType, Option } from './sort-selections' -import TextField from '@mui/material/TextField' -import Autocomplete from '@mui/material/Autocomplete' -import Grid from '@mui/material/Grid' -import Button from '@mui/material/Button' -import Swath from '../../component/swath/swath' - -type Props = { - sortItem: SortItemType - attributeOptions: Option[] - directionOptions: Option[] - updateAttribute: (attribute: string) => void - updateDirection: (direction: string) => void - onRemove: () => void - showRemove?: boolean -} - -const SortItem = ({ - sortItem, - attributeOptions, - directionOptions, - updateAttribute, - updateDirection, - onRemove, - showRemove, -}: Props) => { - return ( - <> -
    - - - option.label} - isOptionEqualToValue={(option, value) => { - return option.value === value.value - }} - onChange={(_e: any, newValue: Option) => { - const newProperty = newValue.value - updateAttribute(newProperty) - }} - disableClearable - value={sortItem.attribute} - renderInput={(params) => ( - - )} - /> - - {showRemove ? ( - - - - ) : null} - - {isDirectionalSort(sortItem.attribute.value) ? ( - - - - - - option.label} - isOptionEqualToValue={(option, value) => - option.value === value.value - } - onChange={(_e: any, newValue: Option) => { - const newProperty = newValue.value - updateDirection(newProperty) - }} - disableClearable - value={directionOptions.find( - (option) => option.value === sortItem.direction - )} - renderInput={(params) => ( - - )} - /> - - - ) : null} -
    - - ) -} - -export default SortItem diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.tsx deleted file mode 100644 index 1c5b7fe807a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-selection-helpers.tsx +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { SortItemType } from './sort-selections' -import { Option } from './sort-selections' -import { StartupDataStore } from '../../js/model/Startup/startup' - -const blacklist = ['anyText', 'anyGeo'] - -export const getLabel = (value: string) => { - let label = StartupDataStore.MetacardDefinitions.getAlias(value) - if (label === 'RELEVANCE') { - return 'Best Text Match' - } - return label -} - -export const getSortAttributeOptions = (currentSelections: string[]) => { - const currentAttributes = - currentSelections && currentSelections.length ? currentSelections : [] - const attributes = StartupDataStore.MetacardDefinitions.getSortedAttributes() - const options: Option[] = attributes - .filter( - (type) => !StartupDataStore.MetacardDefinitions.isHiddenAttribute(type.id) - ) - .filter((type) => !blacklist.includes(type.id)) - .filter((type) => !currentAttributes.includes(type.id)) - .map((type) => ({ - label: type.alias || type.id, - value: type.id, - })) - - const showBestTextValue = 'RELEVANCE' - options.unshift({ - label: 'Best Text Match', - value: showBestTextValue, - }) - - return options -} - -export const getSortDirectionOptions = (attributeVal: string) => { - let ascendingLabel, descendingLabel - if ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attributeVal] === - undefined - ) { - ascendingLabel = descendingLabel = '' - } else { - switch ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attributeVal].type - ) { - case 'DATE': - ascendingLabel = 'Oldest to Latest' - descendingLabel = 'Latest to Oldest' - break - case 'BOOLEAN': - ascendingLabel = 'True to False' //Truthiest - descendingLabel = 'False to True' //Falsiest - break - case 'LONG': - case 'DOUBLE': - case 'FLOAT': - case 'INTEGER': - case 'SHORT': - ascendingLabel = 'Smallest to Largest' - descendingLabel = 'Largest to Smallest' - break - case 'STRING': - ascendingLabel = 'A to Z' - descendingLabel = 'Z to A' - break - case 'GEOMETRY': - ascendingLabel = 'Closest to Furthest' - descendingLabel = 'Furthest to Closest' - break - case 'XML': - case 'BINARY': - default: - ascendingLabel = 'Ascending' - descendingLabel = 'Descending' - break - } - } - - const ascendingOption: Option = { - label: ascendingLabel, - value: 'ascending', - } - const descendingOption: Option = { - label: descendingLabel, - value: 'descending', - } - return [ascendingOption, descendingOption] -} - -export const getNextAttribute = ( - collection: SortItemType[], - options: Option[] -) => { - const attributes = collection.map((type) => type.attribute.value) - for (let option of options) { - if (!attributes.includes(option.value)) { - return option.value - } - } - return options[0].value -} - -export const isDirectionalSort = (attribute: string) => { - return ( - StartupDataStore.MetacardDefinitions.getAttributeMap()[attribute] !== - undefined - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-selections.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-selections.tsx deleted file mode 100644 index 311052e7daf..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/query-sort-selection/sort-selections.tsx +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Button from '@mui/material/Button' -import Grid from '@mui/material/Grid' -import Typography from '@mui/material/Typography' -import AddIcon from '@mui/icons-material/Add' -import * as React from 'react' -import { hot } from 'react-hot-loader' -import SortItem from './sort-item' -import { - getLabel, - getNextAttribute, - getSortAttributeOptions, - getSortDirectionOptions, -} from './sort-selection-helpers' - -export type SortsType = { - attribute: string - direction: string -}[] - -type Props = { - value: SortsType - onChange: (newVal: SortsType) => void -} - -export type Option = { - label: string - value: string -} - -export type SortItemType = { - attribute: Option - direction: string -} - -const getCollectionAsJson = (collection: Props['value']) => { - const items: SortItemType[] = collection.map((sort) => { - return { - attribute: { - label: getLabel(sort.attribute), - value: sort.attribute, - }, - direction: sort.direction, - } - }) - return items -} - -const SortSelections = ({ value = [], onChange }: Props) => { - if (!value.length) { - value.push({ - attribute: 'title', - direction: 'ascending', - }) - onChange(value.slice(0)) - } - - const collectionJson = getCollectionAsJson(value) - - const sortAttributeOptions = getSortAttributeOptions( - collectionJson.map((item) => item.attribute.value) - ) - - const updateAttribute = (index: number) => (attribute: string) => { - value[index].attribute = attribute - onChange(value.slice(0)) - } - - const updateDirection = (index: number) => (direction: string) => { - value[index].direction = direction - onChange(value.slice(0)) - } - - const removeItem = (index: number) => () => { - value.splice(index, 1) - onChange(value.slice(0)) - } - - const addSort = () => { - value.push({ - attribute: getNextAttribute(collectionJson, sortAttributeOptions), - direction: 'descending', - }) - onChange(value.slice(0)) - } - return ( -
    - - Sort - - {collectionJson.map((sortItem, index) => { - return ( -
    0 ? 'pt-2' : ''} - > - -
    - ) - })} -
    - -
    -
    - ) -} - -export default hot(module)(SortSelections) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/radio/radio.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/radio/radio.tsx deleted file mode 100644 index 4c49fff91c7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/radio/radio.tsx +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import styled from 'styled-components' -import { readableColor, rgba } from 'polished' -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -const foreground = (props: any) => { - if (props.theme.backgroundDropdown !== undefined) { - return readableColor(props.theme.backgroundDropdown) - } -} -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -const background = (props: any, alpha = 0.4) => { - if (props.theme.backgroundDropdown !== undefined) { - return rgba(readableColor(props.theme.backgroundDropdown), alpha) - } -} -const Root = styled.div` - border-radius: ${(props) => props.theme.borderRadius}; - white-space: nowrap; - background-color: inherit; - border: 1px solid ${background}; - display: inline-block; -` -const Button = styled.button<{ first: boolean; selected: boolean }>` - vertical-align: top; - opacity: ${(props) => props.theme.minimumOpacity}; - min-width: ${(props) => props.theme.minimumButtonSize}; - min-height: ${(props) => props.theme.minimumButtonSize}; - border: none; - border-left: ${(props) => - !(props as any).first ? '1px solid ' + background(props) : 'none'}; - background-color: inherit; - padding: 0px 10px; - cursor: pointer; - font-size: ${(props) => props.theme.minimumFontSize}; - color: ${foreground}; - ${(props) => - (props as any).selected - ? ` - opacity: 1; - font-weight: bolder; - background: ${background(props, 0.1)}; - ` - : ''}; -` -type RadioProps = { - value?: string - onChange?: (...args: any[]) => any - children?: React.ReactNode -} -const Radio = (props: RadioProps) => { - const { value, children, onChange } = props - const childrenWithProps = React.Children.map(children, (child, i) => { - // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. - return React.cloneElement(child, { - first: i === 0, - selected: value === (child as any).props.value, - // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message - onClick: () => onChange((child as any).props.value), - }) - }) - return {childrenWithProps} -} -type RadioItemProps = { - value?: string - children?: any -} -const RadioItem = (props: RadioItemProps) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'first' does not exist on type 'RadioItem... Remove this comment to see the full error message - const { value, first, children, selected, onClick } = props - return ( - - ) -} -export { Radio, RadioItem } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/container.tsx deleted file mode 100644 index 9ef991a9cab..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/container.tsx +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { hot } from 'react-hot-loader' -import * as React from 'react' -import ResultSortPresentation from './presentation' -import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook' - -import Backbone from 'backbone' -import user from '../../component/singletons/user-instance' - -type Props = { - closeDropdown: any -} - -const getResultSort = () => { - return user.get('user').get('preferences').get('resultSort') -} - -const ResultSortContainer = ({ closeDropdown }: Props) => { - const [collection, setCollection] = React.useState( - new Backbone.Collection(getResultSort()) - ) - const [hasSort, setHasSort] = React.useState(collection.length > 0) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(user.get('user').get('preferences'), 'change:resultSort', () => { - const resultSort = getResultSort() - setHasSort(resultSort !== undefined && resultSort.length > 0) - setCollection(new Backbone.Collection(resultSort)) - }) - }, []) - const removeSort = () => { - user.get('user').get('preferences').set('resultSort', undefined) - user.get('user').get('preferences').savePreferences() - closeDropdown() - } - const saveSort = () => { - const sorting = collection.toJSON() - user - .get('user') - .get('preferences') - .set('resultSort', sorting.length === 0 ? undefined : sorting) - user.get('user').get('preferences').savePreferences() - closeDropdown() - } - return ( - - ) -} - -export default hot(module)(ResultSortContainer) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/presentation.tsx deleted file mode 100644 index 0b50faf766a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/result-sort/presentation.tsx +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// @ts-nocheck FIXME: Property 'collection' does not exist on type 'Intr -import { hot } from 'react-hot-loader' -import * as React from 'react' -import SortSelections from '../query-sort-selection/sort-selections' -import Button from '@mui/material/Button' -import Grid from '@mui/material/Grid' - -type Props = { - removeSort: () => void - saveSort: () => void - hasSort: Boolean - collection: Backbone.Collection -} - -const render = ({ removeSort, saveSort, hasSort, collection }: Props) => { - return ( -
    - - - {hasSort ? ( - - - - ) : null} - - - - -
    - ) -} - -export default hot(module)(render) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/container.tsx deleted file mode 100644 index 5488bebfefd..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/container.tsx +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import ResultsExportComponent from './presentation' -import { - exportResultSet, - OverridableGetColumnOrder, - getExportOptions, - Transformer, - ExportFormat, -} from '../utils/export' -import { getResultSetCql } from '../utils/cql' -import withListenTo, { WithBackboneProps } from '../backbone-container' -import { LazyQueryResults } from '../../js/model/LazyQueryResult/LazyQueryResults' -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'cont... Remove this comment to see the full error message -import contentDisposition from 'content-disposition' -import { StartupDataStore } from '../../js/model/Startup/startup' -import { OverridableSaveFile } from '../utils/save-file/save-file' -import { AddSnack } from '../../component/snack/snack.provider' - -type Result = { - id: string - source: string - attributes: string[] -} - -type Props = { - results: Result[] - lazyQueryResults: LazyQueryResults - isZipped?: boolean - onClose?: any - exportSuccessful?: boolean - setExportSuccessful?: any - loading?: boolean - setLoading?: any -} & WithBackboneProps - -type State = { - exportDisabled: boolean - selectedFormat: string - exportFormats: ExportFormat[] - loading?: boolean - exportSuccessful?: boolean -} - -class ResultsExport extends React.Component { - setExportSuccessful: any - onClose: any - setLoading: any - constructor(props: Props) { - super(props) - this.state = { - selectedFormat: 'Binary Resource', - exportFormats: [], - exportDisabled: true, - loading: false, - exportSuccessful: false, - } - this.onClose = props.onClose - this.setExportSuccessful = props.setExportSuccessful - this.setLoading = props.setLoading - } - - componentDidUpdate(_prevProps: Props) { - if ( - _prevProps.results !== this.props.results || - _prevProps.isZipped !== this.props.isZipped - ) { - this.fetchExportOptions() - this.setState({ - selectedFormat: 'Binary Resource', - exportDisabled: true, - }) - } - } - - getTransformerType = () => { - return !this.props.isZipped && this.props.results.length > 1 - ? Transformer.Query - : Transformer.Metacard - } - - componentDidMount() { - this.fetchExportOptions() - } - - fetchExportOptions = async () => { - const formats = await getExportOptions(this.getTransformerType()) - this.setState({ - exportFormats: formats, - }) - } - - getResultSources() { - return new Set( - this.props.results - .map((result: Result) => result.source) - .map((source: string) => decodeURIComponent(source)) - ) - } - - getSelectedExportFormatId() { - const selectedFormat = this.state.selectedFormat - const format = this.state.exportFormats.find( - (format) => format.displayName === selectedFormat - ) - - if (format !== undefined) { - return encodeURIComponent(format.id) - } - - return undefined - } - - onExportClick = async (addSnack: AddSnack) => { - const uriEncodedTransformerId = this.getSelectedExportFormatId() - - try { - console.log(this.state.loading) - this.setState({ loading: true }) - console.log(this.state.loading) - - if (uriEncodedTransformerId === undefined) { - return - } - - let response = null - const count = this.props.results.length - const cql = getResultSetCql( - this.props.results.map((result: Result) => result.id) - ) - const srcs = Array.from(this.getResultSources()) - const searches = [ - { - srcs, - cql, - count, - }, - ] - const columnOrder = OverridableGetColumnOrder.get()() - if (this.props.isZipped) { - response = await exportResultSet('zipCompression', { - searches, - count, - sorts: [], - args: { - transformerId: uriEncodedTransformerId, - }, - }) - } else { - response = await exportResultSet(uriEncodedTransformerId, { - searches, - count, - sorts: this.props.lazyQueryResults?.transformSorts({ - originalSorts: this.props.lazyQueryResults?.persistantSorts, - }), - args: { - hiddenFields: [], - columnOrder: columnOrder, - columnAliasMap: - StartupDataStore.Configuration.config?.attributeAliases || {}, - }, - }) - } - - if (response.status === 200) { - const filename = contentDisposition.parse( - response.headers.get('content-disposition') - ).parameters.filename - const contentType = response.headers.get('content-type') - const data = await response.blob() - OverridableSaveFile.get()(filename, 'data:' + contentType, data) - this.setExportSuccessful(true) - this.onClose() - } else { - this.setState({ exportSuccessful: false }) - this.setState({ loading: false }) - addSnack('Error: Could not export results.', { - alertProps: { severity: 'error' }, - }) - } - } catch (error) { - console.error(error) - this.setState({ exportSuccessful: false }) - this.setState({ loading: false }) - } finally { - this.setState({ loading: false }) - } - } - - handleExportOptionChange(name: string) { - this.setState({ - selectedFormat: name, - exportDisabled: false, - }) - } - render() { - return ( - - ) - } -} - -export default hot(module)(withListenTo(ResultsExport)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/presentation.tsx deleted file mode 100644 index 93b75114e7f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/results-export/presentation.tsx +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import SummaryManageAttributes from '../summary-manage-attributes/summary-manage-attributes' -import ProgressButton from '../progress-button' -import { DialogActions, DialogContent, LinearProgress } from '@mui/material' -import useSnack from '../../component/hooks/useSnack' -import { AddSnack } from '../../component/snack/snack.provider' - -type ExportFormat = { - id: string - displayName: string -} - -export type Props = { - selectedFormat: string - exportFormats: ExportFormat[] - exportDisabled: boolean - onExportClick: (addSnack: AddSnack) => void - handleExportOptionChange: (val: string) => void - loading?: boolean - setLoading?: any - onClose?: any - exportSuccessful?: boolean - setExportSuccessful?: any -} - -const ResultsExportComponent = ({ - selectedFormat, - exportFormats, - exportDisabled, - onExportClick, - handleExportOptionChange, - exportSuccessful, - onClose, - loading, -}: Props) => { - const addSnack = useSnack() - React.useEffect(() => { - handleExportOptionChange(exportFormats[0]?.displayName) - }, [exportFormats]) - - if (exportSuccessful) { - onClose() - } - - return exportFormats.length === 0 ? ( - - ) : ( - <> - -
    -
    - option.displayName} - isOptionEqualToValue={(option, value) => - option.displayName === value.displayName - } - onChange={(_e, newValue) => { - handleExportOptionChange(newValue.displayName) - }} - disableClearable - value={ - exportFormats.find( - (format) => format.displayName === selectedFormat - ) || exportFormats[0] - } - renderInput={(params) => ( - - )} - /> -
    - - {['CSV', 'RTF', 'XLSX'].includes(selectedFormat) ? ( - - ) : null} -
    -
    - -
    - - { - onExportClick(addSnack) - }} - loading={loading} - > - Export - -
    -
    - - ) -} - -export default hot(module)(ResultsExportComponent) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/search-settings/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/search-settings/index.tsx deleted file mode 100644 index 0c2f83dec71..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/search-settings/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './search-settings' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/search-settings/search-settings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/search-settings/search-settings.tsx deleted file mode 100644 index 7c5e36dee15..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/search-settings/search-settings.tsx +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import user from '../../component/singletons/user-instance' -import QuerySettings from '../../component/query-settings/query-settings' -import { UserQuery } from '../../js/model/TypedQuery' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import Typography from '@mui/material/Typography' -import Grid from '@mui/material/Grid' -import Slider from '@mui/material/Slider' -import Input from '@mui/material/Input' -import Swath from '../../component/swath/swath' -import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook' -import { - MuiOutlinedInputBorderClasses, - Elevations, -} from '../../component/theme/theme' -import Tooltip from '@mui/material/Tooltip' -import Paper from '@mui/material/Paper' -import { useConfiguration } from '../../js/model/Startup/configuration.hooks' -const Root = styled.div` - overflow: hidden; - padding: ${(props) => props.theme.minimumSpacing}; -` -const getResultCount = () => { - return user.get('user').get('preferences').get('resultCount') as number -} -const SearchSettings = () => { - const { config } = useConfiguration() - const configuredMaxResultCount = config?.resultCount || 250 - const [queryModel] = React.useState( - UserQuery() // we pass this to query settings - ) - const [resultCount, setResultCount] = React.useState(getResultCount()) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(user.get('user').get('preferences'), 'change:resultCount', () => { - setResultCount(getResultCount()) - }) - }, []) - React.useEffect(() => { - return () => { - const { sorts, phonetics, spellcheck, sources } = queryModel.toJSON() - user.getPreferences().get('querySettings').set({ - sorts, - phonetics, - spellcheck, - sources, - }) - user.savePreferences() - } - }, []) - return ( - - - For example: - - Searching 3 data sources with the current setting could return as - many as {resultCount * 3} results in a single page. - - - } - > -
    - - Results per page per data source - - - - - { - user.getPreferences().set({ - resultCount: Math.min( - parseInt(e.target.value), - configuredMaxResultCount - ), - }) - }} - inputProps={{ - className: 'text-center', - step: 10, - min: 1, - max: configuredMaxResultCount, - type: 'number', - 'aria-labelledby': 'resultcount-slider', - }} - /> - - - { - user.getPreferences().set({ - resultCount: newValue, - }) - }} - aria-labelledby="input-slider" - min={1} - max={configuredMaxResultCount} - step={10} - marks={[ - { - value: 1, - label: '1', - }, - { - value: configuredMaxResultCount, - label: `${configuredMaxResultCount}`, - }, - ]} - /> - - -
    -
    -
    - -
    - Defaults for New Searches - -
    - ) -} -export default hot(module)(SearchSettings) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/session-timeout/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/session-timeout/index.tsx deleted file mode 100644 index 450afc1ae31..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/session-timeout/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export { default } from './session-timeout' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/session-timeout/session-timeout.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/session-timeout/session-timeout.tsx deleted file mode 100644 index 1fac9a6066a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/session-timeout/session-timeout.tsx +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import Button from '@mui/material/Button' -import * as React from 'react' -import styled from 'styled-components' -import sessionTimeoutModel from '../../component/singletons/session-timeout' - -const SessionTimeoutRoot = styled.div` - height: 100%; - width: 100%; - display: block; - overflow: hidden; -` -const Message = styled.div` - max-height: calc(100% - 2.25rem); - height: auto; - text-align: center; - padding: ${(props) => props.theme.mediumSpacing}; -` - -type State = { - timeLeft: number -} - -const renewSession = () => { - sessionTimeoutModel.renew() -} - -class SessionTimeout extends React.Component<{}, State> { - interval: any - constructor(props: {}) { - super(props) - this.state = { - timeLeft: sessionTimeoutModel.getIdleSeconds(), - } - } - componentDidMount() { - this.interval = setInterval( - () => this.setState({ timeLeft: sessionTimeoutModel.getIdleSeconds() }), - 1000 - ) - } - componentWillUnmount() { - clearInterval(this.interval) - } - render() { - return this.state.timeLeft < 0 ? ( - - Session Expired. Please refresh the page to continue. - - ) : ( - - - You will be logged out automatically in{' '} - {' '} - seconds. -
    Press "Continue Working" to remain logged in.
    -
    - -
    - ) - } -} - -export default SessionTimeout diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/snackbar/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/snackbar/index.tsx deleted file mode 100644 index cf110453e82..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/snackbar/index.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export { - WrappedSnackbar as Snackbar, - WrappedSnackbarContent as SnackbarContent, -} from './snackbar' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/snackbar/snackbar.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/snackbar/snackbar.tsx deleted file mode 100644 index 463b06a7676..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/snackbar/snackbar.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import * as React from 'react' -import Snackbar, { SnackbarProps } from '@mui/material/Snackbar' -import SnackbarContent, { - SnackbarContentProps, -} from '@mui/material/SnackbarContent' -import styled from 'styled-components' -import { useTheme } from '@mui/material/styles' - -type ExtraProps = { - variant?: 'error' | 'success' -} - -export const WrappedSnackbar = styled( - React.forwardRef((props: SnackbarProps & ExtraProps, ref: React.Ref) => { - return - }) -)`` as React.ComponentType< - React.PropsWithChildren -> - -export const WrappedSnackbarContent = styled( - React.forwardRef( - (props: SnackbarContentProps & ExtraProps, ref: React.Ref) => { - const theme = useTheme() - const { variant = 'error', ...baseProps } = props - let style = {} - if (variant === 'error') { - style = { - background: theme.palette.error.dark, - color: theme.palette.error.contrastText, - } - } else if (variant === 'success') { - style = { - background: theme.palette.primary.dark, - color: theme.palette.primary.contrastText, - } - } - return - } - ) -)`` as React.ComponentType< - React.PropsWithChildren -> diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/source-item/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/source-item/index.tsx deleted file mode 100644 index 2ac798dfd18..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/source-item/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './source-item' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/source-item/source-item.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/source-item/source-item.tsx deleted file mode 100644 index 26e13ec8f73..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/source-item/source-item.tsx +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' - -type RootProps = { - available: boolean -} - -const Root = styled.div` - width: 100%; - height: auto; - white-space: nowrap; - padding: ${(props) => props.theme.minimumSpacing}; - overflow: hidden; - - .source-name, - .source-available { - white-space: normal; - display: inline-block; - vertical-align: top; - font-size: ${(props) => props.theme.largeFontSize}; - line-height: ${(props) => props.theme.minimumButtonSize}; - } - - .source-name { - padding: 0px ${(props) => props.theme.minimumSpacing}; - max-width: calc(100% - ${(props) => props.theme.minimumButtonSize}); - word-break: break-all; - } - - .source-actions { - display: block; - padding-left: calc(2 * ${(props) => props.theme.minimumButtonSize}); - } - - .source-action > button { - width: 100%; - text-align: left; - padding: 0px ${(props) => props.theme.minimumSpacing}; - overflow: hidden; - text-overflow: ellipsis; - } - - .source-app { - display: none; - } - - .source-available { - width: ${({ theme }) => theme.minimumButtonSize}; - text-align: center; - } - - .is-available, - .is-not-available { - display: none; - } - - .is-available { - display: ${(props) => (props.available ? 'inline' : 'none')}; - color: ${(props) => props.theme.positiveColor}; - } - - .is-not-available { - display: ${(props) => (props.available ? 'none' : 'inline')}; - color: ${(props) => props.theme.warningColor}; - } -` - -type SourceAction = { - title: string - description: string - url: string - id: string -} - -type Props = { - sourceActions?: SourceAction[] - id: string -} & RootProps - -export default hot(module)(({ id, available }: Props) => { - return ( - -
    - - -
    -
    - {id} -
    -
    - ) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources-summary/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources-summary/index.tsx deleted file mode 100644 index 16ad8c43ed5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources-summary/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './sources-summary' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources-summary/sources-summary.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources-summary/sources-summary.tsx deleted file mode 100644 index ed6f643164d..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources-summary/sources-summary.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import { hot } from 'react-hot-loader' -import { FormattedMessage } from 'react-intl' - -const Root = styled.div` - display: block; - width: 100%; - height: auto; - font-size: ${(props) => props.theme.largeFontSize}; - text-align: center; - padding: ${(props) => props.theme.largeSpacing} 0px; -` - -type Props = { - amountDown: number -} - -export default hot(module)(({ amountDown }: Props) => { - return ( - - {amountDown == 0 ? ( - - ) : ( - - )} - - ) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources/presentation.tsx deleted file mode 100644 index 6c4870e576e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/sources/presentation.tsx +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import SourceItem from '../source-item' -import SourcesSummary from '../sources-summary' -import { useSources } from '../../js/model/Startup/sources.hooks' - -const Root = styled.div` - display: block; - height: 100%; - width: 100%; - overflow: hidden; -` - -const SourcesCenter = styled.div` - margin: auto; - max-width: ${(props) => { - return props.theme.screenBelow(props.theme.mediumScreenSize) - ? '100%' - : '1200px' - }}; - padding: 0px - ${(props) => - props.theme.screenBelow(props.theme.mediumScreenSize) ? '20px' : '100px'}; - overflow: auto; - height: 100%; -` - -export default () => { - const { sources } = useSources() - const amountDown = sources.reduce((blob, source) => { - if (source.available === false) { - return blob + 1 - } - return blob - }, 0) - return ( - - - - {sources.map((source) => { - return ( - - ) - })} - - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/custom-element.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/custom-element.tsx deleted file mode 100644 index 96bd6d6b868..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/custom-element.tsx +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { css } from 'styled-components' - -export const CustomElement = css` - width: 100%; - height: 100%; - display: block; -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/disabled-behavior.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/disabled-behavior.tsx deleted file mode 100644 index 7355ee46351..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/disabled-behavior.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { ThemeInterface } from '../styled-components' -import { css } from 'styled-components' - -export const DisabledBehavior = (theme: ThemeInterface) => css` - opacity: ${theme.minimumOpacity}; - transition: opacity ${theme.coreTransitionTime} ease-in-out; - cursor: not-allowed !important; -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/dropshadow.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/dropshadow.tsx deleted file mode 100644 index 44592a64fe7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/dropshadow.tsx +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { css } from 'styled-components' - -export const Dropshadow = css` - box-shadow: 0px 0px 2px 1px rgba(255, 255, 255, 0.4), - 2px 2px 10px 2px rgba(145, 112, 112, 0.4); -` - -export const DropshadowLight = css` - box-shadow: 0px 0px 2px 1px rgba(255, 255, 255, 0.3), - 2px 2px 10px 2px rgba(0, 0, 0, 0.3); -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/grab-cursor.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/grab-cursor.tsx deleted file mode 100644 index 3b71dc35595..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/grab-cursor.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { css } from 'styled-components' - -export const GrabCursor = css` - cursor: move; - cursor: grab; -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/highlight-behavior.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/highlight-behavior.tsx deleted file mode 100644 index 3be12abdc2f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/highlight-behavior.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { css } from 'styled-components' - -export const HighlightBehavior = ({ - initialOpacity, -}: { - initialOpacity: number -}) => css` - opacity: ${initialOpacity}; - - &:active, - &:focus, - &:hover { - opacity: 1; - } -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/index.tsx deleted file mode 100644 index 8c20c2db0ad..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { CustomElement } from './custom-element' -export { Dropshadow, DropshadowLight } from './dropshadow' -export { GrabCursor } from './grab-cursor' -export { IsButton } from './is-button' -export { HighlightBehavior } from './highlight-behavior' -export { DisabledBehavior } from './disabled-behavior' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/is-button.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/is-button.tsx deleted file mode 100644 index c842abdf056..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/mixins/is-button.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { ThemeInterface } from '../styled-components' -import { css } from 'styled-components' -export const IsButton = (theme: ThemeInterface) => css` - width: ${theme.minimumButtonSize}; - height: ${theme.minimumButtonSize}; - line-height: ${theme.minimumButtonSize}; - display: inline-block; -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/styled-components/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/styled-components/index.tsx deleted file mode 100644 index c17401089d0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/styled-components/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { - ThemeInterface, - SpecificSizingInterface, - ThemeColorInterface, -} from './theme' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/styled-components/theme.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/styled-components/theme.tsx deleted file mode 100644 index d4f8c972f69..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/styles/styled-components/theme.tsx +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export type SpecificSizingInterface = { - minimumButtonSize: string - minimumLineSize: string - minimumSpacing: string -} - -type SizingInterface = { - mediumSpacing: string - largeSpacing: string -} - -type BorderRadiusInterface = { - borderRadius: string -} - -type ScreenSizes = { - minimumScreenSize: string - mobileScreenSize: string - smallScreenSize: string - mediumScreenSize: string -} - -type ZIndexes = { - zIndexMenubar: number - zIndexLoadingCompanion: number - zIndexSlideout: number - zIndexContent: number - zIndexConfirmation: number - zIndexHelp: number - zIndexVerticalMenu: number - zIndexDropdown: number - zIndexMenuItem: number - zIndexBlocking: number -} - -type Transitions = { - transitionTime: string - coreTransitionTime: string -} - -type FontSizes = { - minimumFontSize: string - mediumFontSize: string - largeFontSize: string -} - -type Dividers = { - dividerHeight: string - minimumDividerSize: string -} - -type Opacity = { - minimumOpacity: number -} - -export type ThemeColorInterface = { - primaryColor: string - positiveColor: string - negativeColor: string - warningColor: string - favoriteColor: string - backgroundNavigation: string - backgroundAccentContent: string - backgroundDropdown: string - backgroundContent: string - backgroundModal: string - backgroundSlideout: string - primary: string - secondary: string - palette: 'default' | 'custom' -} - -type Current = { - background: string -} - -type ThemeName = { - theme: string -} - -type Helpers = { - screenSize: number - multiple: (multiplier: number, variable: string, unit?: string) => string - screenBelow: (specifiedSize: string) => boolean -} - -export type ThemeInterface = SizingInterface & - SpecificSizingInterface & - BorderRadiusInterface & - ScreenSizes & - ZIndexes & - Transitions & - FontSizes & - Dividers & - Opacity & - ThemeColorInterface & - ThemeName & - Helpers & - Current diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.tsx deleted file mode 100644 index a2d869525b1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/summary-manage-attributes/summary-manage-attributes.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import Button from '@mui/material/Button' -import user from '../../component/singletons/user-instance' -import TransferList from '../../component/tabs/metacard/transfer-list' -import { Elevations } from '../../component/theme/theme' -import { useDialog } from '../../component/dialog' -import { TypedUserInstance } from '../../component/singletons/TypedUser' -import { StartupDataStore } from '../../js/model/Startup/startup' - -export default ({ isExport = false }: { isExport?: boolean }) => { - const requiredAttributes = - StartupDataStore.Configuration.getRequiredExportAttributes() - const dialogContext = useDialog() - return ( - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/index.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/index.ts deleted file mode 100644 index 464f7df24f6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import textfield from './text-field' -export default textfield diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/text-field.spec.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/text-field.spec.tsx deleted file mode 100644 index 5216e19876e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/text-field.spec.tsx +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import Enzyme from 'enzyme' -import Adapter from '@wojtekmaj/enzyme-adapter-react-17' -import { expect } from 'chai' - -Enzyme.configure({ adapter: new Adapter() }) - -import TextField from './text-field' - -const { mount } = Enzyme - -describe('', () => { - it(' should have the right value', () => { - const wrapper = mount() - expect(wrapper.find('input').prop('value')).to.equal('test') - }) - - it('should update input on change', (done) => { - const onChange = (value: any) => { - expect(value).to.equal('test') - done() - } - const wrapper = mount() - // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message - wrapper.find('input').prop('onChange')({ target: { value: 'test' } }) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/text-field.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/text-field.tsx deleted file mode 100644 index 740c261fe2e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/text-field/text-field.tsx +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' - -import Group from '../group' -import TextFieldMui from '@mui/material/TextField' - -type Props = { - value?: string - onChange?: (...args: any[]) => any -} - -const TextField = (props: Props) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'label' does not exist on type 'Props'. - const { label, addon, value, type = 'text', onChange, ...rest } = props - return ( - - {label !== undefined ? ( - - {label} -   - - ) : null} - { - // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message - onChange(e.target.value) - }} - {...rest} - /> - {addon !== undefined ? ( - - ) : null} - - ) -} - -export default TextField diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/color-tool.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/color-tool.tsx deleted file mode 100644 index ac18ef555f1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/color-tool.tsx +++ /dev/null @@ -1,319 +0,0 @@ -/** - * Adapted from https://github.com/mui-org/material-ui/blob/master/docs/src/pages/customization/color/ColorTool.js - */ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import { rgbToHex, useTheme } from '@mui/material/styles' -import colors from './typed-colors' -import Grid from '@mui/material/Grid' -import Input from '@mui/material/Input' -import Radio from '@mui/material/Radio' -import Tooltip from '@mui/material/Tooltip' -import Typography from '@mui/material/Typography' -import Button from '@mui/material/Button' -import _ from 'lodash' -import CheckIcon from '@mui/icons-material/Check' -import Slider from '@mui/material/Slider' -import user from '../../component/singletons/user-instance' -import { capitalize } from '@mui/material/utils' - -const shades = [ - 900, - 800, - 700, - 600, - 500, - 400, - 300, - 200, - 100, - 50, - 'A700', - 'A400', - 'A200', - 'A100', -] -const containsShades = ( - color: any, - shades: Array -): boolean => { - return shades.every((shade) => Object.keys(color).includes(shade.toString())) -} -const getHues = () => { - const hues = Object.keys(colors).filter((hue) => - containsShades(colors[hue], shades) - ) - return hues.slice(1, 17) -} - -const hues = getHues() - -/** - * Costly to update, so let them settle on a color first - */ -const updateTheme = _.debounce((state: any) => { - user.get('user').get('preferences').get('theme').set({ - primary: state.primary, - secondary: state.secondary, - }) -}, 0) - -const getDefaults = () => { - return { - primary: '#2196f3', - secondary: '#f50057', - ...user.get('user').get('preferences').get('theme').toJSON(), - } -} - -function ColorTool(props: any) { - const { classes } = props - const theme = useTheme() - const defaults = getDefaults() as { primary: string; secondary: string } - const [state, setState] = React.useState({ - primary: defaults.primary, - secondary: defaults.secondary, - primaryInput: defaults.primary, - secondaryInput: defaults.secondary, - primaryHue: 'blue', - secondaryHue: 'pink', - primaryShade: 4, - secondaryShade: 11, - }) - - const handleChangeColor = (name: string) => (event: any) => { - const isRgb = (string: string) => - /rgb\([0-9]{1,3}\s*,\s*[0-9]{1,3}\s*,\s*[0-9]{1,3}\)/i.test(string) - - const isHex = (string: string) => - /^#?([0-9a-f]{3})$|^#?([0-9a-f]){6}$/i.test(string) - - let { - target: { value: color }, - } = event - - setState((prevState) => ({ - ...prevState, - [`${name}Input`]: color, - })) - - let isValidColor = false - - if (isRgb(color)) { - isValidColor = true - } else if (isHex(color)) { - isValidColor = true - if (color.indexOf('#') === -1) { - color = `#${color}` - } - } - - if (isValidColor) { - setState((prevState) => ({ - ...prevState, - [name]: color, - })) - } - } - - const handleChangeHue = (name: string) => (event: any) => { - const hue = event.target.value - const shade = state[`${name}Shade` as 'primaryShade'] - - // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message - const color = colors[hue][shades[shade]] - - if (color) { - setState({ - ...state, - [`${name}Hue`]: hue, - [name]: color, - [`${name}Input`]: color, - }) - } - } - - const handleChangeShade = - (name: string) => (_event: any, shade: string | number) => { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - const color = colors[state[`${name}Hue`]][shades[shade]] - setState({ - ...state, - [`${name}Shade`]: shade, - [name]: color, - [`${name}Input`]: color, - }) - } - - React.useEffect(() => { - updateTheme(state) - }, [state]) - - const colorBar = (color: any, intent: string) => { - const background = theme.palette.augmentColor({ - color: { - main: color, - }, - }) - - return ( - - {['dark', 'main', 'light'].map((key) => { - const backgroundColor = background[key as 'light'] as string - return ( - { - switch (key) { - case 'dark': - return 'Go darker' - case 'light': - return 'Go lighter' - default: - return 'Current shade' - } - })()} - key={key} - > - - - ) - })} - - ) - } - - const colorPicker = (intent: 'primary' | 'secondary') => { - const intentInput = state[`${intent}Input` as 'primaryInput'] - const intentShade = state[`${intent}Shade` as 'primaryShade'] - const color = state[`${intent}` as 'primary'] - - return ( - - - {capitalize(intent)} - - -
    - Shade: - - {shades[intentShade]} -
    -
    - {hues.map((hue) => { - const shade = - intent === 'primary' - ? shades[state.primaryShade] - : shades[state.secondaryShade] - - // @ts-expect-error ts-migrate(7015) FIXME: Element implicitly has an 'any' type because index... Remove this comment to see the full error message - const backgroundColor = colors[hue][shade] as string - - return ( - - - } - checkedIcon={ -
    - -
    - } - /> -
    - ) - })} -
    - {colorBar(color, intent)} -
    - ) - } - - return ( - - {colorPicker('primary')} - {colorPicker('secondary')} - - ) -} - -export default hot(module)(ColorTool) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/index.tsx deleted file mode 100644 index 6f2ccddd9d2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './theme-settings' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/theme-settings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/theme-settings.tsx deleted file mode 100644 index 51e3a561294..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/theme-settings.tsx +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/*global require*/ -import * as React from 'react' -import FormControlLabel from '@mui/material/FormControlLabel' -import Checkbox from '@mui/material/Checkbox' -import { useBackbone } from '../../component/selection-checkbox/useBackbone.hook' -import user from '../../component/singletons/user-instance' -import { hot } from 'react-hot-loader' -import Grid from '@mui/material/Grid' -import ColorTool from './color-tool' -;(window as any).user = user -type ThemeType = { - theme: 'dark' | 'light' - palette: 'default' | 'custom' -} -const getPreferences = () => { - return user.get('user').get('preferences') -} -const getAnimationMode = () => { - return Boolean(getPreferences().get('animation')) -} -const getCurrentTheme = (): ThemeType => { - return getPreferences().get('theme').toJSON() -} -const AnimationSetting = () => { - const [animationMode, setAnimationMode] = React.useState(getAnimationMode()) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(user.get('user').get('preferences'), 'change:animation', () => { - setAnimationMode(getAnimationMode()) - }) - }, []) - return ( - { - getPreferences().set('animation', e.target.checked) - getPreferences().savePreferences() - }} - /> - } - label="Animation" - /> - ) -} -const ThemeMode = () => { - const [darkMode, setDarkMode] = React.useState( - getCurrentTheme().theme === 'dark' - ) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(user.get('user').get('preferences'), 'change:theme', () => { - setDarkMode(getCurrentTheme().theme === 'dark') - }) - }, []) - return ( - { - getPreferences() - .get('theme') - .set('theme', e.target.checked ? 'dark' : 'light') - getPreferences().savePreferences() - }} - /> - } - label="Dark Mode" - /> - ) -} -const ThemePalette = () => { - const [palette, setPalette] = React.useState( - getCurrentTheme().palette === 'custom' - ) - const { listenTo } = useBackbone() - React.useEffect(() => { - listenTo(user.get('user').get('preferences'), 'change:theme', () => { - setPalette(getCurrentTheme().palette === 'custom') - }) - }, []) - return ( - <> - - { - getPreferences() - .get('theme') - .set('palette', e.target.checked ? 'custom' : 'default') - getPreferences().savePreferences() - }} - /> - } - label="Custom Palette" - /> - - - - - - ) -} -const ThemeSettings = () => { - return ( - - - - - - - - - - ) -} -export default hot(module)(ThemeSettings) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/typed-colors.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/typed-colors.tsx deleted file mode 100644 index c42d484145e..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme-settings/typed-colors.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import * as colors from '@mui/material/colors' - -export default colors as { - [key: string]: { - [key: number]: string - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme/index.tsx deleted file mode 100644 index bef4c180f7a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './theme' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme/theme.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme/theme.tsx deleted file mode 100644 index 2fbe73f96ea..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/theme/theme.tsx +++ /dev/null @@ -1,295 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { ThemeProvider } from 'styled-components' -import { - ThemeInterface, - SpecificSizingInterface, - ThemeColorInterface, -} from '../styles/styled-components' -import user from '../../component/singletons/user-instance' - -import withListenTo, { WithBackboneProps } from '../backbone-container' -import $ from 'jquery' -import _ from 'underscore' -import { v4 } from 'uuid' - -type SizingInterface = { - comfortable: SpecificSizingInterface - cozy: SpecificSizingInterface - compact: SpecificSizingInterface - [key: string]: SpecificSizingInterface -} - -const sizing: SizingInterface = { - comfortable: { - minimumButtonSize: '2.75rem', - minimumLineSize: '1.875rem', - minimumSpacing: '0.625rem', - }, - cozy: { - minimumButtonSize: '2.275rem', - minimumLineSize: '1.6875rem', - minimumSpacing: '0.4625rem', - }, - compact: { - minimumButtonSize: '1.8rem', - minimumLineSize: '1.5rem', - minimumSpacing: '0.3rem', - }, -} - -const borderRadius = { - borderRadius: '1px', -} - -const screenSizes = { - minimumScreenSize: '20rem', - mobileScreenSize: '26.25rem', - smallScreenSize: '58.75rem', - mediumScreenSize: '90rem', -} - -const zIndexes = { - zIndexMenubar: 101, - zIndexLoadingCompanion: 101, - zIndexSlideout: 103, - zIndexContent: 101, - zIndexConfirmation: 103, - zIndexHelp: 104, - zIndexVerticalMenu: 101, - zIndexDropdown: 103, - zIndexMenuItem: 102, - zIndexBlocking: 105, -} - -const transitions = { - transitionTime: '0s', - coreTransitionTime: '0.250s', -} - -const fontSizes = { - minimumFontSize: '0.75rem', - mediumFontSize: '1rem', - largeFontSize: '1.25rem', -} - -const spacing = (minSpacing: number) => { - return { - minimumSpacing: `${minSpacing}rem`, - mediumSpacing: `${2 * minSpacing}rem`, - largeSpacing: `${3 * minSpacing}rem`, - } -} - -const dividers = (minSpacing: number) => { - return { - dividerHeight: `${minSpacing}rem`, - minimumDividerSize: `${3 * minSpacing}rem`, - } -} - -const opacity = { - minimumOpacity: 0.6, -} - -type ThemesInterface = { - dark: ThemeColorInterface - sea: ThemeColorInterface - light: ThemeColorInterface - custom: ThemeColorInterface - [key: string]: ThemeColorInterface -} - -const themes: ThemesInterface = { - // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message - dark: { - primaryColor: '#32a6ad', - positiveColor: '#5b963e', - negativeColor: '#943838', - warningColor: '#decd39', - favoriteColor: '#d1d179', - backgroundNavigation: '#213137', - backgroundAccentContent: '#34434c', - backgroundDropdown: '#253540', - backgroundContent: '#253540', - backgroundModal: '#253540', - backgroundSlideout: '#435059', - }, - // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message - sea: { - primaryColor: '#32a6ad', - positiveColor: '#154e7d', - negativeColor: '#a32c00', - warningColor: '#b65e1f', - favoriteColor: '#709e33', - backgroundNavigation: '#0f3757', - backgroundAccentContent: '#ffffff', - backgroundDropdown: '#ffffff', - backgroundContent: '#ffffff', - backgroundModal: '#e5e6e6', - backgroundSlideout: '#e5e6e6', - }, - // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message - light: { - primaryColor: '#3c6dd5', - positiveColor: '#428442', - negativeColor: '#8a423c', - warningColor: '#c89600', - favoriteColor: '#d1d179', - backgroundNavigation: '#3c6dd5', - backgroundAccentContent: '#edf9fc', - backgroundDropdown: '#f3fdff', - backgroundContent: '#f3fdff', - backgroundModal: '#edf9fc', - backgroundSlideout: '#edf9fc', - }, - // @ts-expect-error ts-migrate(2739) FIXME: Type '{ primaryColor: string; positiveColor: strin... Remove this comment to see the full error message - custom: { - primaryColor: '#3c6dd5', - positiveColor: '#428442', - negativeColor: '#8a423c', - warningColor: '#c89600', - favoriteColor: '#d1d179', - backgroundNavigation: '#252529', - backgroundAccentContent: '#2A2A2E', - backgroundDropdown: '#35353a', - backgroundContent: '#35353a', - backgroundModal: '#252529', - backgroundSlideout: '#252529', - }, -} - -type UserTheme = { - theme: string - [key: string]: string -} - -function updateTheme(userTheme: UserTheme) { - let relevantColorTheme = themes[userTheme.theme] - if (userTheme.theme === 'custom') { - // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. - relevantColorTheme = Object.keys(relevantColorTheme).reduce( - (newMap: UserTheme, key) => { - newMap[key] = - userTheme[`custom${key.replace(/^\w/, (c) => c.toUpperCase())}`] - return newMap - }, - {} - ) as ThemeColorInterface - } - let sizingTheme = sizing['comfortable'] - return { - ...relevantColorTheme, - ...userTheme, - ...sizingTheme, - ...borderRadius, - ...screenSizes, - ...zIndexes, - ...transitions, - ...fontSizes, - ...spacing(parseFloat(sizingTheme.minimumSpacing)), - ...dividers(parseFloat(sizingTheme.minimumSpacing)), - ...opacity, - } -} - -function determineScreenSize() { - const fontSize = parseInt(user.get('user').get('preferences').get('fontSize')) - const screenSize = window.innerWidth / fontSize - return screenSize -} - -/* - necessary evil since we have multiple react roots and want to share theming efficiently - yes it's awful, yes it's contained, yes you don't have to worry about theming as you go back and forth between - marionette and react because of this! -*/ -const sharedState: ThemeInterface = { - screenSize: determineScreenSize(), - multiple: (multiplier: number, variable: string, unit: string) => { - return `${multiplier * parseFloat(variable)}${unit ? unit : 'rem'}` - }, - screenBelow: (specifiedSize: string) => { - return sharedState.screenSize < parseFloat(specifiedSize) - }, - background: 'black', - ...updateTheme(user.get('user').get('preferences').get('theme').toJSON()), -} - -function updateMediaQueries() { - sharedState.screenSize = determineScreenSize() -} - -function updateSharedTheme() { - _.extend( - sharedState, - updateTheme(user.get('user').get('preferences').get('theme').toJSON()) - ) -} - -$(window).on(`resize.themeContainer`, _.throttle(updateMediaQueries, 30)) -user.get('user').get('preferences').on('change:theme', updateSharedTheme) -user.get('user').get('preferences').on('change:fontSize', updateMediaQueries) -class ThemeContainer extends React.Component< - WithBackboneProps & { children: React.ReactNode }, - ThemeInterface -> { - constructor(props: WithBackboneProps & { children: React.ReactNode }) { - super(props) - this.state = sharedState - } - id = v4() - isDestroyed = false - componentDidMount() { - this.listenForUserChanges() - this.watchScreenSize() - } - componentWillUnmount() { - $(window).off(`.${this.id}`) - this.isDestroyed = true // we have a throttled listener that updates state, so we need this! - } - watchScreenSize() { - $(window).on( - `resize.${this.id}`, - _.throttle(this.syncToSharedState.bind(this), 30) - ) - } - syncToSharedState() { - if (this.isDestroyed === true) { - return - } - this.setState(sharedState) - } - listenForUserChanges() { - this.props.listenTo( - user.get('user').get('preferences'), - 'change:theme', - this.syncToSharedState.bind(this) - ) - this.props.listenTo( - user.get('user').get('preferences'), - 'change:fontSize', - this.syncToSharedState.bind(this) - ) - } - render() { - return ( - {this.props.children} - ) - } -} - -export default withListenTo(ThemeContainer) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/container.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/container.tsx deleted file mode 100644 index edebeba3c26..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/container.tsx +++ /dev/null @@ -1,137 +0,0 @@ -//DELETE AFTER CATALOG-UI-SEARCH CUT -import * as React from 'react' -import { hot } from 'react-hot-loader' -import moment from 'moment' -import withListenTo, { WithBackboneProps } from '../backbone-container' - -import TimeSettingsPresentation from './presentation' -import { TimeZone, TimeFormat } from './types' -import { TimePrecision } from '@blueprintjs/datetime' - -import momentTimezone from 'moment-timezone' -import user from '../../component/singletons/user-instance' -import Common from '../../js/Common' -import { DateHelpers } from '../../component/fields/date-helpers' - -type UserPreferences = { - get: (key: string) => any - set: ({}) => void - savePreferences: () => void -} - -type State = { - currentTime: string - timeZones: TimeZone[] - timeZone: string - timeFormat: string - timePrecision: TimePrecision -} - -const getUserPreferences = (): UserPreferences => { - return user.get('user').get('preferences') -} - -const savePreferences = (model: {}) => { - const nullOrUndefinedValues = !Object.values(model).every((value) => !!value) - if (nullOrUndefinedValues) return - - const preferences = getUserPreferences() - preferences.set(model) - preferences.savePreferences() -} - -const getCurrentDateTimeFormat = () => - getUserPreferences().get('dateTimeFormat').datetimefmt - -const getCurrentTimePrecision = DateHelpers.General.getTimePrecision - -const getCurrentTimeZone = () => getUserPreferences().get('timeZone') - -const getCurrentTime = ( - format: string = getCurrentDateTimeFormat(), - timeZone: string = getCurrentTimeZone() -) => momentTimezone.tz(moment(), timeZone).format(format) - -const generateZoneObjects = (): TimeZone[] => { - const zoneNames = momentTimezone.tz.names() - const zones = zoneNames.map((zoneName: string) => { - const date = new Date() - - const timestamp = date.getTime() - const zone = momentTimezone.tz.zone(zoneName) - const zonedDate = momentTimezone.tz(timestamp, zoneName) - const offsetAsString = zonedDate.format('Z') - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. - const abbr = zone.abbr(timestamp) - - return { - timestamp: timestamp, - zone: zone, - zonedDate: zonedDate, - offsetAsString: offsetAsString, - abbr: abbr, - zoneName: zoneName, - } - }) - - return zones -} - -class TimeSettingsContainer extends React.Component { - timer: any - constructor(props: WithBackboneProps) { - super(props) - - this.state = { - currentTime: getCurrentTime(), - timeZones: generateZoneObjects(), - timeZone: getCurrentTimeZone(), - timeFormat: - Common.getDateTimeFormatsReverseMap()[getCurrentDateTimeFormat()] - .format, - timePrecision: getCurrentTimePrecision(), - } - } - - componentDidMount = () => { - const updateCurrentTimeClock = () => { - this.setState({ currentTime: getCurrentTime() }) - } - - this.timer = setInterval(updateCurrentTimeClock, 50) - } - - componentWillUnmount = () => { - clearInterval(this.timer) - } - - render = () => ( - { - savePreferences({ timeZone: timeZone.zoneName }) - }} - handleTimeFormatUpdate={(timeFormat: TimeFormat) => { - this.setState({ timeFormat: timeFormat.value }) - const dateTimeFormat = - Common.getDateTimeFormats()[timeFormat.value][ - this.state.timePrecision - ] - savePreferences({ dateTimeFormat }) - }} - timeFormat={this.state.timeFormat} - handleTimePrecisionUpdate={(timePrecision: TimePrecision) => { - this.setState({ timePrecision }) - const dateTimeFormat = - Common.getDateTimeFormats()[this.state.timeFormat][timePrecision] - savePreferences({ dateTimeFormat }) - }} - timePrecision={this.state.timePrecision} - /> - ) -} - -export default hot(module)(withListenTo(TimeSettingsContainer)) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/index.tsx deleted file mode 100644 index fc0ac670860..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './container' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/presentation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/presentation.tsx deleted file mode 100644 index 5e6a0f16259..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/presentation.tsx +++ /dev/null @@ -1,73 +0,0 @@ -//DELETE AFTER CATALOG-UI-SEARCH CUT -import * as React from 'react' -import { hot } from 'react-hot-loader' -import styled from 'styled-components' - -import TimeZoneSelector from './time-zone-picker' -import TimeFormatSelector from './time-format-picker' -import TimePrecisionSelector from './time-precision-picker' -import { TimeZone, TimeFormat } from './types' -import { TimePrecision } from '@blueprintjs/datetime' - -const Root = styled.div` - overflow: auto; - padding: ${(props: any) => props.theme.minimumSpacing}; -` - -const Time = styled.div` - width: 100%; - font-weight: bolder; - padding-top: ${(props: any) => props.theme.minimumSpacing}; - padding-right: ${(props: any) => props.theme.minimumSpacing}; - padding-bottom: ${(props: any) => props.theme.minimumSpacing}; - padding-left: ${(props: any) => props.theme.minimumSpacing}; -` - -const TimeLabel = styled.div` - padding-top: ${(props: any) => props.theme.minimumSpacing}; - padding-bottom: ${(props: any) => props.theme.minimumSpacing}; -` - -const TimeValue = styled.div` - padding-top: ${(props: any) => props.theme.minimumSpacing}; - padding-left: ${(props: any) => props.theme.minimumSpacing}; -` - -type Props = { - currentTime: string - timeZone: string - timeFormat: string - timeZones: TimeZone[] - timePrecision: TimePrecision - handleTimeZoneUpdate: (timeZone: TimeZone) => any - handleTimeFormatUpdate: (timeFormat: TimeFormat) => any - handleTimePrecisionUpdate: (timePrecision: TimePrecision) => any -} - -class TimeSettingsPresentation extends React.Component { - render = () => { - return ( - - - - - - - ) - } -} - -export default hot(module)(TimeSettingsPresentation) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-format-picker.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-format-picker.tsx deleted file mode 100644 index 6e0f4d829df..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-format-picker.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import { TimeFormat } from './types' - -type Props = { - timeFormat: string - handleTimeFormatUpdate: (timeFormat: TimeFormat) => any -} - -const timeFormats = [ - { - label: 'ISO 8601', - value: 'ISO', - }, - { - label: '24 Hour Standard', - value: '24', - }, - { - label: '12 Hour Standard', - value: '12', - }, -] as TimeFormat[] - -const TimeFormatSelector = (props: Props) => { - const initState = timeFormats.find((tf) => tf.value === props.timeFormat) - - const [currentTimeFormat, setCurrentTimeFormat] = React.useState(initState) - - return ( -
    - { - props.handleTimeFormatUpdate(newTimeFormat) - setCurrentTimeFormat(newTimeFormat) - }} - isOptionEqualToValue={(option: TimeFormat, value: TimeFormat) => { - return option.value === value.value - }} - options={timeFormats} - getOptionLabel={(format) => format.label} - style={{ width: '100%', paddingTop: '2em' }} - renderInput={(params) => ( - - )} - value={currentTimeFormat} - /> -
    - ) -} - -export default hot(module)(TimeFormatSelector) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-precision-picker.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-precision-picker.tsx deleted file mode 100644 index 27d1d72c19c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-precision-picker.tsx +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import { TimePrecision } from '@blueprintjs/datetime' - -type Props = { - timePrecision: TimePrecision - handleTimePrecisionUpdate: (timePrecision: TimePrecision) => any -} - -type PrecisionOption = { - label: string - value: TimePrecision -} - -const Options = [ - { - label: 'Milliseconds', - value: 'millisecond', - }, - { - label: 'Seconds', - value: 'second', - }, - { - label: 'Minutes', - value: 'minute', - }, -] as PrecisionOption[] - -const TimePrecisionSelector = (props: Props) => { - const initState = Options.find( - (option) => option.value === props.timePrecision - ) - - const [timePrecision, setTimePrecision] = React.useState(initState) - - return ( -
    - { - props.handleTimePrecisionUpdate(newPrecision.value) - setTimePrecision(newPrecision) - }} - isOptionEqualToValue={(option, value) => { - return option.value === value.value - }} - options={Options} - getOptionLabel={(option) => option.label} - style={{ width: '100%', paddingTop: '2em' }} - renderInput={(params) => ( - - )} - value={timePrecision} - /> -
    - ) -} - -export default hot(module)(TimePrecisionSelector) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-zone-picker.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-zone-picker.tsx deleted file mode 100644 index 080a0d613c6..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/time-zone-picker.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Autocomplete from '@mui/material/Autocomplete' -import TextField from '@mui/material/TextField' -import { TimeZone } from './types' - -type Props = { - timeZone: string - timeZones: TimeZone[] - handleTimeZoneUpdate: (timeZone: TimeZone) => any -} - -const TimeZoneSelector = (props: Props) => { - const getDefaultTimeZone = (timeZoneName: string) => { - return props.timeZones.find((zone) => zone.zoneName === timeZoneName) - } - - let [currentTimeZone, setCurrentTimeZone] = React.useState( - getDefaultTimeZone(props.timeZone) - ) - - return ( -
    - { - props.handleTimeZoneUpdate(newTimeZone) - setCurrentTimeZone(newTimeZone) - }} - isOptionEqualToValue={(oldZone: TimeZone, newZone: TimeZone) => { - return oldZone.zoneName === newZone.zoneName - }} - options={props.timeZones} - getOptionLabel={(zone) => - `${zone.zoneName}, ${zone.abbr}, ${zone.offsetAsString}` - } - style={{ width: '100%' }} - renderInput={(params) => ( - - )} - value={currentTimeZone} - /> -
    - ) -} - -export default hot(module)(TimeZoneSelector) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/types.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/types.tsx deleted file mode 100644 index cce6b916312..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/time-settings/types.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import moment from 'moment-timezone' -export type TimeZone = { - timestamp: number - zone: moment.MomentZone | null - zonedDate: moment.Moment - offsetAsString: string - abbr: string - zoneName: string -} - -export type TimeFormat = { - label: string - value: string -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/unsaved-indicator/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/unsaved-indicator/index.tsx deleted file mode 100644 index 3e303f16816..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/unsaved-indicator/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './unsaved-indicator' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.tsx deleted file mode 100644 index 8f6e4b672af..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/unsaved-indicator/unsaved-indicator.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' - -interface Props { - shown: boolean - className?: string - style?: React.CSSProperties -} - -const Root = styled.span` - display: inline-block; - line-height: inherit; - vertical-align: top; - color: ${(props) => { - return props.theme.warningColor - }}; - - transition: ${({ theme }) => { - return `transform ${theme.coreTransitionTime} ease-out, opacity ${theme.coreTransitionTime} ease-out;` - }}; - - transform: ${(props) => `scale(${props.shown ? 1 : 2});`}; - opacity: ${(props) => (props.shown ? 1 : 0)}; -` - -export default function UnsavedIndicator(props: Props) { - const { className, style, ...otherProps } = props - return ( - - * - - ) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-notifications/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-notifications/index.tsx deleted file mode 100644 index 99e8bfad309..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-notifications/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './user-notifications' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-notifications/user-notifications.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-notifications/user-notifications.tsx deleted file mode 100644 index 3db963520f3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-notifications/user-notifications.tsx +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import styled from 'styled-components' -import withListenTo, { WithBackboneProps } from '../backbone-container' -import { NotificationGroupViewReact } from '../../component/notification-group/notification-group.view' -import user from '../../component/singletons/user-instance' -import moment from 'moment' -import userNotifications from '../../component/singletons/user-notifications' - -type Props = WithBackboneProps - -const Empty = styled.div` - transition: transform ${(props) => props.theme.coreTransitionTime} linear; - transform: scale(1); - text-align: center; - font-size: ${(props) => props.theme.largeFontSize}; - padding: ${(props) => props.theme.mediumSpacing}; -` -const Root = styled.div` - height: 100%; - width: 100%; - overflow: auto; -` -const Notifications = styled.div` - height: 100%; - width: 100%; - display: block; - padding: ${(props) => props.theme.mediumSpacing}; -` - -const informalName = (daysAgo: any) => { - switch (daysAgo) { - case -1: - return 'Future' - break - case 0: - return 'Today' - break - case 1: - return 'Yesterday' - break - default: - return moment().subtract(daysAgo, 'days').format('dddd') - break - } -} - -const getFilterForDay = (numDays: number) => { - if (numDays < 0) { - return (model: any) => { - return moment().diff(model.get('sentAt'), 'days') < 0 - } - } else if (numDays < 7) { - return (model: any) => { - return moment().diff(model.get('sentAt'), 'days') === numDays - } - } else { - return (model: any) => { - return moment().diff(model.get('sentAt'), 'days') >= 7 - } - } -} - -const dayRange = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8] - -class UserNotifications extends React.Component { - notificationGroups: any - constructor(props: Props) { - super(props) - this.props.listenTo(userNotifications, 'add remove update', () => - this.setState({}) - ) - } - render() { - return userNotifications.isEmpty() ? ( - -
    No Notifications
    -
    - ) : ( - -
    - - {dayRange.map((day) => { - return ( - - ) - })} - -
    -
    - ) - } - componentWillUnmount() { - userNotifications.setSeen() - user.savePreferences() - } -} - -export default withListenTo(UserNotifications) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-settings/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-settings/index.tsx deleted file mode 100644 index efdbf00e268..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-settings/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default as BaseUserSettings, BaseSettings } from './user-settings' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-settings/user-settings.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-settings/user-settings.tsx deleted file mode 100644 index affb16a5e3f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user-settings/user-settings.tsx +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { createGlobalStyle } from 'styled-components' -import ThemeSettings from '../theme-settings' -import AlertSettings from '../alert-settings' -import AttributeSettings from '../attribute-settings' -import SearchSettings from '../search-settings' -import TimeSettings from '../time-settings' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import ChevronRight from '@mui/icons-material/ChevronRight' -import Grid from '@mui/material/Grid' -import Typography from '@mui/material/Typography' -import Divider from '@mui/material/Divider' -import { useLocation } from 'react-router-dom' -import queryString from 'query-string' -import { Link } from '../../component/link/link' -import { MapUserSettings } from '../map-user-settings/map-user-settings' - -const ThemeGlobalStyle = createGlobalStyle` -.MuiBackdrop-root { - opacity: 0 !important; -} -.MuiDrawer-root > .MuiPaper-root { - transform: scale(.8) translateY(10%) translateX(-10%) !important; -} -` - -type IndividualSettingsComponentType = ({ - SettingsComponents, -}: { - SettingsComponents: SettingsComponentType -}) => JSX.Element - -export type SettingsComponentType = { - [key: string]: { - component: IndividualSettingsComponentType - } -} - -export const BaseSettings = { - Settings: { - component: ({ SettingsComponents }) => { - return - }, - }, - Theme: { - component: () => { - return ( - <> - - - - ) - }, - }, - Notifications: { - component: () => { - return - }, - }, - Map: { - component: () => { - return - }, - }, - 'Search Options': { - component: () => { - return - }, - }, - 'Attribute Options': { - component: () => { - return - }, - }, - Time: { - component: () => { - return - }, - }, -} as SettingsComponentType - -const SettingsScreen = ({ - SettingsComponents, -}: { - SettingsComponents: SettingsComponentType -}) => { - const location = useLocation() - const queryParams = queryString.parse(location.search) - return ( - - {Object.keys(SettingsComponents) - .filter((name) => name !== 'Settings') - .map((name) => { - return ( - - - - ) - })} - - ) -} - -const getName = ({ - CurrentSetting, - SettingsComponents, -}: { - CurrentSetting: IndividualSettingsComponentType - SettingsComponents: SettingsComponentType -}) => { - const matchedSetting = Object.entries(SettingsComponents).find((entry) => { - return entry[1].component === CurrentSetting - }) - if (matchedSetting) { - return matchedSetting[0] - } - return '' -} - -const getComponent = ({ - name, - SettingsComponents, -}: { - name: string - SettingsComponents: SettingsComponentType -}) => { - const matchedSetting = Object.entries(SettingsComponents).find((entry) => { - return entry[0] === name - }) - if (matchedSetting) { - return matchedSetting[1].component - } - return SettingsComponents.Settings.component -} - -type UserSettingsProps = { - SettingsComponents: SettingsComponentType -} - -const UserSettings = ({ SettingsComponents }: UserSettingsProps) => { - const location = useLocation() - const queryParams = queryString.parse(location.search) - - const CurrentSetting = getComponent({ - name: (queryParams['global-settings'] || '') as string, - SettingsComponents, - }) - const name = getName({ CurrentSetting, SettingsComponents }) - return ( - - - - - - - {name !== 'Settings' ? ( - <> - - - - - {name} - - - ) : null} - - - - - - - - - - ) -} - -export default hot(module)(UserSettings) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user/user.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user/user.tsx deleted file mode 100644 index 9d4eddbbc75..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/user/user.tsx +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import * as React from 'react' -import { hot } from 'react-hot-loader' -import Button from '@mui/material/Button' -import { DarkDivider } from '../../component/dark-divider/dark-divider' -import PersonIcon from '@mui/icons-material/Person' -import user from '../../component/singletons/user-instance' -import FormControlLabel from '@mui/material/FormControlLabel' -import Switch from '@mui/material/Switch' -import Typography from '@mui/material/Typography' -import ExtensionPoints from '../../extension-points/extension-points' -import { postSimpleAuditLog } from '../../react-component/utils/audit/audit-endpoint' -import { useDialog } from '../../component/dialog' -import DialogTitle from '@mui/material/DialogTitle' -import DialogContentText from '@mui/material/DialogContentText' -import CircularProgress from '@mui/material/CircularProgress' -import DialogContent from '@mui/material/DialogContent' -import { - getIsUsingElevatedRights, - setIsUsingElevatedRights, -} from '../../component/elevated-rights/elevated-rights' - -export const EnhancedRolesContext = React.createContext<{ - enhancedRoles: string[] -}>({ - enhancedRoles: [], -}) - -const useEnhancedRoles = () => { - const { enhancedRoles } = React.useContext(EnhancedRolesContext) - return enhancedRoles -} - -export const RoleDisplay = () => { - const isUsingElevatedRights = getIsUsingElevatedRights() - const enhancedRoles = useEnhancedRoles() - - if (isUsingElevatedRights && enhancedRoles.length > 0) { - return <>Advanced - } - return null -} - -const RolesToggle = () => { - const isUsingElevatedRights = getIsUsingElevatedRights() - const enhancedRoles = useEnhancedRoles() - const dialogContext = useDialog() - - if (!enhancedRoles || enhancedRoles.length === 0) { - return null - } - - return ( -
    -
    Role
    - Advanced} - control={ - { - setIsUsingElevatedRights(e.target.checked) - postSimpleAuditLog({ - action: 'ROLE_CHANGE', - component: e.target.checked - ? 'user enabled advanced_mode, roles: [' + enhancedRoles + ']' - : 'user disabled advanced_mode', - }) - dialogContext.setProps({ - open: true, - onClose: () => {}, - children: ( - <> - - Switching Role - - - - The page will refresh to complete the role change. - -
    - -
    -
    - - ), - }) - setTimeout(() => { - window.location.reload() - }, 1000) - }} - /> - } - /> -
    -
    My Advanced Roles
    - {enhancedRoles.map((role) => { - return
    {role}
    - })} -
    -
    - ) -} - -const UserComponent = () => { - const username = user.getUserName() - const email = user.getEmail() - const signOut = () => { - window.location.href = - '../../logout?service=' + encodeURIComponent(window.location.href) - } - return ( -
    -
    -
    -
    - -
    -
    -
    - {username} -
    -
    - {email} -
    -
    -
    - - -
    - -
    - -
    -
    - ) -} - -export default hot(module)(UserComponent) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/audit/audit-endpoint.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/audit/audit-endpoint.tsx deleted file mode 100644 index 5f3ca69694a..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/audit/audit-endpoint.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import fetch from '../fetch' - -export type AuditItem = { - id: String - 'source-id'?: String -} - -export type AuditLog = { - action: string - component: string - items: AuditItem[] -} - -export type SimpleAuditLog = { - action: string - component: string -} - -export const postAuditLog = async ({ action, component, items }: AuditLog) => { - const body = { - action, - component, - items, - } - await fetch(`./internal/audit/`, { - method: 'POST', - body: JSON.stringify(body), - }) -} - -export const postSimpleAuditLog = async ({ - action, - component, -}: SimpleAuditLog) => { - const body = { - action, - component, - } - await fetch(`./internal/audit/simple`, { - method: 'POST', - body: JSON.stringify(body), - }) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/cql/cql.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/cql/cql.tsx deleted file mode 100644 index 33deff289c8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/cql/cql.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export const getResultSetCql = (ids: string[]) => { - const queries = ids.map((id) => `(("id" = '${id}'))`) - return `((${queries.join(' OR ')}) AND ("metacard-tags" ILIKE '%'))` -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/cql/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/cql/index.tsx deleted file mode 100644 index cf90b62e513..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/cql/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { getResultSetCql } from './cql' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/export/export.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/export/export.tsx deleted file mode 100644 index ff18c19d512..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/export/export.tsx +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import fetch from '../fetch' -import { LazyQueryResult } from '../../../js/model/LazyQueryResult/LazyQueryResult' -import { StartupDataStore } from '../../../js/model/Startup/startup' -import { TypedUserInstance } from '../../../component/singletons/TypedUser' -import { Overridable } from '../../../js/model/Base/base-classes' - -export enum Transformer { - Metacard = 'metacard', - Query = 'query', -} - -export type ResultSet = { - cql: string - src?: string - srcs?: string[] - start?: number - count: number -} - -export type ExportBody = { - searches: ResultSet[] - count: number - sorts: Object[] - args?: Object -} - -export type ExportFormat = { - id: string - displayName: string -} - -export interface ExportCountInfo { - exportSize: string - selectionInterface: any - customExportCount: number -} - -export type ExportInfo = { - exportFormat: string - exportSize: string - customExportCount: number - selectionInterface: any -} - -export const getExportResults = (results: LazyQueryResult[]) => { - return results.map((result) => getExportResult(result)) -} - -const getResultId = (result: LazyQueryResult) => { - const id = result.plain.id - - return encodeURIComponent(id) -} - -const getResultSourceId = (result: LazyQueryResult) => { - const sourceId = result.plain.metacard.properties['source-id'] - - return encodeURIComponent(sourceId) -} - -export const getExportResult = (result: LazyQueryResult) => { - return { - id: getResultId(result), - source: getResultSourceId(result), - attributes: Object.keys(result.plain.metacard.properties), - } -} - -export const getExportOptions = async (type: Transformer) => { - const response = await fetch(`./internal/transformers/${type}`) - .then((response) => response.json()) - .then((exportFormats) => { - const configuredFormats = - type == Transformer.Metacard - ? StartupDataStore.Configuration.getExportMetacardFormatOptions() - : StartupDataStore.Configuration.getExportMetacardsFormatOptions() - - if (configuredFormats.length > 0) { - const newFormats = configuredFormats - .map((configuredFormat: string) => { - const validFormat = exportFormats.find( - (exportFormat: ExportFormat) => - exportFormat.id === configuredFormat - ) - if (validFormat == undefined) - console.log( - configuredFormat + - ' does not match any valid transformers; cannot include format in export list.' - ) - return validFormat - }) - .filter((format) => format !== undefined) - - if (newFormats.length > 0) return newFormats - else - console.log( - "Could not match admin's configured export options to any valid transformers. \ - Returning list of all valid transformers instead." - ) - } else { - console.log( - 'Export formats not configured. Using list of all valid transformers instead.' - ) - } - return exportFormats - }) - - return response -} - -export const getColumnOrder = () => { - return TypedUserInstance.getResultsAttributesSummaryShown() -} - -export const OverridableGetColumnOrder = new Overridable(getColumnOrder) - -export const aliasMap = () => { - return encodeURIComponent( - Object.entries( - StartupDataStore.Configuration.config?.attributeAliases || {} - ) - .map(([k, v]) => { - return `${k}=${v}` - }) - .toString() - ) -} - -export const exportResultSet = async ( - transformer: string, - body: ExportBody -) => { - return await fetch(`./internal/cql/transform/${transformer}`, { - method: 'POST', - body: JSON.stringify(body), - headers: { - 'Content-Type': 'application/json', - }, - }) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/export/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/export/index.tsx deleted file mode 100644 index 35c98eff17c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/export/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { - getExportOptions, - exportResultSet, - ExportBody, - Transformer, - ResultSet, - ExportCountInfo, - ExportInfo, - OverridableGetColumnOrder, - getColumnOrder, - aliasMap, - ExportFormat, -} from './export' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/fetch/fetch.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/fetch/fetch.tsx deleted file mode 100644 index ac2ea66fb8c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/fetch/fetch.tsx +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import url from 'url' -import qs from 'querystring' -import { Environment } from '../../../js/Environment' -import { v4 } from 'uuid' - -export type QueryResponseType = { - results: any - statusBySource: { - [key: string]: { - hits: number - count: number - elapsed: number - id: string - successful: boolean - warnings: any[] - errors: string[] - } - } - types: any - highlights: any - didYouMeanFields: any - showingResultsForFields: any -} - -export function checkForErrors(response: QueryResponseType) { - const { statusBySource } = response - - if (statusBySource) { - const errors = Object.values(statusBySource).flatMap( - (source) => source.errors - ) - - if (errors.length > 0) { - throwFetchErrorEvent(errors) - } - } -} - -const fetch = window.fetch -;(window as any).__global__fetch = fetch -// patch global fetch to warn about usage during development -if (process.env.NODE_ENV !== 'production') { - window.fetch = (...args: any[]) => { - const error = new Error( - [ - `Using 'window.fetch'.`, - 'Are you sure you want to do this?', - `Most code should use 'react-component/utils/fetch' which provides defaults compatible with the backend.`, - `To get rid of this message, use 'window.__global__fetch' instead.`, - ].join(' ') - ) - console.warn(error) - // @ts-expect-error ts-migrate(2556) FIXME: Expected 1-2 arguments, but got 0 or more. - return fetch(...args) - } -} -const cacheBust = (urlString: string) => { - const { query, ...rest } = url.parse(urlString) - return url.format({ - ...rest, - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string | null' is not assignable... Remove this comment to see the full error message - search: '?' + qs.stringify({ ...qs.parse(query), _: Date.now() }), - }) -} - -export type FetchErrorEventType = CustomEvent<{ - errors: string[] -}> - -const fetchErrorEventName = v4() // ensure we don't clash with other events - -export function throwFetchErrorEvent(errors: string[] = []) { - if (typeof window !== 'undefined') { - const customEvent: FetchErrorEventType = new CustomEvent( - fetchErrorEventName, - { - detail: { - errors, - }, - } - ) - window.dispatchEvent(customEvent) - } -} - -export function listenForFetchErrorEvent( - callback: (event: FetchErrorEventType) => void -) { - if (typeof window !== 'undefined') { - window.addEventListener(fetchErrorEventName, callback) - return () => { - window.removeEventListener(fetchErrorEventName, callback) - } - } - return () => {} -} - -export default async function ( - url: string, - { headers, ...opts }: RequestInit = {} -): Promise { - if (Environment.isTest()) { - const { default: MockApi } = await import('../../../test/mock-api') - return Promise.resolve({ - json: await function () { - return MockApi(url) - }, - }) as Promise - } - return fetch(cacheBust(url), { - credentials: 'same-origin', - cache: 'no-cache', - ...opts, - headers: { - 'X-Requested-With': 'XMLHttpRequest', - ...headers, - }, - }).then((response) => { - if (response.status === 500) { - throwFetchErrorEvent([response.statusText || 'Internal Server Error']) - } - return response - }) -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/fetch/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/fetch/index.tsx deleted file mode 100644 index b031076ea01..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/fetch/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './fetch' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/query/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/query/index.tsx deleted file mode 100644 index 3be59416868..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/query/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './query' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/query/query.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/query/query.tsx deleted file mode 100644 index 39dce01d9ed..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/query/query.tsx +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import fetch from '../fetch' - -type Query = { - srcs?: string[] - count?: number - cql: string - facets?: string[] -} - -const query = async (q: Query) => { - const res = await fetch('./internal/cql', { - method: 'POST', - body: JSON.stringify(q), - }) - - return res.json() -} - -export default query diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/save-file/save-file.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/save-file/save-file.tsx deleted file mode 100644 index 6107c7f7dd0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/save-file/save-file.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import $ from 'jquery' -import { Overridable } from '../../../js/model/Base/base-classes' - -export default async function saveFile(name: string, type: string, data: any) { - if (data != null && (navigator as any).msSaveBlob) - return (navigator as any).msSaveBlob(new Blob([data], { type: type }), name) - let a = $("") - let url = window.URL.createObjectURL(new Blob([data], { type: type })) - a.attr('href', url) - a.attr('download', name) - $('body').append(a) - a[0].click() - window.URL.revokeObjectURL(url) - a.remove() -} - -// return filename portion of content-disposition -export function getFilenameFromContentDisposition(contentDisposition: string) { - if (contentDisposition == null) { - return null - } - - let parts = contentDisposition.split('=', 2) - if (parts.length !== 2) { - return null - } - return parts[1] -} - -export const OverridableSaveFile = new Overridable(saveFile) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/security/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/security/index.tsx deleted file mode 100644 index 82cf0d075b9..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/security/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { Access, Restrictions, Security, Entry } from './security' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/security/security.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/security/security.tsx deleted file mode 100644 index 2ec163ed0e3..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/security/security.tsx +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// @ts-expect-error ts-migrate(2307) FIXME: Cannot find module '../../sharing' or its correspo... Remove this comment to see the full error message -import { Item } from '../../sharing' - -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either - * version 3 of the License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed along with this program and can be found at - * . - * - **/ -import _ from 'underscore' - -export type Entry = { - value: string - access: Access -} - -export enum Access { - None = 0, - Read = 1, - Write = 2, - Share = 3, -} - -export class Restrictions { - owner: string - accessGroups: string[] - accessGroupsRead: string[] - accessIndividuals: string[] - accessIndividualsRead: string[] - accessAdministrators: string[] - - static readonly GroupsRead = 'security.access-groups-read' - static readonly GroupsWrite = 'security.access-groups' - static readonly IndividualsRead = 'security.access-individuals-read' - static readonly IndividualsWrite = 'security.access-individuals' - static readonly AccessAdministrators = 'security.access-administrators' - - // remove this ugly function when everything is typescript - static from(obj: any): Restrictions { - if (typeof obj.get !== 'function') - return { - owner: obj.owner || obj['metacard.owner'], - accessGroups: obj.accessGroups || obj[this.GroupsWrite] || [], - accessGroupsRead: obj.accessGroupsRead || obj[this.GroupsRead] || [], - accessIndividuals: - obj.accessIndividuals || obj[this.IndividualsWrite] || [], - accessIndividualsRead: - obj.accessIndividualsRead || obj[this.IndividualsRead] || [], - accessAdministrators: - obj.accessAdministrators || obj[this.AccessAdministrators] || [], - } as Restrictions - - return { - owner: obj.get('owner') || obj.get('metacard.owner'), - accessGroups: obj.get(this.GroupsWrite) || obj.get('accessGroups') || [], - accessGroupsRead: - obj.get(this.GroupsRead) || obj.get('accessGroupsRead') || [], - accessIndividuals: - obj.get(this.IndividualsWrite) || obj.get('accessIndividuals') || [], - accessIndividualsRead: - obj.get(this.IndividualsRead) || obj.get('accessIndividualsRead') || [], - accessAdministrators: - obj.get(this.AccessAdministrators) || - obj.get('accessAdministrators') || - [], - } as Restrictions - } -} - -export class Security { - private readonly res: Restrictions - - constructor(res: Restrictions) { - this.res = res - } - - private canAccess(user: any, accessLevel: Access) { - return ( - this.res.owner === undefined || - this.res.owner === user.getUserId() || - this.getAccess(user) >= accessLevel - ) - } - - canRead(user: any): boolean { - return this.canAccess(user, Access.Read) - } - - canWrite(user: any) { - return this.canAccess(user, Access.Write) - } - - canShare(user: any) { - return this.canAccess(user, Access.Share) - } - - isShared(): boolean { - return !( - this.res.accessGroups.length == 0 && - this.res.accessGroupsRead.length == 0 && - this.res.accessIndividuals.length == 0 && - this.res.accessIndividualsRead.length == 0 && - (this.res.accessAdministrators.length == 0 || - (this.res.accessAdministrators.length == 1 && - this.res.accessAdministrators[0] === this.res.owner)) - ) - } - - private getGroupAccess(group: string) { - if (this.res.accessGroups.indexOf(group) > -1) { - return Access.Write - } - - if (this.res.accessGroupsRead.indexOf(group) > -1) { - return Access.Read - } - - return Access.None - } - - private getIndividualAccess(userId: string) { - if (this.res.accessAdministrators.indexOf(userId) > -1) { - return Access.Share - } - - if (this.res.accessIndividuals.indexOf(userId) > -1) { - return Access.Write - } - - if (this.res.accessIndividualsRead.indexOf(userId) > -1) { - return Access.Read - } - - return Access.None - } - - private getAccess(user: any): Access { - return Math.max( - this.getIndividualAccess(user.getUserId()), - ...user.getRoles().map((group: string) => this.getGroupAccess(group)) - ) - } - - getGroups(forceIncludeGroups: string[]): Entry[] { - return _.union( - forceIncludeGroups, - this.res.accessGroups, - this.res.accessGroupsRead - ) - .map((group: string) => { - return { - value: group, - access: this.getGroupAccess(group), - } as Entry - }) - .sort(Security.compareFn) - } - - getIndividuals(): Entry[] { - return _.union( - this.res.accessIndividuals, - this.res.accessIndividualsRead, - this.res.accessAdministrators - ) - .map((userId: string) => { - return { - value: userId, - access: this.getIndividualAccess(userId), - } as Entry - }) - .sort(Security.compareFn) - } - - private static compareFn = (a: Item, b: Item): number => { - return a.value < b.value ? -1 : a.value > b.value ? 1 : 0 - } -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/validation/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/validation/index.tsx deleted file mode 100644 index bc2f00a0478..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/validation/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { - showErrorMessages, - getFilterErrors, - ErrorComponent, - validateGeo, - initialErrorState, - initialErrorStateWithDefault, - LINE_BUFFER_MININUM_METERS, -} from './validation' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/validation/validation.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/validation/validation.tsx deleted file mode 100644 index 7125b8c5aa0..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/validation/validation.tsx +++ /dev/null @@ -1,711 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import styled from 'styled-components' -import * as usngs from 'usng.js' -import _ from 'lodash' -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. -const converter = new usngs.Converter() -const NORTHING_OFFSET = 10000000 -const LATITUDE = 'latitude' -const LONGITUDE = 'longitude' -// 75 meters was determined to be a reasonable min for linestring searches based on testing against known -// data sources -export const LINE_BUFFER_MININUM_METERS = 75 -import DistanceUtils from '../../../js/DistanceUtils' -import { - parseDmsCoordinate, - dmsCoordinateToDD, -} from '../../../component/location-new/utils/dms-utils' -import wreqr from '../../../js/wreqr' -import { errorMessages } from '../../../component/location-new/utils' -export function showErrorMessages(errors: any) { - if (errors.length === 0) { - return - } - let searchErrorMessage = { - title: '', - message: '', - } - if (errors.length > 1) { - let msg = searchErrorMessage.message - searchErrorMessage.title = - 'Your search cannot be run due to multiple errors' - const formattedErrors = errors.map( - (error: any) => `\u2022 ${error.title}: ${error.body}` - ) - searchErrorMessage.message = msg.concat(formattedErrors) - } else { - const error = errors[0] - searchErrorMessage.title = error.title - searchErrorMessage.message = error.body - } - ;(wreqr as any).vent.trigger('snack', { - message: `${searchErrorMessage.title} : ${searchErrorMessage.message}`, - snackProps: { - alertProps: { - severity: 'error', - }, - }, - }) -} -export function getFilterErrors(filters: any) { - const errors = new Set() - let geometryErrors = new Set() - for (let i = 0; i < filters.length; i++) { - const filter = filters[i] - getGeometryErrors(filter).forEach((msg) => { - geometryErrors.add(msg) - }) - } - geometryErrors.forEach((err) => { - errors.add({ - title: 'Invalid geometry filter', - body: err, - }) - }) - return Array.from(errors) -} -// @ts-expect-error ts-migrate(7030) FIXME: Not all code paths return a value. -export function validateGeo(key: string, value: any) { - switch (key) { - case 'lat': - return validateDDLatLon(LATITUDE, value, 90) - case 'lon': - return validateDDLatLon(LONGITUDE, value, 180) - case 'dmsLat': - return validateDmsLatLon(LATITUDE, value) - case 'dmsLon': - return validateDmsLatLon(LONGITUDE, value) - case 'usng': - return validateUsng(value) - case 'easting': - case 'northing': - case 'zoneNumber': - case 'hemisphere': - return validateUtmUps(key, value) - case 'radius': - case 'lineWidth': - case 'polygonBufferWidth': - return validateRadiusLineBuffer(key, value) - case 'line': - case 'poly': - case 'polygon': - case 'multiline': - case 'multipolygon': - return validateLinePolygon(key, value) - case 'bbox': - return validateBoundingBox(key, value) - default: - } -} -export const ErrorComponent = (props: any) => { - const { errorState } = props - return errorState.error ? ( - - - {errorState.message} - - ) : null -} -export function validateListOfPoints(coordinates: any[], mode: string) { - let message = null - const isLine = mode.includes('line') - const numPoints = isLine ? 2 : 4 - if ( - !mode.includes('multi') && - !isLine && - coordinates.length >= numPoints && - !_.isEqual(coordinates[0], coordinates.slice(-1)[0]) - ) { - message = errorMessages.firstLastPointMismatch - } - if ( - !mode.includes('multi') && - !coordinates.some((coords) => coords.length > 2) && - coordinates.length < numPoints - ) { - message = `Minimum of ${numPoints} points needed for ${ - isLine ? 'Line' : 'Polygon' - }` - } - coordinates.forEach((coordinate) => { - if (coordinate.length > 2) { - coordinate.forEach((coord: any) => { - if (hasPointError(coord)) - message = JSON.stringify(coord) + ' is not a valid point' - }) - } else { - if (mode.includes('multi')) { - // Handle the case where the user has selected a "multi" mode but - // one or more shapes were invalid and therefore eliminated - message = `Switch to ${isLine ? 'Line' : 'Polygon'}` - } else if (hasPointError(coordinate)) { - message = JSON.stringify(coordinate) + ' is not a valid point' - } - } - }) - return { error: !!message, message } -} -export const initialErrorState = { - error: false, - message: '', -} -export const initialErrorStateWithDefault = { - error: false, - message: '', - defaultValue: '', -} -function is2DArray(coordinates: any[]) { - try { - return Array.isArray(coordinates) && Array.isArray(coordinates[0]) - } catch (e) { - return false - } -} -function hasPointError(point: any[]) { - if ( - point.length !== 2 || - Number.isNaN(Number.parseFloat(point[0])) || - Number.isNaN(Number.parseFloat(point[1])) - ) { - return true - } - return point[0] > 180 || point[0] < -180 || point[1] > 90 || point[1] < -90 -} -function getGeometryErrors(filter: any): Set { - const geometry = filter.geojson && filter.geojson.geometry - const errors = new Set() - if (!geometry) { - return errors - } - const properties = filter.geojson.properties - const buffer = properties.buffer - switch (properties.type) { - case 'Polygon': - if ( - !Array.isArray(geometry.coordinates[0]) || - !geometry.coordinates[0].length - ) { - errors.add( - 'Polygon coordinates must be in the form [[x,y],[x,y],[x,y],[x,y], ... ]' - ) - } else if (geometry.coordinates[0].length < 4) { - // check for MultiPolygon - geometry.coordinates[0].forEach((shape: number[]) => { - if (shape.length < 4) { - errors.add( - 'Polygon coordinates must be in the form [[x,y],[x,y],[x,y],[x,y], ... ]' - ) - } - }) - } - const polyBufferValidation = validateRadiusLineBuffer('bufferWidth', { - value: buffer.width, - units: buffer.unit, - }) - if (polyBufferValidation.error) { - errors.add(polyBufferValidation.message) - } - break - case 'LineString': - if ( - !Array.isArray(geometry.coordinates) || - !geometry.coordinates.length || - geometry.coordinates.length < 2 - ) { - errors.add('Line coordinates must be in the form [[x,y],[x,y], ... ]') - } - const bufferValidation = validateRadiusLineBuffer('lineWidth', { - value: buffer.width, - units: buffer.unit, - }) - // Can't just check !bufferWidth because of the case of the string "0" - if (bufferValidation.error) { - errors.add(bufferValidation.message) - } - break - case 'Point': - const radiusValidation = validateRadiusLineBuffer('radius', { - value: buffer.width, - units: buffer.unit, - }) - if (radiusValidation.error) { - errors.add(radiusValidation.message) - } - if ( - geometry.coordinates.some( - (coord: any) => !coord || coord.toString().length === 0 - ) - ) { - errors.add('Coordinates must not be empty') - } - break - case 'BoundingBox': - const { east, west, north, south } = filter.geojson.properties - if ( - [east, west, north, south].some( - (direction) => direction === '' || direction === undefined - ) || - Number(south) >= Number(north) || - Number(west) === Number(east) - ) { - errors.add('Bounding box must have valid values') - } - break - } - return errors -} -function validateLinePolygon(mode: string, currentValue: string) { - if (currentValue === undefined) { - return { - error: true, - message: `${mode === 'line' ? 'Line' : 'Polygon'} cannot be empty`, - } - } - try { - const parsedCoords = JSON.parse(currentValue) - if (!is2DArray(parsedCoords)) { - return { error: true, message: 'Not an acceptable value' } - } - return validateListOfPoints(parsedCoords, mode) - } catch (e) { - return { error: true, message: 'Not an acceptable value' } - } -} -function getDdCoords(value: any) { - return { - north: Number(value.north), - south: Number(value.south), - west: Number(value.west), - east: Number(value.east), - } -} -function getDmsCoords(value: any) { - const coordinateNorth = parseDmsCoordinate(value.north) - const coordinateSouth = parseDmsCoordinate(value.south) - const coordinateWest = parseDmsCoordinate(value.west) - const coordinateEast = parseDmsCoordinate(value.east) - let north, south, west, east - if (coordinateNorth) { - north = dmsCoordinateToDD({ - ...coordinateNorth, - direction: value.dmsNorthDirection, - }) - } - if (coordinateSouth) { - south = dmsCoordinateToDD({ - ...coordinateSouth, - direction: value.dmsSouthDirection, - }) - } - if (coordinateWest) { - west = dmsCoordinateToDD({ - ...coordinateWest, - direction: value.dmsWestDirection, - }) - } - if (coordinateEast) { - east = dmsCoordinateToDD({ - ...coordinateEast, - direction: value.dmsEastDirection, - }) - } - return { north, south, west, east } -} -function getUsngCoords(upperLeft: any, lowerRight: any) { - const upperLeftCoord = converter.USNGtoLL(upperLeft, true) - const lowerRightCoord = converter.USNGtoLL(lowerRight, true) - return { - north: Number(upperLeftCoord.lat.toFixed(5)), - south: Number(lowerRightCoord.lat.toFixed(5)), - west: Number(upperLeftCoord.lon.toFixed(5)), - east: Number(lowerRightCoord.lon.toFixed(5)), - } -} -function getUtmUpsCoords(upperLeft: any, lowerRight: any) { - const upperLeftParts = { - easting: parseFloat(upperLeft.easting), - northing: parseFloat(upperLeft.northing), - zoneNumber: upperLeft.zoneNumber, - hemisphere: upperLeft.hemisphere, - northPole: upperLeft.hemisphere.toUpperCase() === 'NORTHERN', - } - const lowerRightParts = { - easting: parseFloat(lowerRight.easting), - northing: parseFloat(lowerRight.northing), - zoneNumber: lowerRight.zoneNumber, - hemisphere: lowerRight.hemisphere, - northPole: lowerRight.hemisphere.toUpperCase() === 'NORTHERN', - } - upperLeftParts.northing = - upperLeftParts.zoneNumber === 0 || upperLeftParts.northPole - ? upperLeftParts.northing - : upperLeftParts.northing - NORTHING_OFFSET - lowerRightParts.northing = - lowerRightParts.zoneNumber === 0 || lowerRightParts.northPole - ? lowerRightParts.northing - : lowerRightParts.northing - NORTHING_OFFSET - const north = Number(converter.UTMUPStoLL(upperLeftParts).lat.toFixed(5)) - const south = Number(converter.UTMUPStoLL(lowerRightParts).lat.toFixed(5)) - const west = Number(converter.UTMUPStoLL(upperLeftParts).lon.toFixed(5)) - const east = Number(converter.UTMUPStoLL(lowerRightParts).lon.toFixed(5)) - return { north, south, west, east } -} -function validateLatitudes(north: any, south: any, isUsngOrUtmUps: boolean) { - if ( - !isNaN(south) && - !isNaN(north) && - parseFloat(south) >= parseFloat(north) - ) { - return { - error: true, - message: isUsngOrUtmUps - ? 'Upper left coordinate must be located above lower right coordinate' - : 'North value must be greater than south value', - } - } - return initialErrorState -} -function validateLongitudes(west: any, east: any, isUsngOrUtmUps: boolean) { - if (!isNaN(west) && !isNaN(east) && parseFloat(west) === parseFloat(east)) { - return { - error: true, - message: isUsngOrUtmUps - ? 'Left bound cannot equal right bound' - : 'West value cannot equal east value', - } - } - return initialErrorState -} -function validateBoundingBox(key: string, value: any) { - let coords, north, south, west, east - if (value.isDms) { - coords = getDmsCoords(value) - } else if (value.isUsng) { - coords = getUsngCoords(value.upperLeft, value.lowerRight) - } else if (value.isUtmUps) { - coords = getUtmUpsCoords(value.upperLeft, value.lowerRight) - } else { - coords = getDdCoords(value) - } - north = coords.north - south = coords.south - west = coords.west - east = coords.east - const isUsngOrUtmUps = value.isUsng || value.isUtmUps - if (key.toLowerCase().includes('lon')) { - const { error, message } = validateLongitudes(west, east, isUsngOrUtmUps) - if (error) { - return { error, message } - } - return validateLatitudes(north, south, isUsngOrUtmUps) - } else { - const { error, message } = validateLatitudes(north, south, isUsngOrUtmUps) - if (error) { - return { error, message } - } - return validateLongitudes(west, east, isUsngOrUtmUps) - } - return initialErrorState -} -function validateDDLatLon(label: string, value: string, defaultCoord: number) { - let message = '' - let defaultValue - if (value === undefined || value === null || value === '') { - message = getEmptyErrorMessage(label) - return { error: true, message, defaultValue } - } - if (Number(value) > defaultCoord || Number(value) < -1 * defaultCoord) { - defaultValue = Number(value) > 0 ? defaultCoord : -1 * defaultCoord - message = getDefaultingErrorMessage(value, label, defaultValue) - return { error: true, message, defaultValue } - } - return initialErrorStateWithDefault -} -function validateDmsLatLon(label: string, value: string) { - let message = '' - let defaultValue - const validator = label === LATITUDE ? 'dd°mm\'ss.s"' : 'ddd°mm\'ss.s"' - if (value === undefined || value === null || value === '') { - message = getEmptyErrorMessage(label) - return { error: true, message, defaultValue } - } - const dmsValidation = validateDmsInput(value, validator) - if (dmsValidation.error) { - defaultValue = dmsValidation.defaultValue - message = getDefaultingErrorMessage(value, label, defaultValue) - return { error: true, message, defaultValue } - } - return { error: false, message, defaultValue } -} -function validateUsng(value: string) { - if (value === '') { - return { error: true, message: 'USNG / MGRS coordinates cannot be empty' } - } - if (value === undefined) { - return initialErrorState - } - const result = converter.USNGtoLL(value, true) - const isInvalid = Number.isNaN(result.lat) || Number.isNaN(result.lon) - return { - error: isInvalid, - message: isInvalid ? 'Invalid USNG / MGRS coordinates' : '', - } -} -function upsValidDistance(distance: number) { - return distance >= 800000 && distance <= 3200000 -} -function validateUtmUps(key: string, value: any) { - let { easting, northing, zoneNumber, hemisphere } = value - const northernHemisphere = hemisphere.toUpperCase() === 'NORTHERN' - zoneNumber = Number.parseInt(zoneNumber) - const isUps = zoneNumber === 0 - let error = initialErrorState - // Number('') returns 0, so we can't just blindly cast to number - // since we want to differentiate '' from 0 - let utmUpsEasting = easting === '' ? NaN : Number(easting) - let utmUpsNorthing = northing === '' ? NaN : Number(northing) - const isNorthingInvalid = isNaN(utmUpsNorthing) && northing !== undefined - const isEastingInvalid = isNaN(utmUpsEasting) && easting !== undefined - if (!isNaN(utmUpsEasting)) { - utmUpsEasting = Number.parseFloat(easting) - } else if ( - key === 'utmUpsEasting' && - easting !== undefined && - !isNorthingInvalid - ) { - return { error: true, message: 'Easting value is invalid' } - } - if (!isNaN(utmUpsNorthing)) { - utmUpsNorthing = Number.parseFloat(northing) - utmUpsNorthing = - isUps || northernHemisphere - ? utmUpsNorthing - : utmUpsNorthing - NORTHING_OFFSET - } else if ( - key === 'utmUpsNorthing' && - northing !== undefined && - !isEastingInvalid - ) { - return { error: true, message: 'Northing value is invalid' } - } - if ( - isUps && - (!upsValidDistance(utmUpsNorthing) || !upsValidDistance(utmUpsEasting)) - ) { - return { error: true, message: 'Invalid UPS distance' } - } - const utmUpsParts = { - easting: utmUpsEasting, - northing: utmUpsNorthing, - zoneNumber, - hemisphere, - northPole: northernHemisphere, - } - // These checks are to ensure that we only mark a value as "invalid" - // if the user has entered something already - let { lat, lon } = converter.UTMUPStoLL(utmUpsParts) - lon = lon % 360 - if (lon < -180) { - lon = lon + 360 - } - if (lon > 180) { - lon = lon - 360 - } - // we want to validate using the hasPointError method, but only if they're both defined - // if one or more is undefined, we want to return true - const isLatLonValid = - !hasPointError([lon, lat]) || - northing === undefined || - easting === undefined - if ((isNorthingInvalid && isEastingInvalid) || !isLatLonValid) { - return { error: true, message: 'Invalid UTM/UPS coordinates' } - } - return error -} -function validateRadiusLineBuffer(key: string, value: any) { - const parsed = Number(value.value) - const buffer = Number.isNaN(parsed) ? 0 : parsed - const bufferMeters = DistanceUtils.getDistanceInMeters(buffer, value.units) - if (key === 'lineWidth' && bufferMeters < LINE_BUFFER_MININUM_METERS) { - const minDistance = DistanceUtils.getDistanceFromMeters( - LINE_BUFFER_MININUM_METERS, - value.units - ) - const minDistanceDisplay = Number.isInteger(minDistance) - ? minDistance.toString() - : // Add 0.01 to account for decimal places beyond hundredths. For example, if - // the selected unit is feet, then the required value is 246.063, and if we only - // showed (246.063).toFixed(2), then the user would see 246.06, but if they typed - // that in, they would still be shown this error. - (minDistance + 0.01).toFixed(2) - return { - error: true, - message: `Line buffer must be at least ${minDistanceDisplay} ${value.units}`, - } - } - - const label = key === 'radius' ? 'Radius ' : 'Buffer width ' - if (value.value.toString().length === 0) { - return initialErrorState - } - - if (key.includes('Width') && bufferMeters < 1 && bufferMeters !== 0) { - return { - error: true, - message: - label + - 'must be 0, or at least ' + - DistanceUtils.getDistanceFromMeters(1, value.units).toPrecision(2) + - ' ' + - value.units, - } - } else if (key.includes('radius') && bufferMeters < 1) { - return { - error: true, - message: - label + - 'must be at least ' + - DistanceUtils.getDistanceFromMeters(1, value.units).toPrecision(2) + - ' ' + - value.units, - } - } - return initialErrorState -} -const validateDmsInput = (input: any, placeHolder: string) => { - if (input !== undefined && placeHolder === 'dd°mm\'ss.s"') { - const corrected = getCorrectedDmsLatInput(input) - return { error: corrected !== input, defaultValue: corrected } - } else if (input !== undefined && placeHolder === 'ddd°mm\'ss.s"') { - const corrected = getCorrectedDmsLonInput(input) - return { error: corrected !== input, defaultValue: corrected } - } - return { error: false } -} -const lat = { - degreesBegin: 0, - degreesEnd: 2, - minutesBegin: 3, - minutesEnd: 5, - secondsBegin: 6, - secondsEnd: -1, -} -const lon = { - degreesBegin: 0, - degreesEnd: 3, - minutesBegin: 4, - minutesEnd: 6, - secondsBegin: 7, - secondsEnd: -1, -} -const getCorrectedDmsLatInput = (input: any) => { - const degrees = input.slice(lat.degreesBegin, lat.degreesEnd) - const minutes = input.slice(lat.minutesBegin, lat.minutesEnd) - const seconds = input.slice(lat.secondsBegin, lat.secondsEnd) - const maxDmsLat = '90°00\'00"' - if (degrees > 90) { - return maxDmsLat - } else if (minutes >= 60) { - if (degrees < 90) { - return (Number.parseInt(degrees) + 1).toString() + '°00\'00"' - } else { - return maxDmsLat - } - } else if (seconds >= 60) { - if (minutes < 59) { - return degrees + '°' + (Number.parseInt(minutes) + 1).toString() + '\'00"' - } else { - if (degrees >= '90') { - return maxDmsLat - } else { - return (Number.parseInt(degrees) + 1).toString() + '°00\'00"' - } - } - } else if ( - input.slice(lat.degreesBegin, lat.degreesEnd) === '9_' && - input.slice(lat.degreesEnd) === '°00\'00"' - ) { - return '9_°__\'__"' - } else if ( - input.slice(lat.minutesBegin, lat.minutesEnd) === '6_' && - input.slice(lat.minutesEnd) === '\'00"' - ) { - return input.slice(lat.degreesBegin, lat.degreesEnd) + '°6_\'__"' - } else { - return input - } -} -const getCorrectedDmsLonInput = (input: any) => { - const degrees = input.slice(lon.degreesBegin, lon.degreesEnd) - const minutes = input.slice(lon.minutesBegin, lon.minutesEnd) - const seconds = input.slice(lon.secondsBegin, lon.secondsEnd) - const maxDmsLon = '180°00\'00"' - if (degrees > 180) { - return maxDmsLon - } else if (minutes >= 60) { - if (degrees < 180) { - return (Number.parseInt(degrees) + 1).toString() + '°00\'00"' - } else { - return maxDmsLon - } - } else if (seconds > 60) { - if (minutes < 59) { - return degrees + '°' + (Number.parseInt(minutes) + 1).toString() + '\'00"' - } else { - if (degrees >= '180') { - return maxDmsLon - } else { - return (Number.parseInt(degrees) + 1).toString() + '°00\'00"' - } - } - } else if ( - input.slice(lon.degreesBegin, lon.degreesEnd) === '18_' && - input.slice(lon.degreesEnd) === '°00\'00"' - ) { - return '18_°__\'__"' - } else if ( - input.slice(lon.minutesBegin, lon.minutesEnd) === '6_' && - input.slice(lon.minutesEnd) === '\'00"' - ) { - return input.slice(lon.degreesBegin, lon.degreesEnd) + '°6_\'__"' - } else { - return input - } -} -function getDefaultingErrorMessage( - value: string, - label: string, - defaultValue: number -) { - return `${value.replace( - /_/g, - '0' - )} is not an acceptable ${label} value. Defaulting to ${defaultValue}` -} -function getEmptyErrorMessage(label: string) { - return `${label.replace(/^\w/, (c) => c.toUpperCase())} cannot be empty` -} -const Invalid = styled.div` - border: 1px solid ${(props) => props.theme.negativeColor}; - height: 100%; - display: block; - overflow: hidden; - color: white; -` -const WarningIcon = styled.span` - padding: ${({ theme }) => theme.minimumSpacing}; -` diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/index.tsx deleted file mode 100644 index 048b580537b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default } from './wrap-num' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.ts deleted file mode 100644 index ad139776e71..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/wrap-num.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -import { expect } from 'chai' -import wrapNum from './wrap-num' - -describe('wrap-num', () => { - it('overflow +1/-1', () => { - expect(wrapNum(181, -180, 180)).to.equal(-179) - expect(wrapNum(-181, -180, 180)).to.equal(179) - }) - it('overflow +/-a lot', () => { - expect(wrapNum(64.25 + 180 * 7, -180, 180)).to.equal(-180 + 64.25) - expect(wrapNum(-64.25 - 180 * 7, -180, 180)).to.equal(180 - 64.25) - }) - it('no overflow mid', () => { - expect(wrapNum(-179, -180, 180)).to.equal(-179) - expect(wrapNum(179, -180, 180)).to.equal(179) - expect(wrapNum(0, -180, 180)).to.equal(0) - expect(wrapNum(5, -180, 180)).to.equal(5) - expect(wrapNum(-15, -180, 180)).to.equal(-15) - }) - it('max should map to min', () => { - expect(wrapNum(180, -180, 180)).to.equal(-180) - }) - it('min should remain min', () => { - expect(wrapNum(-180, -180, 180)).to.equal(-180) - }) -}) diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/wrap-num.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/wrap-num.tsx deleted file mode 100644 index 7a58103cdc8..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/utils/wrap-num/wrap-num.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export default function wrapNum( - numberToWrap: number, - min: number, - max: number -): number { - const d = max - min - return ((((numberToWrap - min) % d) + d) % d) + min -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/visualization-selector/visualization-selector.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/visualization-selector/visualization-selector.tsx deleted file mode 100644 index e2b6e65e08b..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/react-component/visualization-selector/visualization-selector.tsx +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import React from 'react' -import styled from 'styled-components' -import { Visualizations } from '../../component/visualization/visualizations' -const CustomElement = styled.div` - height: 100%; - width: 100%; - display: block; -` -const Visualization = styled.div` - opacity: ${(props) => props.theme.minimumOpacity}; - padding: ${(props) => props.theme.largeSpacing}; - :hover { - opacity: 1; - } - white-space: nowrap; - cursor: move; -` -const VisualizationIcon = styled.div` - text-align: center; - width: ${(props) => props.theme.minimumButtonSize}; - display: inline-block; - vertical-align: middle; -` -const VisualizationText = styled.div` - width: calc(100% - ${(props) => props.theme.minimumButtonSize}); - font-size: ${(props) => props.theme.mediumFontSize}; - overflow: hidden; - text-overflow: ellipsis; - display: inline-block; - vertical-align: middle; -` -const configs = Visualizations.reduce((cfg, viz) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosable' does not exist on type 'Visu... Remove this comment to see the full error message - const { id, title, icon, isClosable = true } = viz - cfg[id] = { - title, - type: 'component', - componentName: id, - icon, - componentState: {}, - isClosable, - } - return cfg -}, {} as { [key: string]: any }) -export const unMaximize = (contentItem: any) => { - if (contentItem.isMaximised) { - contentItem.toggleMaximise() - return true - } else if (contentItem.contentItems.length === 0) { - return false - } else { - return (Array as any).some( - contentItem.contentItems, - (subContentItem: any) => { - return unMaximize(subContentItem) - } - ) - } -} -class VisualizationSelector extends React.Component<{ - goldenLayout: any - onClose: () => void -}> { - cesium: any - histogram: any - inspector: any - interimChoice: any - interimState: any - openlayers: any - table: any - dragSources = [] as any[] - constructor(props: any) { - super(props) - this.openlayers = React.createRef() - this.cesium = React.createRef() - this.inspector = React.createRef() - this.histogram = React.createRef() - this.table = React.createRef() - this.props.goldenLayout.on('stateChanged', () => { - this.forceUpdate() - }) - } - render() { - ;(window as any)._gl = this.props.goldenLayout - return ( - - {Object.values(configs).map( - ({ title, icon, componentName }, index) => ( - { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - this[componentName] = x - }} - onMouseDown={this.handleMouseDown.bind(this, componentName)} - onMouseUp={this.handleMouseUp.bind(this, componentName)} - className={ - JSON.stringify(this.props.goldenLayout.toConfig()).includes( - `"componentName":"${componentName}"` - ) - ? '' /** change to hidden to only allow one of each visual */ - : '' - } - > - - {title} - - ), - this - )} - - ) - } - componentDidMount() { - this.dragSources = [] as any[] - this.dragSources = Object.keys(configs).map((key) => - this.props.goldenLayout.createDragSource((this as any)[key], configs[key]) - ) - this.listenToDragSources() - } - listenToDragStart(dragSource: any) { - dragSource._dragListener.on('dragStart', () => { - this.interimState = false - }) - } - listenToDragStop(dragSource: any) { - dragSource._dragListener.on('dragStop', () => { - this.listenToDragStart(dragSource) - this.listenToDragStop(dragSource) - }) - } - listenToDragSources() { - this.dragSources.forEach((dragSource) => { - this.listenToDragStart(dragSource) - this.listenToDragStop(dragSource) - }) - } - handleChoice() { - this.props.onClose() - } - handleMouseDown(_event: any, choice: any) { - unMaximize(this.props.goldenLayout.root) - this.interimState = true - this.interimChoice = choice - } - handleMouseUp(choice: any) { - if (this.interimState) { - const content = { - ...configs[choice], - } - if (this.props.goldenLayout.root.contentItems.length === 0) { - this.props.goldenLayout.root.addChild({ - type: 'column', - content: [content], - }) - } else { - if (this.props.goldenLayout.root.contentItems[0].isColumn) { - this.props.goldenLayout.root.contentItems[0].contentItems[0].addChild( - content, - 0 - ) - } else { - this.props.goldenLayout.root.contentItems[0].addChild(content, 0) - } - } - } - this.interimState = false - } -} -export default VisualizationSelector diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/config.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/config.ts deleted file mode 100644 index 74d793fdae4..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/config.ts +++ /dev/null @@ -1,115 +0,0 @@ -export default { - mapHome: '', - resultCount: 250, - showLogo: false, - relevancePrecision: 5, - attributeDescriptions: {}, - basicSearchTemporalSelectionDefault: [ - 'created', - 'effective', - 'modified', - 'metacard.created', - 'metacard.modified', - ], - branding: 'DDF', - basicSearchMatchType: 'datatype', - onlineGazetteer: true, - imageryProviders: [ - { - type: 'SI', - url: './images/natural_earth_50m.png', - parameters: { - imageSize: [10800, 5400], - }, - alpha: 1, - name: 'Default Layer', - show: true, - proxyEnabled: true, - order: 0, - }, - ], - isCacheDisabled: false, - isVersioningEnabled: true, - summaryShow: ['created', 'modified', 'thumbnail'], - readOnly: [ - '^checksum$', - '^checksum-algorithm$', - '^id$', - '^resource-download-url$', - '^resource-uri$', - '^resource.derived-uri$', - '^resource.derived-download-url$', - '^modified$', - '^metacard-tags$', - '^metacard-type$', - '^metadata$', - '^source-id$', - '^point-of-contact$', - '^metacard.', - '^version.', - '^validation.', - ], - version: '2.14.0-SNAPSHOT', - i18n: { - 'sources.unavailable': - '{amountDown} {amountDown, plural, one {source is} other {sources are}} currently down', - 'sources.polling.error.title': 'Error Polling Sources', - 'search.sources.selected.none.message': - 'No sources are currently selected. Edit the search and select at least one source.', - 'sources.available': 'All sources are currently up', - 'sources.title': 'Sources', - 'sources.polling.error.message': - 'Unable to query server for list of active sources', - 'sources.options.all': 'All Sources', - 'form.title': 'title', - }, - isExperimental: false, - resultPageSize: 25, - sourcePollInterval: 60000, - requiredAttributes: [], - scheduleFrequencyList: [1800, 3600, 7200, 14400, 28800, 57600, 86400], - facetWhitelist: [], - terrainProvider: { - type: 'CT', - url: './proxy/catalog0', - }, - hiddenAttributes: ['^sorts$', '^cql$', '^polling$', '^cached$'], - timeout: 300000, - attributeAliases: {}, - commonAttributes: [], - enums: {}, - extra: {}, - editorAttributes: [], - resultShow: [], - disableUnknownErrorBox: false, - theme: 'dark', - projection: 'EPSG:4326', - defaultLayout: [ - { - type: 'stack', - content: [ - { - type: 'component', - component: 'cesium', - componentName: 'cesium', - title: '3D Map', - }, - { - type: 'component', - component: 'inspector', - componentName: 'inspector', - title: 'Inspector', - }, - ], - }, - ], - webSocketsEnabled: false, - showRelevanceScores: false, - product: 'Intrigue', - typeNameMapping: {}, - gazetteer: true, - exportResultLimit: 1000, - bingKey: '', - useHyphensInUuid: false, - disableLocalCatalog: false, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/datatype.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/datatype.ts deleted file mode 100644 index d93a83339e7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/datatype.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default { - datatype: [ - 'Interactive Resource', - 'Moving Image', - 'Still Image', - 'Dataset', - 'Collection', - 'Event', - 'Service', - 'Software', - 'Sound', - 'Text', - 'Image', - 'Physical Object', - ], -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/enumerations.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/enumerations.ts deleted file mode 100644 index 6b429a1eff5..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/enumerations.ts +++ /dev/null @@ -1,275 +0,0 @@ -export default { - 'location.country-code': [ - 'NZL', - 'FJI', - 'PNG', - 'GLP', - 'ZAR', - 'STP', - 'WLF', - 'MHL', - 'CUB', - 'SDN', - 'GMB', - 'CUW', - 'MYS', - 'MYT', - 'TWN', - 'POL', - 'OMN', - 'SUR', - 'ARE', - 'KEN', - 'ARG', - 'GNB', - 'UZB', - 'ARM', - 'TGO', - 'SEN', - 'BTN', - 'IRL', - 'IRN', - 'FLK', - 'QAT', - 'BDI', - 'NLD', - 'IRQ', - 'SVK', - 'SVN', - 'GNQ', - 'THA', - 'ABW', - 'ASM', - 'BUR', - 'SWE', - 'ISL', - 'MKD', - 'BEL', - 'ISR', - 'LIE', - 'KWT', - 'BEN', - 'DZA', - 'ATA', - 'BES', - 'RUS', - 'ATF', - 'ATG', - 'ITA', - 'SWZ', - 'TZA', - 'PAK', - 'CXR', - 'BFA', - 'PAN', - 'SGP', - 'UKR', - 'SGS', - 'KGZ', - 'JEY', - 'CHE', - 'BVT', - 'DJI', - 'REU', - 'PRI', - 'CHL', - 'CHN', - 'PRK', - 'SXM', - 'MLI', - 'BWA', - 'HRV', - 'KHM', - 'IDN', - 'PRT', - 'TJK', - 'MLT', - 'VNM', - 'PRY', - 'CYM', - 'SHN', - 'CYP', - 'SYC', - 'RWA', - 'BGD', - 'AUS', - 'AUT', - 'PSE', - 'LKA', - 'GAB', - 'ZWE', - 'YUG', - 'BGR', - 'SYR', - 'CZE', - 'UMI', - 'NOR', - 'CIV', - 'MMR', - 'TKL', - 'KIR', - 'TKM', - 'GRD', - 'GRC', - 'PCN', - 'HTI', - 'YEM', - 'GRL', - 'AFG', - 'MNE', - 'MNG', - 'NPL', - 'BHS', - 'BHR', - 'MNP', - 'GBR', - 'SJM', - 'DMA', - 'TLS', - 'HUN', - 'BIH', - 'AGO', - 'WSM', - 'FRA', - 'TMP', - 'MOZ', - 'NAM', - 'PER', - 'DNK', - 'GTM', - 'FRO', - 'SLB', - 'VAT', - 'SLE', - 'NRU', - 'GUF', - 'AIA', - 'SLV', - 'GUM', - 'FSM', - 'DOM', - 'CMR', - 'GUY', - 'AZE', - 'MAC', - 'GEO', - 'TON', - 'MAF', - 'NCL', - 'SMR', - 'ERI', - 'KNA', - 'MAR', - 'BLM', - 'VCT', - 'BLR', - 'MRT', - 'BLZ', - 'NTZ', - 'PHL', - 'COD', - 'COG', - 'ESH', - 'PYF', - 'URY', - 'COK', - 'COM', - 'COL', - 'USA', - 'ESP', - 'EST', - 'BMU', - 'MSR', - 'ZMB', - 'KOR', - 'SOM', - 'VUT', - 'ALA', - 'ECU', - 'ALB', - 'ETH', - 'MCO', - 'GGY', - 'NER', - 'LAO', - 'VEN', - 'GHA', - 'CPV', - 'MTQ', - 'MDA', - 'MDG', - 'SPM', - 'NFK', - 'LBN', - 'LBR', - 'MDV', - 'BOL', - 'GIB', - 'LBY', - 'HKG', - 'NGA', - 'CAF', - 'LSO', - 'MUS', - 'IMN', - 'LCA', - 'JOR', - 'GIN', - 'VGB', - 'CAN', - 'TCA', - 'TCD', - 'AND', - 'ROU', - 'CRI', - 'IND', - 'MEX', - 'SRB', - 'XKX', - 'KAZ', - 'SAU', - 'ANT', - 'JPN', - 'LTU', - 'TTO', - 'PLW', - 'MWI', - 'HMD', - 'SSD', - 'NIC', - 'FIN', - 'CCK', - 'TUN', - 'UGA', - 'LUX', - 'IOT', - 'TUR', - 'BRA', - 'BRB', - 'TUV', - 'DEU', - 'EGY', - 'LVA', - 'SCG', - 'JAM', - 'NIU', - 'VIR', - 'ZAF', - 'BRN', - 'HND', - ], - datatype: [ - 'Interactive Resource', - 'Moving Image', - 'Still Image', - 'Dataset', - 'Collection', - 'Event', - 'Service', - 'Software', - 'Sound', - 'Text', - 'Image', - 'Physical Object', - ], -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/index.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/index.ts deleted file mode 100644 index 74342278971..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/index.ts +++ /dev/null @@ -1,343 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import User from '../../js/model/User' -import MetacardTypeJSON from './metacardtype' -import Config from './config' -import PlatformConfig from './metacardtype' -import DatatypeJSON from './datatype' -import Sources from './sources' -import Enumerations from './enumerations' -import { StartupPayloadType } from '../../js/model/Startup/startup.types' - -const mockStartupPayload: StartupPayloadType = { - harvestedSources: [], - attributeMap: { - id: { id: 'id', isInjected: false, multivalued: false, type: 'STRING' }, - name: { id: 'name', isInjected: false, multivalued: false, type: 'STRING' }, - age: { id: 'age', isInjected: false, multivalued: false, type: 'FLOAT' }, - }, - config: { - extra: {}, - attributeDescriptions: [], - basicSearchTemporalSelectionDefault: ['created'], - mapHome: 'home', - resultCount: 10, - showLogo: true, - relevancePrecision: 0.85, - branding: 'My Company', - basicSearchMatchType: 'exact', - onlineGazetteer: true, - imageryProviders: [ - { - type: 'wms', - url: 'https://wms.example.com', - parameters: { - imageSize: [1024, 1024], - }, - alpha: 0.7, - name: 'Example WMS', - show: true, - proxyEnabled: true, - order: 1, - }, - // Add more imagery providers as needed - ], - isCacheDisabled: false, - isCustomTextNotationEnabled: true, - isVersioningEnabled: true, - isSpellcheckEnabled: true, - attributeSuggestionList: [], - requiredExportAttributes: [], - exportMetacardFormatOptions: [], - exportMetacardsFormatOptions: [], - summaryShow: ['name', 'age'], - readOnly: [], - version: '1.2.3', - commonAttributes: ['id', 'name', 'age'], - i18n: { - greeting: 'Hello!', - welcomeMessage: 'Welcome to our app!', - // Add more localized strings as needed - }, - customTextNotationAttribute: 'note', - isExperimental: false, - sourcePollInterval: 30000, - requiredAttributes: ['name'], - scheduleFrequencyList: [1, 5, 10, 30], - defaultSources: ['source-1', 'source-2'], - terrainProvider: { - type: 'cesium', - url: 'https://terrain.example.com', - }, - topLeftLogoSrc: 'logo-top-left.png', - hiddenAttributes: ['age'], - timeout: 120000, - attributeAliases: { - givenName: 'first_name', - familyName: 'last_name', - }, - iconConfig: { - user: { - code: '1234', - size: 'large', - className: 'user-icon', - font: 'FontAwesome', - }, - // Add more icon configurations as needed - }, - enums: { - status: ['Active', 'Inactive', 'Pending'], - // Add more enumerated values as needed - }, - editorAttributes: ['id', 'name', 'age'], - resultShow: ['name', 'age'], - disableUnknownErrorBox: false, - isFuzzyResultsEnabled: true, - theme: 'dark', - projection: 'EPSG:4326', - defaultLayout: [], - webSocketsEnabled: true, - showRelevanceScores: true, - menuIconSrc: 'menu-icon.png', - product: 'My Awesome App', - typeNameMapping: { - person: 'PersonType', - place: 'PlaceType', - }, - visualizations: [], - landingPageBackgroundSrc: 'landing-page-bg.png', - bottomLeftBackgroundSrc: 'bottom-left-bg.png', - gazetteer: true, - isPhoneticsEnabled: true, - helpUrl: 'https://help.example.com', - customBranding: '#ff00ff', - defaultTableColumns: ['id', 'name'], - exportResultLimit: 1000, - bingKey: 'BING_API_KEY', - bottomLeftLogoSrc: 'logo-bottom-left.png', - useHyphensInUuid: true, - disableLocalCatalog: false, - }, - localSourceId: 'local-source-1', - metacardTypes: { - 'metacard-type-1': { - id: { id: 'id', isInjected: false, multivalued: false, type: 'STRING' }, - name: { - id: 'name', - isInjected: false, - multivalued: false, - type: 'STRING', - }, - age: { id: 'age', isInjected: false, multivalued: false, type: 'FLOAT' }, - }, - // Add more metacard types as needed - }, - platformUiConfiguration: { - productImage: 'product.png', - vendorImage: 'vendor.png', - favIcon: 'favicon.ico', - header: 'My Awesome App', - color: '#4287f5', - footer: '© 2023 My Company. All rights reserved.', - background: '#f0f0f0', - title: 'My Startup', - version: '1.0.0', - timeout: 60000, - }, - sortedAttributes: [ - { id: 'id', isInjected: false, multivalued: false, type: 'STRING' }, - { id: 'name', isInjected: false, multivalued: false, type: 'STRING' }, - { id: 'age', isInjected: false, multivalued: false, type: 'FLOAT' }, - ], - sources: [ - { - sourceActions: [], - available: true, - id: 'source-1', - contentTypes: [{ name: 'Type A', version: '1.0' }], - version: '1.0.0', - local: true, - }, - { - sourceActions: [], - available: true, - id: 'source-2', - contentTypes: [{ name: 'Type B', version: '2.0' }], - version: '2.0.0', - local: false, - }, - // Add more sources as needed - ], - user: { - email: 'user@example.com', - isGuest: false, - preferences: { - id: 'user-123', - resultDisplay: 'table', - resultPreview: ['id', 'name'], - 'inspector-hideEmpty': true, - 'inspector-summaryShown': ['name', 'age'], - 'inspector-summaryOrder': ['name', 'age'], - 'inspector-detailsOrder': ['name', 'age'], - 'inspector-detailsHidden': ['id'], - 'results-attributesShownTable': ['id', 'name'], - 'results-attributesShownList': ['id', 'name', 'age'], - homeFilter: '', - homeSort: 'name', - homeDisplay: 'table', - decimalPrecision: 2, - alertPersistence: true, - alertExpiration: 86400000, - visualization: 'map', - columnHide: [], - columnOrder: ['id', 'name', 'age'], - columnWidths: [], - hasSelectedColumns: true, - oauth: [], - fontSize: 14, - dateTimeFormat: { - datetimefmt: 'YYYY-MM-DD HH:mm:ss', - timefmt: 'HH:mm:ss', - }, - timeZone: 'UTC', - coordinateFormat: 'degrees', - autoPan: true, - goldenLayout: { - settings: { - hasHeaders: true, - constrainDragToContainer: true, - reorderEnabled: true, - selectionEnabled: true, - popoutWholeStack: false, - blockedPopoutsThrowError: false, - closePopoutsOnUnload: true, - showPopoutIcon: true, - showMaximiseIcon: true, - showCloseIcon: true, - responsiveMode: 'always-on', - }, - dimensions: { - borderWidth: 5, - minItemHeight: 250, - minItemWidth: 300, - headerHeight: 20, - dragProxyWidth: 300, - dragProxyHeight: 200, - }, - labels: { - close: 'Close', - maximise: 'Maximize', - minimise: 'Minimize', - popout: 'Pop Out', - popin: 'Pop In', - tabDropdown: 'Additional Tabs', - }, - content: [], - isClosable: true, - reorderEnabled: true, - title: 'My Layout', - openPopouts: [], - }, - animation: true, - hoverPreview: true, - layoutId: 'layout-1', - mapLayers: [ - { - type: 'wms', - url: 'https://wms.example.com', - parameters: { - imageSize: [1024, 1024], - }, - alpha: 0.7, - name: 'Example WMS', - show: true, - proxyEnabled: true, - order: 1, - label: 'WMS Layer', - id: 'wms-1', - }, - // Add more map layers as needed - ], - alerts: [], - uploads: [ - { - unseen: false, - percentage: 0, - errors: 0, - successes: 0, - complete: 0, - amount: 0, - issues: 0, - sending: false, - finished: false, - interrupted: false, - sentAt: 0, - id: 'upload-1', - uploads: [], - }, - ], - theme: { - palette: 'light', - theme: 'default', - }, - querySettings: { - type: 'basic', - sources: ['source-1'], - sorts: [ - { attribute: 'name', direction: 'asc' }, - { attribute: 'age', direction: 'desc' }, - ], - spellcheck: true, - phonetics: false, - additionalOptions: '{}', - }, - }, - roles: ['user', 'admin'], - userid: 'user123', - username: 'user123', - }, -} - -const mockDataMap = { - './internal/metacardtype': MetacardTypeJSON, - './internal/config': Config, - './internal/platform/config/ui': PlatformConfig, - './internal/enumerations/attribute/datatype': DatatypeJSON, - './internal/user': (User as any).Model.prototype.defaults(), - './internal/localcatalogid': 'ddf.distribution', - './internal/forms/result': [], - './internal/catalog/sources': Sources, - './internal/compose/startup': mockStartupPayload, -} -const mockDataGlobs = { - './internal/enumerations': Enumerations, -} -// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'url' implicitly has an 'any' type. -export default (url) => { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - let data = mockDataMap[url] - if (data === undefined) { - Object.keys(mockDataGlobs).forEach((glob) => { - if (url.startsWith(glob)) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - data = mockDataGlobs[glob] - } - }) - } - if (data === undefined) { - throw new Error(`Unknown url '${url}' for mock api.`) - } - return data -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/metacardtype.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/metacardtype.ts deleted file mode 100644 index 196059b77e7..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/metacardtype.ts +++ /dev/null @@ -1,11322 +0,0 @@ -export default { - GeoEntryMetacardType: { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: true, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'ext.import-location': { - multivalued: false, - isInjected: false, - id: 'ext.import-location', - type: 'STRING', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: true, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: true, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'ext.feature-code': { - multivalued: false, - isInjected: false, - id: 'ext.feature-code', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: true, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: false, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: true, - id: 'associations.external', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: false, - id: 'location.crs-code', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-name', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: true, - id: 'contact.creator-email', - type: 'STRING', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: true, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: true, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'ext.population': { - multivalued: false, - isInjected: false, - id: 'ext.population', - type: 'LONG', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'ext.feature-class': { - multivalued: false, - isInjected: false, - id: 'ext.feature-class', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'ext.gazetteer-sort-value': { - multivalued: false, - isInjected: false, - id: 'ext.gazetteer-sort-value', - type: 'INTEGER', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: true, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'location.country-code': { - multivalued: true, - isInjected: false, - id: 'location.country-code', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: false, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - confluence: { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: true, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: true, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: true, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: true, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.pdf': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.mp4': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'ext.mp4.audio-sample-rate': { - multivalued: false, - isInjected: false, - id: 'ext.mp4.audio-sample-rate', - type: 'INTEGER', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.powerpoint': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - gmdMetacardType: { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: false, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: false, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: false, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: false, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'ddf.metacard': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'metadata-content-type': { - multivalued: false, - isInjected: false, - id: 'metadata-content-type', - type: 'STRING', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: true, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: true, - id: 'security.access-groups', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'metadata-content-type-version': { - multivalued: false, - isInjected: false, - id: 'metadata-content-type-version', - type: 'STRING', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-name', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - 'metadata-target-namespace': { - multivalued: false, - isInjected: false, - id: 'metadata-target-namespace', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: false, - id: 'effective', - type: 'DATE', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: true, - id: 'contact.creator-email', - type: 'STRING', - }, - 'point-of-contact': { - multivalued: false, - isInjected: false, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: true, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: true, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: true, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - kml: { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: false, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: false, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'location.country-code': { - multivalued: true, - isInjected: false, - id: 'location.country-code', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: false, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.mpeg': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.jpeg': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.doc': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'metacard.query': { - metadata: { - multivalued: false, - isInjected: true, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: true, - id: 'language', - type: 'STRING', - }, - polling: { - multivalued: false, - isInjected: false, - id: 'polling', - type: 'INTEGER', - }, - type: { - multivalued: false, - isInjected: false, - id: 'type', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - facets: { - multivalued: true, - isInjected: false, - id: 'facets', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: true, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: true, - id: 'modified', - type: 'DATE', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: true, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: true, - id: 'validation-warnings', - type: 'STRING', - }, - sorts: { - multivalued: true, - isInjected: false, - id: 'sorts', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: true, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-email', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: true, - id: 'created', - type: 'DATE', - }, - 'security.access-groups': { - multivalued: true, - isInjected: true, - id: 'security.access-groups', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: true, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: true, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: true, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: true, - id: 'validation-errors', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: true, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'detail-level': { - multivalued: false, - isInjected: false, - id: 'detail-level', - type: 'STRING', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: true, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: true, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-phone', - type: 'STRING', - }, - cql: { - multivalued: false, - isInjected: false, - id: 'cql', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: true, - id: 'associations.external', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: true, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - sources: { - multivalued: true, - isInjected: false, - id: 'sources', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-name', - type: 'STRING', - }, - enterprise: { - multivalued: false, - isInjected: false, - id: 'enterprise', - type: 'BOOLEAN', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: true, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: true, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: true, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: true, - id: 'source-id', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: true, - id: 'contact.creator-email', - type: 'STRING', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: true, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: true, - id: 'contact.creator-name', - type: 'STRING', - }, - schedules: { - multivalued: true, - isInjected: false, - id: 'schedules', - type: 'XML', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - filterTree: { - multivalued: false, - isInjected: false, - id: 'filterTree', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: true, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: true, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - federation: { - multivalued: false, - isInjected: false, - id: 'federation', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: true, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: true, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: true, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: true, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: true, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'resource-note': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: true, - id: 'failed-validators-errors', - type: 'STRING', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: true, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: true, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: true, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: true, - id: 'associations.external', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-name', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'ext.note.result-comment': { - multivalued: true, - isInjected: false, - id: 'ext.note.result-comment', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: true, - id: 'contact.creator-email', - type: 'STRING', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: true, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: true, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: true, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'query-template': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - polling: { - multivalued: false, - isInjected: false, - id: 'polling', - type: 'INTEGER', - }, - type: { - multivalued: false, - isInjected: false, - id: 'type', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - facets: { - multivalued: true, - isInjected: false, - id: 'facets', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: true, - id: 'failed-validators-errors', - type: 'STRING', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: true, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: true, - id: 'validation-warnings', - type: 'STRING', - }, - sorts: { - multivalued: true, - isInjected: false, - id: 'sorts', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: true, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'detail-level': { - multivalued: false, - isInjected: false, - id: 'detail-level', - type: 'STRING', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-phone', - type: 'STRING', - }, - cql: { - multivalued: false, - isInjected: false, - id: 'cql', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: true, - id: 'associations.external', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - sources: { - multivalued: true, - isInjected: false, - id: 'sources', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-name', - type: 'STRING', - }, - enterprise: { - multivalued: false, - isInjected: false, - id: 'enterprise', - type: 'BOOLEAN', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: true, - id: 'contact.creator-email', - type: 'STRING', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: true, - id: 'contact.creator-name', - type: 'STRING', - }, - schedules: { - multivalued: true, - isInjected: false, - id: 'schedules', - type: 'XML', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - filterTree: { - multivalued: false, - isInjected: false, - id: 'filterTree', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: true, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - federation: { - multivalued: false, - isInjected: false, - id: 'federation', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: true, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'ui.template-filter': { - multivalued: false, - isInjected: false, - id: 'ui.template-filter', - type: 'XML', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - cswMetacardType: { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: false, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: false, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: false, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: false, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - pdf: { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - common: { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: false, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: false, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: false, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: false, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'metacard.list': { - metadata: { - multivalued: false, - isInjected: true, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: true, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: true, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: true, - id: 'modified', - type: 'DATE', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'list.icon': { - multivalued: false, - isInjected: false, - id: 'list.icon', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: true, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: true, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: true, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-email', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: true, - id: 'created', - type: 'DATE', - }, - 'security.access-groups': { - multivalued: true, - isInjected: true, - id: 'security.access-groups', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: true, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: true, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: true, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: true, - id: 'validation-errors', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: true, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: true, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: true, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: true, - id: 'associations.external', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: true, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: true, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: true, - id: 'resource-download-url', - type: 'STRING', - }, - 'list.cql': { - multivalued: false, - isInjected: false, - id: 'list.cql', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: true, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: true, - id: 'source-id', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: true, - id: 'contact.creator-email', - type: 'STRING', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: true, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: true, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: true, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: true, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: true, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: true, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'list.bookmarks': { - multivalued: true, - isInjected: false, - id: 'list.bookmarks', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: true, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: true, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: true, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.common': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'metacard.version': { - 'metacard.sharing': { - multivalued: true, - isInjected: false, - id: 'metacard.sharing', - type: 'XML', - }, - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - type: { - multivalued: false, - isInjected: false, - id: 'type', - type: 'STRING', - }, - facets: { - multivalued: true, - isInjected: false, - id: 'facets', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'ext.import-location': { - multivalued: false, - isInjected: false, - id: 'ext.import-location', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'metacard.version.action': { - multivalued: false, - isInjected: false, - id: 'metacard.version.action', - type: 'STRING', - }, - sorts: { - multivalued: true, - isInjected: false, - id: 'sorts', - type: 'STRING', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: false, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'detail-level': { - multivalued: false, - isInjected: false, - id: 'detail-level', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'metadata-content-type-version': { - multivalued: false, - isInjected: false, - id: 'metadata-content-type-version', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - enterprise: { - multivalued: false, - isInjected: false, - id: 'enterprise', - type: 'BOOLEAN', - }, - 'metadata-target-namespace': { - multivalued: false, - isInjected: false, - id: 'metadata-target-namespace', - type: 'STRING', - }, - 'list.cql': { - multivalued: false, - isInjected: false, - id: 'list.cql', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'metacard.version.tags': { - multivalued: true, - isInjected: false, - id: 'metacard.version.tags', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - filterTree: { - multivalued: false, - isInjected: false, - id: 'filterTree', - type: 'STRING', - }, - federation: { - multivalued: false, - isInjected: false, - id: 'federation', - type: 'STRING', - }, - 'ext.feature-class': { - multivalued: false, - isInjected: false, - id: 'ext.feature-class', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - queries: { - multivalued: true, - isInjected: false, - id: 'queries', - type: 'STRING', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'location.country-code': { - multivalued: true, - isInjected: false, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'ui.template-filter': { - multivalued: false, - isInjected: false, - id: 'ui.template-filter', - type: 'XML', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - 'location.crs-name': { - multivalued: true, - isInjected: false, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - 'metadata-content-type': { - multivalued: false, - isInjected: false, - id: 'metadata-content-type', - type: 'STRING', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - polling: { - multivalued: false, - isInjected: false, - id: 'polling', - type: 'INTEGER', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'list.icon': { - multivalued: false, - isInjected: false, - id: 'list.icon', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'ext.feature-code': { - multivalued: false, - isInjected: false, - id: 'ext.feature-code', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'metacard.version.resource-uri': { - multivalued: false, - isInjected: false, - id: 'metacard.version.resource-uri', - type: 'STRING', - }, - lists: { - multivalued: true, - isInjected: false, - id: 'lists', - type: 'XML', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'metacard.version.versioned-on': { - multivalued: false, - isInjected: false, - id: 'metacard.version.versioned-on', - type: 'DATE', - }, - cql: { - multivalued: false, - isInjected: false, - id: 'cql', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: false, - id: 'location.crs-code', - type: 'STRING', - }, - sources: { - multivalued: true, - isInjected: false, - id: 'sources', - type: 'STRING', - }, - 'ext.mp4.audio-sample-rate': { - multivalued: false, - isInjected: false, - id: 'ext.mp4.audio-sample-rate', - type: 'INTEGER', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - 'metacard.version.type': { - multivalued: false, - isInjected: false, - id: 'metacard.version.type', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'ui.attribute-group': { - multivalued: true, - isInjected: false, - id: 'ui.attribute-group', - type: 'STRING', - }, - 'ext.note.result-comment': { - multivalued: true, - isInjected: false, - id: 'ext.note.result-comment', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: false, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: false, - id: 'point-of-contact', - type: 'STRING', - }, - schedules: { - multivalued: true, - isInjected: false, - id: 'schedules', - type: 'XML', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'metacard.version.edited-by': { - multivalued: false, - isInjected: false, - id: 'metacard.version.edited-by', - type: 'STRING', - }, - 'ext.population': { - multivalued: false, - isInjected: false, - id: 'ext.population', - type: 'LONG', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'ext.gazetteer-sort-value': { - multivalued: false, - isInjected: false, - id: 'ext.gazetteer-sort-value', - type: 'INTEGER', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'list.bookmarks': { - multivalued: true, - isInjected: false, - id: 'list.bookmarks', - type: 'STRING', - }, - 'metacard.version.id': { - multivalued: false, - isInjected: false, - id: 'metacard.version.id', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'metacard.version.type-binary': { - multivalued: false, - isInjected: false, - id: 'metacard.version.type-binary', - type: 'BINARY', - }, - }, - 'attribute-group': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: true, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: true, - id: 'datetime.end', - type: 'DATE', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: true, - id: 'media.width-pixels', - type: 'INTEGER', - }, - 'datetime.name': { - multivalued: true, - isInjected: true, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: true, - id: 'failed-validators-errors', - type: 'STRING', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: true, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: true, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: true, - id: 'media.scanning-mode', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: true, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: true, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: true, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: true, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: true, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: true, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: true, - id: 'associations.external', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-name', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: true, - id: 'media.format-version', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'ui.attribute-group': { - multivalued: true, - isInjected: false, - id: 'ui.attribute-group', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: true, - id: 'contact.creator-email', - type: 'STRING', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: true, - id: 'media.height-pixels', - type: 'INTEGER', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: true, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: true, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: true, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'topic.keyword': { - multivalued: true, - isInjected: true, - id: 'topic.keyword', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: true, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: true, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: true, - id: 'media.duration', - type: 'DOUBLE', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: true, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.type': { - multivalued: false, - isInjected: true, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: true, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: true, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: true, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'media.format': { - multivalued: false, - isInjected: true, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: true, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: true, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'fallback.excel': { - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: true, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: true, - id: 'location.crs-code', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: true, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: true, - id: 'point-of-contact', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'location.country-code': { - multivalued: true, - isInjected: true, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'location.crs-name': { - multivalued: true, - isInjected: true, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - }, - 'metacard.deleted': { - 'metacard.sharing': { - multivalued: true, - isInjected: false, - id: 'metacard.sharing', - type: 'XML', - }, - metadata: { - multivalued: false, - isInjected: false, - id: 'metadata', - type: 'XML', - }, - 'contact.publisher-address': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-address', - type: 'STRING', - }, - 'contact.contributor-name': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-name', - type: 'STRING', - }, - type: { - multivalued: false, - isInjected: false, - id: 'type', - type: 'STRING', - }, - facets: { - multivalued: true, - isInjected: false, - id: 'facets', - type: 'STRING', - }, - 'failed-validators-errors': { - multivalued: true, - isInjected: false, - id: 'failed-validators-errors', - type: 'STRING', - }, - 'ext.import-location': { - multivalued: false, - isInjected: false, - id: 'ext.import-location', - type: 'STRING', - }, - 'media.frame-rate': { - multivalued: false, - isInjected: false, - id: 'media.frame-rate', - type: 'DOUBLE', - }, - id: { - multivalued: false, - isInjected: false, - id: 'id', - type: 'STRING', - }, - sorts: { - multivalued: true, - isInjected: false, - id: 'sorts', - type: 'STRING', - }, - 'media.compression': { - multivalued: false, - isInjected: false, - id: 'media.compression', - type: 'STRING', - }, - 'contact.contributor-email': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-email', - type: 'STRING', - }, - 'resource-uri': { - multivalued: false, - isInjected: false, - id: 'resource-uri', - type: 'STRING', - }, - 'checksum-algorithm': { - multivalued: false, - isInjected: false, - id: 'checksum-algorithm', - type: 'STRING', - }, - 'validation-errors': { - multivalued: true, - isInjected: false, - id: 'validation-errors', - type: 'STRING', - }, - 'location.altitude-meters': { - multivalued: true, - isInjected: false, - id: 'location.altitude-meters', - type: 'DOUBLE', - }, - 'detail-level': { - multivalued: false, - isInjected: false, - id: 'detail-level', - type: 'STRING', - }, - 'datetime.start': { - multivalued: true, - isInjected: false, - id: 'datetime.start', - type: 'DATE', - }, - 'media.frame-center': { - multivalued: false, - isInjected: false, - id: 'media.frame-center', - type: 'GEOMETRY', - }, - 'contact.contributor-phone': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-phone', - type: 'STRING', - }, - 'metadata-content-type-version': { - multivalued: false, - isInjected: false, - id: 'metadata-content-type-version', - type: 'STRING', - }, - 'associations.external': { - multivalued: true, - isInjected: false, - id: 'associations.external', - type: 'STRING', - }, - 'metacard.associations.related': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.related', - type: 'STRING', - }, - 'contact.publisher-name': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-name', - type: 'STRING', - }, - enterprise: { - multivalued: false, - isInjected: false, - id: 'enterprise', - type: 'BOOLEAN', - }, - 'metadata-target-namespace': { - multivalued: false, - isInjected: false, - id: 'metadata-target-namespace', - type: 'STRING', - }, - 'metacard.deleted.id': { - multivalued: false, - isInjected: false, - id: 'metacard.deleted.id', - type: 'STRING', - }, - 'list.cql': { - multivalued: false, - isInjected: false, - id: 'list.cql', - type: 'STRING', - }, - 'resource.derived-download-url': { - multivalued: true, - isInjected: false, - id: 'resource.derived-download-url', - type: 'STRING', - }, - 'contact.creator-email': { - multivalued: true, - isInjected: false, - id: 'contact.creator-email', - type: 'STRING', - }, - datatype: { - multivalued: true, - isInjected: false, - id: 'datatype', - type: 'STRING', - }, - 'contact.creator-name': { - multivalued: true, - isInjected: false, - id: 'contact.creator-name', - type: 'STRING', - }, - 'topic.category': { - multivalued: true, - isInjected: false, - id: 'topic.category', - type: 'STRING', - }, - 'security.access-administrators': { - multivalued: true, - isInjected: false, - id: 'security.access-administrators', - type: 'STRING', - }, - filterTree: { - multivalued: false, - isInjected: false, - id: 'filterTree', - type: 'STRING', - }, - federation: { - multivalued: false, - isInjected: false, - id: 'federation', - type: 'STRING', - }, - 'ext.feature-class': { - multivalued: false, - isInjected: false, - id: 'ext.feature-class', - type: 'STRING', - }, - 'metacard.deleted.version': { - multivalued: false, - isInjected: false, - id: 'metacard.deleted.version', - type: 'STRING', - }, - 'contact.contributor-address': { - multivalued: true, - isInjected: false, - id: 'contact.contributor-address', - type: 'STRING', - }, - 'contact.point-of-contact-phone': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-phone', - type: 'STRING', - }, - 'ext.extracted.text': { - multivalued: false, - isInjected: false, - id: 'ext.extracted.text', - type: 'STRING', - }, - 'media.encoding': { - multivalued: true, - isInjected: false, - id: 'media.encoding', - type: 'STRING', - }, - queries: { - multivalued: true, - isInjected: false, - id: 'queries', - type: 'STRING', - }, - 'media.number-of-bands': { - multivalued: false, - isInjected: false, - id: 'media.number-of-bands', - type: 'INTEGER', - }, - 'location.country-code': { - multivalued: true, - isInjected: false, - id: 'location.country-code', - type: 'STRING', - }, - 'metacard.modified': { - multivalued: false, - isInjected: false, - id: 'metacard.modified', - type: 'DATE', - }, - 'ui.template-filter': { - multivalued: false, - isInjected: false, - id: 'ui.template-filter', - type: 'XML', - }, - 'security.access-individuals': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals', - type: 'STRING', - }, - 'location.crs-name': { - multivalued: true, - isInjected: false, - id: 'location.crs-name', - type: 'STRING', - }, - 'contact.publisher-phone': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-phone', - type: 'STRING', - }, - 'topic.vocabulary': { - multivalued: true, - isInjected: false, - id: 'topic.vocabulary', - type: 'STRING', - }, - 'datetime.end': { - multivalued: true, - isInjected: false, - id: 'datetime.end', - type: 'DATE', - }, - 'media.width-pixels': { - multivalued: false, - isInjected: false, - id: 'media.width-pixels', - type: 'INTEGER', - }, - 'metadata-content-type': { - multivalued: false, - isInjected: false, - id: 'metadata-content-type', - type: 'STRING', - }, - language: { - multivalued: true, - isInjected: false, - id: 'language', - type: 'STRING', - }, - polling: { - multivalued: false, - isInjected: false, - id: 'polling', - type: 'INTEGER', - }, - 'datetime.name': { - multivalued: true, - isInjected: false, - id: 'datetime.name', - type: 'STRING', - }, - 'security.access-individuals-read': { - multivalued: true, - isInjected: false, - id: 'security.access-individuals-read', - type: 'STRING', - }, - 'media.bits-per-sample': { - multivalued: false, - isInjected: false, - id: 'media.bits-per-sample', - type: 'INTEGER', - }, - modified: { - multivalued: false, - isInjected: false, - id: 'modified', - type: 'DATE', - }, - 'media.scanning-mode': { - multivalued: false, - isInjected: false, - id: 'media.scanning-mode', - type: 'STRING', - }, - 'list.icon': { - multivalued: false, - isInjected: false, - id: 'list.icon', - type: 'STRING', - }, - 'contact.creator-address': { - multivalued: true, - isInjected: false, - id: 'contact.creator-address', - type: 'STRING', - }, - 'validation-warnings': { - multivalued: true, - isInjected: false, - id: 'validation-warnings', - type: 'STRING', - }, - 'contact.point-of-contact-email': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-email', - type: 'STRING', - }, - thumbnail: { - multivalued: false, - isInjected: false, - id: 'thumbnail', - type: 'BINARY', - }, - created: { - multivalued: false, - isInjected: false, - id: 'created', - type: 'DATE', - }, - 'security.access-groups': { - multivalued: true, - isInjected: false, - id: 'security.access-groups', - type: 'STRING', - }, - 'metacard-tags': { - multivalued: true, - isInjected: false, - id: 'metacard-tags', - type: 'STRING', - }, - 'ext.feature-code': { - multivalued: false, - isInjected: false, - id: 'ext.feature-code', - type: 'STRING', - }, - 'resource.derived-uri': { - multivalued: true, - isInjected: false, - id: 'resource.derived-uri', - type: 'STRING', - }, - lists: { - multivalued: true, - isInjected: false, - id: 'lists', - type: 'XML', - }, - 'contact.point-of-contact-name': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-name', - type: 'STRING', - }, - 'metacard.owner': { - multivalued: false, - isInjected: false, - id: 'metacard.owner', - type: 'STRING', - }, - expiration: { - multivalued: false, - isInjected: false, - id: 'expiration', - type: 'DATE', - }, - cql: { - multivalued: false, - isInjected: false, - id: 'cql', - type: 'STRING', - }, - 'resource-size': { - multivalued: false, - isInjected: false, - id: 'resource-size', - type: 'STRING', - }, - 'location.crs-code': { - multivalued: true, - isInjected: false, - id: 'location.crs-code', - type: 'STRING', - }, - sources: { - multivalued: true, - isInjected: false, - id: 'sources', - type: 'STRING', - }, - 'ext.mp4.audio-sample-rate': { - multivalued: false, - isInjected: false, - id: 'ext.mp4.audio-sample-rate', - type: 'INTEGER', - }, - 'media.format-version': { - multivalued: false, - isInjected: false, - id: 'media.format-version', - type: 'STRING', - }, - description: { - multivalued: false, - isInjected: false, - id: 'description', - type: 'STRING', - }, - title: { - multivalued: false, - isInjected: false, - id: 'title', - type: 'STRING', - }, - 'resource-download-url': { - multivalued: false, - isInjected: false, - id: 'resource-download-url', - type: 'STRING', - }, - 'source-id': { - multivalued: false, - isInjected: false, - id: 'source-id', - type: 'STRING', - }, - 'ui.attribute-group': { - multivalued: true, - isInjected: false, - id: 'ui.attribute-group', - type: 'STRING', - }, - 'ext.note.result-comment': { - multivalued: true, - isInjected: false, - id: 'ext.note.result-comment', - type: 'STRING', - }, - effective: { - multivalued: false, - isInjected: false, - id: 'effective', - type: 'DATE', - }, - 'media.height-pixels': { - multivalued: false, - isInjected: false, - id: 'media.height-pixels', - type: 'INTEGER', - }, - 'point-of-contact': { - multivalued: false, - isInjected: false, - id: 'point-of-contact', - type: 'STRING', - }, - schedules: { - multivalued: true, - isInjected: false, - id: 'schedules', - type: 'XML', - }, - checksum: { - multivalued: false, - isInjected: false, - id: 'checksum', - type: 'STRING', - }, - 'failed-validators-warnings': { - multivalued: true, - isInjected: false, - id: 'failed-validators-warnings', - type: 'STRING', - }, - 'ext.population': { - multivalued: false, - isInjected: false, - id: 'ext.population', - type: 'LONG', - }, - 'media.bit-rate': { - multivalued: false, - isInjected: false, - id: 'media.bit-rate', - type: 'DOUBLE', - }, - 'topic.keyword': { - multivalued: true, - isInjected: false, - id: 'topic.keyword', - type: 'STRING', - }, - 'contact.point-of-contact-address': { - multivalued: true, - isInjected: false, - id: 'contact.point-of-contact-address', - type: 'STRING', - }, - 'contact.publisher-email': { - multivalued: true, - isInjected: false, - id: 'contact.publisher-email', - type: 'STRING', - }, - 'ext.gazetteer-sort-value': { - multivalued: false, - isInjected: false, - id: 'ext.gazetteer-sort-value', - type: 'INTEGER', - }, - 'media.duration': { - multivalued: false, - isInjected: false, - id: 'media.duration', - type: 'DOUBLE', - }, - 'media.type': { - multivalued: false, - isInjected: false, - id: 'media.type', - type: 'STRING', - }, - 'contact.creator-phone': { - multivalued: true, - isInjected: false, - id: 'contact.creator-phone', - type: 'STRING', - }, - 'metacard.created': { - multivalued: false, - isInjected: false, - id: 'metacard.created', - type: 'DATE', - }, - 'security.access-groups-read': { - multivalued: true, - isInjected: false, - id: 'security.access-groups-read', - type: 'STRING', - }, - 'media.format': { - multivalued: false, - isInjected: false, - id: 'media.format', - type: 'STRING', - }, - 'list.bookmarks': { - multivalued: true, - isInjected: false, - id: 'list.bookmarks', - type: 'STRING', - }, - 'metacard.associations.derived': { - multivalued: true, - isInjected: false, - id: 'metacard.associations.derived', - type: 'STRING', - }, - location: { - multivalued: false, - isInjected: false, - id: 'location', - type: 'GEOMETRY', - }, - 'metacard.deleted.deleted-by': { - multivalued: false, - isInjected: false, - id: 'metacard.deleted.deleted-by', - type: 'STRING', - }, - }, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/mock-jquery.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/mock-jquery.ts deleted file mode 100644 index 1eddfab37e2..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/mock-jquery.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import $ from 'jquery' - -import api from './index' -const oldGet = $.get -const oldPost = $.post -const oldAjax = $.ajax - -const mock = () => { - const httpRequest = ({ url }: any) => { - return Promise.resolve(api(url)) - } - // @ts-expect-error ts-migrate(2322) FIXME: Type '(url: any) => Promise' is not assignabl... Remove this comment to see the full error message - $.get = (url: any) => httpRequest({ url }) - // @ts-expect-error ts-migrate(2322) FIXME: Type '({ url }: any) => Promise' is not assig... Remove this comment to see the full error message - $.post = httpRequest - // @ts-expect-error ts-migrate(2322) FIXME: Type '({ url }: any) => Promise' is not assig... Remove this comment to see the full error message - $.ajax = httpRequest -} - -const unmock = () => { - $.get = oldGet - $.post = oldPost - $.ajax = oldAjax -} - -export { mock, unmock } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/mock-properties.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/mock-properties.ts deleted file mode 100644 index f919c837d56..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/mock-properties.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import { StartupDataStore } from '../../js/model/Startup/startup' -import api from './index' -const mock = () => { - StartupDataStore.Configuration.config = api('./internal/config') - StartupDataStore.Configuration.platformUiConfiguration = api( - './internal/platform/config/ui' - ) - StartupDataStore.Configuration._notifySubscribers({ - thing: 'configuration-update', - }) -} - -const unmock = () => {} - -export { mock, unmock } diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/platform.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/platform.ts deleted file mode 100644 index 2b6c8bbb401..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/platform.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default { - productImage: - 'iVBORw0KGgoAAAANSUhEUgAAAPgAAABtCAYAAACMeqz7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3N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nT3ZgtEKzJtDV36e4KojORPYbpWcHWz2MdrqN50J8xSpE2YzYYyXC2CLg68G4B8DfJjvTVdodtFVaRd75LOPL9i1qEVUi2rrdBdUdN4h2L5G5EVMpodTAEabs5f2td86CZZv4RQ8+6XD4kggRun7AK12tLW7t2rQdbLbGECy/sQamV7F1hFV7W5X/fVjmzJTag7efe3K+QnsM5BzqG2WI5/8O6qsQaeiFqkRdC2eARL9vfmT5o2CVHgEeFVXh4qne5N6vmftIvF7lJcknMXpEsZmgf2O+Bqbuqk52EGMznj4KWSbaOBx/sMVbFg6xDWIXM/tE9vX5leZNkdwurFIz+L20opVISaHYgAAAAAElFTkSuQmCC', - color: null, - footer: null, - background: null, - vendorImage: - 'iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAgAElEQVR42uydd3gc1b33P2d2tqr3LtuyLNtyL+BKtSHUhHBTCEluIAkQQni5gRDgveS94ebeAAkJSbgJqdQUSAKXBAgEMMXYxsbGGHfLki1bktV72dWWOe8fuyvtzs6uVs11z/Pss9LMOfPdmTm/c37tfI8gUSamVH4d7DawmhWEACkV/wkB7m4Fn7BhScpEUTJBZCPIBJmKwILEgsAC2ANXcyJxQ/AjepB0ILUONF8bHq0Dk+LCompD+EJoSAlSaggJm36YeCcTUETiEYyhzL8DLCYwKyoKCqDg9aloWjZmtRIhKpDMQDALmArkApZAh/cGrqIgA22RCgLV/zcAGhIvCA3QEPi//UUNuVYLyFokVQgOIKlCyr0oog2E1y8saLg1L4Ma7PxR4t0lBGQSSvmtkGoGu6oihYqGiiazMSmrUVgBLAXKAQfgRqIisIV0+MkuGhIXAi9IC4gBoBoptwMb8ckNCNGGghfw4vR66XVD9SOJd5sQkDGUJTeCYgfVpqKgIoUFry8VVSwHZQ2wFkFxYDZw+AVBAPIEPV4ZXXCQA4CKFPXAGyDX4ZWbUZUehHTjE158Li/aAHzw68S7TwhIjLLyWyCEilRsSC0ZlKUorAFxcWCGcAO2gJoT8hTF2Pq0mIS6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3J5kTK1cu5FVVjXMcJ8RislJdfTFo1QnjBUGITH1kyalxRfk9wBiTo5LG3dzu7Dx9bpoclrQ0Fv+yoeH9MwAA3A2bb8mCwVA4NklVaREwoLd3D5iaah+QJNlSW9sSKy7OJZRC6KGHXjLt2XtSk106uSVrZnGrIsU5JS5zwICZnI6AwW4JGEy6LjEceKOnr87zDYD29tOx/Lw5bREpfi+lNAlus1IjIPh9Yf7wkTMa95CPmzt3KnM67aZ9+6oDgtU6XLJy2QmaUBDYtZaChCFA3B8yeJsu/63yxDsnr+vhZuPVJ9+td6Ran+U4EvqOrdmo02o4nz/EenqGGQCQkuJcGvb67AiIcHVZYAyQCLwqjXidUlvb7hdh02c3CPJWlk+ffO9wWnpyBc+TOCCQ22AwRITR0ZA6POxTAQCyXE4aD0uGy0eqioggIENETiNST0t7dvBC0w6lv33n0qM3auuWAE3vHcDqqq0nCqdMKNJq+Margrwlhqqq2mg0ZgAASEtLsiEiC7lHkokgKIxS4q5vtAebmjbt/8fLuw5VfvCNlN6y5ArXL2UAAPv3bOxkjJVOmbL2hXAktoZROo5SplcVxhARCEFklFE2JljOMxqKpORk+IoqFlX5O3u40ebWAY136NXPj7wzcLs8fmvNM7YBr3azP6x49KXtzS0DKwjhfpaTk5Yx7Pap3T1uZrMZwy6XwwQAQlvvSF3e/JnHh86cG4309VefOL618f/2c3rtrFr1u4q584o3WC3GSbt2HfeVluYpFRXl4y5caK/b+dGxlxzB/rptR7dH7tQe930BGhtrWzPSC0+mpTkau7uGWgjBllA4+uHefZXv7v7Xxrq6jvrE97H3H2pw81wEvFDFAAAAAElFTkSuQmCC', - header: null, - title: 'DDF', - version: '2.15.0-SNAPSHOT', - timeout: 15, -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/sources.ts b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/sources.ts deleted file mode 100644 index 760eccde335..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/mock-api/sources.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default [ - { - sourceActions: [], - available: true, - id: 'ddf.distribution', - contentTypes: [], - version: '', - }, -] diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/setup/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/setup/index.tsx deleted file mode 100644 index a8eb3d374ca..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/test/setup/index.tsx +++ /dev/null @@ -1,4 +0,0 @@ -// first file run in the test environment (setup proxies, mocks, etc) - -// import '../../js/extensions/network.proxy' -import '../../js/extensions/application.patches' diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/classes.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/classes.tsx deleted file mode 100644 index 79f4901e977..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/classes.tsx +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Spread operator like so: - * { ...props } is seen as generating a class but it's a plain object. This prevents typescript from - * seeing spreading of a class as generating an instance of one. There might be a better solution than this, - * but this seems simple enough / not really intrusive. - * - */ -export class SpreadOperatorProtectedClass { - _DO_NOT_USE_SPREAD_OPERATOR() {} // literally to force spread operator to be seen as generating non compliant class -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/context.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/context.tsx deleted file mode 100644 index b297d7aca60..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/context.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import * as React from 'react' -// create context with no upfront defaultValue -// without having to do undefined check all the time -export function createCtx(defaults?: Partial) { - const ctx = React.createContext(defaults as A | undefined) - function useCtx() { - const c = React.useContext(ctx) - if (!c) throw new Error('useCtx must be inside a Provider with a value') - return c - } - return [useCtx, ctx.Provider] as const // make TypeScript infer a tuple, not an array of union types -} diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/hooks.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/hooks.tsx deleted file mode 100644 index 1b2e4fe9649..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/hooks.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -export type setType = (value: React.SetStateAction) => void diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/index.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/index.tsx deleted file mode 100644 index 0d6142f42c1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -export { default as Omit } from './omit' -export { default as Subtract } from './subtract' -export type PermissiveComponentType = - | (() => JSX.Element) - | React.ComponentType> diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/omit.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/omit.tsx deleted file mode 100644 index 64e7399513f..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/omit.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ - -type Omit = Pick> - -export default Omit diff --git a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/subtract.tsx b/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/subtract.tsx deleted file mode 100644 index b4d389cd627..00000000000 --- a/ui-frontend/packages/catalog-ui-search/src/main/webapp/typescript/subtract.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -import Omit from './omit' -type Subtract = Omit - -export default Subtract diff --git a/ui-frontend/packages/catalog-ui-search/typings/globals/promise/index.d.tsx b/ui-frontend/packages/catalog-ui-search/typings/globals/promise/index.d.tsx deleted file mode 100644 index afc42d7ec66..00000000000 --- a/ui-frontend/packages/catalog-ui-search/typings/globals/promise/index.d.tsx +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -declare var Promise: PromiseConstructor diff --git a/ui-frontend/packages/catalog-ui-search/typings/globals/webworkers/index.d.tsx b/ui-frontend/packages/catalog-ui-search/typings/globals/webworkers/index.d.tsx deleted file mode 100644 index e9624186963..00000000000 --- a/ui-frontend/packages/catalog-ui-search/typings/globals/webworkers/index.d.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -declare namespace NodeJS { - export interface Global { - window: any - } -} -declare function postMessage(message: any, transfer?: any[]): void //https://www.antonmata.me/2017/04/04/web-workers-vscode-intellisense.html diff --git a/ui-frontend/packages/catalog-ui-search/typings/globals/webworkers/typings.json b/ui-frontend/packages/catalog-ui-search/typings/globals/webworkers/typings.json deleted file mode 100644 index b9ef18726b1..00000000000 --- a/ui-frontend/packages/catalog-ui-search/typings/globals/webworkers/typings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "resolution": "main" -} diff --git a/ui-frontend/packages/catalog-ui-search/typings/index.d.tsx b/ui-frontend/packages/catalog-ui-search/typings/index.d.tsx deleted file mode 100644 index 0be3ba1c593..00000000000 --- a/ui-frontend/packages/catalog-ui-search/typings/index.d.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -/// - -/// - -declare module '*.svg' { - const content: any - export default content -} - -declare module '!!raw-loader!*' { - const contents: string - export = contents -} diff --git a/ui-frontend/packages/catalog-ui-search/typings/styled-components/index.d.tsx b/ui-frontend/packages/catalog-ui-search/typings/styled-components/index.d.tsx deleted file mode 100644 index a9136d9e93c..00000000000 --- a/ui-frontend/packages/catalog-ui-search/typings/styled-components/index.d.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Codice Foundation - * - * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser - * General Public License as published by the Free Software Foundation, either version 3 of the - * License, or any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. A copy of the GNU Lesser General Public License - * is distributed along with this program and can be found at - * . - * - **/ -// import original module declarations -import 'styled-components' -import { ThemeInterface } from '../../src/main/webapp/react-component/styles/styled-components' - -// and extend them! -declare module 'styled-components' { - export interface DefaultTheme extends ThemeInterface {} - - export function keyframes( - strings: TemplateStringsArray, - ...interpolations: FlattenInterpolation>[] - ): Keyframes -} diff --git a/ui-frontend/packages/cesium-assets/package.json b/ui-frontend/packages/cesium-assets/package.json deleted file mode 100644 index edaea992ec4..00000000000 --- a/ui-frontend/packages/cesium-assets/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "cesium-assets", - "author": "Codice", - "description": "A wab for cesium static assets.", - "version": "1.0.0", - "license": "LGPL-3.0", - "scripts": { - "prebuild": "mkdirp target", - "build": "mkdirp target", - "postbuild": "ace package" - }, - "dependencies": { - "cesium": "1.44", - "mkdirp": "0.5.1" - }, - "files": [ - "node_modules/cesium/Build/Cesium" - ], - "context-path": "/search/catalog/cesium/assets", - "devDependencies": { - "@connexta/ace": "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe" - } -} diff --git a/ui-frontend/packages/cesium-assets/yarn.lock b/ui-frontend/packages/cesium-assets/yarn.lock deleted file mode 100644 index ff44f6e144e..00000000000 --- a/ui-frontend/packages/cesium-assets/yarn.lock +++ /dev/null @@ -1,9212 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/code-frame@^7.16.0", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298" - integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g== - -"@babel/core@7.21.3", "@babel/core@^7.12.3", "@babel/core@^7.19.6": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" - integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.3" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.3" - "@babel/types" "^7.21.3" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/generator@^7.20.0", "@babel/generator@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" - integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== - dependencies: - "@babel/types" "^7.21.3" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" - -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" - integrity sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-member-expression-to-functions" "^7.21.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-regexp-features-plugin@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" - integrity sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-regex" "^7.10.4" - regexpu-core "^4.7.0" - -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.0.tgz#53ff78472e5ce10a52664272a239787107603ebb" - integrity sha512-N+LaFW/auRSWdx7SHD/HiARwXQju1vXTW4fKr4u5SgBUTm51OKEjKgj+cs00ggW3kEvNqwErnlwuq7Y3xBe4eg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.3.1" - -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" - integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== - dependencies: - "@babel/template" "^7.20.7" - "@babel/types" "^7.21.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" - integrity sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q== - dependencies: - "@babel/types" "^7.21.0" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" - integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.2" - "@babel/types" "^7.21.2" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== - -"@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-regex@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" - integrity sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg== - dependencies: - lodash "^4.17.19" - -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" - integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== - dependencies: - "@babel/types" "^7.20.0" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" - integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" - integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" - -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" - integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" - integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.7" - -"@babel/plugin-proposal-async-generator-functions@^7.20.1": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" - integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" - -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - -"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" - integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" - integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d" - integrity sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" - integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== - dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-block-scoping@^7.20.2": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" - integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-classes@^7.20.2": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" - integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" - integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/template" "^7.20.7" - -"@babel/plugin-transform-destructuring@^7.20.2": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" - integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-dotall-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee" - integrity sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-for-of@^7.18.8": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz#964108c9988de1a60b4be2354a7d7e245f36e86e" - integrity sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== - dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-modules-amd@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" - integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== - dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-modules-commonjs@^7.19.6": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" - integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== - dependencies: - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-simple-access" "^7.20.2" - -"@babel/plugin-transform-modules-systemjs@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" - integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== - dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-identifier" "^7.19.1" - -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" - integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - -"@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz#18fc4e797cf6d6d972cb8c411dbe8a809fa157db" - integrity sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-display-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" - integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-jsx-development@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" - integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== - dependencies: - "@babel/plugin-transform-react-jsx" "^7.18.6" - -"@babel/plugin-transform-react-jsx@^7.18.6", "@babel/plugin-transform-react-jsx@^7.19.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz#656b42c2fdea0a6d8762075d58ef9d4e3c4ab8a2" - integrity sha512-6OAWljMvQrZjR2DaNhVfRz6dkCAVV+ymcLUmaf8bccGOHn2v5rHJK3tTpij0BuhdYWP4LLaqj5lwcdlpAAPuvg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.21.0" - -"@babel/plugin-transform-react-pure-annotations@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz#561af267f19f3e5d59291f9950fd7b9663d0d844" - integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-regenerator@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" - integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - regenerator-transform "^0.15.1" - -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-spread@^7.19.0": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" - integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/preset-env@7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.20.2.tgz#9b1642aa47bb9f43a86f9630011780dab7f86506" - integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== - dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.20.1" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.2" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.20.2" - "@babel/plugin-transform-classes" "^7.20.2" - "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.20.2" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.8" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.19.6" - "@babel/plugin-transform-modules-commonjs" "^7.19.6" - "@babel/plugin-transform-modules-systemjs" "^7.19.6" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.20.1" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.19.0" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.20.2" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/preset-react@7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.18.6.tgz#979f76d6277048dc19094c217b507f3ad517dd2d" - integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-react-display-name" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.18.6" - "@babel/plugin-transform-react-jsx-development" "^7.18.6" - "@babel/plugin-transform-react-pure-annotations" "^7.18.6" - -"@babel/regjsgen@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" - integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== - -"@babel/runtime@^7.8.4": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.18.10", "@babel/template@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/traverse@^7.20.0", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" - integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.3" - "@babel/types" "^7.21.3" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.10.4", "@babel/types@^7.4.4": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" - integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3", "@babel/types@^7.7.0": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" - integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@connexta/ace@git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe": - version "1.0.0" - resolved "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe" - dependencies: - "@babel/core" "7.21.3" - "@babel/preset-env" "7.20.2" - "@babel/preset-react" "7.18.6" - ansi-colors "4.1.3" - archiver "5.3.1" - astroturf "1.1.0" - autoprefixer "10.4.13" - babel-core "6.26.3" - babel-eslint "10.1.0" - babel-loader "9.1.2" - babel-plugin-istanbul "6.1.1" - babel-plugin-transform-react-jsx-source "6.22.0" - babel-polyfill "6.26.0" - babel-preset-latest "6.24.1" - babel-preset-react "6.24.1" - babel-preset-stage-0 "6.24.1" - buffer "6.0.3" - chalk "2.3.2" - cheerio "0.22.0" - commander "2.15.1" - console-polyfill "0.3.0" - cross-spawn "7.0.3" - css-loader "6.7.3" - eslint "8.34.0" - eslint-plugin-import "2.27.5" - eslint-plugin-node "11.1.0" - eslint-plugin-react "7.32.2" - exports-loader "4.0.0" - find-up "2.1.0" - glob "7.1.2" - html-loader "4.2.0" - html-webpack-plugin "5.5.0" - imports-loader "4.0.1" - maven-deploy "1.5.0" - memory-fs "^0.5.0" - mini-css-extract-plugin "2.7.2" - minimist "1.2.8" - mkdirp "^0.5.1" - mocha "5.2.0" - mocha-headless-chrome "2.0.1" - mocha-loader "5.1.5" - node-polyfill-webpack-plugin "2.0.1" - ora "6.1.2" - postcss "8.4.21" - postcss-loader "7.0.2" - prettier "2.8.4" - process "0.11.10" - puppeteer "1.5.0" - raw-loader "4.0.2" - react-dev-utils "12.0.1" - react-hot-loader "4.13.1" - require-from-string "^2.0.2" - rimraf "2.6.2" - script-loader "0.7.2" - simple-progress-webpack-plugin "2.0.0" - source-map-support "^0.5.21" - source-map-url "0.4.0" - stream-browserify "3.0.0" - style-loader "3.3.1" - stylelint "15.2.0" - stylelint-config-recommended "10.0.1" - stylelint-config-styled-components "0.1.1" - stylelint-custom-processor-loader "0.6.0" - stylelint-processor-styled-components "1.10.0" - tailwindcss "3.2.7" - ts-loader "9.4.2" - typescript "4.9.5" - username "3.0.0" - vkbeautify "0.99.3" - webpack "5.75.0" - webpack-bundle-analyzer "4.8.0" - webpack-dev-server "4.11.1" - webpack-merge "4.1.2" - whatwg-fetch "3.6.2" - worker-loader "3.0.8" - -"@csstools/css-parser-algorithms@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.0.tgz#c0a605b0218790faeb5911f240964891c6031501" - integrity sha512-KP8TicdXpUyeB1NMlbHud/1l39xvLGvqNFWMpG4qC6H1zs9SadGUHe5SO92n/659sDW9aGDvm9AMru0DZkN1Bw== - -"@csstools/css-tokenizer@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.1.0.tgz#fee4de3d444db3ce9007f3af6474af8ba3e4b930" - integrity sha512-dtqFyoJBHUxGi9zPZdpCKP1xk8tq6KPHJ/NY4qWXiYo6IcSGwzk3L8x2XzZbbyOyBs9xQARoGveU2AsgLj6D2A== - -"@csstools/media-query-list-parser@^2.0.1": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.2.tgz#36058f8ff6a28274e7dfe32e48431e1de97c2fbb" - integrity sha512-8V6JD8Av1HttuClYr1ZBu0LRVe5Nnz4qrv8RppO8mobsX/USBHZy5JQOXYIlpOVhl46nzkx3X5cfH6CqUghjrQ== - -"@csstools/selector-specificity@^2.1.1": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz#2cbcf822bf3764c9658c4d2e568bd0c0cb748016" - integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== - -"@discoveryjs/json-ext@0.5.7": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" - integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@leichtgewicht/ip-codec@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" - integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== - -"@modular-css/processor@^28.1.4": - version "28.1.5" - resolved "https://registry.yarnpkg.com/@modular-css/processor/-/processor-28.1.5.tgz#28987ddb3654ce287e69224c400297267482c976" - integrity sha512-1gfGjJgiJ5bZtUlLFfyhZwIwrbRG8SPw3N/iJrQw49VMSwpBH9ZsqFHnsbHYkbxGowmpycSWTL++VVKMyrV86A== - dependencies: - dependency-graph "^0.11.0" - escape-string-regexp "^4.0.0" - postcss-selector-parser "^6.0.2" - postcss-url "^10.0.0" - postcss-value-parser "^4.0.0" - resolve-from "^5.0.0" - unique-slug "^2.0.0" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@polka/url@^1.0.0-next.20": - version "1.0.0-next.21" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" - integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== - -"@types/body-parser@*": - version "1.19.2" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/bonjour@^3.5.9": - version "3.5.10" - resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.10.tgz#0f6aadfe00ea414edc86f5d106357cda9701e275" - integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== - dependencies: - "@types/node" "*" - -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - -"@types/connect-history-api-fallback@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" - integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== - dependencies: - "@types/express-serve-static-core" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.37.0" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.37.0.tgz#29cebc6c2a3ac7fea7113207bf5a828fdf4d7ef1" - integrity sha512-Piet7dG2JBuDIfohBngQ3rCt7MgO9xCO4xIMKxBThCq5PNRB91IjlJ10eJVwfoNtvTErmxLzwBZ7rHZtbOMmFQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": - version "4.17.33" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz#de35d30a9d637dc1450ad18dd583d75d5733d543" - integrity sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/express@*", "@types/express@^4.17.13": - version "4.17.17" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.17.tgz#01d5437f6ef9cfa8668e616e13c2f2ac9a491ae4" - integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.33" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/html-minifier-terser@^6.0.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35" - integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== - -"@types/http-proxy@^1.17.8": - version "1.17.10" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.10.tgz#e576c8e4a0cc5c6a138819025a88e167ebb38d6c" - integrity sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g== - dependencies: - "@types/node" "*" - -"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/json-schema@^7.0.4": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" - integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - -"@types/mime@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" - integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== - -"@types/minimist@^1.2.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" - integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== - -"@types/node@*": - version "14.6.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499" - integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA== - -"@types/normalize-package-data@^2.4.0": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" - integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== - -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== - -"@types/retry@0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" - integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== - -"@types/serve-index@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" - integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== - dependencies: - "@types/express" "*" - -"@types/serve-static@*", "@types/serve-static@^1.13.10": - version "1.15.1" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.1.tgz#86b1753f0be4f9a1bee68d459fcda5be4ea52b5d" - integrity sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ== - dependencies: - "@types/mime" "*" - "@types/node" "*" - -"@types/sockjs@^0.3.33": - version "0.3.33" - resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.33.tgz#570d3a0b99ac995360e3136fd6045113b1bd236f" - integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== - dependencies: - "@types/node" "*" - -"@types/ws@^8.5.1": - version "8.5.4" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5" - integrity sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg== - dependencies: - "@types/node" "*" - -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== - -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== - -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== - -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== - -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== - -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" - -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -accepts@~1.3.4, accepts@~1.3.5: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-node@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" - integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A== - dependencies: - acorn "^7.0.0" - acorn-walk "^7.0.0" - xtend "^4.0.2" - -acorn-walk@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn-walk@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^7.0.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" - integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== - -acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -address@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" - integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== - -address@^1.1.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== - -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - -ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv-keywords@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" - integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== - dependencies: - fast-deep-equal "^3.1.3" - -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.12.2: - version "6.12.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" - integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.8.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-html-community@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" - integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== - dependencies: - "@types/color-name" "^1.1.1" - color-convert "^2.0.1" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -archiver-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" - integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== - dependencies: - glob "^7.1.4" - graceful-fs "^4.2.0" - lazystream "^1.0.0" - lodash.defaults "^4.2.0" - lodash.difference "^4.5.0" - lodash.flatten "^4.4.0" - lodash.isplainobject "^4.0.6" - lodash.union "^4.6.0" - normalize-path "^3.0.0" - readable-stream "^2.0.0" - -archiver@5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6" - integrity sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w== - dependencies: - archiver-utils "^2.1.0" - async "^3.2.3" - buffer-crc32 "^0.2.1" - readable-stream "^3.6.0" - readdir-glob "^1.0.0" - tar-stream "^2.2.0" - zip-stream "^4.1.0" - -arg@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" - integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -args@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/args/-/args-5.0.1.tgz#4bf298df90a4799a09521362c579278cc2fdd761" - integrity sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ== - dependencies: - camelcase "5.0.0" - chalk "2.4.2" - leven "2.1.0" - mri "1.1.4" - -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-flatten@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - -array-includes@^3.1.5, array-includes@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - is-string "^1.0.7" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.tosorted@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz#ccf44738aa2b5ac56578ffda97c03fd3e23dd532" - integrity sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - get-intrinsic "^1.1.3" - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -astroturf@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/astroturf/-/astroturf-1.1.0.tgz#483e5022e7db782543082c2f7497a66655f1ba24" - integrity sha512-mryIuQGu49RmKWjApunKRX76TO3Z74DqdC+eqFyI/rbeXfY8vwefo1SEoQwaHHbUrwMqun9xqbhmcIVqx9aDRA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/core" "^7.19.6" - "@babel/generator" "^7.20.0" - "@babel/helper-module-imports" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.0" - "@babel/types" "^7.20.0" - "@modular-css/processor" "^28.1.4" - common-tags "^1.8.2" - cosmiconfig "^7.0.1" - css-loader "^5.1.3" - fast-levenshtein "^3.0.0" - find-cache-dir "^3.3.2" - globby "^11.0.0" - json5 "^2.2.1" - lodash "^4.17.21" - magic-string "^0.26.7" - picocolors "^1.0.0" - postcss "^8.4.18" - postcss-nested "^5.0.6" - postcss-scss "^4.0.5" - resolve "^1.22.1" - unique-slug "^4.0.0" - webpack-virtual-modules "^0.3.2" - yargs "^17.6.0" - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@*: - version "3.2.0" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" - integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== - -async@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -autoprefixer@10.4.13: - version "10.4.13" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.13.tgz#b5136b59930209a321e9fa3dca2e7c4d223e83a8" - integrity sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg== - dependencies: - browserslist "^4.21.4" - caniuse-lite "^1.0.30001426" - fraction.js "^4.2.0" - normalize-range "^0.1.2" - picocolors "^1.0.0" - postcss-value-parser "^4.2.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -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" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@6.26.3, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - 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-eslint@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" - integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - eslint-visitor-keys "^1.0.0" - resolve "^1.12.0" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - 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" - integrity sha1-FMGeXxQte0fxmlJDHlKxzLxAozA= - 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" - integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-builder-react-jsx@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" - integrity sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA= - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - esutils "^2.0.2" - -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" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= - 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" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= - 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" - integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= - 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" - integrity sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes= - 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" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= - 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" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= - 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" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= - 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" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= - 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" - integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= - 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" - integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= - 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" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= - 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" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-loader@9.1.2: - version "9.1.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.2.tgz#a16a080de52d08854ee14570469905a5fc00d39c" - integrity sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA== - dependencies: - find-cache-dir "^3.3.2" - schema-utils "^4.0.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - 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" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== - dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" - -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" - -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - integrity sha1-a8lj67FuzLrmuStZbrfzXDQqi5o= - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - integrity sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY= - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - integrity sha1-1+sjt5oxf4VDlixQW4J8fWysJ94= - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - integrity sha1-MSVjtNvePMgGzuPkFszurd0RrAs= - -babel-plugin-syntax-do-expressions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" - integrity sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0= - -babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - integrity sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo= - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - integrity sha1-cKFITw+QiaToStRLrDU8lbmxJyE= - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - integrity sha1-TDqyCiryaqIM0lmVw5jE63AxDI0= - -babel-plugin-syntax-function-bind@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" - integrity sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y= - -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= - -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" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= - -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" - integrity sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds= - 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.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" - integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= - 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-constructor-call@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" - integrity sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk= - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -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" - integrity sha1-anl2PqYdM9NvN7YRqp3vgagbRqw= - 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" - integrity sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0= - 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-do-expressions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" - integrity sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs= - dependencies: - babel-plugin-syntax-do-expressions "^6.8.0" - babel-runtime "^6.22.0" - -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" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= - 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" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= - dependencies: - babel-runtime "^6.22.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" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= - 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.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" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= - 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.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" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.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" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= - dependencies: - babel-runtime "^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" - integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.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" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= - dependencies: - babel-runtime "^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" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= - 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" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= - dependencies: - babel-runtime "^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" - integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= - 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.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" - integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== - 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.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" - integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= - 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.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" - integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= - 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.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" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.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" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= - 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.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" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= - 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" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= - dependencies: - babel-runtime "^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" - integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= - 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" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.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" - integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= - dependencies: - babel-runtime "^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" - integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.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" - integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= - 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-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" - integrity sha1-U3OLR+deghhYnuqUbLvTkQm75lM= - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - integrity sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988= - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-function-bind@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" - integrity sha1-xvuOlqwpajELjPjqQBRiQH3fapc= - dependencies: - babel-plugin-syntax-function-bind "^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" - integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - -babel-plugin-transform-react-display-name@^6.23.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - integrity sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-self@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" - integrity sha1-322AqdomEqEh5t3XVYvL7PBuY24= - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx-source@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" - integrity sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY= - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - integrity sha1-hAoCjn30YN/DotKfDA2R9jduZqM= - dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^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" - integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= - 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" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-polyfill@6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" - integrity sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ== - dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - -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" - integrity sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk= - 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-es2016@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b" - integrity sha1-+QC/k+LrwNJ235uKtZck6/2Vn4s= - dependencies: - babel-plugin-transform-exponentiation-operator "^6.24.1" - -babel-preset-es2017@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1" - integrity sha1-WXvq37n38gi8/YoS6bKym4svFNE= - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.24.1" - -babel-preset-flow@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" - integrity sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0= - dependencies: - babel-plugin-transform-flow-strip-types "^6.22.0" - -babel-preset-latest@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8" - integrity sha1-Z33gaRVKdIXC0lxXfAL2JLhbheg= - dependencies: - babel-preset-es2015 "^6.24.1" - babel-preset-es2016 "^6.24.1" - babel-preset-es2017 "^6.24.1" - -babel-preset-react@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" - integrity sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A= - dependencies: - babel-plugin-syntax-jsx "^6.3.13" - babel-plugin-transform-react-display-name "^6.23.0" - babel-plugin-transform-react-jsx "^6.24.1" - babel-plugin-transform-react-jsx-self "^6.22.0" - babel-plugin-transform-react-jsx-source "^6.22.0" - babel-preset-flow "^6.23.0" - -babel-preset-stage-0@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" - integrity sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo= - dependencies: - babel-plugin-transform-do-expressions "^6.22.0" - babel-plugin-transform-function-bind "^6.22.0" - babel-preset-stage-1 "^6.24.1" - -babel-preset-stage-1@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" - integrity sha1-dpLNfc1oSZB+auSgqFWJz7niv7A= - dependencies: - babel-plugin-transform-class-constructor-call "^6.24.1" - babel-plugin-transform-export-extensions "^6.22.0" - babel-preset-stage-2 "^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" - integrity sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE= - 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" - integrity sha1-g2raCp56f6N8sTj7kyb4eTSkg5U= - 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" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - 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" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - 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" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - 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" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - 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" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - 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" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -balanced-match@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" - integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bl@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" - integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== - dependencies: - buffer "^6.0.3" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - -bn.js@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" - integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -bonjour-service@^1.0.11: - version "1.1.1" - resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.1.1.tgz#960948fa0e0153f5d26743ab15baf8e33752c135" - integrity sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg== - dependencies: - array-flatten "^2.1.2" - dns-equal "^1.0.0" - fast-deep-equal "^3.1.3" - multicast-dns "^7.2.5" - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.3, browserslist@^4.21.4, browserslist@^4.21.5: - version "4.21.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" - integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== - dependencies: - caniuse-lite "^1.0.30001449" - electron-to-chromium "^1.4.284" - node-releases "^2.0.8" - update-browserslist-db "^1.0.10" - -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" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@^0.2.1, buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@6.0.3, buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camel-case@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - -camelcase-css@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" - integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== - -camelcase-keys@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" - integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - dependencies: - camelcase "^5.3.1" - map-obj "^4.0.0" - quick-lru "^4.0.1" - -camelcase@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" - integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001449: - version "1.0.30001473" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001473.tgz#3859898b3cab65fc8905bb923df36ad35058153c" - integrity sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg== - -cesium@1.44: - version "1.44.0" - resolved "https://registry.yarnpkg.com/cesium/-/cesium-1.44.0.tgz#1f56c056e38edeae781ac6fd2b2994162ae953d8" - integrity sha512-C9Tv0PivQHIQwZntcIsa4s6Z71sOxRbt8NyeZHCXozCt2oAexci4PbXc2QY8aZzyk8P+m/CNfdQsOgsK0Pd+Yg== - dependencies: - requirejs "^2.3.2" - -chalk@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - integrity sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@4.1.x, chalk@^4.1.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - 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@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" - integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== - -cheerio@0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" - integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" - -chokidar@^3.4.2, chokidar@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -clean-css@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.2.0.tgz#44e4a04e8873ff0041df97acecf23a4a6519844e" - integrity sha512-2639sWGa43EMmG7fn8mdVuBSs6HuWaSor+ZPoFWzenBc6oN+td8YhTfghWXZ25G1NiiSvz8bOFBS7PdSbTiqEA== - dependencies: - source-map "~0.6.0" - -clean-css@^5.2.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.2.tgz#70ecc7d4d4114921f5d298349ff86a31a9975224" - integrity sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww== - dependencies: - source-map "~0.6.0" - -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" - integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== - dependencies: - restore-cursor "^4.0.0" - -cli-spinners@^2.6.1: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@^1.1.4, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colord@^2.9.3: - version "2.9.3" - resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" - integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== - -colorette@^2.0.10: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== - -commander@2.15.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - -common-tags@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" - integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -compress-commons@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" - integrity sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ== - dependencies: - buffer-crc32 "^0.2.13" - crc32-stream "^4.0.2" - normalize-path "^3.0.0" - readable-stream "^3.6.0" - -compressible@~2.0.16: - version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -connect-history-api-fallback@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" - integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== - -console-browserify@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -console-polyfill@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/console-polyfill/-/console-polyfill-0.3.0.tgz#84900902a18c47a5eba932be75fa44d23e8af861" - integrity sha512-w+JSDZS7XML43Xnwo2x5O5vxB0ID7T5BdqDtyqT6uiCAX2kZAgcWxNaGqT97tZfSHzfOcvrfsDAodKcJ3UvnXQ== - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.5.1, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -core-js-compat@^3.25.1: - version "3.29.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.29.1.tgz#15c0fb812ea27c973c18d425099afa50b934b41b" - integrity sha512-QmchCua884D8wWskMX8tW5ydINzd8oSJVx38lx/pVkFGqztxt73GYre3pm/hyYq8bPf+MW5In4I/uRShFDsbrA== - dependencies: - browserslist "^4.21.5" - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== - -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" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" - -cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: - version "7.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" - integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cosmiconfig@^8.0.0: - version "8.1.3" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.3.tgz#0e614a118fcc2d9e5afc2f87d53cd09931015689" - integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== - dependencies: - import-fresh "^3.2.1" - js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -crc32-stream@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007" - integrity sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w== - dependencies: - crc-32 "^1.2.0" - readable-stream "^3.4.0" - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-spawn@7.0.3, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -css-functions-list@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.1.0.tgz#cf5b09f835ad91a00e5959bcfc627cd498e1321b" - integrity sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w== - -css-loader@6.7.3: - version "6.7.3" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.3.tgz#1e8799f3ccc5874fdd55461af51137fcc5befbcd" - integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ== - dependencies: - icss-utils "^5.1.0" - postcss "^8.4.19" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.2.0" - semver "^7.3.8" - -css-loader@^5.0.0, css-loader@^5.1.3: - version "5.2.7" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.7.tgz#9b9f111edf6fb2be5dc62525644cbc9c232064ae" - integrity sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg== - dependencies: - icss-utils "^5.1.0" - loader-utils "^2.0.0" - postcss "^8.2.15" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.1.0" - schema-utils "^3.0.0" - semver "^7.3.5" - -css-select@^4.1.3: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-tree@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20" - integrity sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw== - dependencies: - mdn-data "2.0.30" - source-map-js "^1.0.1" - -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cuint@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" - integrity sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw== - -debug@2.6.9, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@^3.0.0, debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decamelize-keys@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" - integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== - dependencies: - decamelize "^1.1.0" - map-obj "^1.0.0" - -decamelize@^1.1.0, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -default-gateway@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" - integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== - dependencies: - execa "^5.0.0" - -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - -define-options@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/define-options/-/define-options-0.1.3.tgz#471c907439da590205050e856c8d59373f3a107b" - integrity sha1-RxyQdDnaWQIFBQ6FbI1ZNz86EHs= - -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-properties@^1.1.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -dependency-graph@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" - integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg== - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== - -detect-port-alt@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" - integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== - dependencies: - address "^1.0.1" - debug "^2.6.0" - -detective@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.1.tgz#6af01eeda11015acb0e73f933242b70f24f91034" - integrity sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw== - dependencies: - acorn-node "^1.8.2" - defined "^1.0.0" - minimist "^1.2.6" - -didyoumean@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" - integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== - -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dlv@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" - integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - -dns-packet@^5.2.2: - version "5.5.0" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.5.0.tgz#f59cbf3396c130957c56a6ad5fd3959ccdc30065" - integrity sha512-USawdAUzRkV6xrqTjiAEp6M9YagZEzWcSUaZTcIFAiyQWW1SoI6KyId8y2+/71wbgHKQAKd+iupLv4YvEwYWvA== - dependencies: - "@leichtgewicht/ip-codec" "^2.0.1" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dom-converter@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" - integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== - dependencies: - utila "~0.4" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -domain-browser@^4.22.0: - version "4.22.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.22.0.tgz#6ddd34220ec281f9a65d3386d267ddd35c491f9f" - integrity sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw== - -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" - integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== - -domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^2.5.2, domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - -dot-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" - integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -duplexer@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.4.284: - version "1.4.346" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.346.tgz#1a084516b5d62fb24ca65ba8e2ebe4a348ebb307" - integrity sha512-9ZpKQD8hyWAoYf5bccm2qpaWogAGxb833DVC0arHo9nIbiAMh+aAKHZWABR2P9sK4a3zoCq7eXg8tylqPAnuNw== - -elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" - integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== - -entities@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" - integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== - -errno@^0.1.3: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== - dependencies: - prr "~1.0.1" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.17.5: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== - dependencies: - array-buffer-byte-length "^1.0.0" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.3" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" - -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== - -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw== - -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@1.0.5, 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" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== - dependencies: - debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" - -eslint-module-utils@^2.7.4: - version "2.7.4" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== - dependencies: - debug "^3.2.7" - -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - -eslint-plugin-import@2.27.5: - version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== - dependencies: - array-includes "^3.1.6" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" - has "^1.0.3" - is-core-module "^2.11.0" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" - -eslint-plugin-node@11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-react@7.32.2: - version "7.32.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10" - integrity sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg== - dependencies: - array-includes "^3.1.6" - array.prototype.flatmap "^1.3.1" - array.prototype.tosorted "^1.1.1" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.6" - object.fromentries "^2.0.6" - object.hasown "^1.1.2" - object.values "^1.1.6" - prop-types "^15.8.1" - resolve "^2.0.0-next.4" - semver "^6.3.0" - string.prototype.matchall "^4.0.8" - -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" - integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== - -eslint@8.34.0: - version "8.34.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.34.0.tgz#fe0ab0ef478104c1f9ebc5537e303d25a8fb22d6" - integrity sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg== - dependencies: - "@eslint/eslintrc" "^1.4.1" - "@humanwhocodes/config-array" "^0.11.8" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-sdsl "^4.1.4" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - -espree@^9.4.0: - version "9.5.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4" - integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -estraverse@^5.2.0, estraverse@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -eventemitter3@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -events@^3.2.0, events@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - 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" - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exports-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-4.0.0.tgz#af34fe80a18f12fb0f42f435edd7df0fe9db49bb" - integrity sha512-4iqFFIAnlVAbkAUMHhWceyxK6N6dMDWpQFbSHLmiayGEPMXl2bgWD4D11GYi1VNuEQwJaHGdATcPYTnXpwzSmw== - dependencies: - source-map "^0.6.1" - -express@^4.17.3: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -extract-zip@^1.6.6: - version "1.7.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" - integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== - dependencies: - concat-stream "^1.6.2" - debug "^2.6.9" - mkdirp "^0.5.4" - yauzl "^2.10.0" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.2.12, fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fast-levenshtein@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-3.0.0.tgz#37b899ae47e1090e40e3fd2318e4d5f0142ca912" - integrity sha512-hKKNajm46uNmTlhHSyZkmToAc56uZJwYq7yrciZjqOxnlfQwERDQJmHPUp7m1m9wx8vgOe8IaCKZ5Kv2k1DdCQ== - dependencies: - fastest-levenshtein "^1.0.7" - -fastest-levenshtein@^1.0.16, fastest-levenshtein@^1.0.7: - version "1.0.16" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" - integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -faye-websocket@^0.11.3: - version "0.11.4" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" - integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== - dependencies: - websocket-driver ">=0.5.1" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -figures@3.2.x: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -filesize@^8.0.6: - version "8.0.7" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-8.0.7.tgz#695e70d80f4e47012c132d57a059e80c6b580bd8" - integrity sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ== - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -filter-obj@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-2.0.2.tgz#fff662368e505d69826abb113f0f6a98f56e9d5f" - integrity sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg== - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-cache-dir@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -follow-redirects@^1.0.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" - integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -fork-ts-checker-webpack-plugin@^6.5.0: - version "6.5.3" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz#eda2eff6e22476a2688d10661688c47f611b37f3" - integrity sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ== - dependencies: - "@babel/code-frame" "^7.8.3" - "@types/json-schema" "^7.0.5" - chalk "^4.1.0" - chokidar "^3.4.2" - cosmiconfig "^6.0.0" - deepmerge "^4.2.2" - fs-extra "^9.0.0" - glob "^7.1.6" - memfs "^3.1.2" - minimatch "^3.0.4" - schema-utils "2.7.0" - semver "^7.3.2" - tapable "^1.0.0" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fraction.js@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" - integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^1.0.0" - -fs-monkey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" - integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== - -fs-walk@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/fs-walk/-/fs-walk-0.0.1.tgz#f7fc91c3ae1eead07c998bc5d0dd41f2dbebd335" - integrity sha1-9/yRw64e6tB8mYvF0N1B8tvr0zU= - dependencies: - async "*" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== - 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@^7.0.5, glob@^7.1.3, glob@^7.1.4: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - 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@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -global@^4.3.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - dependencies: - type-fest "^0.20.2" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globby@^11.0.0, globby@^11.0.4, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -globjoin@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" - integrity sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM= - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -gzip-size@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" - integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== - dependencies: - duplexer "^0.1.2" - -handle-thing@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" - integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - -hard-rejection@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" - integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= - -he@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoist-non-react-statics@^3.3.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.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" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== - -hosted-git-info@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -html-entities@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" - integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== - -html-loader@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-4.2.0.tgz#20f69f9ec69244860c250ae6ee0046c8c5c4d348" - integrity sha512-OxCHD3yt+qwqng2vvcaPApCEvbx+nXWu+v69TYHx1FO8bffHn/JjHtE3TTQZmHjwvnJe4xxzuecetDVBrQR1Zg== - dependencies: - html-minifier-terser "^7.0.0" - parse5 "^7.0.0" - -html-minifier-terser@^6.0.2: - version "6.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab" - integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== - dependencies: - camel-case "^4.1.2" - clean-css "^5.2.2" - commander "^8.3.0" - he "^1.2.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.10.0" - -html-minifier-terser@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.1.0.tgz#cd62d42158be9a6bef0fcd40f94127345743d9b5" - integrity sha512-BvPO2S7Ip0Q5qt+Y8j/27Vclj6uHC6av0TMoDn7/bJPhMWHI2UtR2e/zEgJn3/qYAmxumrGp9q4UHurL6mtW9Q== - dependencies: - camel-case "^4.1.2" - clean-css "5.2.0" - commander "^9.4.1" - entities "^4.4.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.15.1" - -html-tags@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.2.0.tgz#dbb3518d20b726524e4dd43de397eb0a95726961" - integrity sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg== - -html-webpack-plugin@5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz#c3911936f57681c1f9f4d8b68c158cd9dfe52f50" - integrity sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw== - dependencies: - "@types/html-minifier-terser" "^6.0.0" - html-minifier-terser "^6.0.2" - lodash "^4.17.21" - pretty-error "^4.0.0" - tapable "^2.0.0" - -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -htmlparser2@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-parser-js@>=0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" - integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== - -http-proxy-middleware@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" - integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== - dependencies: - "@types/http-proxy" "^1.17.8" - http-proxy "^1.18.1" - is-glob "^4.0.1" - is-plain-obj "^3.0.0" - micromatch "^4.0.2" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - -https-proxy-agent@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -icss-utils@^5.0.0, icss-utils@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" - integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -immer@^9.0.7: - version "9.0.21" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" - integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-fresh@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-lazy@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" - integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== - -imports-loader@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/imports-loader/-/imports-loader-4.0.1.tgz#a3d3067d0c369cd621e2b322b6b6bb2593756be5" - integrity sha512-ZiY+1xH5fqAJ1Qu1CFv+zw54rvPCC92DdYRDe0IIUboOhbJPLfOPbF/paA2iipelvMwjQUKWydcFOJ7f1+ZFcA== - dependencies: - source-map "^0.6.1" - strip-comments "^2.0.1" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -internal-slot@^1.0.3, internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -ipaddr.js@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" - integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== - -is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.3, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-callable@^1.1.4, is-callable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" - integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== - -is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-docker@^2.0.0, is-docker@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-interactive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" - integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== - -is-nan@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" - integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== - -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - -is-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-root@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" - integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== - -is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-unicode-supported@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" - integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isbinaryfile@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" - integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== - dependencies: - buffer-alloc "^1.2.0" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -js-sdsl@^4.1.4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" - integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -json5@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" - integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== - dependencies: - minimist "^1.2.5" - -json5@^2.2.1, json5@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== - dependencies: - universalify "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.3.3" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" - integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== - dependencies: - array-includes "^3.1.5" - object.assign "^4.1.3" - -jszip@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-2.6.1.tgz#b88f3a7b2e67a2a048152982c7a3756d9c4828f0" - integrity sha1-uI86ey5noqBIFSmCx6N1bZxIKPA= - dependencies: - pako "~1.0.2" - -kind-of@^6.0.2, kind-of@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -klona@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" - integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== - -known-css-properties@^0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.26.0.tgz#008295115abddc045a9f4ed7e2a84dc8b3a77649" - integrity sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg== - -lazystream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - dependencies: - readable-stream "^2.0.5" - -leven@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -lilconfig@^2.0.5, lilconfig@^2.0.6: - version "2.1.0" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" - integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== - -lines-and-columns@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" - integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -loader-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" - integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -loader-utils@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" - integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -loader-utils@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" - integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== - -loader-utils@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - -lodash.defaults@^4.0.1, lodash.defaults@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= - -lodash.difference@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" - integrity sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA== - -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= - -lodash.flatten@^4.2.0, lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= - -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= - -lodash.merge@^4.4.0, lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= - -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= - -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash.union@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== - -lodash@^4.17.19, lodash@^4.17.4, lodash@^4.17.5: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -lodash@^4.17.20, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93" - integrity sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA== - dependencies: - chalk "^5.0.0" - is-unicode-supported "^1.1.0" - -log-update@4.0.x: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - -loose-envify@^1.0.0, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -magic-string@^0.26.7: - version "0.26.7" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.7.tgz#caf7daf61b34e9982f8228c4527474dac8981d6f" - integrity sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow== - dependencies: - sourcemap-codec "^1.4.8" - -make-dir@^3.0.2, make-dir@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -map-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= - -map-obj@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" - integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== - -mathml-tag-names@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" - integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== - -maven-deploy@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/maven-deploy/-/maven-deploy-1.5.0.tgz#39dff210b774aa216d85874b23ffeef7175b3fe0" - integrity sha1-Od/yELd0qiFthYdLI//u9xdbP+A= - dependencies: - define-options "^0.1.3" - fs-walk "0.0.1" - isbinaryfile "^3.0.0" - jszip "^2.5.0" - semver "^5.1.0" - util-extend "^1.0.3" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -mdn-data@2.0.30: - version "2.0.30" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" - integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -memfs@^3.1.2, memfs@^3.4.3: - version "3.4.13" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.13.tgz#248a8bd239b3c240175cd5ec548de5227fc4f345" - integrity sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg== - dependencies: - fs-monkey "^1.0.3" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -meow@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-9.0.0.tgz#cd9510bc5cac9dee7d03c73ee1f9ad959f4ea364" - integrity sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize "^1.2.0" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^3.0.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.18.0" - yargs-parser "^20.2.3" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime-types@~2.1.17, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@^2.0.3: - version "2.4.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" - integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== - -mime@~2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" - integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -mini-css-extract-plugin@2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz#e049d3ea7d3e4e773aad585c6cb329ce0c7b72d7" - integrity sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw== - dependencies: - schema-utils "^4.0.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.1.0: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@~3.0.4: - version "3.0.8" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" - integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== - dependencies: - brace-expansion "^1.1.7" - -minimist-options@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" - integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - kind-of "^6.0.3" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@1.2.8, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -mkdirp@^0.5.1, mkdirp@^0.5.4: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha-headless-chrome@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mocha-headless-chrome/-/mocha-headless-chrome-2.0.1.tgz#8c21c1679f43faebc8b526b2ad26d96ab42e47c1" - integrity sha512-76ieyHSSnNYv01AuSNt+ZmALZdfrM2uWDeLjxA7cYjrI0kLruZSdgje5MawWBVBfbE3U1pLgHJIveY1nv3zv6w== - dependencies: - args "^5.0.0" - mkdirp "^0.5.1" - puppeteer "1.5.0" - -mocha-loader@5.1.5: - version "5.1.5" - resolved "https://registry.yarnpkg.com/mocha-loader/-/mocha-loader-5.1.5.tgz#40e9163a17e4662e5d8851de93dca509fe4b5455" - integrity sha512-NfcFycKc9uAWmkLos/azir6XQknrzebY5qjEEyFhd423bVNkCoAbgaRmiV75j0nufmkZTCDBhm8NJ8WlTNbAQQ== - dependencies: - css-loader "^5.0.0" - loader-utils "^2.0.0" - schema-utils "^3.0.0" - style-loader "^2.0.0" - -mocha@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" - integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== - dependencies: - browser-stdout "1.3.1" - commander "2.15.1" - debug "3.1.0" - diff "3.5.0" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.5" - he "1.1.1" - minimatch "3.0.4" - mkdirp "0.5.1" - supports-color "5.4.0" - -mri@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a" - integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w== - -mrmime@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" - integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multicast-dns@^7.2.5: - version "7.2.5" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" - integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== - dependencies: - dns-packet "^5.2.2" - thunky "^1.0.2" - -nanoid@^3.3.4: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - -node-forge@^1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - -node-polyfill-webpack-plugin@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-2.0.1.tgz#141d86f177103a8517c71d99b7c6a46edbb1bb58" - integrity sha512-ZUMiCnZkP1LF0Th2caY6J/eKKoA0TefpoVa68m/LQU1I/mE8rGt4fNYGgNuCcK+aG8P8P43nbeJ2RqJMOL/Y1A== - dependencies: - assert "^2.0.0" - browserify-zlib "^0.2.0" - buffer "^6.0.3" - console-browserify "^1.2.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.12.0" - domain-browser "^4.22.0" - events "^3.3.0" - filter-obj "^2.0.2" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "^1.0.1" - process "^0.11.10" - punycode "^2.1.1" - querystring-es3 "^0.2.1" - readable-stream "^4.0.0" - stream-browserify "^3.0.0" - stream-http "^3.2.0" - string_decoder "^1.3.0" - timers-browserify "^2.0.12" - tty-browserify "^0.0.1" - type-fest "^2.14.0" - url "^0.11.0" - util "^0.12.4" - vm-browserify "^1.1.2" - -node-releases@^2.0.8: - version "2.0.10" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" - integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== - -normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-package-data@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= - -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" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -nth-check@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-hash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" - integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== - -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -object-inspect@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-is@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" - integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.3, object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.entries@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.fromentries@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" - integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.hasown@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.2.tgz#f919e21fad4eb38a57bc6345b3afd496515c3f92" - integrity sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw== - dependencies: - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -obuf@^1.0.0, obuf@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -once@^1.3.0, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -open@^8.0.9, open@^8.4.0: - version "8.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" - integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -opener@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" - integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -ora@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ora/-/ora-6.1.2.tgz#7b3c1356b42fd90fb1dad043d5dbe649388a0bf5" - integrity sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw== - dependencies: - bl "^5.0.0" - chalk "^5.0.0" - cli-cursor "^4.0.0" - cli-spinners "^2.6.1" - is-interactive "^2.0.0" - is-unicode-supported "^1.1.0" - log-symbols "^5.1.0" - strip-ansi "^7.0.1" - wcwidth "^1.0.1" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-retry@^4.5.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" - integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== - dependencies: - "@types/retry" "0.12.0" - retry "^0.13.1" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -pako@~1.0.2, pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -param-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" - integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-json@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.1.tgz#7cfe35c1ccd641bce3981467e6c2ece61b3b3878" - integrity sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - lines-and-columns "^1.1.6" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -path-browserify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" - integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -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" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-up@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" - integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== - dependencies: - find-up "^3.0.0" - -postcss-import@^14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-14.1.0.tgz#a7333ffe32f0b8795303ee9e40215dac922781f0" - integrity sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw== - dependencies: - postcss-value-parser "^4.0.0" - read-cache "^1.0.0" - resolve "^1.1.7" - -postcss-js@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" - integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== - dependencies: - camelcase-css "^2.0.1" - -postcss-load-config@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" - integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== - dependencies: - lilconfig "^2.0.5" - yaml "^1.10.2" - -postcss-loader@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.0.2.tgz#b53ff44a26fba3688eee92a048c7f2d4802e23bb" - integrity sha512-fUJzV/QH7NXUAqV8dWJ9Lg4aTkDCezpTS5HgJ2DvqznexTbSTxgi/dTECvTZ15BwKTtk8G/bqI/QTu2HPd3ZCg== - dependencies: - cosmiconfig "^7.0.0" - klona "^2.0.5" - semver "^7.3.8" - -postcss-media-query-parser@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" - integrity sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ= - -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== - -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== - dependencies: - icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== - dependencies: - postcss-selector-parser "^6.0.4" - -postcss-modules-values@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" - integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - dependencies: - icss-utils "^5.0.0" - -postcss-nested@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.0.tgz#1572f1984736578f360cffc7eb7dca69e30d1735" - integrity sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w== - dependencies: - postcss-selector-parser "^6.0.10" - -postcss-nested@^5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc" - integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA== - dependencies: - postcss-selector-parser "^6.0.6" - -postcss-resolve-nested-selector@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz#29ccbc7c37dedfac304e9fff0bf1596b3f6a0e4e" - integrity sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4= - -postcss-safe-parser@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz#bb4c29894171a94bc5c996b9a30317ef402adaa1" - integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ== - -postcss-scss@^4.0.5: - version "4.0.6" - resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.6.tgz#5d62a574b950a6ae12f2aa89b60d63d9e4432bfd" - integrity sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ== - -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.6: - version "6.0.11" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc" - integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-selector-parser@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" - integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== - dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-url@^10.0.0: - version "10.1.3" - resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-10.1.3.tgz#54120cc910309e2475ec05c2cfa8f8a2deafdf1e" - integrity sha512-FUzyxfI5l2tKmXdYc6VTu3TWZsInayEKPbiyW+P6vmmIrrb4I6CGX0BFoewgYHLK+oIL5FECEK02REYRpBvUCw== - dependencies: - make-dir "~3.1.0" - mime "~2.5.2" - minimatch "~3.0.4" - xxhashjs "~0.2.2" - -postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@8.4.21, postcss@^8.0.9, postcss@^8.2.15, postcss@^8.4.18, postcss@^8.4.19, postcss@^8.4.21: - version "8.4.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" - integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^7.0.26: - version "7.0.32" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" - integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prettier@2.8.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" - integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== - -pretty-error@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6" - integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== - dependencies: - lodash "^4.17.20" - renderkid "^3.0.0" - -private@^0.1.6, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@0.11.10, process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -prompts@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -prop-types@^15.6.1: - version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" - integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.8.1" - -prop-types@^15.8.1: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -proxy-from-env@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -puppeteer@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.5.0.tgz#e35db3f3ba3d41013feb65be02bdaa727ec7b8ec" - integrity sha512-eELwFtFxL+uhmg4jPZOZXzSrPEYy4CaYQNbcchBbfxY+KjMpnv6XGf/aYWaQG49OTpfi2/DMziXtDM8XuJgoUA== - dependencies: - debug "^3.1.0" - extract-zip "^1.6.6" - https-proxy-agent "^2.2.1" - mime "^2.0.3" - progress "^2.0.0" - proxy-from-env "^1.0.0" - rimraf "^2.6.1" - ws "^5.1.1" - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -querystring-es3@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-lru@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" - integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.2.1, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-loader@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" - integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -raw-loader@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" - integrity sha1-DD0L6u2KAclm2Xh793goElKpeao= - -react-dev-utils@12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73" - integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ== - dependencies: - "@babel/code-frame" "^7.16.0" - address "^1.1.2" - browserslist "^4.18.1" - chalk "^4.1.2" - cross-spawn "^7.0.3" - detect-port-alt "^1.1.6" - escape-string-regexp "^4.0.0" - filesize "^8.0.6" - find-up "^5.0.0" - fork-ts-checker-webpack-plugin "^6.5.0" - global-modules "^2.0.0" - globby "^11.0.4" - gzip-size "^6.0.0" - immer "^9.0.7" - is-root "^2.1.0" - loader-utils "^3.2.0" - open "^8.4.0" - pkg-up "^3.1.0" - prompts "^2.4.2" - react-error-overlay "^6.0.11" - recursive-readdir "^2.2.2" - shell-quote "^1.7.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -react-error-overlay@^6.0.11: - version "6.0.11" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" - integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== - -react-hot-loader@4.13.1: - version "4.13.1" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.13.1.tgz#979fd7598e27338b3faffae6ed01c65374dace5e" - integrity sha512-ZlqCfVRqDJmMXTulUGic4lN7Ic1SXgHAFw7y/Jb7t25GBgTR0fYAJ8uY4mrpxjRyWGWmqw77qJQGnYbzCvBU7g== - dependencies: - fast-levenshtein "^2.0.6" - global "^4.3.0" - hoist-non-react-statics "^3.3.0" - loader-utils "^2.0.3" - prop-types "^15.6.1" - react-lifecycles-compat "^3.0.4" - shallowequal "^1.1.0" - source-map "^0.7.3" - -react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-lifecycles-compat@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" - integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== - -read-cache@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" - integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== - dependencies: - pify "^2.3.0" - -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.2.2: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - 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" - -readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.4.0, readable-stream@^3.5.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba" - integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - -readdir-glob@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.2.tgz#b185789b8e6a43491635b6953295c5c5e3fd224c" - integrity sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA== - dependencies: - minimatch "^5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -recursive-readdir@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" - integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== - dependencies: - minimatch "^3.0.5" - -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - -regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== - dependencies: - regenerate "^1.4.2" - -regenerate-unicode-properties@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" - integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.2.1, regenerate@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f" - integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A== - -regenerate@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - integrity sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w== - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== - dependencies: - "@babel/runtime" "^7.8.4" - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexpp@^3.0.0, regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regexpu-core@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" - integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^8.2.0" - regjsgen "^0.5.1" - regjsparser "^0.6.4" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.2.0" - -regexpu-core@^5.3.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" - integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== - dependencies: - "@babel/regjsgen" "^0.8.0" - regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsparser "^0.9.1" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= - -regjsgen@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" - integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= - dependencies: - jsesc "~0.5.0" - -regjsparser@^0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" - integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== - dependencies: - jsesc "~0.5.0" - -regjsparser@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" - integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== - dependencies: - jsesc "~0.5.0" - -relateurl@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - -renderkid@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" - integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== - dependencies: - css-select "^4.1.3" - dom-converter "^0.2.0" - htmlparser2 "^6.1.0" - lodash "^4.17.21" - strip-ansi "^6.0.1" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -requirejs@^2.3.2: - version "2.3.6" - resolved "https://registry.yarnpkg.com/requirejs/-/requirejs-2.3.6.tgz#e5093d9601c2829251258c0b9445d4d19fa9e7c9" - integrity sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve@^1.1.7, resolve@^1.10.1, resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -resolve@^2.0.0-next.4: - version "2.0.0-next.4" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" - integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -restore-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" - integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -retry@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" - integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== - dependencies: - glob "^7.0.5" - -rimraf@^2.6.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -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" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -schema-utils@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" - integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== - dependencies: - "@types/json-schema" "^7.0.4" - ajv "^6.12.2" - ajv-keywords "^3.4.1" - -schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.8.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" - -script-loader@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/script-loader/-/script-loader-0.7.2.tgz#2016db6f86f25f5cf56da38915d83378bb166ba7" - integrity sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA== - dependencies: - raw-loader "~0.5.1" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= - -selfsigned@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.1.1.tgz#18a7613d714c0cd3385c48af0075abf3f266af61" - integrity sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ== - dependencies: - node-forge "^1" - -"semver@2 || 3 || 4 || 5", semver@^5.1.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== - dependencies: - randombytes "^2.1.0" - -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shallowequal@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" - integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.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" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shell-quote@^1.7.3: - version "1.8.0" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.0.tgz#20d078d0eaf71d54f43bd2ba14a1b5b9bfa5c8ba" - integrity sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-progress-webpack-plugin@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/simple-progress-webpack-plugin/-/simple-progress-webpack-plugin-2.0.0.tgz#2d51a63e266070cdd181215a6665e29ea6e82055" - integrity sha512-Ji8b05YHc9R8iHHbEX8kOqvR2CB8bUqqqP481DbY+j5ImqBhLXk9sXFZZdcSEK3Ld0hZl9i+5CzXWLXzw1NV9g== - dependencies: - chalk "4.1.x" - figures "3.2.x" - log-update "4.0.x" - -sirv@^1.0.7: - version "1.0.19" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" - integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== - dependencies: - "@polka/url" "^1.0.0-next.20" - mrmime "^1.0.0" - totalist "^1.0.0" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -sockjs@^0.3.24: - version "0.3.24" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" - integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== - dependencies: - faye-websocket "^0.11.3" - uuid "^8.3.2" - websocket-driver "^0.7.4" - -source-map-js@^1.0.1, source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -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" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.21, source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -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" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -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" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== - -spdy-transport@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" - integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - dependencies: - debug "^4.1.0" - detect-node "^2.0.4" - hpack.js "^2.1.6" - obuf "^1.1.2" - readable-stream "^3.0.6" - wbuf "^1.7.3" - -spdy@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" - integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - dependencies: - debug "^4.1.0" - handle-thing "^2.0.0" - http-deceiver "^1.2.7" - select-hose "^2.0.0" - spdy-transport "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stream-browserify@3.0.0, stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - -stream-http@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" - integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.4" - readable-stream "^3.6.0" - xtend "^4.0.2" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.matchall@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" - integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.4.3" - side-channel "^1.0.4" - -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string_decoder@^1.1.1, string_decoder@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== - dependencies: - ansi-regex "^6.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-comments@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-comments/-/strip-comments-2.0.1.tgz#4ad11c3fbcac177a67a40ac224ca339ca1c1ba9b" - integrity sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw== - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -style-loader@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" - integrity sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ== - -style-loader@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-2.0.0.tgz#9669602fd4690740eaaec137799a03addbbc393c" - integrity sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -style-search@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" - integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI= - -stylelint-config-recommended@10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-10.0.1.tgz#25a8828acf6cde87dac6db2950c8c4ed82a69ae1" - integrity sha512-TQ4xQ48tW4QSlODcti7pgSRqBZcUaBzuh0jPpfiMhwJKBPkqzTIAU+IrSWL/7BgXlOM90DjB7YaNgFpx8QWhuA== - -stylelint-config-styled-components@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/stylelint-config-styled-components/-/stylelint-config-styled-components-0.1.1.tgz#b408388d7c687833ab4be4c4e6522d97d2827ede" - integrity sha512-z5Xz/9GmvxO6e/DLzBMwkB85zHxEEjN6K7Cj80Bi+o/9vR9eS3GX3E9VuMnX9WLFYulqbqLtTapGGY28JBiy9Q== - -stylelint-custom-processor-loader@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/stylelint-custom-processor-loader/-/stylelint-custom-processor-loader-0.6.0.tgz#57b70095e9999252967ff8aa2ec185cbbfbe3cba" - integrity sha512-vwab7dHm0/GfKumFMrX9lXEjN+Re+MZSdWstA5ORwKI0XjZ3pLKtSdR6jwNLZNcdzQMu4qaFwhC7YLiPVmvA8w== - dependencies: - loader-utils "~1.1.0" - -stylelint-processor-styled-components@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/stylelint-processor-styled-components/-/stylelint-processor-styled-components-1.10.0.tgz#8082fc68779476aac411d3afffac0bc833d77a29" - integrity sha512-g4HpN9rm0JD0LoHuIOcd/FIjTZCJ0ErQ+dC3VTxp+dSvnkV+MklKCCmCQEdz5K5WxF4vPuzfVgdbSDuPYGZhoA== - dependencies: - "@babel/parser" "^7.8.3" - "@babel/traverse" "^7.8.3" - micromatch "^4.0.2" - postcss "^7.0.26" - -stylelint@15.2.0: - version "15.2.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-15.2.0.tgz#e906eb59df83bde075d148623216f298f9ceb03a" - integrity sha512-wjg5OLn8zQwjlj5cYUgyQpMWKzct42AG5dYlqkHRJQJqsystFFn3onqEc263KH4xfEI0W3lZCnlIhFfS64uwSA== - dependencies: - "@csstools/css-parser-algorithms" "^2.0.1" - "@csstools/css-tokenizer" "^2.0.1" - "@csstools/media-query-list-parser" "^2.0.1" - "@csstools/selector-specificity" "^2.1.1" - balanced-match "^2.0.0" - colord "^2.9.3" - cosmiconfig "^8.0.0" - css-functions-list "^3.1.0" - css-tree "^2.3.1" - debug "^4.3.4" - fast-glob "^3.2.12" - fastest-levenshtein "^1.0.16" - file-entry-cache "^6.0.1" - global-modules "^2.0.0" - globby "^11.1.0" - globjoin "^0.1.4" - html-tags "^3.2.0" - ignore "^5.2.4" - import-lazy "^4.0.0" - imurmurhash "^0.1.4" - is-plain-object "^5.0.0" - known-css-properties "^0.26.0" - mathml-tag-names "^2.1.3" - meow "^9.0.0" - micromatch "^4.0.5" - normalize-path "^3.0.0" - picocolors "^1.0.0" - postcss "^8.4.21" - postcss-media-query-parser "^0.2.3" - postcss-resolve-nested-selector "^0.1.1" - postcss-safe-parser "^6.0.0" - postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" - resolve-from "^5.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - style-search "^0.1.0" - supports-hyperlinks "^2.3.0" - svg-tags "^1.0.0" - table "^6.8.1" - v8-compile-cache "^2.3.0" - write-file-atomic "^5.0.0" - -supports-color@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" - integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== - dependencies: - has-flag "^3.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-hyperlinks@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -svg-tags@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" - integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= - -table@^6.8.1: - version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - -tailwindcss@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.2.7.tgz#5936dd08c250b05180f0944500c01dce19188c07" - integrity sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ== - dependencies: - arg "^5.0.2" - chokidar "^3.5.3" - color-name "^1.1.4" - detective "^5.2.1" - didyoumean "^1.2.2" - dlv "^1.1.3" - fast-glob "^3.2.12" - glob-parent "^6.0.2" - is-glob "^4.0.3" - lilconfig "^2.0.6" - micromatch "^4.0.5" - normalize-path "^3.0.0" - object-hash "^3.0.0" - picocolors "^1.0.0" - postcss "^8.0.9" - postcss-import "^14.1.0" - postcss-js "^4.0.0" - postcss-load-config "^3.1.4" - postcss-nested "6.0.0" - postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" - quick-lru "^5.1.1" - resolve "^1.22.1" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar-stream@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -terser-webpack-plugin@^5.1.3: - version "5.3.7" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz#ef760632d24991760f339fe9290deb936ad1ffc7" - integrity sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.17" - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.16.5" - -terser@^5.10.0, terser@^5.15.1, terser@^5.16.5: - version "5.16.8" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.8.tgz#ccde583dabe71df3f4ed02b65eb6532e0fae15d5" - integrity sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - -timers-browserify@^2.0.12: - version "2.0.12" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - dependencies: - setimmediate "^1.0.4" - -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" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== - -trim-newlines@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" - integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -ts-loader@9.4.2: - version "9.4.2" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.4.2.tgz#80a45eee92dd5170b900b3d00abcfa14949aeb78" - integrity sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - -tsconfig-paths@^3.14.1: - version "3.14.2" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== - -tslib@^2.0.3: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -tty-browserify@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" - integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" - integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-fest@^2.14.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" - integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -typescript@4.9.5: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - -unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" - integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - dependencies: - unicode-canonical-property-names-ecmascript "^2.0.0" - unicode-property-aliases-ecmascript "^2.0.0" - -unicode-match-property-value-ecmascript@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" - integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== - -unicode-match-property-value-ecmascript@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" - integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" - integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== - -unicode-property-aliases-ecmascript@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" - integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unique-slug@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" - integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== - dependencies: - imurmurhash "^0.1.4" - -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -update-browserslist-db@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -username@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/username/-/username-3.0.0.tgz#b3dba982a72b4ce59d52f159fa1aeba266af5fc8" - integrity sha1-s9upgqcrTOWdUvFZ+hrromavX8g= - dependencies: - execa "^0.7.0" - mem "^1.1.0" - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util-extend@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" - integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= - -util@^0.12.0, util@^0.12.4: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -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" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -vkbeautify@0.99.3: - version "0.99.3" - resolved "https://registry.yarnpkg.com/vkbeautify/-/vkbeautify-0.99.3.tgz#4769b3238c5d772c6ea967545dd1df5582f23297" - integrity sha512-2ozZEFfmVvQcHWoHLNuiKlUfDKlhh4KGsy54U0UrlLMR1SO+XKAIDqBxtBwHgNrekurlJwE8A9K6L49T78ZQ9Q== - -vm-browserify@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -wbuf@^1.1.0, wbuf@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - dependencies: - minimalistic-assert "^1.0.0" - -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - dependencies: - defaults "^1.0.3" - -webpack-bundle-analyzer@4.8.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.8.0.tgz#951b8aaf491f665d2ae325d8b84da229157b1d04" - integrity sha512-ZzoSBePshOKhr+hd8u6oCkZVwpVaXgpw23ScGLFpR6SjYI7+7iIWYarjN6OEYOfRt8o7ZyZZQk0DuMizJ+LEIg== - dependencies: - "@discoveryjs/json-ext" "0.5.7" - acorn "^8.0.4" - acorn-walk "^8.0.0" - chalk "^4.1.0" - commander "^7.2.0" - gzip-size "^6.0.0" - lodash "^4.17.20" - opener "^1.5.2" - sirv "^1.0.7" - ws "^7.3.1" - -webpack-dev-middleware@^5.3.1: - version "5.3.3" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f" - integrity sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA== - dependencies: - colorette "^2.0.10" - memfs "^3.4.3" - mime-types "^2.1.31" - range-parser "^1.2.1" - schema-utils "^4.0.0" - -webpack-dev-server@4.11.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz#ae07f0d71ca0438cf88446f09029b92ce81380b5" - integrity sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw== - dependencies: - "@types/bonjour" "^3.5.9" - "@types/connect-history-api-fallback" "^1.3.5" - "@types/express" "^4.17.13" - "@types/serve-index" "^1.9.1" - "@types/serve-static" "^1.13.10" - "@types/sockjs" "^0.3.33" - "@types/ws" "^8.5.1" - ansi-html-community "^0.0.8" - bonjour-service "^1.0.11" - chokidar "^3.5.3" - colorette "^2.0.10" - compression "^1.7.4" - connect-history-api-fallback "^2.0.0" - default-gateway "^6.0.3" - express "^4.17.3" - graceful-fs "^4.2.6" - html-entities "^2.3.2" - http-proxy-middleware "^2.0.3" - ipaddr.js "^2.0.1" - open "^8.0.9" - p-retry "^4.5.0" - rimraf "^3.0.2" - schema-utils "^4.0.0" - selfsigned "^2.1.1" - serve-index "^1.9.1" - sockjs "^0.3.24" - spdy "^4.0.2" - webpack-dev-middleware "^5.3.1" - ws "^8.4.2" - -webpack-merge@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.2.tgz#5d372dddd3e1e5f8874f5bf5a8e929db09feb216" - integrity sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw== - dependencies: - lodash "^4.17.5" - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack-virtual-modules@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.3.2.tgz#b7baa30971a22d99451f897db053af48ec29ad2c" - integrity sha512-RXQXioY6MhzM4CNQwmBwKXYgBs6ulaiQ8bkNQEl2J6Z+V+s7lgl/wGvaI/I0dLnYKB8cKsxQc17QOAVIphPLDw== - dependencies: - debug "^3.0.0" - -webpack@5.75.0: - version "5.75.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.75.0.tgz#1e440468647b2505860e94c9ff3e44d5b582c152" - integrity sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.7.1" - acorn-import-assertions "^1.7.6" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" - es-module-lexer "^0.9.0" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.1.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" - watchpack "^2.4.0" - webpack-sources "^3.2.3" - -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -whatwg-fetch@3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c" - integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-typed-array@^1.1.2, which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - -which@^1.2.9, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -worker-loader@3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-3.0.8.tgz#5fc5cda4a3d3163d9c274a4e3a811ce8b60dbb37" - integrity sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.0.tgz#54303f117e109bf3d540261125c8ea5a7320fab0" - integrity sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -ws@^5.1.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -ws@^7.3.1: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -ws@^8.4.2: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== - -xtend@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -xxhashjs@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" - integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== - dependencies: - cuint "^0.2.2" - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml@^1.10.0, yaml@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - -yaml@^1.7.2: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== - -yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.6.0: - version "17.7.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" - integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yauzl@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zip-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" - integrity sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A== - dependencies: - archiver-utils "^2.1.0" - compress-commons "^4.1.0" - readable-stream "^3.6.0" diff --git a/ui-frontend/path.sh b/ui-frontend/path.sh deleted file mode 100644 index 881e75e4c5e..00000000000 --- a/ui-frontend/path.sh +++ /dev/null @@ -1,31 +0,0 @@ -ddf-ui-path() { - local NODE=$(pwd)/node - local YARN=$(pwd)/node/yarn/dist/bin - local TEMPFILE=$(mktemp) - - # Ensure that the local copy of node and yarn are installed and that - # they are the correct versions. Avoid informing the user unless there - # is an error. The reason for a temp file instead of capturing output - # into a local variable is that we lose the status code. - mvn com.github.eirslett:frontend-maven-plugin:1.6.CODICE:install-node-and-yarn \ - '-DnodeVersion=${node.version}' \ - '-DyarnVersion=${yarn.version}' > $TEMPFILE - - local MVN_STATUS=$? - local LOG=$(cat $TEMPFILE) - rm $TEMPFILE - - if [ $MVN_STATUS -ne 0 ]; then - >&2 echo "Error running maven command to install local node/yarn." - >&2 echo "" - >&2 echo "Maven Log:\n$LOG" - return - fi - - echo "export PATH='$NODE:$YARN:$PATH'" - echo 'echo "node version: $(node -v)"' - echo 'echo "yarn version: $(yarn -v)"' -} - -eval "$(ddf-ui-path)" - diff --git a/ui-frontend/pom.xml b/ui-frontend/pom.xml deleted file mode 100644 index 4edea0928d4..00000000000 --- a/ui-frontend/pom.xml +++ /dev/null @@ -1,232 +0,0 @@ - - - - 4.0.0 - - catalog-ui - org.codice.ddf.search - 5.1.51-SNAPSHOT - - - org.codice.ddf.search - ui-frontend - DDF :: UI - pom - - - production - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.5.3 - - packages - packages.xml - - - - create-archive - package - - single - - - - - - com.github.eirslett - frontend-maven-plugin - 1.12.1 - - - install node and yarn - - install-node-and-yarn - - - ${node.version} - ${yarn.version} - ${node.download.root} - ${yarn.download.root} - - - - yarn install - - yarn - - - install --network-concurrency 1 --frozen-lockfile - - - - yarn test - - yarn - - - run test - - ${buildEnv} - - - - - yarn build - - yarn - - - run build - - ${buildEnv} - - - - - - - - - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - attach-artifacts - package - false - - attach-artifact - - - - - - - - target/features.xml - xml - features - - - packages/admin/target/kanri.jar - jar - kanri - - - packages/catalog-ui-search/target/catalog-ui-search.jar - jar - catalog-ui-search - - - packages/catalog-ui-search/dist/catalog-ui-search.tgz - tgz - catalog-ui-search-src - - - packages/cesium-assets/target/cesium-assets.jar - jar - cesium-assets - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - check-artifact-size - verify - - enforce - - - - - 48.4_MB - - - - - - - - org.jacoco - jacoco-maven-plugin - - - default-check - - check - - - true - - - BUNDLE - - - INSTRUCTION - 0 - - - BRANCH - 0 - - - COMPLEXITY - 0 - - - - - - - - - - - - - dev - - - webBuildEnv - dev - - - - development - - - - diff --git a/ui-frontend/yarn.lock b/ui-frontend/yarn.lock deleted file mode 100644 index d6d75d3f17c..00000000000 --- a/ui-frontend/yarn.lock +++ /dev/null @@ -1,14844 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/code-frame@^7.16.0", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298" - integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g== - -"@babel/core@7.21.3", "@babel/core@^7.12.3", "@babel/core@^7.19.6": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" - integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.3" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.3" - "@babel/types" "^7.21.3" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/generator@^7.20.0", "@babel/generator@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" - integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== - dependencies: - "@babel/types" "^7.21.3" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" - integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - dependencies: - "@babel/types" "^7.10.4" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" - -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" - integrity sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-member-expression-to-functions" "^7.21.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-regexp-features-plugin@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" - integrity sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-regex" "^7.10.4" - regexpu-core "^4.7.0" - -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.0.tgz#53ff78472e5ce10a52664272a239787107603ebb" - integrity sha512-N+LaFW/auRSWdx7SHD/HiARwXQju1vXTW4fKr4u5SgBUTm51OKEjKgj+cs00ggW3kEvNqwErnlwuq7Y3xBe4eg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.3.1" - -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" - integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== - dependencies: - "@babel/template" "^7.20.7" - "@babel/types" "^7.21.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" - integrity sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q== - dependencies: - "@babel/types" "^7.21.0" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" - integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.2" - "@babel/types" "^7.21.2" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== - -"@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-regex@^7.10.4": - version "7.10.5" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" - integrity sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg== - dependencies: - lodash "^4.17.19" - -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" - integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== - dependencies: - "@babel/types" "^7.20.0" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" - integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" - integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" - -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" - integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" - integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.7" - -"@babel/plugin-proposal-async-generator-functions@^7.20.1": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" - integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" - -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - -"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" - integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" - integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d" - integrity sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" - integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== - dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-block-scoping@^7.20.2": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" - integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-classes@^7.20.2": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" - integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" - integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/template" "^7.20.7" - -"@babel/plugin-transform-destructuring@^7.20.2": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" - integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-dotall-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee" - integrity sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-for-of@^7.18.8": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz#964108c9988de1a60b4be2354a7d7e245f36e86e" - integrity sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== - dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-modules-amd@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" - integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== - dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-modules-commonjs@^7.19.6": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" - integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== - dependencies: - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-simple-access" "^7.20.2" - -"@babel/plugin-transform-modules-systemjs@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" - integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== - dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-identifier" "^7.19.1" - -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" - integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - -"@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz#18fc4e797cf6d6d972cb8c411dbe8a809fa157db" - integrity sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-display-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" - integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-jsx-development@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" - integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== - dependencies: - "@babel/plugin-transform-react-jsx" "^7.18.6" - -"@babel/plugin-transform-react-jsx@^7.18.6", "@babel/plugin-transform-react-jsx@^7.19.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz#656b42c2fdea0a6d8762075d58ef9d4e3c4ab8a2" - integrity sha512-6OAWljMvQrZjR2DaNhVfRz6dkCAVV+ymcLUmaf8bccGOHn2v5rHJK3tTpij0BuhdYWP4LLaqj5lwcdlpAAPuvg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.21.0" - -"@babel/plugin-transform-react-pure-annotations@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz#561af267f19f3e5d59291f9950fd7b9663d0d844" - integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-regenerator@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" - integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - regenerator-transform "^0.15.1" - -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-spread@^7.19.0": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" - integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/preset-env@7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.20.2.tgz#9b1642aa47bb9f43a86f9630011780dab7f86506" - integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== - dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.20.1" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.2" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.20.2" - "@babel/plugin-transform-classes" "^7.20.2" - "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.20.2" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.8" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.19.6" - "@babel/plugin-transform-modules-commonjs" "^7.19.6" - "@babel/plugin-transform-modules-systemjs" "^7.19.6" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.20.1" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.19.0" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.20.2" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/preset-react@7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.18.6.tgz#979f76d6277048dc19094c217b507f3ad517dd2d" - integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-react-display-name" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.18.6" - "@babel/plugin-transform-react-jsx-development" "^7.18.6" - "@babel/plugin-transform-react-pure-annotations" "^7.18.6" - -"@babel/regjsgen@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" - integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== - -"@babel/runtime@^7.8.4": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.18.10", "@babel/template@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/traverse@^7.20.0", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" - integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.3" - "@babel/types" "^7.21.3" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.10.4", "@babel/types@^7.4.4": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" - integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3", "@babel/types@^7.7.0": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" - integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@connexta/ace@git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe": - version "1.0.0" - resolved "git+https://github.com/connexta/ace.git#4cc376863e82757699cdaa1301f30266e66a1efe" - dependencies: - "@babel/core" "7.21.3" - "@babel/preset-env" "7.20.2" - "@babel/preset-react" "7.18.6" - ansi-colors "4.1.3" - archiver "5.3.1" - astroturf "1.1.0" - autoprefixer "10.4.13" - babel-core "6.26.3" - babel-eslint "10.1.0" - babel-loader "9.1.2" - babel-plugin-istanbul "6.1.1" - babel-plugin-transform-react-jsx-source "6.22.0" - babel-polyfill "6.26.0" - babel-preset-latest "6.24.1" - babel-preset-react "6.24.1" - babel-preset-stage-0 "6.24.1" - buffer "6.0.3" - chalk "2.3.2" - cheerio "0.22.0" - commander "2.15.1" - console-polyfill "0.3.0" - cross-spawn "7.0.3" - css-loader "6.7.3" - eslint "8.34.0" - eslint-plugin-import "2.27.5" - eslint-plugin-node "11.1.0" - eslint-plugin-react "7.32.2" - exports-loader "4.0.0" - find-up "2.1.0" - glob "7.1.2" - html-loader "4.2.0" - html-webpack-plugin "5.5.0" - imports-loader "4.0.1" - maven-deploy "1.5.0" - memory-fs "^0.5.0" - mini-css-extract-plugin "2.7.2" - minimist "1.2.8" - mkdirp "^0.5.1" - mocha "5.2.0" - mocha-headless-chrome "2.0.1" - mocha-loader "5.1.5" - node-polyfill-webpack-plugin "2.0.1" - ora "6.1.2" - postcss "8.4.21" - postcss-loader "7.0.2" - prettier "2.8.4" - process "0.11.10" - puppeteer "1.5.0" - raw-loader "4.0.2" - react-dev-utils "12.0.1" - react-hot-loader "4.13.1" - require-from-string "^2.0.2" - rimraf "2.6.2" - script-loader "0.7.2" - simple-progress-webpack-plugin "2.0.0" - source-map-support "^0.5.21" - source-map-url "0.4.0" - stream-browserify "3.0.0" - style-loader "3.3.1" - stylelint "15.2.0" - stylelint-config-recommended "10.0.1" - stylelint-config-styled-components "0.1.1" - stylelint-custom-processor-loader "0.6.0" - stylelint-processor-styled-components "1.10.0" - tailwindcss "3.2.7" - ts-loader "9.4.2" - typescript "4.9.5" - username "3.0.0" - vkbeautify "0.99.3" - webpack "5.75.0" - webpack-bundle-analyzer "4.8.0" - webpack-dev-server "4.11.1" - webpack-merge "4.1.2" - whatwg-fetch "3.6.2" - worker-loader "3.0.8" - -"@connexta/eslint-config-connexta@git+https://github.com/connexta/eslint-config-connexta.git#105393617ec845b009b682882c95313ba50144b1": - version "1.0.0" - resolved "git+https://github.com/connexta/eslint-config-connexta.git#105393617ec845b009b682882c95313ba50144b1" - -"@connexta/eslint-plugin-connexta@git+https://github.com/connexta/eslint-plugin-connexta.git#9b366b8924c3dbe03aedcfe6d25c8eb3567cc061": - version "0.0.0" - resolved "git+https://github.com/connexta/eslint-plugin-connexta.git#9b366b8924c3dbe03aedcfe6d25c8eb3567cc061" - dependencies: - requireindex "1.1.0" - -"@csstools/css-parser-algorithms@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.0.tgz#c0a605b0218790faeb5911f240964891c6031501" - integrity sha512-KP8TicdXpUyeB1NMlbHud/1l39xvLGvqNFWMpG4qC6H1zs9SadGUHe5SO92n/659sDW9aGDvm9AMru0DZkN1Bw== - -"@csstools/css-tokenizer@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.1.0.tgz#fee4de3d444db3ce9007f3af6474af8ba3e4b930" - integrity sha512-dtqFyoJBHUxGi9zPZdpCKP1xk8tq6KPHJ/NY4qWXiYo6IcSGwzk3L8x2XzZbbyOyBs9xQARoGveU2AsgLj6D2A== - -"@csstools/media-query-list-parser@^2.0.1": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.2.tgz#36058f8ff6a28274e7dfe32e48431e1de97c2fbb" - integrity sha512-8V6JD8Av1HttuClYr1ZBu0LRVe5Nnz4qrv8RppO8mobsX/USBHZy5JQOXYIlpOVhl46nzkx3X5cfH6CqUghjrQ== - -"@csstools/selector-specificity@^2.1.1": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz#2cbcf822bf3764c9658c4d2e568bd0c0cb748016" - integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== - -"@discoveryjs/json-ext@0.5.7": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" - integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@evocateur/libnpmaccess@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz#ecf7f6ce6b004e9f942b098d92200be4a4b1c845" - integrity sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - npm-package-arg "^6.1.0" - -"@evocateur/libnpmpublish@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz#55df09d2dca136afba9c88c759ca272198db9f1a" - integrity sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - lodash.clonedeep "^4.5.0" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - semver "^5.5.1" - ssri "^6.0.1" - -"@evocateur/npm-registry-fetch@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz#8c4c38766d8d32d3200fcb0a83f064b57365ed66" - integrity sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g== - dependencies: - JSONStream "^1.3.4" - bluebird "^3.5.1" - figgy-pudding "^3.4.1" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - npm-package-arg "^6.1.0" - safe-buffer "^5.1.2" - -"@evocateur/pacote@^9.6.3": - version "9.6.5" - resolved "https://registry.yarnpkg.com/@evocateur/pacote/-/pacote-9.6.5.tgz#33de32ba210b6f17c20ebab4d497efc6755f4ae5" - integrity sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - bluebird "^3.5.3" - cacache "^12.0.3" - chownr "^1.1.2" - figgy-pudding "^3.5.1" - get-stream "^4.1.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - minimatch "^3.0.4" - minipass "^2.3.5" - mississippi "^3.0.0" - mkdirp "^0.5.1" - normalize-package-data "^2.5.0" - npm-package-arg "^6.1.0" - npm-packlist "^1.4.4" - npm-pick-manifest "^3.0.0" - osenv "^0.1.5" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - protoduck "^5.0.1" - rimraf "^2.6.3" - safe-buffer "^5.2.0" - semver "^5.7.0" - ssri "^6.0.1" - tar "^4.4.10" - unique-filename "^1.1.1" - which "^1.3.1" - -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@iarna/cli@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@iarna/cli/-/cli-1.2.0.tgz#0f7af5e851afe895104583c4ca07377a8094d641" - integrity sha512-ukITQAqVs2n9HGmn3car/Ir7d3ta650iXhrG7pjr3EWdFmJuuOVWgYsu7ftsSe5VifEFFhjxVuX9+8F7L8hwcA== - dependencies: - signal-exit "^3.0.2" - update-notifier "^2.2.0" - yargs "^8.0.2" - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@leichtgewicht/ip-codec@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" - integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== - -"@lerna/add@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.20.0.tgz#bea7edf36fc93fb72ec34cb9ba854c48d4abf309" - integrity sha512-AnH1oRIEEg/VDa3SjYq4x1/UglEAvrZuV0WssHUMN81RTZgQk3we+Mv3qZNddrZ/fBcZu2IAdN/EQ3+ie2JxKQ== - dependencies: - "@evocateur/pacote" "^9.6.3" - "@lerna/bootstrap" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/npm-conf" "3.16.0" - "@lerna/validation-error" "3.13.0" - dedent "^0.7.0" - npm-package-arg "^6.1.0" - p-map "^2.1.0" - semver "^6.2.0" - -"@lerna/bootstrap@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.20.0.tgz#635d71046830f208e851ab429a63da1747589e37" - integrity sha512-Wylullx3uthKE7r4izo09qeRGL20Y5yONlQEjPCfnbxCC2Elu+QcPu4RC6kqKQ7b+g7pdC3OOgcHZjngrwr5XQ== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/has-npm-version" "3.16.5" - "@lerna/npm-install" "3.16.5" - "@lerna/package-graph" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/rimraf-dir" "3.16.5" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/symlink-binary" "3.17.0" - "@lerna/symlink-dependencies" "3.17.0" - "@lerna/validation-error" "3.13.0" - dedent "^0.7.0" - get-port "^4.2.0" - multimatch "^3.0.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - p-finally "^1.0.0" - p-map "^2.1.0" - p-map-series "^1.0.0" - p-waterfall "^1.0.0" - read-package-tree "^5.1.6" - semver "^6.2.0" - -"@lerna/changed@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.20.0.tgz#66b97ebd6c8f8d207152ee524a0791846a9097ae" - integrity sha512-+hzMFSldbRPulZ0vbKk6RD9f36gaH3Osjx34wrrZ62VB4pKmjyuS/rxVYkCA3viPLHoiIw2F8zHM5BdYoDSbjw== - dependencies: - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/listable" "3.18.5" - "@lerna/output" "3.13.0" - -"@lerna/check-working-tree@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz#b4f8ae61bb4523561dfb9f8f8d874dd46bb44baa" - integrity sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ== - dependencies: - "@lerna/collect-uncommitted" "3.16.5" - "@lerna/describe-ref" "3.16.5" - "@lerna/validation-error" "3.13.0" - -"@lerna/child-process@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.16.5.tgz#38fa3c18064aa4ac0754ad80114776a7b36a69b2" - integrity sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg== - dependencies: - chalk "^2.3.1" - execa "^1.0.0" - strong-log-transformer "^2.0.0" - -"@lerna/clean@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.20.0.tgz#ba777e373ddeae63e57860df75d47a9e5264c5b2" - integrity sha512-9ZdYrrjQvR5wNXmHfDsfjWjp0foOkCwKe3hrckTzkAeQA1ibyz5llGwz5e1AeFrV12e2/OLajVqYfe+qdkZUgg== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/rimraf-dir" "3.16.5" - p-map "^2.1.0" - p-map-series "^1.0.0" - p-waterfall "^1.0.0" - -"@lerna/cli@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.18.5.tgz#c90c461542fcd35b6d5b015a290fb0dbfb41d242" - integrity sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA== - dependencies: - "@lerna/global-options" "3.13.0" - dedent "^0.7.0" - npmlog "^4.1.2" - yargs "^14.2.2" - -"@lerna/collect-uncommitted@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz#a494d61aac31cdc7aec4bbe52c96550274132e63" - integrity sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg== - dependencies: - "@lerna/child-process" "3.16.5" - chalk "^2.3.1" - figgy-pudding "^3.5.1" - npmlog "^4.1.2" - -"@lerna/collect-updates@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.20.0.tgz#62f9d76ba21a25b7d9fbf31c02de88744a564bd1" - integrity sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/describe-ref" "3.16.5" - minimatch "^3.0.4" - npmlog "^4.1.2" - slash "^2.0.0" - -"@lerna/command@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.18.5.tgz#14c6d2454adbfd365f8027201523e6c289cd3cd9" - integrity sha512-36EnqR59yaTU4HrR1C9XDFti2jRx0BgpIUBeWn129LZZB8kAB3ov1/dJNa1KcNRKp91DncoKHLY99FZ6zTNpMQ== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/package-graph" "3.18.5" - "@lerna/project" "3.18.0" - "@lerna/validation-error" "3.13.0" - "@lerna/write-log-file" "3.13.0" - clone-deep "^4.0.1" - dedent "^0.7.0" - execa "^1.0.0" - is-ci "^2.0.0" - npmlog "^4.1.2" - -"@lerna/conventional-commits@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.18.5.tgz#08efd2e5b45acfaf3f151a53a3ec7ecade58a7bc" - integrity sha512-qcvXIEJ3qSgalxXnQ7Yxp5H9Ta5TVyai6vEor6AAEHc20WiO7UIdbLDCxBtiiHMdGdpH85dTYlsoYUwsCJu3HQ== - dependencies: - "@lerna/validation-error" "3.13.0" - conventional-changelog-angular "^5.0.3" - conventional-changelog-core "^3.1.6" - conventional-recommended-bump "^5.0.0" - fs-extra "^8.1.0" - get-stream "^4.0.0" - lodash.template "^4.5.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - pify "^4.0.1" - semver "^6.2.0" - -"@lerna/create-symlink@3.16.2": - version "3.16.2" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.16.2.tgz#412cb8e59a72f5a7d9463e4e4721ad2070149967" - integrity sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw== - dependencies: - "@zkochan/cmd-shim" "^3.1.0" - fs-extra "^8.1.0" - npmlog "^4.1.2" - -"@lerna/create@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.18.5.tgz#11ac539f069248eaf7bc4c42e237784330f4fc47" - integrity sha512-cHpjocbpKmLopCuZFI7cKEM3E/QY8y+yC7VtZ4FQRSaLU8D8i2xXtXmYaP1GOlVNavji0iwoXjuNpnRMInIr2g== - dependencies: - "@evocateur/pacote" "^9.6.3" - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/npm-conf" "3.16.0" - "@lerna/validation-error" "3.13.0" - camelcase "^5.0.0" - dedent "^0.7.0" - fs-extra "^8.1.0" - globby "^9.2.0" - init-package-json "^1.10.3" - npm-package-arg "^6.1.0" - p-reduce "^1.0.0" - pify "^4.0.1" - semver "^6.2.0" - slash "^2.0.0" - validate-npm-package-license "^3.0.3" - validate-npm-package-name "^3.0.0" - whatwg-url "^7.0.0" - -"@lerna/describe-ref@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.16.5.tgz#a338c25aaed837d3dc70b8a72c447c5c66346ac0" - integrity sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw== - dependencies: - "@lerna/child-process" "3.16.5" - npmlog "^4.1.2" - -"@lerna/diff@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.18.5.tgz#e9e2cb882f84d5b84f0487c612137305f07accbc" - integrity sha512-u90lGs+B8DRA9Z/2xX4YaS3h9X6GbypmGV6ITzx9+1Ga12UWGTVlKaCXBgONMBjzJDzAQOK8qPTwLA57SeBLgA== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/validation-error" "3.13.0" - npmlog "^4.1.2" - -"@lerna/exec@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.20.0.tgz#29f0c01aee2340eb46f90706731fef2062a49639" - integrity sha512-pS1mmC7kzV668rHLWuv31ClngqeXjeHC8kJuM+W2D6IpUVMGQHLcCTYLudFgQsuKGVpl0DGNYG+sjLhAPiiu6A== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/profiler" "3.20.0" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - p-map "^2.1.0" - -"@lerna/filter-options@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.20.0.tgz#0f0f5d5a4783856eece4204708cc902cbc8af59b" - integrity sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g== - dependencies: - "@lerna/collect-updates" "3.20.0" - "@lerna/filter-packages" "3.18.0" - dedent "^0.7.0" - figgy-pudding "^3.5.1" - npmlog "^4.1.2" - -"@lerna/filter-packages@3.18.0": - version "3.18.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.18.0.tgz#6a7a376d285208db03a82958cfb8172e179b4e70" - integrity sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ== - dependencies: - "@lerna/validation-error" "3.13.0" - multimatch "^3.0.0" - npmlog "^4.1.2" - -"@lerna/get-npm-exec-opts@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz#d1b552cb0088199fc3e7e126f914e39a08df9ea5" - integrity sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw== - dependencies: - npmlog "^4.1.2" - -"@lerna/get-packed@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-3.16.0.tgz#1b316b706dcee86c7baa55e50b087959447852ff" - integrity sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw== - dependencies: - fs-extra "^8.1.0" - ssri "^6.0.1" - tar "^4.4.8" - -"@lerna/github-client@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-3.16.5.tgz#2eb0235c3bf7a7e5d92d73e09b3761ab21f35c2e" - integrity sha512-rHQdn8Dv/CJrO3VouOP66zAcJzrHsm+wFuZ4uGAai2At2NkgKH+tpNhQy2H1PSC0Ezj9LxvdaHYrUzULqVK5Hw== - dependencies: - "@lerna/child-process" "3.16.5" - "@octokit/plugin-enterprise-rest" "^3.6.1" - "@octokit/rest" "^16.28.4" - git-url-parse "^11.1.2" - npmlog "^4.1.2" - -"@lerna/gitlab-client@3.15.0": - version "3.15.0" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz#91f4ec8c697b5ac57f7f25bd50fe659d24aa96a6" - integrity sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q== - dependencies: - node-fetch "^2.5.0" - npmlog "^4.1.2" - whatwg-url "^7.0.0" - -"@lerna/global-options@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.13.0.tgz#217662290db06ad9cf2c49d8e3100ee28eaebae1" - integrity sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ== - -"@lerna/has-npm-version@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz#ab83956f211d8923ea6afe9b979b38cc73b15326" - integrity sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q== - dependencies: - "@lerna/child-process" "3.16.5" - semver "^6.2.0" - -"@lerna/import@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.18.5.tgz#a9c7d8601870729851293c10abd18b3707f7ba5e" - integrity sha512-PH0WVLEgp+ORyNKbGGwUcrueW89K3Iuk/DDCz8mFyG2IG09l/jOF0vzckEyGyz6PO5CMcz4TI1al/qnp3FrahQ== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/validation-error" "3.13.0" - dedent "^0.7.0" - fs-extra "^8.1.0" - p-map-series "^1.0.0" - -"@lerna/info@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-3.20.0.tgz#3a5212f3029f2bc6255f9533bdf4bcb120ef329a" - integrity sha512-Rsz+KQF9mczbGUbPTrtOed1N0C+cA08Qz0eX/oI+NNjvsryZIju/o7uedG4I3P55MBiAioNrJI88fHH3eTgYug== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/output" "3.13.0" - envinfo "^7.3.1" - -"@lerna/init@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.18.5.tgz#86dd0b2b3290755a96975069b5cb007f775df9f5" - integrity sha512-oCwipWrha98EcJAHm8AGd2YFFLNI7AW9AWi0/LbClj1+XY9ah+uifXIgYGfTk63LbgophDd8936ZEpHMxBsbAg== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - fs-extra "^8.1.0" - p-map "^2.1.0" - write-json-file "^3.2.0" - -"@lerna/link@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.18.5.tgz#f24347e4f0b71d54575bd37cfa1794bc8ee91b18" - integrity sha512-xTN3vktJpkT7Nqc3QkZRtHO4bT5NvuLMtKNIBDkks0HpGxC9PRyyqwOoCoh1yOGbrWIuDezhfMg3Qow+6I69IQ== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/package-graph" "3.18.5" - "@lerna/symlink-dependencies" "3.17.0" - p-map "^2.1.0" - slash "^2.0.0" - -"@lerna/list@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.20.0.tgz#7e67cc29c5cf661cfd097e8a7c2d3dcce7a81029" - integrity sha512-fXTicPrfioVnRzknyPawmYIVkzDRBaQqk9spejS1S3O1DOidkihK0xxNkr8HCVC0L22w6f92g83qWDp2BYRUbg== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/listable" "3.18.5" - "@lerna/output" "3.13.0" - -"@lerna/listable@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.18.5.tgz#e82798405b5ed8fc51843c8ef1e7a0e497388a1a" - integrity sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg== - dependencies: - "@lerna/query-graph" "3.18.5" - chalk "^2.3.1" - columnify "^1.5.4" - -"@lerna/log-packed@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.16.0.tgz#f83991041ee77b2495634e14470b42259fd2bc16" - integrity sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ== - dependencies: - byte-size "^5.0.1" - columnify "^1.5.4" - has-unicode "^2.0.1" - npmlog "^4.1.2" - -"@lerna/npm-conf@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.16.0.tgz#1c10a89ae2f6c2ee96962557738685300d376827" - integrity sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA== - dependencies: - config-chain "^1.1.11" - pify "^4.0.1" - -"@lerna/npm-dist-tag@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz#9ef9abb7c104077b31f6fab22cc73b314d54ac55" - integrity sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - "@lerna/otplease" "3.18.5" - figgy-pudding "^3.5.1" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - -"@lerna/npm-install@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.16.5.tgz#d6bfdc16f81285da66515ae47924d6e278d637d3" - integrity sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/get-npm-exec-opts" "3.13.0" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - signal-exit "^3.0.2" - write-pkg "^3.1.0" - -"@lerna/npm-publish@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.18.5.tgz#240e4039959fd9816b49c5b07421e11b5cb000af" - integrity sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg== - dependencies: - "@evocateur/libnpmpublish" "^1.2.2" - "@lerna/otplease" "3.18.5" - "@lerna/run-lifecycle" "3.16.2" - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - pify "^4.0.1" - read-package-json "^2.0.13" - -"@lerna/npm-run-script@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz#9c2ec82453a26c0b46edc0bb7c15816c821f5c15" - integrity sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/get-npm-exec-opts" "3.13.0" - npmlog "^4.1.2" - -"@lerna/otplease@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-3.18.5.tgz#b77b8e760b40abad9f7658d988f3ea77d4fd0231" - integrity sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog== - dependencies: - "@lerna/prompt" "3.18.5" - figgy-pudding "^3.5.1" - -"@lerna/output@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.13.0.tgz#3ded7cc908b27a9872228a630d950aedae7a4989" - integrity sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg== - dependencies: - npmlog "^4.1.2" - -"@lerna/pack-directory@3.16.4": - version "3.16.4" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-3.16.4.tgz#3eae5f91bdf5acfe0384510ed53faddc4c074693" - integrity sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng== - dependencies: - "@lerna/get-packed" "3.16.0" - "@lerna/package" "3.16.0" - "@lerna/run-lifecycle" "3.16.2" - figgy-pudding "^3.5.1" - npm-packlist "^1.4.4" - npmlog "^4.1.2" - tar "^4.4.10" - temp-write "^3.4.0" - -"@lerna/package-graph@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.18.5.tgz#c740e2ea3578d059e551633e950690831b941f6b" - integrity sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA== - dependencies: - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/validation-error" "3.13.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - semver "^6.2.0" - -"@lerna/package@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.16.0.tgz#7e0a46e4697ed8b8a9c14d59c7f890e0d38ba13c" - integrity sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw== - dependencies: - load-json-file "^5.3.0" - npm-package-arg "^6.1.0" - write-pkg "^3.1.0" - -"@lerna/prerelease-id-from-version@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz#b24bfa789f5e1baab914d7b08baae9b7bd7d83a1" - integrity sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA== - dependencies: - semver "^6.2.0" - -"@lerna/profiler@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-3.20.0.tgz#0f6dc236f4ea8f9ea5f358c6703305a4f32ad051" - integrity sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg== - dependencies: - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npmlog "^4.1.2" - upath "^1.2.0" - -"@lerna/project@3.18.0": - version "3.18.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.18.0.tgz#56feee01daeb42c03cbdf0ed8a2a10cbce32f670" - integrity sha512-+LDwvdAp0BurOAWmeHE3uuticsq9hNxBI0+FMHiIai8jrygpJGahaQrBYWpwbshbQyVLeQgx3+YJdW2TbEdFWA== - dependencies: - "@lerna/package" "3.16.0" - "@lerna/validation-error" "3.13.0" - cosmiconfig "^5.1.0" - dedent "^0.7.0" - dot-prop "^4.2.0" - glob-parent "^5.0.0" - globby "^9.2.0" - load-json-file "^5.3.0" - npmlog "^4.1.2" - p-map "^2.1.0" - resolve-from "^4.0.0" - write-json-file "^3.2.0" - -"@lerna/prompt@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.18.5.tgz#628cd545f225887d060491ab95df899cfc5218a1" - integrity sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ== - dependencies: - inquirer "^6.2.0" - npmlog "^4.1.2" - -"@lerna/publish@3.20.2": - version "3.20.2" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.20.2.tgz#a45d29813099b3249657ea913d0dc3f8ebc5cc2e" - integrity sha512-N7Y6PdhJ+tYQPdI1tZum8W25cDlTp4D6brvRacKZusweWexxaopbV8RprBaKexkEX/KIbncuADq7qjDBdQHzaA== - dependencies: - "@evocateur/libnpmaccess" "^3.1.2" - "@evocateur/npm-registry-fetch" "^4.0.0" - "@evocateur/pacote" "^9.6.3" - "@lerna/check-working-tree" "3.16.5" - "@lerna/child-process" "3.16.5" - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/describe-ref" "3.16.5" - "@lerna/log-packed" "3.16.0" - "@lerna/npm-conf" "3.16.0" - "@lerna/npm-dist-tag" "3.18.5" - "@lerna/npm-publish" "3.18.5" - "@lerna/otplease" "3.18.5" - "@lerna/output" "3.13.0" - "@lerna/pack-directory" "3.16.4" - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - "@lerna/version" "3.20.2" - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - p-finally "^1.0.0" - p-map "^2.1.0" - p-pipe "^1.2.0" - semver "^6.2.0" - -"@lerna/pulse-till-done@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz#c8e9ce5bafaf10d930a67d7ed0ccb5d958fe0110" - integrity sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA== - dependencies: - npmlog "^4.1.2" - -"@lerna/query-graph@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-3.18.5.tgz#df4830bb5155273003bf35e8dda1c32d0927bd86" - integrity sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA== - dependencies: - "@lerna/package-graph" "3.18.5" - figgy-pudding "^3.5.1" - -"@lerna/resolve-symlink@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz#37fc7095fabdbcf317c26eb74e0d0bde8efd2386" - integrity sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ== - dependencies: - fs-extra "^8.1.0" - npmlog "^4.1.2" - read-cmd-shim "^1.0.1" - -"@lerna/rimraf-dir@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz#04316ab5ffd2909657aaf388ea502cb8c2f20a09" - integrity sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA== - dependencies: - "@lerna/child-process" "3.16.5" - npmlog "^4.1.2" - path-exists "^3.0.0" - rimraf "^2.6.2" - -"@lerna/run-lifecycle@3.16.2": - version "3.16.2" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz#67b288f8ea964db9ea4fb1fbc7715d5bbb0bce00" - integrity sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A== - dependencies: - "@lerna/npm-conf" "3.16.0" - figgy-pudding "^3.5.1" - npm-lifecycle "^3.1.2" - npmlog "^4.1.2" - -"@lerna/run-topologically@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-3.18.5.tgz#3cd639da20e967d7672cb88db0f756b92f2fdfc3" - integrity sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg== - dependencies: - "@lerna/query-graph" "3.18.5" - figgy-pudding "^3.5.1" - p-queue "^4.0.0" - -"@lerna/run@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.20.0.tgz#a479f7c42bdf9ebabb3a1e5a2bdebb7a8d201151" - integrity sha512-9U3AqeaCeB7KsGS9oyKNp62s9vYoULg/B4cqXTKZkc+OKL6QOEjYHYVSBcMK9lUXrMjCjDIuDSX3PnTCPxQ2Dw== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/npm-run-script" "3.16.5" - "@lerna/output" "3.13.0" - "@lerna/profiler" "3.20.0" - "@lerna/run-topologically" "3.18.5" - "@lerna/timer" "3.13.0" - "@lerna/validation-error" "3.13.0" - p-map "^2.1.0" - -"@lerna/symlink-binary@3.17.0": - version "3.17.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz#8f8031b309863814883d3f009877f82e38aef45a" - integrity sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ== - dependencies: - "@lerna/create-symlink" "3.16.2" - "@lerna/package" "3.16.0" - fs-extra "^8.1.0" - p-map "^2.1.0" - -"@lerna/symlink-dependencies@3.17.0": - version "3.17.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz#48d6360e985865a0e56cd8b51b308a526308784a" - integrity sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q== - dependencies: - "@lerna/create-symlink" "3.16.2" - "@lerna/resolve-symlink" "3.16.0" - "@lerna/symlink-binary" "3.17.0" - fs-extra "^8.1.0" - p-finally "^1.0.0" - p-map "^2.1.0" - p-map-series "^1.0.0" - -"@lerna/timer@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-3.13.0.tgz#bcd0904551db16e08364d6c18e5e2160fc870781" - integrity sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw== - -"@lerna/validation-error@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.13.0.tgz#c86b8f07c5ab9539f775bd8a54976e926f3759c3" - integrity sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA== - dependencies: - npmlog "^4.1.2" - -"@lerna/version@3.20.2": - version "3.20.2" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.20.2.tgz#3709141c0f537741d9bc10cb24f56897bcb30428" - integrity sha512-ckBJMaBWc+xJen0cMyCE7W67QXLLrc0ELvigPIn8p609qkfNM0L0CF803MKxjVOldJAjw84b8ucNWZLvJagP/Q== - dependencies: - "@lerna/check-working-tree" "3.16.5" - "@lerna/child-process" "3.16.5" - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/conventional-commits" "3.18.5" - "@lerna/github-client" "3.16.5" - "@lerna/gitlab-client" "3.15.0" - "@lerna/output" "3.13.0" - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/prompt" "3.18.5" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - chalk "^2.3.1" - dedent "^0.7.0" - load-json-file "^5.3.0" - minimatch "^3.0.4" - npmlog "^4.1.2" - p-map "^2.1.0" - p-pipe "^1.2.0" - p-reduce "^1.0.0" - p-waterfall "^1.0.0" - semver "^6.2.0" - slash "^2.0.0" - temp-write "^3.4.0" - write-json-file "^3.2.0" - -"@lerna/write-log-file@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.13.0.tgz#b78d9e4cfc1349a8be64d91324c4c8199e822a26" - integrity sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A== - dependencies: - npmlog "^4.1.2" - write-file-atomic "^2.3.0" - -"@modular-css/processor@^28.1.4": - version "28.1.5" - resolved "https://registry.yarnpkg.com/@modular-css/processor/-/processor-28.1.5.tgz#28987ddb3654ce287e69224c400297267482c976" - integrity sha512-1gfGjJgiJ5bZtUlLFfyhZwIwrbRG8SPw3N/iJrQw49VMSwpBH9ZsqFHnsbHYkbxGowmpycSWTL++VVKMyrV86A== - dependencies: - dependency-graph "^0.11.0" - escape-string-regexp "^4.0.0" - postcss-selector-parser "^6.0.2" - postcss-url "^10.0.0" - postcss-value-parser "^4.0.0" - resolve-from "^5.0.0" - unique-slug "^2.0.0" - -"@mrmlnc/readdir-enhanced@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" - integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== - dependencies: - call-me-maybe "^1.0.1" - glob-to-regexp "^0.3.0" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.stat@^1.1.2": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" - integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== - dependencies: - "@octokit/types" "^5.0.0" - -"@octokit/endpoint@^6.0.1": - version "6.0.5" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.5.tgz#43a6adee813c5ffd2f719e20cfd14a1fee7c193a" - integrity sha512-70K5u6zd45ItOny6aHQAsea8HHQjlQq85yqOMe+Aj8dkhN2qSJ9T+Q3YjUjEYfPRBcuUWNgMn62DQnP/4LAIiQ== - dependencies: - "@octokit/types" "^5.0.0" - is-plain-object "^4.0.0" - universal-user-agent "^6.0.0" - -"@octokit/plugin-enterprise-rest@^3.6.1": - version "3.6.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-3.6.2.tgz#74de25bef21e0182b4fa03a8678cd00a4e67e561" - integrity sha512-3wF5eueS5OHQYuAEudkpN+xVeUsg8vYEMMenEzLphUZ7PRZ8OJtDcsreL3ad9zxXmBbaFWzLmFcdob5CLyZftA== - -"@octokit/plugin-paginate-rest@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc" - integrity sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q== - dependencies: - "@octokit/types" "^2.0.1" - -"@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== - -"@octokit/plugin-rest-endpoint-methods@2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz#3288ecf5481f68c494dd0602fc15407a59faf61e" - integrity sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ== - dependencies: - "@octokit/types" "^2.0.1" - deprecation "^2.3.1" - -"@octokit/request-error@^1.0.2": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801" - integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA== - dependencies: - "@octokit/types" "^2.0.0" - deprecation "^2.0.0" - once "^1.4.0" - -"@octokit/request-error@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" - integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== - dependencies: - "@octokit/types" "^5.0.1" - deprecation "^2.0.0" - once "^1.4.0" - -"@octokit/request@^5.2.0": - version "5.4.7" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.7.tgz#fd703ee092e0463ceba49ff7a3e61cb4cf8a0fde" - integrity sha512-FN22xUDP0i0uF38YMbOfx6TotpcENP5W8yJM1e/LieGXn6IoRxDMnBf7tx5RKSW4xuUZ/1P04NFZy5iY3Rax1A== - dependencies: - "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.0.0" - "@octokit/types" "^5.0.0" - deprecation "^2.0.0" - is-plain-object "^4.0.0" - node-fetch "^2.3.0" - once "^1.4.0" - universal-user-agent "^6.0.0" - -"@octokit/rest@^16.28.4": - version "16.43.2" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.2.tgz#c53426f1e1d1044dee967023e3279c50993dd91b" - integrity sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ== - dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/plugin-paginate-rest" "^1.1.1" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "2.4.0" - "@octokit/request" "^5.2.0" - "@octokit/request-error" "^1.0.2" - atob-lite "^2.0.0" - before-after-hook "^2.0.0" - btoa-lite "^1.0.0" - deprecation "^2.0.0" - lodash.get "^4.4.2" - lodash.set "^4.3.2" - lodash.uniq "^4.5.0" - octokit-pagination-methods "^1.1.0" - once "^1.4.0" - universal-user-agent "^4.0.0" - -"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.16.2" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2" - integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== - dependencies: - "@types/node" ">= 8" - -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.4.0.tgz#25f2f8e24fec09214553168c41c06383c9d0f529" - integrity sha512-D/uotqF69M50OIlwMqgyIg9PuLT2daOiBAYF0P40I2ekFA2ESwwBY5dxZe/UhXdPvIbNKDzuZmQrO7rMpuFbcg== - dependencies: - "@types/node" ">= 8" - -"@polka/url@^1.0.0-next.20": - version "1.0.0-next.21" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" - integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== - -"@types/body-parser@*": - version "1.19.2" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/bonjour@^3.5.9": - version "3.5.10" - resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.10.tgz#0f6aadfe00ea414edc86f5d106357cda9701e275" - integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== - dependencies: - "@types/node" "*" - -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - -"@types/connect-history-api-fallback@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" - integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== - dependencies: - "@types/express-serve-static-core" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.37.0" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.37.0.tgz#29cebc6c2a3ac7fea7113207bf5a828fdf4d7ef1" - integrity sha512-Piet7dG2JBuDIfohBngQ3rCt7MgO9xCO4xIMKxBThCq5PNRB91IjlJ10eJVwfoNtvTErmxLzwBZ7rHZtbOMmFQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": - version "4.17.33" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz#de35d30a9d637dc1450ad18dd583d75d5733d543" - integrity sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/express@*", "@types/express@^4.17.13": - version "4.17.17" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.17.tgz#01d5437f6ef9cfa8668e616e13c2f2ac9a491ae4" - integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.33" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/glob@^7.1.1": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/html-minifier-terser@^6.0.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35" - integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== - -"@types/http-proxy@^1.17.8": - version "1.17.10" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.10.tgz#e576c8e4a0cc5c6a138819025a88e167ebb38d6c" - integrity sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g== - dependencies: - "@types/node" "*" - -"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/json-schema@^7.0.4": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" - integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - -"@types/mime@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" - integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== - -"@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/minimist@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" - integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= - -"@types/node@*", "@types/node@>= 8": - version "14.6.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499" - integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA== - -"@types/normalize-package-data@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" - integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== - -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== - -"@types/retry@0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" - integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== - -"@types/serve-index@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" - integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== - dependencies: - "@types/express" "*" - -"@types/serve-static@*", "@types/serve-static@^1.13.10": - version "1.15.1" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.1.tgz#86b1753f0be4f9a1bee68d459fcda5be4ea52b5d" - integrity sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ== - dependencies: - "@types/mime" "*" - "@types/node" "*" - -"@types/sockjs@^0.3.33": - version "0.3.33" - resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.33.tgz#570d3a0b99ac995360e3136fd6045113b1bd236f" - integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== - dependencies: - "@types/node" "*" - -"@types/ws@^8.5.1": - version "8.5.4" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5" - integrity sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg== - dependencies: - "@types/node" "*" - -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== - -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== - -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== - -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== - -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== - -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" - -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -"@zkochan/cmd-shim@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" - integrity sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg== - dependencies: - is-windows "^1.0.0" - mkdirp-promise "^5.0.1" - mz "^2.5.0" - -JSONStream@^1.0.4, JSONStream@^1.3.4, JSONStream@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -abbrev@1, abbrev@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -accepts@~1.3.4, accepts@~1.3.5: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== - -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - integrity sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= - dependencies: - acorn "^3.0.4" - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-node@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" - integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A== - dependencies: - acorn "^7.0.0" - acorn-walk "^7.0.0" - xtend "^4.0.2" - -acorn-walk@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn-walk@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - integrity sha1-ReN/s56No/JbruP/U2niu18iAXo= - -acorn@^5.5.0: - version "5.7.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" - integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== - -acorn@^7.0.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" - integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== - -acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -address@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" - integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== - -address@^1.1.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== - -agent-base@4, agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - -agentkeepalive@^3.4.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" - integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== - dependencies: - humanize-ms "^1.2.1" - -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" - integrity sha1-MU3QpLM2j609/NxU7eYXG4htrzw= - -ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv-keywords@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" - integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== - dependencies: - fast-deep-equal "^3.1.3" - -ajv@^4.7.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY= - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.12.2, ajv@^6.12.3: - version "6.12.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" - integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.8.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= - dependencies: - string-width "^2.0.0" - -ansi-colors@4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - integrity sha1-06ioOzGapneTZisT52HHkRQiMG4= - -ansi-escapes@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - -ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-html-community@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" - integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== - dependencies: - "@types/color-name" "^1.1.1" - color-convert "^2.0.1" - -ansicolors@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" - integrity sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk= - -ansistyles@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ansistyles/-/ansistyles-0.1.3.tgz#5de60415bda071bb37127854c864f41b23254539" - integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk= - -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -aproba@^1.0.3, aproba@^1.1.1, aproba@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -"aproba@^1.1.2 || 2", aproba@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -archiver-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" - integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== - dependencies: - glob "^7.1.4" - graceful-fs "^4.2.0" - lazystream "^1.0.0" - lodash.defaults "^4.2.0" - lodash.difference "^4.5.0" - lodash.flatten "^4.4.0" - lodash.isplainobject "^4.0.6" - lodash.union "^4.6.0" - normalize-path "^3.0.0" - readable-stream "^2.0.0" - -archiver@5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6" - integrity sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w== - dependencies: - archiver-utils "^2.1.0" - async "^3.2.3" - buffer-crc32 "^0.2.1" - readable-stream "^3.6.0" - readdir-glob "^1.0.0" - tar-stream "^2.2.0" - zip-stream "^4.1.0" - -archy@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= - -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" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -arg@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" - integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -args@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/args/-/args-5.0.1.tgz#4bf298df90a4799a09521362c579278cc2fdd761" - integrity sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ== - dependencies: - camelcase "5.0.0" - chalk "2.4.2" - leven "2.1.0" - mri "1.1.4" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-differ@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" - integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== - -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" - integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-flatten@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - -array-ify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" - integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= - -array-includes@^3.1.5, array-includes@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - is-string "^1.0.7" - -array-union@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - dependencies: - array-uniq "^1.0.1" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.tosorted@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz#ccf44738aa2b5ac56578ffda97c03fd3e23dd532" - integrity sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - get-intrinsic "^1.1.3" - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -asap@^2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - 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" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -astroturf@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/astroturf/-/astroturf-1.1.0.tgz#483e5022e7db782543082c2f7497a66655f1ba24" - integrity sha512-mryIuQGu49RmKWjApunKRX76TO3Z74DqdC+eqFyI/rbeXfY8vwefo1SEoQwaHHbUrwMqun9xqbhmcIVqx9aDRA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/core" "^7.19.6" - "@babel/generator" "^7.20.0" - "@babel/helper-module-imports" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.0" - "@babel/types" "^7.20.0" - "@modular-css/processor" "^28.1.4" - common-tags "^1.8.2" - cosmiconfig "^7.0.1" - css-loader "^5.1.3" - fast-levenshtein "^3.0.0" - find-cache-dir "^3.3.2" - globby "^11.0.0" - json5 "^2.2.1" - lodash "^4.17.21" - magic-string "^0.26.7" - picocolors "^1.0.0" - postcss "^8.4.18" - postcss-nested "^5.0.6" - postcss-scss "^4.0.5" - resolve "^1.22.1" - unique-slug "^4.0.0" - webpack-virtual-modules "^0.3.2" - yargs "^17.6.0" - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@*: - version "3.2.0" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" - integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== - -async@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -atob-lite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" - integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -autoprefixer@10.4.13: - version "10.4.13" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.13.tgz#b5136b59930209a321e9fa3dca2e7c4d223e83a8" - integrity sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg== - dependencies: - browserslist "^4.21.4" - caniuse-lite "^1.0.30001426" - fraction.js "^4.2.0" - normalize-range "^0.1.2" - picocolors "^1.0.0" - postcss-value-parser "^4.2.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" - integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== - -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" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@6.26.3, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - 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-eslint@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" - integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - eslint-visitor-keys "^1.0.0" - resolve "^1.12.0" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - 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" - integrity sha1-FMGeXxQte0fxmlJDHlKxzLxAozA= - 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" - integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-builder-react-jsx@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" - integrity sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA= - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - esutils "^2.0.2" - -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" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= - 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" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= - 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" - integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= - 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" - integrity sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes= - 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" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= - 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" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= - 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" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= - 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" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= - 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" - integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= - 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" - integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= - 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" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= - 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" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-loader@9.1.2: - version "9.1.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.2.tgz#a16a080de52d08854ee14570469905a5fc00d39c" - integrity sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA== - dependencies: - find-cache-dir "^3.3.2" - schema-utils "^4.0.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - 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" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== - dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" - -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" - -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - integrity sha1-a8lj67FuzLrmuStZbrfzXDQqi5o= - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - integrity sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY= - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - integrity sha1-1+sjt5oxf4VDlixQW4J8fWysJ94= - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - integrity sha1-MSVjtNvePMgGzuPkFszurd0RrAs= - -babel-plugin-syntax-do-expressions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" - integrity sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0= - -babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - integrity sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo= - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - integrity sha1-cKFITw+QiaToStRLrDU8lbmxJyE= - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - integrity sha1-TDqyCiryaqIM0lmVw5jE63AxDI0= - -babel-plugin-syntax-function-bind@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" - integrity sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y= - -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= - -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" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= - -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" - integrity sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds= - 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.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" - integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= - 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-constructor-call@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" - integrity sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk= - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -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" - integrity sha1-anl2PqYdM9NvN7YRqp3vgagbRqw= - 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" - integrity sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0= - 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-do-expressions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" - integrity sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs= - dependencies: - babel-plugin-syntax-do-expressions "^6.8.0" - babel-runtime "^6.22.0" - -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" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= - 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" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= - dependencies: - babel-runtime "^6.22.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" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= - 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.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" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= - 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.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" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.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" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= - dependencies: - babel-runtime "^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" - integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.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" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= - dependencies: - babel-runtime "^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" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= - 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" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= - dependencies: - babel-runtime "^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" - integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= - 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.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" - integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== - 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.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" - integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= - 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.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" - integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= - 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.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" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.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" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= - 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.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" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= - 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" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= - dependencies: - babel-runtime "^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" - integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= - 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" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.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" - integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= - dependencies: - babel-runtime "^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" - integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.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" - integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= - 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-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" - integrity sha1-U3OLR+deghhYnuqUbLvTkQm75lM= - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - integrity sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988= - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-function-bind@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" - integrity sha1-xvuOlqwpajELjPjqQBRiQH3fapc= - dependencies: - babel-plugin-syntax-function-bind "^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" - integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - -babel-plugin-transform-react-display-name@^6.23.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - integrity sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-self@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" - integrity sha1-322AqdomEqEh5t3XVYvL7PBuY24= - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx-source@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" - integrity sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY= - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - integrity sha1-hAoCjn30YN/DotKfDA2R9jduZqM= - dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^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" - integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= - 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" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-polyfill@6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" - integrity sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ== - dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - -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" - integrity sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk= - 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-es2016@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b" - integrity sha1-+QC/k+LrwNJ235uKtZck6/2Vn4s= - dependencies: - babel-plugin-transform-exponentiation-operator "^6.24.1" - -babel-preset-es2017@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1" - integrity sha1-WXvq37n38gi8/YoS6bKym4svFNE= - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.24.1" - -babel-preset-flow@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" - integrity sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0= - dependencies: - babel-plugin-transform-flow-strip-types "^6.22.0" - -babel-preset-latest@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8" - integrity sha1-Z33gaRVKdIXC0lxXfAL2JLhbheg= - dependencies: - babel-preset-es2015 "^6.24.1" - babel-preset-es2016 "^6.24.1" - babel-preset-es2017 "^6.24.1" - -babel-preset-react@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" - integrity sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A= - dependencies: - babel-plugin-syntax-jsx "^6.3.13" - babel-plugin-transform-react-display-name "^6.23.0" - babel-plugin-transform-react-jsx "^6.24.1" - babel-plugin-transform-react-jsx-self "^6.22.0" - babel-plugin-transform-react-jsx-source "^6.22.0" - babel-preset-flow "^6.23.0" - -babel-preset-stage-0@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" - integrity sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo= - dependencies: - babel-plugin-transform-do-expressions "^6.22.0" - babel-plugin-transform-function-bind "^6.22.0" - babel-preset-stage-1 "^6.24.1" - -babel-preset-stage-1@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" - integrity sha1-dpLNfc1oSZB+auSgqFWJz7niv7A= - dependencies: - babel-plugin-transform-class-constructor-call "^6.24.1" - babel-plugin-transform-export-extensions "^6.22.0" - babel-preset-stage-2 "^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" - integrity sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE= - 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" - integrity sha1-g2raCp56f6N8sTj7kyb4eTSkg5U= - 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" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - 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" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - 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" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - 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" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - 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" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - 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" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -balanced-match@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" - integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - 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" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -before-after-hook@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" - integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== - -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -bin-links@^1.1.2, bin-links@^1.1.6: - version "1.1.8" - resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.8.tgz#bd39aadab5dc4bdac222a07df5baf1af745b2228" - integrity sha512-KgmVfx+QqggqP9dA3iIc5pA4T1qEEEL+hOhOhNPaUm77OTrJoOXE/C05SJLNJe6m/2wUK7F1tDSou7n5TfCDzQ== - dependencies: - bluebird "^3.5.3" - cmd-shim "^3.0.0" - gentle-fs "^2.3.0" - graceful-fs "^4.1.15" - npm-normalize-package-bin "^1.0.0" - write-file-atomic "^2.3.0" - -binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bl@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" - integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== - dependencies: - buffer "^6.0.3" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - -bn.js@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" - integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -bonjour-service@^1.0.11: - version "1.1.1" - resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.1.1.tgz#960948fa0e0153f5d26743ab15baf8e33752c135" - integrity sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg== - dependencies: - array-flatten "^2.1.2" - dns-equal "^1.0.0" - fast-deep-equal "^3.1.3" - multicast-dns "^7.2.5" - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - -bootstrap-sass@3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/bootstrap-sass/-/bootstrap-sass-3.4.1.tgz#6843c73b1c258a0ac5cb2cc6f6f5285b664a8e9a" - integrity sha512-p5rxsK/IyEDQm2CwiHxxUi0MZZtvVFbhWmyMOt4lLkA4bujDA1TGoKT0i1FKIWiugAdP+kK8T5KMDFIKQCLYIA== - -bootswatch@3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/bootswatch/-/bootswatch-3.3.7.tgz#eb6f9a9a8523b87a706ea91deec3e0d7eaa8ab1f" - integrity sha1-62+amoUjuHpwbqkd7sPg1+qoqx8= - -boxen@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^2.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" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - 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" - -braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.3, browserslist@^4.21.4, browserslist@^4.21.5: - version "4.21.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" - integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== - dependencies: - caniuse-lite "^1.0.30001449" - electron-to-chromium "^1.4.284" - node-releases "^2.0.8" - update-browserslist-db "^1.0.10" - -btoa-lite@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" - integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= - -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" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@^0.2.1, buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@6.0.3, buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= - -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= - -byte-size@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191" - integrity sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw== - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: - version "12.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" - integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - 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" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -call-limit@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.1.tgz#ef15f2670db3f1992557e2d965abc459e6e358d4" - integrity sha512-5twvci5b9eRBw2wCfPtN0GmlR2/gadZqyFpPhOK6CvMFoFgA+USnZ6Jpu1lhG9h85pQ3Ouil3PfXWRD4EUaRiQ== - -call-me-maybe@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" - integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= - -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - dependencies: - callsites "^2.0.0" - -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - integrity sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= - dependencies: - callsites "^0.2.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - dependencies: - caller-callsite "^2.0.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camel-case@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - -camelcase-css@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" - integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase-keys@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" - integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= - dependencies: - camelcase "^4.1.0" - map-obj "^2.0.0" - quick-lru "^1.0.0" - -camelcase-keys@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" - integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - dependencies: - camelcase "^5.3.1" - map-obj "^4.0.0" - quick-lru "^4.0.1" - -camelcase@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" - integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= - -camelcase@^4.0.0, camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -can-use-dom@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/can-use-dom/-/can-use-dom-0.1.0.tgz#22cc4a34a0abc43950f42c6411024a3f6366b45a" - integrity sha1-IsxKNKCrxDlQ9CxkEQJKP2NmtFo= - -caniuse-api@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - integrity sha1-tTTnxzTE+B7F++isoq0kNUuWLGw= - 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.30001116" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001116.tgz#77635640080024292f9f239042e7d1acd5cb88a7" - integrity sha512-v7zj0MenYwLid3ENDLNlTMBOoIQdWYcShqnXbZZuuaq11xnn2y9DfL5VtZhiIb9PInT3sWpP11GVjmC8hPFBcA== - -caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001111: - version "1.0.30001116" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001116.tgz#f3a3dea347f9294a3bdc4292309039cc84117fb8" - integrity sha512-f2lcYnmAI5Mst9+g0nkMIznFGsArRmZ0qU+dnq8l91hymdc2J3SFbiPhOJEeDqC1vtE8nc1qNQyklzB8veJefQ== - -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" - integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -chalk@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - integrity sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@4.1.x, chalk@^4.1.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - 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@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" - integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== - -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - -cheerio@0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" - integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" - -chokidar@^3.4.2, chokidar@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - -ci-info@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" - integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -cidr-regex@^2.0.10: - version "2.0.10" - resolved "https://registry.yarnpkg.com/cidr-regex/-/cidr-regex-2.0.10.tgz#af13878bd4ad704de77d6dc800799358b3afa70d" - integrity sha512-sB3ogMQXWvreNPbJUZMRApxuRYd+KoIo4RGQ81VatjmMW6WJPo+IJZ2846FGItr9VzKo5w7DXzijPLGtSd0N3Q== - dependencies: - ip-regex "^2.1.0" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -clean-css@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.2.0.tgz#44e4a04e8873ff0041df97acecf23a4a6519844e" - integrity sha512-2639sWGa43EMmG7fn8mdVuBSs6HuWaSor+ZPoFWzenBc6oN+td8YhTfghWXZ25G1NiiSvz8bOFBS7PdSbTiqEA== - dependencies: - source-map "~0.6.0" - -clean-css@^5.2.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.2.tgz#70ecc7d4d4114921f5d298349ff86a31a9975224" - integrity sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww== - dependencies: - source-map "~0.6.0" - -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= - -cli-columns@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cli-columns/-/cli-columns-3.1.2.tgz#6732d972979efc2ae444a1f08e08fa139c96a18e" - integrity sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4= - dependencies: - string-width "^2.0.0" - strip-ansi "^3.0.1" - -cli-cursor@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - integrity sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc= - dependencies: - restore-cursor "^1.0.1" - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" - integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== - dependencies: - restore-cursor "^4.0.0" - -cli-spinners@^2.6.1: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - -cli-table3@^0.5.0, cli-table3@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" - integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== - dependencies: - object-assign "^4.1.0" - string-width "^2.1.1" - optionalDependencies: - colors "^1.1.2" - -cli-width@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" - integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - -cmd-shim@^3.0.0, cmd-shim@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-3.0.3.tgz#2c35238d3df37d98ecdd7d5f6b8dc6b21cadc7cb" - integrity sha512-DtGg+0xiFhQIntSBRzL2fRQBnmtAVwXIDo4Qq46HPpObYquxMaZS4sb82U9nH91qJrlosC1wa9gwr0QyL/HypA== - dependencies: - graceful-fs "^4.1.2" - mkdirp "~0.5.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -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" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@^1.1.4, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colord@^2.9.3: - version "2.9.3" - resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" - integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== - -colorette@^2.0.10: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== - -colors@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - -columnify@^1.5.4, columnify@~1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" - integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= - dependencies: - strip-ansi "^3.0.0" - wcwidth "^1.0.0" - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@2.15.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== - -commander@^2.20.0, commander@^2.8.1: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - -common-tags@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" - integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -compare-func@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" - integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA== - dependencies: - array-ify "^1.0.0" - dot-prop "^5.1.0" - -compass-mixins@0.12.10: - version "0.12.10" - resolved "https://registry.yarnpkg.com/compass-mixins/-/compass-mixins-0.12.10.tgz#cd9f15f829c4e960cc43bb226f049b28beb99d41" - integrity sha1-zZ8V+CnE6WDMQ7sibwSbKL65nUE= - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -compress-commons@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" - integrity sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ== - dependencies: - buffer-crc32 "^0.2.13" - crc32-stream "^4.0.2" - normalize-path "^3.0.0" - readable-stream "^3.6.0" - -compressible@~2.0.16: - version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" - integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.0.2" - typedarray "^0.0.6" - -config-chain@^1.1.11, config-chain@^1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - -configstore@^3.0.0: - version "3.1.5" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.5.tgz#e9af331fadc14dabd544d3e7e76dc446a09a530f" - integrity sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA== - dependencies: - dot-prop "^4.2.1" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - unique-string "^1.0.0" - write-file-atomic "^2.0.0" - xdg-basedir "^3.0.0" - -connect-history-api-fallback@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" - integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== - -console-browserify@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -console-control-strings@^1.0.0, console-control-strings@^1.1.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" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -console-polyfill@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/console-polyfill/-/console-polyfill-0.3.0.tgz#84900902a18c47a5eba932be75fa44d23e8af861" - integrity sha512-w+JSDZS7XML43Xnwo2x5O5vxB0ID7T5BdqDtyqT6uiCAX2kZAgcWxNaGqT97tZfSHzfOcvrfsDAodKcJ3UvnXQ== - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -conventional-changelog-angular@^5.0.3: - version "5.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" - integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-core@^3.1.6: - version "3.2.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb" - integrity sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ== - dependencies: - conventional-changelog-writer "^4.0.6" - conventional-commits-parser "^3.0.3" - dateformat "^3.0.0" - get-pkg-repo "^1.0.0" - git-raw-commits "2.0.0" - git-remote-origin-url "^2.0.0" - git-semver-tags "^2.0.3" - lodash "^4.2.1" - normalize-package-data "^2.3.5" - q "^1.5.1" - read-pkg "^3.0.0" - read-pkg-up "^3.0.0" - through2 "^3.0.0" - -conventional-changelog-preset-loader@^2.1.1: - version "2.3.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" - integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== - -conventional-changelog-writer@^4.0.6: - version "4.0.17" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.17.tgz#4753aaa138bf5aa59c0b274cb5937efcd2722e21" - integrity sha512-IKQuK3bib/n032KWaSb8YlBFds+aLmzENtnKtxJy3+HqDq5kohu3g/UdNbIHeJWygfnEbZjnCKFxAW0y7ArZAw== - dependencies: - compare-func "^2.0.0" - conventional-commits-filter "^2.0.6" - dateformat "^3.0.0" - handlebars "^4.7.6" - json-stringify-safe "^5.0.1" - lodash "^4.17.15" - meow "^7.0.0" - semver "^6.0.0" - split "^1.0.0" - through2 "^3.0.0" - -conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" - integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== - dependencies: - lodash.ismatch "^4.4.0" - modify-values "^1.0.0" - -conventional-commits-parser@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" - integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.1" - lodash "^4.17.15" - meow "^7.0.0" - split2 "^2.0.0" - through2 "^3.0.0" - trim-off-newlines "^1.0.0" - -conventional-recommended-bump@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz#5af63903947b6e089e77767601cb592cabb106ba" - integrity sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ== - dependencies: - concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.1.1" - conventional-commits-filter "^2.0.2" - conventional-commits-parser "^3.0.3" - git-raw-commits "2.0.0" - git-semver-tags "^2.0.3" - meow "^4.0.0" - q "^1.5.1" - -convert-source-map@^1.5.1, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js-compat@^3.25.1: - version "3.29.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.29.1.tgz#15c0fb812ea27c973c18d425099afa50b934b41b" - integrity sha512-QmchCua884D8wWskMX8tW5ydINzd8oSJVx38lx/pVkFGqztxt73GYre3pm/hyYq8bPf+MW5In4I/uRShFDsbrA== - dependencies: - browserslist "^4.21.5" - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== - -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" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cosmiconfig@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" - -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" - -cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: - version "7.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" - integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cosmiconfig@^8.0.0: - version "8.1.3" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.3.tgz#0e614a118fcc2d9e5afc2f87d53cd09931015689" - integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== - dependencies: - import-fresh "^3.2.1" - js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - -cpr@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/cpr/-/cpr-3.0.1.tgz#b9a55038b7cd81a35c17b9761895bd8496aef1e5" - integrity sha1-uaVQOLfNgaNcF7l2GJW9hJau8eU= - dependencies: - graceful-fs "^4.1.5" - minimist "^1.2.0" - mkdirp "~0.5.1" - rimraf "^2.5.4" - -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -crc32-stream@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007" - integrity sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w== - dependencies: - crc-32 "^1.2.0" - readable-stream "^3.4.0" - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-error-class@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" - integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= - dependencies: - capture-stack-trace "^1.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-spawn@7.0.3, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= - -css-functions-list@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.1.0.tgz#cf5b09f835ad91a00e5959bcfc627cd498e1321b" - integrity sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w== - -css-loader@6.7.3: - version "6.7.3" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.3.tgz#1e8799f3ccc5874fdd55461af51137fcc5befbcd" - integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ== - dependencies: - icss-utils "^5.1.0" - postcss "^8.4.19" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.2.0" - semver "^7.3.8" - -css-loader@^5.0.0, css-loader@^5.1.3: - version "5.2.7" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.7.tgz#9b9f111edf6fb2be5dc62525644cbc9c232064ae" - integrity sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg== - dependencies: - icss-utils "^5.1.0" - loader-utils "^2.0.0" - postcss "^8.2.15" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.1.0" - schema-utils "^3.0.0" - semver "^7.3.5" - -css-select@^4.1.3: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-tree@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20" - integrity sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw== - dependencies: - mdn-data "2.0.30" - source-map-js "^1.0.1" - -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cuint@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" - integrity sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw== - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= - dependencies: - array-find-index "^1.0.1" - -cyclist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" - integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dargs@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" - integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= - dependencies: - number-is-nan "^1.0.0" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -dateformat@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" - integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== - -debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@^3.0.0, debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debuglog@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" - integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= - -decamelize-keys@^1.0.0, decamelize-keys@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" - integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= - dependencies: - decamelize "^1.1.0" - map-obj "^1.0.0" - -decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -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" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -default-gateway@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" - integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== - dependencies: - execa "^5.0.0" - -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - -define-options@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/define-options/-/define-options-0.1.3.tgz#471c907439da590205050e856c8d59373f3a107b" - integrity sha1-RxyQdDnaWQIFBQ6FbI1ZNz86EHs= - -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-properties@^1.1.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - 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" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - 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" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - 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" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -dependency-graph@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" - integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg== - -deprecation@^2.0.0, deprecation@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" - integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-indent@^5.0.0, detect-indent@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= - -detect-newline@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= - -detect-node@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" - integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== - -detect-port-alt@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" - integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== - dependencies: - address "^1.0.1" - debug "^2.6.0" - -detective@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.1.tgz#6af01eeda11015acb0e73f933242b70f24f91034" - integrity sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw== - dependencies: - acorn-node "^1.8.2" - defined "^1.0.0" - minimist "^1.2.6" - -dezalgo@^1.0.0, dezalgo@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" - integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= - dependencies: - asap "^2.0.0" - wrappy "1" - -didyoumean@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" - integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== - -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dir-glob@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" - integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== - dependencies: - path-type "^3.0.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dlv@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" - integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - -dns-packet@^5.2.2: - version "5.5.0" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.5.0.tgz#f59cbf3396c130957c56a6ad5fd3959ccdc30065" - integrity sha512-USawdAUzRkV6xrqTjiAEp6M9YagZEzWcSUaZTcIFAiyQWW1SoI6KyId8y2+/71wbgHKQAKd+iupLv4YvEwYWvA== - dependencies: - "@leichtgewicht/ip-codec" "^2.0.1" - -doctrine@^1.2.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" - integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dom-converter@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" - integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== - dependencies: - utila "~0.4" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -domain-browser@^4.22.0: - version "4.22.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.22.0.tgz#6ddd34220ec281f9a65d3386d267ddd35c491f9f" - integrity sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw== - -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" - integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== - -domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^2.5.2, domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - -dot-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" - integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -dot-prop@^4.2.0, dot-prop@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" - integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== - dependencies: - is-obj "^1.0.0" - -dot-prop@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" - integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== - dependencies: - is-obj "^2.0.0" - -dotenv@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" - integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow== - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -duplexer@^0.1.1, duplexer@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^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" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -editor@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" - integrity sha1-YMf4e9YrzGqJT6jM1q+3gjok90I= - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.4.284: - version "1.4.346" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.346.tgz#1a084516b5d62fb24ca65ba8e2ebe4a348ebb307" - integrity sha512-9ZpKQD8hyWAoYf5bccm2qpaWogAGxb833DVC0arHo9nIbiAMh+aAKHZWABR2P9sK4a3zoCq7eXg8tylqPAnuNw== - -elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -encoding@^0.1.11: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" - integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== - -entities@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" - integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== - -env-paths@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" - integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== - -envinfo@^7.3.1: - version "7.7.2" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.2.tgz#098f97a0e902f8141f9150553c92dbb282c4cabe" - integrity sha512-k3Eh5bKuQnZjm49/L7H4cHzs2FlL5QjbTB3JrPxoTI8aJG7hVMe4uKyJxSYH4ahseby2waUwk5OaKX/nAsaYgg== - -err-code@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" - integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= - -errno@^0.1.3, errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== - dependencies: - array-buffer-byte-length "^1.0.0" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.3" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" - -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== - -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@~0.10.14: - version "0.10.53" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" - integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.3" - next-tick "~1.0.0" - -es6-iterator@^2.0.3, 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" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - integrity sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA= - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw== - -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - integrity sha1-0rPsXU2ADO2BjbU40ol02wpzzLE= - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-symbol@^3.1.1, es6-symbol@~3.1.1, es6-symbol@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -es6-weak-map@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" - integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== - dependencies: - d "1" - es5-ext "^0.10.46" - es6-iterator "^2.0.3" - es6-symbol "^3.1.1" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@1.0.5, 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" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - integrity sha1-4Bl16BJ4GhY6ba392AOY3GTIicM= - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== - dependencies: - debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" - -eslint-module-utils@^2.7.4: - version "2.7.4" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== - dependencies: - debug "^3.2.7" - -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== - dependencies: - eslint-utils "^2.0.0" - regexpp "^3.0.0" - -eslint-plugin-import@2.27.5: - version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== - dependencies: - array-includes "^3.1.6" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" - has "^1.0.3" - is-core-module "^2.11.0" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" - -eslint-plugin-node@11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== - dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" - ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" - -eslint-plugin-react@7.32.2: - version "7.32.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10" - integrity sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg== - dependencies: - array-includes "^3.1.6" - array.prototype.flatmap "^1.3.1" - array.prototype.tosorted "^1.1.1" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.6" - object.fromentries "^2.0.6" - object.hasown "^1.1.2" - object.values "^1.1.6" - prop-types "^15.8.1" - resolve "^2.0.0-next.4" - semver "^6.3.0" - string.prototype.matchall "^4.0.8" - -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" - integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== - -eslint@8.34.0: - version "8.34.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.34.0.tgz#fe0ab0ef478104c1f9ebc5537e303d25a8fb22d6" - integrity sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg== - dependencies: - "@eslint/eslintrc" "^1.4.1" - "@humanwhocodes/config-array" "^0.11.8" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-sdsl "^4.1.4" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - -eslint@^2.7.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-2.13.1.tgz#e4cc8fa0f009fb829aaae23855a29360be1f6c11" - integrity sha1-5MyPoPAJ+4KaquI4VaKTYL4fbBE= - dependencies: - chalk "^1.1.3" - concat-stream "^1.4.6" - debug "^2.1.1" - doctrine "^1.2.2" - es6-map "^0.1.3" - escope "^3.6.0" - espree "^3.1.6" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^1.1.1" - glob "^7.0.3" - globals "^9.2.0" - ignore "^3.1.2" - imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" - is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" - levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" - optionator "^0.8.1" - path-is-absolute "^1.0.0" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.6.0" - strip-json-comments "~1.0.1" - table "^3.7.8" - text-table "~0.2.0" - user-home "^2.0.0" - -espree@^3.1.6: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" - integrity sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A== - dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" - -espree@^9.4.0: - version "9.5.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4" - integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" - integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== - dependencies: - estraverse "^4.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -estraverse@^5.2.0, estraverse@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= - dependencies: - d "1" - es5-ext "~0.10.14" - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -eventemitter3@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - -eventemitter3@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -events@^3.2.0, events@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - 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" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.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" - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - integrity sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g= - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - 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" - -exports-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-4.0.0.tgz#af34fe80a18f12fb0f42f435edd7df0fe9db49bb" - integrity sha512-4iqFFIAnlVAbkAUMHhWceyxK6N6dMDWpQFbSHLmiayGEPMXl2bgWD4D11GYi1VNuEQwJaHGdATcPYTnXpwzSmw== - dependencies: - source-map "^0.6.1" - -express@^4.17.3: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" - integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== - dependencies: - type "^2.0.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - 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" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - 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.6: - version "1.7.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" - integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== - dependencies: - concat-stream "^1.6.2" - debug "^2.6.9" - mkdirp "^0.5.4" - yauzl "^2.10.0" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^2.2.6: - version "2.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" - integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== - dependencies: - "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.1.2" - glob-parent "^3.1.0" - is-glob "^4.0.0" - merge2 "^1.2.3" - micromatch "^3.1.10" - -fast-glob@^3.2.12, fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fast-levenshtein@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-3.0.0.tgz#37b899ae47e1090e40e3fd2318e4d5f0142ca912" - integrity sha512-hKKNajm46uNmTlhHSyZkmToAc56uZJwYq7yrciZjqOxnlfQwERDQJmHPUp7m1m9wx8vgOe8IaCKZ5Kv2k1DdCQ== - dependencies: - fastest-levenshtein "^1.0.7" - -fastest-levenshtein@^1.0.16, fastest-levenshtein@^1.0.7: - version "1.0.16" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" - integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -faye-websocket@^0.11.3: - version "0.11.4" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" - integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== - dependencies: - websocket-driver ">=0.5.1" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" - integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== - -figures@3.2.x: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^1.1.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-1.3.1.tgz#44c61ea607ae4be9c1402f41f44270cbfe334ff8" - integrity sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g= - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -filesize@^8.0.6: - version "8.0.7" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-8.0.7.tgz#695e70d80f4e47012c132d57a059e80c6b580bd8" - integrity sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -filter-obj@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-2.0.2.tgz#fff662368e505d69826abb113f0f6a98f56e9d5f" - integrity sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg== - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-cache-dir@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-npm-prefix@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf" - integrity sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA== - -find-up@2.1.0, find-up@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^1.2.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" - integrity sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg== - dependencies: - circular-json "^0.3.1" - graceful-fs "^4.1.2" - rimraf "~2.6.2" - write "^0.2.1" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -flush-write-stream@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - -follow-redirects@^1.0.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" - integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -fork-ts-checker-webpack-plugin@^6.5.0: - version "6.5.3" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz#eda2eff6e22476a2688d10661688c47f611b37f3" - integrity sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ== - dependencies: - "@babel/code-frame" "^7.8.3" - "@types/json-schema" "^7.0.5" - chalk "^4.1.0" - chokidar "^3.4.2" - cosmiconfig "^6.0.0" - deepmerge "^4.2.2" - fs-extra "^9.0.0" - glob "^7.1.6" - memfs "^3.1.2" - minimatch "^3.0.4" - schema-utils "2.7.0" - semver "^7.3.2" - tapable "^1.0.0" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fraction.js@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" - integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -from2@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-1.3.0.tgz#88413baaa5f9a597cfde9221d86986cd3c061dfd" - integrity sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0= - dependencies: - inherits "~2.0.1" - readable-stream "~1.1.10" - -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -front-matter@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-2.1.2.tgz#f75983b9f2f413be658c93dfd7bd8ce4078f5cdb" - integrity sha1-91mDufL0E75ljJPf172M5AePXNs= - dependencies: - js-yaml "^3.4.6" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" - integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^3.0.0" - universalify "^0.1.0" - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^1.0.0" - -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs-monkey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" - integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== - -fs-vacuum@^1.2.10, fs-vacuum@~1.2.10: - version "1.2.10" - resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36" - integrity sha1-t2Kb7AekAxolSP35n17PHMizHjY= - dependencies: - graceful-fs "^4.1.2" - path-is-inside "^1.0.1" - rimraf "^2.5.2" - -fs-walk@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/fs-walk/-/fs-walk-0.0.1.tgz#f7fc91c3ae1eead07c998bc5d0dd41f2dbebd335" - integrity sha1-9/yRw64e6tB8mYvF0N1B8tvr0zU= - dependencies: - async "*" - -fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - 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" - -generate-function@^2.0.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" - integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== - dependencies: - is-property "^1.0.2" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - integrity sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA= - dependencies: - is-property "^1.0.0" - -genfun@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" - integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -gentle-fs@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.3.1.tgz#11201bf66c18f930ddca72cf69460bdfa05727b1" - integrity sha512-OlwBBwqCFPcjm33rF2BjW+Pr6/ll2741l+xooiwTCeaX2CA1ZuclavyMBe0/KlR21/XGsgY6hzEQZ15BdNa13Q== - dependencies: - aproba "^1.1.2" - chownr "^1.1.2" - cmd-shim "^3.0.3" - fs-vacuum "^1.2.10" - graceful-fs "^4.1.11" - iferr "^0.1.5" - infer-owner "^1.0.4" - mkdirp "^0.5.1" - path-is-inside "^1.0.2" - read-cmd-shim "^1.0.1" - slide "^1.1.6" - -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" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-caller-file@^2.0.1, get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-pkg-repo@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" - integrity sha1-xztInAbYDMVTbCyFP54FIyBWly0= - dependencies: - hosted-git-info "^2.1.4" - meow "^3.3.0" - normalize-package-data "^2.3.0" - parse-github-repo-url "^1.3.0" - through2 "^2.0.0" - -get-port@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" - integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw== - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^4.0.0, get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -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" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -git-raw-commits@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" - integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== - dependencies: - dargs "^4.0.1" - lodash.template "^4.0.2" - meow "^4.0.0" - split2 "^2.0.0" - through2 "^2.0.0" - -git-remote-origin-url@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" - integrity sha1-UoJlna4hBxRaERJhEq0yFuxfpl8= - dependencies: - gitconfiglocal "^1.0.0" - pify "^2.3.0" - -git-semver-tags@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.3.tgz#48988a718acf593800f99622a952a77c405bfa34" - integrity sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA== - dependencies: - meow "^4.0.0" - semver "^6.0.0" - -git-up@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.2.tgz#10c3d731051b366dc19d3df454bfca3f77913a7c" - integrity sha512-kbuvus1dWQB2sSW4cbfTeGpCMd8ge9jx9RKnhXhuJ7tnvT+NIrTVfYZxjtflZddQYcmdOTlkAcjmx7bor+15AQ== - dependencies: - is-ssh "^1.3.0" - parse-url "^5.0.0" - -git-url-parse@^11.1.2: - version "11.1.3" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.3.tgz#03625b6fc09905e9ad1da7bb2b84be1bf9123143" - integrity sha512-GPsfwticcu52WQ+eHp0IYkAyaOASgYdtsQDIt4rUp6GbiNt1P9ddrh3O0kQB0eD4UJZszVqNT3+9Zwcg40fywA== - dependencies: - git-up "^4.0.0" - -gitconfiglocal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" - integrity sha1-QdBF84UaXqiPA/JMocYXgRRGS5s= - dependencies: - ini "^1.3.2" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-to-regexp@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" - integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== - 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@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@~7.1.1: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - 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@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-dirs@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" - integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU= - dependencies: - ini "^1.3.4" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -global@^4.3.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - dependencies: - type-fest "^0.20.2" - -globals@^9.18.0, globals@^9.2.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globby@^11.0.0, globby@^11.0.4, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -globby@^9.2.0: - version "9.2.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" - integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== - dependencies: - "@types/glob" "^7.1.1" - array-union "^1.0.2" - dir-glob "^2.2.2" - fast-glob "^2.2.6" - glob "^7.1.3" - ignore "^4.0.3" - pify "^4.0.1" - slash "^2.0.0" - -globjoin@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" - integrity sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM= - -globule@^1.0.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.2.tgz#d8bdd9e9e4eef8f96e245999a5dee7eb5d8529c4" - integrity sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA== - dependencies: - glob "~7.1.1" - lodash "~4.17.10" - minimatch "~3.0.2" - -gonzales-pe-sl@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/gonzales-pe-sl/-/gonzales-pe-sl-4.2.3.tgz#6a868bc380645f141feeb042c6f97fcc71b59fe6" - integrity sha1-aoaLw4BkXxQf7rBCxvl/zHG1n+Y= - dependencies: - minimist "1.1.x" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -got@^6.7.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= - dependencies: - create-error-class "^3.0.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-redirect "^1.0.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - lowercase-keys "^1.0.0" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - unzip-response "^2.0.1" - url-parse-lax "^1.0.0" - -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -gzip-size@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" - integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== - dependencies: - duplexer "^0.1.2" - -handle-thing@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" - integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - -handlebars@^4.7.6: - version "4.7.6" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" - integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.0" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -hard-rejection@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" - integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has-unicode@^2.0.0, has-unicode@^2.0.1, has-unicode@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - 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" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - 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" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= - -he@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoist-non-react-statics@^3.3.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.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" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4, hosted-git-info@^2.7.1, hosted-git-info@^2.8.5: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== - -hosted-git-info@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -html-entities@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" - integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== - -html-loader@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-4.2.0.tgz#20f69f9ec69244860c250ae6ee0046c8c5c4d348" - integrity sha512-OxCHD3yt+qwqng2vvcaPApCEvbx+nXWu+v69TYHx1FO8bffHn/JjHtE3TTQZmHjwvnJe4xxzuecetDVBrQR1Zg== - dependencies: - html-minifier-terser "^7.0.0" - parse5 "^7.0.0" - -html-minifier-terser@^6.0.2: - version "6.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab" - integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== - dependencies: - camel-case "^4.1.2" - clean-css "^5.2.2" - commander "^8.3.0" - he "^1.2.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.10.0" - -html-minifier-terser@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.1.0.tgz#cd62d42158be9a6bef0fcd40f94127345743d9b5" - integrity sha512-BvPO2S7Ip0Q5qt+Y8j/27Vclj6uHC6av0TMoDn7/bJPhMWHI2UtR2e/zEgJn3/qYAmxumrGp9q4UHurL6mtW9Q== - dependencies: - camel-case "^4.1.2" - clean-css "5.2.0" - commander "^9.4.1" - entities "^4.4.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.15.1" - -html-tags@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.2.0.tgz#dbb3518d20b726524e4dd43de397eb0a95726961" - integrity sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg== - -html-webpack-plugin@5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz#c3911936f57681c1f9f4d8b68c158cd9dfe52f50" - integrity sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw== - dependencies: - "@types/html-minifier-terser" "^6.0.0" - html-minifier-terser "^6.0.2" - lodash "^4.17.21" - pretty-error "^4.0.0" - tapable "^2.0.0" - -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -htmlparser2@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - -http-cache-semantics@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-parser-js@>=0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" - integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== - -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - -http-proxy-middleware@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" - integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== - dependencies: - "@types/http-proxy" "^1.17.8" - http-proxy "^1.18.1" - is-glob "^4.0.1" - is-plain-obj "^3.0.0" - micromatch "^4.0.2" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - -https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= - dependencies: - ms "^2.0.0" - -iconv-lite@0.4.24, iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -icss-utils@^5.0.0, icss-utils@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" - integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= - -iferr@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-1.0.2.tgz#e9fde49a9da06dc4a4194c6c9ed6d08305037a6d" - integrity sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg== - -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - -ignore@^3.1.2: - version "3.3.10" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" - integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== - -ignore@^4.0.3: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -immer@^9.0.7: - version "9.0.21" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" - integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== - -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-fresh@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= - -import-lazy@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" - integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== - -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - -imports-loader@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/imports-loader/-/imports-loader-4.0.1.tgz#a3d3067d0c369cd621e2b322b6b6bb2593756be5" - integrity sha512-ZiY+1xH5fqAJ1Qu1CFv+zw54rvPCC92DdYRDe0IIUboOhbJPLfOPbF/paA2iipelvMwjQUKWydcFOJ7f1+ZFcA== - dependencies: - source-map "^0.6.1" - strip-comments "^2.0.1" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= - dependencies: - repeating "^2.0.0" - -indent-string@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" - integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - -infer-owner@^1.0.3, infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4, inflight@~1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -init-package-json@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" - integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== - dependencies: - glob "^7.1.1" - npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" - promzard "^0.3.0" - read "~1.0.1" - read-package-json "1 || 2" - semver "2.x || 3.x || 4 || 5" - validate-npm-package-license "^3.0.1" - validate-npm-package-name "^3.0.0" - -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - integrity sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34= - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - -inquirer@^6.2.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" - integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== - dependencies: - ansi-escapes "^3.2.0" - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.12" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.4.0" - string-width "^2.1.0" - strip-ansi "^5.1.0" - through "^2.3.6" - -internal-slot@^1.0.3, internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - 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" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" - integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= - -ip@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -ipaddr.js@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" - integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== - -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" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - 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" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-callable@^1.1.3, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-callable@^1.1.4, is-callable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" - integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== - -is-ci@^1.0.10: - version "1.2.1" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" - integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== - dependencies: - ci-info "^1.5.0" - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - -is-cidr@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/is-cidr/-/is-cidr-3.1.1.tgz#e92ef121bdec2782271a77ce487a8b8df3718ab7" - integrity sha512-Gx+oErgq1j2jAKCR2Kbq0b3wbH0vQKqZ0wOlHxm0o56nq51Cs/DZA8oz9dMDhbHyHEGgJ86eTeVudtgMMOx3Mw== - dependencies: - cidr-regex "^2.0.10" - -is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -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" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - 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" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - 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" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= - -is-docker@^2.0.0, is-docker@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -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" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -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" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - 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" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^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" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-installed-globally@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" - integrity sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA= - dependencies: - global-dirs "^0.1.0" - is-path-inside "^1.0.0" - -is-interactive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" - integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== - -is-my-ip-valid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" - integrity sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ== - -is-my-json-valid@^2.10.0: - version "2.20.5" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.20.5.tgz#5eca6a8232a687f68869b7361be1612e7512e5df" - integrity sha512-VTPuvvGQtxvCeghwspQu1rBgjYUT6FGxPlvFKbYuFtgc4ADsX3U5ihZOYN0qyU6u+d4X9xXb0IT5O6QpXKt87A== - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - is-my-ip-valid "^1.0.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - -is-nan@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-npm@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" - integrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ= - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= - -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - -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" - integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= - dependencies: - path-is-inside "^1.0.1" - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" - integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== - -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" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-plain-object@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-4.1.1.tgz#1a14d6452cbd50790edc7fdaa0aed5a40a35ebb5" - integrity sha512-5Aw8LLVsDlZsETVMhoMXzqsXwQqr/0vlnBYzIXJbYo2F4yYlhLHs+Ez7Bod7IIQKWkJbJfxrWD7pA1Dw1TKrwA== - -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - -is-property@^1.0.0, is-property@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - integrity sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ= - -is-redirect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" - integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= - -is-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== - -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-root@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" - integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-ssh@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.2.tgz#a4b82ab63d73976fd8263cceee27f99a88bdae2b" - integrity sha512-elEw0/0c2UscLrNG+OAorbP539E3rhliKPg+hDMWN9VwrDXfYK+4PBEykDPfxlYYtQvl84TascnQyobfQLHEhQ== - dependencies: - protocols "^1.1.0" - -is-stream@^1.0.0, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== - -is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-text-path@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" - integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= - dependencies: - text-extensions "^1.0.0" - -is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-unicode-supported@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" - integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-windows@^1.0.0, is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isbinaryfile@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" - integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== - dependencies: - buffer-alloc "^1.2.0" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - 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" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -js-sdsl@^4.1.4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" - integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.13.1, js-yaml@^3.4.6, js-yaml@^3.5.1, js-yaml@^3.5.4: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@^5.0.1, 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" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -json5@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" - integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== - dependencies: - minimist "^1.2.5" - -json5@^2.2.1, json5@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonfile@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" - integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== - dependencies: - universalify "^1.0.0" - 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" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= - -jsonpointer@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.1.0.tgz#501fb89986a2389765ba09e6053299ceb4f2c2cc" - integrity sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg== - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.3.3" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" - integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== - dependencies: - array-includes "^3.1.5" - object.assign "^4.1.3" - -jszip@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-2.6.1.tgz#b88f3a7b2e67a2a048152982c7a3756d9c4828f0" - integrity sha1-uI86ey5noqBIFSmCx6N1bZxIKPA= - dependencies: - pako "~1.0.2" - -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" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - 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" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - 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" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -klona@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" - integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== - -known-css-properties@^0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.26.0.tgz#008295115abddc045a9f4ed7e2a84dc8b3a77649" - integrity sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg== - -known-css-properties@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.3.0.tgz#a3d135bbfc60ee8c6eacf2f7e7e6f2d4755e49a4" - integrity sha512-QMQcnKAiQccfQTqtBh/qwquGZ2XK/DXND1jrcN9M8gMMy99Gwla7GQjndVUsEqIaRyP6bsFRuhwRj5poafBGJQ== - -latest-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" - integrity sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU= - dependencies: - package-json "^4.0.0" - -lazy-property@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazy-property/-/lazy-property-1.0.0.tgz#84ddc4b370679ba8bd4cdcfa4c06b43d57111147" - integrity sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc= - -lazystream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - 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" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -lerna@3.20.2: - version "3.20.2" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.20.2.tgz#abf84e73055fe84ee21b46e64baf37b496c24864" - integrity sha512-bjdL7hPLpU3Y8CBnw/1ys3ynQMUjiK6l9iDWnEGwFtDy48Xh5JboR9ZJwmKGCz9A/sarVVIGwf1tlRNKUG9etA== - dependencies: - "@lerna/add" "3.20.0" - "@lerna/bootstrap" "3.20.0" - "@lerna/changed" "3.20.0" - "@lerna/clean" "3.20.0" - "@lerna/cli" "3.18.5" - "@lerna/create" "3.18.5" - "@lerna/diff" "3.18.5" - "@lerna/exec" "3.20.0" - "@lerna/import" "3.18.5" - "@lerna/info" "3.20.0" - "@lerna/init" "3.18.5" - "@lerna/link" "3.18.5" - "@lerna/list" "3.20.0" - "@lerna/publish" "3.20.2" - "@lerna/run" "3.20.0" - "@lerna/version" "3.20.2" - import-local "^2.0.0" - npmlog "^4.1.2" - -leven@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= - -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -libcipm@^4.0.7: - version "4.0.8" - resolved "https://registry.yarnpkg.com/libcipm/-/libcipm-4.0.8.tgz#dcea4919e10dfbce420327e63901613b9141bc89" - integrity sha512-IN3hh2yDJQtZZ5paSV4fbvJg4aHxCCg5tcZID/dSVlTuUiWktsgaldVljJv6Z5OUlYspx6xQkbR0efNodnIrOA== - dependencies: - bin-links "^1.1.2" - bluebird "^3.5.1" - figgy-pudding "^3.5.1" - find-npm-prefix "^1.0.2" - graceful-fs "^4.1.11" - ini "^1.3.5" - lock-verify "^2.1.0" - mkdirp "^0.5.1" - npm-lifecycle "^3.0.0" - npm-logical-tree "^1.2.1" - npm-package-arg "^6.1.0" - pacote "^9.1.0" - read-package-json "^2.0.13" - rimraf "^2.6.2" - worker-farm "^1.6.0" - -libnpm@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/libnpm/-/libnpm-3.0.1.tgz#0be11b4c9dd4d1ffd7d95c786e92e55d65be77a2" - integrity sha512-d7jU5ZcMiTfBqTUJVZ3xid44fE5ERBm9vBnmhp2ECD2Ls+FNXWxHSkO7gtvrnbLO78gwPdNPz1HpsF3W4rjkBQ== - dependencies: - bin-links "^1.1.2" - bluebird "^3.5.3" - find-npm-prefix "^1.0.2" - libnpmaccess "^3.0.2" - libnpmconfig "^1.2.1" - libnpmhook "^5.0.3" - libnpmorg "^1.0.1" - libnpmpublish "^1.1.2" - libnpmsearch "^2.0.2" - libnpmteam "^1.0.2" - lock-verify "^2.0.2" - npm-lifecycle "^3.0.0" - npm-logical-tree "^1.2.1" - npm-package-arg "^6.1.0" - npm-profile "^4.0.2" - npm-registry-fetch "^4.0.0" - npmlog "^4.1.2" - pacote "^9.5.3" - read-package-json "^2.0.13" - stringify-package "^1.0.0" - -libnpmaccess@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.2.tgz#8b2d72345ba3bef90d3b4f694edd5c0417f58923" - integrity sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ== - dependencies: - aproba "^2.0.0" - get-stream "^4.0.0" - npm-package-arg "^6.1.0" - npm-registry-fetch "^4.0.0" - -libnpmconfig@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0" - integrity sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA== - dependencies: - figgy-pudding "^3.5.1" - find-up "^3.0.0" - ini "^1.3.5" - -libnpmhook@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-5.0.3.tgz#4020c0f5edbf08ebe395325caa5ea01885b928f7" - integrity sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmorg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/libnpmorg/-/libnpmorg-1.0.1.tgz#5d2503f6ceb57f33dbdcc718e6698fea6d5ad087" - integrity sha512-0sRUXLh+PLBgZmARvthhYXQAWn0fOsa6T5l3JSe2n9vKG/lCVK4nuG7pDsa7uMq+uTt2epdPK+a2g6btcY11Ww== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmpublish@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.3.tgz#e3782796722d79eef1a0a22944c117e0c4ca4280" - integrity sha512-/3LsYqVc52cHXBmu26+J8Ed7sLs/hgGVFMH1mwYpL7Qaynb9RenpKqIKu0sJ130FB9PMkpMlWjlbtU8A4m7CQw== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - lodash.clonedeep "^4.5.0" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - npm-registry-fetch "^4.0.0" - semver "^5.5.1" - ssri "^6.0.1" - -libnpmsearch@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/libnpmsearch/-/libnpmsearch-2.0.2.tgz#9a4f059102d38e3dd44085bdbfe5095f2a5044cf" - integrity sha512-VTBbV55Q6fRzTdzziYCr64+f8AopQ1YZ+BdPOv16UegIEaE8C0Kch01wo4s3kRTFV64P121WZJwgmBwrq68zYg== - dependencies: - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpmteam@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/libnpmteam/-/libnpmteam-1.0.2.tgz#8b48bcbb6ce70dd8150c950fcbdbf3feb6eec820" - integrity sha512-p420vM28Us04NAcg1rzgGW63LMM6rwe+6rtZpfDxCcXxM0zUTLl7nPFEnRF3JfFBF5skF/yuZDUthTsHgde8QA== - dependencies: - aproba "^2.0.0" - figgy-pudding "^3.4.1" - get-stream "^4.0.0" - npm-registry-fetch "^4.0.0" - -libnpx@^10.2.0: - version "10.2.4" - resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.4.tgz#ef0e3258e29aef2ec7ee3276115e20e67f67d4ee" - integrity sha512-BPc0D1cOjBeS8VIBKUu5F80s6njm0wbVt7CsGMrIcJ+SI7pi7V0uVPGpEMH9H5L8csOcclTxAXFE2VAsJXUhfA== - dependencies: - dotenv "^5.0.1" - npm-package-arg "^6.0.0" - rimraf "^2.6.2" - safe-buffer "^5.1.0" - update-notifier "^2.3.0" - which "^1.3.0" - y18n "^4.0.0" - yargs "^14.2.3" - -lilconfig@^2.0.5, lilconfig@^2.0.6: - version "2.1.0" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" - integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== - -lines-and-columns@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" - integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - 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" - -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -load-json-file@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" - integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== - dependencies: - graceful-fs "^4.1.15" - parse-json "^4.0.0" - pify "^4.0.1" - strip-bom "^3.0.0" - type-fest "^0.3.0" - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -loader-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" - integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -loader-utils@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" - integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -loader-utils@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" - integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== - -loader-utils@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lock-verify@^2.0.2, lock-verify@^2.1.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.2.1.tgz#81107948c51ed16f97b96ff8b60675affb243fc1" - integrity sha512-n0Zw2DVupKfZMazy/HIFVNohJ1z8fIoZ77WBnyyBGG6ixw83uJNyrbiJvvHWe1QKkGiBCjj8RCPlymltliqEww== - dependencies: - "@iarna/cli" "^1.2.0" - npm-package-arg "^6.1.0" - semver "^5.4.1" - -lockfile@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" - integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== - dependencies: - signal-exit "^3.0.2" - -lodash._baseuniq@~4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" - integrity sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg= - dependencies: - lodash._createset "~4.0.0" - lodash._root "~3.0.0" - -lodash._createset@~4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" - integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= - -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= - -lodash._root@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" - integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI= - -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= - -lodash.capitalize@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz#f826c9b4e2a8511d84e3aca29db05e1a4f3b72a9" - integrity sha1-+CbJtOKoUR2E46yinbBeGk87cqk= - -lodash.clonedeep@^4.5.0, lodash.clonedeep@~4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - -lodash.defaults@^4.0.1, lodash.defaults@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= - -lodash.difference@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" - integrity sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA== - -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= - -lodash.flatten@^4.2.0, lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= - -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= - -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - -lodash.ismatch@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" - integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.kebabcase@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" - integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY= - -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= - -lodash.merge@^4.4.0, lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= - -lodash.set@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" - integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= - -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash.template@^4.0.2, lodash.template@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash.union@^4.6.0, lodash.union@~4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== - -lodash.uniq@^4.5.0, lodash.uniq@~4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= - -lodash.without@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" - integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= - -lodash@^4.0.0, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.10: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -lodash@^4.17.20, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93" - integrity sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA== - dependencies: - chalk "^5.0.0" - is-unicode-supported "^1.1.0" - -log-update@4.0.x: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - -loose-envify@^1.0.0, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - 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" - integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -macos-release@^2.2.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" - integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg== - -magic-string@^0.26.7: - version "0.26.7" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.7.tgz#caf7daf61b34e9982f8228c4527474dac8981d6f" - integrity sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow== - dependencies: - sourcemap-codec "^1.4.8" - -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -make-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -make-dir@^3.0.2, make-dir@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-fetch-happen@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" - integrity sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag== - dependencies: - agentkeepalive "^3.4.1" - cacache "^12.0.0" - http-cache-semantics "^3.8.1" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - node-fetch-npm "^2.0.2" - promise-retry "^1.1.1" - socks-proxy-agent "^4.0.0" - ssri "^6.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -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" - integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= - -map-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" - integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= - -map-obj@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" - integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g== - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -mathml-tag-names@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" - integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== - -maven-deploy@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/maven-deploy/-/maven-deploy-1.5.0.tgz#39dff210b774aa216d85874b23ffeef7175b3fe0" - integrity sha1-Od/yELd0qiFthYdLI//u9xdbP+A= - dependencies: - define-options "^0.1.3" - fs-walk "0.0.1" - isbinaryfile "^3.0.0" - jszip "^2.5.0" - semver "^5.1.0" - util-extend "^1.0.3" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -mdn-data@2.0.30: - version "2.0.30" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" - integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== - -meant@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.2.tgz#5d0c78310a3d8ae1408a16be0fe0bd42a969f560" - integrity sha512-KN+1uowN/NK+sT/Lzx7WSGIj2u+3xe5n2LbwObfjOhPZiA+cCfCm6idVl0RkEfjThkw5XJ96CyRcanq6GmKtUg== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -memfs@^3.1.2, memfs@^3.4.3: - version "3.4.13" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.13.tgz#248a8bd239b3c240175cd5ec548de5227fc4f345" - integrity sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg== - dependencies: - fs-monkey "^1.0.3" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -meow@^3.3.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= - 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" - -meow@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975" - integrity sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== - dependencies: - camelcase-keys "^4.0.0" - decamelize-keys "^1.0.0" - loud-rejection "^1.0.0" - minimist "^1.1.3" - minimist-options "^3.0.1" - normalize-package-data "^2.3.4" - read-pkg-up "^3.0.0" - redent "^2.0.0" - trim-newlines "^2.0.0" - -meow@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.0.tgz#50ecbcdafa16f8b58fb7eb9675b933f6473b3a59" - integrity sha512-kq5F0KVteskZ3JdfyQFivJEj2RaA8NFsS4+r9DaMKLcUHpk5OcHS3Q0XkCXONB1mZRPsu/Y/qImKri0nwSEZog== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^2.5.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.13.1" - yargs-parser "^18.1.3" - -meow@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-9.0.0.tgz#cd9510bc5cac9dee7d03c73ee1f9ad959f4ea364" - integrity sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize "^1.2.0" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^3.0.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.18.0" - yargs-parser "^20.2.3" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -merge@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" - integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^3.1.10: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - 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" - -micromatch@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" - -mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@^2.0.3: - version "2.4.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" - integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== - -mime@~2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" - integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -mini-css-extract-plugin@2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz#e049d3ea7d3e4e773aad585c6cb329ce0c7b72d7" - integrity sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw== - dependencies: - schema-utils "^4.0.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.1.0: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@~3.0.4: - version "3.0.8" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" - integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== - dependencies: - brace-expansion "^1.1.7" - -minimist-options@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" - integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - kind-of "^6.0.3" - -minimist-options@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" - integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@1.1.x: - version "1.1.3" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" - integrity sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag= - -minimist@1.2.8, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= - dependencies: - mkdirp "*" - -mkdirp@*: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.4, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha-headless-chrome@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mocha-headless-chrome/-/mocha-headless-chrome-2.0.1.tgz#8c21c1679f43faebc8b526b2ad26d96ab42e47c1" - integrity sha512-76ieyHSSnNYv01AuSNt+ZmALZdfrM2uWDeLjxA7cYjrI0kLruZSdgje5MawWBVBfbE3U1pLgHJIveY1nv3zv6w== - dependencies: - args "^5.0.0" - mkdirp "^0.5.1" - puppeteer "1.5.0" - -mocha-loader@5.1.5: - version "5.1.5" - resolved "https://registry.yarnpkg.com/mocha-loader/-/mocha-loader-5.1.5.tgz#40e9163a17e4662e5d8851de93dca509fe4b5455" - integrity sha512-NfcFycKc9uAWmkLos/azir6XQknrzebY5qjEEyFhd423bVNkCoAbgaRmiV75j0nufmkZTCDBhm8NJ8WlTNbAQQ== - dependencies: - css-loader "^5.0.0" - loader-utils "^2.0.0" - schema-utils "^3.0.0" - style-loader "^2.0.0" - -mocha@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" - integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== - dependencies: - browser-stdout "1.3.1" - commander "2.15.1" - debug "3.1.0" - diff "3.5.0" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.5" - he "1.1.1" - minimatch "3.0.4" - mkdirp "0.5.1" - supports-color "5.4.0" - -modify-values@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" - integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== - -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - -mri@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a" - integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w== - -mrmime@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" - integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2, ms@^2.0.0, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multicast-dns@^7.2.5: - version "7.2.5" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" - integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== - dependencies: - dns-packet "^5.2.2" - thunky "^1.0.2" - -multimatch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b" - integrity sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA== - dependencies: - array-differ "^2.0.3" - array-union "^1.0.2" - arrify "^1.0.1" - minimatch "^3.0.4" - -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - integrity sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA= - -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= - -mute-stream@~0.0.4: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - -mz@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - -nanoid@^3.3.4: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - 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" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.0, neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -next-tick@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - -node-fetch-npm@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" - integrity sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg== - dependencies: - encoding "^0.1.11" - json-parse-better-errors "^1.0.0" - safe-buffer "^5.1.1" - -node-fetch@^2.3.0, node-fetch@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" - integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== - -node-forge@^1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - -node-gyp@^5.0.2, node-gyp@^5.0.5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" - integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.2" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.1.2" - request "^2.88.0" - rimraf "^2.6.3" - semver "^5.7.1" - tar "^4.4.12" - which "^1.3.1" - -node-polyfill-webpack-plugin@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-2.0.1.tgz#141d86f177103a8517c71d99b7c6a46edbb1bb58" - integrity sha512-ZUMiCnZkP1LF0Th2caY6J/eKKoA0TefpoVa68m/LQU1I/mE8rGt4fNYGgNuCcK+aG8P8P43nbeJ2RqJMOL/Y1A== - dependencies: - assert "^2.0.0" - browserify-zlib "^0.2.0" - buffer "^6.0.3" - console-browserify "^1.2.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.12.0" - domain-browser "^4.22.0" - events "^3.3.0" - filter-obj "^2.0.2" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "^1.0.1" - process "^0.11.10" - punycode "^2.1.1" - querystring-es3 "^0.2.1" - readable-stream "^4.0.0" - stream-browserify "^3.0.0" - stream-http "^3.2.0" - string_decoder "^1.3.0" - timers-browserify "^2.0.12" - tty-browserify "^0.0.1" - type-fest "^2.14.0" - url "^0.11.0" - util "^0.12.4" - vm-browserify "^1.1.2" - -node-releases@^2.0.8: - version "2.0.10" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" - integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== - -nopt@^4.0.1, nopt@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-package-data@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= - -normalize-url@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== - -npm-audit-report@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.3.3.tgz#8226deeb253b55176ed147592a3995442f2179ed" - integrity sha512-8nH/JjsFfAWMvn474HB9mpmMjrnKb1Hx/oTAdjv4PT9iZBvBxiZ+wtDUapHCJwLqYGQVPaAfs+vL5+5k9QndXw== - dependencies: - cli-table3 "^0.5.0" - console-control-strings "^1.1.0" - -npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-cache-filename@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz#ded306c5b0bfc870a9e9faf823bc5f283e05ae11" - integrity sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE= - -npm-install-checks@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-3.0.2.tgz#ab2e32ad27baa46720706908e5b14c1852de44d9" - integrity sha512-E4kzkyZDIWoin6uT5howP8VDvkM+E8IQDcHAycaAxMbwkqhIg5eEYALnXOl3Hq9MrkdQB/2/g1xwBINXdKSRkg== - dependencies: - semver "^2.3.0 || 3.x || 4 || 5" - -npm-lifecycle@^3.0.0, npm-lifecycle@^3.1.2, npm-lifecycle@^3.1.4: - version "3.1.5" - resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309" - integrity sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g== - dependencies: - byline "^5.0.0" - graceful-fs "^4.1.15" - node-gyp "^5.0.2" - resolve-from "^4.0.0" - slide "^1.1.6" - uid-number "0.0.6" - umask "^1.1.0" - which "^1.3.1" - -npm-logical-tree@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88" - integrity sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg== - -npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0, npm-package-arg@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" - integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== - dependencies: - hosted-git-info "^2.7.1" - osenv "^0.1.5" - semver "^5.6.0" - validate-npm-package-name "^3.0.0" - -npm-packlist@^1.1.12, npm-packlist@^1.4.4, npm-packlist@^1.4.7: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - -npm-pick-manifest@^3.0.0, npm-pick-manifest@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" - integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - -npm-profile@^4.0.2: - version "4.0.4" - resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-4.0.4.tgz#28ee94390e936df6d084263ee2061336a6a1581b" - integrity sha512-Ta8xq8TLMpqssF0H60BXS1A90iMoM6GeKwsmravJ6wYjWwSzcYBTdyWa3DZCYqPutacBMEm7cxiOkiIeCUAHDQ== - dependencies: - aproba "^1.1.2 || 2" - figgy-pudding "^3.4.1" - npm-registry-fetch "^4.0.0" - -npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.2: - version "4.0.7" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz#57951bf6541e0246b34c9f9a38ab73607c9449d7" - integrity sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ== - dependencies: - JSONStream "^1.3.4" - bluebird "^3.5.1" - figgy-pudding "^3.4.1" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - npm-package-arg "^6.1.0" - safe-buffer "^5.2.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" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npm-user-validate@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951" - integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE= - -npm@6.13.4: - version "6.13.4" - resolved "https://registry.yarnpkg.com/npm/-/npm-6.13.4.tgz#1e95b0f311999cf682384c38865dfeb3127203bb" - integrity sha512-vTcUL4SCg3AzwInWTbqg1OIaOXlzKSS8Mb8kc5avwrJpcvevDA5J9BhYSuei+fNs3pwOp4lzA5x2FVDXACvoXA== - dependencies: - JSONStream "^1.3.5" - abbrev "~1.1.1" - ansicolors "~0.3.2" - ansistyles "~0.1.3" - aproba "^2.0.0" - archy "~1.0.0" - bin-links "^1.1.6" - bluebird "^3.5.5" - byte-size "^5.0.1" - cacache "^12.0.3" - call-limit "^1.1.1" - chownr "^1.1.3" - ci-info "^2.0.0" - cli-columns "^3.1.2" - cli-table3 "^0.5.1" - cmd-shim "^3.0.3" - columnify "~1.5.4" - config-chain "^1.1.12" - detect-indent "~5.0.0" - detect-newline "^2.1.0" - dezalgo "~1.0.3" - editor "~1.0.0" - figgy-pudding "^3.5.1" - find-npm-prefix "^1.0.2" - fs-vacuum "~1.2.10" - fs-write-stream-atomic "~1.0.10" - gentle-fs "^2.3.0" - glob "^7.1.4" - graceful-fs "^4.2.3" - has-unicode "~2.0.1" - hosted-git-info "^2.8.5" - iferr "^1.0.2" - infer-owner "^1.0.4" - inflight "~1.0.6" - inherits "^2.0.4" - ini "^1.3.5" - init-package-json "^1.10.3" - is-cidr "^3.0.0" - json-parse-better-errors "^1.0.2" - lazy-property "~1.0.0" - libcipm "^4.0.7" - libnpm "^3.0.1" - libnpmaccess "^3.0.2" - libnpmhook "^5.0.3" - libnpmorg "^1.0.1" - libnpmsearch "^2.0.2" - libnpmteam "^1.0.2" - libnpx "^10.2.0" - lock-verify "^2.1.0" - lockfile "^1.0.4" - lodash._baseuniq "~4.6.0" - lodash.clonedeep "~4.5.0" - lodash.union "~4.6.0" - lodash.uniq "~4.5.0" - lodash.without "~4.4.0" - lru-cache "^5.1.1" - meant "~1.0.1" - mississippi "^3.0.0" - mkdirp "~0.5.1" - move-concurrently "^1.0.1" - node-gyp "^5.0.5" - nopt "~4.0.1" - normalize-package-data "^2.5.0" - npm-audit-report "^1.3.2" - npm-cache-filename "~1.0.2" - npm-install-checks "^3.0.2" - npm-lifecycle "^3.1.4" - npm-package-arg "^6.1.1" - npm-packlist "^1.4.7" - npm-pick-manifest "^3.0.2" - npm-profile "^4.0.2" - npm-registry-fetch "^4.0.2" - npm-user-validate "~1.0.0" - npmlog "~4.1.2" - once "~1.4.0" - opener "^1.5.1" - osenv "^0.1.5" - pacote "^9.5.11" - path-is-inside "~1.0.2" - promise-inflight "~1.0.1" - qrcode-terminal "^0.12.0" - query-string "^6.8.2" - qw "~1.0.1" - read "~1.0.7" - read-cmd-shim "^1.0.5" - read-installed "~4.0.3" - read-package-json "^2.1.1" - read-package-tree "^5.3.1" - readable-stream "^3.4.0" - readdir-scoped-modules "^1.1.0" - request "^2.88.0" - retry "^0.12.0" - rimraf "^2.6.3" - safe-buffer "^5.1.2" - semver "^5.7.1" - sha "^3.0.0" - slide "~1.1.6" - sorted-object "~2.0.1" - sorted-union-stream "~2.1.3" - ssri "^6.0.1" - stringify-package "^1.0.1" - tar "^4.4.13" - text-table "~0.2.0" - tiny-relative-date "^1.3.0" - uid-number "0.0.6" - umask "~1.1.0" - unique-filename "^1.1.1" - unpipe "~1.0.0" - update-notifier "^2.5.0" - uuid "^3.3.3" - validate-npm-package-license "^3.0.4" - validate-npm-package-name "~3.0.0" - which "^1.3.1" - worker-farm "^1.7.0" - write-file-atomic "^2.4.3" - -npmlog@^4.1.2, npmlog@~4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -nth-check@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -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" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-hash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" - integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== - -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -object-inspect@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-is@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" - integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.3, object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.entries@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.fromentries@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" - integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - -object.hasown@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.2.tgz#f919e21fad4eb38a57bc6345b3afd496515c3f92" - integrity sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw== - dependencies: - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -obuf@^1.0.0, obuf@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - -octokit-pagination-methods@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" - integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -once@^1.3.0, once@^1.3.1, once@^1.4.0, once@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - integrity sha1-ofeDj4MUxRbwXs78vEzP4EtO14k= - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -open@^8.0.9, open@^8.4.0: - version "8.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" - integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -opener@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== - -opener@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" - integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -ora@6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ora/-/ora-6.1.2.tgz#7b3c1356b42fd90fb1dad043d5dbe649388a0bf5" - integrity sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw== - dependencies: - bl "^5.0.0" - chalk "^5.0.0" - cli-cursor "^4.0.0" - cli-spinners "^2.6.1" - is-interactive "^2.0.0" - is-unicode-supported "^1.1.0" - log-symbols "^5.1.0" - strip-ansi "^7.0.1" - wcwidth "^1.0.1" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-name@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" - integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== - dependencies: - macos-release "^2.2.0" - windows-release "^3.1.0" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4, osenv@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - 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" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" - integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= - dependencies: - p-reduce "^1.0.0" - -p-map@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - -p-pipe@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" - integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= - -p-queue@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-4.0.0.tgz#ed0eee8798927ed6f2c2f5f5b77fdb2061a5d346" - integrity sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg== - dependencies: - eventemitter3 "^3.1.0" - -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= - -p-retry@^4.5.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" - integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== - dependencies: - "@types/retry" "0.12.0" - retry "^0.13.1" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -p-waterfall@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00" - integrity sha1-ftlLPOszMngjU69qrhGqn8I1uwA= - dependencies: - p-reduce "^1.0.0" - -package-json@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" - integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0= - dependencies: - got "^6.7.1" - registry-auth-token "^3.0.1" - registry-url "^3.0.3" - semver "^5.1.0" - -pacote@^9.1.0, pacote@^9.5.11, pacote@^9.5.3: - version "9.5.12" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.12.tgz#1e11dd7a8d736bcc36b375a9804d41bb0377bf66" - integrity sha512-BUIj/4kKbwWg4RtnBncXPJd15piFSVNpTzY0rysSr3VnMowTYgkGKcaHrbReepAkjTr8lH2CVWRi58Spg2CicQ== - dependencies: - bluebird "^3.5.3" - cacache "^12.0.2" - chownr "^1.1.2" - figgy-pudding "^3.5.1" - get-stream "^4.1.0" - glob "^7.1.3" - infer-owner "^1.0.4" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - minimatch "^3.0.4" - minipass "^2.3.5" - mississippi "^3.0.0" - mkdirp "^0.5.1" - normalize-package-data "^2.4.0" - npm-normalize-package-bin "^1.0.0" - npm-package-arg "^6.1.0" - npm-packlist "^1.1.12" - npm-pick-manifest "^3.0.0" - npm-registry-fetch "^4.0.0" - osenv "^0.1.5" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - protoduck "^5.0.1" - rimraf "^2.6.2" - safe-buffer "^5.1.2" - semver "^5.6.0" - ssri "^6.0.1" - tar "^4.4.10" - unique-filename "^1.1.1" - which "^1.3.1" - -pako@~1.0.2, pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -parallel-transform@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" - integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== - dependencies: - cyclist "^1.0.1" - inherits "^2.0.3" - readable-stream "^2.1.5" - -param-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" - integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-github-repo-url@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" - integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A= - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-json@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.1.tgz#7cfe35c1ccd641bce3981467e6c2ece61b3b3878" - integrity sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - lines-and-columns "^1.1.6" - -parse-path@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.2.tgz#ef14f0d3d77bae8dd4bc66563a4c151aac9e65aa" - integrity sha512-HSqVz6iuXSiL8C1ku5Gl1Z5cwDd9Wo0q8CoffdAghP6bz8pJa1tcMC+m4N+z6VAS8QdksnIGq1TB6EgR4vPR6w== - dependencies: - is-ssh "^1.3.0" - protocols "^1.4.0" - -parse-url@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.2.tgz#856a3be1fcdf78dc93fc8b3791f169072d898b59" - integrity sha512-Czj+GIit4cdWtxo3ISZCvLiUjErSo0iI3wJ+q9Oi3QuMYTI6OZu+7cewMWZ+C1YAnKhYTk6/TLuhIgCypLthPA== - dependencies: - is-ssh "^1.3.0" - normalize-url "^3.3.0" - parse-path "^4.0.0" - protocols "^1.4.0" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-browserify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" - integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -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" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-is-inside@^1.0.1, path-is-inside@^1.0.2, path-is-inside@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.0.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - 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" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-up@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" - integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== - dependencies: - find-up "^3.0.0" - -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" - integrity sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU= - -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" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -postcss-import@^14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-14.1.0.tgz#a7333ffe32f0b8795303ee9e40215dac922781f0" - integrity sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw== - dependencies: - postcss-value-parser "^4.0.0" - read-cache "^1.0.0" - resolve "^1.1.7" - -postcss-js@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" - integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== - dependencies: - camelcase-css "^2.0.1" - -postcss-load-config@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" - integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== - dependencies: - lilconfig "^2.0.5" - yaml "^1.10.2" - -postcss-loader@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.0.2.tgz#b53ff44a26fba3688eee92a048c7f2d4802e23bb" - integrity sha512-fUJzV/QH7NXUAqV8dWJ9Lg4aTkDCezpTS5HgJ2DvqznexTbSTxgi/dTECvTZ15BwKTtk8G/bqI/QTu2HPd3ZCg== - dependencies: - cosmiconfig "^7.0.0" - klona "^2.0.5" - semver "^7.3.8" - -postcss-media-query-parser@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" - integrity sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ= - -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== - -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== - dependencies: - icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== - dependencies: - postcss-selector-parser "^6.0.4" - -postcss-modules-values@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" - integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - dependencies: - icss-utils "^5.0.0" - -postcss-nested@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.0.tgz#1572f1984736578f360cffc7eb7dca69e30d1735" - integrity sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w== - dependencies: - postcss-selector-parser "^6.0.10" - -postcss-nested@^5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc" - integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA== - dependencies: - postcss-selector-parser "^6.0.6" - -postcss-resolve-nested-selector@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz#29ccbc7c37dedfac304e9fff0bf1596b3f6a0e4e" - integrity sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4= - -postcss-safe-parser@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz#bb4c29894171a94bc5c996b9a30317ef402adaa1" - integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ== - -postcss-scss@^4.0.5: - version "4.0.6" - resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.6.tgz#5d62a574b950a6ae12f2aa89b60d63d9e4432bfd" - integrity sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ== - -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.6: - version "6.0.11" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc" - integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-selector-parser@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" - integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== - dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-url@^10.0.0: - version "10.1.3" - resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-10.1.3.tgz#54120cc910309e2475ec05c2cfa8f8a2deafdf1e" - integrity sha512-FUzyxfI5l2tKmXdYc6VTu3TWZsInayEKPbiyW+P6vmmIrrb4I6CGX0BFoewgYHLK+oIL5FECEK02REYRpBvUCw== - dependencies: - make-dir "~3.1.0" - mime "~2.5.2" - minimatch "~3.0.4" - xxhashjs "~0.2.2" - -postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@8.4.21, postcss@^8.0.9, postcss@^8.2.15, postcss@^8.4.18, postcss@^8.4.19, postcss@^8.4.21: - version "8.4.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" - integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^7.0.26: - version "7.0.32" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" - integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - -prettier@2.8.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" - integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== - -pretty-error@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6" - integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== - dependencies: - lodash "^4.17.20" - renderkid "^3.0.0" - -private@^0.1.6, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@0.11.10, process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -promise-inflight@^1.0.1, promise-inflight@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= - -promise-retry@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" - integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0= - dependencies: - err-code "^1.0.0" - retry "^0.10.0" - -prompts@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -promzard@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" - integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= - dependencies: - read "1" - -prop-types@^15.6.1: - version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" - integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.8.1" - -prop-types@^15.8.1: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= - -protocols@^1.1.0, protocols@^1.4.0: - version "1.4.8" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" - integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== - -protoduck@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" - integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== - dependencies: - genfun "^5.0.0" - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -proxy-from-env@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -puppeteer@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.5.0.tgz#e35db3f3ba3d41013feb65be02bdaa727ec7b8ec" - integrity sha512-eELwFtFxL+uhmg4jPZOZXzSrPEYy4CaYQNbcchBbfxY+KjMpnv6XGf/aYWaQG49OTpfi2/DMziXtDM8XuJgoUA== - dependencies: - debug "^3.1.0" - extract-zip "^1.6.6" - https-proxy-agent "^2.2.1" - mime "^2.0.3" - progress "^2.0.0" - proxy-from-env "^1.0.0" - rimraf "^2.6.1" - ws "^5.1.1" - -q@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= - -qrcode-terminal@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" - integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -query-string@^6.8.2: - version "6.13.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.13.1.tgz#d913ccfce3b4b3a713989fe6d39466d92e71ccad" - integrity sha512-RfoButmcK+yCta1+FuU8REvisx1oEzhMKwhLUNcepQTPGcNMp1sIqjnfCtfnvGSQZQEhaBHvccujtWoUV3TTbA== - dependencies: - decode-uri-component "^0.2.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - -querystring-es3@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-lru@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" - integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= - -quick-lru@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" - integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -qw@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/qw/-/qw-1.0.1.tgz#efbfdc740f9ad054304426acb183412cc8b996d4" - integrity sha1-77/cdA+a0FQwRCassYNBLMi5ltQ= - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.2.1, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-loader@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" - integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -raw-loader@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" - integrity sha1-DD0L6u2KAclm2Xh793goElKpeao= - -rc@^1.0.1, rc@^1.1.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -react-dev-utils@12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73" - integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ== - dependencies: - "@babel/code-frame" "^7.16.0" - address "^1.1.2" - browserslist "^4.18.1" - chalk "^4.1.2" - cross-spawn "^7.0.3" - detect-port-alt "^1.1.6" - escape-string-regexp "^4.0.0" - filesize "^8.0.6" - find-up "^5.0.0" - fork-ts-checker-webpack-plugin "^6.5.0" - global-modules "^2.0.0" - globby "^11.0.4" - gzip-size "^6.0.0" - immer "^9.0.7" - is-root "^2.1.0" - loader-utils "^3.2.0" - open "^8.4.0" - pkg-up "^3.1.0" - prompts "^2.4.2" - react-error-overlay "^6.0.11" - recursive-readdir "^2.2.2" - shell-quote "^1.7.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -react-error-overlay@^6.0.11: - version "6.0.11" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" - integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== - -react-hot-loader@4.13.1: - version "4.13.1" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.13.1.tgz#979fd7598e27338b3faffae6ed01c65374dace5e" - integrity sha512-ZlqCfVRqDJmMXTulUGic4lN7Ic1SXgHAFw7y/Jb7t25GBgTR0fYAJ8uY4mrpxjRyWGWmqw77qJQGnYbzCvBU7g== - dependencies: - fast-levenshtein "^2.0.6" - global "^4.3.0" - hoist-non-react-statics "^3.3.0" - loader-utils "^2.0.3" - prop-types "^15.6.1" - react-lifecycles-compat "^3.0.4" - shallowequal "^1.1.0" - source-map "^0.7.3" - -react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-lifecycles-compat@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" - integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== - -read-cache@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" - integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== - dependencies: - pify "^2.3.0" - -read-cmd-shim@^1.0.1, read-cmd-shim@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" - integrity sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA== - dependencies: - graceful-fs "^4.1.2" - -read-installed@~4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" - integrity sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc= - dependencies: - debuglog "^1.0.1" - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - semver "2 || 3 || 4 || 5" - slide "~1.1.3" - util-extend "^1.0.1" - optionalDependencies: - graceful-fs "^4.1.2" - -"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13, read-package-json@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" - integrity sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A== - dependencies: - glob "^7.1.1" - json-parse-better-errors "^1.0.1" - normalize-package-data "^2.0.0" - npm-normalize-package-bin "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.2" - -read-package-tree@^5.1.6, read-package-tree@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" - integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== - dependencies: - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - util-promisify "^2.1.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" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" - integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - -read@1, read@~1.0.1, read@~1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= - dependencies: - mute-stream "~0.0.4" - -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - 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" - -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.5.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba" - integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - -readable-stream@~1.1.10: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readdir-glob@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.2.tgz#b185789b8e6a43491635b6953295c5c5e3fd224c" - integrity sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA== - dependencies: - minimatch "^5.1.0" - -readdir-scoped-modules@^1.0.0, readdir-scoped-modules@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" - integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== - dependencies: - debuglog "^1.0.1" - dezalgo "^1.0.0" - graceful-fs "^4.1.2" - once "^1.3.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - integrity sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - -recursive-readdir@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" - integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== - dependencies: - minimatch "^3.0.5" - -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - -redent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" - integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= - dependencies: - indent-string "^3.0.0" - strip-indent "^2.0.0" - -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - -regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== - dependencies: - regenerate "^1.4.2" - -regenerate-unicode-properties@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" - integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.2.1, regenerate@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f" - integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A== - -regenerate@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - integrity sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w== - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== - dependencies: - "@babel/runtime" "^7.8.4" - -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" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexpp@^3.0.0, regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regexpu-core@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" - integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^8.2.0" - regjsgen "^0.5.1" - regjsparser "^0.6.4" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.2.0" - -regexpu-core@^5.3.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" - integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== - dependencies: - "@babel/regjsgen" "^0.8.0" - regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsparser "^0.9.1" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" - -registry-auth-token@^3.0.1: - version "3.4.0" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e" - integrity sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A== - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= - dependencies: - rc "^1.0.1" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= - -regjsgen@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" - integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= - dependencies: - jsesc "~0.5.0" - -regjsparser@^0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" - integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== - dependencies: - jsesc "~0.5.0" - -regjsparser@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" - integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== - dependencies: - jsesc "~0.5.0" - -relateurl@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - -renderkid@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" - integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== - dependencies: - css-select "^4.1.3" - dom-converter "^0.2.0" - htmlparser2 "^6.1.0" - lodash "^4.17.21" - strip-ansi "^6.0.1" - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - 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.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.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - 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" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -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" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -require-uncached@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -requireindex@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" - integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI= - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - integrity sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@^1.1.7, resolve@^1.10.1, resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -resolve@^2.0.0-next.4: - version "2.0.0-next.4" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" - integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - integrity sha1-NGYfRohjJ/7SmRR5FSJS35LapUE= - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -restore-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" - integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -retry@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" - integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - -retry@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" - integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== - dependencies: - glob "^7.0.5" - -rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rimraf@~2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" - integrity sha1-yK1KXhEGYeQCp9IbUw4AnyX444k= - dependencies: - once "^1.3.0" - -run-async@^2.2.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= - dependencies: - aproba "^1.1.1" - -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" - integrity sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI= - -rxjs@^6.4.0: - version "6.6.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2" - integrity sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg== - dependencies: - tslib "^1.9.0" - -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" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", 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" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sass-lint@1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/sass-lint/-/sass-lint-1.12.1.tgz#630f69c216aa206b8232fb2aa907bdf3336b6d83" - integrity sha1-Yw9pwhaqIGuCMvsqqQe98zNrbYM= - dependencies: - commander "^2.8.1" - eslint "^2.7.0" - front-matter "2.1.2" - fs-extra "^3.0.1" - glob "^7.0.0" - globule "^1.0.0" - gonzales-pe-sl "^4.2.3" - js-yaml "^3.5.4" - known-css-properties "^0.3.0" - lodash.capitalize "^4.1.0" - lodash.kebabcase "^4.0.0" - merge "^1.2.0" - path-is-absolute "^1.0.0" - util "^0.10.3" - -schema-utils@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" - integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== - dependencies: - "@types/json-schema" "^7.0.4" - ajv "^6.12.2" - ajv-keywords "^3.4.1" - -schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.8.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" - -script-loader@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/script-loader/-/script-loader-0.7.2.tgz#2016db6f86f25f5cf56da38915d83378bb166ba7" - integrity sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA== - dependencies: - raw-loader "~0.5.1" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= - -selfsigned@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.1.1.tgz#18a7613d714c0cd3385c48af0075abf3f266af61" - integrity sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ== - dependencies: - node-forge "^1" - -semver-diff@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" - integrity sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY= - dependencies: - semver "^5.0.3" - -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== - dependencies: - randombytes "^2.1.0" - -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -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" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -sha@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/sha/-/sha-3.0.0.tgz#b2f2f90af690c16a3a839a6a6c680ea51fedd1ae" - integrity sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw== - dependencies: - graceful-fs "^4.1.2" - -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - -shallowequal@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" - integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.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" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shell-quote@^1.7.3: - version "1.8.0" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.0.tgz#20d078d0eaf71d54f43bd2ba14a1b5b9bfa5c8ba" - integrity sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ== - -shelljs@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.6.1.tgz#ec6211bed1920442088fe0f70b2837232ed2c8a8" - integrity sha1-7GIRvtGSBEIIj+D3Cyg3Iy7SyKg= - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-progress-webpack-plugin@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/simple-progress-webpack-plugin/-/simple-progress-webpack-plugin-2.0.0.tgz#2d51a63e266070cdd181215a6665e29ea6e82055" - integrity sha512-Ji8b05YHc9R8iHHbEX8kOqvR2CB8bUqqqP481DbY+j5ImqBhLXk9sXFZZdcSEK3Ld0hZl9i+5CzXWLXzw1NV9g== - dependencies: - chalk "4.1.x" - figures "3.2.x" - log-update "4.0.x" - -sirv@^1.0.7: - version "1.0.19" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" - integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== - dependencies: - "@polka/url" "^1.0.0-next.20" - mrmime "^1.0.0" - totalist "^1.0.0" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -slide@^1.1.6, slide@~1.1.3, slide@~1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= - -smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - 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" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - 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" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - 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" - -sockjs@^0.3.24: - version "0.3.24" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" - integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== - dependencies: - faye-websocket "^0.11.3" - uuid "^8.3.2" - websocket-driver "^0.7.4" - -socks-proxy-agent@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" - integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== - dependencies: - agent-base "~4.2.1" - socks "~2.3.2" - -socks@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" - integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== - dependencies: - ip "1.1.5" - smart-buffer "^4.1.0" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - -sorted-object@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/sorted-object/-/sorted-object-2.0.1.tgz#7d631f4bd3a798a24af1dffcfbfe83337a5df5fc" - integrity sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw= - -sorted-union-stream@~2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz#c7794c7e077880052ff71a8d4a2dbb4a9a638ac7" - integrity sha1-x3lMfgd4gAUv9xqNSi27Sppjisc= - dependencies: - from2 "^1.3.0" - stream-iterate "^1.1.0" - -source-map-js@^1.0.1, source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - 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" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.21, source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@0.4.0, 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" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -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" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== - -spdy-transport@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" - integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - dependencies: - debug "^4.1.0" - detect-node "^2.0.4" - hpack.js "^2.1.6" - obuf "^1.1.2" - readable-stream "^3.0.6" - wbuf "^1.7.3" - -spdy@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" - integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - dependencies: - debug "^4.1.0" - handle-thing "^2.0.0" - http-deceiver "^1.2.7" - select-hose "^2.0.0" - spdy-transport "^3.0.0" - -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" - integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== - -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" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -split2@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" - integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== - dependencies: - through2 "^2.0.2" - -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== - 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" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -ssri@^6.0.0, ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== - dependencies: - figgy-pudding "^3.5.1" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stream-browserify@3.0.0, stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-http@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" - integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.4" - readable-stream "^3.6.0" - xtend "^4.0.2" - -stream-iterate@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/stream-iterate/-/stream-iterate-1.2.0.tgz#2bd7c77296c1702a46488b8ad41f79865eecd4e1" - integrity sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE= - dependencies: - readable-stream "^2.1.5" - stream-shift "^1.0.0" - -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== - -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - 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", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.matchall@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" - integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.4.3" - side-channel "^1.0.4" - -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string_decoder@^1.1.1, string_decoder@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -stringify-package@^1.0.0, stringify-package@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" - integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== - -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" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - 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" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== - dependencies: - ansi-regex "^6.0.1" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-comments@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-comments/-/strip-comments-2.0.1.tgz#4ad11c3fbcac177a67a40ac224ca339ca1c1ba9b" - integrity sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw== - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= - dependencies: - get-stdin "^4.0.1" - -strip-indent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" - integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -strip-json-comments@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" - integrity sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E= - -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" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -strong-log-transformer@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" - integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== - dependencies: - duplexer "^0.1.1" - minimist "^1.2.0" - through "^2.3.4" - -style-loader@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" - integrity sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ== - -style-loader@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-2.0.0.tgz#9669602fd4690740eaaec137799a03addbbc393c" - integrity sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -style-search@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" - integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI= - -stylelint-config-recommended@10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-10.0.1.tgz#25a8828acf6cde87dac6db2950c8c4ed82a69ae1" - integrity sha512-TQ4xQ48tW4QSlODcti7pgSRqBZcUaBzuh0jPpfiMhwJKBPkqzTIAU+IrSWL/7BgXlOM90DjB7YaNgFpx8QWhuA== - -stylelint-config-styled-components@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/stylelint-config-styled-components/-/stylelint-config-styled-components-0.1.1.tgz#b408388d7c687833ab4be4c4e6522d97d2827ede" - integrity sha512-z5Xz/9GmvxO6e/DLzBMwkB85zHxEEjN6K7Cj80Bi+o/9vR9eS3GX3E9VuMnX9WLFYulqbqLtTapGGY28JBiy9Q== - -stylelint-custom-processor-loader@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/stylelint-custom-processor-loader/-/stylelint-custom-processor-loader-0.6.0.tgz#57b70095e9999252967ff8aa2ec185cbbfbe3cba" - integrity sha512-vwab7dHm0/GfKumFMrX9lXEjN+Re+MZSdWstA5ORwKI0XjZ3pLKtSdR6jwNLZNcdzQMu4qaFwhC7YLiPVmvA8w== - dependencies: - loader-utils "~1.1.0" - -stylelint-processor-styled-components@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/stylelint-processor-styled-components/-/stylelint-processor-styled-components-1.10.0.tgz#8082fc68779476aac411d3afffac0bc833d77a29" - integrity sha512-g4HpN9rm0JD0LoHuIOcd/FIjTZCJ0ErQ+dC3VTxp+dSvnkV+MklKCCmCQEdz5K5WxF4vPuzfVgdbSDuPYGZhoA== - dependencies: - "@babel/parser" "^7.8.3" - "@babel/traverse" "^7.8.3" - micromatch "^4.0.2" - postcss "^7.0.26" - -stylelint@15.2.0: - version "15.2.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-15.2.0.tgz#e906eb59df83bde075d148623216f298f9ceb03a" - integrity sha512-wjg5OLn8zQwjlj5cYUgyQpMWKzct42AG5dYlqkHRJQJqsystFFn3onqEc263KH4xfEI0W3lZCnlIhFfS64uwSA== - dependencies: - "@csstools/css-parser-algorithms" "^2.0.1" - "@csstools/css-tokenizer" "^2.0.1" - "@csstools/media-query-list-parser" "^2.0.1" - "@csstools/selector-specificity" "^2.1.1" - balanced-match "^2.0.0" - colord "^2.9.3" - cosmiconfig "^8.0.0" - css-functions-list "^3.1.0" - css-tree "^2.3.1" - debug "^4.3.4" - fast-glob "^3.2.12" - fastest-levenshtein "^1.0.16" - file-entry-cache "^6.0.1" - global-modules "^2.0.0" - globby "^11.1.0" - globjoin "^0.1.4" - html-tags "^3.2.0" - ignore "^5.2.4" - import-lazy "^4.0.0" - imurmurhash "^0.1.4" - is-plain-object "^5.0.0" - known-css-properties "^0.26.0" - mathml-tag-names "^2.1.3" - meow "^9.0.0" - micromatch "^4.0.5" - normalize-path "^3.0.0" - picocolors "^1.0.0" - postcss "^8.4.21" - postcss-media-query-parser "^0.2.3" - postcss-resolve-nested-selector "^0.1.1" - postcss-safe-parser "^6.0.0" - postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" - resolve-from "^5.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - style-search "^0.1.0" - supports-hyperlinks "^2.3.0" - svg-tags "^1.0.0" - table "^6.8.1" - v8-compile-cache "^2.3.0" - write-file-atomic "^5.0.0" - -supports-color@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" - integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== - dependencies: - has-flag "^3.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-hyperlinks@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -svg-tags@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" - integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q= - -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" - integrity sha1-K7xULw/amGGnVdOUf+/Ys/UThV8= - dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" - -table@^6.8.1: - version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - -tailwindcss@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.2.7.tgz#5936dd08c250b05180f0944500c01dce19188c07" - integrity sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ== - dependencies: - arg "^5.0.2" - chokidar "^3.5.3" - color-name "^1.1.4" - detective "^5.2.1" - didyoumean "^1.2.2" - dlv "^1.1.3" - fast-glob "^3.2.12" - glob-parent "^6.0.2" - is-glob "^4.0.3" - lilconfig "^2.0.6" - micromatch "^4.0.5" - normalize-path "^3.0.0" - object-hash "^3.0.0" - picocolors "^1.0.0" - postcss "^8.0.9" - postcss-import "^14.1.0" - postcss-js "^4.0.0" - postcss-load-config "^3.1.4" - postcss-nested "6.0.0" - postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" - quick-lru "^5.1.1" - resolve "^1.22.1" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar-stream@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -tar@^4.4.10, tar@^4.4.12, tar@^4.4.13, tar@^4.4.8: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - -temp-write@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" - integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= - dependencies: - graceful-fs "^4.1.2" - is-stream "^1.1.0" - make-dir "^1.0.0" - pify "^3.0.0" - temp-dir "^1.0.0" - uuid "^3.0.1" - -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= - dependencies: - execa "^0.7.0" - -terser-webpack-plugin@^5.1.3: - version "5.3.7" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz#ef760632d24991760f339fe9290deb936ad1ffc7" - integrity sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.17" - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.16.5" - -terser@^5.10.0, terser@^5.15.1, terser@^5.16.5: - version "5.16.8" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.8.tgz#ccde583dabe71df3f4ed02b65eb6532e0fae15d5" - integrity sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-extensions@^1.0.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" - integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== - -text-table@^0.2.0, text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" - -through2@^2.0.0, through2@^2.0.2: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" - integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== - dependencies: - inherits "^2.0.4" - readable-stream "2 || 3" - -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - -timed-out@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -timers-browserify@^2.0.12: - version "2.0.12" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - dependencies: - setimmediate "^1.0.4" - -tiny-relative-date@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" - integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -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" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -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" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - 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" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -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" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= - -trim-newlines@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" - integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= - -trim-newlines@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" - integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA== - -trim-off-newlines@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" - integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -ts-loader@9.4.2: - version "9.4.2" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.4.2.tgz#80a45eee92dd5170b900b3d00abcfa14949aeb78" - integrity sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - -tsconfig-paths@^3.14.1: - version "3.14.2" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== - -tslib@^2.0.3: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -tty-browserify@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" - integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - 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" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - -type-fest@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" - integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== - -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-fest@^2.14.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" - integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" - integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== - -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -typescript@4.9.5: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -uglify-js@^3.1.4: - version "3.10.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.1.tgz#dd14767eb7150de97f2573a5ff210db14fffe4ad" - integrity sha512-RjxApKkrPJB6kjJxQS3iZlf///REXWYxYJxO/MpmlQzVkDWVI3PSnCBWezMecmTU/TRkNxrl8bmsfFQCp+LO+Q== - -uid-number@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= - -umask@^1.1.0, umask@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" - integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - -unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" - integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - dependencies: - unicode-canonical-property-names-ecmascript "^2.0.0" - unicode-property-aliases-ecmascript "^2.0.0" - -unicode-match-property-value-ecmascript@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" - integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== - -unicode-match-property-value-ecmascript@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" - integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" - integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== - -unicode-property-aliases-ecmascript@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" - integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unique-slug@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" - integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== - dependencies: - imurmurhash "^0.1.4" - -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= - dependencies: - crypto-random-string "^1.0.0" - -universal-user-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" - integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== - dependencies: - os-name "^3.1.0" - -universal-user-agent@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" - integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -unzip-response@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" - integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= - -upath@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -update-browserslist-db@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -update-notifier@^2.2.0, update-notifier@^2.3.0, update-notifier@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" - integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== - dependencies: - boxen "^1.2.1" - chalk "^2.0.1" - configstore "^3.0.0" - import-lazy "^2.1.0" - is-ci "^1.0.10" - is-installed-globally "^0.1.0" - is-npm "^1.0.0" - latest-version "^3.0.0" - semver-diff "^2.0.0" - xdg-basedir "^3.0.0" - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -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" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8= - dependencies: - os-homedir "^1.0.0" - -username@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/username/-/username-3.0.0.tgz#b3dba982a72b4ce59d52f159fa1aeba266af5fc8" - integrity sha1-s9upgqcrTOWdUvFZ+hrromavX8g= - dependencies: - execa "^0.7.0" - mem "^1.1.0" - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util-extend@^1.0.1, util-extend@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" - integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= - -util-promisify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" - integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM= - dependencies: - object.getownpropertydescriptors "^2.0.3" - -util@^0.10.3: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" - -util@^0.12.0, util@^0.12.4: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3, validate-npm-package-license@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= - dependencies: - builtins "^1.0.3" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vkbeautify@0.99.3: - version "0.99.3" - resolved "https://registry.yarnpkg.com/vkbeautify/-/vkbeautify-0.99.3.tgz#4769b3238c5d772c6ea967545dd1df5582f23297" - integrity sha512-2ozZEFfmVvQcHWoHLNuiKlUfDKlhh4KGsy54U0UrlLMR1SO+XKAIDqBxtBwHgNrekurlJwE8A9K6L49T78ZQ9Q== - -vm-browserify@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -wbuf@^1.1.0, wbuf@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - dependencies: - minimalistic-assert "^1.0.0" - -wcwidth@^1.0.0, wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - dependencies: - defaults "^1.0.3" - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -webpack-bundle-analyzer@4.8.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.8.0.tgz#951b8aaf491f665d2ae325d8b84da229157b1d04" - integrity sha512-ZzoSBePshOKhr+hd8u6oCkZVwpVaXgpw23ScGLFpR6SjYI7+7iIWYarjN6OEYOfRt8o7ZyZZQk0DuMizJ+LEIg== - dependencies: - "@discoveryjs/json-ext" "0.5.7" - acorn "^8.0.4" - acorn-walk "^8.0.0" - chalk "^4.1.0" - commander "^7.2.0" - gzip-size "^6.0.0" - lodash "^4.17.20" - opener "^1.5.2" - sirv "^1.0.7" - ws "^7.3.1" - -webpack-dev-middleware@^5.3.1: - version "5.3.3" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f" - integrity sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA== - dependencies: - colorette "^2.0.10" - memfs "^3.4.3" - mime-types "^2.1.31" - range-parser "^1.2.1" - schema-utils "^4.0.0" - -webpack-dev-server@4.11.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz#ae07f0d71ca0438cf88446f09029b92ce81380b5" - integrity sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw== - dependencies: - "@types/bonjour" "^3.5.9" - "@types/connect-history-api-fallback" "^1.3.5" - "@types/express" "^4.17.13" - "@types/serve-index" "^1.9.1" - "@types/serve-static" "^1.13.10" - "@types/sockjs" "^0.3.33" - "@types/ws" "^8.5.1" - ansi-html-community "^0.0.8" - bonjour-service "^1.0.11" - chokidar "^3.5.3" - colorette "^2.0.10" - compression "^1.7.4" - connect-history-api-fallback "^2.0.0" - default-gateway "^6.0.3" - express "^4.17.3" - graceful-fs "^4.2.6" - html-entities "^2.3.2" - http-proxy-middleware "^2.0.3" - ipaddr.js "^2.0.1" - open "^8.0.9" - p-retry "^4.5.0" - rimraf "^3.0.2" - schema-utils "^4.0.0" - selfsigned "^2.1.1" - serve-index "^1.9.1" - sockjs "^0.3.24" - spdy "^4.0.2" - webpack-dev-middleware "^5.3.1" - ws "^8.4.2" - -webpack-merge@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.2.tgz#5d372dddd3e1e5f8874f5bf5a8e929db09feb216" - integrity sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw== - dependencies: - lodash "^4.17.5" - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack-virtual-modules@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.3.2.tgz#b7baa30971a22d99451f897db053af48ec29ad2c" - integrity sha512-RXQXioY6MhzM4CNQwmBwKXYgBs6ulaiQ8bkNQEl2J6Z+V+s7lgl/wGvaI/I0dLnYKB8cKsxQc17QOAVIphPLDw== - dependencies: - debug "^3.0.0" - -webpack@5.75.0: - version "5.75.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.75.0.tgz#1e440468647b2505860e94c9ff3e44d5b582c152" - integrity sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.7.1" - acorn-import-assertions "^1.7.6" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" - es-module-lexer "^0.9.0" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.1.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" - watchpack "^2.4.0" - webpack-sources "^3.2.3" - -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -whatwg-fetch@3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c" - integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== - -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which-typed-array@^1.1.2, which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - -which@^1.2.9, which@^1.3.0, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - 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" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -widest-line@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" - integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== - dependencies: - string-width "^2.1.1" - -windows-release@^3.1.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.3.tgz#1c10027c7225743eec6b89df160d64c2e0293999" - integrity sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg== - dependencies: - execa "^1.0.0" - -word-wrap@^1.2.3, word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - -worker-farm@^1.6.0, worker-farm@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" - integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== - dependencies: - errno "~0.1.7" - -worker-loader@3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-3.0.8.tgz#5fc5cda4a3d3163d9c274a4e3a811ce8b60dbb37" - integrity sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2, write-file-atomic@^2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write-file-atomic@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.0.tgz#54303f117e109bf3d540261125c8ea5a7320fab0" - integrity sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -write-json-file@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" - integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - pify "^3.0.0" - sort-keys "^2.0.0" - write-file-atomic "^2.0.0" - -write-json-file@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" - integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.15" - make-dir "^2.1.0" - pify "^4.0.1" - sort-keys "^2.0.0" - write-file-atomic "^2.4.2" - -write-pkg@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21" - integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw== - dependencies: - sort-keys "^2.0.0" - write-json-file "^2.2.0" - -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= - dependencies: - mkdirp "^0.5.1" - -ws@^5.1.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -ws@^7.3.1: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -ws@^8.4.2: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== - -xdg-basedir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" - integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= - -xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -xxhashjs@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" - integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== - dependencies: - cuint "^0.2.2" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml@^1.10.0, yaml@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - -yaml@^1.7.2: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== - -yargs-parser@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^18.1.3: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= - dependencies: - camelcase "^4.1.0" - -yargs@^14.2.2, yargs@^14.2.3: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== - dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.1" - -yargs@^17.6.0: - version "17.7.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" - integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yargs@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" - integrity sha1-YpmpBVsc78lp/355wdkY3Osiw2A= - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - -yauzl@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zip-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" - integrity sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A== - dependencies: - archiver-utils "^2.1.0" - compress-commons "^4.1.0" - readable-stream "^3.6.0" diff --git a/ui-frontend/packages/catalog-ui-search/yarn.lock b/yarn.lock similarity index 100% rename from ui-frontend/packages/catalog-ui-search/yarn.lock rename to yarn.lock